summaryrefslogtreecommitdiff
path: root/sw
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 /sw
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>
Diffstat (limited to 'sw')
-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
8 files changed, 12 insertions, 12 deletions
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);