summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-09-06 11:38:55 +0100
committerAndras Timar <andras.timar@collabora.com>2022-09-11 17:11:20 +0200
commit6a2e9707ab21d7193bcbbd6d50dbb0dc67488448 (patch)
treeeb03560c03db1277d368403270b02c9abeab6411
parent45d29707d14e309db20bd0cdbe050a489033df85 (diff)
check impress/calc IFrame "FrameURL" target
similar to commit c7450d0b9d02c64ae3da467d329040787039767e Date: Tue Aug 30 17:01:08 2022 +0100 check IFrame "FrameURL" target Change-Id: Ibf28c29acb4476830431d02772f3ecd4b23a6a27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139495 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--xmloff/source/draw/ximpshap.cxx40
1 files changed, 22 insertions, 18 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index fdfbbc2562a8..aab00a6b724b 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -87,6 +87,7 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/vector/b2dvector.hxx>
+#include <tools/urlobj.hxx>
#include <o3tl/any.hxx>
#include <o3tl/safeint.hxx>
@@ -3248,31 +3249,34 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs
{
AddShape("com.sun.star.drawing.FrameShape");
- if( mxShape.is() )
- {
- SetLayer();
+ if( !mxShape.is() )
+ return;
- // set pos, size, shear and rotate
- SetTransformation();
+ SetLayer();
- uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
- if( xProps.is() )
- {
- if( !maFrameName.isEmpty() )
- {
- xProps->setPropertyValue("FrameName", Any(maFrameName) );
- }
+ // set pos, size, shear and rotate
+ SetTransformation();
- if( !maHref.isEmpty() )
- {
- xProps->setPropertyValue("FrameURL", Any(maHref) );
- }
+ uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
+ if( xProps.is() )
+ {
+ if( !maFrameName.isEmpty() )
+ {
+ xProps->setPropertyValue("FrameName", Any(maFrameName) );
}
- SetStyle();
+ if( !maHref.isEmpty() )
+ {
+ if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
+ GetImport().NotifyMacroEventRead();
- GetImport().GetShapeImport()->finishShape( mxShape, mxAttrList, mxShapes );
+ xProps->setPropertyValue("FrameURL", Any(maHref) );
+ }
}
+
+ SetStyle();
+
+ GetImport().GetShapeImport()->finishShape( mxShape, mxAttrList, mxShapes );
}
// this is called from the parent group for each unparsed attribute in the attribute list