Kaydet (Commit) 2e14a8bf authored tarafından Radek Doulik's avatar Radek Doulik

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
üst 9e310cc3
...@@ -779,20 +779,15 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs ...@@ -779,20 +779,15 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs
} }
if( GETAD( CharFontName ) ) { if( GETAD( CharFontName ) ) {
const char* typeface = NULL;
const char* pitch = NULL; const char* pitch = NULL;
const char* charset = NULL; const char* charset = NULL;
OUString usTypeface; OUString usTypeface;
mAny >>= usTypeface; mAny >>= usTypeface;
String aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); OUString aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) );
if( aSubstName.Len() )
typeface = USS( aSubstName );
else
typeface = USS( usTypeface );
mpFS->singleElementNS( XML_a, XML_latin, mpFS->singleElementNS( XML_a, XML_latin,
XML_typeface, typeface, XML_typeface, USS(aSubstName.getLength() ? aSubstName : usTypeface),
XML_pitchFamily, pitch, XML_pitchFamily, pitch,
XML_charset, charset, XML_charset, charset,
FSEND ); FSEND );
...@@ -805,14 +800,10 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs ...@@ -805,14 +800,10 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs
OUString usTypeface; OUString usTypeface;
mAny >>= usTypeface; mAny >>= usTypeface;
String aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); OUString aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) );
if( aSubstName.Len() )
typeface = USS( aSubstName );
else
typeface = USS( usTypeface );
mpFS->singleElementNS( XML_a, bComplex ? XML_cs : XML_ea, mpFS->singleElementNS( XML_a, bComplex ? XML_cs : XML_ea,
XML_typeface, typeface, XML_typeface, USS(aSubstName.getLength() ? aSubstName : usTypeface),
XML_pitchFamily, pitch, XML_pitchFamily, pitch,
XML_charset, charset, XML_charset, charset,
FSEND ); FSEND );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment