summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2018-12-26 14:14:51 +0300
committerJustin Luth <justin_luth@sil.org>2018-12-28 06:43:07 +0100
commitfa1354861fffa69da2a1d1613f979f2f26242d24 (patch)
tree58b1d94347d709929f13c2ec3c9fe137ecd71eab /xmloff
parent0649347bc866ea793d6c547738456f93c7fa1fa9 (diff)
related tdf#47471 textgraphic: use stylename if autostyle missing
The same fix for 47471 should also be useful for textgraphics. Change-Id: I27cef6bd22fbc4f2a94fb17231a3c385987364e0 Reviewed-on: https://gerrit.libreoffice.org/65619 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/txtparae.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 5065fed7ae69..c59198bb92b3 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3076,8 +3076,9 @@ void XMLTextParagraphExport::_exportTextGraphic(
rPropSet->getPropertyValue( gsFrameStyleName ) >>= sStyle;
}
- OUString sAutoStyle( sStyle );
- sAutoStyle = Find( XML_STYLE_FAMILY_TEXT_FRAME, rPropSet, sStyle );
+ OUString sAutoStyle = Find( XML_STYLE_FAMILY_TEXT_FRAME, rPropSet, sStyle );
+ if ( sAutoStyle.isEmpty() )
+ sAutoStyle = sStyle;
if( !sAutoStyle.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE_NAME,
GetExport().EncodeStyleName( sAutoStyle ) );