summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-10-01 07:35:04 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-10-01 07:35:04 +0000
commit31443396f8d177df67c8fa75878277e6323ed6b7 (patch)
tree9ccf1a27b4006ae1171c46b7cc18ea067c4d2520
parent59706aa9097d1c5f5b2b5f9ff9bedca0606c5fda (diff)
CWS-TOOLING: integrate CWS chart30
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx2
-rw-r--r--xmloff/source/chart/PropertyMap.hxx5
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx12
-rw-r--r--xmloff/source/core/xmltoken.cxx2
4 files changed, 19 insertions, 2 deletions
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index 9650ba527b..b0e8040faa 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -2961,6 +2961,8 @@ namespace xmloff { namespace token {
XML_PERCENTAGE_DATA_STYLE_NAME,
XML_VALUE_AND_PERCENTAGE,
XML_GROUP_BARS_PER_AXIS,
+ XML_AUTOMATIC_POSITION,
+ XML_AUTOMATIC_SIZE,
XML_REVERSE_DIRECTION,
XML_LABEL_SEPARATOR,
XML_LABEL_POSITION,
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index f93a22a97b..10de615757 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: PropertyMap.hxx,v $
- * $Revision: 1.35 $
+ * $Revision: 1.34.8.3 $
*
* This file is part of OpenOffice.org.
*
@@ -133,8 +133,11 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
MAP_ENTRY( "StackedBarsConnected", CHART, XML_CONNECT_BARS, XML_TYPE_BOOL ),
MAP_ENTRY_ODF12( "GroupBarsPerAxis", CHART, XML_GROUP_BARS_PER_AXIS, XML_TYPE_BOOL ),
+ MAP_ENTRY_ODF12( "AutomaticPosition", CHART, XML_AUTOMATIC_POSITION, XML_TYPE_BOOL ),
+ MAP_ENTRY_ODF12( "AutomaticSize", CHART, XML_AUTOMATIC_SIZE, XML_TYPE_BOOL ),
MAP_ENTRY_ODF12( "StartingAngle", CHART, XML_ANGLE_OFFSET, XML_TYPE_NUMBER ),
MAP_ENTRY_ODF12( "MissingValueTreatment", CHART, XML_TREAT_EMPTY_CELLS, XML_SCH_TYPE_MISSING_VALUE_TREATMENT ),
+ MAP_ENTRY( "ScaleText", CHART, XML_SCALE_TEXT, XML_TYPE_BOOL ),
// spline settings
MAP_ENTRY( "SplineOrder", CHART, XML_SPLINE_ORDER, XML_TYPE_NUMBER ),
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index a63b135c66..7bfee6330d 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: SchXMLPlotAreaContext.cxx,v $
- * $Revision: 1.47 $
+ * $Revision: 1.47.38.1 $
*
* This file is part of OpenOffice.org.
*
@@ -406,6 +406,16 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
mrSeriesDefaultsAndStyles.maLinesOnProperty = SchXMLTools::getPropertyFromContext(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Lines")), pPropStyleContext, pStylesCtxt );
+ //handle automatic position and size
+ bool bAutoSize = false;
+ bool bAutoPosition = false;
+ SchXMLTools::getPropertyFromContext(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticSize")), pPropStyleContext, pStylesCtxt ) >>= bAutoSize;
+ SchXMLTools::getPropertyFromContext(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticPosition")), pPropStyleContext, pStylesCtxt ) >>= bAutoPosition;
+ mbHasSize = mbHasSize && !bAutoSize;
+ mbHasPosition = mbHasPosition && !bAutoPosition;
+
//correct default starting angle for old 3D pies
if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_0( GetImport().GetModel() ) )
{
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index d8dec47b33..2a619976d5 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -2961,6 +2961,8 @@ namespace xmloff { namespace token {
TOKEN( "percentage-data-style-name", XML_PERCENTAGE_DATA_STYLE_NAME ),
TOKEN( "value-and-percentage", XML_VALUE_AND_PERCENTAGE ),
TOKEN( "group-bars-per-axis", XML_GROUP_BARS_PER_AXIS ),
+ TOKEN( "auto-position", XML_AUTOMATIC_POSITION ),
+ TOKEN( "auto-size", XML_AUTOMATIC_SIZE ),
TOKEN( "reverse-direction", XML_REVERSE_DIRECTION ),
TOKEN( "label-separator", XML_LABEL_SEPARATOR ),
TOKEN( "label-position", XML_LABEL_POSITION ),