Added Text Fill Color in TextSimplePortionPrimitive2D
Change-Id: I40309c17d6e3d0547c4724a01b464e94a3c8a61c (cherry picked from commit 4177d9b34551f7cf2a7ea8d2dfdff37b89400db4)
This commit is contained in:
parent
7bb6020ead
commit
6c1fc9e94e
@ -228,7 +228,8 @@ namespace drawinglayer
|
|||||||
const ::com::sun::star::lang::Locale& rLocale,
|
const ::com::sun::star::lang::Locale& rLocale,
|
||||||
const basegfx::BColor& rFontColor,
|
const basegfx::BColor& rFontColor,
|
||||||
bool bFilled,
|
bool bFilled,
|
||||||
long nWidthToFill)
|
long nWidthToFill,
|
||||||
|
const basegfx::BColor& rFillColor)
|
||||||
: BufferedDecompositionPrimitive2D(),
|
: BufferedDecompositionPrimitive2D(),
|
||||||
maTextTransform(rNewTransform),
|
maTextTransform(rNewTransform),
|
||||||
maText(rText),
|
maText(rText),
|
||||||
@ -240,7 +241,8 @@ namespace drawinglayer
|
|||||||
maFontColor(rFontColor),
|
maFontColor(rFontColor),
|
||||||
maB2DRange(),
|
maB2DRange(),
|
||||||
mbFilled(bFilled),
|
mbFilled(bFilled),
|
||||||
mnWidthToFill(nWidthToFill)
|
mnWidthToFill(nWidthToFill),
|
||||||
|
maTextFillColor(rFillColor)
|
||||||
{
|
{
|
||||||
#if OSL_DEBUG_LEVEL > 0
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
const sal_Int32 aStringLength(getText().getLength());
|
const sal_Int32 aStringLength(getText().getLength());
|
||||||
|
@ -189,18 +189,16 @@ namespace drawinglayer
|
|||||||
|
|
||||||
// set FillColor Attribute
|
// set FillColor Attribute
|
||||||
// FIXME(matteocam)
|
// FIXME(matteocam)
|
||||||
// XXX: is "Color" the right type
|
|
||||||
|
|
||||||
//const Color aFillColor(pTCPP->getFontFillColor() );
|
// XXX: is "Color" the right type? i.e. can we use class Color in TextSimplePortionPrimitive2D
|
||||||
//if( aFillColor != COL_TRANSPARENT )
|
const Color aFillColor(pTCPP->getTextFillColor() );
|
||||||
// set fill Color if underlined
|
if( aFillColor != COL_TRANSPARENT )
|
||||||
if ( eFontUnderline != UNDERLINE_NONE )
|
|
||||||
{
|
{
|
||||||
Color aFillColor = RGB_COLORDATA(0x66, 0x66, 0xff);
|
|
||||||
aFont.SetFillColor(aFillColor);
|
aFont.SetFillColor(aFillColor);
|
||||||
aFont.SetTransparent(false);
|
aFont.SetTransparent(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// set EmphasisMark attribute
|
// set EmphasisMark attribute
|
||||||
FontEmphasisMark eFontEmphasisMark = EMPHASISMARK_NONE;
|
FontEmphasisMark eFontEmphasisMark = EMPHASISMARK_NONE;
|
||||||
switch( pTCPP->getTextEmphasisMark() )
|
switch( pTCPP->getTextEmphasisMark() )
|
||||||
|
@ -117,11 +117,15 @@ namespace drawinglayer
|
|||||||
/// font color
|
/// font color
|
||||||
basegfx::BColor maFontColor;
|
basegfx::BColor maFontColor;
|
||||||
|
|
||||||
|
|
||||||
/// #i96669# internal: add simple range buffering for this primitive
|
/// #i96669# internal: add simple range buffering for this primitive
|
||||||
basegfx::B2DRange maB2DRange;
|
basegfx::B2DRange maB2DRange;
|
||||||
bool mbFilled; // Whether to fill a given width with the text
|
bool mbFilled; // Whether to fill a given width with the text
|
||||||
long mnWidthToFill; // the width to fill
|
long mnWidthToFill; // the width to fill
|
||||||
|
|
||||||
|
/// The fill color of the text
|
||||||
|
basegfx::BColor maTextFillColor;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// local decomposition.
|
/// local decomposition.
|
||||||
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
|
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
|
||||||
@ -138,7 +142,8 @@ namespace drawinglayer
|
|||||||
const ::com::sun::star::lang::Locale& rLocale,
|
const ::com::sun::star::lang::Locale& rLocale,
|
||||||
const basegfx::BColor& rFontColor,
|
const basegfx::BColor& rFontColor,
|
||||||
bool bFilled = false,
|
bool bFilled = false,
|
||||||
long nWidthToFill = 0);
|
long nWidthToFill = 0,
|
||||||
|
const basegfx::BColor& rFillColor = Color(COL_TRANSPARENT).getBColor());
|
||||||
|
|
||||||
/// helpers
|
/// helpers
|
||||||
/** get text outlines as polygons and their according ObjectTransformation. Handles all
|
/** 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 attribute::FontAttribute& getFontAttribute() const { return maFontAttribute; }
|
||||||
const ::com::sun::star::lang::Locale& getLocale() const { return maLocale; }
|
const ::com::sun::star::lang::Locale& getLocale() const { return maLocale; }
|
||||||
const basegfx::BColor& getFontColor() const { return maFontColor; }
|
const basegfx::BColor& getFontColor() const { return maFontColor; }
|
||||||
|
const basegfx::BColor& getTextFillColor() const { return maTextFillColor; }
|
||||||
bool isFilled() const { return mbFilled; }
|
bool isFilled() const { return mbFilled; }
|
||||||
long getWidthToFill() const { return mnWidthToFill; }
|
long getWidthToFill() const { return mnWidthToFill; }
|
||||||
|
|
||||||
|
@ -259,6 +259,9 @@ namespace
|
|||||||
const Color aFontColor(rInfo.mrFont.GetColor());
|
const Color aFontColor(rInfo.mrFont.GetColor());
|
||||||
const basegfx::BColor aBFontColor(aFontColor.getBColor());
|
const basegfx::BColor aBFontColor(aFontColor.getBColor());
|
||||||
|
|
||||||
|
const Color aTextFillColor(rInfo.mrFont.GetFillColor());
|
||||||
|
const basegfx::BColor aBTextFill(aTextFillColor.getBColor());
|
||||||
|
|
||||||
// prepare wordLineMode (for underline and strikeout)
|
// 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)'
|
// 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
|
// to be split which would not look like the original
|
||||||
|
Loading…
x
Reference in New Issue
Block a user