diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-27 20:37:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-28 09:55:03 +0000 |
commit | 6f33482f8f4329b6c9874397bdb67c1b958b69c2 (patch) | |
tree | ba19bc4bff6ddbd87354f90a61615cf5f4892c5a /oox | |
parent | no need for super-convoluted empty string as far as I can see (diff) | |
download | core-6f33482f8f4329b6c9874397bdb67c1b958b69c2.tar.gz core-6f33482f8f4329b6c9874397bdb67c1b958b69c2.zip |
ByteString->rtl::OUStringToOString
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/export/utils.hxx | 15 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 14 |
2 files changed, 14 insertions, 15 deletions
diff --git a/oox/inc/oox/export/utils.hxx b/oox/inc/oox/export/utils.hxx index d24a13787437..9dee58cafc4c 100644 --- a/oox/inc/oox/export/utils.hxx +++ b/oox/inc/oox/export/utils.hxx @@ -30,14 +30,13 @@ #define _OOX_EXPORT_UTILS_HXX_ #define S(x) String( RTL_CONSTASCII_USTRINGPARAM( x ) ) -#define US(x) OUString( RTL_CONSTASCII_USTRINGPARAM( x )) -#define I32S(x) OString::valueOf( (sal_Int32) x ).getStr() -#define I64S(x) OString::valueOf( (sal_Int64) x ).getStr() -#define H32S(x) OString::valueOf( (sal_Int32) x, 16 ).getStr() -#define H64S(x) OString::valueOf( (sal_Int64) x, 16 ).getStr() -#define IS(x) OString::valueOf( x ).getStr() -#define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr() -#define ST(x) ByteString( x, RTL_TEXTENCODING_UTF8 ).GetBuffer() +#define US(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x )) +#define I32S(x) rtl::OString::valueOf( (sal_Int32) x ).getStr() +#define I64S(x) rtl::OString::valueOf( (sal_Int64) x ).getStr() +#define H32S(x) rtl::OString::valueOf( (sal_Int32) x, 16 ).getStr() +#define H64S(x) rtl::OString::valueOf( (sal_Int64) x, 16 ).getStr() +#define IS(x) rtl::OString::valueOf( x ).getStr() +#define USS(x) rtl::OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr() #ifndef DBG # if OSL_DEBUG_LEVEL > 0 diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index aae031d63132..745c6c5def35 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -169,7 +169,7 @@ bool DrawingML::GetProperty( Reference< XPropertySet > rXPropSet, String aName ) mAny = rXPropSet->getPropertyValue( aName ); if ( mAny.hasValue() ) bRetValue = true; - } catch( const Exception& ) { /* printf ("exception when trying to get value of property: %s\n", ST(aName)); */ } + } catch( const Exception& ) { /* printf ("exception when trying to get value of property: %s\n", USS(aName)); */ } return bRetValue; } @@ -184,7 +184,7 @@ bool DrawingML::GetPropertyAndState( Reference< XPropertySet > rXPropSet, Refere bRetValue = true; eState = rXPropState->getPropertyState( aName ); } - } catch( const Exception& ) { /* printf ("exception when trying to get value of property: %s\n", ST(aName)); */ } + } catch( const Exception& ) { /* printf ("exception when trying to get value of property: %s\n", USS(aName)); */ } return bRetValue; } @@ -447,7 +447,7 @@ void DrawingML::WriteOutline( Reference< XPropertySet > rXPropSet ) OUString DrawingML::WriteImage( const OUString& rURL ) { - ByteString aURLBS( UniString( rURL ), RTL_TEXTENCODING_UTF8 ); + ByteString aURLBS(rtl::OUStringToOString(rURL, RTL_TEXTENCODING_UTF8)); const char aURLBegin[] = "vnd.sun.star.GraphicObject:"; int index = aURLBS.Search( aURLBegin ); @@ -805,7 +805,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs mAny >>= usTypeface; String aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); if( aSubstName.Len() ) - typeface = ST( aSubstName ); + typeface = USS( aSubstName ); else typeface = USS( usTypeface ); @@ -825,7 +825,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs mAny >>= usTypeface; String aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); if( aSubstName.Len() ) - typeface = ST( aSubstName ); + typeface = USS( aSubstName ); else typeface = USS( usTypeface ); @@ -870,7 +870,7 @@ const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::su if( GETA( TextPortionType ) ) { aFieldType = String( *(::rtl::OUString*)mAny.getValue() ); - DBG(printf ("field type: %s\n", ST(aFieldType) )); + DBG(printf ("field type: %s\n", USS(aFieldType) )); } if( aFieldType == S( "TextField" ) ) { @@ -881,7 +881,7 @@ const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::su rXPropSet.set( rXTextField, UNO_QUERY ); if( rXPropSet.is() ) { String aFieldKind( rXTextField->getPresentation( sal_True ) ); - DBG(printf ("field kind: %s\n", ST(aFieldKind) )); + DBG(printf ("field kind: %s\n", USS(aFieldKind) )); if( aFieldKind == S( "Page" ) ) { return "slidenum"; } |