[ooo-build-commit] Branch 'ooo/master' - testautomation/writer

Jan Holesovsky kendy at kemper.freedesktop.org
Mon Jun 15 18:59:07 PDT 2009


 testautomation/writer/optional/includes/clipboard/clipbrd_func.inc         |    1 
 testautomation/writer/optional/includes/clipboard/w_210_.inc               |   12 
 testautomation/writer/optional/includes/clipboard/w_214_.inc               |    2 
 testautomation/writer/optional/includes/clipboard/w_215_.inc               |   69 ++--
 testautomation/writer/optional/includes/clipboard/w_216_.inc               |   18 -
 testautomation/writer/optional/includes/clipboard/w_217_.inc               |  137 ++++-----
 testautomation/writer/optional/includes/clipboard/w_218_.inc               |  146 +++++-----
 testautomation/writer/optional/includes/clipboard/w_219_.inc               |   62 ++--
 testautomation/writer/optional/includes/clipboard/w_222_.inc               |   25 -
 testautomation/writer/optional/includes/formatpage/w_formatpage1.inc       |   54 +--
 testautomation/writer/optional/includes/formatpage/w_formatpage2.inc       |   70 ++--
 testautomation/writer/optional/includes/formatpage/w_formatpage3.inc       |   54 ++-
 testautomation/writer/optional/includes/formatpage/w_formatpage4.inc       |   15 -
 testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc      |   25 +
 testautomation/writer/optional/includes/insertgraphic/w_insertgraphic2.inc |   56 ++-
 testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc |   48 ++-
 testautomation/writer/optional/includes/insertgraphic/w_insertgraphic5.inc |   63 +++-
 testautomation/writer/optional/includes/loadsave/w_loadsave.inc            |   31 +-
 testautomation/writer/optional/includes/number/w_207_.inc                  |   14 
 testautomation/writer/optional/includes/redlining/w_redlining1.inc         |   31 +-
 testautomation/writer/optional/includes/undo/w_undo_history_3.inc          |    4 
 testautomation/writer/optional/input/import/dummy.sxw                      |binary
 testautomation/writer/optional/w_table.bas                                 |    2 
 testautomation/writer/required/includes/w_001_.inc                         |  125 ++++----
 testautomation/writer/required/includes/w_005b_.inc                        |  130 ++++----
 testautomation/writer/required/includes/w_007_.inc                         |  109 +++----
 26 files changed, 712 insertions(+), 591 deletions(-)

New commits:
commit 48e38e3c5bec29a305e6b36ad43d04eeec41b3d8
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Mon Jun 15 11:12:30 2009 +0000

    CWS-TOOLING: integrate CWS fhawfixes1
    2009-06-03 17:24:54 +0200 fredrikh  r272595 : i102444
    2009-06-03 16:58:38 +0200 fredrikh  r272594 : i102477
    2009-06-03 16:33:41 +0200 fredrikh  r272585 : i102476
    2009-06-03 15:39:59 +0200 fredrikh  r272582 : i102444
    2009-06-03 11:03:38 +0200 fredrikh  r272547 : i102451
    2009-06-02 18:26:24 +0200 fredrikh  r272526 : i102444
    2009-06-02 18:21:43 +0200 fredrikh  r272525 : i95309
    2009-06-02 18:21:10 +0200 fredrikh  r272524 : i95309
    2009-06-02 18:20:26 +0200 fredrikh  r272523 : i102287
    2009-06-02 18:19:59 +0200 fredrikh  r272522 : i102287
    2009-06-02 18:19:37 +0200 fredrikh  r272521 : i102287
    2009-06-02 18:19:23 +0200 fredrikh  r272520 : i102287
    2009-06-02 18:19:05 +0200 fredrikh  r272519 : i102287
    2009-06-02 18:18:44 +0200 fredrikh  r272518 : i102287
    2009-06-02 18:16:51 +0200 fredrikh  r272517 : i102287
    2009-06-02 18:16:13 +0200 fredrikh  r272516 : i102287
    2009-06-02 18:15:49 +0200 fredrikh  r272515 : i102287
    2009-06-02 18:14:24 +0200 fredrikh  r272514 : i102452
    2009-06-02 17:57:04 +0200 fredrikh  r272513 : i102451
    2009-06-02 13:57:46 +0200 fredrikh  r272502 : i102444
    2009-06-02 13:24:29 +0200 fredrikh  r272497 : i102287
    2009-06-02 12:44:01 +0200 fredrikh  r272495 : i102287
    2009-06-01 13:25:03 +0200 fredrikh  r272477 : CWS-TOOLING: rebase CWS fhawfixes1 to trunk at 272291 (milestone: DEV300:m49)
    2009-05-27 17:50:23 +0200 fredrikh  r272363 : i102310
    2009-05-27 16:23:37 +0200 fredrikh  r272359 : i102093
    2009-05-27 16:18:50 +0200 fredrikh  r272358 : i102218
    2009-05-27 15:58:58 +0200 fredrikh  r272357 : i102306
    2009-05-27 11:14:59 +0200 fredrikh  r272336 : i102287
    2009-05-27 10:18:48 +0200 fredrikh  r272334 : i102286
    2009-05-25 15:33:07 +0200 fredrikh  r272253 : i102221
    2009-05-25 13:08:52 +0200 fredrikh  r272235 : i102218
    2009-05-19 14:06:59 +0200 fredrikh  r272077 : i102058

diff --git a/testautomation/writer/optional/includes/clipboard/clipbrd_func.inc b/testautomation/writer/optional/includes/clipboard/clipbrd_func.inc
index 4fca662..9b16ad4 100755
--- a/testautomation/writer/optional/includes/clipboard/clipbrd_func.inc
+++ b/testautomation/writer/optional/includes/clipboard/clipbrd_func.inc
@@ -217,6 +217,7 @@ function wSetClipboardtestDefaults(ForWhat as string) as boolean
     end select
     try
         EditCopy
+        EditCopy
         wSetClipboardtestDefaults = True
     catch
         QAErrorlog "Error jump to beginning of document!"
diff --git a/testautomation/writer/optional/includes/clipboard/w_210_.inc b/testautomation/writer/optional/includes/clipboard/w_210_.inc
index 7110fe4..3b88f41 100755
--- a/testautomation/writer/optional/includes/clipboard/w_210_.inc
+++ b/testautomation/writer/optional/includes/clipboard/w_210_.inc
@@ -84,8 +84,8 @@ testcase WriterToWriterText
                         Warnlog "Unable to remove checkbox: " + Active.Gettext
                         Active.ok
                     endcatch
-                endif
-            endif
+                end if
+            end if
             printlog " + Close saved document "
             Call hCloseDocument
         else
@@ -136,8 +136,8 @@ testcase WriterToWriterField
                         Warnlog "Unable to remove checkbox: " + Active.Gettext
                         Active.ok
                     endcatch
-                endif
-            endif            
+                end if
+            end if
             printlog " + Close saved document "
             Call hCloseDocument
         else
@@ -188,8 +188,8 @@ testcase WriterToWriterTable
                         Warnlog "Unable to remove checkbox: " + Active.Gettext
                         Active.ok
                     endcatch
-                endif
-            endif
+                end if
+            end if
             printlog " + Close saved document "
             Call hCloseDocument
         else
diff --git a/testautomation/writer/optional/includes/clipboard/w_214_.inc b/testautomation/writer/optional/includes/clipboard/w_214_.inc
index f4ac014..1a80443 100755
--- a/testautomation/writer/optional/includes/clipboard/w_214_.inc
+++ b/testautomation/writer/optional/includes/clipboard/w_214_.inc
@@ -266,8 +266,6 @@ endcase
 
 testcase WriterToHTMLDrawingObject
   gApplication = "WRITER"
-'      QAErrorlog "Crashes unreproducable only with testtool"
-'  goto endsub
   printlog "  Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
   printlog " + Jump to beginning of document "
   printlog " + Select 'Drawing Object' "
diff --git a/testautomation/writer/optional/includes/clipboard/w_215_.inc b/testautomation/writer/optional/includes/clipboard/w_215_.inc
index 308acb1..cbe548a 100755
--- a/testautomation/writer/optional/includes/clipboard/w_215_.inc
+++ b/testautomation/writer/optional/includes/clipboard/w_215_.inc
@@ -48,6 +48,7 @@ sub w_215_
 
 end sub
 
+'--------------------------------------------------------
 
 testcase CalcToWriterText1
   gApplication = "CALC"
@@ -96,18 +97,18 @@ testcase CalcToWriterText1
                 Warnlog "Unable to remove checkbox: " + Active.Gettext
                 Active.ok
             endcatch
-        endif
-    endif    
+        end if
+    end if    
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
   else
     Warnlog "Dialog 'Paste Special' is not up!"
     Call hCloseDocument
     goto endsub
   end if
-  Call hCloseDocument
   printlog "  Close active document "
+  Call hCloseDocument
 endcase
 
 ' ---------------------------------------------------------------------------------
@@ -148,21 +149,21 @@ testcase CalcToWriterText2
     Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_textformat_cellcontent.odt", "writer8")
     printlog "  Save document as ..\user\work\writer_to_writer_textformat_cellcontent.odt"
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
     wait 500
-    Call hFileOpen (gOfficepath + "user\work\writer_to_writer_textformat_cellcontent.odt",false)
     printlog "  Reopen saved document "
+    Call hFileOpen (gOfficepath + "user\work\writer_to_writer_textformat_cellcontent.odt",false)
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
   else
     Warnlog "Dialog 'Paste Special' is not up!"
     Call hCloseDocument
     goto endsub
   end if
-  Call hCloseDocument
   printlog "  Close active document "
+  Call hCloseDocument
 endcase
 
 ' ---------------------------------------------------------------------------------
@@ -215,18 +216,18 @@ testcase CalcToWriterCalculation
                 Warnlog "Unable to remove checkbox: " + Active.Gettext
                 Active.ok
             endcatch
-        endif
-    endif        
+        end if
+    end if
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
   else
     Warnlog "Dialog 'Paste Special' is not up!"
     Call hCloseDocument
     goto endsub
   end if
-  Call hCloseDocument
   printlog "  Close active document "
+  Call hCloseDocument
 endcase
 
 ' ---------------------------------------------------------------------------------
@@ -278,18 +279,18 @@ testcase CalcToWriterHyperlink1
                 Warnlog "Unable to remove checkbox: " + Active.Gettext
                 Active.ok
             endcatch
-        endif
-    endif            
+        end if
+    end if
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
   else
     Warnlog "Dialog 'Paste Special' is not up!"
     Call hCloseDocument
     goto endsub
   end if
-  Call hCloseDocument
   printlog "  Close active document "
+  Call hCloseDocument
 endcase
 
 ' ---------------------------------------------------------------------------------
@@ -325,26 +326,26 @@ testcase CalcToWriterHyperlink2
   printlog "  Paste 'Text' in all available clipboard formats "
   Kontext "InhaltEinfuegen"
   if InhaltEinfuegen.Exists then
-    Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
     printlog "  Write Clipboard format under pasted content "
-    Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_hyperlink_cellcontent.odt", "writer8")
+    Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
     printlog "  Save document as ..\user\work\writer_to_writer_hyperlink_cellcontent.odt"
+    Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_hyperlink_cellcontent.odt", "writer8")
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
     wait 500
-    Call hFileOpen (gOfficepath + "user\work\writer_to_writer_hyperlink_cellcontent.odt",false)
     printlog "  Reopen saved document "
+    Call hFileOpen (gOfficepath + "user\work\writer_to_writer_hyperlink_cellcontent.odt",false)
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
   else
     Warnlog "Dialog 'Paste Special' is not up!"
     Call hCloseDocument
     goto endsub
   end if
-  Call hCloseDocument
   printlog "  Close active document "
+  Call hCloseDocument
 endcase
 
 ' ---------------------------------------------------------------------------------
@@ -377,26 +378,26 @@ testcase CalcToWriterDrawObject
   printlog "  Paste 'Text' in all available clipboard formats "
   Kontext "InhaltEinfuegen"
   if InhaltEinfuegen.Exists then
-    Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
     printlog "  Write Clipboard format under pasted content "
-    Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_draw.odt", "writer8")
+    Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
     printlog "  Save document as ..\user\work\writer_to_writer_draw.odt"
+    Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_draw.odt", "writer8")
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
     wait 500
-    Call hFileOpen (gOfficepath + "user\work\writer_to_writer_draw.odt",false)
     printlog "  Reopen saved document "
+    Call hFileOpen (gOfficepath + "user\work\writer_to_writer_draw.odt",false)
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
   else
     Warnlog "Dialog 'Paste Special' is not up!"
     Call hCloseDocument
     goto endsub
   end if
-  Call hCloseDocument
   printlog "  Close active document "
+  Call hCloseDocument
 endcase
 
 ' ---------------------------------------------------------------------------------
@@ -429,25 +430,25 @@ testcase CalcToWriterOLE
   printlog "  Paste 'Text' in all available clipboard formats "
   Kontext "InhaltEinfuegen"
   if InhaltEinfuegen.Exists then
-    Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
     printlog "  Write Clipboard format under pasted content "
-    Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_ole.odt", "writer8")
+    Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
     printlog "  Save document as ..\user\work\writer_to_writer_ole.odt"
+    Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_ole.odt", "writer8")
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
     wait 500
-    Call hFileOpen (gOfficepath + "user\work\writer_to_writer_ole.odt",false)
     printlog "  Reopen saved document "
+    Call hFileOpen (gOfficepath + "user\work\writer_to_writer_ole.odt",false)
     Wait 500
-    Call hCloseDocument
     printlog "  Close saved document "
+    Call hCloseDocument
   else
     Warnlog "Dialog 'Paste Special' is not up!"
     Call hCloseDocument
     goto endsub
   end if
-  Call hCloseDocument
   printlog "  Close active document "
+  Call hCloseDocument
 endcase
 
diff --git a/testautomation/writer/optional/includes/clipboard/w_216_.inc b/testautomation/writer/optional/includes/clipboard/w_216_.inc
index 526a627..63265b6 100755
--- a/testautomation/writer/optional/includes/clipboard/w_216_.inc
+++ b/testautomation/writer/optional/includes/clipboard/w_216_.inc
@@ -83,13 +83,13 @@ testcase HTMLToWRITERText
     printlog "  Paste 'Text' in all available clipboard formats "
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
         printlog "  Write Clipboard format under pasted content "
-        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_text.odt", "writer8")
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
         printlog "  Save document as ..\user\work\html_to_writer_text.odt"
+        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_text.odt", "writer8")
         Wait 500
-        Call hCloseDocument
         printlog "  Close saved document "
+        Call hCloseDocument
         wait 500
         printlog "  Reopen saved document "
         if hFileOpen (gOfficepath + "user\work\html_to_writer_text.odt",true) = false then
