diff options
Diffstat (limited to 'svtools/source/control/ctrltool.cxx')
-rw-r--r-- | svtools/source/control/ctrltool.cxx | 58 |
1 files changed, 19 insertions, 39 deletions
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 4f8fc91e5d6c..a4488769a9ca 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -68,13 +68,7 @@ static const sal_IntPtr aStdSizeAry[] = 0 }; -// ======================================================================= - -// ----------------------------- -// - class ImplFontListFonInfo - -// ----------------------------- - -class ImplFontListFontInfo : public FontInfo +class ImplFontListFontInfo : public vcl::FontInfo { friend class FontList; @@ -83,9 +77,9 @@ private: ImplFontListFontInfo* mpNext; public: - ImplFontListFontInfo( const FontInfo& rInfo, + ImplFontListFontInfo( const vcl::FontInfo& rInfo, OutputDevice* pDev ) : - FontInfo( rInfo ), mpNext(NULL) + vcl::FontInfo( rInfo ), mpNext(NULL) { mpDevice = pDev; } @@ -258,7 +252,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, sal_Bool bAll, sal_uInt16 i; for( i = 0; i < n; i++ ) { - FontInfo aFontInfo = pDevice->GetDevFont( i ); + vcl::FontInfo aFontInfo = pDevice->GetDevFont( i ); // Wenn keine Raster-Schriften angezeigt werden sollen, // dann diese ignorieren @@ -307,7 +301,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, sal_Bool bAll, (pNewInfo->GetCharSet() == eSystemEncoding) ) { ImplFontListFontInfo* pTemp2 = pTemp->mpNext; - *((FontInfo*)pTemp) = *((FontInfo*)pNewInfo); + *((vcl::FontInfo*)pTemp) = *((vcl::FontInfo*)pNewInfo); pTemp->mpNext = pTemp2; } delete pNewInfo; @@ -442,9 +436,7 @@ const OUString& FontList::GetStyleName(FontWeight eWeight, FontItalic eItalic) c } } -// ----------------------------------------------------------------------- - -OUString FontList::GetStyleName(const FontInfo& rInfo) const +OUString FontList::GetStyleName(const vcl::FontInfo& rInfo) const { OUString aStyleName = rInfo.GetStyleName(); FontWeight eWeight = rInfo.GetWeight(); @@ -496,9 +488,7 @@ OUString FontList::GetStyleName(const FontInfo& rInfo) const return aStyleName; } -// ----------------------------------------------------------------------- - -OUString FontList::GetFontMapText( const FontInfo& rInfo ) const +OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const { if ( rInfo.GetName().isEmpty() ) { @@ -573,11 +563,11 @@ OUString FontList::GetFontMapText( const FontInfo& rInfo ) const namespace { - FontInfo makeMissing(ImplFontListFontInfo* pFontNameInfo, const OUString &rName, + vcl::FontInfo makeMissing(ImplFontListFontInfo* pFontNameInfo, const OUString &rName, FontWeight eWeight, FontItalic eItalic) { - FontInfo aInfo; - // Falls der Fontname stimmt, uebernehmen wir soviel wie moeglich + vcl::FontInfo aInfo; + // if the fontname matches, we copy as much as possible if (pFontNameInfo) { aInfo = *pFontNameInfo; @@ -596,7 +586,7 @@ namespace } } -FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const +vcl::FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const { ImplFontListNameInfo* pData = ImplFindByName( rName ); ImplFontListFontInfo* pFontInfo = NULL; @@ -618,9 +608,8 @@ FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const } } - // Konnten die Daten nicht gefunden werden, dann muessen bestimmte - // Attribute nachgebildet werden - FontInfo aInfo; + // reproduce attributes if data could not be found + vcl::FontInfo aInfo; if ( !pFontInfo ) { FontWeight eWeight = WEIGHT_DONTKNOW; @@ -678,9 +667,7 @@ FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const return aInfo; } -// ----------------------------------------------------------------------- - -FontInfo FontList::Get(const OUString& rName, +vcl::FontInfo FontList::Get(const OUString& rName, FontWeight eWeight, FontItalic eItalic) const { ImplFontListNameInfo* pData = ImplFindByName( rName ); @@ -703,9 +690,8 @@ FontInfo FontList::Get(const OUString& rName, } } - // Konnten die Daten nicht gefunden werden, dann muessen bestimmte - // Attribute nachgebildet werden - FontInfo aInfo; + // reproduce attributes if data could not be found + vcl::FontInfo aInfo; if ( !pFontInfo ) aInfo = makeMissing(pFontNameInfo, rName, eWeight, eItalic); else @@ -724,9 +710,7 @@ sal_Bool FontList::IsAvailable(const OUString& rName) const return (ImplFindByName( rName ) != 0); } -// ----------------------------------------------------------------------- - -const FontInfo& FontList::GetFontName( sal_uInt16 nFont ) const +const vcl::FontInfo& FontList::GetFontName( sal_uInt16 nFont ) const { DBG_ASSERT( nFont < GetFontNameCount(), "FontList::GetFontName(): nFont >= Count" ); @@ -752,17 +736,13 @@ sal_Handle FontList::GetNextFontInfo( sal_Handle hFontInfo ) const return (sal_Handle)(pInfo->mpNext); } -// ----------------------------------------------------------------------- - -const FontInfo& FontList::GetFontInfo( sal_Handle hFontInfo ) const +const vcl::FontInfo& FontList::GetFontInfo( sal_Handle hFontInfo ) const { ImplFontListFontInfo* pInfo = (ImplFontListFontInfo*)(void*)hFontInfo; return *pInfo; } -// ----------------------------------------------------------------------- - -const sal_IntPtr* FontList::GetSizeAry( const FontInfo& rInfo ) const +const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const { // Size-Array vorher loeschen if ( mpSizeAry ) |