summaryrefslogtreecommitdiff
path: root/xmloff/source/style/chrhghdl.cxx
diff options
context:
space:
mode:
authorBjörn Milcke <bm@openoffice.org>2001-05-21 10:07:15 +0000
committerBjörn Milcke <bm@openoffice.org>2001-05-21 10:07:15 +0000
commit16118ab20dd14b126b1cc33b4d2082b7e83ba07e (patch)
tree77fefaa55a121a2eea8f337770f09f453edc1458 /xmloff/source/style/chrhghdl.cxx
parent50ee5e9473eb28d34f5eff8c42308a9075022cc4 (diff)
#85945# char heights may be floats so use convertDouble instead of convertMeasure
Diffstat (limited to 'xmloff/source/style/chrhghdl.cxx')
-rw-r--r--xmloff/source/style/chrhghdl.cxx23
1 files changed, 15 insertions, 8 deletions
diff --git a/xmloff/source/style/chrhghdl.cxx b/xmloff/source/style/chrhghdl.cxx
index d495b590f5b4..b4cc4244fe30 100644
--- a/xmloff/source/style/chrhghdl.cxx
+++ b/xmloff/source/style/chrhghdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: chrhghdl.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mib $ $Date: 2000-10-24 07:40:39 $
+ * last change: $Author: bm $ $Date: 2001-05-21 11:07:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -72,6 +72,10 @@
#include "xmluconv.hxx"
#endif
+#ifndef _XMLOFF_XMLEHELP_HXX
+#include "xmlehelp.hxx"
+#endif
+
#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
#endif
@@ -104,13 +108,14 @@ XMLCharHeightHdl::~XMLCharHeightHdl()
sal_Bool XMLCharHeightHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
{
- sal_Int32 nAbs = 0;
+ double fSize;
if( rStrImpValue.indexOf( sal_Unicode('%') ) == -1 )
{
- if( SvXMLUnitConverter::convertMeasure( nAbs, rStrImpValue, MAP_POINT ) )
+ MapUnit eSrcUnit = SvXMLExportHelper::GetUnitFromString( rStrImpValue, MAP_POINT );
+ if( SvXMLUnitConverter::convertDouble( fSize, rStrImpValue, eSrcUnit, MAP_POINT ))
{
- rValue <<= (float)nAbs;
+ rValue <<= (float)fSize;
return sal_True;
}
}
@@ -122,10 +127,12 @@ sal_Bool XMLCharHeightHdl::exportXML( OUString& rStrExpValue, const uno::Any& rV
{
OUStringBuffer aOut;
- float nAbs = 0;
- if( rValue >>= nAbs )
+ float fSize = 0;
+ if( rValue >>= fSize )
{
- SvXMLUnitConverter::convertMeasure( aOut, nAbs, MAP_POINT, MAP_POINT );
+ SvXMLUnitConverter::convertDouble( aOut, (double)fSize, TRUE, MAP_POINT, MAP_POINT );
+ aOut.append( sal_Unicode('p'));
+ aOut.append( sal_Unicode('t'));
}
rStrExpValue = aOut.makeStringAndClear();