diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-20 15:32:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-20 15:32:53 +0100 |
commit | d89a2aaaeb7c4afdb70978e5cb54443119e3ee45 (patch) | |
tree | 1c8b2ce84aa8b040effdc96d2b99309754413d70 /unotools | |
parent | 70ae4721b9324ebc83fcd7f49f67db60982c9345 (diff) |
fix font tests
Change-Id: I2738ea2a5c6714d8e43c06aa2eb4c53500a5afe9
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/qa/unit/testGetEnlishSearchName.cxx | 6 | ||||
-rw-r--r-- | unotools/source/misc/fontdefs.cxx | 2 |
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); |