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 /svtools | |
parent | loplugin:stringconstant (diff) | |
download | core-7eab7f3485e525635f06a505776618c30e442a26.tar.gz core-7eab7f3485e525635f06a505776618c30e442a26.zip |
Cleanup after removing vcl::FontInfo class
Change-Id: I544eac439cb7277e47a23a90c6fbc45496161c3b
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 32 | ||||
-rw-r--r-- | svtools/source/control/stdmenu.cxx | 4 |
2 files changed, 18 insertions, 18 deletions
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++; |