Kaydet (Commit) cf2c056b authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

remove special casing for default theme in vcl

Change-Id: I4d7a37ab9b31fcce7704f07d883d6f7806f066ec
üst 0bcefcab
......@@ -53,8 +53,6 @@ class IconThemeInfoTest : public CppUnit::TestFixture
CPPUNIT_TEST(ThemeIdIsDetectedFromFileNameWithUnderscore);
CPPUNIT_TEST(ImagesZipIsNotValid);
CPPUNIT_TEST(ImagesOxygenZipIsValid);
CPPUNIT_TEST(DefaultZipIsValid);
CPPUNIT_TEST(GalaxyIsReturnedAsDisplayNameForDefaultZip);
CPPUNIT_TEST(ExceptionIsThrownWhenIdCannotBeDetermined1);
CPPUNIT_TEST(ExceptionIsThrownWhenIdCannotBeDetermined2);
......@@ -86,14 +84,6 @@ IconThemeInfoTest::ImagesOxygenZipIsValid()
CPPUNIT_ASSERT_EQUAL_MESSAGE("images_oxygen.zip is a valid theme name", true, valid);
}
void
IconThemeInfoTest::DefaultZipIsValid()
{
OUString id("file://default.zip");
bool valid = vcl::IconThemeInfo::UrlCanBeParsed(id);
CPPUNIT_ASSERT_EQUAL_MESSAGE("default.zip is a valid theme name", true, valid);
}
void
IconThemeInfoTest::ThemeIdIsDetectedFromFileNameWithUnderscore()
{
......@@ -130,14 +120,6 @@ IconThemeInfoTest::ExceptionIsThrownWhenIdCannotBeDetermined2()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception was thrown", true, thrown);
}
void
IconThemeInfoTest::GalaxyIsReturnedAsDisplayNameForDefaultZip()
{
OUString id("file://default.zip");
IconThemeInfo i(id);
CPPUNIT_ASSERT_EQUAL_MESSAGE("default.zip is displayed as Galaxy", OUString("Galaxy"), i.GetDisplayName());
}
// Put the test suite in the registry
CPPUNIT_TEST_SUITE_REGISTRATION(IconThemeInfoTest);
......
......@@ -60,7 +60,7 @@ IconThemeInfo::SizeByThemeName(const OUString& themeName)
else if (themeName == "crystal") {
return Size( 22, 22 );
}
else if (themeName == "default") {
else if (themeName == "galaxy") {
return Size( 22, 22 );
}
else {
......@@ -76,10 +76,6 @@ IconThemeInfo::UrlCanBeParsed(const OUString& url)
return false;
}
if (fname == "default.zip") {
return true;
}
if (!fname.startsWithIgnoreAsciiCase(ICON_THEME_PACKAGE_PREFIX)) {
return false;
}
......@@ -94,9 +90,6 @@ IconThemeInfo::UrlCanBeParsed(const OUString& url)
/*static*/ OUString
IconThemeInfo::FileNameToThemeId(const OUString& filename)
{
if (filename == "default.zip") {
return OUString("default");
}
OUString r;
sal_Int32 positionOfLastDot = filename.lastIndexOf(EXTENSION_FOR_ICON_PACKAGES);
if (positionOfLastDot < 0) { // -1 means index not found
......@@ -118,10 +111,6 @@ IconThemeInfo::ThemeIdToDisplayName(const OUString& themeId)
throw std::runtime_error("IconThemeInfo::ThemeIdToDisplayName() called with invalid id.");
}
if (themeId == "default") {
return OUString("Galaxy");
}
// make the first letter uppercase
OUString r;
sal_Unicode firstLetter = themeId[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment