[Libreoffice-commits] .: sc/source

Lubos Lunak l.lunak at suse.cz
Sun Aug 5 03:36:52 PDT 2012


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 at 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 at suse.cz


More information about the LibreOffice mailing list