[Libreoffice-commits] .: oox/source

Radek Doulík rodo at kemper.freedesktop.org
Mon Oct 17 08:03:54 PDT 2011


 oox/source/drawingml/customshapeproperties.cxx |   20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

New commits:
commit a3f899125e6d619e185d5e8317d3abd6ac541c14
Author: Radek Doulik <rodo at novell.com>
Date:   Mon Oct 17 17:01:31 2011 +0200

    update flip(mirror) properties setting for custom shape presets

diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 68b05fe..585ec43 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -111,29 +111,27 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
         if (maPresetsMap.empty())
             initializePresetsMap();
 
+        PropertyMap aPropertyMap;
+        PropertySet aPropSet( xPropSet );
+
         if (maPresetsMap.find(mnShapePresetType) != maPresetsMap.end()) {
             OSL_TRACE("found property map for preset: %s (%d)", USS(getShapePresetTypeName()), mnShapePresetType);
 
-            Sequence< PropertyValue > aSeq = maPresetsMap[ mnShapePresetType ].makePropertyValueSequence();
-            PropertySet aPropSet( xPropSet );
-            aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
+            aPropertyMap = maPresetsMap[ mnShapePresetType ];
         }
         else
         {
             //const uno::Reference < drawing::XShape > xShape( xPropSet, UNO_QUERY );
             Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( xShape, UNO_QUERY );
             if( xDefaulter.is() )
-            {
-                PropertyMap aPropertyMap;
-                PropertySet aPropSet( xPropSet );
-                aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX );
-                aPropertyMap[ PROP_MirroredY ] <<= Any( mbMirroredY );
-                Sequence< PropertyValue > aSeq   = aPropertyMap.makePropertyValueSequence();
-                aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
                 xDefaulter->createCustomShapeDefaults( getShapePresetTypeName() );
-            }
         }
 
+        aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX );
+        aPropertyMap[ PROP_MirroredY ] <<= Any( mbMirroredY );
+        Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
+        aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
+
         if ( maAdjustmentGuideList.size() )
         {
             const OUString sType = CREATE_OUSTRING( "Type" );


More information about the Libreoffice-commits mailing list