summaryrefslogtreecommitdiff
path: root/vcl/source/edit
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 /vcl/source/edit
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 'vcl/source/edit')
-rw-r--r--vcl/source/edit/texteng.cxx16
-rw-r--r--vcl/source/edit/textview.cxx2
-rw-r--r--vcl/source/edit/txtattr.cxx8
-rw-r--r--vcl/source/edit/vclmedit.cxx6
4 files changed, 16 insertions, 16 deletions
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 9fb2e5c62ffe..b70cd2be405f 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -102,7 +102,7 @@ TextEngine::TextEngine()
ImpInitDoc();
maTextColor = COL_BLACK;
- Font aFont;
+ vcl::Font aFont;
aFont.SetTransparent( false );
Color aFillColor( aFont.GetFillColor() );
aFillColor.SetTransparency( 0 );
@@ -170,7 +170,7 @@ void TextEngine::SetActiveView( TextView* pTextView )
}
}
-void TextEngine::SetFont( const Font& rFont )
+void TextEngine::SetFont( const vcl::Font& rFont )
{
if ( rFont != maFont )
{
@@ -1130,7 +1130,7 @@ sal_uInt16 TextEngine::GetCharPos( sal_uLong nPortion, sal_uInt16 nLine, long nX
{
nTmpX -= pTextPortion->GetWidth(); // position before Portion
// TODO: Optimize: no GetTextBreak if fixed-width Font
- Font aFont;
+ vcl::Font aFont;
SeekCursor( nPortion, nCurIndex+1, aFont, NULL );
mpRefDev->SetFont( aFont);
long nPosInPortion = nXPos-nTmpX;
@@ -1213,7 +1213,7 @@ sal_uLong TextEngine::CalcTextHeight()
return nY;
}
-sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nLen, const Font* pFont )
+sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nLen, const vcl::Font* pFont )
{
#ifdef DBG_UTIL
// within the text there must not be a Portion change (attribute/tab)!
@@ -1235,7 +1235,7 @@ sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart,
}
else
{
- Font aFont;
+ vcl::Font aFont;
SeekCursor( nPara, nPortionStart+1, aFont, NULL );
mpRefDev->SetFont( aFont );
}
@@ -1392,7 +1392,7 @@ TextPaM TextEngine::ConnectContents( sal_uLong nLeftNode )
return ImpConnectParagraphs( nLeftNode, nLeftNode+1 );
}
-void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, OutputDevice* pOutDev )
+void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, vcl::Font& rFont, OutputDevice* pOutDev )
{
rFont = maFont;
if ( pOutDev )
@@ -2011,7 +2011,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
case PORTIONKIND_TEXT:
{
{
- Font aFont;
+ vcl::Font aFont;
SeekCursor( nPara, nIndex+1, aFont, pOutDev );
if( bTransparent )
aFont.SetTransparent( true );
@@ -2246,7 +2246,7 @@ bool TextEngine::CreateLines( sal_uLong nPara )
sal_uInt16 nIndex = pLine->GetStart();
TextLine aSaveLine( *pLine );
- Font aFont;
+ vcl::Font aFont;
bool bCalcPortion = true;
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index b607caf7abf9..d63620d40016 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -300,7 +300,7 @@ void TextView::ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle c
{
// set correct background color;
// unfortunately we cannot detect if it has changed
- Font aFont = mpImpl->mpTextEngine->GetFont();
+ vcl::Font aFont = mpImpl->mpTextEngine->GetFont();
Color aColor = pOut->GetBackground().GetColor();
aColor.SetTransparency( 0 );
if ( aColor != aFont.GetFillColor() )
diff --git a/vcl/source/edit/txtattr.cxx b/vcl/source/edit/txtattr.cxx
index c7d0c592a44d..2baa47bc213f 100644
--- a/vcl/source/edit/txtattr.cxx
+++ b/vcl/source/edit/txtattr.cxx
@@ -43,7 +43,7 @@ TextAttribFontColor::~TextAttribFontColor()
{
}
-void TextAttribFontColor::SetFont( Font& rFont ) const
+void TextAttribFontColor::SetFont( vcl::Font& rFont ) const
{
rFont.SetColor( maColor );
}
@@ -73,7 +73,7 @@ TextAttribFontWeight::~TextAttribFontWeight()
{
}
-void TextAttribFontWeight::SetFont( Font& rFont ) const
+void TextAttribFontWeight::SetFont( vcl::Font& rFont ) const
{
rFont.SetWeight( meWeight );
}
@@ -99,7 +99,7 @@ TextAttribHyperLink::~TextAttribHyperLink()
{
}
-void TextAttribHyperLink::SetFont( Font& rFont ) const
+void TextAttribHyperLink::SetFont( vcl::Font& rFont ) const
{
rFont.SetColor( maColor );
rFont.SetUnderline( UNDERLINE_SINGLE );
@@ -132,7 +132,7 @@ TextAttribProtect::~TextAttribProtect()
{
}
-void TextAttribProtect::SetFont( Font& ) const
+void TextAttribProtect::SetFont( vcl::Font& ) const
{
}
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 6dee58f92c99..68c375a6a200 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -974,12 +974,12 @@ void VclMultiLineEdit::ImplInitSettings( bool /*bFont*/, bool /*bForeground*/, b
if ( !IsEnabled() )
aTextColor = rStyleSettings.GetDisableColor();
- Font aFont = rStyleSettings.GetFieldFont();
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
if ( IsControlFont() )
aFont.Merge( GetControlFont() );
aFont.SetTransparent( IsPaintTransparent() );
SetZoomedPointFont( aFont );
- Font TheFont = GetFont();
+ vcl::Font TheFont = GetFont();
TheFont.SetColor( aTextColor );
if( IsPaintTransparent() )
TheFont.SetFillColor( Color( COL_TRANSPARENT ) );
@@ -1304,7 +1304,7 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size&
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
- Font aFont = pImpVclMEdit->GetTextWindow()->GetDrawPixelFont( pDev );
+ vcl::Font aFont = pImpVclMEdit->GetTextWindow()->GetDrawPixelFont( pDev );
aFont.SetTransparent( true );
OutDevType eOutDevType = pDev->GetOutDevType();