diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-01-18 15:22:36 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-01-18 15:24:17 +0100 |
commit | 2cacaf6ab0acf3188f43df02ef3fc87082e351b2 (patch) | |
tree | 7bf9f6f849dae873a321b81845ffea0eb6bbf11d /oox/source | |
parent | 01d059c13e39f4fba75e2152b4db6b0b746bca71 (diff) |
oox::vml::ShadowModel: differentiate between not having it and having it off
Having it explicitly disabled was already handled, but apparently
01d059c13e39f4fba75e2152b4db6b0b746bca71 turned on shadows by default.
Fix this.
Change-Id: I1401a28b36a9b5aea302f9a19a6d02a29e6b358d
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/vml/vmlformatting.cxx | 7 | ||||
-rw-r--r-- | oox/source/vml/vmlshapecontext.cxx | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 3113d57b4dd5..1af17a3886f7 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -714,9 +714,14 @@ void FillModel::pushToPropMap( ShapePropertyMap& rPropMap, const GraphicHelper& // ============================================================================ +ShadowModel::ShadowModel() + : mbHasShadow(false) +{ +} + void ShadowModel::pushToPropMap(ShapePropertyMap& rPropMap, const GraphicHelper& rGraphicHelper) const { - if (moHasShadow.has() && !moHasShadow.get()) + if (!mbHasShadow || (moShadowOn.has() && !moShadowOn.get())) return; drawingml::Color aColor = ConversionHelper::decodeColor(rGraphicHelper, moColor, moOpacity, API_RGB_GRAY); diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index fc5ad9f44cb6..39ac32595a6d 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -335,7 +335,8 @@ ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const A break; case VML_TOKEN( shadow ): { - mrTypeModel.maShadowModel.moHasShadow.assignIfUsed(lclDecodeBool(rAttribs, XML_on)); + mrTypeModel.maShadowModel.mbHasShadow = true; + mrTypeModel.maShadowModel.moShadowOn.assignIfUsed(lclDecodeBool(rAttribs, XML_on)); mrTypeModel.maShadowModel.moColor.assignIfUsed(rAttribs.getString(XML_color)); mrTypeModel.maShadowModel.moOffset.assignIfUsed(rAttribs.getString(XML_offset)); mrTypeModel.maShadowModel.moOpacity = lclDecodePercent(rAttribs, XML_opacity, 1.0); |