diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-17 08:59:01 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-17 09:22:14 +0100 |
commit | acd78552de4179d869cf7061dffab22063466f1c (patch) | |
tree | f6a4290977b5c9a7ea35373ac5f9b366b5b0f48a /oox | |
parent | -Werror,-Wunused-variable (diff) | |
download | core-acd78552de4179d869cf7061dffab22063466f1c.tar.gz core-acd78552de4179d869cf7061dffab22063466f1c.zip |
Add rtl::OUString::toUtf8()
There is rtl::OUStringToOString() already to do OUString to OString conversion
using UTF-8 encoding on a best effort basis. However multiple modules have
code where we assume that such a conversion is perfect. Add a new method that
asserts such an expected success instead of duplicating it at multiple places.
Change-Id: I0e55b53f558df82b67af6a463c8144655cf0ca74
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/drawingml.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 6b0e4dc73ff0..79a2c2d41808 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -931,7 +931,7 @@ OUString DrawingML::WriteBlip( Reference< XPropertySet > rXPropSet, const OUStri GET( nContrast, AdjustContrast ); mpFS->startElementNS( XML_a, XML_blip, - FSNS( XML_r, XML_embed), OUStringToOString( sRelId, RTL_TEXTENCODING_UTF8 ).getStr(), + FSNS( XML_r, XML_embed), sRelId.toUtf8().getStr(), FSEND ); if( nBright || nContrast ) { @@ -1693,7 +1693,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa XML_val, IS( std::max( (sal_Int32)25000, std::min( (sal_Int32)400000, 1000*( (sal_Int32)nBulletRelSize ) ) ) ), FSEND ); if( bHasFontDesc ) mpFS->singleElementNS( XML_a, XML_buFont, - XML_typeface, OUStringToOString( aFontDesc.Name, RTL_TEXTENCODING_UTF8 ).getStr(), + XML_typeface, aFontDesc.Name.toUtf8().getStr(), XML_charset, (aFontDesc.CharSet == awt::CharSet::SYMBOL) ? "2" : NULL, FSEND ); @@ -1934,7 +1934,7 @@ void DrawingML::WriteText( Reference< XInterface > rXIface, const OUString& pres FSEND ); if( presetWarp != NULL && !presetWarp.isEmpty()) { - mpFS->singleElementNS(XML_a, XML_prstTxWarp, XML_prst,OUStringToOString(presetWarp, RTL_TEXTENCODING_UTF8 ).getStr(), + mpFS->singleElementNS(XML_a, XML_prstTxWarp, XML_prst, presetWarp.toUtf8().getStr(), FSEND ); } if (GetDocumentType() == DOCUMENT_DOCX) |