diff options
author | Attila Bakos <bakos.attilakaroly@nisz.hu> | 2020-08-13 16:37:58 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-08-27 11:29:51 +0200 |
commit | 636d16efe45a55c1a5a7a451c46fbb8618bf0393 (patch) | |
tree | 9556f58447b7bc14297277026e3dc67a27745695 /oox/source | |
parent | 894fddc5edf5aad6fc6d0e18a6c934bfa7f001e4 (diff) |
tdf#135653 OOXML import: fix OLE background color
When importing a .docx file Writer used to ignore the 'filled' and
'fillcolor' attributes in the 'shape' tag belonging to an OLE object.
Now both these are imported and displayed correctly.
Co-authored-by: Daniel Arato (NISZ)
Change-Id: I2e6b880d88e4c46af6f3f2316ee966bac1a1f2e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100922
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index f22a98576a16..362f02c7cabf 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -293,13 +293,18 @@ void ShapeBase::finalizeFragmentImport() aType = aType.copy(1); if( const ShapeType* pShapeType = mrDrawing.getShapes().getShapeTypeById( aType ) ) { - // Make sure that the stroke props from maTypeModel have priority over the stroke props from + // Make sure that the props from maTypeModel have priority over the props from // the shape type. StrokeModel aMergedStrokeModel; aMergedStrokeModel.assignUsed(pShapeType->getTypeModel().maStrokeModel); aMergedStrokeModel.assignUsed(maTypeModel.maStrokeModel); + FillModel aMergedFillModel; + aMergedFillModel.assignUsed(pShapeType->getTypeModel().maFillModel); + aMergedFillModel.assignUsed(maTypeModel.maFillModel); + maTypeModel.assignUsed( pShapeType->getTypeModel() ); maTypeModel.maStrokeModel = aMergedStrokeModel; + maTypeModel.maFillModel = aMergedFillModel; } else { // Temporary fix, shapetype not found if referenced from different substream @@ -1359,6 +1364,8 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes oox::drawingml::ShapePropertyMap aPropMap(mrDrawing.getFilter().getModelObjectHelper()); const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper(); maTypeModel.maStrokeModel.pushToPropMap(aPropMap, rGraphicHelper); + //And, fill-color properties as well... + maTypeModel.maFillModel.pushToPropMap(aPropMap, rGraphicHelper); PropertySet(xShape).setProperties(aPropMap); return xShape; |