summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unotools/qa/unit/testGetEnlishSearchName.cxx6
-rw-r--r--unotools/source/misc/fontdefs.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/unotools/qa/unit/testGetEnlishSearchName.cxx b/unotools/qa/unit/testGetEnlishSearchName.cxx
index 06ffcef06558..dbc8b173a9f1 100644
--- a/unotools/qa/unit/testGetEnlishSearchName.cxx
+++ b/unotools/qa/unit/testGetEnlishSearchName.cxx
@@ -40,10 +40,10 @@ void Test::testSingleElement()
test1 = GetEnglishSearchFontName( "Symbol " );
CPPUNIT_ASSERT_EQUAL(OUString("symbol"),test1);
//removing Skripts
- test1 = GetEnglishSearchFontName( "Symbol(skript)" );
- CPPUNIT_ASSERT_EQUAL(OUString("symbol"),test1);
+ test1 = GetEnglishSearchFontName( "Symbol(SIP)" );
+ CPPUNIT_ASSERT_EQUAL(OUString("symbol(sip)"),test1);
//remove Whitespaces between
- test1 = GetEnglishSearchFontName( "Symbol (skript)" );
+ test1 = GetEnglishSearchFontName( "Symbol (thai)" );
CPPUNIT_ASSERT_EQUAL( OUString("symbol"),test1);
//remove special characters; leave semicolon, numbers
test1 = GetEnglishSearchFontName( "sy;mb?=ol129" );
diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
index cac720fe5dd9..79f282143f8c 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -406,7 +406,7 @@ OUString GetEnglishSearchFontName(const OUString& rInName)
c += 'a' - 'A';
rName[ i ] = c;
}
- else if( ((c < '0') || (c > '9')) && (c != ';') ) // not 0-9 or semicolon
+ else if( ((c < '0') || (c > '9')) && (c != ';') && (c != '(') && (c != ')') ) // not 0-9, semicolon, or brackets
{
// Remove white spaces and special characters
rName.remove(i,1);