diff options
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/effectproperties.cxx | 16 | ||||
-rw-r--r-- | oox/source/drawingml/effectproperties.hxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/effectpropertiescontext.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/shapepropertymap.cxx | 4 |
4 files changed, 23 insertions, 1 deletions
diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx index bbfee474b3f2..d1f07964b09e 100644 --- a/oox/source/drawingml/effectproperties.cxx +++ b/oox/source/drawingml/effectproperties.cxx @@ -23,6 +23,8 @@ void EffectShadowProperties::assignUsed(const EffectShadowProperties& rSourcePro { moShadowDist.assignIfUsed( rSourceProps.moShadowDist ); moShadowDir.assignIfUsed( rSourceProps.moShadowDir ); + moShadowSx.assignIfUsed( rSourceProps.moShadowSx ); + moShadowSy.assignIfUsed( rSourceProps.moShadowSy ); moShadowColor.assignIfUsed( rSourceProps.moShadowColor ); } @@ -48,6 +50,9 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap, if( it->msName == "outerShdw" ) { sal_Int32 nAttrDir = 0, nAttrDist = 0; + sal_Int32 nAttrSizeX = 100000, nAttrSizeY = 100000; // If shadow size is %100=100000 (means equal to object's size), sx sy is not exists, + // Default values of sx, sy should be 100000 in this case. + std::map< OUString, css::uno::Any >::const_iterator attribIt = it->maAttribs.find( "dir" ); if( attribIt != it->maAttribs.end() ) attribIt->second >>= nAttrDir; @@ -56,6 +61,15 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap, if( attribIt != it->maAttribs.end() ) attribIt->second >>= nAttrDist; + attribIt = it->maAttribs.find( "sx" ); + if( attribIt != it->maAttribs.end() ) + attribIt->second >>= nAttrSizeX; + + attribIt = it->maAttribs.find( "sy" ); + if( attribIt != it->maAttribs.end() ) + attribIt->second >>= nAttrSizeY; + + // Negative X or Y dist indicates left or up, respectively // Negative X or Y dist indicates left or up, respectively double nAngle = basegfx::deg2rad(static_cast<double>(nAttrDir) / PER_DEGREE); sal_Int32 nDist = convertEmuToHmm( nAttrDist ); @@ -65,6 +79,8 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap, rPropMap.setProperty( PROP_Shadow, true ); rPropMap.setProperty( PROP_ShadowXDistance, nXDist); rPropMap.setProperty( PROP_ShadowYDistance, nYDist); + rPropMap.setProperty( PROP_ShadowSizeX, nAttrSizeX); + rPropMap.setProperty( PROP_ShadowSizeY, nAttrSizeY); rPropMap.setProperty( PROP_ShadowColor, it->moColor.getColor(rGraphicHelper ) ); rPropMap.setProperty( PROP_ShadowTransparence, it->moColor.getTransparency()); } diff --git a/oox/source/drawingml/effectproperties.hxx b/oox/source/drawingml/effectproperties.hxx index 146214cc9191..092ca62669ae 100644 --- a/oox/source/drawingml/effectproperties.hxx +++ b/oox/source/drawingml/effectproperties.hxx @@ -24,6 +24,8 @@ struct EffectShadowProperties { OptValue< sal_Int64 > moShadowDist; OptValue< sal_Int64 > moShadowDir; + OptValue< sal_Int64 > moShadowSx; + OptValue< sal_Int64 > moShadowSy; Color moShadowColor; /** Overwrites all members that are explicitly set in rSourceProps. */ diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx index 4c779e75f1ef..40c132f3fb2c 100644 --- a/oox/source/drawingml/effectpropertiescontext.cxx +++ b/oox/source/drawingml/effectpropertiescontext.cxx @@ -83,6 +83,8 @@ ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement, mrEffectProperties.maShadow.moShadowDist = rAttribs.getInteger( XML_dist, 0 ); mrEffectProperties.maShadow.moShadowDir = rAttribs.getInteger( XML_dir, 0 ); + mrEffectProperties.maShadow.moShadowSx = rAttribs.getInteger( XML_sx, 0 ); + mrEffectProperties.maShadow.moShadowSy = rAttribs.getInteger( XML_sy, 0 ); return new ColorContext(*this, mrEffectProperties.m_Effects[nPos]->moColor); } break; diff --git a/oox/source/drawingml/shapepropertymap.cxx b/oox/source/drawingml/shapepropertymap.cxx index c6168be243ab..7a37c0641a93 100644 --- a/oox/source/drawingml/shapepropertymap.cxx +++ b/oox/source/drawingml/shapepropertymap.cxx @@ -49,7 +49,9 @@ static const ShapePropertyIds spnDefaultShapeIds = PROP_FillHatch, PROP_FillBackground, PROP_FillBitmapName, - PROP_ShadowXDistance + PROP_ShadowXDistance, + PROP_ShadowSizeX, + PROP_ShadowSizeY }; } // namespace |