fdo#74230: ODF export: write stroke and fill color in graphic defaults

The pool defaults for svg:stroke-color and draw:fill-color were changed
and while previously (effective, manually overridden) defaults were
written into ODF files, this was lost with the change; restore that.

(regression from c0eb5e7772)

Change-Id: Ibcd863260976aa42116175c7f19cb33760af986f
This commit is contained in:
Michael Stahl
2014-02-07 16:25:06 +01:00
parent 85cdb06fd5
commit 45d3577bc5

View File

@@ -74,6 +74,7 @@ using namespace ::xmloff::token;
#define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false }
#define _MAPV(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version, false }
#define GMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context)
#define GMAP_D(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC|MID_FLAG_DEFAULT_ITEM_EXPORT,context)
#define GMAPV(name,prefix,token,type,context,version) _MAPV(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context,version)
#define DPMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context)
#define TMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_TEXT,context)
@@ -93,7 +94,7 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
GMAP( "LineStyle", XML_NAMESPACE_DRAW, XML_STROKE, XML_SD_TYPE_STROKE, 0 ),
GMAP( "LineDashName", XML_NAMESPACE_DRAW, XML_STROKE_DASH, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT , CTF_DASHNAME ),
GMAP( "LineWidth", XML_NAMESPACE_SVG, XML_STROKE_WIDTH, XML_TYPE_MEASURE, 0 ),
GMAP( "LineColor", XML_NAMESPACE_SVG, XML_STROKE_COLOR, XML_TYPE_COLOR, 0 ),
GMAP_D("LineColor", XML_NAMESPACE_SVG, XML_STROKE_COLOR, XML_TYPE_COLOR, 0),
GMAP( "LineStartName", XML_NAMESPACE_DRAW, XML_MARKER_START, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_LINESTARTNAME ),
GMAP( "LineStartWidth", XML_NAMESPACE_DRAW, XML_MARKER_START_WIDTH, XML_TYPE_MEASURE, 0 ),
GMAP( "LineStartCenter", XML_NAMESPACE_DRAW, XML_MARKER_START_CENTER, XML_TYPE_BOOL, 0 ),
@@ -106,8 +107,8 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
// fill attributes
GMAP( "FillStyle", XML_NAMESPACE_DRAW, XML_FILL, XML_SD_TYPE_FILLSTYLE, 0 ),
GMAP( "FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0 ),
GMAP( "FillColor2", XML_NAMESPACE_DRAW, XML_SECONDARY_FILL_COLOR, XML_TYPE_COLOR, 0 ),
GMAP_D("FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0),
GMAP_D("FillColor2", XML_NAMESPACE_DRAW, XML_SECONDARY_FILL_COLOR, XML_TYPE_COLOR, 0),
GMAP( "FillGradientName", XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLGRADIENTNAME ),
GMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER16, 0 ),
GMAP( "FillHatchName", XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLHATCHNAME ),