summaryrefslogtreecommitdiff
path: root/svtools/source/control
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-16 10:09:58 +0200
committerNoel Grandin <noel@peralex.com>2014-09-18 08:54:37 +0200
commit60e78fbb806bb45e635ba1de45ceffe187938ac0 (patch)
tree17ff5aaa57f4d23e177f1fe423def1691139a4a8 /svtools/source/control
parent9c818268767d6a1c1bc731ae30c45883bab987e7 (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/source/control')
-rw-r--r--svtools/source/control/calendar.cxx20
-rw-r--r--svtools/source/control/ctrlbox.cxx6
-rw-r--r--svtools/source/control/filectrl.cxx2
-rw-r--r--svtools/source/control/headbar.cxx4
-rw-r--r--svtools/source/control/hyperlabel.cxx6
-rw-r--r--svtools/source/control/roadmap.cxx4
-rw-r--r--svtools/source/control/ruler.cxx6
-rw-r--r--svtools/source/control/scriptedtext.cxx26
-rw-r--r--svtools/source/control/tabbar.cxx16
-rw-r--r--svtools/source/control/valueset.cxx2
10 files changed, 46 insertions, 46 deletions
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() );