[Libreoffice-commits] core.git: 39 commits - drawinglayer/source editeng/source include/drawinglayer include/editeng include/vcl sd/source svgio/source svx/source vcl/source

matteocam matteo.campanelli at gmail.com
Mon Jun 30 13:55:26 PDT 2014


 drawinglayer/source/primitive2d/metafileprimitive2d.cxx       |    2 
 drawinglayer/source/primitive2d/textbreakuphelper.cxx         |    1 
 drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx  |    3 
 drawinglayer/source/primitive2d/textprimitive2d.cxx           |    6 +
 drawinglayer/source/processor2d/vclprocessor2d.cxx            |    9 ++
 editeng/source/editeng/editattr.cxx                           |   25 ++++++
 editeng/source/editeng/editattr.hxx                           |   13 +++
 editeng/source/editeng/editdbg.cxx                            |   11 ++
 editeng/source/editeng/editdoc.cxx                            |    7 +
 editeng/source/editeng/editeng.cxx                            |    1 
 editeng/source/editeng/eerdll.cxx                             |   11 +-
 editeng/source/editeng/impedit3.cxx                           |   17 ++++
 editeng/source/items/svxfont.cxx                              |    1 
 editeng/source/items/textitem.cxx                             |   39 ++++++++++
 include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx |    1 
 include/drawinglayer/primitive2d/textprimitive2d.hxx          |   16 +++-
 include/editeng/colritem.hxx                                  |   19 ++++
 include/editeng/eeitem.hxx                                    |   24 ++++--
 include/editeng/unotext.hxx                                   |    1 
 include/vcl/outdev.hxx                                        |    3 
 sd/source/core/stlpool.cxx                                    |    4 +
 svgio/source/svgreader/svgcharacternode.cxx                   |    1 
 svx/source/svdraw/svdotextdecomposition.cxx                   |    6 +
 svx/source/unodraw/unoprov.cxx                                |    1 
 svx/source/unodraw/unoshap2.cxx                               |    1 
 vcl/source/gdi/font.cxx                                       |    4 +
 vcl/source/outdev/font.cxx                                    |    1 
 vcl/source/outdev/text.cxx                                    |   19 ++++
 28 files changed, 224 insertions(+), 23 deletions(-)

New commits:
commit 4e7f1f7f1113a1f0d60ed17d7712700683c35a24
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 30 21:17:56 2014 +0200

    Fix svgio build
    
    Change-Id: Ief84952f2b1dc077e871e42e419f41d99810af26

diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx
index a266152..ff9237c 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -463,6 +463,7 @@ namespace svgio
                         aFontAttribute,
                         aLocale,
                         aFill,
+                        COL_TRANSPARENT,
 
                         // extra props for decorated
                         aDecoColor,
commit 59a2e1b9fa8663254550838c0c44d0cac290105f
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 30 14:41:37 2014 -0400

    Cleanup: removed comments and debugging output
    
    Change-Id: I41f13d33da641153784725344f5bd526ca69542b

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 978958c..0f25267 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -128,17 +128,8 @@ EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr,
 
 void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
 {
-    Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF);  // blue-ish
-
     rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())->GetValue() );
 
-    /* FIXME(matteocam) */
-    rFont.SetFillColor(aColor);
-    rFont.SetTransparent(false);
-    //if (pOutDev)
-    //    pOutDev->SetTextFillColor(aColor); // this doesn't work either
-    // end FIXME
-
     if ( pOutDev )
         pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
 
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 86a8090..adbc9fe 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3421,12 +3421,6 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
                                              ' ' == aText[nTextStart + nTextLen - 1] )
                                             --nTextLen;
 
-                                        // FIXME(matteocam)
-                                        if (aTmpFont.GetItalic() != ITALIC_NONE) {
-                                            Color aColor = COL_BROWN;
-                                            aTmpFont.SetFillColor(aColor);
-                                        }
-
                                         // output directly
                                         aTmpFont.QuickDrawText( pOutDev, aRealOutPos, aText, nTextStart, nTextLen, pDXArray );
 
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 718675b..895eef6 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -457,10 +457,6 @@ void SvxFont::QuickDrawText( OutputDevice *pOut,
     const sal_Int32 nIdx, const sal_Int32 nLen, const sal_Int32* pDXArray ) const
 {
 
-    fprintf(stderr, "About to print %s\n", rTxt.getStr());
-
-
-
     // Font has to be selected in OutputDevice...
     if ( !IsCaseMap() && !IsCapital() && !IsKern() && !IsEsc() )
     {
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index ca4d0f7..9fd76b0 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -122,7 +122,7 @@ TYPEINIT1_FACTORY(SvxWordLineModeItem, SfxBoolItem, new SvxWordLineModeItem(fals
 TYPEINIT1_FACTORY(SvxContourItem, SfxBoolItem, new SvxContourItem(false, 0));
 TYPEINIT1_FACTORY(SvxPropSizeItem, SfxUInt16Item, new SvxPropSizeItem(100, 0));
 TYPEINIT1_FACTORY(SvxColorItem, SfxPoolItem, new SvxColorItem(0));
-// FIXME(matteocam): Should 2nd argoment of next line SfxColorItem or SfxPoolItem?
+// XXX: Should 2nd argoment of next line SfxColorItem or SfxPoolItem?
 TYPEINIT1_FACTORY(SvxBackgroundColorItem, SvxColorItem, new SvxBackgroundColorItem(0));
 TYPEINIT1_FACTORY(SvxCharSetColorItem, SvxColorItem, new SvxCharSetColorItem(0));
 TYPEINIT1_FACTORY(SvxKerningItem, SfxInt16Item, new SvxKerningItem(0, 0));
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index 815d2ed..7ec7b69 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -77,12 +77,6 @@ public:
 
 };
 
-/*
- *  FIXME(matteocam):
- * both classes Svx{Background,}Color should be derived from a
- * common ancestor or be totally separate (not recommended probably).
-*/
-
 // class SvxBackgroundColorItem
 
 // XXX: to be moved in a separate header.
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index b4a3614..5e0b134 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -60,11 +60,6 @@ public:
     void                SetAlign( FontAlign );
     FontAlign           GetAlign() const;
 
-    // FIXME(matteocam) // XXX: is this the right spot for changes?
-    void                SetBackgroundColor(const Color &);
-    const Color&        GetBackgroundColor() const;
-
-
     void                SetName( const OUString& rFamilyName );
     const OUString&     GetName() const;
     void                SetStyleName( const OUString& rStyleName );
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index f223d7b..b3daebd 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -305,15 +305,6 @@ void Font::SetFillColor( const Color& rColor )
     }
 }
 
-void Font::SetBackgroundColor(const Color& rColor)
-{
-    // FIXME(matteocam)
-    //MakeUnique();
-    /*mpImplFont->maBkgColor = rColor;
-    if () */
-}
-
-
 void Font::SetTransparent( bool bTransparent )
 {
 
@@ -970,8 +961,6 @@ const Color& Font::GetColor() const { return mpImplFont->maColor; }
 
 const Color& Font::GetFillColor() const { return mpImplFont->maFillColor; }
 
-const Color& Font::GetBackgroundColor() const { /*return mpImplFont->maBkgColor;*/ }
-
 bool Font::IsTransparent() const { return mpImplFont->mbTransparent; }
 
 FontAlign Font::GetAlign() const { return mpImplFont->meAlign; }
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 3fd6500..7b95566 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -742,12 +742,6 @@ void OutputDevice::SetTextFillColor()
         mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), false ) );
 
     if ( maFont.GetColor() != Color( COL_TRANSPARENT ) ) {
-        // FIXME(matteocam)
-        Color aColor = maFont.GetColor();
-        if (aColor.GetRed() == 0x66) {
-            fprintf(stderr, "OutputDevice::SetTextFillColor() changing blue to transparent\n ");
-        }
-        // end modified code
         maFont.SetFillColor( Color( COL_TRANSPARENT ) );
     }
     if ( !maFont.IsTransparent() )
@@ -763,14 +757,6 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
     Color aColor( rColor );
     bool bTransFill = ImplIsColorTransparent( aColor );
 
