summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xmloff/xmlexp.hxx1
-rw-r--r--svx/source/xml/xmleohlp.cxx2
-rw-r--r--xmloff/source/core/xmlexp.cxx15
3 files changed, 10 insertions, 8 deletions
diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index cf132192bc39..a40d47edf9e6 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -137,7 +137,6 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public cppu::WeakImplHelper<
rtl::Reference<SvXMLAttributeList> mxAttrList; // a common attribute list
OUString msOrigFileName; // the original URL
- OUString msEmbeddedObjectProtocol;
OUString msFilterName;
OUString msImgFilterName;
std::unique_ptr<SvXMLNamespaceMap> mpNamespaceMap; // the namepspace map
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 7074b498f91f..10fb40bb0124 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -61,7 +61,7 @@ using namespace ::com::sun::star::lang;
#define XML_CONTAINERSTORAGE_NAME_60 "Pictures"
#define XML_CONTAINERSTORAGE_NAME "ObjectReplacements"
#define XML_EMBEDDEDOBJECT_URL_BASE "vnd.sun.star.EmbeddedObject:"
-#define XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE "vnd.sun.star.GraphicObject:"
+#define XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE "vnd.sun.star.GraphicObject:"
class OutputStorageWrapper_Impl : public ::cppu::WeakImplHelper<XOutputStream>
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index c0be7c830a09..f76e7b677710 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -118,6 +118,9 @@ sal_Char const sXML_1_2[] = "1.2";
#define XML_USEPRETTYPRINTING "UsePrettyPrinting"
+#define XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE "vnd.sun.star.GraphicObject:"
+#define XML_EMBEDDEDOBJECT_URL_BASE "vnd.sun.star.EmbeddedObject:"
+
namespace {
struct XMLServiceMapEntry_Impl
@@ -396,8 +399,6 @@ void SvXMLExport::InitCtor_()
GetXMLToken(XML_NP_CSS3TEXT), GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT );
}
- msEmbeddedObjectProtocol = "vnd.sun.star.EmbeddedObject:";
-
if (mxModel.is() && !mxEventListener.is())
{
mxEventListener.set( new SvXMLExportEventListener(this));
@@ -1933,8 +1934,9 @@ bool SvXMLExport::AddEmbeddedXGraphicAsBase64(uno::Reference<graphic::XGraphic>
OUString SvXMLExport::AddEmbeddedObject( const OUString& rEmbeddedObjectURL )
{
OUString sRet;
- if (rEmbeddedObjectURL.startsWith(msEmbeddedObjectProtocol) &&
- mxEmbeddedResolver.is())
+ bool bSupportedURL = rEmbeddedObjectURL.startsWith(XML_EMBEDDEDOBJECT_URL_BASE) ||
+ rEmbeddedObjectURL.startsWith(XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE);
+ if (bSupportedURL && mxEmbeddedResolver.is())
{
sRet = mxEmbeddedResolver->resolveEmbeddedObjectURL(rEmbeddedObjectURL);
}
@@ -1947,8 +1949,9 @@ OUString SvXMLExport::AddEmbeddedObject( const OUString& rEmbeddedObjectURL )
bool SvXMLExport::AddEmbeddedObjectAsBase64( const OUString& rEmbeddedObjectURL )
{
bool bRet = false;
- if (rEmbeddedObjectURL.startsWith(msEmbeddedObjectProtocol) &&
- mxEmbeddedResolver.is())
+ bool bSupportedURL = rEmbeddedObjectURL.startsWith(XML_EMBEDDEDOBJECT_URL_BASE) ||
+ rEmbeddedObjectURL.startsWith(XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE);
+ if (bSupportedURL && mxEmbeddedResolver.is())
{
Reference < XNameAccess > xNA( mxEmbeddedResolver, UNO_QUERY );
if( xNA.is() )