[Libreoffice-commits] .: oox/inc oox/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Dec 19 06:47:25 PST 2012
oox/inc/oox/drawingml/fillproperties.hxx | 4 +++-
oox/source/drawingml/fillproperties.cxx | 9 ++++++++-
oox/source/drawingml/shape.cxx | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
New commits:
commit abd87f5085267ea514ebd34b23e42fb9b4b6466b
Author: Muthu Subramanian <sumuthu at suse.com>
Date: Wed Dec 19 20:03:51 2012 +0530
n#794350: [PPTX] Flip gradient fill as well.
diff --git a/oox/inc/oox/drawingml/fillproperties.hxx b/oox/inc/oox/drawingml/fillproperties.hxx
index 5467663..fb9aa84 100644
--- a/oox/inc/oox/drawingml/fillproperties.hxx
+++ b/oox/inc/oox/drawingml/fillproperties.hxx
@@ -120,7 +120,9 @@ struct OOX_DLLPUBLIC FillProperties
ShapePropertyMap& rPropMap,
const GraphicHelper& rGraphicHelper,
sal_Int32 nShapeRotation = 0,
- sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
+ sal_Int32 nPhClr = API_RGB_TRANSPARENT,
+ bool bFlipH = false,
+ bool bFlipV = false ) const;
};
// ============================================================================
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index fb77ced..caeab1b 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -181,7 +181,8 @@ Color FillProperties::getBestSolidColor() const
}
void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
- const GraphicHelper& rGraphicHelper, sal_Int32 nShapeRotation, sal_Int32 nPhClr ) const
+ const GraphicHelper& rGraphicHelper, sal_Int32 nShapeRotation, sal_Int32 nPhClr,
+ bool bFlipH, bool bFlipV ) const
{
if( moFillType.has() )
{
@@ -225,6 +226,12 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
nStartTrans = maGradientProps.maGradientStops.begin()->second.getTransparency()*255/100;
}
+ // Adjust for flips
+ if ( bFlipH )
+ nShapeRotation = 180*60000 - nShapeRotation;
+ if ( bFlipV )
+ nShapeRotation = -nShapeRotation;
+
// "rotate with shape" not set, or set to false -> do not rotate
if ( !maGradientProps.moRotateWithShape.get( false ) )
nShapeRotation = 0;
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index e6a0206..ad8729e 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -535,7 +535,7 @@ Reference< XShape > Shape::createAndInsert(
mpGraphicPropertiesPtr->pushToPropMap( aShapeProps, rGraphicHelper );
if ( mpTablePropertiesPtr.get() && aServiceName == "com.sun.star.drawing.TableShape" )
mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
- aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr );
+ aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr, mbFlipH, mbFlipV );
aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr );
// TODO: use ph color when applying effect properties
aEffectProperties.pushToPropMap( aShapeProps, rGraphicHelper );
More information about the Libreoffice-commits
mailing list