diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2015-07-19 18:18:00 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-09-09 07:41:51 +0000 |
commit | 9ed1dd01be8afa0961e388a79e9ff4c1235820c2 (patch) | |
tree | 366cad6bae91e791be462e4c03f499ab0ba3e2f2 /xmloff | |
parent | 79bc956e7f44b762bfd6560e5a9c9812fa3dcf4d (diff) |
tdf#90839: support for wrapped text in data labels and for centered data value
Now in a pie chart the text of a label can be wrapped, the wrapping is
automatic and the maximum text width is fixed to almost half the pie
radius. This feature is used to import correctly the relative text
wrapping property provided by MSO.
Moreover the data value and percent value of a label are now centered
horizontally, respect with the label text.
Conflicts:
chart2/qa/extras/xshape/chart2xshape.cxx
Change-Id: Ie10d6184365436f763cd9693a5bbefcfa9b3862b
Reviewed-on: https://gerrit.libreoffice.org/17193
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/PropertyMap.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/chart/PropertyMaps.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 1 |
3 files changed, 2 insertions, 1 deletions
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index 0145bde7cbe9..0ca6e41d760e 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.hxx @@ -238,6 +238,7 @@ const XMLPropertyMapEntry aXMLChartPropMap[] = MAP_SPECIAL( "DataCaption", CHART, XML_DATA_LABEL_NUMBER, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_NUMBER ), // convert one constant MAP_SPECIAL( "DataCaption", CHART, XML_DATA_LABEL_TEXT, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_TEXT ), // to 'tristate' and two bools MAP_SPECIAL( "DataCaption", CHART, XML_DATA_LABEL_SYMBOL, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_SYMBOL ), + MAP_ENTRY_ODF_EXT( "TextWrap", LO_EXT, XML_DATA_LABEL_WRAP, XML_TYPE_BOOL ), MAP_SPECIAL_ODF12( "LabelSeparator", CHART, XML_LABEL_SEPARATOR, XML_TYPE_STRING | MID_FLAG_ELEMENT_ITEM, XML_SCH_CONTEXT_SPECIAL_LABEL_SEPARATOR ), MAP_ENTRY_ODF12( "LabelPlacement", CHART, XML_LABEL_POSITION, XML_SCH_TYPE_LABEL_PLACEMENT_TYPE ), MAP_ENTRY( "SegmentOffset", CHART, XML_PIE_OFFSET, XML_TYPE_NUMBER ), diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx index bdf6af6eed04..6b2f271fcce3 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -444,7 +444,6 @@ void XMLChartExportPropertyMapper::handleSpecialItem( bValue = (( nValue & chart::ChartDataCaption::SYMBOL ) == chart::ChartDataCaption::SYMBOL ); ::sax::Converter::convertBool( sValueBuffer, bValue ); break; - case XML_SCH_CONTEXT_SPECIAL_SYMBOL_WIDTH: case XML_SCH_CONTEXT_SPECIAL_SYMBOL_HEIGHT: { diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 63e4aff8703c..861236a3a831 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -546,6 +546,7 @@ namespace xmloff { namespace token { TOKEN( "data-label-number", XML_DATA_LABEL_NUMBER ), TOKEN( "data-label-symbol", XML_DATA_LABEL_SYMBOL ), TOKEN( "data-label-text", XML_DATA_LABEL_TEXT ), + TOKEN( "data-label-wrap", XML_DATA_LABEL_WRAP ), TOKEN( "data-pilot-field", XML_DATA_PILOT_FIELD ), TOKEN( "data-pilot-grand-total", XML_DATA_PILOT_GRAND_TOTAL ), TOKEN( "data-pilot-level", XML_DATA_PILOT_LEVEL ), |