diff options
author | Michael Brauer <mib@openoffice.org> | 2000-11-23 10:56:13 +0000 |
---|---|---|
committer | Michael Brauer <mib@openoffice.org> | 2000-11-23 10:56:13 +0000 |
commit | fdf009b66f20e5f1ad6d5a47933d948fa969f54e (patch) | |
tree | 8e4b8c4b36112571aa9a352848627160a9041756 /xmloff/source/style/undlihdl.cxx | |
parent | b5e12ac18a83811432218309e922bcb618787454 (diff) |
#80624#: Finish StarOffice-API and XML filter for I18N attributes
Diffstat (limited to 'xmloff/source/style/undlihdl.cxx')
-rw-r--r-- | xmloff/source/style/undlihdl.cxx | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/xmloff/source/style/undlihdl.cxx b/xmloff/source/style/undlihdl.cxx index 66391d07d2c5..baf12513a540 100644 --- a/xmloff/source/style/undlihdl.cxx +++ b/xmloff/source/style/undlihdl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: undlihdl.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:07:05 $ + * last change: $Author: mib $ $Date: 2000-11-23 11:51:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,13 +75,13 @@ #include <rtl/ustrbuf.hxx> #endif -#ifndef _VCL_VCLENUM_HXX -#include <vcl/vclenum.hxx> -#endif #ifndef _COM_SUN_STAR_UNO_ANY_HXX_ #include <com/sun/star/uno/Any.hxx> #endif +#ifndef _COM_SUN_STAR_AWT_FONTUNDERLINE_HPP +#include <com/sun/star/awt/FontUnderline.hpp> +#endif #ifndef _XMLOFF_XMLEMENT_HXX #include "xmlelement.hxx" @@ -89,27 +89,28 @@ using namespace ::rtl; using namespace ::com::sun::star; +using namespace ::com::sun::star::awt; SvXMLEnumMapEntry __READONLY_DATA pXML_Underline_Enum[] = { - { sXML_underline_none, UNDERLINE_NONE }, - { sXML_underline_single, UNDERLINE_SINGLE }, - { sXML_underline_double, UNDERLINE_DOUBLE }, - { sXML_underline_dotted, UNDERLINE_DOTTED }, - { sXML_underline_dash, UNDERLINE_DASH }, - { sXML_underline_long_dash, UNDERLINE_LONGDASH }, - { sXML_underline_dot_dash, UNDERLINE_DASHDOT }, - { sXML_underline_dot_dot_dash, UNDERLINE_DASHDOTDOT }, - { sXML_underline_wave, UNDERLINE_WAVE }, - { sXML_underline_bold, UNDERLINE_BOLD }, - { sXML_underline_bold_dotted, UNDERLINE_BOLDDOTTED }, - { sXML_underline_bold_dash, UNDERLINE_BOLDDASH }, - { sXML_underline_bold_long_dash, UNDERLINE_BOLDLONGDASH }, - { sXML_underline_bold_dot_dash, UNDERLINE_BOLDDASHDOT }, - { sXML_underline_bold_dot_dot_dash, UNDERLINE_BOLDDASHDOTDOT }, - { sXML_underline_bold_wave, UNDERLINE_BOLDWAVE }, - { sXML_underline_double_wave, UNDERLINE_DOUBLEWAVE }, - { sXML_underline_small_wave, UNDERLINE_SMALLWAVE }, + { sXML_underline_none, FontUnderline::NONE }, + { sXML_underline_single, FontUnderline::SINGLE }, + { sXML_underline_double, FontUnderline::DOUBLE }, + { sXML_underline_dotted, FontUnderline::DOTTED }, + { sXML_underline_dash, FontUnderline::DASH }, + { sXML_underline_long_dash, FontUnderline::LONGDASH }, + { sXML_underline_dot_dash, FontUnderline::DASHDOT }, + { sXML_underline_dot_dot_dash, FontUnderline::DASHDOTDOT }, + { sXML_underline_wave, FontUnderline::WAVE }, + { sXML_underline_bold, FontUnderline::BOLD }, + { sXML_underline_bold_dotted, FontUnderline::BOLDDOTTED }, + { sXML_underline_bold_dash, FontUnderline::BOLDDASH }, + { sXML_underline_bold_long_dash, FontUnderline::BOLDLONGDASH }, + { sXML_underline_bold_dot_dash, FontUnderline::BOLDDASHDOT }, + { sXML_underline_bold_dot_dot_dash, FontUnderline::BOLDDASHDOTDOT }, + { sXML_underline_bold_wave, FontUnderline::BOLDWAVE }, + { sXML_underline_double_wave, FontUnderline::DOUBLEWAVE }, + { sXML_underline_small_wave, FontUnderline::SMALLWAVE }, { 0, 0 } }; @@ -129,7 +130,7 @@ sal_Bool XMLUnderlinePropHdl::importXML( const OUString& rStrImpValue, uno::Any& sal_uInt16 eUnderline; if( ( bRet = rUnitConverter.convertEnum( eUnderline, rStrImpValue, pXML_Underline_Enum ) ) ) - rValue <<= eUnderline; + rValue <<= (sal_Int16)eUnderline; return bRet; } @@ -137,12 +138,13 @@ sal_Bool XMLUnderlinePropHdl::importXML( const OUString& rStrImpValue, uno::Any& sal_Bool XMLUnderlinePropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const { sal_Bool bRet = sal_False; - sal_Int32 nValue; + sal_Int16 nValue; OUStringBuffer aOut; if( rValue >>= nValue ) { - if( ( bRet = rUnitConverter.convertEnum( aOut, nValue, pXML_Underline_Enum ) ) ) + if( ( bRet = rUnitConverter.convertEnum( aOut, (sal_uInt16)nValue, + pXML_Underline_Enum ) ) ) rStrExpValue = aOut.makeStringAndClear(); } |