[Libreoffice-commits] .: Branch 'feature/improvexlsximport' - 2 commits - oox/inc oox/Library_oox.mk oox/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 11 09:09:52 PST 2012


 oox/Library_oox.mk                                |    2 
 oox/inc/oox/drawingml/drawingmltypes.hxx          |    3 +
 oox/inc/oox/drawingml/effectproperties.hxx        |   53 +++++++++++++++++++
 oox/inc/oox/drawingml/effectpropertiescontext.hxx |   41 +++++++++++++++
 oox/inc/oox/drawingml/shape.hxx                   |    3 +
 oox/inc/oox/drawingml/shapepropertymap.hxx        |    1 
 oox/inc/oox/drawingml/theme.hxx                   |    3 -
 oox/source/drawingml/effectproperties.cxx         |   59 ++++++++++++++++++++++
 oox/source/drawingml/effectpropertiescontext.cxx  |   56 ++++++++++++++++++++
 oox/source/drawingml/shape.cxx                    |   25 +++++++--
 oox/source/drawingml/shapepropertiescontext.cxx   |    2 
 oox/source/drawingml/theme.cxx                    |    5 +
 oox/source/drawingml/themeelementscontext.cxx     |   12 +++-
 oox/source/token/properties.txt                   |    5 +
 14 files changed, 260 insertions(+), 10 deletions(-)

New commits:
commit 483ba1102f1d7e4af8c8813b5a5fabb87efa4fb0
Author: Radek Doulik <rodo at novell.com>
Date:   Tue Dec 11 15:35:43 2012 +0100

    use effect references
    
    Change-Id: Ie0d295cd7db695f777071edcd9b792056ac783ef

diff --git a/oox/inc/oox/drawingml/theme.hxx b/oox/inc/oox/drawingml/theme.hxx
index c83c7ed..e60a1f0 100644
--- a/oox/inc/oox/drawingml/theme.hxx
+++ b/oox/inc/oox/drawingml/theme.hxx
@@ -46,7 +46,7 @@ const sal_Int32 THEMED_STYLE_INTENSE    = 3;
 
 typedef RefVector< FillProperties >                     FillStyleList;
 typedef RefVector< LineProperties >                     LineStyleList;
-typedef RefVector< PropertyMap >                        EffectStyleList;
+typedef RefVector< EffectProperties >                   EffectStyleList;
 typedef RefMap< sal_Int32, TextCharacterProperties >    FontScheme;
 
 // ============================================================================
@@ -77,6 +77,7 @@ public:
 
     inline EffectStyleList&         getEffectStyleList() { return maEffectStyleList; }
     inline const EffectStyleList&   getEffectStyleList() const { return maEffectStyleList; }
+    const EffectProperties*         getEffectStyle( sal_Int32 nIndex ) const;
 
     inline FontScheme&              getFontScheme() { return maFontScheme; }
     inline const FontScheme&        getFontScheme() const { return maFontScheme; }
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index c422926..2a9eb50 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -500,6 +500,8 @@ Reference< XShape > Shape::createAndInsert(
         aFillProperties.moFillType = XML_noFill;
         sal_Int32 nFillPhClr = -1;
         EffectProperties aEffectProperties;
+        // TODO: use ph color when applying effect properties
+        //sal_Int32 nEffectPhClr = -1;
 
         if( pTheme )
         {
@@ -515,12 +517,13 @@ Reference< XShape > Shape::createAndInsert(
                     aFillProperties.assignUsed( *pFillProps );
                 nFillPhClr = pFillRef->maPhClr.getColor( rGraphicHelper );
             }
-//            if( const ShapeStyleRef* pEffectRef = getShapeStyleRef( XML_fillRef ) )
-//            {
-//                if( const EffectProperties* pEffectProps = pTheme->getEffectStyle( pEffectRef->mnThemedIdx ) )
-//                    aEffectProperties.assignUsed( *pEffectProps );
-//                nEffectPhClr = pEffectRef->maPhClr.getColor( rGraphicHelper );
-//            }
+            if( const ShapeStyleRef* pEffectRef = getShapeStyleRef( XML_effectRef ) )
+            {
+                if( const EffectProperties* pEffectProps = pTheme->getEffectStyle( pEffectRef->mnThemedIdx ) )
+                    aEffectProperties.assignUsed( *pEffectProps );
+                // TODO: use ph color when applying effect properties
+                // nEffectPhClr = pEffectRef->maPhClr.getColor( rGraphicHelper );
+            }
         }
 
         aLineProperties.assignUsed( getLineProperties() );
@@ -545,6 +548,7 @@ Reference< XShape > Shape::createAndInsert(
             mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
         aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr );
         aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr );
