summaryrefslogtreecommitdiff
path: root/chart2/source/model/main/Axis.cxx
diff options
context:
space:
mode:
authorsushil_shinde <sushil.shinde@synerzip.com>2014-01-29 14:31:19 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-02-11 23:23:40 +0000
commit83055835b1425b0a9d2fe5dce2f4db2d7a61919d (patch)
tree1116f8f96a7411d66792dcc7eeb23c470324f427 /chart2/source/model/main/Axis.cxx
parent7da3f43e636112b30a15d29de2f419d4b82dcb38 (diff)
fdo#74112 Preserve Chart displayunits properties during ODF import/export.
Change-Id: I38508b71ee5b3b966e1d36b0d253304fe17c0ec0 Reviewed-on: https://gerrit.libreoffice.org/7721 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2/source/model/main/Axis.cxx')
-rw-r--r--chart2/source/model/main/Axis.cxx22
1 files changed, 21 insertions, 1 deletions
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index f8a3b90448f1..a94a7d750f38 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -76,7 +76,10 @@ enum
PROP_AXIS_MAJOR_TICKMARKS,
PROP_AXIS_MINOR_TICKMARKS,
- PROP_AXIS_MARK_POSITION
+ PROP_AXIS_MARK_POSITION,
+
+ PROP_AXIS_DISPLAY_UNITS,
+ PROP_AXIS_BUILTINUNIT
};
void lcl_AddPropertiesToVector(
@@ -180,6 +183,22 @@ void lcl_AddPropertiesToVector(
PROP_AXIS_MARK_POSITION,
::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisMarkPosition * >(0)),
beans::PropertyAttribute::MAYBEDEFAULT ));
+
+ //Properties for display units:
+ rOutProperties.push_back(
+ Property( "DisplayUnits",
+ PROP_AXIS_DISPLAY_UNITS,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
+
+ //Properties for labels:
+ rOutProperties.push_back(
+ Property( "BuiltInUnit",
+ PROP_AXIS_BUILTINUNIT,
+ ::getCppuType( reinterpret_cast< const OUString * >(0)),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
}
struct StaticAxisDefaults_Initializer
@@ -214,6 +233,7 @@ private:
::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_AXIS_MAJOR_TICKMARKS, 2 /* CHAXIS_MARK_OUTER */ );
::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_AXIS_MINOR_TICKMARKS, 0 /* CHAXIS_MARK_NONE */ );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_MARK_POSITION, ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_DISPLAY_UNITS, false );
}
};