-    // FIXME(matteocam)
-    if ( rColor.GetRed() == 0x66 ) { // component of the blue I use
-        fprintf(stderr, "OutputDevice::SetTextFillColor(Color &): called  with (%d, %d, %d)\n",
-                rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue());
-    }
-
-    // end modified code
-
     if ( !bTransFill )
     {
         if ( mnDrawMode & ( DRAWMODE_BLACKFILL | DRAWMODE_WHITEFILL |
@@ -966,12 +952,6 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
                                   const sal_Int32* pDXAry,
                                   sal_Int32 nIndex, sal_Int32 nLen )
 {
-    if ( maFont.IsTransparent() )
-        fprintf(stderr, "[Actually transparent font] Real color = %x\n", maFont.GetFillColor().GetColor() );
-    fprintf(stderr, "TextFillColor printing %c is %x\n",
-        (char) rStr.toChar(),
-        GetTextFillColor().GetColor());
-
     if(nLen == 0x0FFFF)
     {
         SAL_INFO("sal.rtl.xub",
commit 2727a6dbf46fad3301ab0f24dce7da50976212f4
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 17 16:17:47 2014 +0200

    Changed BColor to Color in TextFooPrimitive2D classes
    
    Change-Id: I4f29ec307f7f86e0a43d661785f90601e24a16ce
    (cherry picked from commit 530db75780c0c7711e1e334e6968cd357bf3d5a0)

diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 3e75f56..dc922b5 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -1293,7 +1293,7 @@ namespace
 
             // prepare FontColor and Locale
             const basegfx::BColor aFontColor(rProperty.getTextColor());
-            const basegfx::BColor aBFillColor(rFont.GetFillColor().getBColor());
+            const Color aFillColor(rFont.GetFillColor());
             const com::sun::star::lang::Locale aLocale(LanguageTag(rProperty.getLanguageType()).getLocale());
             const bool bWordLineMode(rFont.IsWordLineMode());
 
@@ -1355,7 +1355,7 @@ namespace
                     aFontAttribute,
                     aLocale,
                     aFontColor,
-                    aBFillColor,
+                    aFillColor,
 
                     // attributes for TextDecoratedPortionPrimitive2D
                     rProperty.getOverlineColorActive() ? rProperty.getOverlineColor() : aFontColor,
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index e685ee9..d04f693 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -317,7 +317,7 @@ namespace drawinglayer
             const attribute::FontAttribute& rFontAttribute,
             const ::com::sun::star::lang::Locale& rLocale,
             const basegfx::BColor& rFontColor,
-            const basegfx::BColor& rFillColor,
+            const Color& rFillColor,
 
             // local parameters
             const basegfx::BColor& rOverlineColor,
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index 4aba22d..b825a82 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -229,7 +229,7 @@ namespace drawinglayer
             const basegfx::BColor& rFontColor,
             bool bFilled,
             long nWidthToFill,
-            const basegfx::BColor& rFillColor)
+            const Color& rFillColor)
         :   BufferedDecompositionPrimitive2D(),
             maTextTransform(rNewTransform),
             maText(rText),
diff --git a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
index 5732f3c..d33ee9e 100644
--- a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
@@ -94,7 +94,7 @@ namespace drawinglayer
                 const attribute::FontAttribute& rFontAttribute,
                 const ::com::sun::star::lang::Locale& rLocale,
                 const basegfx::BColor& rFontColor,
-                const basegfx::BColor& rFillColor,
+                const Color& rFillColor,
 
                 /// local parameters
                 const basegfx::BColor& rOverlineColor,
diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx b/include/drawinglayer/primitive2d/textprimitive2d.hxx
index 7c812b4..bb8dd1a2 100644
--- a/include/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -89,6 +89,14 @@ namespace drawinglayer
 
             @param rFontColor
             The font color to use
+
+            @param bFilled
+
+            @param nWidthToFill
+
+            @param rFillColor
+            Text background color (has nothing to do with bFilled and nWidthToFill)
+
          */
         class DRAWINGLAYER_DLLPUBLIC TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D
         {
@@ -124,7 +132,7 @@ namespace drawinglayer
             long                                    mnWidthToFill;      // the width to fill
 
             /// The fill color of the text
-            basegfx::BColor                         maTextFillColor;
+            Color                         maTextFillColor;
 
         protected:
             /// local decomposition.
@@ -143,7 +151,7 @@ namespace drawinglayer
                 const basegfx::BColor& rFontColor,
                 bool bFilled = false,
                 long nWidthToFill = 0,
-                const basegfx::BColor& rFillColor = Color(COL_TRANSPARENT).getBColor());
+                const Color& rFillColor = COL_TRANSPARENT );
 
             /// helpers
             /** get text outlines as polygons and their according ObjectTransformation. Handles all
@@ -160,7 +168,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; }
+            const Color& 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 cb49a50..2f7c4e1 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -260,7 +260,6 @@ namespace
             const basegfx::BColor aBFontColor(aFontColor.getBColor());
 
             const Color aTextFillColor(rInfo.mrFont.GetFillColor());
-            const basegfx::BColor aBTextFillColor(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)'
@@ -340,7 +339,7 @@ namespace
                     aFontAttribute,
                     rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale(),
                     aBFontColor,
-                    aBTextFillColor,
+                    aTextFillColor,
 
                     // attributes for TextDecoratedPortionPrimitive2D
                     aBOverlineColor,
@@ -370,7 +369,7 @@ namespace
                     aBFontColor,
                     rInfo.mbFilled,
                     rInfo.mnWidthToFill,
-                    aBTextFillColor);
+                    aTextFillColor);
             }
 
             if(rInfo.mbEndOfBullet)
commit 64de49e9b26b7a65e63c24e930ef7e42372d26ba
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
    (cherry picked from commit fe0b0c0648a6339f979fe8faa7d997c6b5ac0637)

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 c2d5c39b0c9559b772027a8182c5670c1b2dc7e0
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 17 15:28:06 2014 +0200

    Removed assertion in EditCharAttribBackgroundColor
    
    Change-Id: Ic9b41eed686ca8bf07c8e3e1555fc6953093a2d4
    (cherry picked from commit e68c18f1afe93eba5e79829510df16a78d66c95e)

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 55598e6..978958c 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 118a715..b732526 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") },
commit 4bfa845b3ac524c29b84e751ca0e6bae352b45f4
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 16 20:02:50 2014 +0200

    Associated CharBackColor to EE_CHAR_BKGCOLOR
    
    Change-Id: I3ce7b235aed71a51ccfa154227be16b3b2265d2a
    (cherry picked from commit 48647d731c3f85ce2ed9b3f89d73f805976118f5)

diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index f7ac059..496de99 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -90,6 +90,7 @@ class SvxItemPropertySet;
     { OUString(UNO_NAME_EDIT_CHAR_WEIGHT),      EE_CHAR_WEIGHT,     ::getCppuType((const float*)0),            0, MID_WEIGHT }, \
     { OUString(UNO_NAME_EDIT_CHAR_LOCALE),      EE_CHAR_LANGUAGE,   ::cppu::UnoType<com::sun::star::lang::Locale>::get(),0, MID_LANG_LOCALE }, \
     { OUString(UNO_NAME_EDIT_CHAR_COLOR),       EE_CHAR_COLOR,      ::cppu::UnoType<sal_Int32>::get(),        0, 0 }, \
+    { OUString("CharBackColor"),                EE_CHAR_BKGCOLOR,   ::cppu::UnoType<sal_Int32>::get(),        0, 0 }, \
     { OUString(UNO_NAME_EDIT_CHAR_ESCAPEMENT),  EE_CHAR_ESCAPEMENT, ::cppu::UnoType<sal_Int16>::get(),        0, MID_ESC }, \
     { OUString(UNO_NAME_EDIT_CHAR_UNDERLINE),   EE_CHAR_UNDERLINE,  ::cppu::UnoType<sal_Int16>::get(),        0, MID_TL_STYLE }, \
     { OUString("CharUnderlineColor"),           EE_CHAR_UNDERLINE,  ::cppu::UnoType<sal_Int32>::get(),        0, MID_TL_COLOR }, \
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index b3bdd2c..67467f8 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -589,6 +589,7 @@ SfxItemPropertyMapEntry const * ImplGetSvxControlShapePropertyMap()
         { OUString(UNO_NAME_EDIT_CHAR_STRIKEOUT),       0,  cppu::UnoType<sal_Int16>::get(),        0, 0},
         { OUString(UNO_NAME_EDIT_CHAR_CASEMAP),         0,  cppu::UnoType<sal_Int16>::get(),        0, 0 },
         { OUString(UNO_NAME_EDIT_CHAR_COLOR),           0,  cppu::UnoType<sal_Int32>::get(),        0, 0 },
+        { OUString("CharBackColor"),                    0,  cppu::UnoType<sal_Int32>::get(),        0, 0 },
         { OUString("CharRelief"),                       0,  cppu::UnoType<sal_Int16>::get(),        0, 0 },
         { OUString("CharUnderlineColor"),               0,  cppu::UnoType<sal_Int32>::get(),        0, 0 },
         { OUString("CharKerning"),                      0,  cppu::UnoType<sal_Int16>::get(),        0, 0 },
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 0c52dd9..118a715 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -680,6 +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("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") },
commit 9ab4387532a9bd0df49f3e619f44108dea952a38
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 16 15:52:24 2014 +0200

    Added Text Fill Color in TextDecoratedPrimitive2D
    
    Change-Id: I8c3946c08d20cc2ca2af6f17a2a57d6c9a5cfa23
    (cherry picked from commit 00fc45e78d84dddf32b450441bf9028352ec9e52)

diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 306b0d0..3e75f56 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -1293,6 +1293,7 @@ namespace
 
             // prepare FontColor and Locale
             const basegfx::BColor aFontColor(rProperty.getTextColor());
+            const basegfx::BColor aBFillColor(rFont.GetFillColor().getBColor());
             const com::sun::star::lang::Locale aLocale(LanguageTag(rProperty.getLanguageType()).getLocale());
             const bool bWordLineMode(rFont.IsWordLineMode());
 
@@ -1354,6 +1355,7 @@ namespace
                     aFontAttribute,
                     aLocale,
                     aFontColor,
+                    aBFillColor,
 
                     // attributes for TextDecoratedPortionPrimitive2D
                     rProperty.getOverlineColorActive() ? rProperty.getOverlineColor() : aFontColor,
diff --git a/drawinglayer/source/primitive2d/textbreakuphelper.cxx b/drawinglayer/source/primitive2d/textbreakuphelper.cxx
index f9449a4..10e76c0 100644
--- a/drawinglayer/source/primitive2d/textbreakuphelper.cxx
+++ b/drawinglayer/source/primitive2d/textbreakuphelper.cxx
@@ -144,6 +144,7 @@ namespace drawinglayer
                                 mrSource.getFontAttribute(),
                                 mrSource.getLocale(),
                                 mrSource.getFontColor(),
+                                mrSource.getTextFillColor(),
 
                                 pTextDecoratedPortionPrimitive2D->getOverlineColor(),
                                 pTextDecoratedPortionPrimitive2D->getTextlineColor(),
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index 8d31384..e685ee9 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -317,6 +317,7 @@ namespace drawinglayer
             const attribute::FontAttribute& rFontAttribute,
             const ::com::sun::star::lang::Locale& rLocale,
             const basegfx::BColor& rFontColor,
+            const basegfx::BColor& rFillColor,
 
             // local parameters
             const basegfx::BColor& rOverlineColor,
@@ -331,7 +332,7 @@ namespace drawinglayer
             bool bEmphasisMarkBelow,
             TextRelief eTextRelief,
             bool bShadow)
-        :   TextSimplePortionPrimitive2D(rNewTransform, rText, nTextPosition, nTextLength, rDXArray, rFontAttribute, rLocale, rFontColor),
+        :   TextSimplePortionPrimitive2D(rNewTransform, rText, nTextPosition, nTextLength, rDXArray, rFontAttribute, rLocale, rFontColor, false, 0, rFillColor),
             maOverlineColor(rOverlineColor),
             maTextlineColor(rTextlineColor),
             meFontOverline(eFontOverline),
diff --git a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
index 05f0621..5732f3c 100644
--- a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
@@ -94,6 +94,7 @@ namespace drawinglayer
                 const attribute::FontAttribute& rFontAttribute,
                 const ::com::sun::star::lang::Locale& rLocale,
                 const basegfx::BColor& rFontColor,
+                const basegfx::BColor& rFillColor,
 
                 /// local parameters
                 const basegfx::BColor& rOverlineColor,
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 9547cfa..cb49a50 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -260,7 +260,7 @@ namespace
             const basegfx::BColor aBFontColor(aFontColor.getBColor());
 
             const Color aTextFillColor(rInfo.mrFont.GetFillColor());
-            const basegfx::BColor aBTextFill(aTextFillColor.getBColor());
+            const basegfx::BColor aBTextFillColor(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)'
@@ -340,6 +340,7 @@ namespace
                     aFontAttribute,
                     rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale(),
                     aBFontColor,
+                    aBTextFillColor,
 
                     // attributes for TextDecoratedPortionPrimitive2D
                     aBOverlineColor,
@@ -368,7 +369,8 @@ namespace
                     rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale(),
                     aBFontColor,
                     rInfo.mbFilled,
-                    rInfo.mnWidthToFill);
+                    rInfo.mnWidthToFill,
+                    aBTextFillColor);
             }
 
             if(rInfo.mbEndOfBullet)
commit 6c1fc9e94e36b4f74136bc044cc9a4b72f79d53f
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 16 15:07:58 2014 +0200

    Added Text Fill Color in TextSimplePortionPrimitive2D
    
    Change-Id: I40309c17d6e3d0547c4724a01b464e94a3c8a61c
    (cherry picked from commit 4177d9b34551f7cf2a7ea8d2dfdff37b89400db4)

diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index f35015a..4aba22d 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 213b514..54aef74 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 3259e81..7c812b4 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 8767e5d..9547cfa 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
commit 7bb6020ead0494b35967a6876714c2024b1dee4f
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Fri Jun 13 17:27:18 2014 +0200

    Minor changes
    
    Change-Id: Ic86a37a678648b0ab2facac3e55f54067124657e
    (cherry picked from commit aed0076e9908a9a660bb635b1b342ede558f43bf)

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 8b660cb..213b514 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -196,7 +196,7 @@ namespace drawinglayer
                         // set fill Color if underlined
                         if ( eFontUnderline != UNDERLINE_NONE )
                         {
-                            aFillColor = RGB_COLORDATA(0x66, 0x66, 0xff)
+                            Color aFillColor = RGB_COLORDATA(0x66, 0x66, 0xff);
                             aFont.SetFillColor(aFillColor);
                             aFont.SetTransparent(false);
                         }
commit 9596fe49eb591018c5609f7b46e825cbf89e6c15
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Fri Jun 13 17:08:56 2014 +0200

    Experiment with underlining in VclProcessor's text rendering
    
    Change-Id: Ib1f0e853dec1cb9aa00f585e5d8cdce836478ebb
    (cherry picked from commit 11cd641c130358942fc4a9cbc534dc6be9d8c4a2)

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 7758ed4..8b660cb 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -190,9 +190,13 @@ namespace drawinglayer
                         // set FillColor Attribute
                         // FIXME(matteocam)
                         // XXX: is "Color" the right type
-                        const Color aFillColor(pTCPP->getFillColor() );
-                        if( aFillColor != COL_TRANSPARENT )
+
+                        //const Color aFillColor(pTCPP->getFontFillColor() );
+                        //if( aFillColor != COL_TRANSPARENT )
+                        // set fill Color if underlined
+                        if ( eFontUnderline != UNDERLINE_NONE )
                         {
+                            aFillColor = RGB_COLORDATA(0x66, 0x66, 0xff)
                             aFont.SetFillColor(aFillColor);
                             aFont.SetTransparent(false);
                         }
commit 6b30ff01ea3a4ab7f3fecd7f23bb4782a3f8eb84
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Fri Jun 13 17:02:43 2014 +0200

    VclProcessor's text rendering looks at fill color
    
    Change-Id: I96dcafd01fb6d8a5e873719ee617008b5f2cbc13
    (cherry picked from commit 74fa26c85ef79020a889d14db04130e52635b81e)

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 7c538ed..7758ed4 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -187,6 +187,16 @@ namespace drawinglayer
                         if( eFontStrikeout != STRIKEOUT_NONE )
                             aFont.SetStrikeout( eFontStrikeout );
 
+                        // set FillColor Attribute
+                        // FIXME(matteocam)
+                        // XXX: is "Color" the right type
+                        const Color aFillColor(pTCPP->getFillColor() );
+                        if( aFillColor != COL_TRANSPARENT )
+                        {
+                            aFont.SetFillColor(aFillColor);
+                            aFont.SetTransparent(false);
+                        }
+
                         // set EmphasisMark attribute
                         FontEmphasisMark eFontEmphasisMark = EMPHASISMARK_NONE;
                         switch( pTCPP->getTextEmphasisMark() )
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index a0974a2..55598e6 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -246,6 +246,8 @@ EditCharAttribBackgroundColor::EditCharAttribBackgroundColor(
 
 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?
 
commit 4284ad3f27d389a0ac8b5cf57c1b015b44741bec
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Fri Jun 6 15:21:16 2014 -0400

    Set transparency besides color for text with fill (i.e. underlined text)
    
    Change-Id: I88a90facac656f846a88315951b4769f502662a0
    (cherry picked from commit d4c1c038dbc554dcce9c081e736a72359e80d33f)

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 694e4d4..a0974a2 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -134,6 +134,7 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
 
     /* 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?
     //if (pOutDev)
     //    pOutDev->SetTextFillColor(aColor); // this doesn't work either
     // end FIXME
commit ae915ba34f6b721b81747e7b90a46e1133d5238e
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Fri Jun 6 15:14:52 2014 -0400

    More debugging; fixed Font::IsTransparent
    
    Change-Id: Idcb54408dd3cf6561b78eb28fdb409d2e31df541
    (cherry picked from commit d84dba8b01c1f240f22b774c951ebf206d5a3ac9)

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index e350761..278a7e6 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1040,7 +1040,7 @@ public:
     void                        SetTextFillColor();
     void                        SetTextFillColor( const Color& rColor );
     Color                       GetTextFillColor() const;
-    bool                        IsTextFillColor() const {  return return !maFont.IsTransparent(); }
+    bool                        IsTextFillColor() const { return !maFont.IsTransparent(); }
 
     void                        SetTextLineColor();
     void                        SetTextLineColor( const Color& rColor );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 397bc5e..3fd6500 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -966,11 +966,11 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
                                   const sal_Int32* pDXAry,
                                   sal_Int32 nIndex, sal_Int32 nLen )
 {
-    fprintf(stderr, "TextFillColor printing %c is (%d, %d, %d)\n",
+    if ( maFont.IsTransparent() )
+        fprintf(stderr, "[Actually transparent font] Real color = %x\n", maFont.GetFillColor().GetColor() );
+    fprintf(stderr, "TextFillColor printing %c is %x\n",
         (char) rStr.toChar(),
-        GetTextFillColor().GetRed(),
-        GetTextFillColor().GetGreen(),
-        GetTextFillColor().GetBlue());
+        GetTextFillColor().GetColor());
 
     if(nLen == 0x0FFFF)
     {
commit 13ed85d1ab5b60df45d88c823e584acf94b83527
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jun 4 23:46:45 2014 -0400

    Removed experimental change to IsTextFillColor
    
    Change-Id: I99d1bfd3953c0fb01b9e202d93127b4f4f55faae
    (cherry picked from commit c9e23d31aef62a00acfa90de8a80fb68f5e9dcbf)

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index a0edcc7..e350761 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1040,7 +1040,7 @@ public:
     void                        SetTextFillColor();
     void                        SetTextFillColor( const Color& rColor );
     Color                       GetTextFillColor() const;
-    bool                        IsTextFillColor() const {  return maFont.GetUnderline() == UNDERLINE_SINGLE; /*return !maFont.IsTransparent();*/ }
+    bool                        IsTextFillColor() const {  return return !maFont.IsTransparent(); }
 
     void                        SetTextLineColor();
     void                        SetTextLineColor( const Color& rColor );
commit 22f244ae45251ca07400f8eac8c40b6a0a8dbf3c
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jun 4 22:50:46 2014 -0400

    Background color in defaults for named presentation layout
    
    Change-Id: I0f65476a545cdd080768e00161ab4a7682acc359
    (cherry picked from commit 3ae8a7302c2c145867ae2072f3ba477ba1b3e0a4)

diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 0b7f863..77e2e02 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -250,6 +250,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
                 rSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
                 rSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF) );
                 rSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR) );
