Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
cf2c056b
Kaydet (Commit)
cf2c056b
authored
Agu 22, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove special casing for default theme in vcl
Change-Id: I4d7a37ab9b31fcce7704f07d883d6f7806f066ec
üst
0bcefcab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
30 deletions
+1
-30
test_IconThemeInfo.cxx
vcl/qa/cppunit/app/test_IconThemeInfo.cxx
+0
-18
IconThemeInfo.cxx
vcl/source/app/IconThemeInfo.cxx
+1
-12
No files found.
vcl/qa/cppunit/app/test_IconThemeInfo.cxx
Dosyayı görüntüle @
cf2c056b
...
...
@@ -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
);
...
...
vcl/source/app/IconThemeInfo.cxx
Dosyayı görüntüle @
cf2c056b
...
...
@@ -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
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment