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 /include | |
parent | 62da1a834128f5762fa2e6ceb35fa61372ed5949 (diff) |
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 'include')
-rw-r--r-- | include/svx/unoapi.hxx | 5 | ||||
-rw-r--r-- | include/xmloff/xmlexp.hxx | 3 | ||||
-rw-r--r-- | include/xmloff/xmluconv.hxx | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/include/svx/unoapi.hxx b/include/svx/unoapi.hxx index 74bd154f08cd..07330ac255ba 100644 --- a/include/svx/unoapi.hxx +++ b/include/svx/unoapi.hxx @@ -27,6 +27,7 @@ #include <svtools/grfmgr.hxx> #include <svl/poolitem.hxx> #include <svx/svxdllapi.h> +#include <tools/fldunit.hxx> class SvxShape; class SdrObject; @@ -68,13 +69,13 @@ SVX_DLLPUBLIC bool SvxMapUnitToMeasureUnit( const short nVcl, short& eApi ) thro * Maps the API constant MeasureUnit to a vcl MapUnit enum. * Returns false if conversion is not supported. */ -SVX_DLLPUBLIC bool SvxMeasureUnitToFieldUnit( const short eApi, short& nVcl ) throw(); +SVX_DLLPUBLIC bool SvxMeasureUnitToFieldUnit( const short eApi, FieldUnit& nVcl ) throw(); /** * Maps the vcl MapUnit enum to a API constant MeasureUnit. * Returns false if conversion is not supported. */ -SVX_DLLPUBLIC bool SvxFieldUnitToMeasureUnit( const short nVcl, short& eApi ) throw(); +SVX_DLLPUBLIC bool SvxFieldUnitToMeasureUnit( const FieldUnit nVcl, short& eApi ) throw(); /** * If the given name is a predefined name for the current language it is replaced by diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index 57cc643536bf..d149aed89c32 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -58,6 +58,7 @@ #include <xmloff/XMLPageExport.hxx> #include <xmloff/ProgressBarHelper.hxx> #include <cppuhelper/implbase6.hxx> +#include <tools/fldunit.hxx> #include <list> @@ -287,7 +288,7 @@ public: const OUString& rFileName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > &, - sal_Int16 const eDefaultFieldUnit ); + FieldUnit const eDefaultFieldUnit ); virtual ~SvXMLExport(); diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx index 29a5e37b40c6..63216feca769 100644 --- a/include/xmloff/xmluconv.hxx +++ b/include/xmloff/xmluconv.hxx @@ -38,6 +38,7 @@ #include <com/sun/star/drawing/Position3D.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <tools/fldunit.hxx> // predeclarations @@ -96,7 +97,7 @@ public: virtual ~SvXMLUnitConverter(); - static sal_Int16 GetMeasureUnit(sal_Int16 const nFieldUnit); + static sal_Int16 GetMeasureUnit(FieldUnit const nFieldUnit); /** sets the default unit for numerical measures */ void SetCoreMeasureUnit( sal_Int16 const eCoreMeasureUnit ); |