@@ -101,8 +101,8 @@ testcase HTMLToWRITERText
                     Warnlog "Unable to remove checkbox: " + Active.Gettext
                     Active.ok
                 endcatch
-            endif
-        endif                    
+            end if
+        end if
         Wait 500
         printlog "  Close saved document "
         Call hCloseDocument
@@ -166,8 +166,8 @@ testcase HTMLToWRITERField
                         Warnlog "Unable to remove checkbox: " + Active.Gettext
                         Active.ok
                     endcatch
-                endif
-            endif            
+                end if
+            end if
             Wait 500
             printlog "  Close saved document "
             Call hCloseDocument
@@ -230,8 +230,8 @@ testcase HTMLToWRITERTable
                     Warnlog "Unable to remove checkbox: " + Active.Gettext
                     Active.ok
                 endcatch
-            endif
-        endif        
+            end if
+        end if
         printlog "  Reopen saved document "
         Wait 500
         printlog "  Close saved document "
diff --git a/testautomation/writer/optional/includes/clipboard/w_217_.inc b/testautomation/writer/optional/includes/clipboard/w_217_.inc
index 620823d..6a4bbf8 100755
--- a/testautomation/writer/optional/includes/clipboard/w_217_.inc
+++ b/testautomation/writer/optional/includes/clipboard/w_217_.inc
@@ -50,22 +50,22 @@ end sub
 ' ---------------------------------------------------------------------------------
 
 testcase HTMLToCALCText
-  gApplication = "HTML"
-  printlog "  Open File '..\\writer\\optional\\input\\clipboard\\html.html' " 
-  printlog "  Jump to beginning of document " 
-  printlog "  Select first paragraph " 
-  printlog "  Copy selected text " 
-  Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-  Call sMakeReadOnlyDocumentEditable
-  printlog "  Jump to beginning of document " 
-  Call wTypeKeys "<Mod1 Home>"
-  Call wTypeKeys "<Shift Down><Shift End>"
-  EditCopy
+    gApplication = "HTML"
+    printlog "  Open File '..\\writer\\optional\\input\\clipboard\\html.html' " 
+    printlog "  Jump to beginning of document " 
+    printlog "  Select first paragraph " 
+    printlog "  Copy selected text " 
+    Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+    Call sMakeReadOnlyDocumentEditable
+    printlog "  Jump to beginning of document " 
+    Call wTypeKeys "<Mod1 Home>"
+    Call wTypeKeys "<Shift Down><Shift End>"
+    EditCopy
 
-  gApplication = "CALC"
-  printlog "  Open new document " 
-  Call hNewDocument
-  printlog "  Edit / Paste Special " 
+    gApplication = "CALC"
+    printlog "  Open new document " 
+    Call hNewDocument
+    printlog "  Edit / Paste Special " 
     Sleep 2
     try
         EditPasteSpecialCalc
@@ -75,39 +75,39 @@ testcase HTMLToCALCText
         Call hCloseDocument
         goto endsub
     endcatch
-  Wait 500
-  printlog "  Paste 'Text' in all available clipboard formats " 
-  Kontext "InhaltEinfuegen"
-  if InhaltEinfuegen.Exists then
-   Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
-   printlog "  Write Clipboard format under pasted content " 
-   Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_text.ods", "calc8")
-   printlog "  Save document as ..\user\work\html_to_calc_text.ods" 
-   Wait 500
-   Call hCloseDocument
-   printlog "  Close saved document " 
-   wait 500
-   printlog "  Reopen saved document "   
-   if hFileOpen (gOfficepath + "user\work\html_to_calc_text.ods",true) = false then
-        Kontext "Active"
-        if Active.Exists then
-            try
-                Active.Yes
-            catch
-                Warnlog "Unable to remove checkbox: " + Active.Gettext
-                Active.ok
-            endcatch
-        endif
-   endif   
-   Wait 500
-   Call hCloseDocument
-   printlog "  Close saved document " 
-  else
-   Warnlog "Dialog 'Paste Special' is not up!"
-   Call hCloseDocument
-   goto endsub
-  end if
-  printlog "  Close active document " 
+    Wait 500
+    printlog "  Paste 'Text' in all available clipboard formats " 
+    Kontext "InhaltEinfuegen"
+    if InhaltEinfuegen.Exists then
+        printlog "  Write Clipboard format under pasted content " 
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+        printlog "  Save document as ..\user\work\html_to_calc_text.ods"
+        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_text.ods", "calc8")
+        Wait 500
+        printlog "  Close saved document "
+        Call hCloseDocument
+        wait 500
+        printlog "  Reopen saved document "
+        if hFileOpen (gOfficepath + "user\work\html_to_calc_text.ods",true) = false then
+            Kontext "Active"
+            if Active.Exists then
+                try
+                    Active.Yes
+                catch
+                    Warnlog "Unable to remove checkbox: " + Active.Gettext
+                    Active.ok
+                endcatch
+            end if
+        end if
+        Wait 500
+        printlog "  Close saved document " 
+        Call hCloseDocument
+    else
+        Warnlog "Dialog 'Paste Special' is not up!"
+        Call hCloseDocument
+        goto endsub
+    end if
+    printlog "  Close active document " 
     Do Until GetDocumentCount = 0
         Call hCloseDocument
     Loop
@@ -146,19 +146,19 @@ testcase HTMLToCALCField
     printlog "  Paste 'Field' in all available clipboard formats " 
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
         printlog "  Write Clipboard format under pasted content " 
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+        printlog "  Save document as ..\user\work\html_to_calc_field.ods"
         Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_field.ods", "calc8")
-        printlog "  Save document as ..\user\work\html_to_calc_field.ods" 
         Wait 500
-        Call hCloseDocument
         printlog "  Close saved document "
+        Call hCloseDocument
         wait 500
-        Call hFileOpen (gOfficepath + "user\work\html_to_calc_field.ods",true)
         printlog "  Reopen saved document "
+        Call hFileOpen (gOfficepath + "user\work\html_to_calc_field.ods",true)
         Wait 500
-        Call hCloseDocument
         printlog "  Close saved document "
+        Call hCloseDocument
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
@@ -238,6 +238,7 @@ testcase HTMLToCALCGraphicLinked
     Call wTypeKeys "<Mod1 Home>"
     Call wTypeKeys ( "<Shift F4>" )
     EditCopy
+    EditCopy
 
     gApplication = "CALC"
     printlog "  Open new document " 
@@ -256,19 +257,19 @@ testcase HTMLToCALCGraphicLinked
     printlog "  Paste 'Linked Graphic' in all available clipboard formats " 
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
+        printlog "  Write Clipboard format under pasted content "
         Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
-        printlog "  Write Clipboard format under pasted content " 
+        printlog "  Save document as ..\user\work\html_to_calc_graphic1.ods"
         Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_graphic1.ods", "calc8")
-        printlog "  Save document as ..\user\work\html_to_calc_graphic1.ods" 
         Wait 500
+        printlog "  Close saved document "
         Call hCloseDocument
-        printlog "  Close saved document " 
         wait 500
+        printlog "  Reopen saved document "
         Call hFileOpen (gOfficepath + "user\work\html_to_calc_graphic1.ods",false)
-        printlog "  Reopen saved document " 
         Wait 500
+        printlog "  Close saved document "
         Call hCloseDocument
-        printlog "  Close saved document " 
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
@@ -313,19 +314,19 @@ testcase HTMLToCALCControl
     printlog "  Paste 'Control' in all available clipboard formats " 
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
         printlog "  Write Clipboard format under pasted content " 
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+        printlog "  Save document as ..\user\work\html_to_calc_control.sxc"
         Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_control.ods", "calc8")
-        printlog "  Save document as ..\user\work\html_to_calc_control.sxc" 
         Wait 500
+        printlog "  Close saved document "
         Call hCloseDocument
-        printlog "  Close saved document " 
         wait 500
+        printlog "  Reopen saved document "
         Call hFileOpen (gOfficepath + "user\work\html_to_calc_control.ods",false)
-        printlog "  Reopen saved document " 
         Wait 500
+        printlog "  Close saved document "
         Call hCloseDocument
-        printlog "  Close saved document " 
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
@@ -376,16 +377,16 @@ testcase HTMLToCALCFloatingFrame
     printlog "  Paste 'Floating Frame' in all available clipboard formats " 
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists(3) then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
         printlog "  Write Clipboard format under pasted content " 
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+        printlog "  Save document as ..\user\work\html_to_calc_float.ods"
         Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_float.ods", "calc8")
-        printlog "  Save document as ..\user\work\html_to_calc_float.ods" 
-        Call hCloseDocument
         printlog "  Close saved document " 
+        Call hCloseDocument
+        printlog "  Reopen saved document "
         Call hFileOpen (gOfficepath + "user\work\html_to_calc_float.ods",false)
-        printlog "  Reopen saved document " 
+        printlog "  Close saved document "
         Call hCloseDocument
-        printlog "  Close saved document " 
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
diff --git a/testautomation/writer/optional/includes/clipboard/w_218_.inc b/testautomation/writer/optional/includes/clipboard/w_218_.inc
index 56d9a6c..15b1383 100755
--- a/testautomation/writer/optional/includes/clipboard/w_218_.inc
+++ b/testautomation/writer/optional/includes/clipboard/w_218_.inc
@@ -50,22 +50,22 @@ end sub
 ' ---------------------------------------------------------------------------------
 
 testcase HTMLToDRAWText
-  gApplication = "HTML"
-  printlog "  Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
-  printlog " + Jump to beginning of document "
-  printlog " + Select first paragraph "
-  printlog " + Copy selected text "
-  Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
-  Call sMakeReadOnlyDocumentEditable
-  printlog "  Jump to beginning of document "
-  Call wTypeKeys "<Mod1 Home>"
-  Call wTypeKeys "<Shift Down><Shift End>"
-  EditCopy
+    gApplication = "HTML"
+    printlog "  Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+    printlog " + Jump to beginning of document "
+    printlog " + Select first paragraph "
+    printlog " + Copy selected text "
+    Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+    Call sMakeReadOnlyDocumentEditable
+    printlog "  Jump to beginning of document "
+    Call wTypeKeys "<Mod1 Home>"
+    Call wTypeKeys "<Shift Down><Shift End>"
+    EditCopy
 
-  gApplication = "DRAW"
-  printlog " + Open new document "
-  Call hNewDocument
-  printlog " + Edit / Paste Special "
+    gApplication = "DRAW"
+    printlog " + Open new document "
+    Call hNewDocument
+    printlog " + Edit / Paste Special "
     Sleep 2
     try
         EditPasteSpecial
@@ -75,39 +75,39 @@ testcase HTMLToDRAWText
         Call hCloseDocument
         goto endsub
     endcatch
-  Wait 500
-  printlog "  Paste 'Text' in all available clipboard formats "
-  Kontext "InhaltEinfuegen"
-  if InhaltEinfuegen.Exists then
-   Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
-   printlog " + Write Clipboard format under pasted content "
-   Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_text.odg", "draw8")
-   printlog " + Save document as ..\user\work\html_to_draw_text.odg"
-   Wait 500
-   Call hCloseDocument
-   printlog " + Close saved document "
-   wait 500
-   printlog " + Reopen saved document "
-   if hFileOpen (gOfficepath + "user\work\html_to_draw_text.odg",false) = false then
-        Kontext "Active"
-        if Active.Exists then
-            try
-                Active.Yes
-            catch
-                Warnlog "Unable to remove checkbox: " + Active.Gettext
-                Active.ok
-            endcatch
-        endif
-   endif      
-   Wait 500
-   Call hCloseDocument
-   printlog " + Close saved document "
-  else
-   Warnlog "Dialog 'Paste Special' is not up!"
-   Call hCloseDocument
-   goto endsub
-  end if
-  printlog "  Close active document "
+    Wait 500
+    printlog "  Paste 'Text' in all available clipboard formats "
+    Kontext "InhaltEinfuegen"
+    if InhaltEinfuegen.Exists then
+        printlog " + Write Clipboard format under pasted content "
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+        printlog " + Save document as ..\user\work\html_to_draw_text.odg"
+        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_text.odg", "draw8")
+        Wait 500
+        printlog " + Close saved document "
+        Call hCloseDocument
+        wait 500
+        printlog " + Reopen saved document "
+        if hFileOpen (gOfficepath + "user\work\html_to_draw_text.odg",false) = false then
+            Kontext "Active"
+            if Active.Exists then
+                try
+                    Active.Yes
+                catch
+                    Warnlog "Unable to remove checkbox: " + Active.Gettext
+                    Active.ok
+                endcatch
+            end if
+        end if      
+        Wait 500
+        printlog " + Close saved document "
+        Call hCloseDocument
+    else
+        Warnlog "Dialog 'Paste Special' is not up!"
+        Call hCloseDocument
+        goto endsub
+    end if
+    printlog "  Close active document "
     Do Until GetDocumentCount = 0
         Call hCloseDocument
     Loop
@@ -151,19 +151,19 @@ testcase HTMLToDRAWField
     printlog "  Paste 'Field' in all available clipboard formats "
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
         printlog " + Write Clipboard format under pasted content "
-        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_field.odg", "draw8")
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
         printlog " + Save document as ..\user\work\html_to_draw_field.odg"
+        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_field.odg", "draw8")
         Wait 500
-        Call hCloseDocument
         printlog " + Close saved document "
+        Call hCloseDocument
         sleep (2)
-        Call hFileOpen (gOfficepath + "user\work\html_to_draw_field.odg",false)
         printlog " + Reopen saved document "
+        Call hFileOpen (gOfficepath + "user\work\html_to_draw_field.odg",false)
         Wait 500
-        Call hCloseDocument
         printlog " + Close saved document "
+        Call hCloseDocument
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
@@ -208,19 +208,19 @@ testcase HTMLToDRAWTable
   printlog "  Paste 'Table' in all available clipboard formats "
   Kontext "InhaltEinfuegen"
    if InhaltEinfuegen.Exists then
-     Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
      printlog " + Write Clipboard format under pasted content "
-     Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_table.odg", "draw8")
+     Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
      printlog " + Save document as ..\user\work\html_to_draw_table.odg"
+     Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_table.odg", "draw8")
      Wait 500
-     Call hCloseDocument
      printlog " + Close saved document "
+     Call hCloseDocument
      wait 500
-     Call hFileOpen (gOfficepath + "user\work\html_to_draw_table.odg",false)
      printlog " + Reopen saved document "
+     Call hFileOpen (gOfficepath + "user\work\html_to_draw_table.odg",false)
      Wait 500
-     Call hCloseDocument
      printlog " + Close saved document "
+     Call hCloseDocument
    else
      Warnlog "Dialog 'Paste Special' is not up!"
      Call hCloseDocument
