diff options
32 files changed, 115 insertions, 137 deletions
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index 06afeb592f8d..00a84b31f03f 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -326,7 +326,7 @@ IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, CheckBox*, pBox) sal_uInt16 nFontCount = aFntLst.GetFontNameCount(); for(sal_uInt16 nFont = 0; nFont < nFontCount; nFont++) { - const FontInfo& rInfo = aFntLst.GetFontName( nFont ); + const vcl::FontInfo& rInfo = aFntLst.GetFontName( nFont ); if(!bNonPropOnly || rInfo.GetPitch() == PITCH_FIXED) m_pFontNameLB->InsertEntry(rInfo.GetName()); } diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 28222fa6473f..9d82ad022382 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -435,7 +435,7 @@ const FontList* SvxCharNamePage::GetFontList() const // ----------------------------------------------------------------------------- namespace { - FontInfo calcFontInfo( SvxFont& _rFont, + vcl::FontInfo calcFontInfo( SvxFont& _rFont, SvxCharNamePage* _pPage, const FontNameBox* _pFontNameLB, const FontStyleBox* _pFontStyleLB, @@ -447,7 +447,7 @@ namespace { Size aSize = _rFont.GetSize(); aSize.Width() = 0; - FontInfo aFontInfo; + vcl::FontInfo aFontInfo; OUString sFontName(_pFontNameLB->GetText()); sal_Bool bFontAvailable = _pFontList->IsAvailable( sFontName ); if (bFontAvailable || _pFontNameLB->GetSavedValue() != sFontName) @@ -520,19 +520,19 @@ void SvxCharNamePage::UpdatePreview_Impl() // Font const FontList* pFontList = GetFontList(); - FontInfo aWestFontInfo = calcFontInfo(rFont, this, m_pWestFontNameLB, + vcl::FontInfo aWestFontInfo = calcFontInfo(rFont, this, m_pWestFontNameLB, m_pWestFontStyleLB, m_pWestFontSizeLB, m_pWestFontLanguageLB, pFontList, GetWhich(SID_ATTR_CHAR_FONT), GetWhich(SID_ATTR_CHAR_FONTHEIGHT)); m_pWestFontTypeFT->SetText(pFontList->GetFontMapText(aWestFontInfo)); - FontInfo aEastFontInfo = calcFontInfo(rCJKFont, this, m_pEastFontNameLB, + vcl::FontInfo aEastFontInfo = calcFontInfo(rCJKFont, this, m_pEastFontNameLB, m_pEastFontStyleLB, m_pEastFontSizeLB, m_pEastFontLanguageLB, pFontList, GetWhich(SID_ATTR_CHAR_CJK_FONT), GetWhich(SID_ATTR_CHAR_CJK_FONTHEIGHT)); m_pEastFontTypeFT->SetText(pFontList->GetFontMapText(aEastFontInfo)); - FontInfo aCTLFontInfo = calcFontInfo(rCTLFont, + vcl::FontInfo aCTLFontInfo = calcFontInfo(rCTLFont, this, m_pCTLFontNameLB, m_pCTLFontStyleLB, m_pCTLFontSizeLB, m_pCTLFontLanguageLB, pFontList, GetWhich(SID_ATTR_CHAR_CTL_FONT), GetWhich(SID_ATTR_CHAR_CTL_FONTHEIGHT)); @@ -609,7 +609,7 @@ void SvxCharNamePage::FillSizeBox_Impl( const FontNameBox* pNameBox ) return; } - FontInfo _aFontInfo( pFontList->Get( pNameBox->GetText(), pStyleBox->GetText() ) ); + vcl::FontInfo _aFontInfo( pFontList->Get( pNameBox->GetText(), pStyleBox->GetText() ) ); pSizeBox->Fill( &_aFontInfo, pFontList ); } @@ -720,7 +720,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp // currently chosen font if ( bStyle && pFontItem ) { - FontInfo aInfo = pFontList->Get( pFontItem->GetFamilyName(), eWeight, eItalic ); + vcl::FontInfo aInfo = pFontList->Get( pFontItem->GetFamilyName(), eWeight, eItalic ); pStyleBox->SetText( pFontList->GetStyleName( aInfo ) ); } else if ( !m_pImpl->m_bInSearchMode || !bStyle ) @@ -729,7 +729,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp } else if ( bStyle ) { - FontInfo aInfo = pFontList->Get( OUString(), eWeight, eItalic ); + vcl::FontInfo aInfo = pFontList->Get( OUString(), eWeight, eItalic ); pStyleBox->SetText( pFontList->GetStyleName( aInfo ) ); } if (!bStyleAvailable) @@ -891,7 +891,7 @@ sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLan sal_uInt16 nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText ); if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) aStyleBoxText = ""; - FontInfo aInfo( pFontList->Get( rFontName, aStyleBoxText ) ); + vcl::FontInfo aInfo( pFontList->Get( rFontName, aStyleBoxText ) ); SvxFontItem aFontItem( aInfo.GetFamily(), aInfo.GetName(), aInfo.GetStyleName(), aInfo.GetPitch(), aInfo.GetCharSet(), nWhich ); pOld = GetOldItem( rSet, nSlot ); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index d646da233c10..9fb9589bd9c6 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -708,7 +708,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl) } if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) ) { - FontInfo aInfo = pList->Get( + vcl::FontInfo aInfo = pList->Get( pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE); Font aFont(aInfo); aFmt.SetBulletFont(&aFont); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 18b0c9a15686..4818c185b21a 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1326,7 +1326,7 @@ bool EditView::ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFo const SfxMapUnit eUnit = rSet.GetPool()->GetMetric( *pWhich ); nHeight = OutputDevice::LogicToLogic( nHeight * 10, (MapUnit)eUnit, MAP_POINT ); - FontInfo aFontInfo = pFontList->Get( pFontItem->GetFamilyName(), pFontItem->GetStyleName() ); + vcl::FontInfo aFontInfo = pFontList->Get( pFontItem->GetFamilyName(), pFontItem->GetStyleName() ); const sal_IntPtr* pAry = pFontList->GetSizeAry( aFontInfo ); if( bGrow ) diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 72f5c7e73627..c4974d45d022 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -153,7 +153,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r if ( pFontList == 0 ) pFontList = new FontList( Application::GetDefaultDevice() ); - FontInfo aFntInfo = pFontList->Get( m_aFontDescriptor.Name, m_aFontDescriptor.StyleName ); + vcl::FontInfo aFntInfo = pFontList->Get( m_aFontDescriptor.Name, m_aFontDescriptor.StyleName ); // setup font size array if ( m_pHeightArray ) diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 659909139e70..2727301270a7 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -35,7 +35,7 @@ class ImpLineListData; typedef ::std::vector< ImplColorListData* > ImpColorList; typedef ::std::vector< ImpLineListData* > ImpLineList; -typedef ::std::vector< FontInfo > ImplFontList; +typedef ::std::vector< vcl::FontInfo > ImplFontList; // FIXME: STYLE_* duplicate values from editeng::SvxBorderStyle, // which in turn duplicates values from com::sun::star::table::BorderLineStyle: @@ -488,7 +488,7 @@ inline void FontStyleBox::SetText( const OUString& rText ) class SVT_DLLPUBLIC FontSizeBox : public MetricBox { - FontInfo aFontInfo; + vcl::FontInfo aFontInfo; const FontList* pFontList; sal_uInt16 nRelMin; sal_uInt16 nRelMax; @@ -514,7 +514,7 @@ public: void Reformat(); void Modify(); - void Fill( const FontInfo* pInfo, const FontList* pList ); + void Fill( const vcl::FontInfo* pInfo, const FontList* pList ); void EnableRelativeMode( sal_uInt16 nMin = 50, sal_uInt16 nMax = 150, sal_uInt16 nStep = 5 ); diff --git a/include/svtools/ctrltool.hxx b/include/svtools/ctrltool.hxx index 65b19e30dcd1..a72702a62bbc 100644 --- a/include/svtools/ctrltool.hxx +++ b/include/svtools/ctrltool.hxx @@ -75,7 +75,7 @@ scalierbare Schriften abgefragt. -------------------------------------------------------------------------- -String FontList::GetStyleName( const FontInfo& rInfo ) const; +String FontList::GetStyleName( const vcl::FontInfo& rInfo ) const; Diese Methode gibt den StyleName von einer FontInfo zurueck. Falls kein StyleName gesetzt ist, wird aus den gesetzten Attributen ein entsprechender @@ -83,14 +83,14 @@ Name generiert, der dem Anwender praesentiert werden kann. -------------------------------------------------------------------------- -OUString FontList::GetFontMapText( const FontInfo& rInfo ) const; +OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const; Diese Methode gibt einen Matchstring zurueck, der dem Anwender anzeigen soll, welche Probleme es mit diesem Font geben kann. -------------------------------------------------------------------------- -FontInfo FontList::Get( const String& rName, const String& rStyleName ) const; +vcl::FontInfo FontList::Get( const String& rName, const String& rStyleName ) const; Diese Methode sucht aus dem uebergebenen Namen und dem uebergebenen StyleName die entsprechende FontInfo-Struktur raus. Der Stylename kann in dieser @@ -106,7 +106,7 @@ FontList::GetStyleName() -------------------------------------------------------------------------- -FontInfo FontList::Get( const String& rName, FontWeight eWeight, +vcl::FontInfo FontList::Get( const String& rName, FontWeight eWeight, FontItalic eItalic ) const; Diese Methode sucht aus dem uebergebenen Namen und den uebergebenen Styles @@ -121,7 +121,7 @@ FontList::GetStyleName() -------------------------------------------------------------------------- -const sal_IntPtr* FontList::GetSizeAry( const FontInfo& rInfo ) const; +const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const; Diese Methode liefert zum uebergebenen Font die vorhandenen Groessen. Falls es sich dabei um einen skalierbaren Font handelt, werden Standard- @@ -178,18 +178,18 @@ public: OutputDevice* GetDevice() const { return mpDev; } OutputDevice* GetDevice2() const { return mpDev2; } - OUString GetFontMapText( const FontInfo& rInfo ) const; + OUString GetFontMapText( const vcl::FontInfo& rInfo ) const; const OUString& GetNormalStr() const { return maNormal; } const OUString& GetItalicStr() const { return maNormalItalic; } const OUString& GetBoldStr() const { return maBold; } const OUString& GetBoldItalicStr() const { return maBoldItalic; } const OUString& GetStyleName( FontWeight eWeight, FontItalic eItalic ) const; - OUString GetStyleName( const FontInfo& rInfo ) const; + OUString GetStyleName( const vcl::FontInfo& rInfo ) const; - FontInfo Get( const OUString& rName, + vcl::FontInfo Get( const OUString& rName, const OUString& rStyleName ) const; - FontInfo Get( const OUString& rName, + vcl::FontInfo Get( const OUString& rName, FontWeight eWeight, FontItalic eItalic ) const; @@ -198,12 +198,12 @@ public: { return (sal_uInt16)maEntries.size(); } - const FontInfo& GetFontName( sal_uInt16 nFont ) const; + const vcl::FontInfo& GetFontName( sal_uInt16 nFont ) const; sal_Handle GetFirstFontInfo( const OUString& rName ) const; sal_Handle GetNextFontInfo( sal_Handle hFontInfo ) const; - const FontInfo& GetFontInfo( sal_Handle hFontInfo ) const; + const vcl::FontInfo& GetFontInfo( sal_Handle hFontInfo ) const; - const sal_IntPtr* GetSizeAry( const FontInfo& rInfo ) const; + const sal_IntPtr* GetSizeAry( const vcl::FontInfo& rInfo ) const; static const sal_IntPtr* GetStdSizeAry(); private: diff --git a/include/svtools/stdmenu.hxx b/include/svtools/stdmenu.hxx index fd0f18674290..4385881f001e 100644 --- a/include/svtools/stdmenu.hxx +++ b/include/svtools/stdmenu.hxx @@ -25,7 +25,9 @@ #include <vcl/menu.hxx> class FontList; -class FontInfo; +namespace vcl { + class FontInfo; +} /************************************************************************* @@ -145,7 +147,7 @@ public: virtual void Select(); virtual void Highlight(); - void Fill( const FontInfo& rInfo, const FontList* pList ); + void Fill( const vcl::FontInfo& rInfo, const FontList* pList ); void SetCurHeight( long nHeight ); long GetCurHeight() const { return mnCurHeight; } diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx index 9b6efe67c0c4..1836cce84207 100644 --- a/include/vcl/metric.hxx +++ b/include/vcl/metric.hxx @@ -22,22 +22,20 @@ #include <vcl/dllapi.h> #include <vcl/font.hxx> +#include <vcl/outdev.hxx> class ImplFontMetric; class ImplFontCharMap; typedef sal_uInt32 sal_UCS4; -// ------------ -// - FontInfo - -// ------------ +namespace vcl { class VCL_DLLPUBLIC FontInfo : public Font { friend class OutputDevice; protected: - ImplFontMetric* mpImplMetric; // Implementation public: FontInfo(); @@ -50,13 +48,12 @@ public: sal_Bool operator==( const FontInfo& ) const; sal_Bool operator!=( const FontInfo& rInfo ) const { return !operator==( rInfo ); } + ImplFontMetric* mpImplMetric; // Implementation }; -// -------------- -// - FontMetric - -// -------------- +} -class VCL_DLLPUBLIC FontMetric : public FontInfo +class VCL_DLLPUBLIC FontMetric : public vcl::FontInfo { public: FontMetric() {} diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index d7e2bf48a4e6..48ebd50cd0f6 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -59,7 +59,6 @@ class BitmapReadAccess; class BitmapEx; class Image; class TextRectInfo; -class FontInfo; class FontMetric; class GDIMetaFile; class GfxLink; @@ -257,6 +256,10 @@ class FontSelectPattern; class ImplFontMetricData; class VCLXGraphics; +namespace vcl { + class FontInfo; +} + typedef ::std::vector< VCLXGraphics* > VCLXGraphicsList_impl; const char* ImplDbgCheckOutputDevice( const void* pObj ); @@ -1081,7 +1084,7 @@ public: sal_Bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ); int GetDevFontCount() const; - FontInfo GetDevFont( int nDevFontIndex ) const; + vcl::FontInfo GetDevFont( int nDevFontIndex ) const; int GetDevFontSizeCount( const Font& ) const; Size GetDevFontSize( const Font& rFont, int nSizeIndex ) const; sal_Bool IsFontAvailable( const OUString& rFontName ) const; diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 2e6b4cf54fdb..98f8b12ec84f 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -745,7 +745,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico aParaText = "&\"" + OUString(aNewData.maName); if( pFontList ) { - FontInfo aFontInfo( pFontList->Get( + vcl::FontInfo aFontInfo( pFontList->Get( aNewData.maName, (aNewData.mnWeight > EXC_FONTWGHT_NORMAL) ? WEIGHT_BOLD : WEIGHT_NORMAL, aNewData.mbItalic ? ITALIC_NORMAL : ITALIC_NONE ) ); diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 203eda6e4efb..6e5543c637eb 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -200,7 +200,7 @@ void XclImpFont::SetFontData( const XclFontData& rFontData, bool bHasCharSet ) { if( const FontList* pFontList = pInfoItem->GetFontList() ) { - FontInfo aFontInfo( pFontList->Get( maData.maName, maData.maStyle ) ); + vcl::FontInfo aFontInfo( pFontList->Get( maData.maName, maData.maStyle ) ); maData.SetScWeight( aFontInfo.GetWeight() ); maData.SetScPosture( aFontInfo.GetItalic() ); } diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index fc9641bafd80..8b10de6c5ef7 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -2280,7 +2280,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox, void SmSymDefineDialog::SetFont(const OUString &rFontName, const OUString &rStyleName) { // get Font (FontInfo) matching name and style - FontInfo aFI; + vcl::FontInfo aFI; if (pFontList) aFI = pFontList->Get(rFontName, WEIGHT_NORMAL, ITALIC_NONE); SetFontStyle(rStyleName, aFI); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 9250f3070e34..1b7441e4caac 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1128,7 +1128,7 @@ void FontNameBox::Fill( const FontList* pList ) sal_uInt16 nFontCount = pList->GetFontNameCount(); for ( sal_uInt16 i = 0; i < nFontCount; i++ ) { - const FontInfo& rFontInfo = pList->GetFontName( i ); + const vcl::FontInfo& rFontInfo = pList->GetFontName( i ); sal_uLong nIndex = InsertEntry( rFontInfo.GetName() ); if ( nIndex != LISTBOX_ERROR ) { @@ -1208,13 +1208,11 @@ namespace } } -// ------------------------------------------------------------------- - void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) { assert( mpFontList ); - FontInfo& rInfo = (*mpFontList)[ rUDEvt.GetItemId() ]; + vcl::FontInfo& rInfo = (*mpFontList)[ rUDEvt.GetItemId() ]; Point aTopLeft = rUDEvt.GetRect().TopLeft(); long nX = aTopLeft.X(); long nH = rUDEvt.GetRect().GetHeight(); @@ -1515,7 +1513,7 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList ) sal_Bool bBold = sal_False; sal_Bool bBoldItalic = sal_False; sal_Bool bInsert = sal_False; - FontInfo aInfo; + vcl::FontInfo aInfo; while ( hFontInfo ) { aInfo = pList->GetFontInfo( hFontInfo ); @@ -1751,9 +1749,7 @@ void FontSizeBox::Modify() } } -// ----------------------------------------------------------------------- - -void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList ) +void FontSizeBox::Fill( const vcl::FontInfo* pInfo, const FontList* pList ) { // remember for relative mode pFontList = pList; 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 ) diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index f579dc2bd83d..d8a73f94a488 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -157,9 +157,7 @@ void FontSizeMenu::Highlight() mnCurHeight = nTempHeight; } -// ----------------------------------------------------------------------- - -void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList ) +void FontSizeMenu::Fill( const vcl::FontInfo& rInfo, const FontList* pList ) { Clear(); diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx index a5384b3d8377..a77c7aceb1cf 100644 --- a/svx/source/mnuctrls/fntszctl.cxx +++ b/svx/source/mnuctrls/fntszctl.cxx @@ -123,7 +123,7 @@ void SvxFontSizeMenuControl::StateChanged( if ( pList ) { - FontInfo aFntInf = pList->Get( pItem->GetFamilyName(), + vcl::FontInfo aFntInf = pList->Get( pItem->GetFamilyName(), pItem->GetStyleName() ); pMenu->Fill( aFntInf, pList ); } diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 562ddf772fe4..87b7f9917a6b 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -1805,30 +1805,30 @@ sal_Bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uIn if( pLevelSettings->sBulletFont.getLength() && pLevelSettings->sBulletFont.compareTo(rActBulletFont.GetName())) { - //search for the font - if(!pList) - { - SfxObjectShell* pCurDocShell = SfxObjectShell::Current(); - const SvxFontListItem* pFontListItem = (const SvxFontListItem* )pCurDocShell->GetItem( SID_ATTR_CHAR_FONTLIST ); - pList = pFontListItem ? pFontListItem->GetFontList() : 0; - } - if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) ) - { - FontInfo aInfo = pList->Get(pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE); + //search for the font + if(!pList) + { + SfxObjectShell* pCurDocShell = SfxObjectShell::Current(); + const SvxFontListItem* pFontListItem = (const SvxFontListItem* )pCurDocShell->GetItem( SID_ATTR_CHAR_FONTLIST ); + pList = pFontListItem ? pFontListItem->GetFontList() : 0; + } + if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) ) + { + vcl::FontInfo aInfo = pList->Get(pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE); Font aFont(aInfo); aFmt.SetBulletFont(&aFont); - } - else - { - //if it cannot be found then create a new one - Font aCreateFont( pLevelSettings->sBulletFont, OUString(), Size( 0, 14 ) ); - aCreateFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); - aCreateFont.SetFamily( FAMILY_DONTKNOW ); - aCreateFont.SetPitch( PITCH_DONTKNOW ); - aCreateFont.SetWeight( WEIGHT_DONTKNOW ); - aCreateFont.SetTransparent( sal_True ); - aFmt.SetBulletFont( &aCreateFont ); - } + } + else + { + //if it cannot be found then create a new one + Font aCreateFont( pLevelSettings->sBulletFont, OUString(), Size( 0, 14 ) ); + aCreateFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); + aCreateFont.SetFamily( FAMILY_DONTKNOW ); + aCreateFont.SetPitch( PITCH_DONTKNOW ); + aCreateFont.SetWeight( WEIGHT_DONTKNOW ); + aCreateFont.SetTransparent( true ); + aFmt.SetBulletFont( &aCreateFont ); + } }else aFmt.SetBulletFont( &rActBulletFont ); diff --git a/svx/source/sidebar/text/SvxSBFontNameBox.cxx b/svx/source/sidebar/text/SvxSBFontNameBox.cxx index b94c6131e361..66ba899f3423 100644 --- a/svx/source/sidebar/text/SvxSBFontNameBox.cxx +++ b/svx/source/sidebar/text/SvxSBFontNameBox.cxx @@ -156,7 +156,7 @@ void SvxSBFontNameBox::Select() if ( !IsTravelSelect() ) { FillList(); - FontInfo aInfo( pFontList->Get( GetText(),WEIGHT_NORMAL, ITALIC_NORMAL ) );//meWeight, meItalic + vcl::FontInfo aInfo( pFontList->Get( GetText(),WEIGHT_NORMAL, ITALIC_NORMAL ) );//meWeight, meItalic SvxFontItem aFontItem( aInfo.GetFamily(), aInfo.GetName(), aInfo.GetStyleName(), aInfo.GetPitch(), aInfo.GetCharSet(), SID_ATTR_CHAR_FONT ); diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 0b8283edd7e8..6a1803679c83 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -295,7 +295,7 @@ void TextPropertyPanel::Initialize (void) } mpFontNameBox->SetAccessibleName(mpFontNameBox->GetQuickHelpText()); - const FontInfo aFontInfo (mpFontList->Get( OUString( "" ), OUString( "" ))); + const vcl::FontInfo aFontInfo (mpFontList->Get( OUString( "" ), OUString( "" ))); mpFontSizeBox->Fill(&aFontInfo,mpFontList); mpFontSizeBox->SetAccessibleName(mpFontSizeBox->GetQuickHelpText()); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 5621dc1f0a86..d5cdd4f93c88 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -993,7 +993,7 @@ void SvxFontNameBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) if ( rUDEvt.GetItemId() == rUDEvt.GetStyle() ) { Sequence< PropertyValue > aArgs( 1 ); - FontInfo aInfo( pFontList->Get( GetEntry( rUDEvt.GetItemId() ), + vcl::FontInfo aInfo( pFontList->Get( GetEntry( rUDEvt.GetItemId() ), aCurFont.GetWeight(), aCurFont.GetItalic() ) ); @@ -1019,7 +1019,7 @@ void SvxFontNameBox_Impl::Select() std::auto_ptr<SvxFontItem> pFontItem; if ( pFontList ) { - FontInfo aInfo( pFontList->Get( GetText(), + vcl::FontInfo aInfo( pFontList->Get( GetText(), aCurFont.GetWeight(), aCurFont.GetItalic() ) ); aCurFont = aInfo; diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index ad99d66ffa67..8295a8a0c0f5 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -167,7 +167,7 @@ void SvxFontSizeBox_Impl::UpdateFont( const ::com::sun::star::awt::FontDescripto if ( !rCurrentFont.Name.isEmpty() ) { - FontInfo _aFontInfo; + vcl::FontInfo _aFontInfo; _aFontInfo.SetName( rCurrentFont.Name ); _aFontInfo.SetStyleName( rCurrentFont.StyleName ); _aFontInfo.SetHeight( rCurrentFont.Height ); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 751648bfe1f2..6e93b80fb2ce 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -828,7 +828,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam) ->GetItem( SID_ATTR_CHAR_FONTLIST ); const FontList* pList = pFontListItem->GetFontList(); - FontInfo aInfo = pList->Get( + vcl::FontInfo aInfo = pList->Get( pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE); Font aFont(aInfo); aFmt.SetBulletFont(&aFont); diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 41bbfebd2fd2..ffdeb7e92de6 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1949,7 +1949,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex( (const SvxFontListItem* )pLclDocShell ->GetItem( SID_ATTR_CHAR_FONTLIST ); const FontList* pList = pFontListItem->GetFontList(); - FontInfo aInfo = pList->Get( + vcl::FontInfo aInfo = pList->Get( sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE); Font aFont(aInfo); aFmt.SetBulletFont(&aFont); diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index f94adc692c6d..4963b68267ad 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1772,7 +1772,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, (const SvxFontListItem* )pDoc->GetDocShell() ->GetItem( SID_ATTR_CHAR_FONTLIST ); const FontList* pList = pFontListItem->GetFontList(); - FontInfo aInfo = pList->Get( + vcl::FontInfo aInfo = pList->Get( pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE); Font aFont(aInfo); aFmt.SetBulletFont(&aFont); diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 1619ee9d325e..6c4eb6d214e9 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -1107,7 +1107,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr, sal_Handle hFont = pFList->GetFirstFontInfo( aIdent ); if( 0 != hFont ) { - const FontInfo& rFInfo = pFList->GetFontInfo( hFont ); + const vcl::FontInfo& rFInfo = pFList->GetFontInfo( hFont ); if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() ) { bFound = sal_True; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index fee5ef19bd70..977884043339 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -3784,7 +3784,7 @@ void SwHTMLParser::NewFontAttr( int nToken ) sal_Handle hFont = pFList->GetFirstFontInfo( aFName ); if( 0 != hFont ) { - const FontInfo& rFInfo = pFList->GetFontInfo( hFont ); + const vcl::FontInfo& rFInfo = pFList->GetFontInfo( hFont ); if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() ) { bFound = sal_True; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index f5d3fb6d8515..9ee2d357b93d 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -795,7 +795,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) int nFontNames = pPrt->GetDevFontCount(); for( int i = 0; i < nFontNames; i++ ) { - FontInfo aInf( pPrt->GetDevFont( i ) ); + vcl::FontInfo aInf( pPrt->GetDevFont( i ) ); aFontNames.insert( aInf.GetName() ); } @@ -914,7 +914,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) pLabelBox->SetText(sCapBackup ); pIdxBox->SetText(sIdxBackup ); - FontInfo aFontInfo( pFontList->Get(sStdBackup, sStdBackup) ); + vcl::FontInfo aFontInfo( pFontList->Get(sStdBackup, sStdBackup) ); pStandardHeightLB->Fill( &aFontInfo, pFontList ); aFontInfo = pFontList->Get(sOutBackup, sOutBackup ); pTitleHeightLB->Fill( &aFontInfo, pFontList ); @@ -1055,7 +1055,7 @@ IMPL_LINK( SwStdFontTabPage, LoseFocusHdl, ComboBox*, pBox ) { pHeightLB = pIndexHeightLB; } - FontInfo aFontInfo( pFontList->Get(sEntry, sEntry) ); + vcl::FontInfo aFontInfo( pFontList->Get(sEntry, sEntry) ); pHeightLB->Fill( &aFontInfo, pFontList ); return 0; } diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 97a7cc509bd3..ec81ea6ff277 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -185,7 +185,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, int nFontNames = pPrt->GetDevFontCount(); for( int i = 0; i < nFontNames; i++ ) { - FontInfo aInf( pPrt->GetDevFont( i ) ); + vcl::FontInfo aInf( pPrt->GetDevFont( i ) ); aFontNames.insert( aInf.GetName() ); } diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index d1b2ee77e0a7..918c80ae04a1 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -971,7 +971,7 @@ void SwSrcEditWindow::SetFont() const SvxFontListItem* pFontListItem = (const SvxFontListItem* )pSrcView->GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ); const FontList* pList = pFontListItem->GetFontList(); - FontInfo aInfo = pList->Get(sFontName,WEIGHT_NORMAL, ITALIC_NONE); + vcl::FontInfo aInfo = pList->Get(sFontName,WEIGHT_NORMAL, ITALIC_NONE); const Font& rFont = GetTextEngine()->GetFont(); Font aFont(aInfo); diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index d708ca297243..2872ada03744 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -76,7 +76,7 @@ bool ImplFontMetric::operator==( const ImplFontMetric& r ) const return true; } -// ======================================================================= +namespace vcl { FontInfo::FontInfo() : mpImplMetric( new ImplFontMetric ) @@ -134,8 +134,10 @@ FontType FontInfo::GetType() const return (mpImplMetric->IsScalable() ? TYPE_SCALABLE : TYPE_RASTER); } -FontMetric::FontMetric( const FontMetric& rMetric ) -: FontInfo( rMetric ) +} + +FontMetric::FontMetric( const FontMetric& rMetric ): + vcl::FontInfo( rMetric ) {} // ----------------------------------------------------------------------- @@ -184,7 +186,7 @@ long FontMetric::GetSlant() const FontMetric& FontMetric::operator =( const FontMetric& rMetric ) { - FontInfo::operator=( rMetric ); + vcl::FontInfo::operator=( rMetric ); return *this; } @@ -192,7 +194,7 @@ FontMetric& FontMetric::operator =( const FontMetric& rMetric ) sal_Bool FontMetric::operator==( const FontMetric& rMetric ) const { - return FontInfo::operator==( rMetric ); + return vcl::FontInfo::operator==( rMetric ); } // ======================================================================= diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index 52b13a0ccc17..b4fd044f995f 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -247,7 +247,7 @@ void MyWin::Paint( const Rectangle& rRect ) for( int i = 0; i < nFontSamples; ++i ) { - FontInfo aFont = GetDevFont( (i*nFontCount) / nFontSamples ); + vcl::FontInfo aFont = GetDevFont( (i*nFontCount) / nFontSamples ); aFont.SetHeight( 400 + (i%7) * 100 ); aFont.SetOrientation( i * (3600 / nFontSamples) ); SetFont( aFont ); |