summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-04 01:16:47 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-03 16:19:03 +0000
commit8227b9955e4a06758f3e0a871e49731a0a607608 (patch)
tree05c35dccc631812ab269b347d1c270ad53c0bcad
parent542b6253abc43bcc47b986841bfdafc737710c7c (diff)
vcl: Excise vcl::FontInfo class
This may sound crazy, but literally vcl::FontInfo serves no purpose that I can see. The inheritance chain is like this: ┌────────────────────────┐ │ │ │ vcl::Font │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ vcl::FontInfo │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ FontMetric │ │ │ └────────────────────────┘ vcl::FontInfo (which, incidentally, needs to be put into the vcl namespace due to collisions with poppler!) literally does nothing and is acting as a bridge between FontMetric and vcl::Font. Unlike a bridge though, this bridge doesn't actually *do* anything. So I'm removing it, which means one less class to deal with in the vcl fonts world. Change-Id: I32725669c9bca7fbb0846b6a062135464046e4f6 Reviewed-on: https://gerrit.libreoffice.org/21058 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
-rw-r--r--cui/source/options/fontsubs.cxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx18
-rw-r--r--cui/source/tabpages/numpages.cxx2
-rw-r--r--desktop/source/lib/init.cxx4
-rw-r--r--editeng/source/editeng/editview.cxx2
-rw-r--r--framework/source/uielement/fontsizemenucontroller.cxx2
-rw-r--r--include/svtools/ctrlbox.hxx8
-rw-r--r--include/svtools/ctrltool.hxx44
-rw-r--r--include/svtools/stdmenu.hxx4
-rw-r--r--include/vcl/metric.hxx32
-rw-r--r--include/vcl/outdev.hxx2
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xistyle.cxx2
-rw-r--r--starmath/source/dialog.cxx2
-rw-r--r--svtools/source/control/ctrlbox.cxx28
-rw-r--r--svtools/source/control/ctrltool.cxx102
-rw-r--r--svtools/source/control/stdmenu.cxx2
-rw-r--r--svx/source/mnuctrls/fntszctl.cxx2
-rw-r--r--svx/source/sidebar/nbdtmg.cxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx4
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx2
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx2
-rw-r--r--sw/source/core/unocore/unosett.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/filter/html/svxcss1.cxx4
-rw-r--r--sw/source/filter/html/swhtml.cxx4
-rw-r--r--sw/source/ui/config/optpage.cxx6
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx2
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx2
-rw-r--r--vcl/source/gdi/metric.cxx31
-rw-r--r--vcl/source/outdev/font.cxx4
-rw-r--r--vcl/workben/svptest.cxx2
32 files changed, 146 insertions, 183 deletions
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 2130435bef02..4f7893d12ba1 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -359,7 +359,7 @@ IMPL_LINK_TYPED(SvxFontSubstTabPage, NonPropFontsHdl, Button*, pBox, void)
sal_uInt16 nFontCount = aFntLst.GetFontNameCount();
for(sal_uInt16 nFont = 0; nFont < nFontCount; nFont++)
{
- const vcl::FontInfo& rInfo = aFntLst.GetFontName( nFont );
+ const FontMetric& 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 ed1a26d09546..1747888e071b 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -474,7 +474,7 @@ const FontList* SvxCharNamePage::GetFontList() const
namespace
{
- vcl::FontInfo calcFontInfo( SvxFont& _rFont,
+ FontMetric calcFontInfo( SvxFont& _rFont,
SvxCharNamePage* _pPage,
const FontNameBox* _pFontNameLB,
const FontStyleBox* _pFontStyleLB,
@@ -486,7 +486,7 @@ namespace
{
Size aSize = _rFont.GetSize();
aSize.Width() = 0;
- vcl::FontInfo aFontInfo;
+ FontMetric aFontInfo;
OUString sFontName(_pFontNameLB->GetText());
bool bFontAvailable = _pFontList->IsAvailable( sFontName );
if (bFontAvailable || _pFontNameLB->IsValueChangedFromSaved())
@@ -559,19 +559,19 @@ void SvxCharNamePage::UpdatePreview_Impl()
// Font
const FontList* pFontList = GetFontList();
- vcl::FontInfo aWestFontInfo = calcFontInfo(rFont, this, m_pWestFontNameLB,
+ FontMetric 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));
- vcl::FontInfo aEastFontInfo = calcFontInfo(rCJKFont, this, m_pEastFontNameLB,
+ FontMetric 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));
- vcl::FontInfo aCTLFontInfo = calcFontInfo(rCTLFont,
+ FontMetric 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));
@@ -648,7 +648,7 @@ void SvxCharNamePage::FillSizeBox_Impl( const FontNameBox* pNameBox )
return;
}
- vcl::FontInfo _aFontInfo( pFontList->Get( pNameBox->GetText(), pStyleBox->GetText() ) );
+ FontMetric _aFontInfo( pFontList->Get( pNameBox->GetText(), pStyleBox->GetText() ) );
pSizeBox->Fill( &_aFontInfo, pFontList );
}
@@ -759,7 +759,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
// currently chosen font
if ( bStyle && pFontItem )
{
- vcl::FontInfo aInfo = pFontList->Get( pFontItem->GetFamilyName(), eWeight, eItalic );
+ FontMetric aInfo = pFontList->Get( pFontItem->GetFamilyName(), eWeight, eItalic );
pStyleBox->SetText( pFontList->GetStyleName( aInfo ) );
}
else if ( !m_pImpl->m_bInSearchMode || !bStyle )
@@ -768,7 +768,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
}
else if ( bStyle )
{
- vcl::FontInfo aInfo = pFontList->Get( OUString(), eWeight, eItalic );
+ FontMetric aInfo = pFontList->Get( OUString(), eWeight, eItalic );
pStyleBox->SetText( pFontList->GetStyleName( aInfo ) );
}
if (!bStyleAvailable)
@@ -930,7 +930,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
sal_Int32 nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText );
if ( nEntryPos >= m_pImpl->m_nExtraEntryPos )
aStyleBoxText.clear();
- vcl::FontInfo aInfo( pFontList->Get( rFontName, aStyleBoxText ) );
+ FontMetric 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 c9b5b2a9f56e..0a25a788a1d8 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -736,7 +736,7 @@ IMPL_LINK_NOARG_TYPED(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void)
}
if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) )
{
- vcl::FontInfo aInfo = pList->Get(
+ FontMetric aInfo = pList->Get(
pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE);
vcl::Font aFont(aInfo);
aFmt.SetBulletFont(&aFont);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5f5958be9da1..6727681a4fde 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1215,7 +1215,7 @@ static char* getFonts (const char* pCommand)
for (sal_uInt16 i = 0; i < nFontCount; ++i)
{
boost::property_tree::ptree aChildren;
- const vcl::FontInfo& rInfo = pList->GetFontName(i);
+ const FontMetric& rInfo = pList->GetFontName(i);
const sal_IntPtr* pAry = pList->GetSizeAry(rInfo);
sal_uInt16 nSizeCount = 0;
while (pAry[nSizeCount])
@@ -1529,7 +1529,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
sal_uInt16 nFontCount = pList->GetFontNameCount();
for (sal_uInt16 i = 0; i < nFontCount; ++i)
{
- const vcl::FontInfo& rInfo = pList->GetFontName(i);
+ const FontMetric& rInfo = pList->GetFontName(i);
OUString aFontName = rInfo.GetName();
if (!aSearchedFontName.equals(aFontName.toUtf8().getStr()))
continue;
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 935fe5ef5213..b9ed6d8e187d 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1213,7 +1213,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 );
- vcl::FontInfo aFontInfo = pFontList->Get( pFontItem->GetFamilyName(), pFontItem->GetStyleName() );
+ FontMetric 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 7bbfc048d864..705cdbd02042 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -152,7 +152,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
if ( !pFontList )
pFontList.reset(new FontList( Application::GetDefaultDevice() ));
- vcl::FontInfo aFntInfo = pFontList->Get( m_aFontDescriptor.Name, m_aFontDescriptor.StyleName );
+ FontMetric aFntInfo = pFontList->Get( m_aFontDescriptor.Name, m_aFontDescriptor.StyleName );
// setup font size array
delete m_pHeightArray;
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 7c26d467168c..0be5c42bc731 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -38,7 +38,7 @@ class ImpLineListData;
typedef ::std::vector< ImplColorListData* > ImpColorList;
typedef ::std::vector< ImpLineListData* > ImpLineList;
-typedef ::std::vector< vcl::FontInfo > ImplFontList;
+typedef ::std::vector< FontMetric > ImplFontList;
/*************************************************************************
@@ -131,7 +131,7 @@ Additionally it supports an relative mod, which allows entering
percentage values. This, eg., can be useful for template dialogs.
This mode can only be enabled, but not disabled again.
-For DontKnow the FontSizeBox should be filled FontInfo(), so it will
+For DontKnow the FontSizeBox should be filled FontMetric(), so it will
contain an list with the standard sizes. Th currently shown size
probably needs to be reset by the application.
@@ -437,7 +437,7 @@ inline void FontStyleBox::SetText( const OUString& rText )
class SVT_DLLPUBLIC FontSizeBox : public MetricBox
{
- vcl::FontInfo aFontInfo;
+ FontMetric aFontMetric;
const FontList* pFontList;
sal_uInt16 nRelMin;
sal_uInt16 nRelMax;
@@ -462,7 +462,7 @@ public:
void Reformat() override;
void Modify() override;
- void Fill( const vcl::FontInfo* pInfo, const FontList* pList );
+ void Fill( const FontMetric* 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 263846e35814..3c5449fb9370 100644
--- a/include/svtools/ctrltool.hxx
+++ b/include/svtools/ctrltool.hxx
@@ -73,28 +73,28 @@ With sal_False vectorized and scalable fonts will be queried.
--------------------------------------------------------------------------
-String FontList::GetStyleName( const vcl::FontInfo& rInfo ) const;
+String FontList::GetStyleName( const FontMetric& rInfo ) const;
-This method returns the StyleName of a vcl::FontInfo.
+This method returns the StyleName of a FontMetric.
If no StyleName is set, a name will be generated from the set attributes.
--------------------------------------------------------------------------
-OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const;
+OUString FontList::GetFontMapText( const FontMetric& rInfo ) const;
This method returns a Matchstring which indicates the problem that could
arise when using a font. This string should be displayed to the user.
--------------------------------------------------------------------------
-vcl::FontInfo FontList::Get( const String& rName, const String& rStyleName ) const;
+FontMetric FontList::Get( const String& rName, const String& rStyleName ) const;
-This method search a vcl::FontInfo for the given name and the given style name.
+This method search a FontMetric for the given name and the given style name.
The Stylename can also be a synthetic one.
-In that case the relevant vcl::FontInfo fields will be set.
-If a StyleName is provided, a vcl::FontInfo structure without a Stylename can be
+In that case the relevant FontMetric fields will be set.
+If a StyleName is provided, a FontMetric structure without a Stylename can be
returned. To get a representation of the StyleName for displaying it to the user,
-call GetStyleName() on this vcl::FontInfo structure.
+call GetStyleName() on this FontMetric structure.
Links:
@@ -102,13 +102,13 @@ FontList::GetStyleName()
--------------------------------------------------------------------------
-vcl::FontInfo FontList::Get( const String& rName, FontWeight eWeight,
+FontMetric FontList::Get( const String& rName, FontWeight eWeight,
FontItalic eItalic ) const;
-This method search a vcl::FontInfo structure for a provided name and styles.
-This method can also return a vcl::FontInfo without a Stylename.
+This method search a FontMetric structure for a provided name and styles.
+This method can also return a FontMetric without a Stylename.
To get a representation of the StyleName to be presented to the user
-call GetStyleName() with this vcl::FontInfo.
+call GetStyleName() with this FontMetric.
Links:
@@ -116,7 +116,7 @@ FontList::GetStyleName()
--------------------------------------------------------------------------
-const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const;
+const sal_IntPtr* FontList::GetSizeAry( const FontMetric& rInfo ) const;
This method returns the available sizes for the given font.
If it is a scalable font, standard sizes are returned.
@@ -166,18 +166,18 @@ public:
FontList* Clone() const;
- OUString GetFontMapText( const vcl::FontInfo& rInfo ) const;
+ OUString GetFontMapText( const FontMetric& 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 vcl::FontInfo& rInfo ) const;
+ OUString GetStyleName( const FontMetric& rInfo ) const;
- vcl::FontInfo Get( const OUString& rName,
+ FontMetric Get( const OUString& rName,
const OUString& rStyleName ) const;
- vcl::FontInfo Get( const OUString& rName,
+ FontMetric Get( const OUString& rName,
FontWeight eWeight,
FontItalic eItalic ) const;
@@ -186,12 +186,12 @@ public:
{
return (sal_uInt16)m_Entries.size();
}
- const vcl::FontInfo& GetFontName( sal_uInt16 nFont ) const;
- sal_Handle GetFirstFontInfo( const OUString& rName ) const;
- static sal_Handle GetNextFontInfo( sal_Handle hFontInfo );
- static const vcl::FontInfo& GetFontInfo( sal_Handle hFontInfo );
+ const FontMetric& GetFontName( sal_uInt16 nFont ) const;
+ sal_Handle GetFirstFontMetric( const OUString& rName ) const;
+ static sal_Handle GetNextFontMetric( sal_Handle hFontMetric );
+ static const FontMetric& GetFontMetric( sal_Handle hFontMetric );
- const sal_IntPtr* GetSizeAry( const vcl::FontInfo& rInfo ) const;
+ const sal_IntPtr* GetSizeAry( const FontMetric& rInfo ) const;
static const sal_IntPtr* GetStdSizeAry() { return aStdSizeAry; }
private:
diff --git a/include/svtools/stdmenu.hxx b/include/svtools/stdmenu.hxx
index 2a0b46dfdb9f..299d2e2c3bd6 100644
--- a/include/svtools/stdmenu.hxx
+++ b/include/svtools/stdmenu.hxx
@@ -26,7 +26,7 @@
class FontList;
namespace vcl {
- class FontInfo;
+ class FontMetric;
}
/*************************************************************************
@@ -132,7 +132,7 @@ public:
virtual void Select() override;
virtual void Highlight() override;
- void Fill( const vcl::FontInfo& rInfo, const FontList* pList );
+ void Fill( const FontMetric& 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 fd3759a76eba..57e471c44328 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -34,38 +34,18 @@ typedef sal_uInt32 sal_UCS4;
typedef boost::intrusive_ptr< ImplFontCharMap > ImplFontCharMapPtr;
typedef boost::intrusive_ptr< FontCharMap > FontCharMapPtr;
-namespace vcl {
-
-// avoid problems where poppler's FontInfo is picked up
-class VCL_DLLPUBLIC FontInfo : public vcl::Font
+class VCL_DLLPUBLIC FontMetric : public vcl::Font
{
- friend class ::OutputDevice;
-protected:
- ImplFontMetric* mpImplMetric; // Implementation
+ friend class ::OutputDevice;
public:
- FontInfo();
- FontInfo( const FontInfo& );
- ~FontInfo();
+ FontMetric();
+ FontMetric( const FontMetric& );
+ ~FontMetric();
FontType GetType() const;
- FontInfo& operator=( const FontInfo& );
- bool operator==( const FontInfo& ) const;
- bool operator!=( const FontInfo& rInfo ) const
- { return !operator==( rInfo ); }
-};
-
-}
-
-class VCL_DLLPUBLIC FontMetric : public vcl::FontInfo
-{
-public:
- FontMetric() {}
- FontMetric( const FontMetric& );
- ~FontMetric() {}
-
long GetAscent() const;
long GetDescent() const;
long GetIntLeading() const;
@@ -79,6 +59,8 @@ public:
bool operator==( const FontMetric& rMetric ) const;
bool operator!=( const FontMetric& rMetric ) const
{ return !operator==( rMetric ); }
+protected:
+ ImplFontMetric* mpImplMetric; // Implementation
};
template< typename charT, typename traits >
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 97d26dea2ff5..cf0b62179fb3 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1249,7 +1249,7 @@ private:
public:
- vcl::FontInfo GetDevFont( int nDevFontIndex ) const;
+ FontMetric GetDevFont( int nDevFontIndex ) const;
int GetDevFontCount() const;
bool IsFontAvailable( const OUString& rFontName ) const;
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index dba973ba0602..a179192a09ae 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -740,7 +740,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
aParaText = "&\"" + OUString(aNewData.maName);
if( pFontList )
{
- vcl::FontInfo aFontInfo( pFontList->Get(
+ FontMetric 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 00b13426fab7..2bac32676951 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -207,7 +207,7 @@ void XclImpFont::SetFontData( const XclFontData& rFontData, bool bHasCharSet )
{
if( const FontList* pFontList = pInfoItem->GetFontList() )
{
- vcl::FontInfo aFontInfo( pFontList->Get( maData.maName, maData.maStyle ) );
+ FontMetric 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 e0431796750c..8f5d53d49165 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -2327,7 +2327,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
void SmSymDefineDialog::SetFont(const OUString &rFontName, const OUString &rStyleName)
{
// get Font (FontInfo) matching name and style
- vcl::FontInfo aFI;
+ FontMetric 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 69816b720c43..ee619c26b247 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1037,16 +1037,16 @@ void FontNameBox::Fill( const FontList* pList )
sal_uInt16 nFontCount = pList->GetFontNameCount();
for ( sal_uInt16 i = 0; i < nFontCount; i++ )
{
- const vcl::FontInfo& rFontInfo = pList->GetFontName( i );
- sal_uLong nIndex = InsertEntry( rFontInfo.GetName() );
+ const FontMetric& rFontMetric = pList->GetFontName( i );
+ sal_uLong nIndex = InsertEntry( rFontMetric.GetName() );
if ( nIndex != LISTBOX_ERROR )
{
if ( nIndex < mpFontList->size() ) {
ImplFontList::iterator it = mpFontList->begin();
::std::advance( it, nIndex );
- mpFontList->insert( it, rFontInfo );
+ mpFontList->insert( it, rFontMetric );
} else {
- mpFontList->push_back( rFontInfo );
+ mpFontList->push_back( rFontMetric );
}
}
}
@@ -1117,7 +1117,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
{
assert( mpFontList );
- vcl::FontInfo& rInfo = (*mpFontList)[ rUDEvt.GetItemId() ];
+ FontMetric& rInfo = (*mpFontList)[ rUDEvt.GetItemId() ];
Point aTopLeft = rUDEvt.GetRect().TopLeft();
long nX = aTopLeft.X();
long nH = rUDEvt.GetRect().GetHeight();
@@ -1384,8 +1384,8 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList )
Clear();
// does a font with this name already exist?
- sal_Handle hFontInfo = pList->GetFirstFontInfo( rName );
- if ( hFontInfo )
+ sal_Handle hFontMetric = pList->GetFirstFontMetric( rName );
+ if ( hFontMetric )
{
OUString aStyleText;
FontWeight eLastWeight = WEIGHT_DONTKNOW;
@@ -1396,10 +1396,10 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList )
bool bBold = false;
bool bBoldItalic = false;
bool bInsert = false;
- vcl::FontInfo aInfo;
- while ( hFontInfo )
+ FontMetric aInfo;
+ while ( hFontMetric )
{
- aInfo = FontList::GetFontInfo( hFontInfo );
+ aInfo = FontList::GetFontMetric( hFontMetric );
FontWeight eWeight = aInfo.GetWeight();
FontItalic eItalic = aInfo.GetItalic();
@@ -1464,7 +1464,7 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList )
else if ( !bBoldItalic && (aStyleText == pList->GetBoldItalicStr()) )
bBoldItalic = true;
- hFontInfo = FontList::GetNextFontInfo( hFontInfo );
+ hFontMetric = FontList::GetNextFontMetric( hFontMetric );
}
if ( bInsert )
@@ -1616,7 +1616,7 @@ void FontSizeBox::Modify()
}
}
-void FontSizeBox::Fill( const vcl::FontInfo* pInfo, const FontList* pList )
+void FontSizeBox::Fill( const FontMetric* pInfo, const FontList* pList )
{
// remember for relative mode
pFontList = pList;
@@ -1631,7 +1631,7 @@ void FontSizeBox::Fill( const vcl::FontInfo* pInfo, const FontList* pList )
if( pInfo )
{
- aFontInfo = *pInfo;
+ aFontMetric = *pInfo;
pAry = pList->GetSizeAry( *pInfo );
}
else
@@ -1778,7 +1778,7 @@ void FontSizeBox::SetRelative( bool bNewRelative )
SetMax( 9999 );
SetUnit( FUNIT_POINT );
if ( pFontList )
- Fill( &aFontInfo, pFontList );
+ Fill( &aFontMetric, pFontList );
}
SetText( aStr );
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index 70b30c19907b..a973ebdf9e07 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -69,18 +69,18 @@ const sal_IntPtr FontList::aStdSizeAry[] =
0
};
-class ImplFontListFontInfo : public vcl::FontInfo
+class ImplFontListFontMetric : public FontMetric
{
friend class FontList;
private:
VclPtr<OutputDevice> mpDevice;
- ImplFontListFontInfo* mpNext;
+ ImplFontListFontMetric* mpNext;
public:
- ImplFontListFontInfo( const vcl::FontInfo& rInfo,
+ ImplFontListFontMetric( const FontMetric& rInfo,
OutputDevice* pDev ) :
- vcl::FontInfo( rInfo ), mpNext(nullptr)
+ FontMetric( rInfo ), mpNext(nullptr)
{
mpDevice = pDev;
}
@@ -105,7 +105,7 @@ class ImplFontListNameInfo
private:
OUString maSearchName;
- ImplFontListFontInfo* mpFirst;
+ ImplFontListFontMetric* mpFirst;
FontListFontNameType mnType;
explicit ImplFontListNameInfo(const OUString& rSearchName)
@@ -126,8 +126,8 @@ static int sortWeightValue(FontWeight eWeight)
return 0; // eWeight == WEIGHT_NORMAL
}
-static sal_Int32 ImplCompareFontInfo( ImplFontListFontInfo* pInfo1,
- ImplFontListFontInfo* pInfo2 )
+static sal_Int32 ImplCompareFontMetric( ImplFontListFontMetric* pInfo1,
+ ImplFontListFontMetric* pInfo2 )
{
//Sort non italic before italics
if ( pInfo1->GetItalic() < pInfo2->GetItalic() )
@@ -253,13 +253,13 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll,
sal_uInt16 i;
for( i = 0; i < n; i++ )
{
- vcl::FontInfo aFontInfo = pDevice->GetDevFont( i );
+ FontMetric aFontMetric = pDevice->GetDevFont( i );
// ignore raster-fonts if they are not to be displayed
- if ( !bAll && (aFontInfo.GetType() == TYPE_RASTER) )
+ if ( !bAll && (aFontMetric.GetType() == TYPE_RASTER) )
continue;
- OUString aSearchName(aFontInfo.GetName());
+ OUString aSearchName(aFontMetric.GetName());
ImplFontListNameInfo* pData;
sal_uLong nIndex;
aSearchName = ImplMakeSearchString(aSearchName);
@@ -269,7 +269,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll,
{
if ( bInsertData )
{
- ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice );
+ ImplFontListFontMetric* pNewInfo = new ImplFontListFontMetric( aFontMetric, pDevice );
pData = new ImplFontListNameInfo( aSearchName );
pData->mpFirst = pNewInfo;
pNewInfo->mpNext = nullptr;
@@ -286,12 +286,12 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll,
if ( bInsertData )
{
bool bInsert = true;
- ImplFontListFontInfo* pPrev = nullptr;
- ImplFontListFontInfo* pTemp = pData->mpFirst;
- ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice );
+ ImplFontListFontMetric* pPrev = nullptr;
+ ImplFontListFontMetric* pTemp = pData->mpFirst;
+ ImplFontListFontMetric* pNewInfo = new ImplFontListFontMetric( aFontMetric, pDevice );
while ( pTemp )
{
- sal_Int32 eComp = ImplCompareFontInfo( pNewInfo, pTemp );
+ sal_Int32 eComp = ImplCompareFontMetric( pNewInfo, pTemp );
if ( eComp <= 0 )
{
if ( eComp == 0 )
@@ -301,8 +301,8 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll,
if ( (pTemp->GetCharSet() != eSystemEncoding) &&
(pNewInfo->GetCharSet() == eSystemEncoding) )
{
- ImplFontListFontInfo* pTemp2 = pTemp->mpNext;
- *static_cast<vcl::FontInfo*>(pTemp) = *static_cast<vcl::FontInfo*>(pNewInfo);
+ ImplFontListFontMetric* pTemp2 = pTemp->mpNext;
+ *static_cast<FontMetric*>(pTemp) = *static_cast<FontMetric*>(pNewInfo);
pTemp->mpNext = pTemp2;
}
delete pNewInfo;
@@ -370,8 +370,8 @@ FontList::~FontList()
// delete SizeArray if required
delete[] mpSizeAry;
- // delete FontInfos
- ImplFontListFontInfo *pTemp, *pInfo;
+ // delete FontMetrics
+ ImplFontListFontMetric *pTemp, *pInfo;
for (auto const& it : m_Entries)
{
pInfo = it->mpFirst;
@@ -430,7 +430,7 @@ const OUString& FontList::GetStyleName(FontWeight eWeight, FontItalic eItalic) c
}
}
-OUString FontList::GetStyleName(const vcl::FontInfo& rInfo) const
+OUString FontList::GetStyleName(const FontMetric& rInfo) const
{
OUString aStyleName = rInfo.GetStyleName();
FontWeight eWeight = rInfo.GetWeight();
@@ -481,7 +481,7 @@ OUString FontList::GetStyleName(const vcl::FontInfo& rInfo) const
return aStyleName;
}
-OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const
+OUString FontList::GetFontMapText( const FontMetric& rInfo ) const
{
if ( rInfo.GetName().isEmpty() )
{
@@ -505,17 +505,17 @@ OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const
bool bNotSynthetic = false;
FontWeight eWeight = rInfo.GetWeight();
FontItalic eItalic = rInfo.GetItalic();
- ImplFontListFontInfo* pFontInfo = pData->mpFirst;
- while ( pFontInfo )
+ ImplFontListFontMetric* pFontMetric = pData->mpFirst;
+ while ( pFontMetric )
{
- if ( (eWeight == pFontInfo->GetWeight()) &&
- (eItalic == pFontInfo->GetItalic()) )
+ if ( (eWeight == pFontMetric->GetWeight()) &&
+ (eItalic == pFontMetric->GetItalic()) )
{
bNotSynthetic = true;
break;
}
- pFontInfo = pFontInfo->mpNext;
+ pFontMetric = pFontMetric->mpNext;
}
if ( !bNotSynthetic )
@@ -551,10 +551,10 @@ OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const
namespace
{
- vcl::FontInfo makeMissing(ImplFontListFontInfo* pFontNameInfo, const OUString &rName,
+ FontMetric makeMissing(ImplFontListFontMetric* pFontNameInfo, const OUString &rName,
FontWeight eWeight, FontItalic eItalic)
{
- vcl::FontInfo aInfo;
+ FontMetric aInfo;
// if the fontname matches, we copy as much as possible
if (pFontNameInfo)
{
@@ -574,21 +574,21 @@ namespace
}
}
-vcl::FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const
+FontMetric FontList::Get(const OUString& rName, const OUString& rStyleName) const
{
ImplFontListNameInfo* pData = ImplFindByName( rName );
- ImplFontListFontInfo* pFontInfo = nullptr;
- ImplFontListFontInfo* pFontNameInfo = nullptr;
+ ImplFontListFontMetric* pFontMetric = nullptr;
+ ImplFontListFontMetric* pFontNameInfo = nullptr;
if ( pData )
{
- ImplFontListFontInfo* pSearchInfo = pData->mpFirst;
+ ImplFontListFontMetric* pSearchInfo = pData->mpFirst;
pFontNameInfo = pSearchInfo;
pSearchInfo = pData->mpFirst;
while ( pSearchInfo )
{
if (rStyleName.equalsIgnoreAsciiCase(GetStyleName(*pSearchInfo)))
{
- pFontInfo = pSearchInfo;
+ pFontMetric = pSearchInfo;
break;
}
@@ -597,8 +597,8 @@ vcl::FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) c
}
// reproduce attributes if data could not be found
- vcl::FontInfo aInfo;
- if ( !pFontInfo )
+ FontMetric aInfo;
+ if ( !pFontMetric )
{
FontWeight eWeight = WEIGHT_DONTKNOW;
FontItalic eItalic = ITALIC_NONE;
@@ -646,7 +646,7 @@ vcl::FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) c
aInfo = makeMissing(pFontNameInfo, rName, eWeight, eItalic);
}
else
- aInfo = *pFontInfo;
+ aInfo = *pFontMetric;
// set Fontname to keep FontAlias
aInfo.SetName( rName );
@@ -655,22 +655,22 @@ vcl::FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) c
return aInfo;
}
-vcl::FontInfo FontList::Get(const OUString& rName,
+FontMetric FontList::Get(const OUString& rName,
FontWeight eWeight, FontItalic eItalic) const
{
ImplFontListNameInfo* pData = ImplFindByName( rName );
- ImplFontListFontInfo* pFontInfo = nullptr;
- ImplFontListFontInfo* pFontNameInfo = nullptr;
+ ImplFontListFontMetric* pFontMetric = nullptr;
+ ImplFontListFontMetric* pFontNameInfo = nullptr;
if ( pData )
{
- ImplFontListFontInfo* pSearchInfo = pData->mpFirst;
+ ImplFontListFontMetric* pSearchInfo = pData->mpFirst;
pFontNameInfo = pSearchInfo;
while ( pSearchInfo )
{
if ( (eWeight == pSearchInfo->GetWeight()) &&
(eItalic == pSearchInfo->GetItalic()) )
{
- pFontInfo = pSearchInfo;
+ pFontMetric = pSearchInfo;
break;
}
@@ -679,11 +679,11 @@ vcl::FontInfo FontList::Get(const OUString& rName,
}
// reproduce attributes if data could not be found
- vcl::FontInfo aInfo;
- if ( !pFontInfo )
+ FontMetric aInfo;
+ if ( !pFontMetric )
aInfo = makeMissing(pFontNameInfo, rName, eWeight, eItalic);
else
- aInfo = *pFontInfo;
+ aInfo = *pFontMetric;
// set Fontname to keep FontAlias
aInfo.SetName( rName );
@@ -696,14 +696,14 @@ bool FontList::IsAvailable(const OUString& rName) const
return (ImplFindByName( rName ) != nullptr);
}
-const vcl::FontInfo& FontList::GetFontName( sal_uInt16 nFont ) const
+const FontMetric& FontList::GetFontName( sal_uInt16 nFont ) const
{
DBG_ASSERT( nFont < GetFontNameCount(), "FontList::GetFontName(): nFont >= Count" );
return *(m_Entries[nFont]->mpFirst);
}
-sal_Handle FontList::GetFirstFontInfo(const OUString& rName) const
+sal_Handle FontList::GetFirstFontMetric(const OUString& rName) const
{
ImplFontListNameInfo* pData = ImplFindByName( rName );
if ( !pData )
@@ -712,19 +712,19 @@ sal_Handle FontList::GetFirstFontInfo(const OUString& rName) const
return static_cast<sal_Handle>(pData->mpFirst);
}
-sal_Handle FontList::GetNextFontInfo( sal_Handle hFontInfo )
+sal_Handle FontList::GetNextFontMetric( sal_Handle hFontMetric )
{
- ImplFontListFontInfo* pInfo = static_cast<ImplFontListFontInfo*>(hFontInfo);
+ ImplFontListFontMetric* pInfo = static_cast<ImplFontListFontMetric*>(hFontMetric);
return static_cast<sal_Handle>(pInfo->mpNext);
}
-const vcl::FontInfo& FontList::GetFontInfo( sal_Handle hFontInfo )
+const FontMetric& FontList::GetFontMetric( sal_Handle hFontMetric )
{
- ImplFontListFontInfo* pInfo = static_cast<ImplFontListFontInfo*>(hFontInfo);
+ ImplFontListFontMetric* pInfo = static_cast<ImplFontListFontMetric*>(hFontMetric);
return *pInfo;
}
-const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const
+const sal_IntPtr* FontList::GetSizeAry( const FontMetric& rInfo ) const
{
// first delete Size-Array
if ( mpSizeAry )
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index 4296dbb3b093..770dc57d6549 100644
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -125,7 +125,7 @@ void FontSizeMenu::Highlight()
{
}
-void FontSizeMenu::Fill( const vcl::FontInfo& rInfo, const FontList* pList )
+void FontSizeMenu::Fill( const FontMetric& rInfo, const FontList* pList )
{
Clear();
diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx
index d6a0c1d7eb59..5dfff7a2b6c2 100644
--- a/svx/source/mnuctrls/fntszctl.cxx
+++ b/svx/source/mnuctrls/fntszctl.cxx
@@ -122,7 +122,7 @@ void SvxFontSizeMenuControl::StateChanged(
if ( pList )
{
- vcl::FontInfo aFntInf = pList->Get( pItem->GetFamilyName(),
+ FontMetric 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 78d4a7c65609..dff849cb43c1 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -1736,7 +1736,7 @@ bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
}
if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) )
{
- vcl::FontInfo aInfo = pList->Get(pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE);
+ FontMetric aInfo = pList->Get(pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE);
vcl::Font aFont(aInfo);
aFmt.SetBulletFont(&aFont);
}
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index ae696ae170d9..340bd842d097 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1140,7 +1140,7 @@ void SvxFontNameBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
fontName = GetEntry(rUDEvt.GetItemId());
}
Sequence< PropertyValue > aArgs( 1 );
- vcl::FontInfo aInfo( pFontList->Get( fontName,
+ FontMetric aInfo( pFontList->Get( fontName,
aCurFont.GetWeight(),
aCurFont.GetItalic() ) );
@@ -1166,7 +1166,7 @@ void SvxFontNameBox_Impl::Select()
std::unique_ptr<SvxFontItem> pFontItem;
if ( pFontList )
{
- vcl::FontInfo aInfo( pFontList->Get( GetText(),
+ FontMetric 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 306b89f97674..f749f317c5f3 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -195,7 +195,7 @@ void SvxFontSizeBox_Impl::UpdateFont( const css::awt::FontDescriptor& rCurrentFo
if ( !rCurrentFont.Name.isEmpty() )
{
- vcl::FontInfo _aFontInfo;
+ FontMetric _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 910317c57cb9..1bcb2fa61a6f 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -824,7 +824,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
->GetItem( SID_ATTR_CHAR_FONTLIST ));
const FontList* pList = pFontListItem->GetFontList();
- vcl::FontInfo aInfo = pList->Get(
+ FontMetric aInfo = pList->Get(
pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE);
vcl::Font aFont(aInfo);
aFormat.SetBulletFont(&aFont);
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 16c42bfa5ea7..7f51bbc4ac00 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1929,7 +1929,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
static_cast<const SvxFontListItem* >(pLclDocShell
->GetItem( SID_ATTR_CHAR_FONTLIST ));
const FontList* pList = pFontListItem->GetFontList();
- vcl::FontInfo aInfo = pList->Get(
+ FontMetric aInfo = pList->Get(
sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE);
vcl::Font aFont(aInfo);
aFormat.SetBulletFont(&aFont);
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 0bfb6b80126b..87da652ca6c4 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1657,7 +1657,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
static_cast<const SvxFontListItem*>(pDoc->GetDocShell()
->GetItem( SID_ATTR_CHAR_FONTLIST ));
const FontList* pList = pFontListItem->GetFontList();
- vcl::FontInfo aInfo = pList->Get(
+ FontMetric aInfo = pList->Get(
pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE);
vcl::Font aFont(aInfo);
aFormat.SetBulletFont(&aFont);
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 7cfe02dd4dab..3113fcc96118 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -1088,10 +1088,10 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
{
if( !bFound && pFList )
{
- sal_Handle hFont = pFList->GetFirstFontInfo( aIdent );
+ sal_Handle hFont = pFList->GetFirstFontMetric( aIdent );
if( nullptr != hFont )
{
- const vcl::FontInfo& rFInfo = FontList::GetFontInfo( hFont );
+ const FontMetric& rFInfo = FontList::GetFontMetric( hFont );
if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() )
{
bFound = true;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 7c61701b5930..14c0616bffca 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -3790,10 +3790,10 @@ void SwHTMLParser::NewFontAttr( int nToken )
{
if( !bFound && pFList )
{
- sal_Handle hFont = pFList->GetFirstFontInfo( aFName );
+ sal_Handle hFont = pFList->GetFirstFontMetric( aFName );
if( nullptr != hFont )
{
- const vcl::FontInfo& rFInfo = FontList::GetFontInfo( hFont );
+ const FontMetric& rFInfo = FontList::GetFontMetric( hFont );
if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() )
{
bFound = true;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 2096b5e763f0..6fb20a738e75 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -828,7 +828,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
int nFontNames = m_pPrt->GetDevFontCount();
for( int i = 0; i < nFontNames; i++ )
{
- vcl::FontInfo aInf( m_pPrt->GetDevFont( i ) );
+ FontMetric aInf( m_pPrt->GetDevFont( i ) );
aFontNames.insert( aInf.GetName() );
}
@@ -944,7 +944,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
m_pLabelBox->SetText(sCapBackup );
m_pIdxBox->SetText(sIdxBackup );
- vcl::FontInfo aFontInfo( m_pFontList->Get(sStdBackup, sStdBackup) );
+ FontMetric aFontInfo( m_pFontList->Get(sStdBackup, sStdBackup) );
m_pStandardHeightLB->Fill( &aFontInfo, m_pFontList );
aFontInfo = m_pFontList->Get(sOutBackup, sOutBackup );
m_pTitleHeightLB->Fill( &aFontInfo, m_pFontList );
@@ -1083,7 +1083,7 @@ IMPL_LINK_TYPED( SwStdFontTabPage, LoseFocusHdl, Control&, rControl, void )
{
pHeightLB = m_pIndexHeightLB;
}
- vcl::FontInfo aFontInfo( m_pFontList->Get(sEntry, sEntry) );
+ FontMetric aFontInfo( m_pFontList->Get(sEntry, sEntry) );
pHeightLB->Fill( &aFontInfo, m_pFontList );
}
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index e92a5c2333ae..b7f85947641e 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -190,7 +190,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
int nFontNames = pPrt->GetDevFontCount();
for( int i = 0; i < nFontNames; i++ )
{
- vcl::FontInfo aInf( pPrt->GetDevFont( i ) );
+ FontMetric aInf( pPrt->GetDevFont( i ) );
aFontNames.insert( aInf.GetName() );
}
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 1c3937c2f6ab..6f961c2073a2 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -988,7 +988,7 @@ void SwSrcEditWindow::SetFont()
const SvxFontListItem* pFontListItem =
static_cast<const SvxFontListItem* >(pSrcView->GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ));
const FontList* pList = pFontListItem->GetFontList();
- vcl::FontInfo aInfo = pList->Get(sFontName,WEIGHT_NORMAL, ITALIC_NONE);
+ FontMetric aInfo = pList->Get(sFontName,WEIGHT_NORMAL, ITALIC_NONE);
const vcl::Font& rFont = GetTextEngine()->GetFont();
vcl::Font aFont(aInfo);
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx
index bf671af3321a..f5c9399c83e3 100644
--- a/vcl/source/gdi/metric.cxx
+++ b/vcl/source/gdi/metric.cxx
@@ -68,25 +68,23 @@ bool ImplFontMetric::operator==( const ImplFontMetric& r ) const
return true;
}
-namespace vcl {
-
-FontInfo::FontInfo()
+FontMetric::FontMetric()
: mpImplMetric( new ImplFontMetric )
{}
-FontInfo::FontInfo( const FontInfo& rInfo )
+FontMetric::FontMetric( const FontMetric& rInfo )
: Font( rInfo )
{
mpImplMetric = rInfo.mpImplMetric;
mpImplMetric->AddReference();
}
-FontInfo::~FontInfo()
+FontMetric::~FontMetric()
{
mpImplMetric->DeReference();
}
-FontInfo& FontInfo::operator=( const FontInfo& rInfo )
+FontMetric& FontMetric::operator=( const FontMetric& rInfo )
{
Font::operator=( rInfo );
@@ -100,7 +98,7 @@ FontInfo& FontInfo::operator=( const FontInfo& rInfo )
return *this;
}
-bool FontInfo::operator==( const FontInfo& rInfo ) const
+bool FontMetric::operator==( const FontMetric& rInfo ) const
{
if( !Font::operator==( rInfo ) )
return false;
@@ -111,17 +109,11 @@ bool FontInfo::operator==( const FontInfo& rInfo ) const
return false;
}
-FontType FontInfo::GetType() const
+FontType FontMetric::GetType() const
{
return (mpImplMetric->IsScalable() ? TYPE_SCALABLE : TYPE_RASTER);
}
-}
-
-FontMetric::FontMetric( const FontMetric& rMetric ):
- vcl::FontInfo( rMetric )
-{}
-
long FontMetric::GetAscent() const
{
return mpImplMetric->GetAscent();
@@ -162,15 +154,4 @@ long FontMetric::GetBulletOffset() const
return mpImplMetric->GetBulletOffset();
}
-FontMetric& FontMetric::operator =( const FontMetric& rMetric )
-{
- vcl::FontInfo::operator=( rMetric );
- return *this;
-}
-
-bool FontMetric::operator==( const FontMetric& rMetric ) const
-{
- return vcl::FontInfo::operator==( rMetric );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index e3a44c339b33..a48926f0d291 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -62,9 +62,9 @@ using namespace ::com::sun::star::uno;
using namespace ::rtl;
using namespace ::utl;
-vcl::FontInfo OutputDevice::GetDevFont( int nDevFontIndex ) const
+FontMetric OutputDevice::GetDevFont( int nDevFontIndex ) const
{
- vcl::FontInfo aFontInfo;
+ FontMetric aFontInfo;
ImplInitFontList();
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index d0e070a577de..2303f23c0d0b 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -256,7 +256,7 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
for (int i = 0; i < nFontSamples; ++i)
{
- vcl::FontInfo aFont = rRenderContext.GetDevFont((i * nFontCount) / nFontSamples);
+ FontMetric aFont = rRenderContext.GetDevFont((i * nFontCount) / nFontSamples);
aFont.SetHeight(400 + (i % 7) * 100);
aFont.SetOrientation(i * (3600 / nFontSamples));
rRenderContext.SetFont(aFont);