From 40d83914d43f60a196dfabddea0b52e2046b333a Mon Sep 17 00:00:00 2001 From: Tünde Tóth Date: Fri, 6 Mar 2020 10:29:03 +0100 Subject: tdf#127792 implement UNO chart attribute MajorOrigin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit based on the specification in OFFICE-3936 for ODF 1.4: https://issues.oasis-open.org/browse/OFFICE-3936 Note: import of the embedded chart of the DOCX unit test document uses also ODF format in the background, testing also the extension of the native file format. Follow-up of commit 830e539547c463b932ce643517f880789185032d (tdf#127393 OOXML chart import: fix X axis position setting "CrossBetween"). See also commits with "ShiftedCategoryPosition" in their descriptions. Change-Id: I9cd278ac0172c0fab7c51d585a65c34a0ad60b82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90081 Tested-by: László Németh Reviewed-by: László Németh --- chart2/source/controller/chartapiwrapper/AxisWrapper.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'chart2/source/controller') diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx index 3516d7a29ba2..b0a1d5f85746 100644 --- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx @@ -96,7 +96,8 @@ enum PROP_AXIS_GAP_WIDTH, PROP_AXIS_DISPLAY_UNITS, PROP_AXIS_BUILTINUNIT, - PROP_AXIS_TRY_STAGGERING_FIRST + PROP_AXIS_TRY_STAGGERING_FIRST, + PROP_AXIS_MAJOR_ORIGIN }; void lcl_AddPropertiesToVector( @@ -323,6 +324,12 @@ void lcl_AddPropertiesToVector( cppu::UnoType::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT ); + + rOutProperties.emplace_back( "MajorOrigin", + PROP_AXIS_MAJOR_ORIGIN, + cppu::UnoType::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID ); } struct StaticAxisWrapperPropertyArray_Initializer @@ -616,6 +623,7 @@ std::vector< std::unique_ptr > AxisWrapper::createWrappedProper aWrappedProperties.emplace_back( new WrappedLinkNumberFormatProperty ); aWrappedProperties.emplace_back( new WrappedProperty("StackedText","StackCharacters") ); aWrappedProperties.emplace_back( new WrappedDirectStateProperty("CrossoverPosition","CrossoverPosition") ); + aWrappedProperties.emplace_back( new WrappedDirectStateProperty("MajorOrigin","MajorOrigin") ); { WrappedGapwidthProperty* pWrappedGapwidthProperty( new WrappedGapwidthProperty( m_spChart2ModelContact ) ); WrappedBarOverlapProperty* pWrappedBarOverlapProperty( new WrappedBarOverlapProperty( m_spChart2ModelContact ) ); -- cgit