[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-text-background-color' - 2 commits - drawinglayer/source editeng/source svx/source
matteocam
matteo.campanelli at gmail.com
Tue Jun 17 06:37:17 PDT 2014
drawinglayer/source/processor2d/vclprocessor2d.cxx | 19 ++++++++-----------
editeng/source/editeng/editattr.cxx | 11 +++++------
svx/source/unodraw/unoshap2.cxx | 2 +-
3 files changed, 14 insertions(+), 18 deletions(-)
New commits:
commit fe0b0c0648a6339f979fe8faa7d997c6b5ac0637
Author: matteocam <matteo.campanelli at gmail.com>
Date: Tue Jun 17 15:36:41 2014 +0200
Fill Color in VclProcessor2D is set out of decorated text if-block
Change-Id: Ice01290d7baa46f694b2bf5801b6af48f083d521
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 54aef74..9b90471 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -146,6 +146,14 @@ namespace drawinglayer
fRotate,
rTextCandidate.getLocale()));
+ // set FillColor Attribute
+ const Color aFillColor( rTextCandidate.getTextFillColor() );
+ if( aFillColor != COL_TRANSPARENT )
+ {
+ aFont.SetFillColor(aFillColor);
+ aFont.SetTransparent(false);
+ }
+
// Don't draw fonts without height
if( aFont.GetHeight() <= 0 )
return;
@@ -187,17 +195,6 @@ namespace drawinglayer
if( eFontStrikeout != STRIKEOUT_NONE )
aFont.SetStrikeout( eFontStrikeout );
- // set FillColor Attribute
- // FIXME(matteocam)
-
- // XXX: is "Color" the right type? i.e. can we use class Color in TextSimplePortionPrimitive2D
- const Color aFillColor(pTCPP->getTextFillColor() );
- if( aFillColor != COL_TRANSPARENT )
- {
- aFont.SetFillColor(aFillColor);
- aFont.SetTransparent(false);
- }
-
// set EmphasisMark attribute
FontEmphasisMark eFontEmphasisMark = EMPHASISMARK_NONE;
commit e68c18f1afe93eba5e79829510df16a78d66c95e
Author: matteocam <matteo.campanelli at gmail.com>
Date: Tue Jun 17 15:28:06 2014 +0200
Removed assertion in EditCharAttribBackgroundColor
Change-Id: Ic9b41eed686ca8bf07c8e3e1555fc6953093a2d4
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 5b9a661..641592c 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -133,8 +133,8 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())->GetValue() );
/* FIXME(matteocam) */
- rFont.SetFillColor(aColor); // XXX: alone it works but it set it white (vcl causing troubes?)
- rFont.SetTransparent(false); // XXX: will this be enough?
+ rFont.SetFillColor(aColor);
+ rFont.SetTransparent(false);
//if (pOutDev)
// pOutDev->SetTextFillColor(aColor); // this doesn't work either
// end FIXME
@@ -241,15 +241,14 @@ EditCharAttribBackgroundColor::EditCharAttribBackgroundColor(
sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
- DBG_ASSERT( rAttr.Which() == EE_CHAR_BKGCOLOR, "Not a BackgroundColor attribute!" );
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_BKGCOLOR, "Not a BackColor attribute!" );
}
void EditCharAttribBackgroundColor::SetFont( SvxFont& rFont, OutputDevice* )
{
-#define BREAK_BKG_COLOR_SET_FONT 0
- assert(BREAK_BKG_COLOR_SET_FONT); // XXX: checking if this is being called // FIXME(matteocam)
Color aColor = ((const SvxBackgroundColorItem*)GetItem())->GetValue();
- rFont.SetFillColor( aColor); // XXX: Is it SetFillColor we want?
+ rFont.SetFillColor( aColor);
+ rFont.SetTransparent(false);
}
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 6f8cd89..a6b74b1 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -680,7 +680,7 @@ SvxShapeControlPropertyMapping[] =
{ RTL_CONSTASCII_STRINGPARAM("CharKerning"), RTL_CONSTASCII_STRINGPARAM("FontKerning") },
{ RTL_CONSTASCII_STRINGPARAM("CharWordMode"), RTL_CONSTASCII_STRINGPARAM("FontWordLineMode" ) },
{ RTL_CONSTASCII_STRINGPARAM(UNO_NAME_EDIT_CHAR_COLOR), RTL_CONSTASCII_STRINGPARAM("TextColor") },
- // { RTL_CONSTASCII_STRINGPARAM("CharBackColor") },
+ // { RTL_CONSTASCII_STRINGPARAM("CharBackColor") }, // FIXME(matteocam)
{ RTL_CONSTASCII_STRINGPARAM("CharRelief"), RTL_CONSTASCII_STRINGPARAM("FontRelief") },
{ RTL_CONSTASCII_STRINGPARAM("CharUnderlineColor"), RTL_CONSTASCII_STRINGPARAM("TextLineColor") },
{ RTL_CONSTASCII_STRINGPARAM(UNO_NAME_EDIT_PARA_ADJUST), RTL_CONSTASCII_STRINGPARAM("Align") },
More information about the Libreoffice-commits
mailing list