chart2/source/view/axes/VCartesianAxis.cxx | 16 +++++++++++++++- oox/inc/oox/drawingml/fillproperties.hxx | 4 +++- oox/source/drawingml/fillproperties.cxx | 9 ++++++++- oox/source/drawingml/shape.cxx | 2 +- oox/source/export/drawingml.cxx | 5 +++++ 5 files changed, 32 insertions(+), 4 deletions(-)
New commits: commit 02eaa6fca4be9288a377ae6de37f06b06bd5277f Author: Muthu Subramanian <[email protected]> Date: Wed Dec 26 16:18:51 2012 +0530 n#793999: PPTX Export - background image fit to slide. diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 07d0172..dfc8616 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -572,6 +572,11 @@ void DrawingML::WriteBlipMode( Reference< XPropertySet > rXPropSet ) case BitmapMode_REPEAT: mpFS->singleElementNS( XML_a, XML_tile, FSEND ); break; + case BitmapMode_STRETCH: + mpFS->startElementNS( XML_a, XML_stretch, FSEND ); + mpFS->singleElementNS( XML_a, XML_fillRect, FSEND ); + mpFS->endElementNS( XML_a, XML_stretch ); + break; default: ; } commit 21cc231fbebecfe65414505918932fe7675b4b7f Author: Muthu Subramanian <[email protected]> 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 dd30edf..59dabba 100644 --- a/oox/inc/oox/drawingml/fillproperties.hxx +++ b/oox/inc/oox/drawingml/fillproperties.hxx @@ -129,7 +129,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 4a94c01..dde28b5 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -191,7 +191,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() ) { @@ -235,6 +236,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 2a9eb50..156bc09 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -546,7 +546,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 ); commit 6a985438f7263e8d9fa84925520bcefecafb8b2f Author: Muthu Subramanian <[email protected]> Date: Tue Jan 8 12:40:45 2013 +0530 n#791985: Automatically rotate chart labels (if overlapping). This bug fixes two issues: * Overlap detection seems to be approximate and doesn't work for rotated text. Added a workaround for labels rotated at angles 45-135 and 225-315. * Auto rotate labels, which overlap. This is done only for labels having zero degrees rotate. For forcing angles, use 'enable overlap' or non-zero angles (1 degree). Of course, zero degrees plus skipping of labels would no longer occur. Better solutions? diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index b75e12d..0b94881 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -150,6 +150,11 @@ bool doesOverlap( const Reference< drawing::XShape >& xShape1 if( !xShape1.is() || !xShape2.is() ) return false; + sal_Int32 nAngle = abs(fRotationAngleDegree); + + if( ( nAngle >= 45 && nAngle <= 135 ) || ( nAngle >= 225 && nAngle <= 315 ) ) + return false; + ::basegfx::B2IRectangle aRect1( BaseGFXHelper::makeRectangle(xShape1->getPosition(),ShapeFactory::getSizeAfterRotation( xShape1, fRotationAngleDegree ))); ::basegfx::B2IRectangle aRect2( BaseGFXHelper::makeRectangle(xShape2->getPosition(),ShapeFactory::getSizeAfterRotation( xShape2, fRotationAngleDegree ))); return aRect1.overlaps(aRect2); @@ -665,7 +670,7 @@ bool VCartesianAxis::createTextShapes( pPREPreviousVisibleTickInfo : pPreviousVisibleTickInfo; //don't create labels which does not fit into the rhythm - if( nTick%rAxisLabelProperties.nRhythm != 0) + if( nTick%rAxisLabelProperties.nRhythm != 0 ) continue; //don't create labels for invisible ticks @@ -779,6 +784,15 @@ bool VCartesianAxis::createTextShapes( } if( bOverlapAlsoAfterSwitchingOnAutoStaggering ) { + /* Try auto-rotating to 45 degrees */ + if( !rAxisLabelProperties.bOverlapAllowed && ::rtl::math::approxEqual( rAxisLabelProperties.fRotationAngleDegree, 0.0 ) ) + { + rAxisLabelProperties.fRotationAngleDegree = 45; + rAxisLabelProperties.bLineBreakAllowed = false; + m_aAxisLabelProperties.fRotationAngleDegree = rAxisLabelProperties.fRotationAngleDegree; + removeTextShapesFromTicks(); + return false; + } if( rAxisLabelProperties.bRhythmIsFix ) { xTarget->remove(pTickInfo->xTextShape); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
