summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-06-01 17:53:04 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-06-01 17:54:31 +0200
commit229f6e187bd85d0af47da9feffef2d9ac7f83120 (patch)
tree500e5e37ff45170d98235163fd32237eaf2732d7
parentb9ecec7c74687ed5a9470cffb7d02e0e6e83107e (diff)
Related: fdo#46361 fix VML import of v:rect's fillcolor
Change-Id: I530e07bb89f231b10c9e6da2eb4e6b698ee9654a
-rw-r--r--oox/source/token/properties.txt1
-rw-r--r--oox/source/vml/vmlshape.cxx9
2 files changed, 10 insertions, 0 deletions
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 2af9c8e6237b..73302037788c 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -19,6 +19,7 @@ AttachedAxisIndex
AutoFilter
AutoShowInfo
Autocomplete
+BackColor
BackGraphicLocation
BackGraphicURL
Background
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 91e3d6315e9d..4e5e4ac1a74e 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -354,6 +354,15 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
maTypeModel.maStrokeModel.pushToPropMap( aPropMap, rGraphicHelper );
maTypeModel.maFillModel.pushToPropMap( aPropMap, rGraphicHelper );
+
+ // TextFrames have FillColor, not BackColor
+ uno::Reference<lang::XServiceInfo> xSInfo(rxShape, uno::UNO_QUERY_THROW);
+ if (xSInfo->supportsService("com.sun.star.text.TextFrame") && aPropMap.hasProperty(PROP_FillColor))
+ {
+ aPropMap.setProperty(PROP_BackColor, aPropMap[PROP_FillColor]);
+ aPropMap.erase(PROP_FillColor);
+ }
+
PropertySet( rxShape ).setProperties( aPropMap );
}