@@ -264,19 +264,19 @@ testcase HTMLToDRAWGraphicLinked
     printlog "  Paste 'Linked Graphic' in all available clipboard formats "
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
         printlog " + Write Clipboard format under pasted content "
-        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_graphic1.odg", "draw8")
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
         printlog " + Save document as ..\user\work\html_to_draw_graphic1.odg"
+        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_graphic1.odg", "draw8")
         Wait 500
-        Call hCloseDocument
         printlog " + Close saved document "
+        Call hCloseDocument
         wait 500
-        Call hFileOpen (gOfficepath + "user\work\html_to_draw_graphic1.odg",false)
         printlog " + Reopen saved document "
+        Call hFileOpen (gOfficepath + "user\work\html_to_draw_graphic1.odg",false)
         Wait 500
-        Call hCloseDocument
         printlog " + Close saved document "
+        Call hCloseDocument
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
@@ -321,19 +321,19 @@ testcase HTMLToDRAWControl
     printlog "  Paste 'Control' in all available clipboard formats "
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
         printlog " + Write Clipboard format under pasted content "
-        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_control.odg", "draw8")
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
         printlog " + Save document as ..\user\work\html_to_draw_control.odg"
+        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_control.odg", "draw8")
         Wait 500
-        Call hCloseDocument
         printlog " + Close saved document "
+        Call hCloseDocument
         wait 500
-        Call hFileOpen (gOfficepath + "user\work\html_to_draw_control.odg",false)
         printlog " + Reopen saved document "
+        Call hFileOpen (gOfficepath + "user\work\html_to_draw_control.odg",false)
         Wait 500
-        Call hCloseDocument
         printlog " + Close saved document "
+        Call hCloseDocument
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
@@ -383,19 +383,19 @@ testcase HTMLToDRAWFloatingFrame
     printlog "  Paste 'Floating Frame' in all available clipboard formats "
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
         printlog " + Write Clipboard format under pasted content "
-        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_float.odg", "draw8")
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
         printlog " + Save document as ..\user\work\html_to_draw_float.odg"
+        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_float.odg", "draw8")
         Wait 500
-        Call hCloseDocument
         printlog " + Close saved document "
+        Call hCloseDocument
         wait 500
-        Call hFileOpen (gOfficepath + "user\work\html_to_draw_float.odg",false)
         printlog " + Reopen saved document "
+        Call hFileOpen (gOfficepath + "user\work\html_to_draw_float.odg",false)
         Wait 500
-        Call hCloseDocument
         printlog " + Close saved document "
+        Call hCloseDocument
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
diff --git a/testautomation/writer/optional/includes/clipboard/w_219_.inc b/testautomation/writer/optional/includes/clipboard/w_219_.inc
index 7c11083..90a7ed0 100755
--- a/testautomation/writer/optional/includes/clipboard/w_219_.inc
+++ b/testautomation/writer/optional/includes/clipboard/w_219_.inc
@@ -79,13 +79,13 @@ testcase HTMLToIMPRESSText
   printlog "  Paste 'Text' in all available clipboard formats "
   Kontext "InhaltEinfuegen"
   if InhaltEinfuegen.Exists then
-   Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
    printlog "  Write Clipboard format under pasted content "
-   Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_text.odp", "impress8")
+  Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
    printlog "  Save document as ..\user\work\html_to_impress_text.odp"
+   Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_text.odp", "impress8")
    Wait 500
-   Call hCloseDocument
    printlog "  Close saved document "
+   Call hCloseDocument
    wait 500
    printlog "  Reopen saved document "
    if hFileOpen (gOfficepath + "user\work\html_to_impress_text.odp",false) = false then
@@ -97,11 +97,11 @@ testcase HTMLToIMPRESSText
                 Warnlog "Unable to remove checkbox: " + Active.Gettext
                 Active.ok
             endcatch
-        endif
-   endif         
+        end if
+   end if
    Wait 500
-   Call hCloseDocument
    printlog "  Close saved document "
+   Call hCloseDocument
   else
    Warnlog "Dialog 'Paste Special' is not up!"
    Call hCloseDocument
@@ -146,19 +146,19 @@ testcase HTMLToIMPRESSField
     printlog "  Paste 'Field' in all available clipboard formats "
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-     Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
     printlog "  Write Clipboard format under pasted content "
-     Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_field.odp", "impress8")
+    Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
      printlog "  Save document as ..\user\work\html_to_impress_field.odp"
+    Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_field.odp", "impress8")
      Wait 500
-     Call hCloseDocument
      printlog "  Close saved document "
+     Call hCloseDocument
      wait 500
-     Call hFileOpen (gOfficepath + "user\work\html_to_impress_field.odp",false)
      printlog "  Reopen saved document "
+     Call hFileOpen (gOfficepath + "user\work\html_to_impress_field.odp",false)
      Wait 500
-     Call hCloseDocument
      printlog "  Close saved document "
+     Call hCloseDocument
     else
      Warnlog "Dialog 'Paste Special' is not up!"
      Call hCloseDocument
@@ -203,19 +203,19 @@ testcase HTMLToIMPRESSTable
   printlog "  Paste 'Table' in all available clipboard formats "
   Kontext "InhaltEinfuegen"
    if InhaltEinfuegen.Exists then
-     Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
      printlog "  Write Clipboard format under pasted content "
-     Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_table.odp", "impress8")
+     Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
      printlog "  Save document as ..\user\work\html_to_impress_table.odp"
+     Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_table.odp", "impress8")
      Wait 500
-     Call hCloseDocument
      printlog "  Close saved document "
+     Call hCloseDocument
      wait 500
-     Call hFileOpen (gOfficepath + "user\work\html_to_impress_table.odp",false)
      printlog "  Reopen saved document "
+     Call hFileOpen (gOfficepath + "user\work\html_to_impress_table.odp",false)
      Wait 500
-     Call hCloseDocument
      printlog "  Close saved document "
+     Call hCloseDocument
    else
      Warnlog "Dialog 'Paste Special' is not up!"
      Call hCloseDocument
@@ -259,19 +259,19 @@ testcase HTMLToIMPRESSGraphicLinked
     printlog "  Paste 'Linked Graphic' in all available clipboard formats "
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
         printlog "  Write Clipboard format under pasted content "
-        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_graphic1.odp", "impress8")
+    Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
         printlog "  Save document as ..\user\work\html_to_impress_graphic1.odp"
+        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_graphic1.odp", "impress8")
         Wait 500
-        Call hCloseDocument
         printlog "  Close saved document "
+        Call hCloseDocument
         wait 500
-        Call hFileOpen (gOfficepath + "user\work\html_to_impress_graphic1.odp",false)
         printlog "  Reopen saved document "
+        Call hFileOpen (gOfficepath + "user\work\html_to_impress_graphic1.odp",false)
         Wait 500
-        Call hCloseDocument
         printlog "  Close saved document "
+        Call hCloseDocument
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
@@ -316,19 +316,19 @@ testcase HTMLToIMPRESSControl
     printlog "  Paste 'Control' in all available clipboard formats "
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
         printlog "  Write Clipboard format under pasted content "
-        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_control.odp", "impress8")
+        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
         printlog "  Save document as ..\user\work\html_to_impress_control.odp"
+        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_control.odp", "impress8")
         Wait 500
-        Call hCloseDocument
         printlog "  Close saved document "
+        Call hCloseDocument
         wait 500
-        Call hFileOpen (gOfficepath + "user\work\html_to_impress_control.odp",false)
         printlog "  Reopen saved document "
+        Call hFileOpen (gOfficepath + "user\work\html_to_impress_control.odp",false)
         Wait 500
-        Call hCloseDocument
         printlog "  Close saved document "
+        Call hCloseDocument
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
@@ -378,19 +378,19 @@ testcase HTMLToIMPRESSFloatingFrame
     printlog "  Paste 'Floating Frame' in all available clipboard formats "
     Kontext "InhaltEinfuegen"
     if InhaltEinfuegen.Exists then
-        Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
         printlog "  Write Clipboard format under pasted content "
-        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_float.odp", "impress8")
+    Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
         printlog "  Save document as ..\user\work\html_to_impress_float.odp"
+        Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_float.odp", "impress8")
         Wait 500
-        Call hCloseDocument
         printlog "  Close saved document "
+        Call hCloseDocument
         wait 500
-        Call hFileOpen (gOfficepath + "user\work\html_to_impress_float.odp",false)
         printlog "  Reopen saved document "
+        Call hFileOpen (gOfficepath + "user\work\html_to_impress_float.odp",false)
         Wait 500
-        Call hCloseDocument
         printlog "  Close saved document "
+        Call hCloseDocument
     else
         Warnlog "Dialog 'Paste Special' is not up!"
         Call hCloseDocument
diff --git a/testautomation/writer/optional/includes/clipboard/w_222_.inc b/testautomation/writer/optional/includes/clipboard/w_222_.inc
index 49f8d3d..66a2e5e 100755
--- a/testautomation/writer/optional/includes/clipboard/w_222_.inc
+++ b/testautomation/writer/optional/includes/clipboard/w_222_.inc
@@ -50,9 +50,8 @@ end sub
 
 
 testcase DrawToWriterScrollingText
-  QaErrorLog "#i95309# - DrawToWriterScrollingText outcommented due to problem when opening certain sxd-files."
-  goto endsub
-
+'  QaErrorLog "#i95309# - DrawToWriterScrollingText outcommented due to problem when opening certain sxd-files."
+'  goto endsub
 
   gApplication = "DRAW"
   printlog "  Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
@@ -108,8 +107,8 @@ endcase
 ' ---------------------------------------------------------------------------------
 
 testcase DrawToWriterGroupedObject
-  QaErrorLog "#i95309# - DrawToWriterGroupedObject outcommented due to problem when opening certain sxd-files."
-  goto endsub
+'  QaErrorLog "#i95309# - DrawToWriterGroupedObject outcommented due to problem when opening certain sxd-files."
+'  goto endsub
 
 
   gApplication = "DRAW"
@@ -166,8 +165,8 @@ endcase
 ' ---------------------------------------------------------------------------------
 
 testcase DrawToWriter3D
-  QaErrorLog "#i95309# - DrawToWriter3D outcommented due to problem when opening certain sxd-files."
-  goto endsub
+'  QaErrorLog "#i95309# - DrawToWriter3D outcommented due to problem when opening certain sxd-files."
+'  goto endsub
 
 
   gApplication = "DRAW"
@@ -224,8 +223,8 @@ endcase
 ' ---------------------------------------------------------------------------------
 
 testcase DrawToWriterFontwork
-  QaErrorLog "#i95309# - DrawToWriterFontwork outcommented due to problem when opening certain sxd-files."
-  goto endsub
+'  QaErrorLog "#i95309# - DrawToWriterFontwork outcommented due to problem when opening certain sxd-files."
+'  goto endsub
 
 
   gApplication = "DRAW"
@@ -282,8 +281,8 @@ endcase
 ' ---------------------------------------------------------------------------------
 
 testcase DrawToWriterBullets
-  QaErrorLog "#i95309# - DrawToWriterBullets outcommented due to problem when opening certain sxd-files."
-  goto endsub
+'  QaErrorLog "#i95309# - DrawToWriterBullets outcommented due to problem when opening certain sxd-files."
+'  goto endsub
 
 
   gApplication = "DRAW"
@@ -399,8 +398,8 @@ endcase
 ' ---------------------------------------------------------------------------------
 
 testcase DrawToWriterConnectors
-  QaErrorLog "#i95309# - DrawToWriterConnectors outcommented due to problem when opening certain sxd-files."
-  goto endsub
+'  QaErrorLog "#i95309# - DrawToWriterConnectors outcommented due to problem when opening certain sxd-files."
+'  goto endsub
 
 
   gApplication = "DRAW"
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc
index 85b32b7..ff21e48 100755
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc
+++ b/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc
@@ -446,13 +446,11 @@ testcase tFormatPage_7
 	TabSeite.Cancel
 	
 	Call hCloseDocument
-
 endcase
 
 '-------------------------------------------------------------------------------------------
 
 testcase tFormatPage_8
-    
     Dim RecheckCTLSupport as string 
     Dim RecheckAsianSupport as string
     RecheckCTLSupport = gCTLSup
@@ -463,7 +461,7 @@ testcase tFormatPage_8
             printlog "No test with asian lovale, because checkbox 'Asian language support' is disabled by default!"
             goto endsub
     end select
-    
+
     PrintLog "- Check Listbox Text Direction when Asian language support is enabled"
     '/// Check Listbox Text Direction when Asian language support is enabled
 
@@ -472,8 +470,8 @@ testcase tFormatPage_8
    '/// Set CTL unable
     Call ActiveDeactivateCTLSupport(FALSE)
     '/// Enable Asian Support
-    Call ActiveDeactivateAsianSupport(TRUE)    
-   '/// - the Listbox Text Direction should be visible when Asian language support is enabled   
+    Call ActiveDeactivateAsianSupport(TRUE)
+   '/// - the Listbox Text Direction should be visible when Asian language support is enabled
     Call fFormatPageWriter("TabSeite")
     if Not Textfluss.IsVisible then
         Warnlog "Listbox 'Text Direction' isn't visible though asian support is enabled"
@@ -481,13 +479,13 @@ testcase tFormatPage_8
     TabSeite.Cancel
 
     '/// Disable Asian Support
-    Call ActiveDeactivateAsianSupport(FALSE)    
+    Call ActiveDeactivateAsianSupport(FALSE)
     '/// - the Listbox Text Direction should be invisible when Asian language support is unabled
     Call fFormatPageWriter("TabSeite")
     if Textfluss.IsVisible then
         Warnlog "Listbox 'Text Direction' is visible though asian support is disabled"
     end if
-    TabSeite.Cancel    
+    TabSeite.Cancel
     
     if RecheckCTLSupport = True then
         Call ActiveDeactivateCTLSupport(TRUE)
@@ -515,28 +513,28 @@ testcase tFormatPage_9
 
     PrintLog "- Check Listbox Text Direction when CTL is enabled"
     '/// Check Listbox Text Direction when CTL is enabled
-    
-    Call hNewDocument        
+
+    Call hNewDocument
     '/// Set CTL enabled
     Call ActiveDeactivateAsianSupport(FALSE)
-    Call ActiveDeactivateCTLSupport(TRUE)    
+    Call ActiveDeactivateCTLSupport(TRUE)
     '/// Check if 'Text direction' appears
     Call fFormatPageWriter("TabSeite")
     if Textfluss.IsVisible = False then
         Warnlog "Right to Left (horizontal) should appear when CTL is checked!"
     end if
     TabSeite.Cancel
-    
+
     '/// Set CTL unable
     Call ActiveDeactivateCTLSupport(FALSE)
