Upcoming loplugin:elidestringvar: i18npool
Change-Id: I5644ca7f2ef1b251ce1c262d3001ca48f2ed9edd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95482 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
8d41357570
commit
3d20df43c4
3 changed files with 4 additions and 11 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue