[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-text-background-color' - drawinglayer/source include/drawinglayer svx/source

matteocam matteo.campanelli at gmail.com
Mon Jun 16 06:52:55 PDT 2014


 drawinglayer/source/primitive2d/metafileprimitive2d.cxx       |    2 ++
 drawinglayer/source/primitive2d/textbreakuphelper.cxx         |    1 +
 drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx  |    3 ++-
 include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx |    1 +
 svx/source/svdraw/svdotextdecomposition.cxx                   |    6 ++++--
 5 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 00fc45e78d84dddf32b450441bf9028352ec9e52
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

diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 836d72e..4edd597 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)


More information about the Libreoffice-commits mailing list