diff options
author | Noel Grandin <noel@peralex.com> | 2014-07-30 14:15:39 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-07-31 11:38:47 +0200 |
commit | 65803ad94c8652edb84f82202717b1b206407a65 (patch) | |
tree | c9de76166e6b7ce9f336edf7c927a30eca0977e6 /xmloff | |
parent | GtkComboBoxText requires gtk >= 2.24 (again). (diff) | |
download | core-65803ad94c8652edb84f82202717b1b206407a65.tar.gz core-65803ad94c8652edb84f82202717b1b206407a65.zip |
fix some dodgy FieldUnit conversions
the FieldUnit enum was being converted in some dodgy ways and
in some places the MapUnit enum values were being used.
Change-Id: Ic9aacb84058d1c14c3a4a79ef6676082df9a7270
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/xmluconv.cxx | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 5e6571319d18..3f7d0e83634c 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -500,7 +500,7 @@ SvXMLExport::SvXMLExport( const OUString &rFileName, const uno::Reference< xml::sax::XDocumentHandler > & rHandler, const Reference< XModel >& rModel, - sal_Int16 const eDefaultFieldUnit) + FieldUnit const eDefaultFieldUnit) : mpImpl( new SvXMLExport_Impl ), m_xContext(xContext), m_implementationName(implementationName), mxModel( rModel ), diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index d271df307810..c441566b3546 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -129,7 +129,7 @@ SvXMLUnitConverter::~SvXMLUnitConverter() { } -sal_Int16 SvXMLUnitConverter::GetMeasureUnit(sal_Int16 const nFieldUnit) +sal_Int16 SvXMLUnitConverter::GetMeasureUnit(FieldUnit const nFieldUnit) { sal_Int16 eUnit = util::MeasureUnit::INCH; switch( nFieldUnit ) @@ -152,6 +152,12 @@ sal_Int16 SvXMLUnitConverter::GetMeasureUnit(sal_Int16 const nFieldUnit) case FUNIT_100TH_MM: eUnit = util::MeasureUnit::MM_100TH; break; + case FUNIT_INCH: + eUnit = util::MeasureUnit::INCH; + break; + default: + assert(false); + break; } return eUnit; } |