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
86982346
Kaydet (Commit)
86982346
authored
Agu 07, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert vcl/inc/outfont.hxx from String to OUString
Change-Id: I6b9b5f0cd51412ad14f1a07f2ad3a03bd17bb5d3
üst
c7b5b5a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
51 deletions
+51
-51
genpspgraphics.cxx
vcl/generic/print/genpspgraphics.cxx
+3
-3
outfont.hxx
vcl/inc/outfont.hxx
+7
-7
outdev3.cxx
vcl/source/gdi/outdev3.cxx
+41
-41
No files found.
vcl/generic/print/genpspgraphics.cxx
Dosyayı görüntüle @
86982346
...
...
@@ -1185,9 +1185,9 @@ ImplDevFontAttributes GenPspGraphics::Info2DevFontAttributes( const psp::FastPri
for
(;
it
!=
rInfo
.
m_aAliases
.
end
();
++
it
)
{
if
(
bHasMapNames
)
aDFA
.
maMapNames
.
Append
(
';'
);
aDFA
.
maMapNames
.
Append
(
(
*
it
).
getStr
()
)
;
bHasMapNames
=
true
;
aDFA
.
maMapNames
+=
OUString
(
';'
);
aDFA
.
maMapNames
+=
*
it
;
bHasMapNames
=
true
;
}
#if OSL_DEBUG_LEVEL > 2
...
...
vcl/inc/outfont.hxx
Dosyayı görüntüle @
86982346
...
...
@@ -95,7 +95,7 @@ private:
class
ImplDevFontAttributes
:
public
ImplFontAttributes
{
public
:
// TODO: create matching interface class
const
String
&
GetAliasNames
()
const
{
return
maMapNames
;
}
const
OUString
&
GetAliasNames
()
const
{
return
maMapNames
;
}
int
GetQuality
()
const
{
return
mnQuality
;
}
bool
IsRotatable
()
const
{
return
mbOrientation
;
}
bool
IsDeviceFont
()
const
{
return
mbDevice
;
}
...
...
@@ -103,7 +103,7 @@ public: // TODO: create matching interface class
bool
IsSubsettable
()
const
{
return
mbSubsettable
;
}
public
:
// TODO: hide members behind accessor methods
String
maMapNames
;
// List of family name aliass separated with ';'
OUString
maMapNames
;
// List of family name aliass separated with ';'
int
mnQuality
;
// Quality (used when similar fonts compete)
bool
mbOrientation
;
// true: physical font can be rotated
bool
mbDevice
;
// true: built in font
...
...
@@ -159,7 +159,7 @@ friend class ImplDevFontListData;
class
FontSelectPatternAttributes
:
public
ImplFontAttributes
{
public
:
FontSelectPatternAttributes
(
const
Font
&
,
const
String
&
rSearchName
,
FontSelectPatternAttributes
(
const
Font
&
,
const
OU
String
&
rSearchName
,
const
Size
&
,
float
fExactHeight
);
FontSelectPatternAttributes
(
const
PhysicalFontFace
&
,
const
Size
&
,
float
fExactHeight
,
int
nOrientation
,
bool
bVertical
);
...
...
@@ -189,7 +189,7 @@ public:
class
FontSelectPattern
:
public
FontSelectPatternAttributes
{
public
:
FontSelectPattern
(
const
Font
&
,
const
String
&
rSearchName
,
FontSelectPattern
(
const
Font
&
,
const
OU
String
&
rSearchName
,
const
Size
&
,
float
fExactHeight
);
#ifdef WNT
// ifdeffed to prevent it going into unusedcode.easy
...
...
@@ -216,7 +216,7 @@ private:
mutable
bool
mbMatchData
;
// true if matching attributes are initialized
bool
mbMapNames
;
// true if MapNames are available
typedef
boost
::
unordered_map
<
const
String
,
ImplDevFontListData
*
,
FontNameHash
>
DevFontList
;
typedef
boost
::
unordered_map
<
const
OU
String
,
ImplDevFontListData
*
,
FontNameHash
>
DevFontList
;
DevFontList
maDevFontList
;
ImplPreMatchFontSubstitution
*
mpPreMatchHook
;
// device specific prematch substitution
...
...
@@ -232,7 +232,7 @@ public:
int
Count
()
const
{
return
maDevFontList
.
size
();
}
// find the device font
ImplDevFontListData
*
FindFontFamily
(
const
String
&
rFontName
)
const
;
ImplDevFontListData
*
FindFontFamily
(
const
OU
String
&
rFontName
)
const
;
ImplDevFontListData
*
ImplFindByFont
(
FontSelectPattern
&
,
bool
bPrinter
,
ImplDirectFontSubstitution
*
)
const
;
ImplDevFontListData
*
ImplFindBySearchName
(
const
OUString
&
)
const
;
...
...
@@ -247,7 +247,7 @@ public:
// misc utilities
ImplDevFontList
*
Clone
(
bool
bScalable
,
bool
bEmbeddable
)
const
;
ImplGetDevFontList
*
GetDevFontList
()
const
;
ImplGetDevSizeList
*
GetDevSizeList
(
const
String
&
rFontName
)
const
;
ImplGetDevSizeList
*
GetDevSizeList
(
const
OU
String
&
rFontName
)
const
;
ImplDevFontListData
*
ImplFindByTokenNames
(
const
OUString
&
rTokenStr
)
const
;
...
...
vcl/source/gdi/outdev3.cxx
Dosyayı görüntüle @
86982346
...
...
@@ -432,9 +432,9 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang,
LanguageTag( eLang ));
utl::DefaultFontConfiguration& rDefaults = utl::DefaultFontConfiguration::get();
String aSearch = rDefaults.getUserInterfaceFont( aLanguageTag ); // ensure a fallback
String aDefault = rDefaults.getDefaultFont( aLanguageTag, nType );
if(
aDefault.Len
() )
OU
String aSearch = rDefaults.getUserInterfaceFont( aLanguageTag ); // ensure a fallback
OU
String aDefault = rDefaults.getDefaultFont( aLanguageTag, nType );
if(
!aDefault.isEmpty
() )
aSearch = aDefault;
Font aFont;
...
...
@@ -488,7 +488,7 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang,
break;
}
if (
aSearch.Len
() )
if (
!aSearch.isEmpty
() )
{
aFont.SetHeight( 12 ); // corresponds to nDefaultHeight
aFont.SetWeight( WEIGHT_NORMAL );
...
...
@@ -533,7 +533,7 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang,
if( !pOutDev )
{
sal_Int32 nIndex = 0;
aFont.SetName( aSearch.
G
etToken( 0, ';', nIndex ) );
aFont.SetName( aSearch.
g
etToken( 0, ';', nIndex ) );
}
else
{
...
...
@@ -1237,7 +1237,7 @@ void ImplDevFontList::InitGenericGlyphFallback( void ) const
}
// test if the glyph fallback candidate font is available and scalable
String aTokenName( *ppNames
, RTL_TEXTENCODING_UTF8 );
OUString aTokenName( *ppNames, strlen(*ppNames)
, RTL_TEXTENCODING_UTF8 );
ImplDevFontListData* pFallbackFont = FindFontFamily( aTokenName );
if( !pFallbackFont )
continue;
...
...
@@ -1450,7 +1450,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAliasName(const OUString& rSearc
return NULL;
}
ImplDevFontListData* ImplDevFontList::FindFontFamily( const String& rFontName ) const
ImplDevFontListData* ImplDevFontList::FindFontFamily( const
OU
String& rFontName ) const
{
// normalize the font family name and
OUString aName = rFontName;
...
...
@@ -1501,7 +1501,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindBySubstFontAttr( const utl::FontNa
const FontWeight eSearchWeight = rFontAttr.Weight;
const FontWidth eSearchWidth = rFontAttr.Width;
const FontItalic eSearchSlant = ITALIC_DONTKNOW;
const String aSearchName;
const
OU
String aSearchName;
pFoundData = ImplFindByAttributes( nSearchType,
eSearchWeight, eSearchWidth, eSearchSlant, aSearchName );
if( pFoundData )
...
...
@@ -1524,7 +1524,7 @@ void ImplDevFontList::InitMatchData() const
DevFontList::const_iterator it = maDevFontList.begin();
for(; it != maDevFontList.end(); ++it )
{
const String& rSearchName = (*it).first;
const
OU
String& rSearchName = (*it).first;
ImplDevFontListData* pEntry = (*it).second;
pEntry->InitMatchData( rFontSubst, rSearchName );
...
...
@@ -1613,17 +1613,17 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( sal_uLong nSearchTyp
// test SYMBOL attributes
if ( nSearchType & IMPL_FONT_ATTR_SYMBOL )
{
const String& rSearchName = it->first;
const
OU
String& rSearchName = it->first;
// prefer some special known symbol fonts
if ( rSearchName.
E
qualsAscii( "starsymbol" ) )
if ( rSearchName.
e
qualsAscii( "starsymbol" ) )
nTestMatch += 10000000*6+(10000*3);
else if ( rSearchName.
E
qualsAscii( "opensymbol" ) )
else if ( rSearchName.
e
qualsAscii( "opensymbol" ) )
nTestMatch += 10000000*6;
else if ( rSearchName.
E
qualsAscii( "starbats" )
|| rSearchName.
E
qualsAscii( "wingdings" )
|| rSearchName.
E
qualsAscii( "monotypesorts" )
|| rSearchName.
E
qualsAscii( "dingbats" )
|| rSearchName.
E
qualsAscii( "zapfdingbats" ) )
else if ( rSearchName.
e
qualsAscii( "starbats" )
|| rSearchName.
e
qualsAscii( "wingdings" )
|| rSearchName.
e
qualsAscii( "monotypesorts" )
|| rSearchName.
e
qualsAscii( "dingbats" )
|| rSearchName.
e
qualsAscii( "zapfdingbats" ) )
nTestMatch += 10000000*5;
else if ( pData->mnTypeFaces & IMPL_DEVFONT_SYMBOL )
nTestMatch += 10000000*4;
...
...
@@ -1894,7 +1894,7 @@ ImplDevFontListData* ImplDevFontList::FindDefaultFont() const
// UNICODE, SANSSERIF, SERIF or FIXED default font lists
const DefaultFontConfiguration& rDefaults = DefaultFontConfiguration::get();
LanguageTag aLanguageTag( OUString( "en"));
String aFontname = rDefaults.getDefaultFont( aLanguageTag, DEFAULTFONT_SANS_UNICODE );
OU
String aFontname = rDefaults.getDefaultFont( aLanguageTag, DEFAULTFONT_SANS_UNICODE );
ImplDevFontListData* pFoundData = ImplFindByTokenNames( aFontname );
if( pFoundData )
return pFoundData;
...
...
@@ -1973,7 +1973,7 @@ ImplGetDevFontList* ImplDevFontList::GetDevFontList() const
return pGetDevFontList;
}
ImplGetDevSizeList* ImplDevFontList::GetDevSizeList( const String& rFontName ) const
ImplGetDevSizeList* ImplDevFontList::GetDevSizeList( const
OU
String& rFontName ) const
{
ImplGetDevSizeList* pGetDevSizeList = new ImplGetDevSizeList( rFontName );
...
...
@@ -1992,7 +1992,7 @@ ImplGetDevSizeList* ImplDevFontList::GetDevSizeList( const String& rFontName ) c
}
FontSelectPatternAttributes::FontSelectPatternAttributes( const Font& rFont,
const String& rSearchName, const Size& rSize, float fExactHeight )
const
OU
String& rSearchName, const Size& rSize, float fExactHeight )
: maSearchName( rSearchName )
, mnWidth( rSize.Width() )
, mnHeight( rSize.Height() )
...
...
@@ -2024,7 +2024,7 @@ FontSelectPatternAttributes::FontSelectPatternAttributes( const Font& rFont,
}
FontSelectPattern::FontSelectPattern( const Font& rFont,
const String& rSearchName, const Size& rSize, float fExactHeight)
const
OU
String& rSearchName, const Size& rSize, float fExactHeight)
: FontSelectPatternAttributes(rFont, rSearchName, rSize, fExactHeight)
, mpFontData( NULL )
, mpFontEntry( NULL )
...
...
@@ -2208,7 +2208,7 @@ ImplFontCache::~ImplFontCache()
ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList,
const Font& rFont, const Size& rSize, float fExactHeight, ImplDirectFontSubstitution* pDevSpecific )
{
String aSearchName = rFont.GetName();
OU
String aSearchName = rFont.GetName();
// initialize internal font request object
FontSelectPattern aFontSelData( rFont, aSearchName, rSize, fExactHeight );
...
...
@@ -2374,10 +2374,10 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
// Until features are properly supported, they are appended to the
// font name, so we need to strip them off so the font is found.
sal_Int32 nFeat = aSearchName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX);
String aOrigName = rFSD.maTargetName;
String aBaseFontName(aSearchName, 0, (nFeat != -1)?nFeat:aSearchName.getLength()
);
if (nFeat != -1 &&
-1 !=
aSearchName.indexOf(grutils::GrFeatureParser::FEAT_ID_VALUE_SEPARATOR, nFeat))
OU
String aOrigName = rFSD.maTargetName;
OUString aBaseFontName = aSearchName.copy( 0, (nFeat != -1) ? nFeat : aSearchName.getLength()
);
if (nFeat != -1 &&
-1 !=
aSearchName.indexOf(grutils::GrFeatureParser::FEAT_ID_VALUE_SEPARATOR, nFeat))
{
aSearchName = aBaseFontName;
rFSD.maTargetName = aBaseFontName;
...
...
@@ -2694,7 +2694,7 @@ ImplFontEntry* ImplFontCache::GetGlyphFallbackFont( ImplDevFontList* pFontList,
// override the font name
rFontSelData.SetFamilyName( pFallbackData->GetFamilyName() );
// clear the cached normalized name
rFontSelData.maSearchName = String();
rFontSelData.maSearchName =
OU
String();
}
// get device font without doing device specific substitutions
...
...
@@ -2842,12 +2842,12 @@ void OutputDevice::ImplInitFontList() const
}
if( meOutDevType == OUTDEV_WINDOW && ! mpFontList->Count() )
{
String aError( "Application error: no fonts and no vcl resource found on your system" );
OU
String aError( "Application error: no fonts and no vcl resource found on your system" );
ResMgr* pMgr = ImplGetResMgr();
if( pMgr )
{
String aResStr(ResId(SV_ACCESSERROR_NO_FONTS, *pMgr).toString());
if(
aResStr.Len
() )
OU
String aResStr(ResId(SV_ACCESSERROR_NO_FONTS, *pMgr).toString());
if(
!aResStr.isEmpty
() )
aError = aResStr;
}
Application::Abort( aError );
...
...
@@ -4739,11 +4739,11 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
{
// #104415# May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
// DBG_ASSERT( nWordEnd >= nMaxBreakPos, "Hyph: Break?" );
String aWord( aText,
nWordStart, nWordLen );
OUString aWord = aText.copy(
nWordStart, nWordLen );
sal_uInt16 nMinTrail = static_cast<sal_uInt16>(nWordEnd-nSoftBreak+1); //+1: Before the "broken off" char
uno::Reference< linguistic2::XHyphenatedWord > xHyphWord;
if (xHyph.is())
xHyphWord = xHyph->hyphenate( aWord, rDefLocale, aWord.
Len
() - nMinTrail, uno::Sequence< beans::PropertyValue >() );
xHyphWord = xHyph->hyphenate( aWord, rDefLocale, aWord.
getLength
() - nMinTrail, uno::Sequence< beans::PropertyValue >() );
if (xHyphWord.is())
{
sal_Bool bAlternate = xHyphWord->isAlternativeSpelling();
...
...
@@ -4757,7 +4757,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
}
else
{
String aAlt( xHyphWord->getHyphenatedWord() );
OU
String aAlt( xHyphWord->getHyphenatedWord() );
// We can have two cases:
// 1) "packen" turns into "pak-ken"
...
...
@@ -4774,14 +4774,14 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
// TODO: The whole junk will be made easier by a function in
// the Hyphenator, as soon as AMA adds it.
sal_uInt16 nAltStart = _nWordLen - 1;
sal_uInt16 nTxtStart = nAltStart - (aAlt.
Len() - aWord.Len
());
sal_uInt16 nTxtStart = nAltStart - (aAlt.
getLength() - aWord.getLength
());
sal_uInt16 nTxtEnd = nTxtStart;
sal_uInt16 nAltEnd = nAltStart;
// The area between nStart and nEnd is the difference
// between AlternativString and OriginalString
while( nTxtEnd < aWord.
Len() && nAltEnd < aAlt.Len
() &&
aWord
.GetChar(nTxtEnd) != aAlt.GetChar(nAltEnd)
)
while( nTxtEnd < aWord.
getLength() && nAltEnd < aAlt.getLength
() &&
aWord
[nTxtEnd] != aAlt[nAltEnd]
)
{
++nTxtEnd;
++nAltEnd;
...
...
@@ -4789,7 +4789,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
// If a char was added, we notice it now:
if( nAltEnd > nTxtEnd && nAltStart == nAltEnd &&
aWord
.GetChar( nTxtEnd ) == aAlt.GetChar(nAltEnd)
)
aWord
[ nTxtEnd ] == aAlt[nAltEnd]
)
{
++nAltEnd;
++nTxtStart;
...
...
@@ -4799,7 +4799,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
DBG_ASSERT( ( nAltEnd - nAltStart ) == 1, "Alternate: Wrong assumption!" );
if ( nTxtEnd > nTxtStart )
cAlternateReplChar = aAlt
.GetChar( nAltStart )
;
cAlternateReplChar = aAlt
[ nAltStart ]
;
nBreakPos = nWordStart + nTxtStart;
if ( cAlternateReplChar )
...
...
@@ -4860,9 +4860,9 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
for ( sal_uInt16 nL = 0; nL < rLineInfo.Count(); nL++ )
{
ImplTextLineInfo* pLine = rLineInfo.GetLine( nL );
String aLine( rStr,
pLine->GetIndex(), pLine->GetLen() );
DBG_ASSERT( aLine.
Search( '\r' ) == STRING_NOTFOUND
, "ImplGetTextLines - Found CR!" );
DBG_ASSERT( aLine.
Search( '\n' ) == STRING_NOTFOUND
, "ImplGetTextLines - Found LF!" );
OUString aLine = rStr.copy(
pLine->GetIndex(), pLine->GetLen() );
DBG_ASSERT( aLine.
indexOf( '\r' ) == -1
, "ImplGetTextLines - Found CR!" );
DBG_ASSERT( aLine.
indexOf( '\n' ) == -1
, "ImplGetTextLines - Found LF!" );
}
#endif
...
...
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