+        // TODO: use ph color when applying effect properties
         aEffectProperties.pushToPropMap( aShapeProps, rGraphicHelper );
 
         // applying autogrowheight property before setting shape size, because
diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx
index 46f3dbc..a3ccb83 100644
--- a/oox/source/drawingml/theme.cxx
+++ b/oox/source/drawingml/theme.cxx
@@ -66,6 +66,11 @@ const LineProperties* Theme::getLineStyle( sal_Int32 nIndex ) const
      return lclGetStyleElement( maLineStyleList, nIndex );
 }
 
+const EffectProperties* Theme::getEffectStyle( sal_Int32 nIndex ) const
+{
+    return lclGetStyleElement( maEffectStyleList, nIndex );
+}
+
 const TextCharacterProperties* Theme::getFontStyle( sal_Int32 nSchemeType ) const
 {
     return maFontScheme.get( nSchemeType ).get();
diff --git a/oox/source/drawingml/themeelementscontext.cxx b/oox/source/drawingml/themeelementscontext.cxx
index 9d6573b..58b31f1 100644
--- a/oox/source/drawingml/themeelementscontext.cxx
+++ b/oox/source/drawingml/themeelementscontext.cxx
@@ -30,6 +30,8 @@
 #include "oox/drawingml/clrschemecontext.hxx"
 #include "oox/drawingml/lineproperties.hxx"
 #include "oox/drawingml/linepropertiescontext.hxx"
+#include "oox/drawingml/effectproperties.hxx"
+#include "oox/drawingml/effectpropertiescontext.hxx"
 #include "oox/drawingml/fillproperties.hxx"
 #include "oox/drawingml/fillpropertiesgroupcontext.hxx"
 #include "oox/drawingml/theme.hxx"
@@ -131,9 +133,13 @@ Reference< XFastContextHandler > EffectStyleListContext::createFastChildContext(
     switch( nElement )
     {
         case A_TOKEN( effectStyle ):
-            mrEffectStyleList.push_back( EffectStyleList::value_type( new PropertyMap ) );
-            // TODO: import effect styles
-            return 0;
+            mrEffectStyleList.push_back( EffectPropertiesPtr( new EffectProperties ) );
+            return this;
+
+        case A_TOKEN( effectLst ):  // CT_EffectList
+            if( mrEffectStyleList.back() )
+                return new EffectPropertiesContext( *this, *mrEffectStyleList.back() );
+            break;
     }
     return 0;
 }
commit af46927e977d5bf20c0e9d432d70761a2c3b686c
Author: Eilidh McAdam <eilidh at lanedo.com>
Date:   Wed Sep 26 12:22:17 2012 +0100

    Import shadow effect properties for shapes in docx.
    
    Change-Id: I0cfd6b45be268d688b7389c79c5e9ad7f48eb12d
    Reviewed-on: https://gerrit.libreoffice.org/702
    Reviewed-by: Noel Power <noel.power at suse.com>
    Tested-by: Noel Power <noel.power at suse.com>

diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index a7a658a..680dba7 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -150,6 +150,8 @@ $(eval $(call gb_Library_add_exception_objects,oox,\
     oox/source/drawingml/diagram/diagramlayoutatoms \
     oox/source/drawingml/diagram/layoutnodecontext \
     oox/source/drawingml/drawingmltypes \
+    oox/source/drawingml/effectproperties \
+    oox/source/drawingml/effectpropertiescontext \
     oox/source/drawingml/embeddedwavaudiofile \
     oox/source/drawingml/fillproperties \
     oox/source/drawingml/fillpropertiesgroupcontext \
diff --git a/oox/inc/oox/drawingml/drawingmltypes.hxx b/oox/inc/oox/drawingml/drawingmltypes.hxx
index 71174b3..6d0431d 100644
--- a/oox/inc/oox/drawingml/drawingmltypes.hxx
+++ b/oox/inc/oox/drawingml/drawingmltypes.hxx
@@ -69,6 +69,9 @@ typedef ::boost::shared_ptr< TextCharacterProperties > TextCharacterPropertiesPt
 struct TextBodyProperties;
 typedef ::boost::shared_ptr< TextBodyProperties > TextBodyPropertiesPtr;
 
+struct EffectProperties;
+typedef ::boost::shared_ptr< EffectProperties > EffectPropertiesPtr;
+
 class TextBody;
 typedef ::boost::shared_ptr< TextBody > TextBodyPtr;
 
diff --git a/oox/inc/oox/drawingml/effectproperties.hxx b/oox/inc/oox/drawingml/effectproperties.hxx
new file mode 100644
index 0000000..55c5ec3
--- /dev/null
+++ b/oox/inc/oox/drawingml/effectproperties.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef OOX_DRAWINGML_EFFECTPROPERTIES_HXX
+#define OOX_DRAWINGML_EFFECTPROPERTIES_HXX
+
+#include "oox/drawingml/fillproperties.hxx"
+
+namespace oox {
+namespace drawingml {
+
+// ============================================================================
+
+struct EffectShadowProperties
+{
+    OptValue< sal_Int64 > moShadowDist;
+    OptValue< sal_Int64 > moShadowDir;
+    OptValue< sal_Int64 > moShadowAlpha;
+    Color moShadowColor;
+
+    /** Overwrites all members that are explicitly set in rSourceProps. */
+    void                assignUsed( const EffectShadowProperties& rSourceProps );
+};
+
+// ============================================================================
+
+struct OOX_DLLPUBLIC EffectProperties
+{
+    EffectShadowProperties maShadow;
+
+    /** Overwrites all members that are explicitly set in rSourceProps. */
+    void                assignUsed( const EffectProperties& rSourceProps );
+
+    /** Writes the properties to the passed property map. */
+    void                pushToPropMap(
+                            PropertyMap& rPropMap,
+                            const GraphicHelper& rGraphicHelper ) const;
+};
+
+// ============================================================================
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/oox/drawingml/effectpropertiescontext.hxx b/oox/inc/oox/drawingml/effectpropertiescontext.hxx
new file mode 100644
index 0000000..cd5e2eb
--- /dev/null
+++ b/oox/inc/oox/drawingml/effectpropertiescontext.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX
+#define OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX
+
+#include "oox/core/contexthandler.hxx"
+#include "oox/dllapi.h"
+
+namespace oox { namespace drawingml {
+
+// ---------------------------------------------------------------------
+
+struct EffectProperties;
+
+class OOX_DLLPUBLIC EffectPropertiesContext : public ::oox::core::ContextHandler
+{
+public:
+    EffectPropertiesContext( ::oox::core::ContextHandler& rParent,
+            EffectProperties& rEffectProperties ) throw();
+    ~EffectPropertiesContext();
+
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
+        createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
+            throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+    EffectProperties& mrEffectProperties;
+};
+
+} }
+
+#endif // OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx
index 09ea502..b93469d 100644
--- a/oox/inc/oox/drawingml/shape.hxx
+++ b/oox/inc/oox/drawingml/shape.hxx
@@ -106,6 +106,8 @@ public:
 
     table::TablePropertiesPtr       getTableProperties();
 
+    inline EffectProperties&        getEffectProperties() { return *mpEffectPropertiesPtr; }
+
     void                              setChildPosition( com::sun::star::awt::Point nPosition ){ maChPosition = nPosition; }
     void                              setChildSize( com::sun::star::awt::Size aSize ){ maChSize = aSize; }
     void                              moveAllToPosition( const com::sun::star::awt::Point &rPoint );
@@ -224,6 +226,7 @@ protected:
     CustomShapePropertiesPtr    mpCustomShapePropertiesPtr;
     table::TablePropertiesPtr   mpTablePropertiesPtr;
     Shape3DPropertiesPtr        mp3DPropertiesPtr;
+    EffectPropertiesPtr         mpEffectPropertiesPtr;
     PropertyMap                 maShapeProperties;
     PropertyMap                 maDefaultShapeProperties;
     TextListStylePtr            mpMasterTextListStyle;
diff --git a/oox/inc/oox/drawingml/shapepropertymap.hxx b/oox/inc/oox/drawingml/shapepropertymap.hxx
index 69b9cfa..21b9ab6 100644
--- a/oox/inc/oox/drawingml/shapepropertymap.hxx
+++ b/oox/inc/oox/drawingml/shapepropertymap.hxx
@@ -70,6 +70,7 @@ enum ShapePropertyId
     SHAPEPROP_FillBitmapOffsetX,
     SHAPEPROP_FillBitmapOffsetY,
     SHAPEPROP_FillBitmapRectanglePoint,
+    SHAPEPROP_ShadowXDistance,
     SHAPEPROP_END
 };
 
diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx
new file mode 100644
index 0000000..799169b
--- /dev/null
+++ b/oox/source/drawingml/effectproperties.cxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-baosic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "oox/drawingml/effectproperties.hxx"
+#include "oox/drawingml/drawingmltypes.hxx"
+#include "oox/drawingml/shapepropertymap.hxx"
+#include "oox/helper/graphichelper.hxx"
+#include "oox/token/tokens.hxx"
+
+#include <basegfx/numeric/ftools.hxx>
+
+namespace oox {
+namespace drawingml {
+
+// ============================================================================
+
+void EffectShadowProperties::assignUsed(const EffectShadowProperties& rSourceProps)
+{
+    moShadowDist.assignIfUsed( rSourceProps.moShadowDist );
+    moShadowDir.assignIfUsed( rSourceProps.moShadowDir );
+    moShadowColor.assignIfUsed( rSourceProps.moShadowColor );
+}
+
+void EffectProperties::assignUsed( const EffectProperties& rSourceProps )
+{
+    maShadow.assignUsed(rSourceProps.maShadow);
+}
+
+void EffectProperties::pushToPropMap( PropertyMap& rPropMap,
+        const GraphicHelper& rGraphicHelper ) const
+{
+    if (maShadow.moShadowDist.has())
+    {
+        // Negative X or Y dist indicates left or up, respectively
+        double nAngle = (maShadow.moShadowDir.get(0) / PER_DEGREE) * F_PI180;
+        sal_Int32 nDist = convertEmuToHmm(maShadow.moShadowDist.get(0));
+        sal_Int32 nXDist = cos(nAngle) * nDist;
+        sal_Int32 nYDist = sin(nAngle) * nDist;
+
+        rPropMap.setProperty( PROP_Shadow, sal_True );
+        rPropMap.setProperty( PROP_ShadowXDistance, nXDist);
+        rPropMap.setProperty( PROP_ShadowYDistance, nYDist);
+        rPropMap.setProperty( PROP_ShadowColor, maShadow.moShadowColor.getColor(rGraphicHelper, -1 ) );
+        rPropMap.setProperty( PROP_ShadowTransparence, maShadow.moShadowColor.getTransparency());
+    }
+}
+
+// ============================================================================
+
+} // namespace drawingml
+} // namespace oox
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx
new file mode 100644
index 0000000..700f225
--- /dev/null
+++ b/oox/source/drawingml/effectpropertiescontext.cxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "oox/drawingml/effectpropertiescontext.hxx"
+#include "oox/drawingml/drawingmltypes.hxx"
+#include "oox/drawingml/fillpropertiesgroupcontext.hxx"
+#include "oox/drawingml/effectproperties.hxx"
+#include "oox/helper/attributelist.hxx"
+
+using ::rtl::OUString;
+using namespace ::oox::core;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+// CT_EffectProperties
+
+namespace oox { namespace drawingml {
+// ---------------------------------------------------------------------
+
+EffectPropertiesContext::EffectPropertiesContext( ContextHandler& rParent,
+    EffectProperties& rEffectProperties ) throw()
+: ContextHandler( rParent )
+, mrEffectProperties( rEffectProperties )
+{
+}
+
+EffectPropertiesContext::~EffectPropertiesContext()
+{
+}
+
+Reference< XFastContextHandler > EffectPropertiesContext::createFastChildContext( sal_Int32 nElement, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+{
+    AttributeList aAttribs( xAttribs );
+    switch( nElement )
+    {
+        case A_TOKEN( outerShdw ):
+        {
+            mrEffectProperties.maShadow.moShadowDist = aAttribs.getInteger( XML_dist, 0 );
+            mrEffectProperties.maShadow.moShadowDir = aAttribs.getInteger( XML_dir, 0 );
+            return new ColorContext( *this, mrEffectProperties.maShadow.moShadowColor );
+        }
+        break;
+    }
+
+    return 0;
+}
+
+} }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 792cce4..c422926 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -31,6 +31,7 @@
 #include "oox/drawingml/theme.hxx"
 #include "oox/drawingml/fillproperties.hxx"
 #include "oox/drawingml/lineproperties.hxx"
+#include "oox/drawingml/effectproperties.hxx"
 #include "oox/drawingml/shapepropertymap.hxx"
 #include "oox/drawingml/textbody.hxx"
 #include "oox/drawingml/table/tableproperties.hxx"
@@ -82,6 +83,7 @@ Shape::Shape( const sal_Char* pServiceName )
 , mpFillPropertiesPtr( new FillProperties )
 , mpGraphicPropertiesPtr( new GraphicProperties )
 , mpCustomShapePropertiesPtr( new CustomShapeProperties )
+, mpEffectPropertiesPtr( new EffectProperties )
 , mpMasterTextListStyle( new TextListStyle )
 , mnSubType( 0 )
 , meFrameType( FRAMETYPE_GENERIC )
@@ -106,6 +108,7 @@ Shape::Shape( const ShapePtr& pSourceShape )
 , mpCustomShapePropertiesPtr( pSourceShape->mpCustomShapePropertiesPtr )
 , mpTablePropertiesPtr( pSourceShape->mpTablePropertiesPtr )
 , mp3DPropertiesPtr( pSourceShape->mp3DPropertiesPtr )
+, mpEffectPropertiesPtr (pSourceShape->mpEffectPropertiesPtr)
 , maShapeProperties( pSourceShape->maShapeProperties )
 , mpMasterTextListStyle( pSourceShape->mpMasterTextListStyle )
 , mxShape()
@@ -243,6 +246,7 @@ void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText )
     mpFillPropertiesPtr = FillPropertiesPtr( new FillProperties( *rReferencedShape.mpFillPropertiesPtr.get() ) );
     mpCustomShapePropertiesPtr = CustomShapePropertiesPtr( new CustomShapeProperties( *rReferencedShape.mpCustomShapePropertiesPtr.get() ) );
     mpTablePropertiesPtr = table::TablePropertiesPtr( rReferencedShape.mpTablePropertiesPtr.get() ? new table::TableProperties( *rReferencedShape.mpTablePropertiesPtr.get() ) : NULL );
+    mpEffectPropertiesPtr = EffectPropertiesPtr( new EffectProperties( *rReferencedShape.mpEffectPropertiesPtr.get() ) );
     mpMasterTextListStyle = TextListStylePtr( new TextListStyle( *rReferencedShape.mpMasterTextListStyle.get() ) );
     maShapeStyleRefs = rReferencedShape.maShapeStyleRefs;
     maSize = rReferencedShape.maSize;
@@ -495,6 +499,7 @@ Reference< XShape > Shape::createAndInsert(
         FillProperties aFillProperties;
         aFillProperties.moFillType = XML_noFill;
         sal_Int32 nFillPhClr = -1;
+        EffectProperties aEffectProperties;
 
         if( pTheme )
         {
@@ -520,6 +525,7 @@ Reference< XShape > Shape::createAndInsert(
 
         aLineProperties.assignUsed( getLineProperties() );
         aFillProperties.assignUsed( getFillProperties() );
+        aEffectProperties.assignUsed ( getEffectProperties() );
 
         ShapePropertyMap aShapeProps( rFilterBase.getModelObjectHelper() );
 
@@ -539,6 +545,7 @@ Reference< XShape > Shape::createAndInsert(
             mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
         aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr );
         aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr );
+        aEffectProperties.pushToPropMap( aShapeProps, rGraphicHelper );
 
         // applying autogrowheight property before setting shape size, because
         // the shape size might be changed if currently autogrowheight is true
@@ -551,7 +558,9 @@ Reference< XShape > Shape::createAndInsert(
 
         // do not set properties at a group shape (this causes assertions from svx)
         if( aServiceName != "com.sun.star.drawing.GroupShape" )
+        {
             PropertySet( xSet ).setProperties( aShapeProps );
+        }
 
         if( bIsCustomShape )
         {
diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx
index 7f862e4..357dfb1 100644
--- a/oox/source/drawingml/shapepropertiescontext.cxx
+++ b/oox/source/drawingml/shapepropertiescontext.cxx
@@ -39,6 +39,7 @@
 #include "oox/drawingml/fillpropertiesgroupcontext.hxx"
 #include "oox/drawingml/transform2dcontext.hxx"
 #include "oox/drawingml/customshapegeometry.hxx"
+#include "oox/drawingml/effectpropertiescontext.hxx"
 
 using rtl::OUString;
 using namespace oox::core;
@@ -111,6 +112,7 @@ Reference< XFastContextHandler > ShapePropertiesContext::createFastChildContext(
     // todo not supported by core
     case A_TOKEN( effectLst ):  // CT_EffectList
     case A_TOKEN( effectDag ):  // CT_EffectContainer
+        xRet.set( new EffectPropertiesContext( *this, mrShape.getEffectProperties() ) );
         break;
 
     // todo
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 8835c2c..cd42721 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -407,6 +407,11 @@ ScrollValueMin
 Segments
 SelectedItems
 SelectedPage
+Shadow
+ShadowColor
+ShadowTransparence
+ShadowXDistance
+ShadowYDistance
 Show
 ShowBorder
 ShowCharts


More information about the Libreoffice-commits mailing list