summaryrefslogtreecommitdiff
path: root/xmloff/source/text/txtparae.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text/txtparae.cxx')
-rw-r--r--xmloff/source/text/txtparae.cxx44
1 files changed, 24 insertions, 20 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index f43673c59297..755db3501381 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3097,26 +3097,6 @@ void XMLTextParagraphExport::_exportTextGraphic(
OUString sReplacementOrigURL;
rPropSet->getPropertyValue( sReplacementGraphicURL ) >>= sReplacementOrigURL;
- if(sReplacementOrigURL.getLength())
- {
- const OUString sReplacementURL(GetExport().AddEmbeddedGraphicObject( sReplacementOrigURL ));
-
- // If there is no url, then then graphic is empty
- if(sReplacementURL.getLength())
- {
- GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sReplacementURL);
- GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE);
- GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED);
- GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD);
-
- // xlink:href for replacement, only written for Svg content
- SvXMLElementExport aElement(GetExport(), XML_NAMESPACE_DRAW, XML_IMAGE, sal_False, sal_True);
-
- // optional office:binary-data
- GetExport().AddEmbeddedGraphicObjectAsBase64(sReplacementURL);
- }
- }
-
// xlink:href
OUString sOrigURL;
rPropSet->getPropertyValue( sGraphicURL ) >>= sOrigURL;
@@ -3148,6 +3128,30 @@ void XMLTextParagraphExport::_exportTextGraphic(
GetExport().AddEmbeddedGraphicObjectAsBase64( sOrigURL );
}
+ //Resolves: fdo#62461 put preferred image first above, followed by
+ //fallback here
+ if (!sReplacementOrigURL.isEmpty())
+ {
+ const OUString sReplacementURL(GetExport().AddEmbeddedGraphicObject( sReplacementOrigURL ));
+
+ // If there is no url, then then graphic is empty
+ if(sReplacementURL.getLength())
+ {
+ GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sReplacementURL);
+ GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE);
+ GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED);
+ GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD);
+
+ // xlink:href for replacement, only written for Svg content
+ SvXMLElementExport aElement(GetExport(), XML_NAMESPACE_DRAW, XML_IMAGE, sal_False, sal_True);
+
+ // optional office:binary-data
+ GetExport().AddEmbeddedGraphicObjectAsBase64(sReplacementURL);
+ }
+ }
+
+
+
// script:events
Reference<XEventsSupplier> xEventsSupp( rPropSet, UNO_QUERY );
GetExport().GetEventExport().Export(xEventsSupp);