summaryrefslogtreecommitdiff
path: root/oox/source/drawingml
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-03-12 20:37:15 +0000
committerNoel Power <noel.power@suse.com>2013-03-13 09:54:03 +0000
commit1dbd088e4fb9597b0e2f5e4c4db6ecf047d85da3 (patch)
tree736a3c966e379f34674df53f9e04afaeb0c5ece2 /oox/source/drawingml
parent856756ec77ac64d1caee6c1b80c3641d4e487b2d (diff)
bnc#798309 inherit group style from parent
Change-Id: Ie4f1d244f1c9b4935305742d12cabaee3e38647c
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r--oox/source/drawingml/chart/chartdrawingfragment.cxx2
-rw-r--r--oox/source/drawingml/shape.cxx15
2 files changed, 12 insertions, 5 deletions
diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx
index 707a4abd5401..4f4660310d7d 100644
--- a/oox/source/drawingml/chart/chartdrawingfragment.cxx
+++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx
@@ -215,7 +215,7 @@ void ChartDrawingFragment::onEndElement()
getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.Width, 0, SAL_MAX_INT32 ),
getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.Height, 0, SAL_MAX_INT32 ) );
basegfx::B2DHomMatrix aMatrix;
- mxShape->addShape( getFilter(), getFilter().getCurrentTheme(), mxDrawPage, aMatrix, &aShapeRectEmu32 );
+ mxShape->addShape( getFilter(), getFilter().getCurrentTheme(), mxDrawPage, aMatrix, mxShape->getFillProperties(), &aShapeRectEmu32 );
}
}
mxShape.reset();
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 45cc868d5f0a..acb71281b6a7 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -193,6 +193,7 @@ void Shape::addShape(
const Theme* pTheme,
const Reference< XShapes >& rxShapes,
basegfx::B2DHomMatrix& aTransformation,
+ FillProperties& rShapeOrParentShapeFillProps,
const awt::Rectangle* pShapeRect,
ShapeIdMap* pShapeMap )
{
@@ -204,7 +205,7 @@ void Shape::addShape(
if( !sServiceName.isEmpty() )
{
basegfx::B2DHomMatrix aMatrix( aTransformation );
- Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, sal_False, sal_False, aMatrix ) );
+ Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, sal_False, sal_False, aMatrix, rShapeOrParentShapeFillProps ) );
if( pShapeMap && !msId.isEmpty() )
{
@@ -309,7 +310,7 @@ void Shape::addChildren(
std::vector< ShapePtr >::iterator aIter( rMaster.maChildren.begin() );
while( aIter != rMaster.maChildren.end() ) {
(*aIter)->setMasterTextListStyle( mpMasterTextListStyle );
- (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, NULL, pShapeMap );
+ (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, getFillProperties(), NULL, pShapeMap );
}
}
@@ -321,7 +322,8 @@ Reference< XShape > Shape::createAndInsert(
const awt::Rectangle* /* pShapeRect */,
sal_Bool bClearText,
sal_Bool bDoNotInsertEmptyTextBody,
- basegfx::B2DHomMatrix& aParentTransformation )
+ basegfx::B2DHomMatrix& aParentTransformation,
+ FillProperties& rShapeOrParentShapeFillProps )
{
bool bIsEmbMedia = false;
SAL_INFO("oox", OSL_THIS_FUNC << " id: " << msId);
@@ -516,7 +518,12 @@ Reference< XShape > Shape::createAndInsert(
}
aLineProperties.assignUsed( getLineProperties() );
- aFillProperties.assignUsed( getFillProperties() );
+
+ // group fill inherits from parent
+ if ( getFillProperties().moFillType.has() && getFillProperties().moFillType.get() == XML_grpFill )
+ aFillProperties.assignUsed( rShapeOrParentShapeFillProps );
+ else
+ aFillProperties.assignUsed( getFillProperties() );
aEffectProperties.assignUsed ( getEffectProperties() );
ShapePropertyMap aShapeProps( rFilterBase.getModelObjectHelper() );