[Libreoffice-commits] core.git: drawinglayer/source include/drawinglayer

Armin Le Grand Armin.Le.Grand at cib.de
Tue Sep 12 11:27:02 UTC 2017


 drawinglayer/source/primitive2d/textprimitive2d.cxx  |    9 +++++----
 include/drawinglayer/primitive2d/textprimitive2d.hxx |   17 ++++++++++-------
 2 files changed, 15 insertions(+), 11 deletions(-)

New commits:
commit 41c704a8d6ca225e0ba0b1deb730c2bead66da25
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Tue Sep 12 10:30:01 2017 +0200

    tdf#111853 Added TextFillColor to operator==
    
    TextFillColor was added to TextSimplePortionPrimitive2D, but not added to
    TextSimplePortionPrimitive2D::operator==, so when this changed it was not
    detected. Added this.
    Also added was bFilled and nWidthToFill, all defaulted. This is not accessible
    for TextDecoratedPortionPrimitive2D and seems to be some special solution
    just for one special case in DrawPortionInfo, only used from Outliner::DrawingTab,
    so I am not sure if that change to the central TextSimplePortionPrimitive2D is
    good and should stay
    
    Change-Id: Ief8da74a8b66281e47c4c8a47131125e30b90e7d
    Reviewed-on: https://gerrit.libreoffice.org/42188
    Reviewed-by: Armin Le Grand <Armin.Le.Grand at cib.de>
    Tested-by: Armin Le Grand <Armin.Le.Grand at cib.de>

diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index 0cf27bbba440..3dc00a9e1a99 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -225,7 +225,7 @@ namespace drawinglayer
             const basegfx::BColor& rFontColor,
             bool bFilled,
             long nWidthToFill,
-            const Color& rFillColor)
+            const Color& rTextFillColor)
         :   BufferedDecompositionPrimitive2D(),
             maTextTransform(rNewTransform),
             maText(rText),
@@ -235,10 +235,10 @@ namespace drawinglayer
             maFontAttribute(rFontAttribute),
             maLocale(rLocale),
             maFontColor(rFontColor),
-            maB2DRange(),
             mbFilled(bFilled),
             mnWidthToFill(nWidthToFill),
-            maTextFillColor(rFillColor)
+            maTextFillColor(rTextFillColor),
+            maB2DRange()
         {
 #if OSL_DEBUG_LEVEL > 0
             const sal_Int32 aStringLength(getText().getLength());
@@ -269,7 +269,8 @@ namespace drawinglayer
                     && LocalesAreEqual(getLocale(), rCompare.getLocale())
                     && getFontColor() == rCompare.getFontColor()
                     && mbFilled == rCompare.mbFilled
-                    && mnWidthToFill == rCompare.mnWidthToFill);
+                    && mnWidthToFill == rCompare.mnWidthToFill
+                    && maTextFillColor == rCompare.maTextFillColor);
             }
 
             return false;
diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx b/include/drawinglayer/primitive2d/textprimitive2d.hxx
index 6b6b8381c563..2eb208f271ce 100644
--- a/include/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -93,7 +93,7 @@ namespace drawinglayer
 
             @param nWidthToFill
 
-            @param rFillColor
+            @param rTextFillColor
             Text background color (has nothing to do with bFilled and nWidthToFill)
 
          */
@@ -119,20 +119,23 @@ namespace drawinglayer
             attribute::FontAttribute                maFontAttribute;
 
             /// The Locale for the text
-            css::lang::Locale                      maLocale;
+            css::lang::Locale                       maLocale;
 
             /// font color
             basegfx::BColor                         maFontColor;
 
+            // Whether to fill a given width with the text
+            bool                                    mbFilled;
 
-            /// #i96669# internal: add simple range buffering for this primitive
-            basegfx::B2DRange                       maB2DRange;
-            bool                                    mbFilled;           // Whether to fill a given width with the text
-            long                                    mnWidthToFill;      // the width to fill
+            // the width to fill
+            long                                    mnWidthToFill;
 
             /// The fill color of the text
             Color                                   maTextFillColor;
 
+            /// #i96669# internal: add simple range buffering for this primitive
+            basegfx::B2DRange                       maB2DRange;
+
         protected:
             /// local decomposition.
             virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
@@ -150,7 +153,7 @@ namespace drawinglayer
                 const basegfx::BColor& rFontColor,
                 bool bFilled = false,
                 long nWidthToFill = 0,
-                const Color& rFillColor = COL_TRANSPARENT );
+                const Color& rTextFillColor = COL_TRANSPARENT );
 
             /// helpers
             /** get text outlines as polygons and their according ObjectTransformation. Handles all


More information about the Libreoffice-commits mailing list