summaryrefslogtreecommitdiff
path: root/chart2/source/model/main/Axis.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-06-13 11:12:50 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-06-19 14:46:56 -0400
commit1d38cb365543924f9c50014e6b2227e77de1d0c9 (patch)
tree1e77d0d2f82330f16c09cda60864824397d132c4 /chart2/source/model/main/Axis.cxx
parent2538e30ccc2e98de92de5157ca523fdb347eb537 (diff)
fdo#71076, fdo#71767: Preserve number formats when charts are copied.
Change-Id: If5ae8852152012483237e7602e56a0c46ea8748a
Diffstat (limited to 'chart2/source/model/main/Axis.cxx')
-rw-r--r--chart2/source/model/main/Axis.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index 90e7660b858f..a345bd93f63b 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -67,7 +67,8 @@ enum
PROP_AXIS_CROSSOVER_POSITION,
PROP_AXIS_CROSSOVER_VALUE,
PROP_AXIS_DISPLAY_LABELS,
- PROP_AXIS_NUMBER_FORMAT,
+ PROP_AXIS_NUMBERFORMAT,
+ PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE,
PROP_AXIS_LABEL_POSITION,
PROP_AXIS_TEXT_ROTATION,
PROP_AXIS_TEXT_BREAK,
@@ -115,10 +116,17 @@ void lcl_AddPropertiesToVector(
rOutProperties.push_back(
Property( CHART_UNONAME_NUMFMT,
- PROP_AXIS_NUMBER_FORMAT,
+ PROP_AXIS_NUMBERFORMAT,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEVOID ));
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
+
+ rOutProperties.push_back(
+ Property( CHART_UNONAME_LINK_TO_SRC_NUMFMT,
+ PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
Property( "LabelPosition",
@@ -220,6 +228,7 @@ private:
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_SHOW, true );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_CROSSOVER_POSITION, ::com::sun::star::chart::ChartAxisPosition_ZERO );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_DISPLAY_LABELS, true );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE, true );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_LABEL_POSITION, ::com::sun::star::chart::ChartAxisLabelPosition_NEAR_AXIS );
::chart::PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_AXIS_TEXT_ROTATION, 0.0 );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TEXT_BREAK, false );