summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/source/primitive2d/textprimitive2d.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx10
-rw-r--r--include/drawinglayer/primitive2d/textprimitive2d.hxx8
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx3
4 files changed, 18 insertions, 9 deletions
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index f35015ac1607..4aba22d40a14 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -228,7 +228,8 @@ namespace drawinglayer
const ::com::sun::star::lang::Locale& rLocale,
const basegfx::BColor& rFontColor,
bool bFilled,
- long nWidthToFill)
+ long nWidthToFill,
+ const basegfx::BColor& rFillColor)
: BufferedDecompositionPrimitive2D(),
maTextTransform(rNewTransform),
maText(rText),
@@ -240,7 +241,8 @@ namespace drawinglayer
maFontColor(rFontColor),
maB2DRange(),
mbFilled(bFilled),
- mnWidthToFill(nWidthToFill)
+ mnWidthToFill(nWidthToFill),
+ maTextFillColor(rFillColor)
{
#if OSL_DEBUG_LEVEL > 0
const sal_Int32 aStringLength(getText().getLength());
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 213b51499e5e..54aef7426101 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -189,18 +189,16 @@ namespace drawinglayer
// set FillColor Attribute
// FIXME(matteocam)
- // XXX: is "Color" the right type
- //const Color aFillColor(pTCPP->getFontFillColor() );
- //if( aFillColor != COL_TRANSPARENT )
- // set fill Color if underlined
- if ( eFontUnderline != UNDERLINE_NONE )
+ // XXX: is "Color" the right type? i.e. can we use class Color in TextSimplePortionPrimitive2D
+ const Color aFillColor(pTCPP->getTextFillColor() );
+ if( aFillColor != COL_TRANSPARENT )
{
- Color aFillColor = RGB_COLORDATA(0x66, 0x66, 0xff);
aFont.SetFillColor(aFillColor);
aFont.SetTransparent(false);
}
+
// set EmphasisMark attribute
FontEmphasisMark eFontEmphasisMark = EMPHASISMARK_NONE;
switch( pTCPP->getTextEmphasisMark() )
diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx b/include/drawinglayer/primitive2d/textprimitive2d.hxx
index 3259e8171fe5..7c812b4273eb 100644
--- a/include/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -117,11 +117,15 @@ namespace drawinglayer
/// font color
basegfx::BColor maFontColor;
+
/// #i96669# internal: add simple range buffering for this primitive
basegfx::B2DRange maB2DRange;
bool mbFilled; // Whether to fill a given width with the text
long mnWidthToFill; // the width to fill
+ /// The fill color of the text
+ basegfx::BColor maTextFillColor;
+
protected:
/// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
@@ -138,7 +142,8 @@ namespace drawinglayer
const ::com::sun::star::lang::Locale& rLocale,
const basegfx::BColor& rFontColor,
bool bFilled = false,
- long nWidthToFill = 0);
+ long nWidthToFill = 0,
+ const basegfx::BColor& rFillColor = Color(COL_TRANSPARENT).getBColor());
/// helpers
/** get text outlines as polygons and their according ObjectTransformation. Handles all
@@ -155,6 +160,7 @@ namespace drawinglayer
const attribute::FontAttribute& getFontAttribute() const { return maFontAttribute; }
const ::com::sun::star::lang::Locale& getLocale() const { return maLocale; }
const basegfx::BColor& getFontColor() const { return maFontColor; }
+ const basegfx::BColor& getTextFillColor() const { return maTextFillColor; }
bool isFilled() const { return mbFilled; }
long getWidthToFill() const { return mnWidthToFill; }
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 8767e5d74fc7..9547cfa76a2f 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -259,6 +259,9 @@ namespace
const Color aFontColor(rInfo.mrFont.GetColor());
const basegfx::BColor aBFontColor(aFontColor.getBColor());
+ const Color aTextFillColor(rInfo.mrFont.GetFillColor());
+ const basegfx::BColor aBTextFill(aTextFillColor.getBColor());
+
// prepare wordLineMode (for underline and strikeout)
// NOT for bullet texts. It is set (this may be an error by itself), but needs to be suppressed to hinder e.g. '1)'
// to be split which would not look like the original