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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 18 11:10:38 PST 2012


 wizards/com/sun/star/wizards/text/TextFieldHandler.py |   20 ++++++++----------
 1 file changed, 9 insertions(+), 11 deletions(-)

New commits:
commit d83499a864fd39b1e05706298b95594caae33e0c
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Tue Dec 18 20:06:51 2012 +0100

    pywizards: Delete all empty TextFields after finishing
    
    Change-Id: Ic1c0c6e6f6174d4337abf06f32d9fd8072c2511d

diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py
index 379abb1..0037f2b 100644
--- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py
+++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py
@@ -154,14 +154,12 @@ class TextFieldHandler(object):
 
     def removeUserFieldByContent(self):
         #Remove userfield when its text is empty
-        try:
-            xDependentTextFields = TextFieldHandler.dictTextFields.values()
-            for i in xDependentTextFields:
-                try:
-                    if not i.TextFieldMaster.Content:
-                        i.dispose()
-                except UnknownPropertyException:
-                    pass
-
-        except Exception:
-            traceback.print_exc()
+        xDependentTextFields = TextFieldHandler.arrayTextFields
+        for i in xDependentTextFields:
+            try:
+                if not i.TextFieldMaster.Content:
+                    i.dispose()
+            except Exception:
+                #TextField doesn't even have the attribute Content,
+                #so it's empty
+                i.dispose()


More information about the Libreoffice-commits mailing list