Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Sunday 05 of August 2012, Markus Mohrhard wrote:
 sc/source/filter/xml/xmlcondformat.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 507305afa0d826b7e3cb3cc9a4b389f0ba854638
Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date:   Sun Aug 5 11:47:19 2012 +0200

    use correct string length for "between", fdo#53010

    Change-Id: I282c6a4436984d268b107ffef01022831c05a0fa

diff --git a/sc/source/filter/xml/xmlcondformat.cxx
b/sc/source/filter/xml/xmlcondformat.cxx index 7878b82..636e76a 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -313,7 +313,7 @@ void GetConditionData(const rtl::OUString& rValue,
ScConditionMode& eMode, rtl:: else if(rValue.indexOf("between") == 0)
     {
         const sal_Unicode* pStr = rValue.getStr();
-        const sal_Unicode* pStart = pStr + 7;
+        const sal_Unicode* pStart = pStr + 8;
         const sal_Unicode* pEnd = pStr + rValue.getLength();
         rExpr1 = ScXMLConditionHelper::getExpression( pStart, pEnd, ',');
         rExpr2 = ScXMLConditionHelper::getExpression( pStart, pEnd, ')');

 It's usually better to just write strlen( "foo" ) rather than hardcode 
numbers, compilers can optimize away calls to strlen with string literals 
anyway.

-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.