[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - wizards/com

Lionel Elie Mamane lionel at mamane.lu
Wed Jan 7 09:22:16 PST 2015


 wizards/com/sun/star/wizards/document/FormHandler.java |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 09e623b8c8948f40e7110191caccc84117f5ae7d
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Dec 19 22:59:15 2014 +0100

    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 at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java
index b07f45a..57dd83d 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);


More information about the Libreoffice-commits mailing list