[Libreoffice-commits] .: l10ntools/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Wed Jul 11 10:11:32 PDT 2012


 l10ntools/source/tagtest.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit de3d6883f2a8fe9c5c04b8e271a36423f96950bb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jul 11 19:09:44 2012 +0200

    Regression fix correction
    
    Change-Id: I03f020f474c198368aa3528870b0752752a3bd2c

diff --git a/l10ntools/source/tagtest.cxx b/l10ntools/source/tagtest.cxx
index 77b3be8..062c5c7 100644
--- a/l10ntools/source/tagtest.cxx
+++ b/l10ntools/source/tagtest.cxx
@@ -772,7 +772,10 @@ rtl::OUString SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, s
     if (nStyle2StartPos == -1 && nStyle3StartPos == -1)
         return rtl::OUString();  // no more tokens
 
-    if ( nStyle4StartPos != -1 && nStyle4StartPos < nStyle2StartPos && nStyle4StartPos <= nStyle3StartPos )  // <= to make sure \\ is always handled first
+    if ( nStyle4StartPos != -1
+         && (nStyle2StartPos == -1 || nStyle4StartPos < nStyle2StartPos)
+         && (nStyle3StartPos == -1 || nStyle4StartPos < nStyle3StartPos ) )
+        // to make sure \\ is always handled first
     {   // Skip quoted Backslash
         nPos = nStyle4StartPos +2;
         return GetNextTokenString( rErrorList, rTagStartPos );


More information about the Libreoffice-commits mailing list