diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-04 04:25:16 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-04 05:16:08 +1100 |
commit | 7eab7f3485e525635f06a505776618c30e442a26 (patch) | |
tree | b02a328084b90e43306589ccf73dddbb757277be | |
parent | 6aa4496c789fec271dcdc7995cf62ef2dabf1f96 (diff) |
Cleanup after removing vcl::FontInfo class
Change-Id: I544eac439cb7277e47a23a90c6fbc45496161c3b
29 files changed, 177 insertions, 174 deletions
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index 4f7893d12ba1..362cdd12b87c 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -359,9 +359,9 @@ IMPL_LINK_TYPED(SvxFontSubstTabPage, NonPropFontsHdl, Button*, pBox, void) sal_uInt16 nFontCount = aFntLst.GetFontNameCount(); for(sal_uInt16 nFont = 0; nFont < nFontCount; nFont++) { - const FontMetric& rInfo = aFntLst.GetFontName( nFont ); - if(!bNonPropOnly || rInfo.GetPitch() == PITCH_FIXED) - m_pFontNameLB->InsertEntry(rInfo.GetName()); + const FontMetric& rFontMetric = aFntLst.GetFontName( nFont ); + if(!bNonPropOnly || rFontMetric.GetPitch() == PITCH_FIXED) + m_pFontNameLB->InsertEntry(rFontMetric.GetName()); } m_pFontNameLB->SelectEntry(sFontName); } diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 1747888e071b..8351042abdd0 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -474,7 +474,7 @@ const FontList* SvxCharNamePage::GetFontList() const namespace { - FontMetric calcFontInfo( SvxFont& _rFont, + FontMetric calcFontMetrics( SvxFont& _rFont, SvxCharNamePage* _pPage, const FontNameBox* _pFontNameLB, const FontStyleBox* _pFontStyleLB, @@ -486,11 +486,11 @@ namespace { Size aSize = _rFont.GetSize(); aSize.Width() = 0; - FontMetric aFontInfo; + FontMetric aFontMetrics; OUString sFontName(_pFontNameLB->GetText()); bool bFontAvailable = _pFontList->IsAvailable( sFontName ); if (bFontAvailable || _pFontNameLB->IsValueChangedFromSaved()) - aFontInfo = _pFontList->Get( sFontName, _pFontStyleLB->GetText() ); + aFontMetrics = _pFontList->Get( sFontName, _pFontStyleLB->GetText() ); else { //get the font from itemset @@ -498,11 +498,11 @@ namespace if ( eState >= SfxItemState::DEFAULT ) { const SvxFontItem* pFontItem = static_cast<const SvxFontItem*>(&( _pPage->GetItemSet().Get( _nFontWhich ) )); - aFontInfo.SetName(pFontItem->GetFamilyName()); - aFontInfo.SetStyleName(pFontItem->GetStyleName()); - aFontInfo.SetFamily(pFontItem->GetFamily()); - aFontInfo.SetPitch(pFontItem->GetPitch()); - aFontInfo.SetCharSet(pFontItem->GetCharSet()); + aFontMetrics.SetName(pFontItem->GetFamilyName()); + aFontMetrics.SetStyleName(pFontItem->GetStyleName()); + aFontMetrics.SetFamily(pFontItem->GetFamily()); + aFontMetrics.SetPitch(pFontItem->GetPitch()); + aFontMetrics.SetCharSet(pFontItem->GetCharSet()); } } if ( _pFontSizeLB->IsRelative() ) @@ -525,20 +525,20 @@ namespace aSize.Height() = PointToTwips( static_cast<long>(_pFontSizeLB->GetValue() / 10) ); else aSize.Height() = 200; // default 10pt - aFontInfo.SetSize( aSize ); + aFontMetrics.SetSize( aSize ); _rFont.SetLanguage(_pLanguageLB->GetSelectLanguage()); - _rFont.SetFamily( aFontInfo.GetFamily() ); - _rFont.SetName( aFontInfo.GetName() ); - _rFont.SetStyleName( aFontInfo.GetStyleName() ); - _rFont.SetPitch( aFontInfo.GetPitch() ); - _rFont.SetCharSet( aFontInfo.GetCharSet() ); - _rFont.SetWeight( aFontInfo.GetWeight() ); - _rFont.SetItalic( aFontInfo.GetItalic() ); - _rFont.SetSize( aFontInfo.GetSize() ); + _rFont.SetFamily( aFontMetrics.GetFamily() ); + _rFont.SetName( aFontMetrics.GetName() ); + _rFont.SetStyleName( aFontMetrics.GetStyleName() ); + _rFont.SetPitch( aFontMetrics.GetPitch() ); + _rFont.SetCharSet( aFontMetrics.GetCharSet() ); + _rFont.SetWeight( aFontMetrics.GetWeight() ); + _rFont.SetItalic( aFontMetrics.GetItalic() ); + _rFont.SetSize( aFontMetrics.GetSize() ); - return aFontInfo; + return aFontMetrics; } } @@ -559,23 +559,26 @@ void SvxCharNamePage::UpdatePreview_Impl() // Font const FontList* pFontList = GetFontList(); - FontMetric aWestFontInfo = calcFontInfo(rFont, this, m_pWestFontNameLB, + FontMetric aWestFontMetric = calcFontMetrics(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)); - FontMetric aEastFontInfo = calcFontInfo(rCJKFont, this, m_pEastFontNameLB, + m_pWestFontTypeFT->SetText(pFontList->GetFontMapText(aWestFontMetric)); + + FontMetric aEastFontMetric = calcFontMetrics(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)); - FontMetric aCTLFontInfo = calcFontInfo(rCTLFont, + m_pEastFontTypeFT->SetText(pFontList->GetFontMapText(aEastFontMetric)); + + FontMetric aCTLFontMetric = calcFontMetrics(rCTLFont, this, m_pCTLFontNameLB, m_pCTLFontStyleLB, m_pCTLFontSizeLB, m_pCTLFontLanguageLB, pFontList, GetWhich(SID_ATTR_CHAR_CTL_FONT), GetWhich(SID_ATTR_CHAR_CTL_FONTHEIGHT)); - m_pCTLFontTypeFT->SetText(pFontList->GetFontMapText(aCTLFontInfo)); + + m_pCTLFontTypeFT->SetText(pFontList->GetFontMapText(aCTLFontMetric)); m_pPreviewWin->Invalidate(); } @@ -648,8 +651,8 @@ void SvxCharNamePage::FillSizeBox_Impl( const FontNameBox* pNameBox ) return; } - FontMetric _aFontInfo( pFontList->Get( pNameBox->GetText(), pStyleBox->GetText() ) ); - pSizeBox->Fill( &_aFontInfo, pFontList ); + FontMetric _aFontMetric( pFontList->Get( pNameBox->GetText(), pStyleBox->GetText() ) ); + pSizeBox->Fill( &_aFontMetric, pFontList ); } @@ -759,8 +762,8 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp // currently chosen font if ( bStyle && pFontItem ) { - FontMetric aInfo = pFontList->Get( pFontItem->GetFamilyName(), eWeight, eItalic ); - pStyleBox->SetText( pFontList->GetStyleName( aInfo ) ); + FontMetric aFontMetric = pFontList->Get( pFontItem->GetFamilyName(), eWeight, eItalic ); + pStyleBox->SetText( pFontList->GetStyleName( aFontMetric ) ); } else if ( !m_pImpl->m_bInSearchMode || !bStyle ) { @@ -768,8 +771,8 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp } else if ( bStyle ) { - FontMetric aInfo = pFontList->Get( OUString(), eWeight, eItalic ); - pStyleBox->SetText( pFontList->GetStyleName( aInfo ) ); + FontMetric aFontMetric = pFontList->Get( OUString(), eWeight, eItalic ); + pStyleBox->SetText( pFontList->GetStyleName( aFontMetric ) ); } if (!bStyleAvailable) { diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 0a25a788a1d8..c210dab8f812 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -736,9 +736,9 @@ IMPL_LINK_NOARG_TYPED(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void) } if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) ) { - FontMetric aInfo = pList->Get( + FontMetric aFontMetric = pList->Get( pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE); - vcl::Font aFont(aInfo); + vcl::Font aFont(aFontMetric); aFmt.SetBulletFont(&aFont); } else diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6727681a4fde..4afe19ce221c 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1215,8 +1215,8 @@ static char* getFonts (const char* pCommand) for (sal_uInt16 i = 0; i < nFontCount; ++i) { boost::property_tree::ptree aChildren; - const FontMetric& rInfo = pList->GetFontName(i); - const sal_IntPtr* pAry = pList->GetSizeAry(rInfo); + const FontMetric& rFontMetric = pList->GetFontName(i); + const sal_IntPtr* pAry = pList->GetSizeAry(rFontMetric); sal_uInt16 nSizeCount = 0; while (pAry[nSizeCount]) { @@ -1225,7 +1225,7 @@ static char* getFonts (const char* pCommand) aChildren.push_back(std::make_pair("", aChild)); nSizeCount++; } - aValues.add_child(rInfo.GetName().toUtf8().getStr(), aChildren); + aValues.add_child(rFontMetric.GetName().toUtf8().getStr(), aChildren); } } aTree.add_child("commandValues", aValues); @@ -1529,8 +1529,8 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, sal_uInt16 nFontCount = pList->GetFontNameCount(); for (sal_uInt16 i = 0; i < nFontCount; ++i) { - const FontMetric& rInfo = pList->GetFontName(i); - OUString aFontName = rInfo.GetName(); + const FontMetric& rFontMetric = pList->GetFontName(i); + OUString aFontName = rFontMetric.GetName(); if (!aSearchedFontName.equals(aFontName.toUtf8().getStr())) continue; @@ -1538,7 +1538,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, VclPtr<VirtualDevice>::Create( nullptr, Size(1, 1), DeviceFormat::DEFAULT)); ::Rectangle aRect; - vcl::Font aFont(rInfo); + vcl::Font aFont(rFontMetric); aFont.SetSize(Size(0, 25)); aDevice->SetFont(aFont); aDevice->GetTextBoundRect(aRect, aFontName); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index b9ed6d8e187d..d28c562fb196 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1213,8 +1213,8 @@ 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 ); - FontMetric aFontInfo = pFontList->Get( pFontItem->GetFamilyName(), pFontItem->GetStyleName() ); - const sal_IntPtr* pAry = pFontList->GetSizeAry( aFontInfo ); + FontMetric aFontMetric = pFontList->Get( pFontItem->GetFamilyName(), pFontItem->GetStyleName() ); + const sal_IntPtr* pAry = pFontList->GetSizeAry( aFontMetric ); if( bGrow ) { diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 705cdbd02042..3fdcbbbbf8bb 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -152,13 +152,13 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r if ( !pFontList ) pFontList.reset(new FontList( Application::GetDefaultDevice() )); - FontMetric aFntInfo = pFontList->Get( m_aFontDescriptor.Name, m_aFontDescriptor.StyleName ); + FontMetric aFontMetric = pFontList->Get( m_aFontDescriptor.Name, m_aFontDescriptor.StyleName ); // setup font size array delete m_pHeightArray; const sal_IntPtr* pTempAry; - const sal_IntPtr* pAry = pFontList->GetSizeAry( aFntInfo ); + const sal_IntPtr* pAry = pFontList->GetSizeAry( aFontMetric ); sal_uInt16 nSizeCount = 0; while ( pAry[nSizeCount] ) nSizeCount++; diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 0be5c42bc731..cf38dc3eae75 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -462,7 +462,7 @@ public: void Reformat() override; void Modify() override; - void Fill( const FontMetric* pInfo, const FontList* pList ); + void Fill( const FontMetric* pFontMetric, 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 3c5449fb9370..993287f7b401 100644 --- a/include/svtools/ctrltool.hxx +++ b/include/svtools/ctrltool.hxx @@ -73,14 +73,14 @@ With sal_False vectorized and scalable fonts will be queried. -------------------------------------------------------------------------- -String FontList::GetStyleName( const FontMetric& rInfo ) const; +String FontList::GetStyleName( const FontMetric& rFontMetric ) const; 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 FontMetric& rInfo ) const; +OUString FontList::GetFontMapText( const FontMetric& rFontMetric ) 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. @@ -116,7 +116,7 @@ FontList::GetStyleName() -------------------------------------------------------------------------- -const sal_IntPtr* FontList::GetSizeAry( const FontMetric& rInfo ) const; +const sal_IntPtr* FontList::GetSizeAry( const FontMetric& rFontMetric ) const; This method returns the available sizes for the given font. If it is a scalable font, standard sizes are returned. @@ -166,14 +166,14 @@ public: FontList* Clone() const; - OUString GetFontMapText( const FontMetric& rInfo ) const; + OUString GetFontMapText( const FontMetric& rFontMetric ) 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 FontMetric& rInfo ) const; + OUString GetStyleName( const FontMetric& rFontMetric ) const; FontMetric Get( const OUString& rName, const OUString& rStyleName ) const; @@ -191,7 +191,7 @@ public: static sal_Handle GetNextFontMetric( sal_Handle hFontMetric ); static const FontMetric& GetFontMetric( sal_Handle hFontMetric ); - const sal_IntPtr* GetSizeAry( const FontMetric& rInfo ) const; + const sal_IntPtr* GetSizeAry( const FontMetric& rFontMetric ) const; static const sal_IntPtr* GetStdSizeAry() { return aStdSizeAry; } private: diff --git a/include/svtools/stdmenu.hxx b/include/svtools/stdmenu.hxx index 299d2e2c3bd6..993ff955c06b 100644 --- a/include/svtools/stdmenu.hxx +++ b/include/svtools/stdmenu.hxx @@ -132,7 +132,7 @@ public: virtual void Select() override; virtual void Highlight() override; - void Fill( const FontMetric& rInfo, const FontList* pList ); + void Fill( const FontMetric& rFontMetric, const FontList* pList ); void SetCurHeight( long nHeight ); long GetCurHeight() const { return mnCurHeight; } diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index cf0b62179fb3..043852373df8 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1249,7 +1249,7 @@ private: public: - FontMetric 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 a179192a09ae..8299b9dcfea1 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -740,11 +740,11 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico aParaText = "&\"" + OUString(aNewData.maName); if( pFontList ) { - FontMetric aFontInfo( pFontList->Get( + FontMetric aFontMetric( pFontList->Get( aNewData.maName, (aNewData.mnWeight > EXC_FONTWGHT_NORMAL) ? WEIGHT_BOLD : WEIGHT_NORMAL, aNewData.mbItalic ? ITALIC_NORMAL : ITALIC_NONE ) ); - aNewData.maStyle = pFontList->GetStyleName( aFontInfo ); + aNewData.maStyle = pFontList->GetStyleName( aFontMetric ); if( !aNewData.maStyle.isEmpty() ) aParaText += "," + aNewData.maStyle; } diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 2bac32676951..ad99a0286fb3 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -207,9 +207,9 @@ void XclImpFont::SetFontData( const XclFontData& rFontData, bool bHasCharSet ) { if( const FontList* pFontList = pInfoItem->GetFontList() ) { - FontMetric aFontInfo( pFontList->Get( maData.maName, maData.maStyle ) ); - maData.SetScWeight( aFontInfo.GetWeight() ); - maData.SetScPosture( aFontInfo.GetItalic() ); + FontMetric aFontMetric( pFontList->Get( maData.maName, maData.maStyle ) ); + maData.SetScWeight( aFontMetric.GetWeight() ); + maData.SetScPosture( aFontMetric.GetItalic() ); } } } diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 8f5d53d49165..0a4ebfbba4ab 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -2327,13 +2327,13 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox, void SmSymDefineDialog::SetFont(const OUString &rFontName, const OUString &rStyleName) { // get Font (FontInfo) matching name and style - FontMetric aFI; + FontMetric aFontMetric; if (pFontList) - aFI = pFontList->Get(rFontName, WEIGHT_NORMAL, ITALIC_NONE); - SetFontStyle(rStyleName, aFI); + aFontMetric = pFontList->Get(rFontName, WEIGHT_NORMAL, ITALIC_NONE); + SetFontStyle(rStyleName, aFontMetric); - pCharsetDisplay->SetFont(aFI); - pSymbolDisplay->SetFont(aFI); + pCharsetDisplay->SetFont(aFontMetric); + pSymbolDisplay->SetFont(aFontMetric); // update subset listbox for new font's unicode subsets FontCharMapPtr pFontCharMap; diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index ee619c26b247..74d3f5b2b529 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1117,7 +1117,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) { assert( mpFontList ); - FontMetric& rInfo = (*mpFontList)[ rUDEvt.GetItemId() ]; + FontMetric& rFontMetric = (*mpFontList)[ rUDEvt.GetItemId() ]; Point aTopLeft = rUDEvt.GetRect().TopLeft(); long nX = aTopLeft.X(); long nH = rUDEvt.GetRect().GetHeight(); @@ -1126,14 +1126,14 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) { nX += IMGOUTERTEXTSPACE; - const bool bSymbolFont = isSymbolFont(rInfo); + const bool bSymbolFont = isSymbolFont(rFontMetric); vcl::RenderContext* pRenderContext = rUDEvt.GetRenderContext(); Color aTextColor = pRenderContext->GetTextColor(); vcl::Font aOldFont(pRenderContext->GetFont()); Size aSize( aOldFont.GetSize() ); aSize.Height() += EXTRAFONTSIZE; - vcl::Font aFont( rInfo ); + vcl::Font aFont( rFontMetric ); aFont.SetSize( aSize ); pRenderContext->SetFont(aFont); pRenderContext->SetTextColor(aTextColor); @@ -1142,7 +1142,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) Rectangle aTextRect; // Preview the font name - OUString sFontName = rInfo.GetName(); + OUString sFontName = rFontMetric.GetName(); //If it shouldn't or can't draw its own name because it doesn't have the glyphs if (!canRenderNameOfSelectedFont(*pRenderContext)) @@ -1173,7 +1173,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) if (!bSymbolFont) { - const bool bNameBeginsWithLatinText = rInfo.GetName()[0] <= 'z'; + const bool bNameBeginsWithLatinText = rFontMetric.GetName()[0] <= 'z'; if (bNameBeginsWithLatinText || !bUsingCorrectFont) sSampleText = makeShortRepresentativeTextForSelectedFont(*pRenderContext); @@ -1396,14 +1396,14 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList ) bool bBold = false; bool bBoldItalic = false; bool bInsert = false; - FontMetric aInfo; + FontMetric aFontMetric; while ( hFontMetric ) { - aInfo = FontList::GetFontMetric( hFontMetric ); + aFontMetric = FontList::GetFontMetric( hFontMetric ); - FontWeight eWeight = aInfo.GetWeight(); - FontItalic eItalic = aInfo.GetItalic(); - FontWidth eWidth = aInfo.GetWidthType(); + FontWeight eWeight = aFontMetric.GetWeight(); + FontItalic eItalic = aFontMetric.GetItalic(); + FontWidth eWidth = aFontMetric.GetWidthType(); // Only if the attributes are different, we insert the // Font to avoid double Entries in different languages if ( (eWeight != eLastWeight) || (eItalic != eLastItalic) || @@ -1428,7 +1428,7 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList ) } // For wrong StyleNames we replace this with the correct once - aStyleText = pList->GetStyleName( aInfo ); + aStyleText = pList->GetStyleName( aFontMetric ); bInsert = GetEntryPos( aStyleText ) == LISTBOX_ENTRY_NOTFOUND; if ( !bInsert ) { @@ -1449,7 +1449,7 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList ) const OUString& rAttrStyleText = pList->GetStyleName( eWeight, eItalic ); if (rAttrStyleText != aStyleText) { - OUString aTempStyleText = pList->GetStyleName( aInfo ); + OUString aTempStyleText = pList->GetStyleName( aFontMetric ); if (rAttrStyleText == aTempStyleText) aStyleText = rAttrStyleText; bInsert = GetEntryPos( aStyleText ) == LISTBOX_ENTRY_NOTFOUND; @@ -1616,7 +1616,7 @@ void FontSizeBox::Modify() } } -void FontSizeBox::Fill( const FontMetric* pInfo, const FontList* pList ) +void FontSizeBox::Fill( const FontMetric* pFontMetric, const FontList* pList ) { // remember for relative mode pFontList = pList; @@ -1629,10 +1629,10 @@ void FontSizeBox::Fill( const FontMetric* pInfo, const FontList* pList ) const sal_IntPtr* pTempAry; const sal_IntPtr* pAry = nullptr; - if( pInfo ) + if( pFontMetric ) { - aFontMetric = *pInfo; - pAry = pList->GetSizeAry( *pInfo ); + aFontMetric = *pFontMetric; + pAry = pList->GetSizeAry( *pFontMetric ); } else { diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 770dc57d6549..55eb7ba54d92 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -125,7 +125,7 @@ void FontSizeMenu::Highlight() { } -void FontSizeMenu::Fill( const FontMetric& rInfo, const FontList* pList ) +void FontSizeMenu::Fill( const FontMetric& rFontMetric, const FontList* pList ) { Clear(); @@ -134,7 +134,7 @@ void FontSizeMenu::Fill( const FontMetric& rInfo, const FontList* pList ) delete[] mpHeightAry; const sal_IntPtr* pTempAry; - const sal_IntPtr* pAry = pList->GetSizeAry( rInfo ); + const sal_IntPtr* pAry = pList->GetSizeAry( rFontMetric ); sal_uInt16 nSizeCount = 0; while ( pAry[nSizeCount] ) nSizeCount++; diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx index 5dfff7a2b6c2..cb5a7bf2033a 100644 --- a/svx/source/mnuctrls/fntszctl.cxx +++ b/svx/source/mnuctrls/fntszctl.cxx @@ -122,9 +122,9 @@ void SvxFontSizeMenuControl::StateChanged( if ( pList ) { - FontMetric aFntInf = pList->Get( pItem->GetFamilyName(), + FontMetric aFontMetric = pList->Get( pItem->GetFamilyName(), pItem->GetStyleName() ); - pMenu->Fill( aFntInf, pList ); + pMenu->Fill( aFontMetric, pList ); } // else manche Shells haben keine Fontliste (z.B. Image) } diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index dff849cb43c1..1052a825de8a 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -1736,8 +1736,8 @@ bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 } if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) ) { - FontMetric aInfo = pList->Get(pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE); - vcl::Font aFont(aInfo); + FontMetric aFontMetric = pList->Get(pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE); + vcl::Font aFont(aFontMetric); aFmt.SetBulletFont(&aFont); } else diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 340bd842d097..7d8daf348c37 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1140,15 +1140,15 @@ void SvxFontNameBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) fontName = GetEntry(rUDEvt.GetItemId()); } Sequence< PropertyValue > aArgs( 1 ); - FontMetric aInfo( pFontList->Get( fontName, + FontMetric aFontMetric( pFontList->Get( fontName, aCurFont.GetWeight(), aCurFont.GetItalic() ) ); - SvxFontItem aFontItem( aInfo.GetFamily(), - aInfo.GetName(), - aInfo.GetStyleName(), - aInfo.GetPitch(), - aInfo.GetCharSet(), + SvxFontItem aFontItem( aFontMetric.GetFamily(), + aFontMetric.GetName(), + aFontMetric.GetStyleName(), + aFontMetric.GetPitch(), + aFontMetric.GetCharSet(), SID_ATTR_CHAR_FONT ); aFontItem.QueryValue( aArgs[0].Value ); aArgs[0].Name = "CharPreviewFontName"; @@ -1166,16 +1166,16 @@ void SvxFontNameBox_Impl::Select() std::unique_ptr<SvxFontItem> pFontItem; if ( pFontList ) { - FontMetric aInfo( pFontList->Get( GetText(), + FontMetric aFontMetric( pFontList->Get( GetText(), aCurFont.GetWeight(), aCurFont.GetItalic() ) ); - aCurFont = aInfo; + aCurFont = aFontMetric; - pFontItem.reset( new SvxFontItem( aInfo.GetFamily(), - aInfo.GetName(), - aInfo.GetStyleName(), - aInfo.GetPitch(), - aInfo.GetCharSet(), + pFontItem.reset( new SvxFontItem( aFontMetric.GetFamily(), + aFontMetric.GetName(), + aFontMetric.GetStyleName(), + aFontMetric.GetPitch(), + aFontMetric.GetCharSet(), SID_ATTR_CHAR_FONT ) ); Any a; diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index f749f317c5f3..5e51c2e66291 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -195,11 +195,11 @@ void SvxFontSizeBox_Impl::UpdateFont( const css::awt::FontDescriptor& rCurrentFo if ( !rCurrentFont.Name.isEmpty() ) { - FontMetric _aFontInfo; - _aFontInfo.SetName( rCurrentFont.Name ); - _aFontInfo.SetStyleName( rCurrentFont.StyleName ); - _aFontInfo.SetHeight( rCurrentFont.Height ); - Fill( &_aFontInfo, _pFontList ); + FontMetric _aFontMetric; + _aFontMetric.SetName( rCurrentFont.Name ); + _aFontMetric.SetStyleName( rCurrentFont.StyleName ); + _aFontMetric.SetHeight( rCurrentFont.Height ); + Fill( &_aFontMetric, _pFontList ); } else { diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 1bcb2fa61a6f..41904cebfdbb 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -824,9 +824,9 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam) ->GetItem( SID_ATTR_CHAR_FONTLIST )); const FontList* pList = pFontListItem->GetFontList(); - FontMetric aInfo = pList->Get( + FontMetric aFontMetric = pList->Get( pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE); - vcl::Font aFont(aInfo); + vcl::Font aFont(aFontMetric); aFormat.SetBulletFont(&aFont); } aRule.Set( i, aFormat ); diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 7f51bbc4ac00..39589aad681e 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -828,29 +828,29 @@ void SwXLineNumberingProperties::setPropertyValue( { if ( pEntry->nFlags & PropertyAttribute::READONLY) throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - SwLineNumberInfo aInfo(pDoc->GetLineNumberInfo()); + SwLineNumberInfo aFontMetric(pDoc->GetLineNumberInfo()); switch(pEntry->nWID) { case WID_NUM_ON: { bool bVal = *static_cast<sal_Bool const *>(aValue.getValue()); - aInfo.SetPaintLineNumbers(bVal); + aFontMetric.SetPaintLineNumbers(bVal); } break; case WID_CHARACTER_STYLE : { SwCharFormat* pFormat = lcl_getCharFormat(pDoc, aValue); if(pFormat) - aInfo.SetCharFormat(pFormat); + aFontMetric.SetCharFormat(pFormat); } break; case WID_NUMBERING_TYPE : { - SvxNumberType aNumType(aInfo.GetNumType()); + SvxNumberType aNumType(aFontMetric.GetNumType()); sal_Int16 nTmp = 0; aValue >>= nTmp; aNumType.SetNumberingType(nTmp); - aInfo.SetNumType(aNumType); + aFontMetric.SetNumType(aNumType); } break; case WID_NUMBER_POSITION : @@ -860,16 +860,16 @@ void SwXLineNumberingProperties::setPropertyValue( switch(nTmp) { case style::LineNumberPosition::LEFT: - aInfo.SetPos(LINENUMBER_POS_LEFT); ; + aFontMetric.SetPos(LINENUMBER_POS_LEFT); ; break; case style::LineNumberPosition::RIGHT : - aInfo.SetPos(LINENUMBER_POS_RIGHT); ; + aFontMetric.SetPos(LINENUMBER_POS_RIGHT); ; break; case style::LineNumberPosition::INSIDE: - aInfo.SetPos(LINENUMBER_POS_INSIDE); ; + aFontMetric.SetPos(LINENUMBER_POS_INSIDE); ; break; case style::LineNumberPosition::OUTSIDE: - aInfo.SetPos(LINENUMBER_POS_OUTSIDE); + aFontMetric.SetPos(LINENUMBER_POS_OUTSIDE); break; } } @@ -881,7 +881,7 @@ void SwXLineNumberingProperties::setPropertyValue( sal_Int32 nTmp = convertMm100ToTwip(nVal); if (nTmp > USHRT_MAX) nTmp = USHRT_MAX; - aInfo.SetPosFromLeft( static_cast< sal_uInt16 >(nTmp) ); + aFontMetric.SetPosFromLeft( static_cast< sal_uInt16 >(nTmp) ); } break; case WID_INTERVAL : @@ -889,14 +889,14 @@ void SwXLineNumberingProperties::setPropertyValue( sal_Int16 nTmp = 0; aValue >>= nTmp; if( nTmp > 0) - aInfo.SetCountBy(nTmp); + aFontMetric.SetCountBy(nTmp); } break; case WID_SEPARATOR_TEXT : { OUString uTmp; aValue >>= uTmp; - aInfo.SetDivider(uTmp); + aFontMetric.SetDivider(uTmp); } break; case WID_SEPARATOR_INTERVAL: @@ -904,29 +904,29 @@ void SwXLineNumberingProperties::setPropertyValue( sal_Int16 nTmp = 0; aValue >>= nTmp; if( nTmp >= 0) - aInfo.SetDividerCountBy(nTmp); + aFontMetric.SetDividerCountBy(nTmp); } break; case WID_COUNT_EMPTY_LINES : { bool bVal = *static_cast<sal_Bool const *>(aValue.getValue()); - aInfo.SetCountBlankLines(bVal); + aFontMetric.SetCountBlankLines(bVal); } break; case WID_COUNT_LINES_IN_FRAMES : { bool bVal = *static_cast<sal_Bool const *>(aValue.getValue()); - aInfo.SetCountInFlys(bVal); + aFontMetric.SetCountInFlys(bVal); } break; case WID_RESTART_AT_EACH_PAGE : { bool bVal = *static_cast<sal_Bool const *>(aValue.getValue()); - aInfo.SetRestartEachPage(bVal); + aFontMetric.SetRestartEachPage(bVal); } break; } - pDoc->SetLineNumberInfo(aInfo); + pDoc->SetLineNumberInfo(aFontMetric); } else throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); @@ -1929,9 +1929,9 @@ void SwXNumberingRules::SetPropertiesToNumFormat( static_cast<const SvxFontListItem* >(pLclDocShell ->GetItem( SID_ATTR_CHAR_FONTLIST )); const FontList* pList = pFontListItem->GetFontList(); - FontMetric aInfo = pList->Get( + FontMetric aFontMetric = pList->Get( sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE); - vcl::Font aFont(aInfo); + vcl::Font aFont(aFontMetric); aFormat.SetBulletFont(&aFont); } else if (pBulletFontName) diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 87da652ca6c4..6ced44aed257 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1657,9 +1657,9 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, static_cast<const SvxFontListItem*>(pDoc->GetDocShell() ->GetItem( SID_ATTR_CHAR_FONTLIST )); const FontList* pList = pFontListItem->GetFontList(); - FontMetric aInfo = pList->Get( + FontMetric aFontMetric = pList->Get( pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE); - vcl::Font aFont(aInfo); + vcl::Font aFont(aFontMetric); aFormat.SetBulletFont(&aFont); } aSetRule.Set( i, &aFormat ); diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 3113fcc96118..c14956fa11db 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -1091,11 +1091,11 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr, sal_Handle hFont = pFList->GetFirstFontMetric( aIdent ); if( nullptr != hFont ) { - const FontMetric& rFInfo = FontList::GetFontMetric( hFont ); - if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() ) + const FontMetric& rFMetric = FontList::GetFontMetric( hFont ); + if( RTL_TEXTENCODING_DONTKNOW != rFMetric.GetCharSet() ) { bFound = true; - if( RTL_TEXTENCODING_SYMBOL == rFInfo.GetCharSet() ) + if( RTL_TEXTENCODING_SYMBOL == rFMetric.GetCharSet() ) eEnc = RTL_TEXTENCODING_SYMBOL; } } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 14c0616bffca..6b168eceb677 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -3793,11 +3793,11 @@ void SwHTMLParser::NewFontAttr( int nToken ) sal_Handle hFont = pFList->GetFirstFontMetric( aFName ); if( nullptr != hFont ) { - const FontMetric& rFInfo = FontList::GetFontMetric( hFont ); - if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() ) + const FontMetric& rFMetric = FontList::GetFontMetric( hFont ); + if( RTL_TEXTENCODING_DONTKNOW != rFMetric.GetCharSet() ) { bFound = true; - if( RTL_TEXTENCODING_SYMBOL == rFInfo.GetCharSet() ) + if( RTL_TEXTENCODING_SYMBOL == rFMetric.GetCharSet() ) eEnc = RTL_TEXTENCODING_SYMBOL; } } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 6fb20a738e75..e3eecbd256d8 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -828,8 +828,8 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) int nFontNames = m_pPrt->GetDevFontCount(); for( int i = 0; i < nFontNames; i++ ) { - FontMetric aInf( m_pPrt->GetDevFont( i ) ); - aFontNames.insert( aInf.GetName() ); + FontMetric aFontMetric( m_pPrt->GetDevFont( i ) ); + aFontNames.insert( aFontMetric.GetName() ); } // insert to listboxes @@ -944,16 +944,16 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) m_pLabelBox->SetText(sCapBackup ); m_pIdxBox->SetText(sIdxBackup ); - 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 ); - aFontInfo = m_pFontList->Get(sListBackup,sListBackup); - m_pListHeightLB->Fill( &aFontInfo, m_pFontList ); - aFontInfo = m_pFontList->Get(sCapBackup, sCapBackup ); - m_pLabelHeightLB->Fill( &aFontInfo, m_pFontList ); - aFontInfo = m_pFontList->Get(sIdxBackup, sIdxBackup ); - m_pIndexHeightLB->Fill( &aFontInfo, m_pFontList ); + FontMetric aFontMetric( m_pFontList->Get(sStdBackup, sStdBackup) ); + m_pStandardHeightLB->Fill( &aFontMetric, m_pFontList ); + aFontMetric = m_pFontList->Get(sOutBackup, sOutBackup ); + m_pTitleHeightLB->Fill( &aFontMetric, m_pFontList ); + aFontMetric = m_pFontList->Get(sListBackup,sListBackup); + m_pListHeightLB->Fill( &aFontMetric, m_pFontList ); + aFontMetric = m_pFontList->Get(sCapBackup, sCapBackup ); + m_pLabelHeightLB->Fill( &aFontMetric, m_pFontList ); + aFontMetric = m_pFontList->Get(sIdxBackup, sIdxBackup ); + m_pIndexHeightLB->Fill( &aFontMetric, m_pFontList ); m_pStandardHeightLB->SetValue( CalcToPoint( nStandardHeight, SFX_MAPUNIT_TWIP, 10 ) ); m_pTitleHeightLB-> SetValue( CalcToPoint( nTitleHeight , SFX_MAPUNIT_TWIP, 10 ) ); @@ -1083,8 +1083,8 @@ IMPL_LINK_TYPED( SwStdFontTabPage, LoseFocusHdl, Control&, rControl, void ) { pHeightLB = m_pIndexHeightLB; } - FontMetric aFontInfo( m_pFontList->Get(sEntry, sEntry) ); - pHeightLB->Fill( &aFontInfo, m_pFontList ); + FontMetric aFontMetric( m_pFontList->Get(sEntry, sEntry) ); + pHeightLB->Fill( &aFontMetric, m_pFontList ); } void SwStdFontTabPage::PageCreated( const SfxAllItemSet& aSet) diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index b7f85947641e..b0ee67ead375 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -190,8 +190,8 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh, int nFontNames = pPrt->GetDevFontCount(); for( int i = 0; i < nFontNames; i++ ) { - FontMetric aInf( pPrt->GetDevFont( i ) ); - aFontNames.insert( aInf.GetName() ); + FontMetric aFontMetric( pPrt->GetDevFont( i ) ); + aFontNames.insert( aFontMetric.GetName() ); } // insert into listbox diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 6f961c2073a2..3a06617af7fa 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -988,10 +988,10 @@ void SwSrcEditWindow::SetFont() const SvxFontListItem* pFontListItem = static_cast<const SvxFontListItem* >(pSrcView->GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST )); const FontList* pList = pFontListItem->GetFontList(); - FontMetric aInfo = pList->Get(sFontName,WEIGHT_NORMAL, ITALIC_NONE); + FontMetric aFontMetric = pList->Get(sFontName,WEIGHT_NORMAL, ITALIC_NONE); const vcl::Font& rFont = GetTextEngine()->GetFont(); - vcl::Font aFont(aInfo); + vcl::Font aFont(aFontMetric); Size aSize(rFont.GetSize()); //font height is stored in point and set in twip aSize.Height() = diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index f5c9399c83e3..1a9d05fbdb8a 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -72,10 +72,10 @@ FontMetric::FontMetric() : mpImplMetric( new ImplFontMetric ) {} -FontMetric::FontMetric( const FontMetric& rInfo ) -: Font( rInfo ) +FontMetric::FontMetric( const FontMetric& rFontMetric ) +: Font( rFontMetric ) { - mpImplMetric = rInfo.mpImplMetric; + mpImplMetric = rFontMetric.mpImplMetric; mpImplMetric->AddReference(); } @@ -84,27 +84,27 @@ FontMetric::~FontMetric() mpImplMetric->DeReference(); } -FontMetric& FontMetric::operator=( const FontMetric& rInfo ) +FontMetric& FontMetric::operator=( const FontMetric& rFontMetric ) { - Font::operator=( rInfo ); + Font::operator=( rFontMetric ); - if( mpImplMetric != rInfo.mpImplMetric ) + if( mpImplMetric != rFontMetric.mpImplMetric ) { mpImplMetric->DeReference(); - mpImplMetric = rInfo.mpImplMetric; + mpImplMetric = rFontMetric.mpImplMetric; mpImplMetric->AddReference(); } return *this; } -bool FontMetric::operator==( const FontMetric& rInfo ) const +bool FontMetric::operator==( const FontMetric& rFontMetric ) const { - if( !Font::operator==( rInfo ) ) + if( !Font::operator==( rFontMetric ) ) return false; - if( mpImplMetric == rInfo.mpImplMetric ) + if( mpImplMetric == rFontMetric.mpImplMetric ) return true; - if( *mpImplMetric == *rInfo.mpImplMetric ) + if( *mpImplMetric == *rFontMetric.mpImplMetric ) return true; return false; } diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index a48926f0d291..f328a4f7e64b 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -64,7 +64,7 @@ using namespace ::utl; FontMetric OutputDevice::GetDevFont( int nDevFontIndex ) const { - FontMetric aFontInfo; + FontMetric aFontMetric; ImplInitFontList(); @@ -72,21 +72,21 @@ FontMetric OutputDevice::GetDevFont( int nDevFontIndex ) const if( nDevFontIndex < nCount ) { const PhysicalFontFace& rData = *mpDeviceFontList->Get( nDevFontIndex ); - aFontInfo.SetName( rData.GetFamilyName() ); - aFontInfo.SetStyleName( rData.GetStyleName() ); - aFontInfo.SetCharSet( rData.IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); - aFontInfo.SetFamily( rData.GetFamilyType() ); - aFontInfo.SetPitch( rData.GetPitch() ); - aFontInfo.SetWeight( rData.GetWeight() ); - aFontInfo.SetItalic( rData.GetSlantType() ); - aFontInfo.SetWidthType( rData.GetWidthType() ); + aFontMetric.SetName( rData.GetFamilyName() ); + aFontMetric.SetStyleName( rData.GetStyleName() ); + aFontMetric.SetCharSet( rData.IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); + aFontMetric.SetFamily( rData.GetFamilyType() ); + aFontMetric.SetPitch( rData.GetPitch() ); + aFontMetric.SetWeight( rData.GetWeight() ); + aFontMetric.SetItalic( rData.GetSlantType() ); + aFontMetric.SetWidthType( rData.GetWidthType() ); if( rData.IsScalable() ) - aFontInfo.mpImplMetric->mnMiscFlags |= ImplFontMetric::SCALABLE_FLAG; + aFontMetric.mpImplMetric->mnMiscFlags |= ImplFontMetric::SCALABLE_FLAG; if( rData.IsBuiltInFont() ) - aFontInfo.mpImplMetric->mnMiscFlags |= ImplFontMetric::DEVICE_FLAG; + aFontMetric.mpImplMetric->mnMiscFlags |= ImplFontMetric::DEVICE_FLAG; } - return aFontInfo; + return aFontMetric; } int OutputDevice::GetDevFontCount() const |