summaryrefslogtreecommitdiff
path: root/drawinglayer
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 /drawinglayer
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 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx20
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx10
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx2
3 files changed, 16 insertions, 16 deletions
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 052d43a5f3ba..5cad9d63da67 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -87,7 +87,7 @@ namespace
basegfx::B2DPolyPolygon maClipPolyPoygon;
/// font, etc.
- Font maFont;
+ vcl::Font maFont;
RasterOp maRasterOp;
ComplexTextLayoutMode mnLayoutMode;
LanguageType maLanguageType;
@@ -175,8 +175,8 @@ namespace
bool getClipPolyPolygonActive() const { return mbClipPolyPolygonActive; }
void setClipPolyPolygonActive(bool bNew) { if(bNew != mbClipPolyPolygonActive) mbClipPolyPolygonActive = bNew; }
- const Font& getFont() const { return maFont; }
- void setFont(const Font& rFont) { if(rFont != maFont) maFont = rFont; }
+ const vcl::Font& getFont() const { return maFont; }
+ void setFont(const vcl::Font& rFont) { if(rFont != maFont) maFont = rFont; }
const RasterOp& getRasterOp() const { return maRasterOp; }
void setRasterOp(const RasterOp& rRasterOp) { if(rRasterOp != maRasterOp) maRasterOp = rRasterOp; }
@@ -302,7 +302,7 @@ namespace
{
if(pLast->getFont().GetAlign() != pTip->getFont().GetAlign())
{
- Font aFont(pLast->getFont());
+ vcl::Font aFont(pLast->getFont());
aFont.SetAlign(pTip->getFont().GetAlign());
pLast->setFont(aFont);
}
@@ -1200,7 +1200,7 @@ namespace
}
/** helper to decide UnderlineAbove for text primitives */
- bool isUnderlineAbove(const Font& rFont)
+ bool isUnderlineAbove(const vcl::Font& rFont)
{
if(!rFont.IsVertical())
{
@@ -1222,7 +1222,7 @@ namespace
basegfx::B2DVector& rAlignmentOffset,
PropertyHolder& rProperty)
{
- const Font& rFont = rProperty.getFont();
+ const vcl::Font& rFont = rProperty.getFont();
basegfx::B2DVector aFontScaling;
rFontAttribute = drawinglayer::attribute::FontAttribute(
@@ -1273,7 +1273,7 @@ namespace
PropertyHolder& rProperty)
{
drawinglayer::primitive2d::BasePrimitive2D* pResult = 0;
- const Font& rFont = rProperty.getFont();
+ const vcl::Font& rFont = rProperty.getFont();
basegfx::B2DVector aAlignmentOffset(0.0, 0.0);
if(nTextLength)
@@ -2121,7 +2121,7 @@ namespace
// for sub-Mteafile contents, do start with new, default render state
// #i124686# ...but copy font, this is already set accordingly
- Font aTargetFont = rPropertyHolders.Current().getFont();
+ vcl::Font aTargetFont = rPropertyHolders.Current().getFont();
rPropertyHolders.PushDefault();
rPropertyHolders.Current().setFont(aTargetFont);
@@ -2660,7 +2660,7 @@ namespace
// playing the Metafile)
if(rPropertyHolders.Current().getFont().GetAlign() != aNewTextAlign)
{
- Font aNewFont(rPropertyHolders.Current().getFont());
+ vcl::Font aNewFont(rPropertyHolders.Current().getFont());
aNewFont.SetAlign(aNewTextAlign);
rPropertyHolders.Current().setFont(aNewFont);
}
@@ -2735,7 +2735,7 @@ namespace
{
// this should not happen but i got Metafiles where this was the
// case. A height needs to be guessed (similar to OutputDevice::ImplNewFont())
- Font aCorrectedFont(pA->GetFont());
+ vcl::Font aCorrectedFont(pA->GetFont());
// guess 16 pixel (as in VCL)
aFontSize = Size(0, 16);
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index cbd21e37d898..c472d19ad768 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -155,7 +155,7 @@ namespace drawinglayer
releaseGlobalVirtualDevice();
}
- void TextLayouterDevice::setFont(const Font& rFont)
+ void TextLayouterDevice::setFont(const vcl::Font& rFont)
{
mrDevice.SetFont( rFont );
}
@@ -365,7 +365,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- Font getVclFontFromFontAttribute(
+ vcl::Font getVclFontFromFontAttribute(
const attribute::FontAttribute& rFontAttribute,
double fFontScaleX,
double fFontScaleY,
@@ -381,7 +381,7 @@ namespace drawinglayer
// for WIN32 systems, start with creating an unscaled font. If FontScaling
// is wanted, that width needs to be adapted using FontMetric again to get a
// width of the unscaled font
- Font aRetval(
+ vcl::Font aRetval(
rFontAttribute.getFamilyName(),
rFontAttribute.getStyleName(),
Size(0, nHeight));
@@ -391,7 +391,7 @@ namespace drawinglayer
// FontWidth when no scaling is used to explicitly have that zero when e.g. the
// Font would be recorded in a MetaFile (The MetaFile FontAction WILL record a
// set FontWidth; import that in a WIN32 system, and trouble is there)
- Font aRetval(
+ vcl::Font aRetval(
rFontAttribute.getFamilyName(),
rFontAttribute.getStyleName(),
Size(bFontIsScaled ? nWidth : 0, nHeight));
@@ -432,7 +432,7 @@ namespace drawinglayer
attribute::FontAttribute getFontAttributeFromVclFont(
basegfx::B2DVector& o_rSize,
- const Font& rFont,
+ const vcl::Font& rFont,
bool bRTL,
bool bBiDiStrong)
{
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 869afd83fe6a..c05efd3915cc 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -139,7 +139,7 @@ namespace drawinglayer
if(basegfx::fTools::more(aFontScaling.getX(), 0.0) && basegfx::fTools::more(aFontScaling.getY(), 0.0))
{
// Get the VCL font (use FontHeight as FontWidth)
- Font aFont(primitive2d::getVclFontFromFontAttribute(
+ vcl::Font aFont(primitive2d::getVclFontFromFontAttribute(
rTextCandidate.getFontAttribute(),
aFontScaling.getX(),
aFontScaling.getY(),