From d89a2aaaeb7c4afdb70978e5cb54443119e3ee45 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Oct 2014 15:32:18 +0100 Subject: fix font tests Change-Id: I2738ea2a5c6714d8e43c06aa2eb4c53500a5afe9 --- unotools/qa/unit/testGetEnlishSearchName.cxx | 6 +++--- 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); -- cgit