[Libreoffice-commits] core.git: oox/source

Jacobo Aragunde Pérez jaragunde at igalia.com
Mon Jan 27 06:53:43 PST 2014


 oox/source/drawingml/lineproperties.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5e2b865cf4cfe7ee0cba0d778b50d394ad5e1338
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Mon Jan 27 14:26:47 2014 +0100

    ooxml: fix import of custDash shape line attribute
    
    A LineProperties object can contain some preset dash defined by the
    shape style and some custom dash defined by the shape properties. In
    that case, the custom dash must be used.
    
    The existing code only used the custom dash if no preset dash was
    present.
    
    Change-Id: I6254d95184312360e8782dba7329d5ec2f5441fa

diff --git a/oox/source/drawingml/lineproperties.cxx b/oox/source/drawingml/lineproperties.cxx
index d26fe31..df0ce89 100644
--- a/oox/source/drawingml/lineproperties.cxx
+++ b/oox/source/drawingml/lineproperties.cxx
@@ -373,13 +373,13 @@ void LineProperties::pushToPropMap( ShapePropertyMap& rPropMap,
         sal_Int32 nLineWidth = convertEmuToHmm( moLineWidth.get( 0 ) );
 
         // create line dash from preset dash token (not for invisible line)
-        if( (eLineStyle != drawing::LineStyle_NONE) && (moPresetDash.differsFrom( XML_solid ) || (!moPresetDash && !maCustomDash.empty())) )
+        if( (eLineStyle != drawing::LineStyle_NONE) && (moPresetDash.differsFrom( XML_solid ) || !maCustomDash.empty()) )
         {
             LineDash aLineDash;
             aLineDash.Style = lclGetDashStyle( moLineCap.get( XML_rnd ) );
 
             // convert preset dash or custom dash
-            if( moPresetDash.has() )
+            if( moPresetDash.differsFrom( XML_solid ) )
                 lclConvertPresetDash( aLineDash, moPresetDash.get() );
             else
                 lclConvertCustomDash( aLineDash, maCustomDash );


More information about the Libreoffice-commits mailing list