i18npool/qa/cppunit/test_breakiterator.cxx |    4 +---
 i18npool/qa/cppunit/test_textsearch.cxx    |    3 +--
 i18npool/source/localedata/LocaleNode.cxx  |    8 ++------
 3 files changed, 4 insertions(+), 11 deletions(-)

New commits:
commit 3d20df43c450889ec0a8f61ea12df7338eb1ff97
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Jun 4 09:11:26 2020 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Thu Jun 4 14:33:50 2020 +0200

    Upcoming loplugin:elidestringvar: i18npool
    
    Change-Id: I5644ca7f2ef1b251ce1c262d3001ca48f2ed9edd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95482
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx 
b/i18npool/qa/cppunit/test_breakiterator.cxx
index a41cd821857c..3be0ea4e8d0d 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -113,14 +113,12 @@ void TestBreakIterator::testLineBreaking()
 
     //See https://bz.apache.org/ooo/show_bug.cgi?id=17155
     {
-        OUString const aTest("foo /bar/baz");
-
         aLocale.Language = "en";
         aLocale.Country = "US";
 
         {
             //Here we want the line break to leave /bar/ba clumped together on 
the next line
-            i18n::LineBreakResults aResult = m_xBreak->getLineBreak(aTest, 
strlen("foo /bar/ba"), aLocale, 0,
+            i18n::LineBreakResults aResult = m_xBreak->getLineBreak("foo 
/bar/baz", strlen("foo /bar/ba"), aLocale, 0,
                 aHyphOptions, aUserOptions);
             CPPUNIT_ASSERT_EQUAL_MESSAGE("Expected a break at the first 
slash", static_cast<sal_Int32>(4), aResult.breakIndex);
         }
diff --git a/i18npool/qa/cppunit/test_textsearch.cxx 
b/i18npool/qa/cppunit/test_textsearch.cxx
index b2175b21bfa5..3d157e2cbdb4 100644
--- a/i18npool/qa/cppunit/test_textsearch.cxx
+++ b/i18npool/qa/cppunit/test_textsearch.cxx
@@ -92,7 +92,6 @@ void TestTextSearch::testSearches()
 {
     OUString str( "acababaabcababadcdaa" );
     sal_Int32 startPos = 2, endPos = 20 ;
-    OUString const searchStr( "(ab)*a(c|d)+" );
     sal_Int32 const fStartRes = 10, fEndRes = 18 ;
     sal_Int32 const bStartRes = 18, bEndRes = 10 ;
 
@@ -100,7 +99,7 @@ void TestTextSearch::testSearches()
     util::SearchOptions aOptions;
     aOptions.algorithmType = util::SearchAlgorithms_REGEXP ;
     aOptions.searchFlag = util::SearchFlags::ALL_IGNORE_CASE;
-    aOptions.searchString = searchStr;
+    aOptions.searchString = "(ab)*a(c|d)+";
     m_xSearch->setOptions( aOptions );
 
     util::SearchResult aRes;
diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index ddc8cf46dfd1..3760ac753e06 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -711,12 +711,8 @@ void LCFormatNode::generateCode (const OFileWriter &of) 
const
                     if (strcmp( of.getLocale(), "en_US") != 0)
                     {
                         const OUString& aCode( n->getValue());
-                        OUString const aPar1( "0)");
-                        OUString const aPar2( "-)" );
-                        OUString const aPar3( " )" );
-                        OUString const aPar4( "])" );
-                        if (aCode.indexOf( aPar1 ) > 0 || aCode.indexOf( aPar2 
) > 0 ||
-                                aCode.indexOf( aPar3 ) > 0 || aCode.indexOf( 
aPar4 ) > 0)
+                        if (aCode.indexOf( "0)" ) > 0 || aCode.indexOf( "-)" ) 
> 0 ||
+                                aCode.indexOf( " )" ) > 0 || aCode.indexOf( 
"])" ) > 0)
                             fprintf( stderr, "Warning: FormatCode 
formatindex=\"%d\" for currency uses parentheses for negative amounts, which 
probably is not correct for locales not based on en_US.\n", formatindex);
                     }
                     // Check if we have replaceTo for "[CURRENCY]" placeholder.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to