[Libreoffice-commits] core.git: unotools/qa unotools/source
Caolán McNamara
caolanm at redhat.com
Mon Oct 20 07:33:36 PDT 2014
unotools/qa/unit/testGetEnlishSearchName.cxx | 6 +++---
unotools/source/misc/fontdefs.cxx | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit d89a2aaaeb7c4afdb70978e5cb54443119e3ee45
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 20 15:32:18 2014 +0100
fix font tests
Change-Id: I2738ea2a5c6714d8e43c06aa2eb4c53500a5afe9
diff --git a/unotools/qa/unit/testGetEnlishSearchName.cxx b/unotools/qa/unit/testGetEnlishSearchName.cxx
index 06ffcef..dbc8b17 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 cac720f..79f2821 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);
More information about the Libreoffice-commits
mailing list