diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-16 10:09:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-18 08:54:37 +0200 |
commit | 60e78fbb806bb45e635ba1de45ceffe187938ac0 (patch) | |
tree | 17ff5aaa57f4d23e177f1fe423def1691139a4a8 /svtools | |
parent | 9c818268767d6a1c1bc731ae30c45883bab987e7 (diff) |
fdo#82577: Handle Font
Put the VCL Font class in the vcl namespace. Avoids clash with the X11
Font typedef.
Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
Diffstat (limited to 'svtools')
22 files changed, 79 insertions, 80 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index bde475f1f792..e2427b012e91 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -211,7 +211,7 @@ void BrowseBox::SetRealRowCount( const OUString &rRealRowCount ) -void BrowseBox::SetFont( const Font& rNewFont ) +void BrowseBox::SetFont( const vcl::Font& rNewFont ) { pDataWin->SetFont( rNewFont ); ImpGetDataRowHeight(); diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index d10fe3aeab56..7f0b0a85d0f8 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -723,7 +723,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, // we want to have two pixels frame ... return; - Font aFont = GetDataWindow().GetDrawPixelFont( pDev ); + vcl::Font aFont = GetDataWindow().GetDrawPixelFont( pDev ); // the 'normal' painting uses always the data window as device to output to, so we have to calc the new font // relative to the data wins current settings diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 7873b5e8b59b..396b40ce4d48 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -63,7 +63,7 @@ void ButtonFrame::Draw( OutputDevice& rDev ) { OUString aVal = rDev.GetEllipsisString(aText,aInnerRect.GetWidth() - 2*MIN_COLUMNWIDTH); - Font aFont( rDev.GetFont() ); + vcl::Font aFont( rDev.GetFont() ); bool bOldTransp = aFont.IsTransparent(); if ( !bOldTransp ) { @@ -250,7 +250,7 @@ void InitSettings_Impl( Window *pWin, if ( bFont ) { - Font aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); if ( pWin->IsControlFont() ) aFont.Merge( pWin->GetControlFont() ); pWin->SetZoomedPointFont( aFont ); diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index e14cf4ccf904..59e33c69f9b8 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -818,7 +818,7 @@ namespace svt if (bFont) { - Font aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); if (IsControlFont()) { GetDataWindow().SetControlFont(GetControlFont()); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index adc522973a67..44eadff34deb 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -1756,7 +1756,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P bool bDropTarget = pEntry->IsDropTarget(); bool bNoEmphasis = pEntry->IsBlockingEmphasis(); - Font aTempFont( pOut->GetFont() ); + vcl::Font aTempFont( pOut->GetFont() ); // AutoFontColor /* @@ -1782,7 +1782,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P if ( bShowSelection ) { const StyleSettings& rSettings = pOut->GetSettings().GetStyleSettings(); - Font aNewFont( aTempFont ); + vcl::Font aNewFont( aTempFont ); // font fill colors that are attributed "hard" need corresponding "hard" // attributed highlight colors @@ -3290,7 +3290,7 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo bAlreadyInCallback( false ), bGrabFocus( false ) { - Font aFont( pParent->GetPointFont() ); + vcl::Font aFont( pParent->GetPointFont() ); aFont.SetTransparent( false ); SetControlFont( aFont ); if( !pParent->HasFontFillColor() ) @@ -3424,8 +3424,8 @@ void SvxIconChoiceCtrl_Impl::InitSettings() if( !pView->HasFont() ) { // unit (from settings) is Point - Font aFont( rStyleSettings.GetFieldFont() ); - //const Font& rFont = pView->GetFont(); + vcl::Font aFont( rStyleSettings.GetFieldFont() ); + //const vcl::Font& rFont = pView->GetFont(); //if( pView->HasFontTextColor() ) aFont.SetColor( rStyleSettings.GetWindowTextColor() ); //if( pView->HasFontFillColor() ) diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 7fd923f556b1..0689d688b0f8 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -240,7 +240,7 @@ void SvtIconChoiceCtrl::LoseFocus() Control::LoseFocus(); } -void SvtIconChoiceCtrl::SetFont( const Font& rFont ) +void SvtIconChoiceCtrl::SetFont( const vcl::Font& rFont ) { if( rFont != GetFont() ) { @@ -249,7 +249,7 @@ void SvtIconChoiceCtrl::SetFont( const Font& rFont ) } } -void SvtIconChoiceCtrl::SetPointFont( const Font& rFont ) +void SvtIconChoiceCtrl::SetPointFont( const vcl::Font& rFont ) { if( rFont != GetPointFont() ) { @@ -419,7 +419,7 @@ void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper ) // If text colors are attributed "hard," don't use automatism to select // a readable text color. - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetColor( rStyleSettings.GetFieldTextColor() ); SetFont( aFont ); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 29956ca9d09b..2e19444c95bd 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -135,7 +135,7 @@ SvInplaceEdit2::SvInplaceEdit2 else pEdit = new MyEdit_Impl( pParent, this ); - Font aFont( pParent->GetFont() ); + vcl::Font aFont( pParent->GetFont() ); aFont.SetTransparent( false ); Color aColor( pParent->GetBackground().GetColor() ); aFont.SetFillColor(aColor ); @@ -2288,7 +2288,7 @@ short SvTreeListBox::GetHeightOffset(const Image& rBmp, Size& aSizeLogic ) return nOffset; } -short SvTreeListBox::GetHeightOffset(const Font& /* rFont */, Size& aSizeLogic ) +short SvTreeListBox::GetHeightOffset(const vcl::Font& /* rFont */, Size& aSizeLogic ) { short nOffset = 0; aSizeLogic = Size(GetTextWidth(OUString('X')), GetTextHeight()); @@ -2347,7 +2347,7 @@ void SvTreeListBox::AdjustEntryHeight( const Image& rBmp ) } } -void SvTreeListBox::AdjustEntryHeight( const Font& rFont ) +void SvTreeListBox::AdjustEntryHeight( const vcl::Font& rFont ) { Size aSize; GetHeightOffset( rFont, aSize ); @@ -2527,11 +2527,10 @@ void SvTreeListBox::SetExpandedNodeBmp( const Image& rBmp ) } -void SvTreeListBox::SetFont( const Font& rFont ) +void SvTreeListBox::SetFont( const vcl::Font& rFont ) { - - Font aTempFont( rFont ); - Font aOrigFont( GetFont() ); + vcl::Font aTempFont( rFont ); + vcl::Font aOrigFont( GetFont() ); aTempFont.SetTransparent( true ); if (aTempFont == aOrigFont) return; @@ -2547,7 +2546,7 @@ void SvTreeListBox::SetFont( const Font& rFont ) AdjustEntryHeightAndRecalc( GetFont() ); } -void SvTreeListBox::AdjustEntryHeightAndRecalc( const Font& rFont ) +void SvTreeListBox::AdjustEntryHeightAndRecalc( const vcl::Font& rFont ) { AdjustEntryHeight( rFont ); // always invalidate, else things go wrong in SetEntryHeight @@ -2898,7 +2897,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT long nMaxRight = nWidth + aEntryPos.X() - 1; Color aBackupTextColor( GetTextColor() ); - Font aBackupFont( GetFont() ); + vcl::Font aBackupFont( GetFont() ); Color aBackupColor = GetFillColor(); bool bCurFontIsSel = false; @@ -2909,7 +2908,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT const bool bHideSelection = (nWindowStyle & WB_HIDESELECTION) !=0 && !HasFocus(); const StyleSettings& rSettings = GetSettings().GetStyleSettings(); - Font aHighlightFont( GetFont() ); + vcl::Font aHighlightFont( GetFont() ); const Color aHighlightTextColor( rSettings.GetHighlightTextColor() ); aHighlightFont.SetColor( aHighlightTextColor ); @@ -3759,7 +3758,7 @@ void SvTreeListBox::InitSettings(bool bFont, bool bForeground, bool bBackground) const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index b380baf87e48..920a3ccfa85a 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -305,7 +305,7 @@ DayOfWeek Calendar::ImplGetWeekStart() const -void Calendar::ImplGetWeekFont( Font& rFont ) const +void Calendar::ImplGetWeekFont( vcl::Font& rFont ) const { // weeknumber is displayed in WEEKNUMBER_HEIGHT%-Fontheight Size aFontSize = rFont.GetSize(); @@ -331,12 +331,12 @@ void Calendar::ImplFormat() OUString a99Text("99"); - Font aOldFont = GetFont(); + vcl::Font aOldFont = GetFont(); // Wochenanzeige beruecksichtigen if ( mnWinStyle & WB_WEEKNUMBER ) { - Font aTempFont = aOldFont; + vcl::Font aTempFont = aOldFont; ImplGetWeekFont( aTempFont ); SetFont( aTempFont ); mnWeekWidth = GetTextWidth( a99Text )+WEEKNUMBER_OFFX; @@ -347,7 +347,7 @@ void Calendar::ImplFormat() if ( mnWinStyle & WB_BOLDTEXT ) { - Font aFont = aOldFont; + vcl::Font aFont = aOldFont; if ( aFont.GetWeight() < WEIGHT_BOLD ) aFont.SetWeight( WEIGHT_BOLD ); else @@ -941,8 +941,8 @@ void Calendar::ImplDraw( bool bPaint ) else Erase( Rectangle( nDayX-mnWeekWidth-WEEKNUMBER_OFFX, nDeltaY, nDayX-WEEKNUMBER_OFFX-1, nDeltaY+nMonthHeight ) ); - Font aOldFont = GetFont(); - Font aTempFont = aOldFont; + vcl::Font aOldFont = GetFont(); + vcl::Font aTempFont = aOldFont; ImplGetWeekFont( aTempFont ); SetFont( aTempFont ); nDayX -= mnWeekWidth; @@ -2126,14 +2126,14 @@ void Calendar::EndSelection() Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, long nCalcLines ) const { - OUString a99Text("99"); - Font aOldFont = GetFont(); + OUString a99Text("99"); + vcl::Font aOldFont = GetFont(); // take display of week into account long nWeekWidth; if ( mnWinStyle & WB_WEEKNUMBER ) { - Font aTempFont = aOldFont; + vcl::Font aTempFont = aOldFont; ImplGetWeekFont( aTempFont ); ((Calendar*)this)->SetFont( aTempFont ); nWeekWidth = GetTextWidth( a99Text )+WEEKNUMBER_OFFX; @@ -2144,7 +2144,7 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, if ( mnWinStyle & WB_BOLDTEXT ) { - Font aFont = aOldFont; + vcl::Font aFont = aOldFont; if ( aFont.GetWeight() < WEIGHT_BOLD ) aFont.SetWeight( WEIGHT_BOLD ); else diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 097e73a4b2a4..f3359c82d56d 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1105,7 +1105,7 @@ void FontNameBox::ImplCalcUserItemSize() namespace { - long shrinkFontToFit(OUString &rSampleText, long nH, Font &rFont, OutputDevice &rDevice, Rectangle &rTextRect) + long shrinkFontToFit(OUString &rSampleText, long nH, vcl::Font &rFont, OutputDevice &rDevice, Rectangle &rTextRect) { long nWidth = 0; @@ -1147,10 +1147,10 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) const bool bSymbolFont = isSymbolFont(rInfo); Color aTextColor = rUDEvt.GetDevice()->GetTextColor(); - Font aOldFont( rUDEvt.GetDevice()->GetFont() ); + vcl::Font aOldFont( rUDEvt.GetDevice()->GetFont() ); Size aSize( aOldFont.GetSize() ); aSize.Height() += EXTRAFONTSIZE; - Font aFont( rInfo ); + vcl::Font aFont( rInfo ); aFont.SetSize( aSize ); rUDEvt.GetDevice()->SetFont( aFont ); rUDEvt.GetDevice()->SetTextColor( aTextColor ); diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 2fd68d6e04bf..c26a13c7ec7f 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -127,7 +127,7 @@ void FileControl::StateChanged( StateChangedType nType ) GetEdit().SetControlFont( GetControlFont() ); // Only use height of the button, as in HTML // always Courier is used - Font aFont = GetButton().GetControlFont(); + vcl::Font aFont = GetButton().GetControlFont(); aFont.SetSize( GetControlFont().GetSize() ); GetButton().SetControlFont( aFont ); } diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 51fac595c035..def0e6ad1997 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -131,7 +131,7 @@ void HeaderBar::ImplInitSettings( bool bFont, if ( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetToolFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); @@ -1033,7 +1033,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); Rectangle aRect( aPos, aSize ); - Font aFont = GetDrawPixelFont( pDev ); + vcl::Font aFont = GetDrawPixelFont( pDev ); pDev->Push(); pDev->SetMapMode(); diff --git a/svtools/source/control/hyperlabel.cxx b/svtools/source/control/hyperlabel.cxx index cd7a10ddf89f..e6aab88342e4 100644 --- a/svtools/source/control/hyperlabel.cxx +++ b/svtools/source/control/hyperlabel.cxx @@ -89,7 +89,7 @@ namespace svt void HyperLabel::MouseMove( const MouseEvent& rMEvt ) { - Font aFont = GetControlFont( ); + vcl::Font aFont = GetControlFont( ); const Color aColor = GetTextColor(); if (rMEvt.IsLeaveWindow()) @@ -111,7 +111,7 @@ namespace svt } } - void HyperLabel::ActivateHyperMode(Font aFont, const Color aColor) + void HyperLabel::ActivateHyperMode(vcl::Font aFont, const Color aColor) { aFont.SetUnderline(UNDERLINE_SINGLE); m_pImpl->m_bHyperMode = true; @@ -121,7 +121,7 @@ namespace svt } - void HyperLabel::DeactivateHyperMode(Font aFont, const Color aColor) + void HyperLabel::DeactivateHyperMode(vcl::Font aFont, const Color aColor) { m_pImpl->m_bHyperMode = false; aFont.SetUnderline(UNDERLINE_NONE); diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 01960b8dfb81..cc90d4344ed4 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -175,7 +175,7 @@ namespace svt { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); Color aTextColor = rStyleSettings.GetFieldTextColor(); - Font aFont = GetFont( ); + vcl::Font aFont = GetFont( ); aFont.SetColor( aTextColor ); aFont.SetWeight( WEIGHT_BOLD ); aFont.SetUnderline( UNDERLINE_SINGLE ); @@ -667,7 +667,7 @@ namespace svt const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); SetBackground( Wallpaper( rStyleSettings.GetFieldColor() ) ); Color aTextColor = rStyleSettings.GetFieldTextColor(); - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); aFont.SetColor( aTextColor ); SetFont( aFont ); RoadmapTypes::ItemId curItemID = GetCurrentRoadmapItemID(); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 9d7e288657f4..0a0170f2cc49 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -477,7 +477,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nTop, long nB } else { - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); if ( mnWinStyle & WB_RIGHT_ALIGNED ) aFont.SetOrientation( 2700 ); else @@ -998,7 +998,7 @@ void Ruler::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) if ( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetToolFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); @@ -1031,7 +1031,7 @@ void Ruler::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) maVirDev.SetSettings( GetSettings() ); maVirDev.SetBackground( GetBackground() ); - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); if ( mnWinStyle & WB_VERT ) aFont.SetOrientation( 900 ); diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx index 97a17c45f9dc..4059800025de 100644 --- a/svtools/source/control/scriptedtext.cxx +++ b/svtools/source/control/scriptedtext.cxx @@ -38,10 +38,10 @@ class SvtScriptedTextHelper_Impl { private: OutputDevice& mrOutDevice; /// The output device for drawing the text. - Font maLatinFont; /// The font for latin text portions. - Font maAsianFont; /// The font for asian text portions. - Font maCmplxFont; /// The font for complex text portions. - Font maDefltFont; /// The default font of the output device. + vcl::Font maLatinFont; /// The font for latin text portions. + vcl::Font maAsianFont; /// The font for asian text portions. + vcl::Font maCmplxFont; /// The font for complex text portions. + vcl::Font maDefltFont; /// The default font of the output device. OUString maText; /// The text. vector< sal_Int32 > maPosVec; /// The start position of each text portion. @@ -53,7 +53,7 @@ private: SvtScriptedTextHelper_Impl& operator=( const SvtScriptedTextHelper_Impl& ) SAL_DELETED_FUNCTION; /** Gets the font of the given script type. */ - const Font& GetFont( sal_uInt16 _nScript ) const; + const vcl::Font& GetFont( sal_uInt16 _nScript ) const; /** Sets a font on the output device depending on the script type. */ inline void SetOutDevFont( sal_uInt16 _nScript ) { mrOutDevice.SetFont( GetFont( _nScript ) ); } @@ -69,9 +69,9 @@ public: /** This constructor sets an output device and fonts for all script types. */ SvtScriptedTextHelper_Impl( OutputDevice& _rOutDevice, - Font* _pLatinFont, - Font* _pAsianFont, - Font* _pCmplxFont ); + vcl::Font* _pLatinFont, + vcl::Font* _pAsianFont, + vcl::Font* _pCmplxFont ); /** Copy constructor. */ SvtScriptedTextHelper_Impl( const SvtScriptedTextHelper_Impl& _rCopy ); @@ -79,7 +79,7 @@ public: ~SvtScriptedTextHelper_Impl(); /** Sets new fonts and recalculates the text width. */ - void SetFonts( Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ); + void SetFonts( vcl::Font* _pLatinFont, vcl::Font* _pAsianFont, vcl::Font* _pCmplxFont ); /** Sets a new text and calculates all script breaks and the text width. */ void SetText( const OUString& _rText, @@ -95,7 +95,7 @@ public: SvtScriptedTextHelper_Impl::SvtScriptedTextHelper_Impl( OutputDevice& _rOutDevice, - Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ) : + vcl::Font* _pLatinFont, vcl::Font* _pAsianFont, vcl::Font* _pCmplxFont ) : mrOutDevice( _rOutDevice ), maLatinFont( _pLatinFont ? *_pLatinFont : _rOutDevice.GetFont() ), maAsianFont( _pAsianFont ? *_pAsianFont : _rOutDevice.GetFont() ), @@ -122,7 +122,7 @@ SvtScriptedTextHelper_Impl::~SvtScriptedTextHelper_Impl() { } -const Font& SvtScriptedTextHelper_Impl::GetFont( sal_uInt16 _nScript ) const +const vcl::Font& SvtScriptedTextHelper_Impl::GetFont( sal_uInt16 _nScript ) const { switch( _nScript ) { @@ -255,7 +255,7 @@ void SvtScriptedTextHelper_Impl::CalculateBreaks( const uno::Reference< i18n::XB CalculateSizes(); } -void SvtScriptedTextHelper_Impl::SetFonts( Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ) +void SvtScriptedTextHelper_Impl::SetFonts( vcl::Font* _pLatinFont, vcl::Font* _pAsianFont, vcl::Font* _pCmplxFont ) { maLatinFont = _pLatinFont ? *_pLatinFont : maDefltFont; maAsianFont = _pAsianFont ? *_pAsianFont : maDefltFont; @@ -320,7 +320,7 @@ SvtScriptedTextHelper::~SvtScriptedTextHelper() delete mpImpl; } -void SvtScriptedTextHelper::SetFonts( Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ) +void SvtScriptedTextHelper::SetFonts( vcl::Font* _pLatinFont, vcl::Font* _pAsianFont, vcl::Font* _pCmplxFont ) { mpImpl->SetFonts( _pLatinFont, _pAsianFont, _pCmplxFont ); } diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 771667cef072..81afa0a95f81 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -499,7 +499,7 @@ void TabBar::ImplInitSettings( bool bFont, bool bBackground ) if ( bFont ) { - Font aToolFont; + vcl::Font aToolFont; aToolFont = rStyleSettings.GetToolFont(); if ( IsControlFont() ) aToolFont.Merge( GetControlFont() ); @@ -509,7 +509,7 @@ void TabBar::ImplInitSettings( bool bFont, bool bBackground ) // Adapt font size if window too small? while ( GetTextHeight() > (GetOutputSizePixel().Height()-1) ) { - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); if ( aFont.GetHeight() <= 6 ) break; aFont.SetHeight( aFont.GetHeight()-1 ); @@ -574,7 +574,7 @@ bool TabBar::ImplCalcWidth() return false; // retrieve width of tabs with bold font - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); if ( aFont.GetWeight() != WEIGHT_BOLD ) { aFont.SetWeight( WEIGHT_BOLD ); @@ -1090,8 +1090,8 @@ public: mrParent.SetClipRegion(); } private: - TabBar& mrParent; - Font maFont; + TabBar& mrParent; + vcl::Font maFont; }; class TabDrawer @@ -1288,8 +1288,8 @@ void TabBar::Paint( const Rectangle& rect ) ImplGetColors( aFaceColor, aFaceTextColor, aSelectColor, aSelectTextColor ); // select font - Font aFont = GetFont(); - Font aLightFont = aFont; + vcl::Font aFont = GetFont(); + vcl::Font aLightFont = aFont; aLightFont.SetWeight( WEIGHT_NORMAL ); TabBarPaintGuard aGuard(*this); @@ -2271,7 +2271,7 @@ bool TabBar::StartEditMode( sal_uInt16 nPageId ) } mpEdit->SetText( GetPageText( mnEditId ) ); mpEdit->setPosSizePixel( nX, aRect.Top()+mnOffY+1, nWidth, aRect.GetHeight()-3 ); - Font aFont = GetPointFont(); + vcl::Font aFont = GetPointFont(); Color aForegroundColor; Color aBackgroundColor; Color aFaceColor; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index ebad0fe2f901..3792f2ef1262 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -160,7 +160,7 @@ void ValueSet::ImplInitSettings( bool bFont, bool bForeground, bool bBackground if ( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 1c8e002b80fb..4ef43e98d75b 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -1161,7 +1161,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, { // taking care of font width default if scaling metafile. MetaFontAction* pA = (MetaFontAction*)pAct; - Font aFont( pA->GetFont() ); + vcl::Font aFont( pA->GetFont() ); if ( !aFont.GetWidth() ) { FontMetric aFontMetric( pOut->GetFontMetric( aFont ) ); diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index b8d588396bc1..228ad1f26fc4 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -638,7 +638,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt { MapMode aMM( MAP_APPFONT ); Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, NULL ); - Font aFnt( OUString("Helvetica"), aAppFontSz ); + vcl::Font aFnt( OUString("Helvetica"), aAppFontSz ); aFnt.SetTransparent( true ); aFnt.SetColor( Color( COL_LIGHTRED ) ); aFnt.SetWeight( WEIGHT_BOLD ); diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index 816675a0e433..14811a050a11 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -102,13 +102,13 @@ static UScriptCode lcl_getHardCodedScriptNameForFont (const OutputDevice &rDevic return USCRIPT_INVALID_CODE; } -bool isOpenSymbolFont(const Font &rFont) +bool isOpenSymbolFont(const vcl::Font &rFont) { return rFont.GetName().equalsIgnoreAsciiCase("starsymbol") || rFont.GetName().equalsIgnoreAsciiCase("opensymbol"); } -bool isSymbolFont(const Font &rFont) +bool isSymbolFont(const vcl::Font &rFont) { return (rFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL) || rFont.GetName().equalsIgnoreAsciiCase("Apple Color Emoji") || @@ -140,7 +140,7 @@ bool isSymbolFont(const Font &rFont) bool canRenderNameOfSelectedFont(OutputDevice &rDevice) { - const Font &rFont = rDevice.GetFont(); + const vcl::Font &rFont = rDevice.GetFont(); return !isSymbolFont(rFont) && ( -1 == rDevice.HasGlyphs(rFont, rFont.GetName()) ); } @@ -1227,7 +1227,7 @@ namespace //If we're a CJK font, see if we seem to be tuned for C, J or K if (eScript == USCRIPT_HAN) { - const Font &rFont = rDevice.GetFont(); + const vcl::Font &rFont = rDevice.GetFont(); bool bKore = false, bJpan = false, bHant = false, bHans = false; @@ -1617,7 +1617,7 @@ UScriptCode otCoverageToScript(vcl::UnicodeCoverage::UnicodeCoverageEnum eOTCove return eRet; } -OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const Font &rFont) +OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const vcl::Font &rFont) { OUString sRet(makeRepresentativeTextForLanguage(rFont.GetLanguage())); diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index 581c2576ba70..1af8a6669861 100644 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx @@ -685,7 +685,7 @@ namespace svt { m_rTabBar.Push( PUSH_FONT ); - Font aFont( m_rTabBar.GetFont() ); + vcl::Font aFont( m_rTabBar.GetFont() ); aFont.SetOrientation( 2700 ); aFont.SetVertical( true ); m_rTabBar.SetFont( aFont ); diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx index 4de6648d3e48..a5e5c12232b3 100644 --- a/svtools/source/toolpanel/toolpaneldrawer.cxx +++ b/svtools/source/toolpanel/toolpaneldrawer.cxx @@ -271,7 +271,7 @@ namespace svt const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() ); // Font. - Font aFont = rStyleSettings.GetAppFont(); + vcl::Font aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); @@ -306,7 +306,7 @@ namespace svt Rectangle ToolPanelDrawer::impl_calcTextBoundingBox() const { - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); if ( m_bExpanded ) aFont.SetWeight( m_bExpanded ? WEIGHT_BOLD : WEIGHT_NORMAL ); m_pPaintDevice->SetFont( aFont ); |