+                rSet.Put( SvxBackgroundColorItem( Color (COL_AUTO), EE_CHAR_BKGCOLOR )  );
                 rSet.Put( XLineStyleItem(XLINE_NONE) );
                 rSet.Put( XFillStyleItem(XFILL_NONE) );
                 rSet.Put( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) );
@@ -367,6 +368,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
         rTitleSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
         rTitleSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF ) );
         rTitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
+        rTitleSet.Put(SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ));
         rTitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
         rTitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
         // #i16874# enable kerning by default but only for new documents
@@ -412,6 +414,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
         rSubtitleSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
         rSubtitleSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF ) );
         rSubtitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
+        rSubtitleSet.Put(SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ));
         rSubtitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
         rSubtitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
         // #i16874# enable kerning by default but only for new documents
@@ -460,6 +463,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
         rNotesSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
         rNotesSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF) );
         rNotesSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ) );
+        rNotesSet.Put( SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ) );
         rNotesSet.Put( SvxLRSpaceItem( 0, 0, 600, -600, EE_PARA_LRSPACE  ) );
         // #i16874# enable kerning by default but only for new documents
         rNotesSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
commit 3959563228d1b9de57a3dd80188cc88357af5a32
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 3 15:55:26 2014 -0400

    DbgOutItem  supports Font Background Color
    
    Change-Id: I1067e73593fdd116c3fc264b07f8bfd77057af0f
    (cherry picked from commit 2bcaa1ca791ff64a1629d2451bd52323e7e814e3)

diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 442bda2..4e4f55b 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -177,6 +177,17 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
             aDebStr.append(static_cast<sal_Int32>(aColor.GetBlue()));
         }
         break;
+        case EE_CHAR_BKGCOLOR:
+        {
+            aDebStr.append("FillColor= ");
+            Color aColor( ((SvxColorBackgroundItem&)rItem).GetValue() );
+            aDebStr.append(static_cast<sal_Int32>(aColor.GetRed()));
+            aDebStr.append(", ");
+            aDebStr.append(static_cast<sal_Int32>(aColor.GetGreen()));
+            aDebStr.append(", ");
+            aDebStr.append(static_cast<sal_Int32>(aColor.GetBlue()));
+        }
+        break;
         case EE_CHAR_FONTINFO:
         case EE_CHAR_FONTINFO_CJK:
         case EE_CHAR_FONTINFO_CTL:
commit fd0e1ea165f4bf24a1992733aeaac9df9dce80b6
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 3 15:18:30 2014 -0400

    CreateFont supports Background Color
    
    Change-Id: I3413c77db8e822aeb957909a661d175320555f6d
    (cherry picked from commit a7f27d468dd92a2ffbe114a5bdedf423f657f1ad)

diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 6b63440..162491f 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1907,6 +1907,8 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s
         rFont.SetLanguage( ((const SvxLanguageItem&)rSet.Get( nWhich_Language )).GetLanguage() );
     if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_COLOR ) == SFX_ITEM_ON ) )
         rFont.SetColor( ((const SvxColorItem&)rSet.Get( EE_CHAR_COLOR )).GetValue() );
+    if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_BKGCOLOR ) == SFX_ITEM_ON ) )
+        rFont.SetColor( ((const SvxBackgroundColorItem&)rSet.Get( EE_CHAR_BKGCOLOR )).GetValue() );
     if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontHeight ) == SFX_ITEM_ON ) )
         rFont.SetSize( Size( rFont.GetSize().Width(), ((const SvxFontHeightItem&)rSet.Get( nWhich_FontHeight ) ).GetHeight() ) );
     if ( bSearchInParent || ( rSet.GetItemState( nWhich_Weight ) == SFX_ITEM_ON ) )
commit 39c84aafd3dd803c4d284a69d086c933dad03c84
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 3 14:43:40 2014 -0400

    ItemSet includes Background Color in SetFontInfoInItemSet
    
    Change-Id: I0a5f5cebccc73eb3c0877fae0086861ac5b93d3d
    (cherry picked from commit c52d374be19130c123d8316be6dac51219296abd)

diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 20c55c6..7b4d94a 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2600,6 +2600,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont )
     rSet.Put( SvxEscapementItem( rFont.GetEscapement(), rFont.GetPropr(), EE_CHAR_ESCAPEMENT )  );
     rSet.Put( SvxWeightItem( rFont.GetWeight(), EE_CHAR_WEIGHT )  );
     rSet.Put( SvxColorItem( rFont.GetColor(), EE_CHAR_COLOR )  );
+    rSet.Put( SvxBackgroundColorItem( rFont.GetFillColor(), EE_CHAR_COLOR )  );
     rSet.Put( SvxUnderlineItem( rFont.GetUnderline(), EE_CHAR_UNDERLINE )  );
     rSet.Put( SvxOverlineItem( rFont.GetOverline(), EE_CHAR_OVERLINE )  );
     rSet.Put( SvxCrossedOutItem( rFont.GetStrikeout(), EE_CHAR_STRIKEOUT )  );
commit 2f54ab70890c7e034fac623701f78ee80ff6fae3
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 2 10:43:34 2014 -0400

    Minor changes.
    
    Change-Id: I3b8c51690eb14601435653e9a2255a5c6ed4fd7e
    (cherry picked from commit 0b8fe9834b398db7550f30718b3cb63860c6165d)

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index b7c41eb..694e4d4 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -134,6 +134,8 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
 
     /* FIXME(matteocam) */
     rFont.SetFillColor(aColor); // XXX: alone it works but it set it white (vcl causing troubes?)
+    //if (pOutDev)
+    //    pOutDev->SetTextFillColor(aColor); // this doesn't work either
     // end FIXME
 
     if ( pOutDev )
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index cea9fae..397bc5e 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -766,7 +766,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
     // FIXME(matteocam)
     if ( rColor.GetRed() == 0x66 ) { // component of the blue I use
         fprintf(stderr, "OutputDevice::SetTextFillColor(Color &): called  with (%d, %d, %d)\n",
-                rColor.GetRed(), rColor.GetBlue(), rColor.GetGreen());
+                rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue());
     }
 
     // end modified code
commit f7f405980546ad8f07022b3e337d7a6be0a6d316
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 2 10:34:40 2014 -0400

    Debugging output in OutputDevice::SetTextFillColor
    
    Change-Id: I78a75a94e4012eded1a4a5b4c36d8b399a4dda6c
    (cherry picked from commit 1441ae75b005b4ff1ae2683755a12c5813a3a6b3)

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index fbc0db3..cea9fae 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -741,8 +741,15 @@ void OutputDevice::SetTextFillColor()
     if ( mpMetaFile )
         mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), false ) );
 
-    if ( maFont.GetColor() != Color( COL_TRANSPARENT ) )
+    if ( maFont.GetColor() != Color( COL_TRANSPARENT ) ) {
+        // FIXME(matteocam)
+        Color aColor = maFont.GetColor();
+        if (aColor.GetRed() == 0x66) {
+            fprintf(stderr, "OutputDevice::SetTextFillColor() changing blue to transparent\n ");
+        }
+        // end modified code
         maFont.SetFillColor( Color( COL_TRANSPARENT ) );
+    }
     if ( !maFont.IsTransparent() )
         maFont.SetTransparent( true );
 
@@ -756,6 +763,14 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
     Color aColor( rColor );
     bool bTransFill = ImplIsColorTransparent( aColor );
 
+    // FIXME(matteocam)
+    if ( rColor.GetRed() == 0x66 ) { // component of the blue I use
+        fprintf(stderr, "OutputDevice::SetTextFillColor(Color &): called  with (%d, %d, %d)\n",
+                rColor.GetRed(), rColor.GetBlue(), rColor.GetGreen());
+    }
+
+    // end modified code
+
     if ( !bTransFill )
     {
         if ( mnDrawMode & ( DRAWMODE_BLACKFILL | DRAWMODE_WHITEFILL |
commit 6d658b15b837398cee4f15405927e7e40e9ec41e
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat May 31 04:46:44 2014 -0400

    Debugging output
    
    Change-Id: I4e9418746ad50e1bdb1336459c00a4cf614e2350
    (cherry picked from commit 4b2d62f02a386013d0004058a02fed80eb8df675)

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 2d2a167..b7c41eb 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -133,7 +133,7 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
     rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())->GetValue() );
 
     /* FIXME(matteocam) */
-    rFont.SetFillColor(aColor);
+    rFont.SetFillColor(aColor); // XXX: alone it works but it set it white (vcl causing troubes?)
     // end FIXME
 
     if ( pOutDev )
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 616fb61..f223d7b 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -299,11 +299,15 @@ void Font::SetFillColor( const Color& rColor )
     mpImplFont->maFillColor = rColor;
     if ( rColor.GetTransparency() )
         mpImplFont->mbTransparent = true;
+    if (GetUnderline() == UNDERLINE_SINGLE ) {
+        fprintf(stderr, "I'm setting a filling (from Font) of (%d,%d,%d) \n",
+            rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue());
+    }
 }
 
 void Font::SetBackgroundColor(const Color& rColor)
 {
-    // FIXME
+    // FIXME(matteocam)
     //MakeUnique();
     /*mpImplFont->maBkgColor = rColor;
     if () */
commit f9e020227afc498a32e24eb731a26587036d53bc
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat May 31 02:14:50 2014 -0400

    Added case in editdoc.cxx
    
    Change-Id: I572d79dfd770eaa13d24b27f1c689a059cb79153
    (cherry picked from commit 073be3ab511a33e639135703caa2229c1f105b54)

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 4425871..2d2a167 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -131,13 +131,14 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
     Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF);  // blue-ish
 
     rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())->GetValue() );
-    if ( pOutDev ) // FIXME(matteocam)
-        pOutDev->SetTextLineColor( aColor );
-        //pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
 
-    // FIXME(matteocam)
+    /* FIXME(matteocam) */
+    rFont.SetFillColor(aColor);
+    // end FIXME
+
     if ( pOutDev )
-        pOutDev->SetTextFillColor(aColor);
+        pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
+
 }
 
 
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 8c48fe9..6b63440 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -404,6 +404,11 @@ EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sa
             pNew = new EditCharAttribField( (const SvxFieldItem&)rNew, nS );
         }
         break;
