From 65803ad94c8652edb84f82202717b1b206407a65 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 30 Jul 2014 14:15:39 +0200 Subject: fix some dodgy FieldUnit conversions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the FieldUnit enum was being converted in some dodgy ways and in some places the MapUnit enum values were being used. Change-Id: Ic9aacb84058d1c14c3a4a79ef6676082df9a7270 --- sd/source/ui/unoidl/UnoDocumentSettings.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 8b3851b7192e..e792db8d4d30 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -658,10 +658,10 @@ throw (UnknownPropertyException, PropertyVetoException, sal_Int16 nValue = 0; if( *pValues >>= nValue ) { - short nFieldUnit; + FieldUnit nFieldUnit; if( SvxMeasureUnitToFieldUnit( nValue, nFieldUnit ) ) { - pDoc->SetUIUnit((FieldUnit)nFieldUnit ); + pDoc->SetUIUnit( nFieldUnit ); bOk = true; } } @@ -1065,7 +1065,7 @@ throw (UnknownPropertyException, WrappedTargetException, RuntimeException) case HANDLE_MEASUREUNIT: { short nMeasure; - SvxFieldUnitToMeasureUnit( (const short)pDoc->GetUIUnit(), nMeasure ); + SvxFieldUnitToMeasureUnit( pDoc->GetUIUnit(), nMeasure ); *pValue <<= (sal_Int16)nMeasure; } break; -- cgit