summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/fillproperties.cxx9
-rw-r--r--oox/source/drawingml/shapepropertymap.cxx3
-rw-r--r--oox/source/token/properties.txt1
3 files changed, 10 insertions, 3 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 3d81ec94c71c..d2d2775a3e3d 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -673,10 +673,15 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
Color aColor( maPatternProps.maPattFgColor );
if( aColor.isUsed() && maPatternProps.moPattPreset.has() )
{
- // we do not support hatches that have background
- // color too, so all this is some best-effort approach
eFillStyle = FillStyle_HATCH;
rPropMap.setProperty( ShapeProperty::FillHatch, createHatch( maPatternProps.moPattPreset.get(), aColor.getColor( rGraphicHelper, nPhClr ) ) );
+
+ // Set background color for hatch
+ if(maPatternProps.maPattBgColor.isUsed())
+ {
+ rPropMap.setProperty( ShapeProperty::FillBackground, true );
+ rPropMap.setProperty( ShapeProperty::FillColor, maPatternProps.maPattBgColor.getColor( rGraphicHelper, nPhClr ) );
+ }
}
else if ( maPatternProps.maPattBgColor.isUsed() )
{
diff --git a/oox/source/drawingml/shapepropertymap.cxx b/oox/source/drawingml/shapepropertymap.cxx
index 6f71873df362..b1cf0239237e 100644
--- a/oox/source/drawingml/shapepropertymap.cxx
+++ b/oox/source/drawingml/shapepropertymap.cxx
@@ -45,7 +45,8 @@ static const ShapePropertyIds spnDefaultShapeIds =
PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, PROP_FillBitmapRectanglePoint,
PROP_FillHatch,
PROP_ShadowXDistance,
- PROP_FillBitmapName
+ PROP_FillBitmapName,
+ PROP_FillBackground
};
} // namespace
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index e6bc79ff3d08..caab75eae4d4 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -158,6 +158,7 @@ ExternalLinks
ExtrapolateBackward
ExtrapolateForward
FileFormat
+FillBackground
FillBitmapMode
FillBitmapName
FillBitmapPositionOffsetX