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
e5ac3524
Kaydet (Commit)
e5ac3524
authored
Ock 13, 2012
tarafından
Christina Rossmanith
Kaydeden (comit)
Caolán McNamara
Ock 13, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace getLength() with isEmpty() in vcl/generic/fontmanager
üst
8ca94d31
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
fontcache.cxx
vcl/generic/fontmanager/fontcache.cxx
+2
-2
fontconfig.cxx
vcl/generic/fontmanager/fontconfig.cxx
+8
-8
fontmanager.cxx
vcl/generic/fontmanager/fontmanager.cxx
+6
-6
helper.cxx
vcl/generic/fontmanager/helper.cxx
+6
-6
No files found.
vcl/generic/fontmanager/fontcache.cxx
Dosyayı görüntüle @
e5ac3524
...
...
@@ -176,7 +176,7 @@ void FontCache::flush()
for
(
::
std
::
list
<
int
>::
const_iterator
name_it
=
(
*
it
)
->
m_aAliases
.
begin
();
name_it
!=
(
*
it
)
->
m_aAliases
.
end
();
++
name_it
)
{
const
OUString
&
rAdd
(
pAtoms
->
getString
(
ATOM_FAMILYNAME
,
*
name_it
)
);
if
(
rAdd
.
getLength
()
)
if
(
!
rAdd
.
isEmpty
()
)
{
aLine
.
append
(
';'
);
aLine
.
append
(
OUStringToOString
(
rAdd
,
RTL_TEXTENCODING_UTF8
));
...
...
@@ -233,7 +233,7 @@ void FontCache::flush()
break
;
default
:
break
;
}
if
(
(
*
it
)
->
m_aStyleName
.
getLength
()
)
if
(
!
(
*
it
)
->
m_aStyleName
.
isEmpty
()
)
{
aLine
.
append
(
';'
);
aLine
.
append
(
OUStringToOString
((
*
it
)
->
m_aStyleName
,
RTL_TEXTENCODING_UTF8
));
...
...
vcl/generic/fontmanager/fontconfig.cxx
Dosyayı görüntüle @
e5ac3524
...
...
@@ -773,7 +773,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
FcPatternAddString
(
pPattern
,
FC_FAMILY
,
pTargetNameUtf8
);
const
rtl
::
OString
aLangAttrib
=
MsLangId
::
convertLanguageToIsoByteString
(
rPattern
.
meLanguage
);
if
(
aLangAttrib
.
getLength
()
)
if
(
!
aLangAttrib
.
isEmpty
()
)
{
const
FcChar8
*
pLangAttribUtf8
;
if
(
aLangAttrib
.
equalsIgnoreAsciiCase
(
OString
(
RTL_CONSTASCII_STRINGPARAM
(
"pa-in"
))))
...
...
@@ -784,7 +784,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
}
// Add required Unicode characters, if any
if
(
rMissingCodes
.
getLength
()
)
if
(
!
rMissingCodes
.
isEmpty
()
)
{
FcCharSet
*
unicodes
=
FcCharSetCreate
();
for
(
sal_Int32
nStrIndex
=
0
;
nStrIndex
<
rMissingCodes
.
getLength
();
)
...
...
@@ -889,7 +889,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
}
// update rMissingCodes by removing resolved unicodes
if
(
rMissingCodes
.
getLength
()
>
0
)
if
(
!
rMissingCodes
.
isEmpty
()
)
{
sal_uInt32
*
pRemainingCodes
=
(
sal_uInt32
*
)
alloca
(
rMissingCodes
.
getLength
()
*
sizeof
(
sal_uInt32
)
);
int
nRemainingLen
=
0
;
...
...
@@ -954,7 +954,7 @@ ImplFontOptions* PrintFontManager::getFontOptions(
boost
::
unordered_map
<
rtl
::
OString
,
rtl
::
OString
,
rtl
::
OStringHash
>::
const_iterator
aI
=
rWrapper
.
m_aLocalizedToCanonical
.
find
(
sFamily
);
if
(
aI
!=
rWrapper
.
m_aLocalizedToCanonical
.
end
())
sFamily
=
aI
->
second
;
if
(
sFamily
.
getLength
()
)
if
(
!
sFamily
.
isEmpty
()
)
FcPatternAddString
(
pPattern
,
FC_FAMILY
,
(
FcChar8
*
)
sFamily
.
getStr
());
addtopattern
(
pPattern
,
rInfo
.
m_eItalic
,
rInfo
.
m_eWeight
,
rInfo
.
m_eWidth
,
rInfo
.
m_ePitch
);
...
...
@@ -1021,22 +1021,22 @@ bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star
OString
aLangAttrib
;
// populate pattern with font characteristics
if
(
rLocale
.
Language
.
getLength
()
)
if
(
!
rLocale
.
Language
.
isEmpty
()
)
{
OUStringBuffer
aLang
(
6
);
aLang
.
append
(
rLocale
.
Language
);
if
(
rLocale
.
Country
.
getLength
()
)
if
(
!
rLocale
.
Country
.
isEmpty
()
)
{
aLang
.
append
(
sal_Unicode
(
'-'
)
);
aLang
.
append
(
rLocale
.
Country
);
}
aLangAttrib
=
OUStringToOString
(
aLang
.
makeStringAndClear
(),
RTL_TEXTENCODING_UTF8
);
}
if
(
aLangAttrib
.
getLength
()
)
if
(
!
aLangAttrib
.
isEmpty
()
)
FcPatternAddString
(
pPattern
,
FC_LANG
,
(
FcChar8
*
)
aLangAttrib
.
getStr
());
OString
aFamily
=
OUStringToOString
(
rInfo
.
m_aFamilyName
,
RTL_TEXTENCODING_UTF8
);
if
(
aFamily
.
getLength
()
)
if
(
!
aFamily
.
isEmpty
()
)
FcPatternAddString
(
pPattern
,
FC_FAMILY
,
(
FcChar8
*
)
aFamily
.
getStr
());
addtopattern
(
pPattern
,
rInfo
.
m_eItalic
,
rInfo
.
m_eWeight
,
rInfo
.
m_eWidth
,
rInfo
.
m_ePitch
);
...
...
vcl/generic/fontmanager/fontmanager.cxx
Dosyayı görüntüle @
e5ac3524
...
...
@@ -613,7 +613,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
if
(
!
m_nFamilyName
)
{
aFamily
=
OStringToOUString
(
pInfo
->
gfi
->
familyName
,
RTL_TEXTENCODING_ISO_8859_1
);
if
(
!
aFamily
.
getLength
()
)
if
(
aFamily
.
isEmpty
()
)
{
aFamily
=
OStringToOUString
(
pInfo
->
gfi
->
fontName
,
RTL_TEXTENCODING_ISO_8859_1
);
sal_Int32
nIndex
=
0
;
...
...
@@ -627,7 +627,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
// style name: if fullname begins with family name
// interpret the rest of fullname as style
if
(
!
m_aStyleName
.
getLength
()
&&
pInfo
->
gfi
->
fullName
&&
*
pInfo
->
gfi
->
fullName
)
if
(
m_aStyleName
.
isEmpty
()
&&
pInfo
->
gfi
->
fullName
&&
*
pInfo
->
gfi
->
fullName
)
{
OUString
aFullName
(
OStringToOUString
(
pInfo
->
gfi
->
fullName
,
RTL_TEXTENCODING_ISO_8859_1
)
);
if
(
aFullName
.
indexOf
(
aFamily
)
==
0
)
...
...
@@ -1494,7 +1494,7 @@ void PrintFontManager::analyzeTrueTypeFamilyName( void* pTTFont, ::std::list< OU
}
DisposeNameRecords
(
pNameRecords
,
nNameRecords
);
}
if
(
aFamily
.
getLength
()
)
if
(
!
aFamily
.
isEmpty
()
)
{
rNames
.
push_front
(
aFamily
);
for
(
::
std
::
set
<
OUString
>::
const_iterator
it
=
aSet
.
begin
();
it
!=
aSet
.
end
();
++
it
)
...
...
@@ -1545,7 +1545,7 @@ bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const
}
for
(
::
std
::
list
<
OUString
>::
iterator
it
=
aNames
.
begin
();
it
!=
aNames
.
end
();
++
it
)
{
if
(
it
->
getLength
()
)
if
(
!
it
->
isEmpty
()
)
{
int
nAlias
=
m_pAtoms
->
getAtom
(
ATOM_FAMILYNAME
,
*
it
,
sal_True
);
if
(
nAlias
!=
pFont
->
m_nFamilyName
)
...
...
@@ -1720,7 +1720,7 @@ void PrintFontManager::initialize()
// search for the fonts in SAL_PRIVATE_FONTPATH first; those are
// the fonts installed with the office
if
(
rSalPrivatePath
.
getLength
()
)
if
(
!
rSalPrivatePath
.
isEmpty
()
)
{
OString
aPath
=
rtl
::
OUStringToOString
(
rSalPrivatePath
,
aEncoding
);
const
bool
bAreFCSubstitutionsEnabled
=
AreFCSubstitutionsEnabled
();
...
...
@@ -1729,7 +1729,7 @@ void PrintFontManager::initialize()
{
OString
aToken
=
aPath
.
getToken
(
0
,
';'
,
nIndex
);
normPath
(
aToken
);
if
(
!
aToken
.
getLength
()
)
if
(
aToken
.
isEmpty
()
)
{
continue
;
}
...
...
vcl/generic/fontmanager/helper.cxx
Dosyayı görüntüle @
e5ac3524
...
...
@@ -157,7 +157,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
do
{
OString
aDir
(
aPath
.
getToken
(
0
,
':'
,
nIndex
)
);
if
(
!
aDir
.
getLength
()
)
if
(
aDir
.
isEmpty
()
)
continue
;
if
(
pSubDir
)
...
...
@@ -201,14 +201,14 @@ OUString psp::getFontPath()
{
static
OUString
aPath
;
if
(
!
aPath
.
getLength
()
)
if
(
aPath
.
isEmpty
()
)
{
OUStringBuffer
aPathBuffer
(
512
);
OUString
aConfigPath
(
getOfficePath
(
psp
::
ConfigPath
)
);
OUString
aInstallationRootPath
(
getOfficePath
(
psp
::
InstallationRootPath
)
);
OUString
aUserPath
(
getOfficePath
(
psp
::
UserPath
)
);
if
(
aConfigPath
.
getLength
()
)
if
(
!
aConfigPath
.
isEmpty
()
)
{
// #i53530# Path from CustomDataUrl will completely
// replace net and user paths if the path exists
...
...
@@ -225,16 +225,16 @@ OUString psp::getFontPath()
aPathBuffer
.
appendAscii
(
"/share/fonts"
);
}
}
if
(
aConfigPath
.
getLength
()
==
0
)
if
(
aConfigPath
.
isEmpty
()
)
{
if
(
aInstallationRootPath
.
getLength
()
)
if
(
!
aInstallationRootPath
.
isEmpty
()
)
{
aPathBuffer
.
append
(
aInstallationRootPath
);
aPathBuffer
.
appendAscii
(
"/share/fonts/truetype;"
);
aPathBuffer
.
append
(
aInstallationRootPath
);
aPathBuffer
.
appendAscii
(
"/share/fonts/type1;"
);
}
if
(
aUserPath
.
getLength
()
)
if
(
!
aUserPath
.
isEmpty
()
)
{
aPathBuffer
.
append
(
aUserPath
);
aPathBuffer
.
appendAscii
(
"/user/fonts"
);
...
...
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