oox/source/export/drawingml.cxx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-)
New commits: commit 2e14a8bf03cefe831eb7694ea903115bc4b61ecf Author: Radek Doulik <r...@novell.com> Date: Fri Feb 8 15:52:41 2013 +0100 fix invalid USS macro use, the result is for immediate use in calls - otherwise it will became invalid immediately as in this case and contain some random value from stack Change-Id: I9e9e9660ec5d391549b16c6a0510c97cc11e7442 diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 8389b3a..ccf25b9 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -779,20 +779,15 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs } if( GETAD( CharFontName ) ) { - const char* typeface = NULL; const char* pitch = NULL; const char* charset = NULL; OUString usTypeface; mAny >>= usTypeface; - String aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); - if( aSubstName.Len() ) - typeface = USS( aSubstName ); - else - typeface = USS( usTypeface ); + OUString aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); mpFS->singleElementNS( XML_a, XML_latin, - XML_typeface, typeface, + XML_typeface, USS(aSubstName.getLength() ? aSubstName : usTypeface), XML_pitchFamily, pitch, XML_charset, charset, FSEND ); @@ -805,14 +800,10 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs OUString usTypeface; mAny >>= usTypeface; - String aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); - if( aSubstName.Len() ) - typeface = USS( aSubstName ); - else - typeface = USS( usTypeface ); + OUString aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); mpFS->singleElementNS( XML_a, bComplex ? XML_cs : XML_ea, - XML_typeface, typeface, + XML_typeface, USS(aSubstName.getLength() ? aSubstName : usTypeface), XML_pitchFamily, pitch, XML_charset, charset, FSEND ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits