summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2014-12-19 22:59:15 +0100
committerDavid Tardon <dtardon@redhat.com>2015-01-07 17:21:46 +0000
commit09e623b8c8948f40e7110191caccc84117f5ae7d (patch)
tree84abe7925de683eb5794c52238cc73c8b449c02d
parent0a804204a87d631a67f850a7b5c5d63b5e5a6a94 (diff)
detect groupShapes (TimestampFields) in forms, too
as a consequence, successfully delete them Change-Id: I5dd7b329708dd13f8bfe4a38974c5f6f1202b392 Reviewed-on: https://gerrit.libreoffice.org/13556 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--wizards/com/sun/star/wizards/document/FormHandler.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java
index b07f45a2a762..57dd83d49132 100644
--- a/wizards/com/sun/star/wizards/document/FormHandler.java
+++ b/wizards/com/sun/star/wizards/document/FormHandler.java
@@ -307,6 +307,19 @@ public class FormHandler
public boolean belongsToForm(Object _oDrawPageElement, String _FormName)
{
XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, _oDrawPageElement);
+ while (xServiceInfo.supportsService("com.sun.star.drawing.GroupShape"))
+ {
+ XShapes xShapes = UnoRuntime.queryInterface(XShapes.class, _oDrawPageElement);
+ try
+ {
+ _oDrawPageElement = xShapes.getByIndex(0);
+ xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, _oDrawPageElement);
+ }
+ catch(final com.sun.star.uno.Exception e)
+ {
+ return false;
+ }
+ }
if (xServiceInfo.supportsService("com.sun.star.drawing.ControlShape"))
{
XControlShape xControlShape = UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement);