diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2014-12-19 22:59:15 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2014-12-19 23:35:11 +0100 |
commit | 14cef6e547b9cbcfc4a6db90e453194d0e73eaf3 (patch) | |
tree | 6da9deb1065cdbc319c58211747314c29ba64c45 | |
parent | d566256b78f56bfb2e6eba747d54087527ba4baf (diff) |
detect groupShapes (TimestampFields) in forms, too
as a consequence, successfully delete them
Change-Id: I5dd7b329708dd13f8bfe4a38974c5f6f1202b392
-rw-r--r-- | wizards/com/sun/star/wizards/document/FormHandler.java | 13 |
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 a8b02d37e37f..8a34ec8d4238 100644 --- a/wizards/com/sun/star/wizards/document/FormHandler.java +++ b/wizards/com/sun/star/wizards/document/FormHandler.java @@ -266,6 +266,19 @@ public class FormHandler private 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); |