+        case EE_CHAR_BKGCOLOR:
+        {
+            pNew = new EditCharAttribBackgroundColor( (const SvxBackgroundColorItem&)rNew, nS, nE );
+        }
+        break;
         default:
         {
             OSL_FAIL( "Invalid Attribute!" );
diff --git a/include/editeng/eeitem.hxx b/include/editeng/eeitem.hxx
index 84a7296..1939395 100644
--- a/include/editeng/eeitem.hxx
+++ b/include/editeng/eeitem.hxx
@@ -24,7 +24,8 @@
 
 /*
  * NOTE: Changes in this file will probably require
- *        consistent changes in eerdll.cxx as well.
+ *        consistent changes in eerdll.cxx and editdoc.cxx
+ *        as well.
 */
 
 #define EE_ITEMS_START              (OWN_ATTR_VALUE_END+1)
commit c7d80ccb4c915f7f0b3c9ddf88ef807504561f6c
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat May 31 01:11:12 2014 -0400

    Added body of EditCharAttribBackgroundColor
    
    Change-Id: Ieac410809b33b1b489cb7563f3fed133d32832d0
    (cherry picked from commit 8fd668c43982f683dca945277a6c9d4bc8ea720a)

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 87f456f..4425871 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -237,17 +237,13 @@ EditCharAttribBackgroundColor::EditCharAttribBackgroundColor(
                                   sal_uInt16 _nEnd )
     : EditCharAttrib( rAttr, _nStart, _nEnd )
 {
-    // FIXME(matteocam)
-    //DBG_ASSERT( rAttr.Which() == EE_CHAR_BKG_COLOR, "Not a BackgroundColor attribute!" );
+    DBG_ASSERT( rAttr.Which() == EE_CHAR_BKGCOLOR, "Not a BackgroundColor attribute!" );
 }
 
 void EditCharAttribBackgroundColor::SetFont( SvxFont& rFont, OutputDevice* )
 {
-    /* FIXME(matteocam)
-     *
     Color aColor = ((const SvxBackgroundColorItem*)GetItem())->GetValue();
     rFont.SetFillColor( aColor); // XXX: Is it SetFillColor we want?
-    */
 
 }
 
commit 139ca8f26419d4b3e4f478ef8ff7536176c54f1c
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat May 31 01:09:50 2014 -0400

    Added EE_CHAR_BKGCOLOR
    
    Change-Id: If11271f4b3b8f9ab67961206856938046ea2a416
    (cherry picked from commit c2580813426a58cd2ab22efacec9d28423201562)

diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 95c0bc6..ba0821d 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -156,13 +156,14 @@ SfxPoolItem** GlobalEditData::GetDefItems()
         ppDefItems[47] = new SvxOverlineItem( UNDERLINE_NONE, EE_CHAR_OVERLINE );
         ppDefItems[48] = new SvxCaseMapItem( SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP );
         ppDefItems[49] = new SfxGrabBagItem( EE_CHAR_GRABBAG );
+        ppDefItems[50] = new SvxBackgroundColorItem( Color( COL_AUTO ), EE_CHAR_BKGCOLOR );
         // Features
-        ppDefItems[50] = new SfxVoidItem( EE_FEATURE_TAB );
-        ppDefItems[51] = new SfxVoidItem( EE_FEATURE_LINEBR );
-        ppDefItems[52] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
-        ppDefItems[53] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
+        ppDefItems[51] = new SfxVoidItem( EE_FEATURE_TAB );
+        ppDefItems[52] = new SfxVoidItem( EE_FEATURE_LINEBR );
+        ppDefItems[53] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
+        ppDefItems[54] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
 
-        DBG_ASSERT( EDITITEMCOUNT == 54, "ITEMCOUNT geaendert, DefItems nicht angepasst!" );
+        DBG_ASSERT( EDITITEMCOUNT == 55, "ITEMCOUNT geaendert, DefItems nicht angepasst!" );
 
         // Init DefFonts:
         GetDefaultFonts( *(SvxFontItem*)ppDefItems[EE_CHAR_FONTINFO - EE_ITEMS_START],
diff --git a/include/editeng/eeitem.hxx b/include/editeng/eeitem.hxx
index b42b326..84a7296 100644
--- a/include/editeng/eeitem.hxx
+++ b/include/editeng/eeitem.hxx
@@ -22,6 +22,11 @@
 
 #include <svl/solar.hrc>
 
+/*
+ * NOTE: Changes in this file will probably require
+ *        consistent changes in eerdll.cxx as well.
+*/
+
 #define EE_ITEMS_START              (OWN_ATTR_VALUE_END+1)
 
 // Paragraph attributes:
@@ -80,18 +85,18 @@
 #define EE_CHAR_OVERLINE            (EE_ITEMS_START+47)
 #define EE_CHAR_CASEMAP             (EE_ITEMS_START+48)
 #define EE_CHAR_GRABBAG             (EE_ITEMS_START+49)
-//#define EE_CHAR_BKGCOLOR            (EE_ITEMS_START+50)
+#define EE_CHAR_BKGCOLOR            (EE_ITEMS_START+50)
 
-#define EE_CHAR_END                 (EE_ITEMS_START+49)
+#define EE_CHAR_END                 (EE_ITEMS_START+50)
 
-#define EE_FEATURE_START            (EE_ITEMS_START+50)
-#define EE_FEATURE_TAB              (EE_ITEMS_START+50)
-#define EE_FEATURE_LINEBR           (EE_ITEMS_START+51)
-#define EE_FEATURE_NOTCONV          (EE_ITEMS_START+52)
-#define EE_FEATURE_FIELD            (EE_ITEMS_START+53)
-#define EE_FEATURE_END              (EE_ITEMS_START+53)
+#define EE_FEATURE_START            (EE_ITEMS_START+51)
+#define EE_FEATURE_TAB              (EE_ITEMS_START+51)
+#define EE_FEATURE_LINEBR           (EE_ITEMS_START+52)
+#define EE_FEATURE_NOTCONV          (EE_ITEMS_START+53)
+#define EE_FEATURE_FIELD            (EE_ITEMS_START+54)
+#define EE_FEATURE_END              (EE_ITEMS_START+54)
 
-#define EE_ITEMS_END                (EE_ITEMS_START+53)
+#define EE_ITEMS_END                (EE_ITEMS_START+54)
 
 #define EDITITEMCOUNT ( EE_ITEMS_END - EE_ITEMS_START + 1 )
 
commit 4693d7cc99fa4b659f834e703b8bbb0424d55fee
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Thu May 29 16:31:28 2014 -0400

    Added class SvxBackgroundColorItem
    
    Change-Id: If10795bbbd9fc911896b57bbab5410bc1e62f71f
    (cherry picked from commit ad6a2607f09d2f770e683a21ad7243a077d65a7a)

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index bfd0c38..87f456f 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -136,7 +136,6 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
         //pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
 
     // FIXME(matteocam)
-
     if ( pOutDev )
         pOutDev->SetTextFillColor(aColor);
 }
@@ -230,6 +229,28 @@ void EditCharAttribColor::SetFont( SvxFont& rFont, OutputDevice* )
     //fprintf(stderr, "Called SetFont with Color %d\n", aColor.GetColor());
 }
 
+// class EditCharAttribBackgroundColor
+
+EditCharAttribBackgroundColor::EditCharAttribBackgroundColor(
+                                const SvxBackgroundColorItem& rAttr,
+                                  sal_uInt16 _nStart,
+                                  sal_uInt16 _nEnd )
+    : EditCharAttrib( rAttr, _nStart, _nEnd )
+{
+    // FIXME(matteocam)
+    //DBG_ASSERT( rAttr.Which() == EE_CHAR_BKG_COLOR, "Not a BackgroundColor attribute!" );
+}
+
+void EditCharAttribBackgroundColor::SetFont( SvxFont& rFont, OutputDevice* )
+{
+    /* FIXME(matteocam)
+     *
+    Color aColor = ((const SvxBackgroundColorItem*)GetItem())->GetValue();
+    rFont.SetFillColor( aColor); // XXX: Is it SetFillColor we want?
+    */
+
+}
+
 
 // class EditCharAttribLanguage
 
diff --git a/editeng/source/editeng/editattr.hxx b/editeng/source/editeng/editattr.hxx
index 81ecb19..7424417 100644
--- a/editeng/source/editeng/editattr.hxx
+++ b/editeng/source/editeng/editattr.hxx
@@ -38,6 +38,7 @@ class SvxOverlineItem;
 class SvxFontHeightItem;
 class SvxCharScaleWidthItem;
 class SvxColorItem;
+class SvxBackgroundColorItem;
 class SvxAutoKernItem;
 class SvxKerningItem;
 class SvxWordLineModeItem;
@@ -308,6 +309,18 @@ public:
     virtual void    SetFont( SvxFont& rFont, OutputDevice* pOutDev ) SAL_OVERRIDE;
 };
 
+// class EditCharAttribBackgroundColor
+
+class EditCharAttribBackgroundColor : public EditCharAttrib
+{
+public:
+    EditCharAttribBackgroundColor(const SvxBackgroundColorItem& rAttr,
+                                  sal_uInt16 nStart,
+                                  sal_uInt16 nEnd );
+    virtual void    SetFont(SvxFont& rFont, OutputDevice* pOutDev) SAL_OVERRIDE;
+};
+
+
 
 // class EditCharAttribLanguage
 
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index eb7aaec..ca4d0f7 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -122,6 +122,8 @@ TYPEINIT1_FACTORY(SvxWordLineModeItem, SfxBoolItem, new SvxWordLineModeItem(fals
 TYPEINIT1_FACTORY(SvxContourItem, SfxBoolItem, new SvxContourItem(false, 0));
 TYPEINIT1_FACTORY(SvxPropSizeItem, SfxUInt16Item, new SvxPropSizeItem(100, 0));
 TYPEINIT1_FACTORY(SvxColorItem, SfxPoolItem, new SvxColorItem(0));
+// FIXME(matteocam): Should 2nd argoment of next line SfxColorItem or SfxPoolItem?
+TYPEINIT1_FACTORY(SvxBackgroundColorItem, SvxColorItem, new SvxBackgroundColorItem(0));
 TYPEINIT1_FACTORY(SvxCharSetColorItem, SvxColorItem, new SvxCharSetColorItem(0));
 TYPEINIT1_FACTORY(SvxKerningItem, SfxInt16Item, new SvxKerningItem(0, 0));
 TYPEINIT1_FACTORY(SvxCaseMapItem, SfxEnumItem, new SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED, 0));
@@ -1907,6 +1909,43 @@ SfxItemPresentation SvxPropSizeItem::GetPresentation
     return SFX_ITEM_PRESENTATION_NONE;
 }
 
