summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorHerbert Duerr <hdu@openoffice.org>2007-04-20 07:09:44 +0000
committerHerbert Duerr <hdu@openoffice.org>2007-04-20 07:09:44 +0000
commit912f898fd1cd4e63b8116571c45a5fdd704fd5fc (patch)
tree043484cc7ac86ed697be58d77fea11751692d045 /drawinglayer
parentd0eff21f8356ce3939eba2b5b12ebb07329c4f74 (diff)
#i73860# allow fontcolor!=textlinecolor case
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx11
-rw-r--r--drawinglayer/source/primitive2d/textprimitive2d.cxx13
2 files changed, 15 insertions, 9 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
index 5593d55abd1c..bced49e7e032 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: textprimitive2d.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: hdu $ $Date: 2007-02-21 11:28:48 $
+ * last change: $Author: hdu $ $Date: 2007-04-20 08:09:43 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -85,8 +85,8 @@ namespace drawinglayer
&& mnWeight == rCompare.mnWeight
&& mbSymbol == rCompare.mbSymbol
&& mbVertical == rCompare.mbVertical
- && mbOutline == rCompare.mbOutline
- && mbItalic == rCompare.mbItalic);
+ && mbItalic == rCompare.mbItalic
+ && mbOutline == rCompare.mbOutline);
}
};
@@ -205,6 +205,7 @@ namespace drawinglayer
class TextDecoratedPortionPrimitive2D : public TextSimplePortionPrimitive2D
{
private:
+ basegfx::BColor maTextlineColor;
FontUnderline meFontUnderline;
FontStrikeout meFontStrikeout;
FontEmphasisMark meFontEmphasisMark;
@@ -228,6 +229,7 @@ namespace drawinglayer
const ::std::vector< double >& rDXArray,
const FontAttributes& rFontAttributes,
const basegfx::BColor& rFontColor,
+ const basegfx::BColor& rTextlineColor,
FontUnderline eFontUnderline = FONT_UNDERLINE_NONE,
bool bUnderlineAbove = false,
FontStrikeout eFontStrikeout = FONT_STRIKEOUT_NONE,
@@ -243,6 +245,7 @@ namespace drawinglayer
FontStrikeout getFontStrikeout() const { return meFontStrikeout; }
FontEmphasisMark getFontEmphasisMark() const { return meFontEmphasisMark; }
FontRelief getFontRelief() const { return meFontRelief; }
+ basegfx::BColor getTextlineColor() const { return maTextlineColor; }
bool getUnderlineAbove() const { return mbUnderlineAbove; }
bool getWordLineMode() const { return mbWordLineMode; }
bool getEmphasisMarkAbove() const { return mbEmphasisMarkAbove; }
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index 8573a74639ae..e93b47289414 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: textprimitive2d.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: aw $ $Date: 2007-03-06 12:34:31 $
+ * last change: $Author: hdu $ $Date: 2007-04-20 08:09:44 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -476,7 +476,7 @@ namespace drawinglayer
fUnderlineHeight *= 0.5;
}
- const basegfx::BColor& rLineColor = getFontColor();
+ const basegfx::BColor& rLineColor = getTextlineColor();
attribute::StrokeAttribute aStrokeAttr( rLineColor, fUnderlineHeight, eLineJoin );
if( pDashDotArray != NULL )
{
@@ -553,7 +553,7 @@ namespace drawinglayer
aStrikeoutLine.append( aPoint + ::basegfx::B2DPoint( fTextWidth, 0.0 ) );
}
- const basegfx::BColor& rStrikeoutColor = getFontColor();
+ const basegfx::BColor& rStrikeoutColor = getTextlineColor();
attribute::StrokeAttribute aStrokeAttr( rStrikeoutColor, fStrikeoutHeight, eLineJoin );
aStrikeoutLine.transform( aUnscaledTransform );
aRetval[3] = new PolygonStrokePrimitive2D( aStrikeoutLine, aStrokeAttr );
@@ -603,6 +603,7 @@ namespace drawinglayer
const ::std::vector< double >& rDXArray,
const FontAttributes& rFontAttributes,
const basegfx::BColor& rFontColor,
+ const basegfx::BColor& rTextlineColor,
FontUnderline eFontUnderline,
bool bUnderlineAbove,
FontStrikeout eFontStrikeout,
@@ -613,6 +614,7 @@ namespace drawinglayer
FontRelief eFontRelief,
bool bShadow)
: TextSimplePortionPrimitive2D(rNewTransform, rText, rDXArray, rFontAttributes, rFontColor),
+ maTextlineColor(rTextlineColor),
meFontUnderline(eFontUnderline),
meFontStrikeout(eFontStrikeout),
meFontEmphasisMark(eFontEmphasisMark),
@@ -631,7 +633,8 @@ namespace drawinglayer
{
const TextDecoratedPortionPrimitive2D& rCompare = (TextDecoratedPortionPrimitive2D&)rPrimitive;
- return (getFontUnderline() == rCompare.getFontUnderline()
+ return (getTextlineColor() == rCompare.getTextlineColor()
+ && getFontUnderline() == rCompare.getFontUnderline()
&& getFontStrikeout() == rCompare.getFontStrikeout()
&& getUnderlineAbove() == rCompare.getUnderlineAbove()
&& getWordLineMode() == rCompare.getWordLineMode()