summaryrefslogtreecommitdiff
path: root/chart2/source/model
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-06-17 11:41:06 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-06-19 14:46:56 -0400
commit2538e30ccc2e98de92de5157ca523fdb347eb537 (patch)
treef6e07c61cd108d73e7cc99752e89e08a4cde84ff /chart2/source/model
parentb846847121a29b8acd9d48ef1a795ea3b9d6d974 (diff)
Use define constant to keep track of all NumberFormat property usage.
Change-Id: I2a544922e03ec8253290ac8bf5a89c9cdd72d8dd
Diffstat (limited to 'chart2/source/model')
-rw-r--r--chart2/source/model/main/Axis.cxx4
-rw-r--r--chart2/source/model/main/DataPointProperties.cxx3
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx10
3 files changed, 11 insertions, 6 deletions
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index 151e658509be..90e7660b858f 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -28,6 +28,8 @@
#include "CloneHelper.hxx"
#include "AxisHelper.hxx"
#include "EventListenerHelper.hxx"
+#include <unonames.hxx>
+
#include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
#include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
@@ -112,7 +114,7 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
- Property( "NumberFormat",
+ Property( CHART_UNONAME_NUMFMT,
PROP_AXIS_NUMBER_FORMAT,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx
index 1f6ae084146b..2ebfa95fadbe 100644
--- a/chart2/source/model/main/DataPointProperties.cxx
+++ b/chart2/source/model/main/DataPointProperties.cxx
@@ -21,6 +21,7 @@
#include "macros.hxx"
#include "LinePropertiesHelper.hxx"
#include "FillProperties.hxx"
+#include <unonames.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
@@ -277,7 +278,7 @@ void DataPointProperties::AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
- Property( "NumberFormat",
+ Property( CHART_UNONAME_NUMFMT,
PROP_DATAPOINT_NUMBER_FORMAT,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index de109e85a98a..b17952600940 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -31,6 +31,8 @@
#include "LegendHelper.hxx"
#include "DiagramHelper.hxx"
#include "AxisIndexDefines.hxx"
+#include <unonames.hxx>
+
#include <cppuhelper/component_context.hxx>
#include <com/sun/star/chart/ChartSolidType.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
@@ -456,9 +458,9 @@ void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram
if( xAxisProp.is())
{
// set number format to source format
- uno::Any aValue( xAxisProp->getPropertyValue("NumberFormat"));
+ uno::Any aValue = xAxisProp->getPropertyValue(CHART_UNONAME_NUMFMT);
if( aValue.hasValue())
- xAxisProp->setPropertyValue("NumberFormat", uno::Any());
+ xAxisProp->setPropertyValue(CHART_UNONAME_NUMFMT, uno::Any());
}
}
}
@@ -756,9 +758,9 @@ void ChartTypeTemplate::adaptAxes(
if( xAxisProp.is())
{
// set number format to source format
- uno::Any aValue( xAxisProp->getPropertyValue("NumberFormat"));
+ uno::Any aValue = xAxisProp->getPropertyValue(CHART_UNONAME_NUMFMT);
if( aValue.hasValue())
- xAxisProp->setPropertyValue("NumberFormat", uno::Any());
+ xAxisProp->setPropertyValue(CHART_UNONAME_NUMFMT, uno::Any());
}
}
}