+// class SvxBackgroundColorItem -----------------------------------------
+
+SvxBackgroundColorItem::SvxBackgroundColorItem( const sal_uInt16 nId ) :
+    SvxColorItem( nId )
+{
+}
+
+
+
+SvxBackgroundColorItem::SvxBackgroundColorItem( const Color& rCol,
+                                                const sal_uInt16 nId ) :
+    SvxColorItem( rCol, nId )
+{
+}
+
+SvxBackgroundColorItem:: SvxBackgroundColorItem( SvStream& rStrm, const sal_uInt16 Id  ) :
+    SvxColorItem( rStrm, Id )
+{
+}
+
+SvxBackgroundColorItem::SvxBackgroundColorItem( const SvxBackgroundColorItem& rCopy ) :
+    SvxColorItem( rCopy )
+{
+}
+
+SfxPoolItem* SvxBackgroundColorItem::Clone( SfxItemPool * ) const
+{
+    return new SvxBackgroundColorItem( *this );
+}
+
+
+SfxPoolItem* SvxBackgroundColorItem::Create(SvStream& rStrm, sal_uInt16 ) const
+{
+    return new SvxBackgroundColorItem( rStrm, Which() );
+}
+
+
 // class SvxColorItem ----------------------------------------------------
 
 SvxColorItem::SvxColorItem( const sal_uInt16 nId ) :
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index fc82bd2..815d2ed 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -77,6 +77,31 @@ public:
 
 };
 
+/*
+ *  FIXME(matteocam):
+ * both classes Svx{Background,}Color should be derived from a
+ * common ancestor or be totally separate (not recommended probably).
+*/
+
+// class SvxBackgroundColorItem
+
+// XXX: to be moved in a separate header.
+class EDITENG_DLLPUBLIC SvxBackgroundColorItem : public SvxColorItem
+{
+    public:
+        TYPEINFO_OVERRIDE();
+
+        SvxBackgroundColorItem( const sal_uInt16 nId );
+        SvxBackgroundColorItem( const Color& rCol,
+                                const sal_uInt16 nId );
+        SvxBackgroundColorItem( SvStream& rStrm, const sal_uInt16 nId  );
+        SvxBackgroundColorItem( const SvxBackgroundColorItem& rCopy );
+
+        virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
+        virtual SfxPoolItem*     Create(SvStream &, sal_uInt16) const SAL_OVERRIDE;
+
+};
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit a74e588518df1a3f5e7209e52dcaccf38ae88e56
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Thu May 29 11:14:09 2014 -0400

    Setting SetTextFillColor from Attrs. Experiment with line color
    
    Change-Id: If34f000d6c5ef6ec38f7f735ada194b8fff4f56d
    (cherry picked from commit 7fb0e8c9a659417607c85f9b0e8245e4af4552dc)

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index c7eab83..bfd0c38 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -128,12 +128,15 @@ EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr,
 
 void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
 {
+    Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF);  // blue-ish
+
     rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())->GetValue() );
-    if ( pOutDev )
-        pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
+    if ( pOutDev ) // FIXME(matteocam)
+        pOutDev->SetTextLineColor( aColor );
+        //pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
 
     // FIXME(matteocam)
-    Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF);  // blue-ish
+
     if ( pOutDev )
         pOutDev->SetTextFillColor(aColor);
 }
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index fcdcb9a..fbc0db3 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -465,6 +465,7 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
 
 void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
 {
+
     if( mbInitClipRegion )
         InitClipRegion();
     if( mbOutputClipped )
@@ -828,6 +829,8 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
                              MetricVector* pVector, OUString* pDisplayText
                              )
 {
+
+
     if(nLen == 0x0FFFF)
     {
         SAL_INFO("sal.rtl.xub",
@@ -948,6 +951,12 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
                                   const sal_Int32* pDXAry,
                                   sal_Int32 nIndex, sal_Int32 nLen )
 {
+    fprintf(stderr, "TextFillColor printing %c is (%d, %d, %d)\n",
+        (char) rStr.toChar(),
+        GetTextFillColor().GetRed(),
+        GetTextFillColor().GetGreen(),
+        GetTextFillColor().GetBlue());
+
     if(nLen == 0x0FFFF)
     {
         SAL_INFO("sal.rtl.xub",
@@ -1429,6 +1438,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
                                  MetricVector* pVector, OUString* pDisplayText,
                                  ::vcl::ITextLayout& _rLayout )
 {
+
     Color aOldTextColor;
     Color aOldTextFillColor;
     bool  bRestoreFillColor = false;
commit 7b59e44925b4c46e682661f5468d7aa2d7d3231d
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed May 28 17:11:18 2014 -0400

    Cleaned up code from tranparency in vcl. Trying setfillcolor from edit attrs
    
    Change-Id: I263012332e43573f260ac8c54612576eb21a11a1
    (cherry picked from commit 02385eb4d8de3c5a57511d8bae3c42a523470838)

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 2e3097e..c7eab83 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -131,6 +131,11 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
     rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())->GetValue() );
     if ( pOutDev )
         pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
+
+    // FIXME(matteocam)
+    Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF);  // blue-ish
+    if ( pOutDev )
+        pOutDev->SetTextFillColor(aColor);
 }
 
 
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 33ff382..fcdcb9a 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -149,14 +149,7 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
 
     nX += nBaseX;
     nY += nBaseY;
-    //mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this ); // original code
-
-    Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
-    Polygon   aPoly( aRect );
-    PolyPolygon aPolyPoly(aPoly);
-    Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF);
-    SetTextFillColor(aColor);
-    DrawTransparent(aPolyPoly, 70);
+    mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this ); // original code
 
 }
 
commit be34ea6f62a357eaaab01ce14e2882528015e1d1
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed May 28 16:20:14 2014 -0400

    Cleaned up code from operations in vcl
    
    Change-Id: Ica5194f0cf6e30ec099974ae8b794fb2bc5e654a
    (cherry picked from commit 4445f361aa2730b61fdd339dcdd7014b266e5c42)

diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index b5053b2..86a8090 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2556,6 +2556,9 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
 
     rFont = pNode->GetCharAttribs().GetDefFont();
 