-    
+
     '/// Check if 'Text direction' appears
     Call fFormatPageWriter("TabSeite")
     if Textfluss.IsVisible = TRUE then
         Warnlog "Left to Right (horizontal) appears though CTL is disabled"
     end if
     TabSeite.Cancel
-    
+
     if RecheckCTLSupport = True then
         Call ActiveDeactivateCTLSupport(TRUE)
     else
@@ -547,9 +545,8 @@ testcase tFormatPage_9
     else
         Call ActiveDeactivateAsianSupport(FALSE)
     end if
-    
-    Call hCloseDocument
 
+    Call hCloseDocument
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -589,13 +586,11 @@ testcase tFormatPage_10
     end if
     
     Call hCloseDocument
-
 endcase
 
 '-------------------------------------------------------------------------------------------
 
 testcase tFormatPage_11
-
     Dim sTestFile as String
     Dim sMarginsLeft as String
     Dim iPageLayout as Integer
@@ -654,9 +649,9 @@ endcase
 '-------------------------------------------------------------------------------------------
 
 testcase tFormatPage_12
-
     Dim sTestFile as String
-    Dim sMarginsLeft as String  ,  sMarginsRight as String
+    Dim sMarginsLeft as String
+    Dim sMarginsRight as String
     Dim iPageLayout as Integer
 
     sTestFile     = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
@@ -715,9 +710,9 @@ endcase
 '-------------------------------------------------------------------------------------------
 
 testcase tFormatPage_13
-
     Dim sTestFile as String
-    Dim sPage1 as String , sPage2 as String
+    Dim sPage1 as String
+    Dim sPage2 as String
     Dim iPageLayout as Integer
 
     sTestFile     = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
@@ -772,9 +767,9 @@ endcase
 '-------------------------------------------------------------------------------------------
 
 testcase tFormatPage_14
-
     Dim sTestFile as String
-    Dim sPage1 as String  ,  sPage2 as String
+    Dim sPage1 as String
+    Dim sPage2 as String
     Dim iPageLayout as Integer
 
     sTestFile     = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
@@ -822,16 +817,18 @@ testcase tFormatPage_14
      fCloseNavigator
      Wait 500
 
-   Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
 
 testcase tFormatPage_15
+    Dim sType as String
+    Dim sFormat as String
 
-    Dim sType as String  ,  sFormat as String
-    
     Select case iSprache
         case 01:    sType   = "Page"
                     sFormat = "As Page Style"
@@ -877,7 +874,6 @@ testcase tFormatPage_15
         warnlog "the format setting should be " & sFormat & " but get " &Formatliste.GetSelText
     end if
     TabDokumentFeldbefehle.Close
-    
+
     Call hCloseDocument
-    
 endcase
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage2.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage2.inc
index ca005fa..a8edee0 100755
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage2.inc
+++ b/testautomation/writer/optional/includes/formatpage/w_formatpage2.inc
@@ -135,8 +135,10 @@ testcase tFormatPage_16
     if Seitennummer.GetText <> "2" then warnlog "Something wrong in AutoFit Height!"
     Call fCloseNavigator
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -236,9 +238,11 @@ testcase tFormatPage_17
     Sleep 1
     if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height --2 !"
     fCloseNavigator
-    
-    Call hCloseDocument
 
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -319,9 +323,11 @@ testcase tFormatPage_18
     Sleep 1
     if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height!"
     fCloseNavigator
-    
-    Call hCloseDocument
 
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -387,16 +393,18 @@ testcase tFormatPage_19
     SearchAll.Click
     Sleep 1
     FindAndReplace.Close
-    
+
     Kontext "Navigator"
     if Not Navigator.Exists then ViewNavigator
     Kontext "NavigatorWriter"
     Sleep 1
     if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height!"
     fCloseNavigator
-    
-    Call hCloseDocument
 
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -443,20 +451,20 @@ testcase tFormatPage_20
     Sleep 2
     MenuSelect(Menugetitemid(3))
     Sleep 2
-    
+
     '/// formatPage , tabpage footer
     fFormatPageWriter("TabFusszeile")
-    
+
     '/// AutoFit Height should be checked
     if Hoehedynamisch.IsChecked <> TRUE then
         warnlog "AutoFit Height should be checked!"
         Hoehedynamisch.Check
     end if
     TabFusszeile.OK
-    
+
     Call wTypeKeys "Test"
     Call wTypeKeys "<End><Shift Home>"
-    
+
     '/// Set the bigger fonts to selection in the footer
     fFormatCharacter("TabFont")
     try
@@ -465,7 +473,7 @@ testcase tFormatPage_20
         Size.Select      Size.GetItemCount-2
     endcatch
     TabFont.OK
-    
+
     '/// Check if AutoFit Height works well
     Kontext
     EditSearchAndReplace
@@ -475,21 +483,26 @@ testcase tFormatPage_20
     SearchAll.Click
     Sleep 1
     FindAndReplace.Close
-    
+
     Kontext "Navigator"
     if Not Navigator.Exists then ViewNavigator
     Kontext "NavigatorWriter"
     Sleep 1
     if Seitennummer.GetText <> "2" then warnlog "Something wrong in AutoFit Height!"
     fCloseNavigator
-    
-    Call hCloseDocument
 
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
 
 testcase tFormatPage_21
+Warnlog "#i102452# - tFormatPage_21 outcommented. Something wrong in AutoFit Height."
+goto endsub
+
 
     Dim sTestFile as String
     Dim sDummy1 as String  ,  sDummy2 as String
@@ -586,9 +599,11 @@ testcase tFormatPage_21
     Sleep 1
     if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height --2 !"
     fCloseNavigator
-    
-    Call hCloseDocument
 
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -669,9 +684,11 @@ testcase tFormatPage_22
     Sleep 1
     if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height!"
     fCloseNavigator
-    
-    Call hCloseDocument
 
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -745,8 +762,10 @@ testcase tFormatPage_23
     if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height!"
     fCloseNavigator
     
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -785,7 +804,6 @@ testcase tFormatPage_24
      TabKopfzeile.Cancel
 
     Call hCloseDocument
-
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -823,7 +841,6 @@ testcase tFormatPage_25
      end if
 
     Call hCloseDocument
-
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -862,7 +879,6 @@ testcase tFormatPage_26
      TabKopfzeile.Cancel
 
     Call hCloseDocument
-
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -901,7 +917,6 @@ testcase tFormatPage_27
      end if
 
     Call hCloseDocument
-
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -974,7 +989,6 @@ testcase tFormatPage_28
      TabFusszeile.Cancel
 
     Call hCloseDocument
-
 endcase
 
 '-------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc
index 53c8f4b..edeaf65 100755
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc
+++ b/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc
@@ -138,8 +138,10 @@ testcase tFormatPage_29
        Kontext "FindAndReplace"
      FindAndReplace.Close
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -203,8 +205,10 @@ testcase tFormatPage_30
      if Seitennummer.GetText <> "1" then warnlog "Something wrong in Header in 1st page!"
      fCloseNavigator
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -289,8 +293,10 @@ testcase tFormatPage_31
        Kontext "FindAndReplace"
      FindAndReplace.Close
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -354,8 +360,10 @@ testcase tFormatPage_32
      if Seitennummer.GetText <> "1" then warnlog "Something wrong in Footer in 1st page!"
      fCloseNavigator
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -780,8 +788,10 @@ testcase tFormatPage_39
        if Seitennummer.GetText <> "1" then warnlog "the second column isn't right!"
      fCloseNavigator
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -847,8 +857,10 @@ testcase tFormatPage_40
        if Seitennummer.GetText <> "1" then warnlog "the second column isn't right!"
      fCloseNavigator
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -931,8 +943,10 @@ testcase tFormatPage_41
     EditCopy
     if Len(GetClipboardText) > 14 then Warnlog "Something wrong in the column2"
     
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -1015,8 +1029,10 @@ testcase tFormatPage_42
      EditCopy
      if Len(GetClipboardText) > 11 then Warnlog "Somthing wrong in the column2"
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -1182,8 +1198,10 @@ testcase tFormatPage_45
      EditCopy
      if iTestTextLength <> Len(GetClipboardText) then Warnlog "The column isn't covered to former! #112632"
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc
index 139a932..521753c 100755
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc
+++ b/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc
@@ -415,9 +415,10 @@ testcase tFormatPage_53
         Call ActiveDeactivateAsianSupport(FALSE)
     end if
     
-    
-    Call hCloseDocument
-    
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 '-------------------------------------------------------------------------------------------
@@ -783,6 +784,10 @@ testcase tFormatPage_60
     if SchattenFarbe.GetSelindex <> iShadowColor then Warnlog "shadow color is wrong !"
     TabUmrandung.Cancel
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
+
+'--------------------------------------------------
diff --git a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc b/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc
index 466bceb..0e14991 100755
--- a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc
+++ b/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc
@@ -133,6 +133,9 @@ endcase
 
 testcase tHyphenation_2
 
+warnlog "#i102304# - outcommenting tHyphenation_2 due to bug."
+goto endsub
+
   Dim testFile as String
   Dim testWord as String
   Dim firstPartOfTestWord as String
@@ -247,6 +250,9 @@ endcase
 
 testcase tHyphenation_3
 
+warnlog "#i102304# - outcommenting tHyphenation_3 due to bug."
+goto endsub
+
   Dim testFile as String
   Dim testWord as String
   Dim firstPartOfTestWord
@@ -254,18 +260,17 @@ testcase tHyphenation_3
   Dim testWordInHyphenationDlg1 as String
   Dim testWordInHyphenationDlg2 as String
 
-  testFile                  =  "tHyphenation.odt"
-  testWord                  =  "following"
-  firstPartOfTestWord       =  "fol"
-  secondPartOfTestWord      =  "follow"
-  testWordInHyphenationDlg1 =  "fol=low-ing"
-  testWordInHyphenationDlg2 =  "fol-low=ing"
+    testFile                  =  "tHyphenation.odt"
+    testWord                  =  "following"
+    firstPartOfTestWord       =  "fol"
+    secondPartOfTestWord      =  "follow"
+    testWordInHyphenationDlg1 =  "fol=low-ing"
+    testWordInHyphenationDlg2 =  "fol-low=ing"
 
-  PrintLog "- Test Hyphenation  using Tools/Hyphenation ,test like follow-ing"
+    printLog "- Test Hyphenation  using Tools/Hyphenation ,test like follow-ing"
+    printlog "Test Hyphenation  using Tools/Hyphenation ,test like follow-ing"
 
-   printlog "Test Hyphenation  using Tools/Hyphenation ,test like follow-ing"
-
-   printlog "open a test file"
+    printlog "open a test file"
     Call hFileOpen ( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
     Call sMakeReadOnlyDocumentEditable
 
diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic2.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic2.inc
index 3a27451..7ea51b9 100755
--- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic2.inc
+++ b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic2.inc
@@ -50,8 +50,11 @@
 
 testcase tInsertGraphic_13
 
-  Dim sGraphicName1, sGraphicName2, sGraphicName3 as String
-  Dim sWidth , sHeight                            as String
+  Dim sGraphicName1 as String
+  Dim sGraphicName2 as String
+  Dim sGraphicName3 as String
+  Dim sWidth as String
+  Dim sHeight as String
 
   sGraphicName1 = "TEST1"
   sGraphicName2 = "TEST2"
@@ -161,8 +164,11 @@ endcase
 
 testcase tInsertGraphic_14
 
-  Dim sGraphicName1, sGraphicName2, sGraphicName3 as String
-  Dim sWidth , sHeight                            as String
+  Dim sGraphicName1 as String
+  Dim sGraphicName2 as String
+  Dim sGraphicName3 as String
+  Dim sWidth as String
+  Dim sHeight as String
 
   sGraphicName1 = "TEST1"
   sGraphicName2 = "TEST2"
@@ -272,8 +278,11 @@ endcase
 
 testcase tInsertGraphic_15
 
-  Dim sGraphicName1, sGraphicName2, sGraphicName3 as String
-  Dim sWidth , sHeight                            as String
+  Dim sGraphicName1 as String
+  Dim sGraphicName2 as String
+  Dim sGraphicName3 as String
+  Dim sWidth as String
+  Dim sHeight as String
 
   sGraphicName1 = "TEST1"
   sGraphicName2 = "TEST2"
@@ -387,8 +396,11 @@ endcase
 
 testcase tInsertGraphic_16
 
-  Dim sGraphicName1, sGraphicName2, sGraphicName3 as String
-  Dim sWidth , sHeight                            as String
+  Dim sGraphicName1 as String
+  Dim sGraphicName2 as String
+  Dim sGraphicName3 as String
+  Dim sWidth as String
+  Dim sHeight as String
 
   sGraphicName1 = "TEST1"
   sGraphicName2 = "TEST2"
@@ -502,8 +514,11 @@ endcase
 
 testcase tInsertGraphic_17
 
-  Dim sGraphicName1, sGraphicName2, sGraphicName3 as String
-  Dim sWidth , sHeight                            as String
+  Dim sGraphicName1 as String
+  Dim sGraphicName2 as String
+  Dim sGraphicName3 as String
+  Dim sWidth as String
+  Dim sHeight as String
 
   sGraphicName1 = "TEST1"
   sGraphicName2 = "TEST2"
@@ -616,8 +631,11 @@ endcase
 
 testcase tInsertGraphic_18
 
-  Dim sGraphicName1, sGraphicName2, sGraphicName3 as String
-  Dim sWidth , sHeight                            as String
+  Dim sGraphicName1 as String
+  Dim sGraphicName2 as String
+  Dim sGraphicName3 as String
+  Dim sWidth as String
+  Dim sHeight as String
 
   sGraphicName1 = "TEST1"
   sGraphicName2 = "TEST2"
@@ -730,8 +748,11 @@ endcase
 
 testcase tInsertGraphic_19
 
-  Dim sGraphicName1, sGraphicName2, sGraphicName3 as String
-  Dim sWidth , sHeight                            as String
+  Dim sGraphicName1 as String
+  Dim sGraphicName2 as String
+  Dim sGraphicName3 as String
+  Dim sWidth as String
+  Dim sHeight as String
 
   sGraphicName1 = "TEST1"
   sGraphicName2 = "TEST2"
@@ -848,8 +869,11 @@ endcase
 
 testcase tInsertGraphic_20
 
-  Dim sGraphicName1, sGraphicName2, sGraphicName3 as String
-  Dim sWidth , sHeight                            as String
+  Dim sGraphicName1 as String
+  Dim sGraphicName2 as String
+  Dim sGraphicName3 as String
+  Dim sWidth as String
+  Dim sHeight as String
 
   sGraphicName1 = "TEST1"
   sGraphicName2 = "TEST2"
diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc
index 5b9c1b5..3ed33ad 100755
--- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc
+++ b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc
@@ -54,8 +54,12 @@
 
 testcase tInsertGraphic_31
 
-  Dim iLeft , iRight  , iCenterHorizontal as Integer
-  Dim iTop  , iBottom , iCenterVertical   as Integer
+  Dim iLeft as Integer
+  Dim iRight as Integer
+  Dim iCenterHorizontal as Integer
+  Dim iTop as Integer
+  Dim iBottom as Integer
+  Dim iCenterVertical as Integer
 
   iLeft = 1 : iRight  = 2  : iCenterHorizontal = 3
   iTop  = 1 : iBottom = 2  : iCenterVertical   = 3
@@ -176,8 +180,12 @@ endcase
 
 testcase tInsertGraphic_32
 
-  Dim iLeft , iRight  , iCenterHorizontal as Integer
-  Dim iTop  , iBottom , iCenterVertical   as Integer
+  Dim iLeft as Integer
+  Dim iRight as Integer
+  Dim iCenterHorizontal as Integer
+  Dim iTop as Integer
+  Dim iBottom as Integer
+  Dim iCenterVertical as Integer
 
   iLeft = 1 : iRight  = 2  : iCenterHorizontal = 3
   iTop  = 1 : iBottom = 2  : iCenterVertical   = 3
@@ -288,8 +296,12 @@ endcase
 
 testcase tInsertGraphic_33
 
-    Dim iLeft , iRight  , iCenterHorizontal as Integer
-    Dim iTop  , iBottom , iCenterVertical   as Integer
+    Dim iLeft as Integer
+    Dim iRight as Integer
+    Dim iCenterHorizontal as Integer
+    Dim iTop as Integer
+    Dim iBottom as Integer
+    Dim iCenterVertical as Integer
     
     iLeft = 1 : iRight  = 2  : iCenterHorizontal = 3
     iTop  = 1 : iBottom = 2  : iCenterVertical   = 4
@@ -410,7 +422,9 @@ endcase
 
 testcase tInsertGraphic_34
 
-  Dim iTop  , iBottom , iCenterVertical   as Integer
+  Dim iTop as Integer
+  Dim iBottom as Integer
+  Dim iCenterVertical as Integer
 
   iTop  = 1 : iBottom = 2  : iCenterVertical   = 3
 
@@ -589,8 +603,10 @@ endcase
 
 testcase tInsertGraphic_36
 
-  Dim sOriginalWidth , sOriginalHeight  as String
-  Dim sNewWidth      , sNewHeight       as String
+  Dim sOriginalWidth as String
+  Dim sOriginalHeight as String
+  Dim sNewWidth as String
+  Dim sNewHeight as String
 
   sNewWidth  = "7"+ gSeperator + "00" + gMeasurementUnit
   sNewHeight = "5"+ gSeperator + "00" + gMeasurementUnit
@@ -637,8 +653,10 @@ endcase
 
 testcase tInsertGraphic_37
 
-  Dim sWidth     , sHeight     as String
-  Dim sNewWidth  , sNewHeight  as String
+  Dim sWidth as String
+  Dim sHeight as String
+  Dim sNewWidth as String
+  Dim sNewHeight as String
 
   sWidth  = "4"+ gSeperator + "00" + gMeasurementUnit
   sHeight = "3"+ gSeperator + "00" + gMeasurementUnit
@@ -683,7 +701,7 @@ endcase
 
 testcase tInsertGraphic_38
 
-    Dim sGraphicName       as String
+    Dim sGraphicName as String
     Dim sNavActualItemName as string
 
     sGraphicName = "TEST1"
@@ -722,7 +740,8 @@ endcase
 
 testcase tInsertGraphic_39
 
-  Dim sHorizontalBy , sVerticalBy as String
+  Dim sHorizontalBy as String
+  Dim sVerticalBy as String
 
   PrintLog "- Test checkbox 'Position' in protect area"
  '/// Test checkbox 'Position' in protect area
@@ -765,7 +784,8 @@ endcase
 
 testcase tInsertGraphic_40
     
-    Dim sHorizontalBy , sVerticalBy as String
+    Dim sHorizontalBy as String
+    Dim sVerticalBy as String
     
     PrintLog "- Test checkbox 'Print' in Property area"
     '/// Test checkbox 'Print' in Property area
diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic5.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic5.inc
index 5b04a26..b92cabb 100755
--- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic5.inc
+++ b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic5.inc
@@ -50,11 +50,20 @@
 '\***********************************************************************
 
 testcase tInsertGraphic_41
+QaErrorLog "#i102477# - tInsertGraphic_41 crashes testtool. Therefore outcommented."
+goto endsub
 
-  Dim sLeft , sRight , sUp ,  sBottom   as String
-  Dim sScaleWidth    , sScaleHeight     as String
-  Dim sImageWidth    , sImageHeight     as String
-  Dim dDummy1        , dDummy2          as double
+
+  Dim sLeft as String
+  Dim sRight as String
+  Dim sUp as String
+  Dim sBottom as String
+  Dim sScaleWidth as String
+  Dim sScaleHeight as String
+  Dim sImageWidth as String
+  Dim sImageHeight as String
+  Dim dDummy1 as double
+  Dim dDummy2 as double
 
   sLeft    = "1"+ gSeperator + "00" + gMeasurementUnit
   sRight   = "1"+ gSeperator + "00" + gMeasurementUnit
@@ -188,10 +197,16 @@ endcase
 
 testcase tInsertGraphic_42
 
-  Dim sLeft , sRight , sUp ,  sBottom   as String
-  Dim sScaleWidth    , sScaleHeight     as String
-  Dim sImageWidth    , sImageHeight     as String
-  Dim dDummy1        , dDummy2          as double
+  Dim sLeft as String
+  Dim sRight as String
+  Dim sUp as String
+  Dim sBottom as String
+  Dim sScaleWidth as String
+  Dim sScaleHeight as String
+  Dim sImageWidth as String
+  Dim sImageHeight as String
+  Dim dDummy1 as double
+  Dim dDummy2 as double
 
   sLeft    = "1"+ gSeperator + "00" + gMeasurementUnit
   sRight   = "1"+ gSeperator + "00" + gMeasurementUnit
@@ -325,7 +340,10 @@ endcase
 
 testcase tInsertGraphic_43
 
-  Dim sLeft , sRight , sUp ,  sBottom   as String
+  Dim sLeft as String
+  Dim sRight as String
+  Dim sUp as String
+  Dim sBottom as String
 
   sLeft    = "1"+ gSeperator + "00" + gMeasurementUnit
   sRight   = "2"+ gSeperator + "00" + gMeasurementUnit
@@ -475,8 +493,10 @@ endcase
 
 testcase tInsertGraphic_45
 
-  Dim sScaleWidth  , sScaleHeight     as String
-  Dim sImageWidth  , sImageHeight     as String
+  Dim sScaleWidth as String
+  Dim sScaleHeight as String
+  Dim sImageWidth as String
+  Dim sImageHeight as String
 
   sScaleWidth  = "100%"
   sScaleHeight = "100%"
@@ -531,8 +551,10 @@ endcase
 
 testcase tInsertGraphic_46
 
-  Dim sScaleWidth  , sScaleHeight     as String
-  Dim sImageWidth  , sImageHeight     as String
+  Dim sScaleWidth as String
+  Dim sScaleHeight as String
+  Dim sImageWidth as String
+  Dim sImageHeight as String
 
   sImageWidth  = "4"+ gSeperator + "00" + gMeasurementUnit
   sImageHeight = "2"+ gSeperator + "80" + gMeasurementUnit
@@ -584,9 +606,12 @@ endcase
 
 testcase tInsertGraphic_47
 
-  Dim sScaleWidth     , sScaleHeight     as String
-  Dim sImageWidth     , sImageHeight     as String
-  Dim sNewImageWidth  , sNewImageHeight  as String
+  Dim sScaleWidth as String
+  Dim sScaleHeight as String
+  Dim sImageWidth as String
+  Dim sImageHeight as String
+  Dim sNewImageWidth as String
+  Dim sNewImageHeight as String
 
   sNewImageWidth  = "8"+ gSeperator + "00" + gMeasurementUnit
   sNewImageHeight = "5"+ gSeperator + "60" + gMeasurementUnit
@@ -715,8 +740,10 @@ function fCalculateTolerance( sNumber1 , sNumber2 )
 
 '/// change 2 parameters to number , then Compare them and return the result.
 
-   Dim dNumber1        , dNumber2         as Single
-   Dim iCommaLocation1 , iCommaLocation2  as Integer
+   Dim dNumber1 as Single
+   dim dNumber2 as Single
+   Dim iCommaLocation1 as integer
+   Dim iCommaLocation2 as Integer
 
   'the code below 4 lines is set "2,00cm" to "2.00"cm if needed
    iCommaLocation1 = InStr(sNumber1 , ",")
diff --git a/testautomation/writer/optional/includes/loadsave/w_loadsave.inc b/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
index 6e9e54a..cf7550f 100644
--- a/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
+++ b/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
@@ -48,7 +48,7 @@ testcase tExportAllReadableFormatsIntoODF
 	if iSprache <> 1 then
 		QAErrorlog "#100970#test only support english language"
 		goto endsub
-	endif
+	end if
 
     Dim AvailableFilters( 35 ) as String
     Dim TemplateFilterFile as String
@@ -86,7 +86,7 @@ testcase tExportAllReadableFormatsIntoODF
 		printlog "- " & i & ". load: " & ImportFileList(i)
         Call hFileOpen ( ImportFileList(i) )
 		printlog "-  done"
-		
+
 		Kontext "TextImport"
 		if TextImport.Exists then
 			TextImport.Ok
@@ -141,18 +141,18 @@ testcase tExportAllReadableFormatsIntoODF
 		if AlienWarning.Exists then
 			AlienWarning.Ok
 			printlog "-  Alien warning passed"
-		endif
+		end if
 
 		sExportFile = WorkDirectory & "ExportedFile" & i & ".odf"
 		Printlog "-  Save as : " & ConvertPath ( sExportFile )
 		if hFileSaveAsWithFilterKill (sExportFile, "writer8") = true then
-			printlog "-  done"            
+			printlog "-  done"
 			printlog "-  close file"
 			Call hCloseDocument
 
 			Printlog "-  Open previous saved file"
 			Call hFileOpenWithFilter (sExportFile, "writer8")
-			printlog "-  done"  
+			printlog "-  done"
 			' Check for macro alert
 			Kontext "SecurityWarning"
 			if SecurityWarning.Exists then
@@ -164,7 +164,7 @@ testcase tExportAllReadableFormatsIntoODF
 			Sleep 1
 		else
 			Warnlog "Unable to save file: " & sExportFile
-		endif
+		end if
 
 		printlog "-  Close all open files."
 		Do Until GetDocumentCount = 0
@@ -181,7 +181,7 @@ testcase tExportAllReadableFormatsIntoThemselves
 	if iSprache <> 1 then
 		QAErrorlog "#100970#test only support english language"
 		goto endsub
-	endif
+	end if
 	
     Dim AvailableFilters( 35 ) as String
     Dim TemplateFilterFile as String
@@ -214,6 +214,8 @@ testcase tExportAllReadableFormatsIntoThemselves
     end if
     app.Mkdir sWorkDirectory
 
+warnlog "#i102221# - Pocketword-filter seems broken."
+
     For iCurrentFileIndex = 1 to 16
         select case iCurrentFileIndex
                     case 1 :   sCurrentFile = "xml2.odt"
@@ -236,8 +238,8 @@ testcase tExportAllReadableFormatsIntoThemselves
                                      sCurrentFilter = "StarWriter 4.0 Vorlage/Template"
                     case 10 : sCurrentFile = "sw50.sdw"
                                      sCurrentFilter = "StarWriter 5.0"
-                    case 11 : sCurrentFile = "pocketword.psw"
-                                     sCurrentFilter = "PocketWord File"
+                    case 11 : sCurrentFile = "html.html"
+                                     sCurrentFilter = "HTML (StarWriter)"
                     case 12 : sCurrentFile = "rtf.rtf"
                                      sCurrentFilter = "Rich Text Format"
                     case 13 : sCurrentFile = "sw60.sxw"
@@ -248,8 +250,9 @@ testcase tExportAllReadableFormatsIntoThemselves
                                      sCurrentFilter = "MS Word 95"
                     case 16 : sCurrentFile = "wintext.txt"
                                      sCurrentFilter = "Text (encoded)"
-                    case 17 : sCurrentFile = "html.html"
-                                     sCurrentFilter = "HTML (StarWriter)"									 
+'                    case 17 : sCurrentFile = "pocketword.psw"
+'                                     sCurrentFilter = "PocketWord File"
+
 
 'TODO: 18-23 not applyable. Can be opened, but saving in the format is not supported.
 
@@ -330,7 +333,7 @@ testcase tExportAllReadableFormatsIntoThemselves
 
             ' Save Out-file
             Call hFileSaveAsWithFilterKill(sSaveFile, sCurrentFilter)
-            
+
             kontext "active"
             if active.exists(2) then 
                 active.ok
@@ -354,7 +357,7 @@ testcase tExportAllReadableFormatsIntoThemselves
         catch
             Warnlog "Error with file: " + sLoadFile
         endcatch
-        
+
         Cleanup:
         kontext "active"
         if active.exists(2) then 
@@ -379,7 +382,7 @@ testcase tExportTop5FormatsIntoTop5
 	if iSprache <> 1 then
 		QAErrorlog "#100970#test only support english language"
 		goto endsub
-	endif
+	end if
 
     Dim ExportFileList(300) as String
     Dim sWorkDirectory as String
diff --git a/testautomation/writer/optional/includes/number/w_207_.inc b/testautomation/writer/optional/includes/number/w_207_.inc
index 89e533d..257549f 100755
--- a/testautomation/writer/optional/includes/number/w_207_.inc
+++ b/testautomation/writer/optional/includes/number/w_207_.inc
@@ -86,7 +86,7 @@ testcase tToolsNumbering12
 				sleep 2
 				Call hFileOpen ( DocFileList(i) )
                 Call sMakeReadOnlyDocumentEditable
-				
+
 				Kontext "Filterauswahl"
 				if Filterauswahl.Exists then
 					Warnlog "  - Filter Selection dialog is up !"
@@ -102,13 +102,13 @@ testcase tToolsNumbering12
 				if SecurityWarning.Exists then
 					SecurityWarning.Cancel
 				end if
-	
+
 				'/// check if loaded
 				if GetDocumentCount >= 1 then
 					ExportFileName = ConvertPath ( gOfficePath + "user\work\" + DateiOhneExt(DateiExtract ( DocFileList(i)  ) ) &  "." & sCurrentFilterExt )
 					printlog "  - export as: " & ExportFileName
 					Call hFileSaveAsWithFilterKill ( ExportFileName, sCurrentFilter )
-					Sleep (2)				
+					Sleep (2)
 					Call hCloseDocument
 					printlog "  - load previous saved document"
 					Call hFileOpen ( ExportFileName )
@@ -130,7 +130,7 @@ testcase tToolsNumbering13
 
     Dim i as integer, iCounter as integer
     '/// #i73790 Regression testing 
-    '/// This testcase loads a Worddocument that lost all formattings 
+    '/// This testcase loads a Worddocument that lost all formattings
     printlog "#i73790 regression testing"
     '/// Load document 'writer\\optional\\input\\number\\regression\\73790.doc'
     Call hFileOpen ( gTesttoolPath + "writer\optional\input\number\regression\73790.doc" )
@@ -169,6 +169,8 @@ testcase tToolsNumbering13
         call wTypeKeys ( "<Down>" )
     next i
 
-    Call hCloseDocument
-
+    printlog "  Close active document "
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
diff --git a/testautomation/writer/optional/includes/redlining/w_redlining1.inc b/testautomation/writer/optional/includes/redlining/w_redlining1.inc
index 5f7da61..36ed049 100755
--- a/testautomation/writer/optional/includes/redlining/w_redlining1.inc
+++ b/testautomation/writer/optional/includes/redlining/w_redlining1.inc
@@ -58,10 +58,14 @@
 
 testcase tRedlining_1
 
-  Dim iInsertionAttr   , iInsertionColor    as Integer
-  Dim iDeletionAttr    , iDeletionColor     as Integer
-  Dim iChangedAttr     , iChangedColor      as Integer
-  Dim iLineChangedMark , iLineChangedColor  as Integer
+  Dim iInsertionAttr as Integer
+  Dim iInsertionColor as Integer
+  Dim iDeletionAttr as Integer
+  Dim iDeletionColor as Integer
+  Dim iChangedAttr as Integer
+  Dim iChangedColor as Integer
+  Dim iLineChangedMark as Integer
+  Dim iLineChangedColor as Integer
 
   iInsertionAttr   = 4  :  iInsertionColor   = 2
   iDeletionAttr    = 4  :  iDeletionColor    = 2
@@ -278,7 +282,8 @@ endcase
 
 testcase tRedlining_5
 
-    Dim j , iAll as Integer
+    Dim j as Integer
+    Dim iAll as Integer
 
     '/// Test Inserted text : from Autotext
     printlog "Inserted text : from Autotext"
@@ -518,6 +523,9 @@ endcase
 
 testcase tRedlining_8
 
+    warnlog "#i102093# - Crash with Edit-Change-Record."
+    goto endsub
+
   '/// Test searched and replaced text
   printlog "searched and replaced text"
 
@@ -737,7 +745,6 @@ testcase tRedlining_9
 	
 	'/// Close the document
 	Call hCloseDocument
-
 endcase
 
 '----------------------------------------------------------------------------
@@ -796,7 +803,6 @@ testcase tRedlining_10
 
    '/// Close the document
    Call hCloseDocument
-
 endcase
 
 '----------------------------------------------------------------------------
@@ -857,7 +863,6 @@ testcase tRedlining_11
 
    '/// Close the document
    Call hCloseDocument
-
 endcase
 
 '----------------------------------------------------------------------------
@@ -914,7 +919,6 @@ testcase tRedlining_12
 
    '/// Close the document
    Call hCloseDocument
-
 endcase
 
 '----------------------------------------------------------------------------
@@ -1135,7 +1139,7 @@ testcase tRedlining_16
    EditChangesRecord
 
    Call wTypeKeys "<Up><End>"
-   Call wTypeKeys "<Shift Down>"
+   Call wTypeKeys "<Shift Down Right>"
    '/// Cut the selection
    EditCut
 
@@ -1230,8 +1234,9 @@ testcase tRedlining_16
    if iComparison1$ <> Vorlage.GetSelText then Warnlog "The paragraph is moved incorrect after accepting the changes - 3rd line"
    TabNumerierungAbsatz.Cancel
 
-   '/// Close the document
-   Call hCloseDocument
-
+    PrintLog "Close active documents"
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
diff --git a/testautomation/writer/optional/includes/undo/w_undo_history_3.inc b/testautomation/writer/optional/includes/undo/w_undo_history_3.inc
index d3a8a65..021f7ec 100755
--- a/testautomation/writer/optional/includes/undo/w_undo_history_3.inc
+++ b/testautomation/writer/optional/includes/undo/w_undo_history_3.inc
@@ -241,6 +241,10 @@ endcase
 
 testcase tUndoBookmark
 
+Warnlog "#i102310# - tUndoBookmark outcommented due to bug."
+goto endsub
+
+
 	'/// <B>Bookmark (Insert/Rename/Delete)</B>
 	printlog "- Insert Bookmark"
 	'/// new document
diff --git a/testautomation/writer/optional/input/import/dummy.sxw b/testautomation/writer/optional/input/import/dummy.sxw
new file mode 100755
index 0000000..c49f4ad
Binary files /dev/null and b/testautomation/writer/optional/input/import/dummy.sxw differ
diff --git a/testautomation/writer/optional/w_table.bas b/testautomation/writer/optional/w_table.bas
index 74258a0..d765c8b 100755
--- a/testautomation/writer/optional/w_table.bas
+++ b/testautomation/writer/optional/w_table.bas
@@ -127,7 +127,7 @@ sub TableConfiguration
 
     mUnit = fSetMeasurementToCM()
     ToolsOptions
-    Call hToolsOptions ("WRITER","GENERAL")
+    Call hToolsOptions ("Writer","GENERAL")
     cDecSep = GetDecimalSeperator(Tabulatorenabstand.GetText)
     Kontext "ExtrasOptionenDlg"
     ExtrasOptionenDlg.Ok
diff --git a/testautomation/writer/required/includes/w_001_.inc b/testautomation/writer/required/includes/w_001_.inc
index cd95544..371a7fa 100755
--- a/testautomation/writer/required/includes/w_001_.inc
+++ b/testautomation/writer/required/includes/w_001_.inc
@@ -61,6 +61,9 @@ end sub
 
 testcase tFileNewLabels
 
+Warnlog "#i102218# - tFileNewLabels outcommented due to bug."
+goto endsub
+
     Dim iSheetFormat as integer
     Dim iBrandIndex as integer
     Dim iType as integer
@@ -89,7 +92,7 @@ testcase tFileNewLabels
         PrintLog "Check number of brands and types (see #i44801# for details)"
         
         For iSheetFormat = 1 to 2
-        
+            
             Select Case( iSheetFormat )
             Case 1
                 Endlos.Check
@@ -172,17 +175,17 @@ testcase tFileNewLabels
 
         Kontext "SaveLabelFormat"
         if ( SaveLabelFormat.exists( 1 ) ) then
-        
+            
             Call DialogTest (SaveLabelFormat)
             
             PrintLog "Close dialog 'Save Label Format'"
             SaveLabelFormat.Cancel
         else
             warnlog( "Dialog <SaveLabelFormat> is not available" )
-        endif
+        end if
         
         Kontext "TabFormatEtiketten"
-
+        
         PrintLog "Switch to Tabpage 'Options'"
         Kontext
         active.SetPage TabDruckerEtiketten
@@ -192,7 +195,6 @@ testcase tFileNewLabels
             Call DialogTest (TabDruckerEtiketten)
 
             if ( gPlatgroup = "w95" or gPlatgroup = "wnt" ) then
-
                 PrintLog "Click printer setup for Windows"
                 Einrichten.Click
 
@@ -202,10 +204,10 @@ testcase tFileNewLabels
                     DruckerEinrichten.Cancel
                 else
                     Warnlog "No Default Printer defined for the system, set one!"
-                endif
+                end if
             else
                 printlog( "No printer setup for UNIX like OS" )
-            endif
+            end if
 
             PrintLog "Check checkbox 'Synchronize contents'"
             Kontext "TabDruckerEtiketten"
@@ -225,7 +227,7 @@ testcase tFileNewLabels
                     Warnlog "Once Document has been opened, office asks to save it! BugID 89702"
                     Active.Cancel
                 endcatch
-            endif
+            end if
 
             PrintLog "Check if dialog 'Synchronize Labels' is up"
             Kontext "EtikettenSynchronisieren"
@@ -235,13 +237,13 @@ testcase tFileNewLabels
                 WaitSlot()
             else
                 Warnlog " Dialog to synchronize labels not up!"
-            endif
+            end if
         else
             warnlog( "Tabpage <TabDruckerEtiketten> is not available" )
-        endif
+        end if
     else
         warnlog( "hCreateLabels() failed" )
-    endif
+    end if
 
     PrintLog "Close active document"
     Call hCloseDocument
@@ -251,6 +253,9 @@ endcase
 
 testcase tFileNewBusinessCards
 
+Warnlog "#i102218# - tFileNewBusinessCards outcommented due to bug."
+goto endsub
+
     Dim iFormat as integer
     Dim iBrand as integer
     Dim iType as integer
@@ -356,13 +361,13 @@ testcase tFileNewBusinessCards
             Active.Setpage TabVisitenkarten
         else
             warnlog( "Dialog <TabEtiketteMedium> not available" )
-        endif
+        end if
 
         Kontext "Active"
         if ( Active.GetRT = 304 ) then
             Warnlog( "UNexpected messagebox: " & Active.GetText() )
             Active.Ok
-        endif
+        end if
 
         Kontext "TabVisitenkarten"
         for iWait = 1 to 100
@@ -371,7 +376,7 @@ testcase tFileNewBusinessCards
                 iWait = 101
             else
                 wait( 100 )
-            endif
+            end if
         next iWait
 
         PrintLog "Switch to Tabpage 'Private'"
@@ -417,7 +422,7 @@ testcase tFileNewBusinessCards
             DruckerEinrichten.Cancel
         else
             Warnlog "No Default Printer configured for this system. Set one!"
-        endif
+        end if
 
         Kontext "TabZusaetzeEtiketten"
         PrintLog "Switch to Tabpage 'Options'"
@@ -435,7 +440,7 @@ testcase tFileNewBusinessCards
                 Active.Cancel
                 Warnlog "Once Document has been opened, office asks to save it! BugID 89702"
             endcatch
-        endif
+        end if
 
         PrintLog "Check i dialog 'Syncronize Labels' is up"
         Kontext "EtikettenSynchronisieren"
@@ -444,13 +449,13 @@ testcase tFileNewBusinessCards
             Synchronisieren.Click
         else
             Warnlog "Dialog to synchronize Business Cards not up!"
-        endif
+        end if
 
         PrintLog "Close active document"
         Call hCloseDocument
     else
         warnlog( "Failed to create business cards" )
-    endif
+    end if
     
 endcase
 
@@ -495,21 +500,21 @@ testcase tFileOpen
                         NeuerOrdner.Cancel
                     else
                         warnlog( "Dialog <NeuerOrdner> not available" )
-                    endif
+                    end if
                 else
                     Warnlog( "New Folder button disabled" )
-                endif
+                end if
             else
                 Warnlog( "New Folder button not visible" )
-            endif
+            end if
         else
             Warnlog( "New Folder button missing on dialog" )
-        endif
+        end if
         Kontext "OeffnenDlg"
         OeffnenDlg.Cancel
     else
         warnlog( "File Open dialog is not available" )
-    endif
+    end if
     PrintLog "Close File-Open-dialog with 'Cancel'"
 endcase
 
@@ -534,7 +539,7 @@ testcase tFileClose
         Active.Cancel
     else
         Warnlog( "No warning for modified document" )
-    endif    
+    end if    
 
     PrintLog "again File / Close"
     hUseAsyncSlot( "FileClose" )
@@ -545,7 +550,7 @@ testcase tFileClose
         Active.Yes()
     else
         warnlog( "No warning for modified document" )
-    endif
+    end if
 
     PrintLog "Click 'Cancel' in File-Save-Dialog"
     Kontext "SpeichernDlg"
@@ -558,8 +563,8 @@ testcase tFileClose
             Active.Ok()
         else
             Warnlog( "File Save dialog not displayed, messagebox came up instead" )
-        endif
-    endif
+        end if
+    end if
 
     PrintLog "Choose File / Close again"
     hUseAsyncSlot( "FileClose" )
@@ -570,7 +575,7 @@ testcase tFileClose
         Active.No
     else
         warnlog( "Expected messagebox missing" )
-    endif
+    end if
     
 endcase
 
@@ -622,22 +627,22 @@ testcase tFileSave
                         NeuerOrdner.Cancel
                     else
                         warnlog( "Dialog <NeuerOrdner> not available" )
-                    endif
+                    end if
                 else
                     Warnlog( "New Folder button disabled" )
-                endif
+                end if
             else
                 Warnlog( "New Folder button not visible" )
-            endif
+            end if
         else
             Warnlog( "New Folder button missing on dialog" )
-        endif
+        end if
         
         Kontext "SpeichernDlg"
         SpeichernDlg.cancel()
     else
         warnlog( "File Save dialog is not available" )
-    endif
+    end if
 
     PrintLog "Close active document"
     Call hCloseDocument
@@ -670,7 +675,7 @@ testcase tFileSaveAll
         SpeichernDlg.Cancel
     else
         warnlog( "First File Save dialog is not available" )
-    endif
+    end if
     
     PrintLog "Cancel 2. upcoming Filedialog"    
     Kontext "SpeichernDlg"
@@ -678,13 +683,13 @@ testcase tFileSaveAll
         SpeichernDlg.Cancel
     else
         warnlog( "Second File Save dialog is not available" )
-    endif
+    end if
 
     Kontext "SpeichernDlg"
     if ( SpeichernDlg.exists( 1 ) ) then
         warnlog( "Third, unexpected File Save dialog open" )
         SpeichernDlg.cancel()
-    endif
+    end if
 
     PrintLog "Close documents"
     hFileCloseAll()
@@ -735,22 +740,22 @@ testcase tFileSaveAs
                         NeuerOrdner.Cancel
                     else
                         warnlog( "Dialog <NeuerOrdner> not available" )
-                    endif
+                    end if
                 else
                     Warnlog( "New Folder button disabled" )
-                endif
+                end if
             else
                 Warnlog( "New Folder button not visible" )
-            endif
+            end if
         else
             Warnlog( "New Folder button missing on dialog" )
-        endif
+        end if
         
         Kontext "SpeichernDlg"
         SpeichernDlg.Cancel
     else
         warnlog( "File Save dialog is not available" )
-    endif
+    end if
 
     PrintLog "Close active document"
     Call hCloseDocument
@@ -789,7 +794,7 @@ testcase tFileSaveAsExport
 
     if ( hFileCloseAll() > 1 ) then
         QAErrorlog "More than 1 document had to be closed!"
-    endif
+    end if
 
     PrintLog "Close document"
     Call hCloseDocument
@@ -838,11 +843,11 @@ testcase tFileSaveWithPassword
             else
                 warnlog( "FATAL: Password checkbox is not enabled" )
                 goto endsub
-            endif
+            end if
         else
             warnlog( "FATAL: Password checkbox does not exist" )
             goto endsub
-        endif
+        end if
 
         PrintLog "Save the document"
         Dateiname.SetText( sFilePath )
@@ -853,7 +858,7 @@ testcase tFileSaveWithPassword
         if ( Active.Exists (1) ) then 
             warnlog( "Unexpected messagebox: " & Active.getText() )
             Active.Yes
-        endif
+        end if
 
         PrintLog "Password dialog has to come up"
         Kontext "PasswordFileSave"
@@ -867,7 +872,7 @@ testcase tFileSaveWithPassword
             PasswordFileSave.OK
         else
             Warnlog "- Password-Dialog not up !"
-        endif
+        end if
 
         Kontext "Active"
         PrintLog "A messagebox has to come up, warns of wrong confirmation"
@@ -875,7 +880,7 @@ testcase tFileSaveWithPassword
             Active.OK
         else
             Warnlog "Able to save document with wrong password"
-        endif
+        end if
 
         Kontext "PasswordFileSave"
         if ( PasswordFileSave.Exists() ) then
@@ -885,10 +890,10 @@ testcase tFileSaveWithPassword
             PasswordFileSave.OK
         else
             Warnlog "- Password-Dialog not up !"
-        endif
+        end if
     else
         warnlog( "Dialog <SpeichernDlg> not available" )
-    endif
+    end if
 
 
     PrintLog "Close the document"
@@ -904,7 +909,7 @@ testcase tFileSaveWithPassword
         PasswordFileOpen.OK()
     else
         Warnlog "- Password-Dialog not up or Document couldn't be loaded!"
-    endif
+    end if
 
     PrintLog "A messagebox has to come up, warns of wrong password"
     Kontext "Active"
@@ -913,13 +918,13 @@ testcase tFileSaveWithPassword
         Active.OK()
     else
         Warnlog "Able to load document with wrong password"
-    endif
+    end if
 
     Kontext "PasswordFileOpen"
     PrintLog "Cancel Password dialog (not loading the document"
     if ( PasswordFileOpen.Exists( 1 ) ) then
         PasswordFileOpen.Cancel()
-    endif
+    end if
 
     PrintLog "File / Open again your previous saved document"
     hFileOpen( sFilePath )
@@ -931,7 +936,7 @@ testcase tFileSaveWithPassword
         PasswordFileOpen.OK()
     else
         Warnlog "- Password-Dialog not up!"
-    endif
+    end if
     
     ' Rename document, the old one is now obsolete    
     sFilePath = ConvertPath ( gOfficePath + "user\work\" + sFileName2 )
@@ -951,7 +956,7 @@ testcase tFileSaveWithPassword
             else
                 Warnlog "#i36015#Checkbox 'Save with password' is not checked in file-dialog !"
                 Passwort.Check
-            endif
+            end if
             SpeichernDlg.Cancel
         else
             Dateiname.SetText( sFilePath )
@@ -962,7 +967,7 @@ testcase tFileSaveWithPassword
             if ( Active.Exists( 2 ) ) then 
                 printlog( "Messagebox: " & Active.getText() )
                 Active.Yes()
-            endif
+            end if
             
             PrintLog "Click on 'Save' in file open dialog"
             Kontext "PasswordFileSave"
@@ -984,14 +989,14 @@ testcase tFileSaveWithPassword
                     PasswordFileOpen.OK
                 else
                     warnlog( "Password dialog did not open" )
-                endif
+                end if
             else
                 Warnlog "Passworddialog is not coming up on saving document"
-            endif
-        endif
+            end if
+        end if
     else
         warnlog( "Dialog <SpeichernDlg> not available" )
-    endif
+    end if
     PrintLog "Close active document"
     Call hCloseDocument
 endcase
@@ -1031,7 +1036,7 @@ testcase tFileReload
     if MessageBox.Exists (1) then
         WarnLog "Messagebox after saving and closing : " + MessageBox.GetText
         MessageBox.Yes
-    endif
+    end if
     Wait (500)
 
     PrintLog "Open previous saved document"
diff --git a/testautomation/writer/required/includes/w_005b_.inc b/testautomation/writer/required/includes/w_005b_.inc
index 5c9111a..5d259a9 100755
--- a/testautomation/writer/required/includes/w_005b_.inc
+++ b/testautomation/writer/required/includes/w_005b_.inc
@@ -100,7 +100,7 @@ testcase tFormatGraphics
     if ( hUseAsyncSlot( "FormatGraphics" ) = -1 ) then
         Warnlog "- Format / Graphics disabled or hidden!"
         goto endsub
-    endif
+    end if
 
     printlog " Step through all tabpages"
     Kontext
@@ -224,7 +224,7 @@ testcase tFormatAlignment
     Call hNewDocument
     printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'"
     Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
-    
+
     if ( gApplication = "HTML" ) then
         printlog " Format / Anchor / to Page"
         hUseAsyncSlot( "FormatAnchorToPage" )
@@ -440,15 +440,15 @@ endcase
 testcase tFormatWrapObject
 
     PrintLog "- Format / Wrap (Frame)"
-    
+
     if ( gApplication = "HTML" ) then
         printlog "Not in WriterWeb!"
         goto endsub
     end if
-    
+
     printlog " Open new document"
     Call hNewDocument
-    
+
     printlog " Insert a frame"
     Call wInsertFrame
 
@@ -469,32 +469,32 @@ testcase tFormatWrapObject
 
     printlog " Format / Wrap / first paragraph"
     FormatWrapFirstParagraph : WaitSlot()
-    
+
     if ( hUseAsyncSlot( "FormatWrapContour" ) = -1 ) then
         printlog( "Format / Wrap / Contour disabled. Good." )
     else
         warnlog( "#i90964# Format / Wrap / Contour should not be enabled for frames" )
-    endif
-    
+    end if
+
     printlog " Format / Wrap / Edit Contour"
     if ( hUseAsyncSlot( "FormatWrapEditContour" ) = -1 ) then
         printlog( "Format / Wrap / Edit Contour disabled. Good." )
     else
         Warnlog( "#i90964# Wrap / Edit Contour should not be enabled for frames" )
-        
+
         Kontext "KonturEditor"
         if ( KonturEditor.exists( 2 ) ) then
             KonturEditor.Close()
         else
             warnlog( "Slot <FormatWrapEditContour> is enabled but doesn't trigger the dialog" )
-        endif
-    endif    
+        end if
+    end if
 
     Kontext
     if ( Active.Exists( 2 ) ) then 
         qaerrorlog( "JSK: Undocumented active handled silently - fix it" )
         Active.Yes()
-    endif
+    end if
 
     printlog " Close active document"
     Call hCloseDocument
@@ -514,10 +514,9 @@ testcase tFormatLine
     Call hNewDocument
     printlog " Insert a rectangle"
     Call wRectangleToClipboard
-    
+
     printlog " Edit / Paste"
     hUseAsyncSlot( "EditPaste" )
-    
 
     printlog " Format / Line"
     if ( hUseAsyncSlot( "FormatLine" ) = -1 ) then
@@ -526,20 +525,20 @@ testcase tFormatLine
         Call gMouseClick ( 45, 45 )
         if ( hUseAsyncSlot( "FormatLine" ) = -1 ) then
             warnlog( "Failed to execute slot <FormatLine>" )
-        endif
-    endif
+        end if
+    end if
 
     Kontext
     printlog " Step through all tabpages"
     wait 500
     active.SetPage TabLinie
-    
+
     kontext "TabLinie"
     Call DialogTest ( TabLinie )
 
     Kontext
     active.SetPage TabLinienstile
-    
+
     kontext "TabLinienstile"
     Call DialogTest ( TabLinienstile )
     try
@@ -556,7 +555,7 @@ testcase tFormatLine
 
     Kontext
     active.SetPage TabLinienenden
-    
+
     Kontext "Linienstil"
     if Linienstil.Exists then
         Warnlog "Messagebox appears changing to Tabpage 'Arrow Styles!"
@@ -596,14 +595,14 @@ testcase tFormatArea
     Call wRectangleToClipboard
 
     hUseAsyncSlot( "EditPaste" )
-    
+
     printlog " Format / Area"
     if ( hUseAsyncSlot( "FormatArea" ) = -1 ) then
         Warnlog "Clipboard problem between applications!"
         Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
         Call gMouseClick ( 45, 45 )
         FormatArea
-    endif
+    end if
 
     Kontext
     wait 500
@@ -641,7 +640,7 @@ testcase tFormatArea
         WaitSlot()
     else
         warnlog( "Dialog <FarbeDlg> is not available" )
-    endif
+    end if
 
     Kontext
     active.SetPage TabFarbverlaeufe
@@ -671,7 +670,7 @@ testcase tFormatArea
         NameDlg.Cancel
     else
         warnlog( "Dialog <NameDlg> is not available" )
-    endif              
+    end if
 
     Kontext
     active.SetPage TabBitmap
@@ -690,7 +689,7 @@ testcase tFormatArea
         NameDlg.Cancel
     else
         warnlog( "Dialog <NameDlg> is not available" )
-    endif    
+    end if
 
     kontext "TabBitmap"
     Import.Click
@@ -700,7 +699,7 @@ testcase tFormatArea
         GrafikEinfuegenDlg.Cancel
     else
         warnlog( "Dialog <GrafikEinfuegenDlg> is not available" )
-    endif
+    end if
 
     printlog " Close Tabdialog"
     kontext "TabBitmap"
@@ -775,9 +774,8 @@ testcase tFormatPositionAndSize
         Call gMouseClick ( 45, 45 )
         if ( hUseAsyncSlot( "ContextPositionAndSize" ) = -1 ) then
             warnlog( "Failed to execute slot <ContextPositionAndSize>" )
-        endif
-    endif
-            
+        end if
+    end if
 
     printlog " Step through all tabpages"
     Kontext
@@ -799,7 +797,6 @@ testcase tFormatPositionAndSize
 
     printlog " Close active document"
     Call hCloseDocument
-
 endcase
 
 '-----------------------------------------------------------
@@ -811,10 +808,10 @@ testcase tFormatFlip
         printlog "Not in WriterWeb!"
         goto endsub
     end if
-    
+
     printlog " Open new document"
     Call hNewDocument
-    
+
     printlog " Paste a rectangle from draw via clipboard"
     Call wRectangleToClipboard
     hUseAsyncSlot( "EditPaste" )
@@ -826,8 +823,8 @@ testcase tFormatFlip
         Call gMouseClick ( 45, 45 )
         if ( hUseAsyncSlot( "FormatFlipVertically" ) = -1 ) then
             warnlog( "Failed to execute slot <FormatFlipVertically>" )
-        endif
-    endif
+        end if
+    end if
 
     WaitSlot (3000)
 
@@ -846,10 +843,10 @@ testcase tFormatArrangeArea
         printlog "Not in WriterWeb!"
         goto endsub
     end if
-    
+
     printlog " Open new document"
     Call hNewDocument
-    
+
     printlog " Paste a rectangle from draw via clipboard"
     Call wRectangleToClipboard
     hUseAsyncSlot( "EditPaste" )
@@ -862,8 +859,8 @@ testcase tFormatArrangeArea
         Call gMouseClick ( 45, 45 )
         if ( hUseAsyncSlot( "FormatArrangeBringToFrontCalc" ) = -1 ) then
             warnlog( "Failed to execute slot <FormatArrangeBringToFrontCalc>" )
-        endif
-    endif
+        end if
+    end if
 
     WaitSlot()
     printlog " Format / Arrange / Bring Forward"
@@ -968,12 +965,12 @@ testcase tFormatGroup
     Dim y1%
 
     PrintLog "- Format / Group drawing objects"
-    
+
     if ( gApplication = "HTML" ) then
         printlog "Not in WriterWeb!"
         goto endsub
     end if
-    
+
     printlog " Open new document"
     Call hNewDocument
 
@@ -1005,23 +1002,23 @@ testcase tFormatGroup
         QAErrorlog "Unable to execute Format / Group / Group. Maybe objects not selected!"
         Call hCloseDocument
         goto endsub
-    endif
-    
+    end if
+
     printlog " Format / Group / Edit Group"
     if ( hUseAsyncSlot( "FormatGroupEditGroupCalc" ) = -1 ) then
         Warnlog "Unable to execute Format / Group / Group. Maybe objects not selected!"
         Call hCloseDocument
         goto endsub
-    endif
+    end if
 
     Call wTypeKeys ( "<Shift F4>" )
-    
+
     printlog " Format / Exit Group"
     if ( hUseAsyncSlot( "FormatExitGroupDraw" ) = -1 ) then
         Warnlog "Unable to execute Format / Group / Exit Group. Maybe objects not selected!"
         Call hCloseDocument
         goto endsub
-    endif
+    end if
 
     Call wTypeKeys ( "<Shift F4>" )
     
@@ -1030,7 +1027,7 @@ testcase tFormatGroup
         Warnlog "Unable to execute Format / Group / Ungroup. Maybe objects not selected!"
         Call hCloseDocument
         goto endsub
-    endif
+    end if
 
     printlog " Close active document"
     Call hCloseDocument
@@ -1041,7 +1038,7 @@ endcase
 testcase tFormatFontwork
 
     PrintLog "- Format / Fontwork drawing objects"
-    
+
     if ( gApplication = "HTML" ) then
         printlog "Not in WriterWeb!"
         goto endsub
@@ -1060,7 +1057,7 @@ testcase tFormatFontwork
         Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
         Call gMouseClick ( 45, 45 )
         FormatFontwork
-    endif
+    end if
 
     Kontext "Fontwork"
     if ( Fontwork.Exists( 1 ) ) then
@@ -1070,7 +1067,7 @@ testcase tFormatFontwork
     else
         Warnlog "Dialog 'Fontwork' does not exist!"
     end if
-    
+
     printlog " Close active document"
     Call hCloseDocument
 endcase
@@ -1080,50 +1077,52 @@ endcase
 testcase tFormatPositionAndSizeLegend
 
     PrintLog "- Format / Position and Size in Legend"
-    
+
     if ( gApplication = "HTML" ) then
         printlog "Not in WriterWeb!"
         goto endsub
     end if
-    
+
     printlog " Open new document"
     Call hNewDocument
+    Kontext "NavigatorWriter"
+    if NavigatorWriter.Exists then ViewNavigator
+
     Call wZeichenobjektEinfuegen ( "Legende", 45, 35, 50, 50 )
-    
+
     printlog " Insert a legend"
     sleep (1)
-    Call wObjektSelektieren(43, 33, 75, 75)
+    Call wObjektSelektieren(13, 13, 75, 75)
 
     hUseAsyncSlot( "FormatPositionAndSize" )
     kontext "active"
     if ( active.exists( 1 ) ) then
         printlog( "Dialog open. Good" )
-    else   
+    else
         Warnlog "Format / Position and Size does not work! Maybe object not selected!"
         printlog " Close active document"
         Call hCloseDocument
         goto endsub
-    endif
+    end if
 
     printlog " In upcoming dialog step through all tabpages"
     Kontext
     active.setpage TabPositionAndSizeWriter
-    
+
     Kontext "TabPositionAndSizeWriter"
     call Dialogtest ( TabPositionAndSizeWriter )
 
     Kontext
     active.setpage TabLegende
-    
+
     Kontext "TabLegende"
     call Dialogtest ( TabLegende )
-    
+
     printlog " Close dialog"
     TabLegende.Cancel
 
     printlog " Close active document"
     Call hCloseDocument
-    
 endcase
 
 '-----------------------------------------------------------
@@ -1131,19 +1130,19 @@ endcase
 testcase tFormatStyleEdit
 
     PrintLog "- Format / Style Text objects"
-    
+
     if ( gApplication = "HTML" ) then
         printlog "Not in WriterWeb !"
         goto endsub
     end if
-    
+
     printlog " Open new document"
     Call hNewDocument
 
     Kontext "DrawBar"
     if Not DrawBar.Exists then 
         Call hToolbarSelect("Drawing", true)
-    endif
+    end if
 
     if Drawbar.Exists then
         Textobjekt.Click
@@ -1153,7 +1152,6 @@ testcase tFormatStyleEdit
         Call gMouseMove(50, 20, 70, 40)
         hUseAsyncSlot( "FormatStyleBold" )
 
-        
         printlog " Format / Style / Bold"
         Call wTypeKeys ("a")
         printlog " Format / Style / Italic"
@@ -1239,8 +1237,8 @@ testcase tFormatAlignmentEdit
 
     Kontext "Drawbar"
     Drawbar.Close
-    Call hCloseDocument
     printlog " Close active document"
+    Call hCloseDocument
 endcase
 
 '-----------------------------------------------------------
@@ -1322,12 +1320,12 @@ testcase tFormatParagraphEdit
 
     TabTabulator.Cancel
     Sleep 1
+    printlog " Close dialog"
     Kontext "Drawbar"
     Drawbar.Close
-    printlog " Close dialog"
 
-    Call hCloseDocument
     printlog " Close active document"
+    Call hCloseDocument
 endcase
 
 '-----------------------------------------------------------
@@ -1346,7 +1344,7 @@ testcase tHtmlDocFormatGraphics
     if ( hUseAsyncSlot( "FormatGraphics" ) = -1 ) then
         Warnlog "- Format / Graphics disabled or hidden!"
         goto endsub
-    endif
+    end if
 
     printlog " Step through all tabpages"
     Kontext
diff --git a/testautomation/writer/required/includes/w_007_.inc b/testautomation/writer/required/includes/w_007_.inc
index ea986fb..85f87d2 100755
--- a/testautomation/writer/required/includes/w_007_.inc
+++ b/testautomation/writer/required/includes/w_007_.inc
@@ -68,7 +68,6 @@ sub w_007_
     gApplication = "MASTERDOCUMENT"
     Call tMasterDocToolsHyphenation
     gApplication = "WRITER"
-
 end sub
 
 ' -------------------------------------------
@@ -122,10 +121,8 @@ testcase tToolsSpellcheck
     case else
     end select
 
-    ToolsSpellcheckWriter
-
     printlog " Tools / Spellcheck / Check"
-
+    ToolsSpellcheckWriter
     Kontext "Active"
     if ( Active.Exists( 1 ) ) then
         if Active.GetRT = 304 then
@@ -209,12 +206,13 @@ testcase tToolsSpellcheck
     wait 500
 
     Kontext "Spellcheck"
-    Spellcheck.Close
     printlog " Close 'Spellcheck' dialog"
+    Spellcheck.Close
     wait 500
-    Call hCloseDocument
-    printlog " Close active document"
-
+    PrintLog "Close active documents"
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 ' -------------------------------------------
@@ -304,11 +302,12 @@ testcase tToolsThesaurus
     printlog " Close 'Language' dialog"
     SpracheAuswaehlen.Cancel
     Kontext "Thesaurus"
-    Thesaurus.Cancel
     printlog " Close 'Thesaurus' dialog"
-    Call hCloseDocument
-    printlog " Close active document"
-
+    Thesaurus.Cancel
+    PrintLog "Close active documents"
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 ' -------------------------------------------
@@ -413,9 +412,10 @@ testcase tToolsHyphenation
         end if
     end if
 
-    Call hCloseDocument
-    printlog " Close active document"
-    if gApplication = "MASTERDOCUMENT" then Call hCloseDocument
+    PrintLog "Close active documents"
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 ' -------------------------------------------
@@ -564,11 +564,10 @@ testcase tToolsAutocorrectAutoformat
     Kontext "TabWortergaenzung"
     Call DialogTest ( TabWortergaenzung )
     printlog " Close Autocorrect dialogue"
-
     TabWortergaenzung.Cancel
 
-    Call hCloseDocument
     printlog " Close active document"
+    Call hCloseDocument
 endcase
 
 ' -------------------------------------------
@@ -591,9 +590,8 @@ testcase tToolsOutlineNumbering
     printlog " Step through tabpages and close dialog"
 
     TabPositionKapitelnumerierung.Cancel
-    Call hCloseDocument
     printlog " Close active document"
-
+    Call hCloseDocument
 endcase
 
 ' -------------------------------------------
@@ -611,8 +609,8 @@ testcase tToolsLineNumbering
     Call DialogTest ( TabZeilennumerierung )
     printlog " Close dialog"
     TabZeilennumerierung.Cancel
-    Call hCloseDocument
     printlog " Close active document"
+    Call hCloseDocument
 endcase
 
 '-----------------------------------------------------------
@@ -635,14 +633,15 @@ testcase tToolsFootnotes
     DialogTest ( TabEndnoten )
     printlog " Close dialog"
     TabEndnoten.Cancel
-    Call hCloseDocument
     printlog " Close active document"
+    Call hCloseDocument
 endcase
 
 ' -------------------------------------------
 
 testcase tToolsGallery
     Dim i as integer
+
     printlog "- Tools / Gallery"
     Call hNewDocument
     printlog " Open new document"
@@ -671,9 +670,8 @@ testcase tToolsGallery
     Kontext "Gallery"
     if Gallery.Exists then Warnlog "Gallery has not been closed!"
 
-    Call hCloseDocument
     printlog " Close active document"
-
+    Call hCloseDocument
 endcase
 
 ' -------------------------------------------
@@ -687,7 +685,7 @@ testcase tToolsMailMergeWizard
     Call hNewDocument
     printlog " Open new document"
     ToolsMailMergeWizard
-    
+
     printlog " Tools / Mail Merge Wizard"
     Kontext "MailMergeWizard"
     if ( MailMergeWizard.Exists( 5 ) ) then
@@ -704,7 +702,7 @@ testcase tToolsMailMergeWizard
     Wait 500
     printlog " Click document 'Browse' button"
     BrowseDocument.Click
-    
+
     Kontext "OeffnenDlg"
     if ( OeffnenDlg.Exists( 1 ) ) then
         OeffnenDlg.Cancel
@@ -722,7 +720,7 @@ testcase tToolsMailMergeWizard
         Neu.Cancel
     else
         warnlog( "Dialog <Neu> is not available" )
-    endif
+    end if
 
     Kontext "TabMailMergeSourceDocument"
     printlog " Check 'Use the current document' radio button"
@@ -772,7 +770,7 @@ testcase tToolsMailMergeWizard
         OeffnenDlg.Cancel
     else
         Warnlog "Filedialog not up on template 'Browse' button"
-    endif
+    end if
 
     Kontext "SelectAddressList"
     if ( SelectAddressList.exists( 1 ) ) then
@@ -780,7 +778,7 @@ testcase tToolsMailMergeWizard
         Create.Click
     else
         warnlog( "Dialog <SelectAddressList> is not available" )
-    endif
+    end if
 
     Kontext "NewAddressList"
     if ( NewAddressList.exists( 1 ) ) then
@@ -789,7 +787,7 @@ testcase tToolsMailMergeWizard
         Find.Click
     else
         warnlog( "Dialog <NewAddressList> is not available" )
-    endif
+    end if
 
     Kontext "FindEntry"
     if ( FindEntry.Exists( 1 ) ) then
@@ -826,29 +824,29 @@ testcase tToolsMailMergeWizard
     else
         Warnlog "Dialog 'Customize Address List' is not up"
     end if
-    
+
     printlog " Close all open dialogs"
-    
+
     Kontext "NewAddressList"
     if ( NewAddressList.exists( 1 ) ) then
         NewAddressList.Cancel
     else
         warnlog( "Dialog <NewAddressList> is not available" )
-    endif
-    
+    end if
+
     Kontext "SelectAddressList"
     if ( SelectAddressList.exists( 1 ) ) then
         SelectAddressList.Cancel
     else
         warnlog( "Dialog <SelectAddressList> is not available" )
-    endif
+    end if
 
     Kontext "MailMergeWizard"
     if ( MailMergeWizard.exists( 1 ) ) then
         MailMergeWizard.Cancel
     else
         warnlog( "Dialog <MailMergeWizard> is not available" )
-    endif
+    end if
 
     printlog " Close active document"
     Call hCloseDocument
@@ -912,7 +910,6 @@ testcase tToolsCalculate
     EditPaste
     Call hCloseDocument
     printlog " Close active document"
-
 endcase
 
 ' -------------------------------------------
@@ -931,7 +928,7 @@ testcase tToolsUpdate
     Call wTypeKeys ("Dieser Text ist zur Aktualisierung")
     printlog " Insert / Indexes"
     InsertIndexes
- 
+
     Kontext "Active"
     if ( Active.Exists( 2 ) ) then
         if active.GetRT = 304 then
@@ -939,7 +936,7 @@ testcase tToolsUpdate
             Active.Ok
         end if
     end if
-    
+
     Kontext
     Active.Setpage TabVerzeichnisseVerzeichnis
 
@@ -964,14 +961,13 @@ testcase tToolsUpdate
 
     printlog " Tools / Update / Fields"
     hUseAsyncSlot( "ToolsUpdateFields" )
-    
 
     printlog "  - Update links"
     printlog " Insert a graphic from file"
     Call hGrafikVerknuepftEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
     if ( hUseAsyncSlot( "ToolsUpdateLinks" ) = -1 ) then
         Warnlog "Links can't be updated!"
-    endif
+    end if
 
     printlog "  - Update / Reformat Pages  with  Tools / Page formatting"
     ToolsPageFormatting
@@ -986,13 +982,12 @@ endcase
 ' -------------------------------------------
 
 testcase tToolsHangulHanjaConversion
-
     Dim bAsianLanguage as Boolean
     Dim sTestFile as String
-    
+
     if ( gApplication = "MASTERDOCUMENT" ) then
         goto endsub
-    endif
+    end if
 
     select case gApplication
     case "HTML"   : sTestFile = gTesttoolpath & "writer\required\input\hangul.html"
@@ -1059,7 +1054,9 @@ testcase tToolsHangulHanjaConversion
     end if
 
     printlog " Close all active documents"
-    hFileCloseAll()
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
 endcase
 
 ' -------------------------------------------
@@ -1132,7 +1129,6 @@ endcase
 ' -------------------------------------------
 
 testcase tHtmlDocToolsHangulHanjaConversion
-
     Dim bAsianLanguage as Boolean
     Dim sTestFile as String
 
@@ -1154,7 +1150,7 @@ testcase tHtmlDocToolsHangulHanjaConversion
         bAsianLanguage = ActiveDeactivateAsianSupport(False)
         Call hCloseDocument
         goto endsub
-    endif
+    end if
 
     Kontext "HangulHanjaConversion"
     if ( HangulHanjaConversion.Exists( 1 ) ) then
@@ -1194,22 +1190,22 @@ testcase tHtmlDocToolsHangulHanjaConversion
         Call ActiveDeactivateAsianSupport(FALSE)
     end if
 
-    printlog " Close active document"
-    Call hCloseDocument
+    PrintLog "Close active documents"
+    Do Until GetDocumentCount = 0
+        Call hCloseDocument
+    Loop
     gApplication = "WRITER"
 endcase
 
 ' -------------------------------------------
 
 testcase tMasterDocToolsHyphenation
-
     Dim sTestFile as string
     Dim LingFile as string
 
     gApplication = "MASTERDOCUMENT"
-    
     PrintLog "- Tools / Hyphenation"
-    
+
     ' As long as OOo has no modules for that, disabled
     if ( gOOO ) then
         printlog "No hyphenation in OOo"
@@ -1240,9 +1236,8 @@ testcase tMasterDocToolsHyphenation
         sTestFile = gTesttoolpath + "writer\required\input\linguistik\0" + trim$(str$(iSprache)) + ".odt"
         LingFile = str$(iSprache) + "-hyph.dat"
     end select
-    
-    sTestFile = convertpath( sTestFile )
 
+    sTestFile = convertpath( sTestFile )
     if ( not hFileExists( sTestFile ) )then
         Warnlog "No defined Errortext for language: " + isprache + "! Exit!"
         goto endsub
@@ -1255,14 +1250,13 @@ testcase tMasterDocToolsHyphenation
         Call hNewDocument
         printlog " Open new document"
         hUseAsyncSlot( "EditPaste" )
-    endif
+    end if
 
     Call sMakeReadOnlyDocumentEditable
     printlog " Insert file 'writer\required\input\linguistik\0 + [OfficeLanguage] + '.odt'"
     Sleep 1
     Call wTypeKeys ("<Mod1 Home>")
 
-    
     printlog " Tools / Hyphenate"
     hUseAsyncSlot( "ToolsLanguageHyphenate" )
     
@@ -1304,7 +1298,7 @@ testcase tMasterDocToolsHyphenation
                 hUseAsyncSlot( "ToolsLanguageHyphenate" )
             end if
         end if
-    endif
+    end if
 
     Kontext "Silbentrennung"
     printlog " Close upcoming 'Hyphenation' dialog"
@@ -1324,6 +1318,7 @@ testcase tMasterDocToolsHyphenation
 
     printlog " Close active documents"
     hFileCloseAll()
-    
     gApplication = "WRITER"
 endcase
+
+' -------------------------------------------


More information about the ooo-build-commit mailing list