summaryrefslogtreecommitdiff
path: root/filter/source/svg/svgexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/svg/svgexport.cxx')
-rw-r--r--filter/source/svg/svgexport.cxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index c6f9ce9bd015..d5cb95f732ef 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -47,6 +47,7 @@
#include <comphelper/sequenceashashmap.hxx>
#include <i18nlangtag/lang.h>
#include <svl/zforlist.hxx>
+#include <tools/urlobj.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
#include <xmloff/nmspmap.hxx>
@@ -1951,13 +1952,18 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
if( !aBookmark.isEmpty() )
{
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xlink:href", aBookmark);
- SvXMLElementExport alinkA( *mpSVGExport, XML_NAMESPACE_NONE, "a", true, true );
- mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf,
- 0xffffffff,
- pElementId,
- &rxShape,
- pEmbeddedBitmapsMtf );
+ INetURLObject aINetURLObject(aBookmark);
+ if (!aINetURLObject.HasError()
+ && aINetURLObject.GetProtocol() != INetProtocol::Javascript)
+ {
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xlink:href", aBookmark);
+ SvXMLElementExport alinkA( *mpSVGExport, XML_NAMESPACE_NONE, "a", true, true );
+ mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf,
+ 0xffffffff,
+ pElementId,
+ &rxShape,
+ pEmbeddedBitmapsMtf );
+ }
}
else
{