+    /*
+     * Set attributes for script types Asian and Complex
+    */
     short nScriptType = GetI18NScriptType( EditPaM( pNode, nPos ) );
     if ( ( nScriptType == i18n::ScriptType::ASIAN ) || ( nScriptType == i18n::ScriptType::COMPLEX ) )
     {
@@ -2574,6 +2577,9 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
 
     sal_uInt16 nRelWidth = ((const SvxCharScaleWidthItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_FONTWIDTH)).GetValue();
 
+    /*
+     * Set output device's line and overline colors
+    */
     if ( pOut )
     {
         const SvxUnderlineItem& rTextLineColor = (const SvxUnderlineItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_UNDERLINE );
@@ -2594,6 +2600,9 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
 
     const SvxLanguageItem* pCJKLanguageItem = NULL;
 
+    /*
+     * Scan through char attributes of pNode
+    */
     if ( aStatus.UseCharAttribs() )
     {
         CharAttribList::AttribsType& rAttribs = pNode->GetCharAttribs().GetAttribs();
@@ -3412,6 +3421,12 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
                                              ' ' == aText[nTextStart + nTextLen - 1] )
                                             --nTextLen;
 
+                                        // FIXME(matteocam)
+                                        if (aTmpFont.GetItalic() != ITALIC_NONE) {
+                                            Color aColor = COL_BROWN;
+                                            aTmpFont.SetFillColor(aColor);
+                                        }
+
                                         // output directly
                                         aTmpFont.QuickDrawText( pOutDev, aRealOutPos, aText, nTextStart, nTextLen, pDXArray );
 
@@ -3684,6 +3699,8 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev
             SvxFont aTmpFont;
             ContentNode* pNode = GetEditDoc().GetObject( 0 );
             SeekCursor( pNode, 1, aTmpFont );
+
+
             Color aFontColor( aTmpFont.GetColor() );
             if( (aFontColor == COL_AUTO) || IsForceAutoColor() )
                 aFontColor = GetAutoColor();
diff --git a/include/editeng/eeitem.hxx b/include/editeng/eeitem.hxx
index 8dcf5c5..b42b326 100644
--- a/include/editeng/eeitem.hxx
+++ b/include/editeng/eeitem.hxx
@@ -80,18 +80,18 @@
 #define EE_CHAR_OVERLINE            (EE_ITEMS_START+47)
 #define EE_CHAR_CASEMAP             (EE_ITEMS_START+48)
 #define EE_CHAR_GRABBAG             (EE_ITEMS_START+49)
-#define EE_CHAR_BKGCOLOR            (EE_ITEMS_START+50)
+//#define EE_CHAR_BKGCOLOR            (EE_ITEMS_START+50)
 
-#define EE_CHAR_END                 (EE_ITEMS_START+50)
+#define EE_CHAR_END                 (EE_ITEMS_START+49)
 
-#define EE_FEATURE_START            (EE_ITEMS_START+51)
-#define EE_FEATURE_TAB              (EE_ITEMS_START+51)
-#define EE_FEATURE_LINEBR           (EE_ITEMS_START+52)
-#define EE_FEATURE_NOTCONV          (EE_ITEMS_START+53)
-#define EE_FEATURE_FIELD            (EE_ITEMS_START+54)
-#define EE_FEATURE_END              (EE_ITEMS_START+54)
+#define EE_FEATURE_START            (EE_ITEMS_START+50)
+#define EE_FEATURE_TAB              (EE_ITEMS_START+50)
+#define EE_FEATURE_LINEBR           (EE_ITEMS_START+51)
+#define EE_FEATURE_NOTCONV          (EE_ITEMS_START+52)
+#define EE_FEATURE_FIELD            (EE_ITEMS_START+53)
+#define EE_FEATURE_END              (EE_ITEMS_START+53)
 
-#define EE_ITEMS_END                (EE_ITEMS_START+54)
+#define EE_ITEMS_END                (EE_ITEMS_START+53)
 
 #define EDITITEMCOUNT ( EE_ITEMS_END - EE_ITEMS_START + 1 )
 
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index 1a728f3..b4a3614 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -60,12 +60,10 @@ public:
     void                SetAlign( FontAlign );
     FontAlign           GetAlign() const;
 
-    // XXX: now font has background iff it is (single-y) underlined
-    // also forces non transparency
-    bool                HasBackgroundColor() const {
+    // FIXME(matteocam) // XXX: is this the right spot for changes?
+    void                SetBackgroundColor(const Color &);
+    const Color&        GetBackgroundColor() const;
 
-                return GetUnderline() == UNDERLINE_SINGLE;
-    }
 
     void                SetName( const OUString& rFamilyName );
     const OUString&     GetName() const;
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 489304e..616fb61 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -301,6 +301,15 @@ void Font::SetFillColor( const Color& rColor )
         mpImplFont->mbTransparent = true;
 }
 
+void Font::SetBackgroundColor(const Color& rColor)
+{
+    // FIXME
+    //MakeUnique();
+    /*mpImplFont->maBkgColor = rColor;
+    if () */
+}
+
+
 void Font::SetTransparent( bool bTransparent )
 {
 
@@ -957,6 +966,8 @@ const Color& Font::GetColor() const { return mpImplFont->maColor; }
 
 const Color& Font::GetFillColor() const { return mpImplFont->maFillColor; }
 
+const Color& Font::GetBackgroundColor() const { /*return mpImplFont->maBkgColor;*/ }
+
 bool Font::IsTransparent() const { return mpImplFont->mbTransparent; }
 
 FontAlign Font::GetAlign() const { return mpImplFont->meAlign; }
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 15fa53c..2dcaf11 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -520,8 +520,6 @@ void OutputDevice::SetFont( const Font& rNewFont )
 
         aFont.SetColor( aTextColor );
 
-        mbTextBackground = aFont.HasBackgroundColor();
-
         bool bTransFill = aFont.IsTransparent();
         if ( !bTransFill )
         {
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 2d50f4d..33ff382 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -481,18 +481,6 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
 
     rSalLayout.DrawBase() += Point( mnTextOffX, mnTextOffY );
 
-    /*
-     if the text has some background get it
-     and the set it as the new filling color
-    */
-    if (mbTextBackground) {
-        // FIXME(matteocam)
-        // set right background // (XXX: now getting fixed color)
-        Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF); // blue-ish
-        // SetBackground does not work
-        SetTextFillColor(aColor);
-    }
-
     if( IsTextFillColor() )
         ImplDrawTextBackground( rSalLayout );
 
commit fcbfcc75ed6157f4eb4124c7cfeda4346ddc6b45
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue May 27 16:55:52 2014 -0400

    Added EE_CHAR_BKGCOLOR
    
    Change-Id: I767e2df4e5451c208b26c568f1977d820aa4075c
    (cherry picked from commit 8118ec855bbc2d55afd0438ba698c24fb0006d58)

diff --git a/include/editeng/eeitem.hxx b/include/editeng/eeitem.hxx
index 5d90714..8dcf5c5 100644
--- a/include/editeng/eeitem.hxx
+++ b/include/editeng/eeitem.hxx
@@ -80,16 +80,18 @@
 #define EE_CHAR_OVERLINE            (EE_ITEMS_START+47)
 #define EE_CHAR_CASEMAP             (EE_ITEMS_START+48)
 #define EE_CHAR_GRABBAG             (EE_ITEMS_START+49)
-#define EE_CHAR_END                 (EE_ITEMS_START+49)
+#define EE_CHAR_BKGCOLOR            (EE_ITEMS_START+50)
 
-#define EE_FEATURE_START            (EE_ITEMS_START+50)
-#define EE_FEATURE_TAB              (EE_ITEMS_START+50)
-#define EE_FEATURE_LINEBR           (EE_ITEMS_START+51)
-#define EE_FEATURE_NOTCONV          (EE_ITEMS_START+52)
-#define EE_FEATURE_FIELD            (EE_ITEMS_START+53)
-#define EE_FEATURE_END              (EE_ITEMS_START+53)
+#define EE_CHAR_END                 (EE_ITEMS_START+50)
 
-#define EE_ITEMS_END                (EE_ITEMS_START+53)
+#define EE_FEATURE_START            (EE_ITEMS_START+51)
+#define EE_FEATURE_TAB              (EE_ITEMS_START+51)
+#define EE_FEATURE_LINEBR           (EE_ITEMS_START+52)
+#define EE_FEATURE_NOTCONV          (EE_ITEMS_START+53)
+#define EE_FEATURE_FIELD            (EE_ITEMS_START+54)
+#define EE_FEATURE_END              (EE_ITEMS_START+54)
+
+#define EE_ITEMS_END                (EE_ITEMS_START+54)
 
 #define EDITITEMCOUNT ( EE_ITEMS_END - EE_ITEMS_START + 1 )
 
commit dbff42a078fbf2119ab9d8aa232ed673d9a2d91d
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue May 27 16:05:44 2014 -0400

     SetTextFillColor immediately before DrawTransparent. DrawTextRect commented
    
    Change-Id: Id283624484dfcda91546fd4965bc0b6b92614f55
    (cherry picked from commit ebc7be61df384120f1d0420d3e4dc5e3ac5599f4)

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 50958a7..2d50f4d 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -149,14 +149,14 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
 
     nX += nBaseX;
     nY += nBaseY;
-    mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this ); // original code
+    //mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this ); // original code
 
     Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
     Polygon   aPoly( aRect );
     PolyPolygon aPolyPoly(aPoly);
-    DrawTransparent(aPolyPoly, 50);
-    // Code above is wrong: it just messes up.
-
+    Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF);
+    SetTextFillColor(aColor);
+    DrawTransparent(aPolyPoly, 70);
 
 }
 
@@ -486,6 +486,7 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
      and the set it as the new filling color
     */
     if (mbTextBackground) {
+        // FIXME(matteocam)
         // set right background // (XXX: now getting fixed color)
         Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF); // blue-ish
         // SetBackground does not work
commit 44f6d7a2c5cfdbbea390f433bb56b8be869ae1b0
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue May 27 12:04:10 2014 -0400

    Transparency with DrawTransparent in addition to DrawRect
    
    Change-Id: I9e8221652b74a3004857ef4b12c6b45563a373b5
    (cherry picked from commit 2f8660008ddd32c8f24825d5ba3e751bc65d6d3e)

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 8da85a6..50958a7 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -149,11 +149,14 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
 
     nX += nBaseX;
     nY += nBaseY;
-    //mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this ); // original code
+    mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this ); // original code
+
     Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
     Polygon   aPoly( aRect );
     PolyPolygon aPolyPoly(aPoly);
     DrawTransparent(aPolyPoly, 50);
+    // Code above is wrong: it just messes up.
+
 
 }
 
commit 6b490f6be9cd87c813c97560f3ca6d0790c54c37
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue May 27 11:35:40 2014 -0400

    Transparency by replacing DrawRect
    
    Change-Id: I5ba220df841cbe650c910c1c7bc1815900f13c53
    (cherry picked from commit 6ec2a1a6922d22fa5efb25982b0b51cef7a97499)

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 9492892..8da85a6 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -149,7 +149,12 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
 
     nX += nBaseX;
     nY += nBaseY;
-    mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this );
+    //mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this ); // original code
+    Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
+    Polygon   aPoly( aRect );
+    PolyPolygon aPolyPoly(aPoly);
+    DrawTransparent(aPolyPoly, 50);
+
 }
 
 void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
@@ -474,12 +479,12 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
     rSalLayout.DrawBase() += Point( mnTextOffX, mnTextOffY );
 
     /*
-     if the text has some background get it (XXX: now getting fixed color)
+     if the text has some background get it
      and the set it as the new filling color
     */
     if (mbTextBackground) {
-        // set right background
-        Color aColor = COL_BLUE;
+        // set right background // (XXX: now getting fixed color)
+        Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF); // blue-ish
         // SetBackground does not work
         SetTextFillColor(aColor);
     }
commit f850bbb4cb28014ac420e53ee86cda528a0943cc
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat May 24 13:59:33 2014 -0400

    Changed SetFillColor to SetTextFillColor
    
    Change-Id: I3c19ac80318733ccae1e8829e3269ec8c716869e
    (cherry picked from commit 33384f3d23958b62e1ec9f72f2a0e6424313a177)

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index da47c4d..9492892 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -481,7 +481,7 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
         // set right background
         Color aColor = COL_BLUE;
         // SetBackground does not work
-        SetFillColor(aColor);
+        SetTextFillColor(aColor);
     }
 
     if( IsTextFillColor() )
commit 23cd36d876057028d53d1c1f5452acc51a705b2b
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat May 24 13:06:44 2014 -0400

    Fixed color problem
    
    Change-Id: I7e9340ebab26d3c979571155a3e9d051c41c58f4
    (cherry picked from commit aa7d40399758c7f2270dfb0b71f4bcc39d0e24ea)

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index eeb1575..da47c4d 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -479,7 +479,7 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
     */
     if (mbTextBackground) {
         // set right background
-        Color aColor = COL_PINK;
+        Color aColor = COL_BLUE;
         // SetBackground does not work
         SetFillColor(aColor);
     }
commit be085bf52324f8b1c7f59a3d49a39e14e04824df
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat May 24 13:02:43 2014 -0400

    Moved Text Filling Color in OutDev. Text Filling occurs in ImplDrawText
    
    Change-Id: I9c75066a8dea32721757d0511a2af58c68408438
    (cherry picked from commit b09cf493611f2521e66159287b88acc3c05d6d33)

diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index e9f2a71..718675b 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -459,14 +459,11 @@ void SvxFont::QuickDrawText( OutputDevice *pOut,
 
     fprintf(stderr, "About to print %s\n", rTxt.getStr());
 
+
+
     // Font has to be selected in OutputDevice...
     if ( !IsCaseMap() && !IsCapital() && !IsKern() && !IsEsc() )
     {
-    // set right background
-    if ( HasBackgroundColor() ) {
-        Color aColor = COL_RED;
-        pOut->SetTextFillColor(aColor);
-    }
         pOut->DrawTextArray( rPos, rTxt, pDXArray, nIdx, nLen );
         return;
     }
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index 7102ef9..1a728f3 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -61,7 +61,9 @@ public:
     FontAlign           GetAlign() const;
 
     // XXX: now font has background iff it is (single-y) underlined
+    // also forces non transparency
     bool                HasBackgroundColor() const {
+
                 return GetUnderline() == UNDERLINE_SINGLE;
     }
 
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 85e3076..a0edcc7 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1040,7 +1040,7 @@ public:
     void                        SetTextFillColor();
     void                        SetTextFillColor( const Color& rColor );
     Color                       GetTextFillColor() const;
-    bool                        IsTextFillColor() const { return !maFont.IsTransparent(); }
+    bool                        IsTextFillColor() const {  return maFont.GetUnderline() == UNDERLINE_SINGLE; /*return !maFont.IsTransparent();*/ }
 
     void                        SetTextLineColor();
     void                        SetTextLineColor( const Color& rColor );
@@ -1097,7 +1097,7 @@ private:
     SAL_DLLPRIVATE void         ImplInitAboveTextLineSize();
 
 
-    SAL_DLLPRIVATE bool         ImplDrawTextDirect( SalLayout&, bool bTextLines, bool bTextBkg = false, sal_uInt32 flags = 0 );
+    SAL_DLLPRIVATE bool         ImplDrawTextDirect( SalLayout&, bool bTextLines, sal_uInt32 flags = 0 );
     SAL_DLLPRIVATE void         ImplDrawSpecialText( SalLayout& );
     SAL_DLLPRIVATE void         ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight );
 
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 8787a6e..15fa53c 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -521,11 +521,6 @@ void OutputDevice::SetFont( const Font& rNewFont )
         aFont.SetColor( aTextColor );
 
         mbTextBackground = aFont.HasBackgroundColor();
-        if ( mbTextBackground )
-        {
-            Color aRedColor ( COL_RED );
-            SetBackground(aRedColor);
-        }
 
         bool bTransFill = aFont.IsTransparent();
         if ( !bTransFill )
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 52c0537..eeb1575 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -281,7 +281,6 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
 
 bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
                                                                     bool bTextLines,
-                                                                    bool bTextBkg,
                                                                     sal_uInt32 flags )
 {
     if( mpFontEntry->mnOwnOrientation )
@@ -289,6 +288,8 @@ bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
             return true;
 
 
+
+
     long nOldX = rSalLayout.DrawBase().X();
     if( HasMirroredGraphics() )
     {
@@ -427,7 +428,7 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
 
         if ( maFont.IsOutline() )
         {
-            if(! ImplDrawTextDirect( rSalLayout, mbTextLines, false, DRAWTEXT_F_OUTLINE))
+            if(! ImplDrawTextDirect( rSalLayout, mbTextLines, DRAWTEXT_F_OUTLINE))
             {
                 rSalLayout.DrawBase() = aOrigPos + Point(-1,-1);
                 ImplDrawTextDirect( rSalLayout, mbTextLines );
@@ -472,13 +473,24 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
 
     rSalLayout.DrawBase() += Point( mnTextOffX, mnTextOffY );
 
+    /*
+     if the text has some background get it (XXX: now getting fixed color)
+     and the set it as the new filling color
+    */
+    if (mbTextBackground) {
+        // set right background
+        Color aColor = COL_PINK;
+        // SetBackground does not work
+        SetFillColor(aColor);
+    }
+
     if( IsTextFillColor() )
         ImplDrawTextBackground( rSalLayout );
 
     if( mbTextSpecial )
         ImplDrawSpecialText( rSalLayout );
     else
-        ImplDrawTextDirect( rSalLayout, mbTextLines, mbTextBackground );
+        ImplDrawTextDirect( rSalLayout, mbTextLines );
 }
 
 long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
@@ -836,6 +848,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
         nLen = rStr.getLength() - nIndex;
     }
 
+
     if( mpOutDevData && mpOutDevData->mpRecordLayout )
     {
         pVector = &mpOutDevData->mpRecordLayout->m_aUnicodeBoundRects;
commit 039599e9d52461ea57a9690f847bbfe5bae6f3aa
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Thu May 22 16:18:29 2014 -0400

    Put text filling in SvxFont
    
    Change-Id: I290fff0cb66fc07122b976d977dff24ac491e108
    (cherry picked from commit ea56441757a34082b9ffc5f28936413fcb55e31a)

diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 895eef6..e9f2a71 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -457,9 +457,16 @@ void SvxFont::QuickDrawText( OutputDevice *pOut,
     const sal_Int32 nIdx, const sal_Int32 nLen, const sal_Int32* pDXArray ) const
 {
 
+    fprintf(stderr, "About to print %s\n", rTxt.getStr());
+
     // Font has to be selected in OutputDevice...
     if ( !IsCaseMap() && !IsCapital() && !IsKern() && !IsEsc() )
     {
+    // set right background
+    if ( HasBackgroundColor() ) {
+        Color aColor = COL_RED;
+        pOut->SetTextFillColor(aColor);
+    }
         pOut->DrawTextArray( rPos, rTxt, pDXArray, nIdx, nLen );
         return;
     }
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 2f3303b..52c0537 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -288,6 +288,7 @@ bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
         if( ImplDrawRotateText( rSalLayout ) )
             return true;
 
+
     long nOldX = rSalLayout.DrawBase().X();
     if( HasMirroredGraphics() )
     {
@@ -330,10 +331,6 @@ bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
             maFont.GetStrikeout(), maFont.GetUnderline(), maFont.GetOverline(),
             maFont.IsWordLineMode(), ImplIsUnderlineAbove( maFont ) );
 
-    // draw background
-    if ( bTextBkg ) {
-
-    }
 
     // emphasis marks
     if( maFont.GetEmphasisMark() & EMPHASISMARK_STYLE )
commit d097bc8e156b50a4fd04dd82c42efa2921f0e886
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Thu May 22 13:53:19 2014 -0400

    HasBkg method to Font.HasBkg iff HasSingleUnderline.SetBkgColor in OutputDev
    
    Change-Id: I10e6e1b916df0c78d26596a37944e8b57b2897e7
    (cherry picked from commit 181266201b5e6aaad1dcd9cbc2dd4db44ecf3dc5)

diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 436c375..b5053b2 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3673,7 +3673,12 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev
         VirtualDevice* pVDev = GetVirtualDevice( pTarget->GetMapMode(), pTarget->GetDrawMode() );
         pVDev->SetDigitLanguage( GetRefDevice()->GetDigitLanguage() );
 
+        /*
+         * Set the appropriate background color according
+         * to text criteria
+        */
         {
+
             Color aBackgroundColor( pView->GetBackgroundColor() );
             // #i47161# Check if text is visible on background
             SvxFont aTmpFont;
@@ -3699,11 +3704,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev
             if( nColorDiff < 8 )
                 aBackgroundColor = aFontColor.IsDark() ? COL_WHITE : COL_BLACK;
 
-            // XXX: BEGIN my changes
-            aBackgroundColor = COL_GRAY;
             pVDev->SetBackground( aBackgroundColor );
-            // END my changes
-            //pVDev->SetBackground( aBackgroundColor ); // original code
         }
 
         bool bVDevValid = true;
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 7feb70e..895eef6 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -456,6 +456,7 @@ void SvxFont::QuickDrawText( OutputDevice *pOut,
     const Point &rPos, const OUString &rTxt,
     const sal_Int32 nIdx, const sal_Int32 nLen, const sal_Int32* pDXArray ) const
 {
+
     // Font has to be selected in OutputDevice...
     if ( !IsCaseMap() && !IsCapital() && !IsKern() && !IsEsc() )
     {
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index 5e0b134..7102ef9 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -60,6 +60,11 @@ public:
     void                SetAlign( FontAlign );
     FontAlign           GetAlign() const;
 
+    // XXX: now font has background iff it is (single-y) underlined
+    bool                HasBackgroundColor() const {
+                return GetUnderline() == UNDERLINE_SINGLE;
+    }
+
     void                SetName( const OUString& rFamilyName );
     const OUString&     GetName() const;
     void                SetStyleName( const OUString& rStyleName );
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 199ca08..85e3076 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -340,6 +340,7 @@ private:
     mutable bool                    mbKerning : 1;
     mutable bool                    mbNewFont : 1;
     mutable bool                    mbTextLines : 1;
+    mutable bool                    mbTextBackground : 1;
     mutable bool                    mbTextSpecial : 1;
     mutable bool                    mbRefPoint : 1;
     mutable bool                    mbEnableRTL : 1;
@@ -644,7 +645,7 @@ public:
     ///@}
 
 
-    /** @name Rectangle functions
+    /** @name Rectangle functionsf
      */
     ///@{
 
@@ -1096,7 +1097,7 @@ private:
     SAL_DLLPRIVATE void         ImplInitAboveTextLineSize();
 
 
-    SAL_DLLPRIVATE bool         ImplDrawTextDirect( SalLayout&, bool bTextLines, sal_uInt32 flags = 0 );
+    SAL_DLLPRIVATE bool         ImplDrawTextDirect( SalLayout&, bool bTextLines, bool bTextBkg = false, sal_uInt32 flags = 0 );
     SAL_DLLPRIVATE void         ImplDrawSpecialText( SalLayout& );
     SAL_DLLPRIVATE void         ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight );
 
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 5c0333f..e1e431c 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1594,6 +1594,7 @@ bool OutputDevice::ImplNewFont() const
     mbTextSpecial   = maFont.IsShadow() || maFont.IsOutline() ||
                       (maFont.GetRelief() != RELIEF_NONE);
 
+
     // #95414# fix for OLE objects which use scale factors very creatively
     if( mbMap && !aSize.Width() )
     {
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 2dcaf11..8787a6e 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -520,6 +520,13 @@ void OutputDevice::SetFont( const Font& rNewFont )
 
         aFont.SetColor( aTextColor );
 
+        mbTextBackground = aFont.HasBackgroundColor();
+        if ( mbTextBackground )
+        {
+            Color aRedColor ( COL_RED );
+            SetBackground(aRedColor);
+        }
+
         bool bTransFill = aFont.IsTransparent();
         if ( !bTransFill )
         {
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index b7bb028..2f3303b 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -279,7 +279,10 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
     return true;
 }
 
-bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, bool bTextLines, sal_uInt32 flags )

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list