diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-08-06 16:50:47 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-08-06 18:32:03 +0200 |
commit | f1f6c82e613ace836aa78a822688721fb7fb5e80 (patch) | |
tree | c34a2bd225c3d953661f375e019254700e773b62 /xmloff/source | |
parent | abb3c857bd7f00826e891859f08071f7e112841c (diff) |
tdf#150235: use correct types in XMLTextColumnsExport
The types for the properties are defined in css::text::TextColumns
servise. But before commit 95ebd24a629b4c8cd62cc20c0701683512cc8fa0
Author Mike Kaganski <mike.kaganski@collabora.com>
Date Thu May 27 13:00:10 2021 +0300
editengine-columns: ODF support [API CHANGE]
the implementation of the service (SwXTextColumns) used smaller types
for some properties. The export code (XMLTextColumnsExport::exportXML)
mathced those implementation types.
The mentioned commit changed the implementation to use proper types;
but the export code wasn't corrected.
This fixes the export code.
Change-Id: I95838dec382edc61bb2e5b39177bf57a7d79e0bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137900
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/text/XMLTextColumnsExport.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx index 017045d5f635..ec80f2ed90cc 100644 --- a/xmloff/source/text/XMLTextColumnsExport.cxx +++ b/xmloff/source/text/XMLTextColumnsExport.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/text/XTextColumns.hpp> +#include <com/sun/star/text/ColumnSeparatorStyle.hpp> #include <com/sun/star/text/TextColumn.hpp> #include <com/sun/star/style/VerticalAlignment.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -117,7 +118,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny ) // style:height aAny = xPropSet->getPropertyValue( gsSeparatorLineRelativeHeight ); - sal_Int8 nHeight = 0; + sal_Int32 nHeight = 0; aAny >>= nHeight; ::sax::Converter::convertPercent( sValue, nHeight ); GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_HEIGHT, @@ -125,16 +126,16 @@ void XMLTextColumnsExport::exportXML( const Any& rAny ) // style::style aAny = xPropSet->getPropertyValue( gsSeparatorLineStyle ); - sal_Int8 nStyle = 0; + sal_Int16 nStyle = css::text::ColumnSeparatorStyle::NONE; aAny >>= nStyle; enum XMLTokenEnum eStr = XML_TOKEN_INVALID; switch ( nStyle ) { - case 0: eStr = XML_NONE; break; - case 1: eStr = XML_SOLID; break; - case 2: eStr = XML_DOTTED; break; - case 3: eStr = XML_DASHED; break; + case css::text::ColumnSeparatorStyle::NONE: eStr = XML_NONE; break; + case css::text::ColumnSeparatorStyle::SOLID: eStr = XML_SOLID; break; + case css::text::ColumnSeparatorStyle::DOTTED: eStr = XML_DOTTED; break; + case css::text::ColumnSeparatorStyle::DASHED: eStr = XML_DASHED; break; default: break; } |