Kaydet (Commit) 41c704a8 authored tarafından Armin Le Grand's avatar Armin Le Grand

tdf#111853 Added TextFillColor to operator==

TextFillColor was added to TextSimplePortionPrimitive2D, but not added to
TextSimplePortionPrimitive2D::operator==, so when this changed it was not
detected. Added this.
Also added was bFilled and nWidthToFill, all defaulted. This is not accessible
for TextDecoratedPortionPrimitive2D and seems to be some special solution
just for one special case in DrawPortionInfo, only used from Outliner::DrawingTab,
so I am not sure if that change to the central TextSimplePortionPrimitive2D is
good and should stay

Change-Id: Ief8da74a8b66281e47c4c8a47131125e30b90e7d
Reviewed-on: https://gerrit.libreoffice.org/42188Reviewed-by: 's avatarArmin Le Grand <Armin.Le.Grand@cib.de>
Tested-by: 's avatarArmin Le Grand <Armin.Le.Grand@cib.de>
üst 7b1fbcb0
......@@ -225,7 +225,7 @@ namespace drawinglayer
const basegfx::BColor& rFontColor,
bool bFilled,
long nWidthToFill,
const Color& rFillColor)
const Color& rTextFillColor)
: BufferedDecompositionPrimitive2D(),
maTextTransform(rNewTransform),
maText(rText),
......@@ -235,10 +235,10 @@ namespace drawinglayer
maFontAttribute(rFontAttribute),
maLocale(rLocale),
maFontColor(rFontColor),
maB2DRange(),
mbFilled(bFilled),
mnWidthToFill(nWidthToFill),
maTextFillColor(rFillColor)
maTextFillColor(rTextFillColor),
maB2DRange()
{
#if OSL_DEBUG_LEVEL > 0
const sal_Int32 aStringLength(getText().getLength());
......@@ -269,7 +269,8 @@ namespace drawinglayer
&& LocalesAreEqual(getLocale(), rCompare.getLocale())
&& getFontColor() == rCompare.getFontColor()
&& mbFilled == rCompare.mbFilled
&& mnWidthToFill == rCompare.mnWidthToFill);
&& mnWidthToFill == rCompare.mnWidthToFill
&& maTextFillColor == rCompare.maTextFillColor);
}
return false;
......
......@@ -93,7 +93,7 @@ namespace drawinglayer
@param nWidthToFill
@param rFillColor
@param rTextFillColor
Text background color (has nothing to do with bFilled and nWidthToFill)
*/
......@@ -119,20 +119,23 @@ namespace drawinglayer
attribute::FontAttribute maFontAttribute;
/// The Locale for the text
css::lang::Locale maLocale;
css::lang::Locale maLocale;
/// font color
basegfx::BColor maFontColor;
// Whether to fill a given width with the text
bool mbFilled;
/// #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 width to fill
long mnWidthToFill;
/// The fill color of the text
Color maTextFillColor;
/// #i96669# internal: add simple range buffering for this primitive
basegfx::B2DRange maB2DRange;
protected:
/// local decomposition.
virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
......@@ -150,7 +153,7 @@ namespace drawinglayer
const basegfx::BColor& rFontColor,
bool bFilled = false,
long nWidthToFill = 0,
const Color& rFillColor = COL_TRANSPARENT );
const Color& rTextFillColor = COL_TRANSPARENT );
/// helpers
/** get text outlines as polygons and their according ObjectTransformation. Handles all
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment