diff options
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/style/xmlnume.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumi.cxx | 11 |
2 files changed, 13 insertions, 7 deletions
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index 3eca9cda1bc1..9dd157122b1a 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -50,7 +50,7 @@ #include <xmloff/xmlnume.hxx> #include <xmloff/xmlexp.hxx> #include <tools/fontenum.hxx> - +#include <vcl/vclenum.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -90,7 +90,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, sal_Int16 nStartValue = 1, nDisplayLevels = 1, nBullRelSize = 0; - sal_Unicode cBullet = 0xf095; + sal_UCS4 cBullet = 0xf095; OUString sBulletFontName, sBulletFontStyleName ; FontFamily eBulletFontFamily = FAMILY_DONTKNOW; FontPitch eBulletFontPitch = PITCH_DONTKNOW; @@ -127,7 +127,8 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, rProp.Value >>= sValue; if( !sValue.isEmpty() ) { - cBullet = sValue[0]; + sal_Int32 nIndexUtf16 = 0; + cBullet = sValue.iterateCodePoints(&nIndexUtf16); } } else if( rProp.Name == "BulletRelSize" ) @@ -278,7 +279,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, cBullet = 0xF000 + 149; } // text:bullet-char="..." - sTmp.append( cBullet ); + sTmp.append(OUString(&cBullet, 1)); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_BULLET_CHAR, sTmp.makeStringAndClear() ); } diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 9fdba383d98e..bed36cb693da 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -45,6 +45,8 @@ #include <sax/tools/converter.hxx> +#include <vcl/vclenum.hxx> + #include <xmloff/xmltkmap.hxx> #include <xmloff/namespacemap.hxx> #include <xmloff/xmlnamespace.hxx> @@ -152,7 +154,7 @@ class SvxXMLListLevelStyleContext_Impl : public SvXMLImportContext rtl_TextEncoding eBulletFontEncoding; sal_Int16 eImageVertOrient; - sal_Unicode cBullet; + sal_UCS4 cBullet; sal_Int16 nRelSize; Color m_nColor; @@ -292,7 +294,10 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( break; case XML_ELEMENT(TEXT, XML_BULLET_CHAR): if (!sValue.isEmpty()) - cBullet = sValue[0]; + { + sal_Int32 nIndexUtf16 = 0; + cBullet = sValue.iterateCodePoints(&nIndexUtf16); + } break; case XML_ELEMENT(XLINK, XML_HREF): if( bImage ) @@ -490,7 +495,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties() // Must append 'cBullet' even if it is zero // if 'bBullet' is true and 'cBullet' is zero - BulletChar property must be 0. pProps[nPos].Name = "BulletChar"; - pProps[nPos++].Value <<= OUString( cBullet ); + pProps[nPos++].Value <<= OUString(&cBullet, 1); pProps[nPos].Name = "BulletFont"; pProps[nPos++].Value <<= aFDesc; |