diff options
author | Radek Doulik <rodo@novell.com> | 2013-02-08 15:52:41 +0100 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2013-02-08 15:58:54 +0100 |
commit | 2e14a8bf03cefe831eb7694ea903115bc4b61ecf (patch) | |
tree | 064206c800f63e716783c45d7e3c41091859d657 /oox/source | |
parent | 9e310cc32923ceb4b18d97ce68d54a339b935f01 (diff) |
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
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/export/drawingml.cxx | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 8389b3a2d0b0..ccf25b98d879 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 ); |