[Libreoffice-commits] core.git: 23 commits - ct2n/Zip_ct2n.mk extensions/StaticLibrary_plugcon.mk filter/Configuration_filter.mk filter/source mysqlcppconn/Library_mysqlcppconn.mk odk/Executable_unoapploader.mk odk/Zip_odkexamples.mk postprocess/CustomTarget_config.mk scp2/InstallModule_ooo.mk sdext/Package_pdfimport_xpdfimport.mk sd/source sfx2/source smoketest/data smoketest/Zip_smoketestdoc.mk solenv/gbuild svtools/inc svtools/Package_inc.mk svtools/source svx/source vcl/inc vcl/Package_inc.mk vcl/source vcl/StaticLibrary_headless.mk

David Tardon dtardon at redhat.com
Sun Mar 3 00:28:57 PST 2013


 ct2n/Zip_ct2n.mk                                |    2 
 extensions/StaticLibrary_plugcon.mk             |    2 
 filter/Configuration_filter.mk                  |    1 
 filter/source/graphicfilter/egif/egif.cxx       |    2 
 filter/source/graphicfilter/eos2met/eos2met.cxx |    2 
 filter/source/graphicfilter/epbm/epbm.cxx       |    2 
 filter/source/graphicfilter/epgm/epgm.cxx       |    2 
 filter/source/graphicfilter/epict/epict.cxx     |    2 
 filter/source/graphicfilter/eppm/eppm.cxx       |    2 
 filter/source/graphicfilter/eps/eps.cxx         |    2 
 filter/source/graphicfilter/eras/eras.cxx       |    2 
 filter/source/graphicfilter/etiff/etiff.cxx     |    2 
 filter/source/graphicfilter/expm/expm.cxx       |    2 
 filter/source/graphicfilter/ipcd/ipcd.cxx       |    2 
 filter/source/msfilter/eschesdo.cxx             |    2 
 mysqlcppconn/Library_mysqlcppconn.mk            |    5 
 odk/Executable_unoapploader.mk                  |    4 
 odk/Zip_odkexamples.mk                          |    2 
 postprocess/CustomTarget_config.mk              |    4 
 scp2/InstallModule_ooo.mk                       |    2 
 sd/source/filter/eppt/eppt.cxx                  |    2 
 sd/source/filter/eppt/epptso.cxx                |    2 
 sd/source/filter/eppt/pptx-epptbase.cxx         |    2 
 sdext/Package_pdfimport_xpdfimport.mk           |    4 
 sfx2/source/doc/guisaveas.cxx                   |    1 
 smoketest/Zip_smoketestdoc.mk                   |   38 -
 smoketest/data/Basic/Standard/Events.xml        |   57 +
 smoketest/data/Basic/Standard/Global.xml        |  825 ++++++++++++++++++++++++
 smoketest/data/Basic/Standard/Test_10er.xml     |  711 ++++++++++++++++++++
 smoketest/data/Basic/Standard/Test_DB.xml       |  138 ++++
 smoketest/data/Basic/Standard/Test_Ext.xml      |  108 +++
 smoketest/data/Basic/Standard/script-lb.xml     |   26 
 smoketest/data/Basic/script-lc.xml              |   22 
 smoketest/data/Dialogs/Standard/OptionsDlg.xml  |   55 +
 smoketest/data/Dialogs/Standard/dialog-lb.xml   |   22 
 smoketest/data/Dialogs/dialog-lc.xml            |   22 
 smoketest/data/Events.xml                       |   57 -
 smoketest/data/Global.xml                       |  825 ------------------------
 smoketest/data/META-INF/manifest.xml            |   40 +
 smoketest/data/OptionsDlg.xml                   |   55 -
 smoketest/data/Test_10er.xml                    |  711 --------------------
 smoketest/data/Test_DB.xml                      |  138 ----
 smoketest/data/Test_Ext.xml                     |  108 ---
 smoketest/data/dialog-lb.xml                    |   22 
 smoketest/data/dialog-lc.xml                    |   22 
 smoketest/data/manifest.xml                     |   40 -
 smoketest/data/mimetype                         |    1 
 smoketest/data/script-lb.xml                    |   26 
 smoketest/data/script-lc.xml                    |   22 
 solenv/gbuild/AllLangResTarget.mk               |    4 
 solenv/gbuild/Configuration.mk                  |    2 
 solenv/gbuild/Dictionary.mk                     |    1 
 solenv/gbuild/Executable.mk                     |    4 
 solenv/gbuild/Jar.mk                            |    1 
 solenv/gbuild/Library.mk                        |    4 
 solenv/gbuild/Module.mk                         |    4 
 solenv/gbuild/Package.mk                        |    4 
 solenv/gbuild/Pagein.mk                         |    1 
 solenv/gbuild/Postprocess.mk                    |   35 +
 solenv/gbuild/Pyuno.mk                          |    1 
 solenv/gbuild/UI.mk                             |    1 
 solenv/gbuild/ZipPackage.mk                     |    1 
 solenv/gbuild/gbuild.mk                         |    2 
 svtools/Package_inc.mk                          |    1 
 svtools/inc/svtools/fltcall.hxx                 |   68 -
 svtools/source/filter/SvFilterOptionsDialog.cxx |    2 
 svtools/source/filter/exportdialog.hxx          |    2 
 svx/source/unodraw/unoshap2.cxx                 |    2 
 svx/source/unodraw/unoshape.cxx                 |    2 
 vcl/Package_inc.mk                              |    1 
 vcl/StaticLibrary_headless.mk                   |    1 
 vcl/inc/vcl/fltcall.hxx                         |   68 +
 vcl/source/filter/graphicfilter.cxx             |    3 
 vcl/source/filter/jpeg/jpeg.hxx                 |    2 
 vcl/source/filter/wmf/emfwr.hxx                 |    2 
 vcl/source/filter/wmf/winmtf.hxx                |    2 
 vcl/source/filter/wmf/wmfwr.hxx                 |    2 
 77 files changed, 2201 insertions(+), 2170 deletions(-)

New commits:
commit d5622fa168d4b97096ec19abaa34dc7befaa89ae
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Mar 3 09:15:59 2013 +0100

    make sure .ui files are packed too
    
    Change-Id: If79dcfded502990e5c452a86ed17bd796de7f30b

diff --git a/postprocess/CustomTarget_config.mk b/postprocess/CustomTarget_config.mk
index ca64a5e..80a4158 100644
--- a/postprocess/CustomTarget_config.mk
+++ b/postprocess/CustomTarget_config.mk
@@ -21,7 +21,9 @@ $(call gb_CustomTarget_get_workdir,postprocess/config)/uiconfig_%.zip : \
 	@true
 
 $(call gb_CustomTarget_get_workdir,postprocess/config)/uiconfig.zip : \
-		$(SRCDIR)/postprocess/packconfig/packconfig.pl $(call gb_Postprocess_get_target,AllPackages)
+		$(SRCDIR)/postprocess/packconfig/packconfig.pl \
+		$(call gb_Postprocess_get_target,AllPackages) \
+		$(call gb_Postprocess_get_target,AllUIs)
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
 	cd $(SRCDIR)/postprocess/packconfig \
 	&& $(PERL) packconfig.pl -i $(OUTDIR)/xml/uiconfig -o $(dir $@)
diff --git a/solenv/gbuild/Postprocess.mk b/solenv/gbuild/Postprocess.mk
index 6dd16a9..e0c448d 100644
--- a/solenv/gbuild/Postprocess.mk
+++ b/solenv/gbuild/Postprocess.mk
@@ -28,6 +28,7 @@ $(call gb_Postprocess_Postprocess,AllLibraries,All libraries)
 $(call gb_Postprocess_Postprocess,AllModulesButInstsetNative,All modules but instset,$(WORKDIR)/Module/)
 $(call gb_Postprocess_Postprocess,AllPackages,All packages)
 $(call gb_Postprocess_Postprocess,AllResources,All resources)
+$(call gb_Postprocess_Postprocess,AllUIs,All UI files)
 
 endef
 
diff --git a/solenv/gbuild/UI.mk b/solenv/gbuild/UI.mk
index 2bd07ac..1cbb866 100644
--- a/solenv/gbuild/UI.mk
+++ b/solenv/gbuild/UI.mk
@@ -111,6 +111,7 @@ define gb_UI_UI
 $(call gb_Package_Package_internal,$(1)_ui,$(SRCDIR))
 $(call gb_UI_get_target,$(1)) :| $(dir $(call gb_UI_get_target,$(1))).dir
 $(call gb_UI_get_target,$(1)) :| $(call gb_Package_get_target,$(1)_ui)
+$(call gb_Postprocess_get_target,AllUIs) : $(call gb_UI_get_target,$(1))
 $(call gb_UI_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_ui)
 
 ifneq ($(gb_UI_LANGS),)
commit 3c82b95d92151be365f673c04c78ad1368b928d9
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Mar 3 09:11:08 2013 +0100

    use pattern rule for Postprocess
    
    Change-Id: Ib8d2ddb2efaef26a0a2aba36e9e1c67b1fb019d7

diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
index b06a8da..6bb2546 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -482,8 +482,4 @@ $(foreach lang,$(gb_AllLangResTarget_LANGS),\
 
 endef
 
-$(call gb_Postprocess_get_target,AllResources) :
-	$(call gb_Output_announce,All resources: $^,$(true),ALL)
-	$(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && touch $@)
-
 # vim: set noet sw=4: 
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 5c071a5..1560e70 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -169,8 +169,4 @@ $(call gb_Executable_get_runtime_target,$(1)) : $(2)
 
 endef
 
-$(call gb_Postprocess_get_target,AllExecutables) :
-	$(call gb_Output_announce,All executables: $^,$(true),ALL)
-	$(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && touch $@)
-
 # vim: set noet sw=4:
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 235315a..116d5c4 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -235,8 +235,4 @@ $(eval $(foreach method,\
 	$(call gb_Library__forward_to_Linktarget,$(method))\
 ))
 
-$(call gb_Postprocess_get_target,AllLibraries) :
-	$(call gb_Output_announce,All libraries: $^,$(true),ALL)
-	$(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && touch $@)
-
 # vim: set noet sw=4:
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 9f545a4..926aeae 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -291,8 +291,4 @@ endif
 $$(eval $$(gb_Extensions_final_hook))
 endef
 
-$(call gb_Postprocess_get_target,AllModulesButInstsetNative) :
-	$(call gb_Output_announce,All modules but instset: $(subst $(WORKDIR)/Module/,,$^),$(true),ALL)
-	$(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && touch $@)
-
 # vim: set noet sw=4:
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index a5e0118..6642a89 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -134,8 +134,4 @@ $(call gb_Package_get_preparation_target,$(1)) :| $(call gb_ExternalProject_get_
 
 endef
 
-$(call gb_Postprocess_get_target,AllPackages) :
-	$(call gb_Output_announce,All packages: $^,$(true),ALL)
-	$(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && touch $@)
-
 # vim: set noet sw=4:
diff --git a/solenv/gbuild/Postprocess.mk b/solenv/gbuild/Postprocess.mk
new file mode 100644
index 0000000..6dd16a9
--- /dev/null
+++ b/solenv/gbuild/Postprocess.mk
@@ -0,0 +1,34 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(dir $(call gb_Postprocess_get_target,%)).dir :
+	$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
+$(call gb_Postprocess_get_target,%) :
+	$(call gb_Output_announce,$(POSTPROCESS_INFO): $(if $(POSTPROCESS_PREFIX),$(subst $(POSTPROCESS_PREFIX),,$^),$^),$(true),ALL)
+	touch $@
+
+define gb_Postprocess_Postprocess
+$(call gb_Postprocess_get_target,$(1)) : POSTPROCESS_INFO := $(2)
+$(call gb_Postprocess_get_target,$(1)) : POSTPROCESS_PREFIX := $(3)
+
+$(call gb_Postprocess_get_target,$(1)) :| $(dir $(call gb_Postprocess_get_target,$(1))).dir
+
+endef
+
+define gb_Postprocess_make_targets
+$(call gb_Postprocess_Postprocess,AllExecutables,All executables)
+$(call gb_Postprocess_Postprocess,AllLibraries,All libraries)
+$(call gb_Postprocess_Postprocess,AllModulesButInstsetNative,All modules but instset,$(WORKDIR)/Module/)
+$(call gb_Postprocess_Postprocess,AllPackages,All packages)
+$(call gb_Postprocess_Postprocess,AllResources,All resources)
+
+endef
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index b653254..f9ce8d6 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -344,9 +344,11 @@ include $(foreach class, \
 	InstallModule \
 	InstallScript \
 	AutoInstallLibs \
+	Postprocess \
 ,$(GBUILDDIR)/$(class).mk)
 
 $(eval $(call gb_Helper_process_executable_registrations))
+$(eval $(call gb_Postprocess_make_targets))
 
 # optional extensions that should never be essential
 ifneq ($(wildcard $(GBUILDDIR)/extensions/post_*.mk),)
commit 66298dbfa765bded7c0ffb5097fbf4cde1f35b8d
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Mar 3 08:27:08 2013 +0100

    fix typo
    
    Change-Id: I1c92bbb3cc01655e38b0059df57650c517176939

diff --git a/scp2/InstallModule_ooo.mk b/scp2/InstallModule_ooo.mk
index c1915b6..0d3aa52 100644
--- a/scp2/InstallModule_ooo.mk
+++ b/scp2/InstallModule_ooo.mk
@@ -27,7 +27,7 @@
 
 $(eval $(call gb_InstallModule_InstallModule,scp2/ooo))
 
-$(eval $(call gb_InstallModule_use_auto_install_libs,scp2/ooo,ooolibs))
+$(eval $(call gb_InstallModule_use_auto_install_libs,scp2/ooo,ooo))
 
 $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
 	DISABLE_ATL \
commit c25c54c6c953ae4785bcd9705919601154b59038
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Mar 3 08:23:07 2013 +0100

    fix copypasta
    
    Change-Id: Id27da44a5645f584922951391bf61ed6368e70b6

diff --git a/sdext/Package_pdfimport_xpdfimport.mk b/sdext/Package_pdfimport_xpdfimport.mk
index b8dabd8..02af5a5 100644
--- a/sdext/Package_pdfimport_xpdfimport.mk
+++ b/sdext/Package_pdfimport_xpdfimport.mk
@@ -7,8 +7,8 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_Package_Package,pdfimport_xcu,$(SRCDIR)/sdext))
+$(eval $(call gb_Package_Package,sdext_pdfimport_pdf,$(SRCDIR)/sdext))
 
-$(eval $(call gb_Package_add_file,pdfimport_xcu,bin/xpdfimport_err.pdf,source/pdfimport/dialogs/xpdfimport_err.pdf))
+$(eval $(call gb_Package_add_file,sdext_pdfimport_pdf,bin/xpdfimport_err.pdf,source/pdfimport/dialogs/xpdfimport_err.pdf))
 
 # vim: set noet sw=4 ts=4:
commit 2ee307d2300f5d5b3d56dec579b1c6fda97e60d4
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Mar 3 08:18:28 2013 +0100

    do not copy files around needlessly
    
    Change-Id: I681500bb01e13155b355c8a45b41f73e8b9faf26

diff --git a/smoketest/Zip_smoketestdoc.mk b/smoketest/Zip_smoketestdoc.mk
index a88a1c8..d39e9f1 100644
--- a/smoketest/Zip_smoketestdoc.mk
+++ b/smoketest/Zip_smoketestdoc.mk
@@ -27,34 +27,30 @@
 
 SMOKETESTDOC_DIR:=$(SRCDIR)/smoketest/data
 
-$(eval $(call gb_Zip_Zip,smoketestdoc,$(WORKDIR)/Zip/smoketestdoc))
+$(eval $(call gb_Zip_Zip,smoketestdoc,$(SRCDIR)/smoketest/data))
 
 $(eval $(call gb_Zip_add_commandoptions,smoketestdoc,-D))
 
 $(eval $(call gb_Zip_add_file,smoketestdoc,mimetype))
 
-$(eval $(call gb_Zip_add_file,smoketestdoc,content.xml,$(SMOKETESTDOC_DIR)/content.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,meta.xml,$(SMOKETESTDOC_DIR)/meta.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,settings.xml,$(SMOKETESTDOC_DIR)/settings.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,styles.xml,$(SMOKETESTDOC_DIR)/styles.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,content.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,meta.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,settings.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,styles.xml))
 
-$(eval $(call gb_Zip_add_file,smoketestdoc,META-INF/manifest.xml,$(SMOKETESTDOC_DIR)/manifest.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,META-INF/manifest.xml))
 
-$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/script-lc.xml,$(SMOKETESTDOC_DIR)/script-lc.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/script-lb.xml,$(SMOKETESTDOC_DIR)/script-lb.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/Events.xml,$(SMOKETESTDOC_DIR)/Events.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/Global.xml,$(SMOKETESTDOC_DIR)/Global.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/Test_10er.xml,$(SMOKETESTDOC_DIR)/Test_10er.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/Test_DB.xml,$(SMOKETESTDOC_DIR)/Test_DB.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/Test_Ext.xml,$(SMOKETESTDOC_DIR)/Test_Ext.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/script-lc.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/script-lb.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/Events.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/Global.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/Test_10er.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/Test_DB.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Basic/Standard/Test_Ext.xml))
 
-$(eval $(call gb_Zip_add_file,smoketestdoc,Dialogs/dialog-lc.xml,$(SMOKETESTDOC_DIR)/dialog-lc.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,Dialogs/Standard/dialog-lb.xml,$(SMOKETESTDOC_DIR)/dialog-lb.xml))
-$(eval $(call gb_Zip_add_file,smoketestdoc,Dialogs/Standard/OptionsDlg.xml,$(SMOKETESTDOC_DIR)/OptionsDlg.xml))
-
-$(WORKDIR)/Zip/smoketestdoc/mimetype :
-	mkdir -p $(dir $@)
-	printf application/vnd.sun.xml.writer > $@
+$(eval $(call gb_Zip_add_file,smoketestdoc,Dialogs/dialog-lc.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Dialogs/Standard/dialog-lb.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Dialogs/Standard/OptionsDlg.xml))
 
 $(call gb_Zip_get_final_target,smoketestdoc) : $(OUTDIR)/bin/smoketestdoc.sxw
 $(call gb_Zip_get_clean_target,smoketestdoc) : Clean_smoketestdoc_sxw
diff --git a/smoketest/data/Basic/Standard/Events.xml b/smoketest/data/Basic/Standard/Events.xml
new file mode 100644
index 0000000..127af2f
--- /dev/null
+++ b/smoketest/data/Basic/Standard/Events.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Events" script:language="StarBasic">REM  *****  BASIC  *****
+
+Global s_CloseListenerCalled As Boolean
+
+Sub PressCancel
+    gDlgState = cDlgCancel
+end Sub
+
+Sub PressOk
+    gDlgState = cDlgOk
+end Sub
+
+Sub PressTest
+    gOptionsDialog.EndExecute()
+    gDlgState = cDlgStartTest
+end Sub
+
+Sub closeListener_queryClosing
+  ' not interested in
+  closeListener_queryClosing = TRUE
+End Sub
+
+Sub closeListener_notifyClosing
+  s_CloseListenerCalled = TRUE
+End Sub
+
+Sub closeListener_disposing
+  ' not interested in
+End Sub
+
+Sub ResetCloseListenerFlag
+  s_CloseListenerCalled = FALSE
+End Sub
+
+Function HasCloseListenerBeenCalled As Boolean
+  HasCloseListenerBeenCalled = s_CloseListenerCalled
+End Function
+</script:module>
diff --git a/smoketest/data/Basic/Standard/Global.xml b/smoketest/data/Basic/Standard/Global.xml
new file mode 100644
index 0000000..64e6a3d
--- /dev/null
+++ b/smoketest/data/Basic/Standard/Global.xml
@@ -0,0 +1,825 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Global" script:language="StarBasic">REM  *****  BASIC  *****
+
+const cMaxErrorStates = 14
+
+const cCoGreen = 4057917, cCoRed = 16711680, cCoGrey = 12632256
+const cParagraphBreak = 0
+
+global const cExtensionFileName = "TestExtension.oxt"
+
+global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocClose = 3, cDocMacros = 4
+global const cDBService = 0, cDBOpen = 1, cDBInsert = 2, cDBDelete = 3, cDBSeek = 4, cDBClose = 5
+global const cEXTService = 0, cEXTInstall = 1, cEXTUninstall = 2
+global const cTestClosureSetupDoc = 0, cTestClosureWriteStatus = 1
+global const cLogfileFailed = 255
+
+global const cStWriter = 0, cStCalc = 1, cStPraesentation = 2, cStZeichnen = 3
+global const cStHTML = 6, cStChart = 4, cStJava = 7
+global const cStMath = 5, cStDataBase = 9
+global const cStExtension = 11
+global const cStTestGlue = 12
+global const cStNone = -1
+
+global const cFlt8 = 0, cFltNewDoc = 64, cFltXML = 128
+
+global const frmWriter = 1, frmCalc = 2, frmImpress = 4
+global const frmMath = 5, frmChart = 7, frmHyperText = 8, frmDraw = 9
+global const frmDataBase = 10, frmJava = 13
+global const frmExtension = 14
+global const frmTestClosure = 15
+
+Global gCurrentDocTest As Integer
+Global gCurrentTestCase As Integer
+
+global const cLogUnknown = 0, cLogFalse = 1, cLogTrue = 2
+
+'UserFieldKennungen
+Global const cYes = "y", cNo = "n"
+Global const cStateNo = 0, cStateYes = 1
+
+'Feldtypen
+Global const cFtExtUser = 21, cFtPageNum = 5, cFtStatistic = 8, cFtDateTime = 27, cFtDatabase = 31
+
+'UnoStrings
+Global const cUnoSeparator = "."
+Global const cUnoPrefix = "com.sun.star."
+Global const cUnoUserField = cUnoPrefix + "text.FieldMaster.User"
+Global const cUnoExtUserField = cUnoPrefix + "text.TextField.ExtendedUser"
+Global const cUnoMasterDataBase = cUnoPrefix + "text.FieldMaster.Database"
+Global const cUnoDataBase = cUnoPrefix + "text.TextField.Database"
+Global const cUnoDateTime = cUnoPrefix + "text.TextField.DateTime"
+Global const cUnoTextGraphi2 = cUnoPrefix + "text.Graphic"
+Global const cUnoJavaLoader = cUnoPrefix + "loader.Java"
+Global const cUnoDatabaseContext = cUnoPrefix + "sdb.DatabaseContext"
+Global const cUnoRowSet = cUnoPrefix + "sdb.RowSet"
+Global const cUnoSmoketestTestExtension = cUnoPrefix + "comp.smoketest.TestExtension"
+Global const cUnoSmoketestCommandEnvironment = cUnoPrefix + "deployment.test.SmoketestCommandEnvironment"
+Global const cExtensionManager = cUnoPrefix + "deployment.ExtensionManager"
+
+'UserFieldNames
+Global const cUserFieldTestWriter = "Writer", cUserFieldTestCalc = "Calc", cUserFieldTestImpress = "Impress"
+Global const cUserFieldTestDraw = "Draw", cUserFieldTestMath = "Math", cUserFieldTestChart = "Chart"
+Global const cUserFieldTestHTML = "HTML", cUserFieldTestJava = "Java", cUserFieldTestDatabase = "Database"
+Global const cUserFieldTestExtension = "Extension"
+Global const cUserFieldTestOpenSaveXML = "SaveOpenXML"
+Global const cUserFieldTestTerminateAfterTest = "Terminate", cUserFieldTestOpenSave8 = "SaveOpen8", cUserFieldTestMacros = "Macros"
+
+Global const cOptionsDialogName = "OptionsDlg", cTest10Modul = "Standard"
+
+Global const cDlgCancel = 1, cDlgOk = 0, cDlgStartTest = 2
+
+global gErrorState (cMaxErrorStates, 5) as integer
+Global gTestCaseAnnotations( cMaxErrorStates, 5 ) As String
+
+global gOutputDoc as Object
+global gOutputDocNotUno as Object
+global gOptionsDialog as Object
+
+Global bMakeWriterTest as boolean, bMakeCalcTest as  boolean, bMakeImpressTest as boolean
+Global bMakeDrawTest as Boolean, bMakeMathTest as boolean, bMakeChartTest as boolean
+Global bMakeHTMLTest as boolean, bMakeJavaTest as boolean, bMakeDBTest as boolean
+Global bMakeExtensionTest as boolean
+Global bMakeSaveOpenXMLTest as boolean
+Global bMakeTerminateAfterTest as boolean, bShowTable as boolean
+Global bMakeSaveOpen8Test as boolean, bMakeMacrosTest as boolean
+
+global sExtensionURL as string
+
+Dim gDlgState as Integer
+
+Sub SetGlobalDoc
+    gOutputDoc = ThisComponent
+end Sub
+
+Sub ClearStatus
+    for j% = 0 to cMaxErrorStates
+        for i% = 0 to 5
+            gErrorState (j%, i%) = cLogUnknown
+            gTestCaseAnnotations( J%, i% ) = ""
+        next i%
+    next j%
+end Sub
+
+Sub ClearAllText
+    call SetGlobalDoc
+    call ClearDoc (gOutputDoc)
+    call ClearStatus
+end Sub
+
+Sub AssertionHandler( sMessage as String )
+    LogTestResult( "assertion caught: " + sMessage, FALSE )
+End Sub
+
+Sub Main
+    On Local Error Goto MainError
+
+    gCurrentDocTest = frmTestClosure
+    gCurrentTestCase = cLogfileFailed
+
+    DeleteAllSavedFiles()
+    DeleteAllLogFiles()
+    SetupWorkPath()
+
+    if GetSystem (sWorkPath) = "windows" then
+        sWorkPath = ConvertPathToWin (sWorkPath)
+    end if
+
+    LocalTestLog% = OpenLogDat( GetLogFileName( gCurrentDocTest ) )
+
+    gCurrentTestCase = cTestClosureSetupDoc
+    CaptureAssertions( "AssertionHandler" )
+
+    call SetGlobalDoc
+
+    Dim bWasModified as Boolean
+    bWasModified = gOutputDoc.isModified()
+
+    if bShowTable then
+        call ClearDoc (gOutputDoc)
+    end If
+
+    call ClearStatus
+
+    LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+
+    Dim nPreserveFileHandle%
+    nPreserveFileHandle% = LocalTestLog%
+    Call Test_10er.Main
+    LocalTestLog% = nPreserveFileHandle%
+
+    gCurrentDocTest = frmTestClosure
+    gCurrentTestCase = cTestClosureWriteStatus
+    if bShowTable then
+        call CreateStatusTable2
+        call CreateStatusTable
+        call CreateDocState
+        LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+            ' do this LogTestResult call before CreateSecondState, since the latter accesses (and displays) the result
+        call CreateSecondState
+        gOutputDoc.CurrentController.ViewCursor.JumpToFirstPage
+    Else
+        LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+    End If
+
+    ' print the 'test complete' marker
+    Print #LocalTestLog%, "---"
+    LocalTestLog% = 0
+
+    gOutputDoc.setModified( bWasModified )
+
+    CaptureAssertions( "" )
+    Exit Sub
+
+MainError:
+    If ( gCurrentTestCase = cLogfileFailed ) then
+        LogTestResult( "", False )
+        Exit Sub
+    else
+        LogTestResult( "testclosure " + GetTestGlueDescription( gCurrentTestCase ), FALSE )
+        Close #LocalTestLog%
+        LocalTestLog = 0
+    End If
+End Sub
+
+Function GetTestGlueDescription( nTestCase as Integer )
+    Select Case ( nTestCase )
+        case cTestClosureSetupDoc
+            GetTestGlueDescription = "setup"
+        case cTestClosureWriteStatus
+            GetTestGlueDescription = "write_status"
+        case Else
+            GetTestGlueDescription = ""
+    End Select
+End Function
+
+Sub CreateStatusTable
+    dim tableHeaders(7) as string
+    tableHeaders(cStWriter) = "Writer"
+    tableHeaders(cStCalc) = "Calc"
+    tableHeaders(cStPraesentation) = "Präsen- tation"
+    tableHeaders(cStZeichnen) = "Zeichn."
+    tableHeaders(cStChart) = "Diagr."
+    tableHeaders(cStMath) = "Math"
+    tableHeaders(cStHTML) = "HTML"
+    tableHeaders(cStJava) = "Java"
+
+    dim tableRows(4) as string
+    tableRows(cDocNew) = "new"
+    tableRows(cDocSaveOpen8) = "V8.0"
+    tableRows(cDocSaveOpenXML) = "XML"
+    tableRows(cDocClose) = "close"
+    tableRows(cDocMacros) = "macros"
+
+    aDoc = gOutputDoc
+
+    xText = aDoc.Text
+    xCursor = xText.createTextCursor()
+
+    xCursor.gotoStart(FALSE)
+    xCursor.GoRight (4, False)
+    SetParagraphBreak (xCursor)
+    xCursor.GoRight (1, False)
+    SetParagraphBreak (xCursor)
+    xCursor.GoRight (1, False)
+
+    table = aDoc.createInstance("com.sun.star.text.TextTable")
+    table.initialize(7,9)
+    table.Name = "StTab1"
+  table.BackColor = cCoGrey
+    xText.insertTextContent(xCursor, table, FALSE)
+
+    for i% = 0 to 7
+        tableCell = table.getCellByPosition( i% + 1, 0 )
+        tableCell.String = tableHeaders( i% )
+    next i%
+
+    for i% = LBound( tableRows ) to UBound( tableRows )
+        tableCell = table.getCellByPosition( 0, i% + 1 )
+      tableCell.String=tableRows(i%)
+    next i%
+end Sub
+
+Sub CreateStatusTable2
+    dim tableHeaders(4) as string
+    tableHeaders(0) = "Database"
+    tableHeaders(1) = ""
+    tableHeaders(2) = "Extension"
+    tableHeaders(3) = ""
+    tableHeaders(4) = "Other"
+
+    dim tableRows(5) as string
+    tableRows(cDBService ) = "services"
+    tableRows(cDBOpen ) = "open"
+    tableRows(cDBInsert ) = "insert"
+    tableRows(cDBDelete  ) = "delete"
+    tableRows(cDBSeek ) = "seek"
+    tableRows(cDBClose ) = "close"
+
+    dim tableRows2(2) as string
+    tableRows2(cEXTService ) = "services"
+    tableRows2(cEXTInstall ) = "install"
+    tableRows2(cEXTUninstall ) = "uninstall"
+
+    dim tableRows3(1) as string
+    tableRows3(cTestClosureSetupDoc ) = "setup test"
+    tableRows3(cTestClosureWriteStatus ) = "write test result"
+
+    aDoc = gOutputDoc
+
+    xText = aDoc.Text
+    xCursor = xText.createTextCursor()
+
+    xCursor.gotoStart(FALSE)
+    xCursor.GoRight (4, False)
+    SetParagraphBreak (xCursor)
+    SetParagraphBreak (xCursor)
+    xCursor.gotoEnd(FALSE)
+
+    table = aDoc.createInstance("com.sun.star.text.TextTable")
+    table.initialize(7,6)
+    table.Name = "StTab2"
+    table.BackColor = cCoGrey
+
+    xText.insertTextContent(xCursor, table, FALSE)
+
+    for i% = LBound( tableHeaders ) to UBound( tableHeaders )
+        tableCell = table.getCellByPosition( i% + 1, 0 )
+        tableCell.String = tableHeaders(i%)
+    next i%
+
+    for i% = LBound( tableRows ) to UBound( tableRows )
+        tableCell = table.getCellByPosition( 0, i% + 1 )
+      tableCell.String=tableRows(i%)
+    next i%
+
+    for i% = LBound( tableRows2 ) to UBound( tableRows2 )
+        tableCell = table.getCellByPosition( 2, i% + 1 )
+      tableCell.String=tableRows2(i%)
+    next i%
+
+    for i% = LBound( tableRows3 ) to UBound( tableRows3 )
+        tableCell = table.getCellByPosition( 4, i% + 1 )
+      tableCell.String=tableRows3(i%)
+    next i%
+end Sub
+
+
+Sub CreateDocState
+    aDoc = gOutputDoc
+    table = aDoc.TextTables.GetByIndex (1)
+
+    for j% = 0 to 7
+        for i% = 0 to 5
+            sRangeName = GetRangeName(j%, i%+1)
+
+            tableCursor = table.createCursorByCellName(sRangeName)
+
+            cName = tableCursor.getRangeName()
+            xCell = table.getCellByName(cName)
+
+            xCell.BackTransparent = False
+
+            If gErrorState (j%, i%) = cLogTrue Then
+                xCell.BackColor = cCoGreen
+            else
+                If gErrorState (j%, i%) = cLogFalse Then
+                    xCell.BackColor = cCoRed
+                    If ( gTestCaseAnnotations( j%, i% ) <> "" ) Then
+                        Dim annotation as Object
+                        annotation = aDoc.createInstance( "com.sun.star.text.TextField.Annotation" )
+                        annotation.Author = "smoketest"
+                        annotation.Content = gTestCaseAnnotations( j%, i% )
+                        xCell.insertTextContent( xCell, annotation, false )
+                    End If
+                else
+                    xCell.BackColor = cCoGrey
+                end If
+            end If
+        next i%
+    next j%
+end Sub
+
+Sub CreateSecondState
+    aDoc = gOutputDoc
+    table = aDoc.TextTables.GetByIndex (0)
+
+    Dim stateIndex(2) as Integer
+    stateIndex(0) = cStDataBase
+    stateIndex(1) = cStExtension
+    stateIndex(2) = cStTestGlue
+
+    Dim j as Integer
+    For j = LBound( stateIndex ) To UBound( stateIndex )
+        for i% = 1 to 6
+            tableCell = table.getCellByPosition( 2 * j + 1, i% )
+            tableCell.BackTransparent = False
+
+            if gErrorState( stateIndex(j), i% - 1 ) = cLogTrue then
+                tableCell.BackColor = cCoGreen
+            else
+                if gErrorState ( stateIndex(j), i% - 1 ) = cLogFalse then
+                    tableCell.BackColor = cCoRed
+                    If ( gTestCaseAnnotations( stateIndex(j), i% - 1 ) <> "" ) Then
+                        Dim annotation as Object
+                        annotation = aDoc.createInstance( "com.sun.star.text.TextField.Annotation" )
+                        annotation.Author = "smoketest"
+                        annotation.Content = gTestCaseAnnotations( stateIndex(j), i% - 1 )
+                        tableCell.insertTextContent( tableCell, annotation, false )
+                    End If
+                else
+                    tableCell.BackColor = cCoGrey
+                end If
+              end If
+        next i%
+    next j%
+end Sub
+
+Function GetRangeName (nColumn as integer, nRow as integer) as string
+    GetRangeName = chr (nColumn+66) + Trim(Str(nRow+1))
+end Function
+
+Sub LogTestResult( sTestCaseDescription as String, bSuccess as Boolean )
+    If ( gCurrentTestCase = cLogfileFailed ) Then
+        Dim sAnnotation as String
+        sAnnotation = "creating logfile '" + GetLogFileName( gCurrentDocTest ) + "' failed"
+        LogState( FALSE, sAnnotation, GlobalTestLog )
+        RecordTestCaseStatus( 0, FALSE, sAnnotation )
+    Else
+        bSuccess = RecordTestCaseStatus( gCurrentTestCase, bSuccess, sTestCaseDescription )
+        If ( LocalTestLog <> 0 ) Then
+            LogState( bSuccess, sTestCaseDescription, LocalTestLog )
+        EndIf
+        if ( GlobalTestLog <> 0 ) Then
+            LogState( bSuccess, sTestCaseDescription, GlobalTestLog )
+        EndIf
+    End If
+End Sub
+
+Function RecordTestCaseStatus( nAction as Integer, bState as Boolean, sFailureAnnotation as String ) as Boolean
+    Dim nStatusType as Integer
+    Dim nState as integer
+    nStatusType = GetStatusType( gCurrentDocTest )
+    If nStatusType = cStNone then Exit Function
+
+  If ( gErrorState( nStatusType, nAction ) = cLogFalse ) Then
+    ' don't overwrite a previous "failed" state for this test
+    bState = FALSE
+  End If
+
+    if bState then
+        nState = cLogTrue
+    else
+        nState = cLogFalse
+    end If
+
+    gErrorState (nStatusType, nAction) = nState
+
+    If ( nState = cLogFalse ) And ( sFailureAnnotation <> "" ) Then
+        if gTestCaseAnnotations(nStatusType, nAction) <> "" then
+            gTestCaseAnnotations(nStatusType, nAction) = _
+                gTestCaseAnnotations(nStatusType, nAction) & "; "
+        end if
+        gTestCaseAnnotations( nStatusType, nAction ) = gTestCaseAnnotations( nStatusType, nAction ) + sFailureAnnotation
+    End If
+
+    RecordTestCaseStatus = bState
+End Function
+
+Function GetStatusType (nDocType as Integer) as Integer
+    Select Case ( nDocType )
+        case frmWriter
+            GetStatusType = cStWriter ' text document
+        case frmCalc
+            GetStatusType = cStCalc ' spreadsheet document
+        case frmImpress
+            GetStatusType = cStPraesentation ' presentation
+        case frmDraw
+            GetStatusType = cStZeichnen ' drawing
+        case frmMath
+            GetStatusType = cStMath ' formula
+        case frmHyperText
+            GetStatusType = cStHTML ' HTML document
+        case frmChart
+            GetStatusType = cStChart ' chart
+        case frmJava
+            GetStatusType = cStJava 'Java
+        case frmTestClosure
+            GetStatusType = cStTestGlue ' test framework
+        case frmDataBase
+            GetStatusType = cStDataBase 'DataBase
+        case frmExtension
+            GetStatusType = cStExtension 'Extension
+        case else
+            GetStatusType = cStNone
+    end Select
+end Function
+
+Sub SetParagraphBreak (aCursor as Object)
+    aCursor.Text.InsertControlCharacter (aCursor, cParagraphBreak, True)
+end Sub
+
+Sub ClearDoc (aDoc as Object)
+    Dim aText as Object
+    Dim i%
+    for i%=1 to aDoc.TextTables.count
+        aDoc.TextTables.GetByIndex(0).dispose
+    next
+
+    aText = aDoc.Text.CreateTextCursor
+    aText.GotoStart (False)
+    aText.GoRight (3, False)
+    SetParagraphBreak (aText)
+    aText.GotoEnd (True)
+    aText.String=""
+end Sub
+
+Sub ClearDocFull (aDoc as Object)
+    Dim aText as Object
+    Dim i%
+    for i%=1 to aDoc.TextTables.count
+        aDoc.TextTables.GetByIndex(0).dispose
+    next
+
+    aText = aDoc.Text.CreateTextCursor
+    aText.GotoStart (False)
+    aText.GotoEnd (True)
+    aText.String=""
+end Sub
+
+Sub SetGlobalOptionsDialog ()
+
+    Dim oLibContainer As Object, oLib As Object
+    Dim oInputStreamProvider As Object
+    Dim oDialog As Object
+
+    Const sLibName = cTest10Modul
+    Const sDialogName = cOptionsDialogName
+
+    REM get library and input stream provider
+    oLibContainer = DialogLibraries
+
+    REM load the library
+    oLibContainer.loadLibrary( sLibName )
+
+    oLib = oLibContainer.getByName( sLibName )
+    oInputStreamProvider = oLib.getByName( sDialogName )
+
+    REM create dialog control
+    gOptionsDialog = CreateUnoDialog( oInputStreamProvider )
+
+end Sub
+
+Sub ShowOptionsDlg
+
+    call SetGlobalDoc
+    call SetGlobalOptionsDialog
+    call GetOptions
+
+    REM show the dialog
+    gOptionsDialog.execute()
+
+       ' jetzt läuft der Dialog, bis ein Button gedrückt wird
+
+       Select Case (gDlgState)
+           case cDlgOk
+               call SetOptions ()
+           case cDlgStartTest
+               call SetOptions ()
+               call StartTestByOptions ()
+    end Select
+
+    gOptionsDialog.dispose()
+
+end Sub
+
+Sub SetOptions
+    call SetGlobalDoc
+    SetUserFieldState (cUserFieldTestWriter, -(gOptionsDialog.getControl("cbWriterTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestCalc, -(gOptionsDialog.getControl("cbCalcTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestImpress, -(gOptionsDialog.getControl("cbImpressTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestDraw, -(gOptionsDialog.getControl("cbDrawTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestHTML, -(gOptionsDialog.getControl("cbHTMLTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl("cbMathTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl("cbChartTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl("cbJavaTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl("cbDatabaseTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl("cbExtensionTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl("cbSaveOpenXMLTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl("cbSaveOpen8Test").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestMacros, -(gOptionsDialog.getControl("cbMacrosTest").getState), gOutputDoc)
+    SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl("cbTerminateAfterTest").getState), gOutputDoc)
+end Sub
+
+Sub GetOptions
+    call SetGlobalDoc
+    gOptionsDialog.getControl("cbWriterTest").setState( -( GetUserFieldState (cUserFieldTestWriter, gOutputDoc)))
+    gOptionsDialog.getControl("cbCalcTest").setState ( -( GetUserFieldState (cUserFieldTestCalc, gOutputDoc)))
+    gOptionsDialog.getControl("cbImpressTest").setState( -( GetUserFieldState (cUserFieldTestImpress, gOutputDoc)))
+    gOptionsDialog.getControl("cbDrawTest").setState( -( GetUserFieldState (cUserFieldTestDraw, gOutputDoc)))
+    gOptionsDialog.getControl("cbHTMLTest").setState( -( GetUserFieldState (cUserFieldTestHTML, gOutputDoc)))
+    gOptionsDialog.getControl("cbMathTest").setState( -( GetUserFieldState (cUserFieldTestMath, gOutputDoc)))
+    gOptionsDialog.getControl("cbChartTest").setState( -( GetUserFieldState (cUserFieldTestChart, gOutputDoc)))
+    gOptionsDialog.getControl("cbJavaTest").setState( -( GetUserFieldState (cUserFieldTestJava, gOutputDoc)))
+    gOptionsDialog.getControl("cbDatabaseTest").setState( -( GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)))
+    gOptionsDialog.getControl("cbExtensionTest").setState( -( GetUserFieldState (cUserFieldTestExtension, gOutputDoc)))
+    gOptionsDialog.getControl("cbSaveOpenXMLTest").setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)))
+    gOptionsDialog.getControl("cbSaveOpen8Test").setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)))
+    gOptionsDialog.getControl("cbMacrosTest").setState( -( GetUserFieldState (cUserFieldTestMacros, gOutputDoc)))
+    gOptionsDialog.getControl("cbTerminateAfterTest").setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)))
+End Sub
+
+Sub ReadOptions
+    call SetGlobalDoc
+    bMakeWriterTest = GetUserFieldState (cUserFieldTestWriter, gOutputDoc)
+    bMakeCalcTest = GetUserFieldState (cUserFieldTestCalc, gOutputDoc)
+    bMakeImpressTest = GetUserFieldState (cUserFieldTestImpress, gOutputDoc)
+    bMakeDrawTest = GetUserFieldState (cUserFieldTestDraw, gOutputDoc)
+    bMakeHTMLTest = GetUserFieldState (cUserFieldTestHTML, gOutputDoc)
+    bMakeMathTest = GetUserFieldState (cUserFieldTestMath, gOutputDoc)
+    bMakeChartTest = GetUserFieldState (cUserFieldTestChart, gOutputDoc)
+    bMakeJavaTest = GetUserFieldState (cUserFieldTestJava, gOutputDoc)
+    bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)
+    bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutputDoc)
+    bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)
+    bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)
+    bMakeMacrosTest = GetUserFieldState (cUserFieldTestMacros, gOutputDoc)
+    bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)
+end Sub
+
+Sub SetDefaultOptions
+    bMakeWriterTest = true
+    bMakeCalcTest = true
+    bMakeImpressTest = true
+    bMakeDrawTest = true
+    bMakeHTMLTest = true
+    bMakeMathTest = true
+    bMakeChartTest = true
+    if Environ("SOLAR_JAVA") = "" then
+        bMakeJavaTest = false
+        bMakeDBTest = false
+        bMakeExtensionTest = false
+    else
+        bMakeJavaTest = true
+        bMakeDBTest = true
+        bMakeExtensionTest = true
+    End If
+    bMakeSaveOpenXMLTest = true
+    bMakeSaveOpen8Test = true
+    bMakeMacrosTest = true
+    bMakeTerminateAfterTest = false
+end Sub
+
+Sub StartTestByOptions
+    bShowTable = true
+    call ReadOptions
+    call Main
+    if bMakeTerminateAfterTest then
+        ClearDocFull (gOutputDoc)
+        gOutputDoc.dispose
+        'StarDesktop.Terminate
+
+        'EnableReschedule( false )
+        'DispatchSlot( 5300 )
+        stop
+    End If
+end Sub
+
+Function StartTestWithDefaultOptions
+    bShowTable = false
+    call SetDefaultOptions
+    call Main
+    dim component(cMaxErrorStates) as string
+    component(cStWriter) = "Writer"
+    component(cStCalc) = "Calc"
+    component(cStPraesentation) = "Impress"
+    component(cStZeichnen) = "Draw"
+    component(cStChart) = "Chart"
+    component(cStMath) = "Math"
+    component(cStHTML) = "HTML"
+    component(cStJava) = "Java"
+    component(cStDataBase) = "Base"
+    component(cStExtension) = "Extensions"
+    dim action(4) as string
+    action(cDocNew) = "new"
+    action(cDocSaveOpen8) = "V8.0"
+    action(cDocSaveOpenXML) = "XML"
+    action(cDocClose) = "close"
+    action(cDocMacros) = "macros"
+    dim baseAction(5) as string
+    baseAction(cDBService) = "services"
+    baseAction(cDBOpen) = "open"
+    baseAction(cDBInsert) = "insert"
+    baseAction(cDBDelete) = "delete"
+    baseAction(cDBSeek) = "seek"
+    baseAction(cDBClose) = "close"
+    dim extAction(2) as string
+    extAction(cEXTService) = "services"
+    extAction(cEXTInstall) = "install"
+    extAction(cEXTUninstall) = "uninstall"
+    dim result as string
+    for i = 0 to cMaxErrorStates
+        for j = 0 to 5
+            if gErrorState(i, j) = cLogFalse then
+                result = result & " " & component(i) & ":"
+                if i = cStDataBase then
+                    result = result & baseAction(j)
+                else if i = cStExtension then
+                    result = result & extAction(j)
+                else
+                    result = result & action(j)
+                end if
+                end if
+                if gTestCaseAnnotations(i, j) <> "" then
+                    result = result & "(" & _
+                        gTestCaseAnnotations(i, j) & ")"
+                end if
+            end if
+        next j
+    next i
+    StartTestWithDefaultOptions = result
+end Function
+
+Sub DispatchSlot(SlotID as Integer)
+    Dim oArg() as new com.sun.star.beans.PropertyValue
+    Dim oUrl as new com.sun.star.util.URL
+    Dim oTrans as Object
+    Dim oDisp as Object
+
+    oTrans = createUNOService("com.sun.star.util.URLTransformer")
+    oUrl.Complete = "slot:" & CStr(SlotID)
+    oTrans.parsestrict(oUrl)
+
+    oDisp = StarDesktop.queryDispatch(oUrl, "_self", 0)
+    oDisp.dispatch(oUrl, oArg())
+End Sub
+
+Sub LoadLibrary( LibName As String )
+
+    dim args(1)
+    dim arg as new com.sun.star.beans.PropertyValue
+    arg.Name = "LibraryName"
+    arg.Value = LibName
+    args(0) = arg
+
+    dim url as new com.sun.star.util.URL
+    dim trans as object
+    trans = createUnoService("com.sun.star.util.URLTransformer" )
+    url.Complete = "slot:6517"
+    trans.parsestrict( url )
+
+    dim disp as object
+    disp = StarDesktop.currentFrame.queryDispatch( url, "", 0 )
+    disp.dispatch( url, args() )
+
+End Sub
+
+Sub ExecuteSlot( SlotNr As String, oDoc as Object )
+    dim args()
+    dim url as new com.sun.star.util.URL
+    dim trans as object
+    dim disp as object
+
+    trans = createUnoService("com.sun.star.util.URLTransformer" )
+    url.Complete = "slot:" + SlotNr
+    trans.parsestrict( url )
+
+    disp = oDoc.CurrentController.Frame.queryDispatch( url, "", 0 )
+    disp.dispatch( url, args() )
+
+End Sub
+
+Sub DelAllUserFields (aDoc as Object)
+    Dim aFieldType as Object
+    Dim aElements as Variant
+    Dim i%
+    Dim aFieldMasters, aFieldMaster as Object
+    Dim sElement$
+    aFieldMasters = aDoc.TextFieldMasters
+    aElements = aFieldMasters.ElementNames
+    for i = 0 to UBound(aElements)
+        sElement$ = aElements(i)
+        if 0 <> instr(sElement$, cUnoUserField ) then
+            aFieldMaster = aFieldMasters.GetByName(sElement$)
+            aFieldMaster.Dispose
+        endif
+    next
+end Sub
+
+Function GetUserFieldState (sName as String, aDoc as Object) as boolean
+    Dim sFieldText as String
+    Dim bState as boolean
+    sFieldText = ReadUserField (sName, aDoc)
+
+    if LCase(sFieldText) = cYes then
+        bState = true
+    else
+        bState = false
+    end IF
+
+    GetUserFieldState = bState
+end Function
+
+Sub SetUserFieldState (sName as String, nState as boolean, aDoc as Object)
+    Dim sFieldText as String
+
+    sFieldText = cNo 'default
+
+    Select case nState
+        case true
+            sFieldText = cYes
+        case false
+            sFieldText = cNo
+    end Select
+
+    WriteUserField (sFieldText, sName, aDoc)
+end Sub
+
+Function ReadUserField(sFieldName as String, aDoc as Object) as String
+    Dim aMasters as Object
+    aMasters = aDoc.TextFieldMasters
+    if aMasters.HasByName (cUnoUserField+cUnoSeparator+sFieldName) then
+        ReadUserField = aMasters.GetByName (cUnoUserField+cUnoSeparator+sFieldName).Content
+    else
+        ReadUserField = ""
+    end If
+End Function
+
+Sub WriteUserField(sValue as String, sFieldName as String, aDoc as Object, optional aCursor as Object)
+    Dim aMasters, aUserField, aTxtCursor as Object
+    aMasters = aDoc.TextFieldMasters
+    if aMasters.HasByName (cUnoUserField+cUnoSeparator+sFieldName) then
+        aUserField = aMasters.GetByName (cUnoUserField+cUnoSeparator+sFieldName)
+    else
+        aUserField = aDoc.CreateInstance (cUnoUserField)
+        aUserField.Name = sFieldName
+    end if
+    aUserField.Content = sValue
+End Sub
+
+Sub WriteExtUserField(nIndex as Integer, aCursor as Object, aDoc as Object)
+    Dim aUserField as Object
+    aUserField = aDoc.CreateInstance (cUnoExtUserField)
+    aUserField.UserDataType = nIndex
+    aCursor.Text.InsertTextContent (aCursor, aUserField, True)
+    aUserField.Fix = True
+End Sub
+</script:module>
diff --git a/smoketest/data/Basic/Standard/Test_10er.xml b/smoketest/data/Basic/Standard/Test_10er.xml
new file mode 100644
index 0000000..bd774b4
--- /dev/null
+++ b/smoketest/data/Basic/Standard/Test_10er.xml
@@ -0,0 +1,711 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Test_10er" script:language="StarBasic">REM  10er Test
+
+const sSWLogFileName = "swlog.dat", sSCLogFileName = "sclog.dat"
+const sSDLogFileName = "sdlog.dat", sSMathLogFileName = "smalog.dat"
+const sSChartLogFileName = "schlog.dat"
+const sSHptLogFileName = "shptlog.dat"
+const sSDrawLogFileName = "sdrwlog.dat", sJavaLogFileName = "javalog.dat"
+const sSDBLogFileName = "dblog.dat", sExtLogFileName = "extlog.dat"
+const sTestGlueLogFileName = "testclosure.log"
+const sLogFileName = "smoketest.log"
+const cTempFileName = "smoketest_file"
+
+const cMessageSaveOpen8Doc = "Save/Open open Documents (8.0)"
+const cMessageSaveOpenXMLDoc = "Save/Open Document XML (6/7)"
+const cMessageNewDoc = "New Document"
+const cMessageCloseDoc = "Close Document"
+const cMessageRunMacros = "Run Macros"
+
+Global sWorkPath$
+Global sWorkPathURL$
+Global LocalTestLog%
+Global GlobalTestLog%
+
+Sub Main
+    call TestAllDocs()
+end Sub
+
+Sub DeleteAllSavedFiles()
+    Dim sFileName as String
+    sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmWriter)
+    If FileExists (sFileName) then
+        Kill (sFileName)
+    End If
+    sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmCalc)
+    If FileExists (sFileName) then
+        Kill (sFileName)
+    End If
+    sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmImpress)
+    If FileExists (sFileName) then
+        Kill (sFileName)
+    End If
+    sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmDraw)
+    If FileExists (sFileName) then
+        Kill (sFileName)
+    End If
+    sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmHyperText)
+    If FileExists (sFileName) then
+        Kill (sFileName)
+    End If
+    sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmWriter or cFltXML)
+    If FileExists (sFileName) then
+        Kill (sFileName)
+    End If
+    sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmCalc or cFltXML)
+    If FileExists (sFileName) then
+        Kill (sFileName)
+    End If
+    sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmImpress or cFltXML)
+    If FileExists (sFileName) then
+        Kill (sFileName)
+    End If
+    sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmDraw or cFltXML)
+    If FileExists (sFileName) then
+        Kill (sFileName)
+    End If
+End Sub
+
+Sub DeleteAllLogFiles()
+    If FileExists (sWorkPath+sLogFileName) then
+        Kill (sWorkPath+sLogFileName)
+    End If
+    If FileExists (sWorkPath+sSWLogFileName) then
+        Kill (sWorkPath+sSWLogFileName)
+    End If
+    If FileExists (sWorkPath+sSCLogFileName) then
+        Kill (sWorkPath+sSCLogFileName)
+    End If
+    If FileExists (sWorkPath+sSDLogFileName) then
+        Kill (sWorkPath+sSDLogFileName)
+    End If
+    If FileExists (sWorkPath+sSMathLogFileName) then
+        Kill (sWorkPath+sSMathLogFileName)
+    End If
+    If FileExists (sWorkPath+sSChartLogFileName) then
+        Kill (sWorkPath+sSChartLogFileName)
+    End If
+    If FileExists (sWorkPath+sSHptLogFileName) then
+        Kill (sWorkPath+sSHptLogFileName)
+    End If
+    If FileExists (sWorkPath+sSDrawLogFileName) then
+        Kill (sWorkPath+sSDrawLogFileName)
+    End If
+    If FileExists (sWorkPath+sJavaLogFileName) then
+        Kill (sWorkPath+sJavaLogFileName)
+    End If
+    If FileExists (sWorkPath+sTestGlueLogFileName) then
+        Kill (sWorkPath+sTestGlueLogFileName)
+    End If
+    If FileExists (sWorkPath+sSDBLogFileName) then
+        Kill (sWorkPath+sSDBLogFileName)
+    End If
+    If FileExists (sWorkPath+sExtLogFileName) then
+        Kill (sWorkPath+sExtLogFileName)
+    End If
+end Sub
+
+Function OpenLogDat (sFileName as String) as Integer
+    Dim LocaleFileChannel%
+    If FileExists (sWorkPath+sFileName) then
+        Kill (sWorkPath+sFileName)
+    End If
+    LocaleFileChannel% = Freefile
+    Open sWorkPath+sFileName For Output As LocaleFileChannel%
+    OpenLogDat = LocaleFileChannel%
+end Function
+
+Sub SetupWorkPath
+    Dim configManager as Object
+    configManager = CreateUnoService( "com.sun.star.config.SpecialConfigManager" )
+
+    sWorkPath = configManager.SubstituteVariables( "$(userpath)/temp/" )
+    sWorkPathURL = configManager.SubstituteVariables( "$(userurl)/temp/" )
+End Sub
+
+Function GetSystem (sTmpWorkPath as string) as string
+    GetSystem = ""
+    if InStr (sTmpWorkPath, ":") then
+        GetSystem = "windows"
+    else
+        GetSystem = "unix"
+    End If
+end Function
+
+Function ConvertPathToWin (sTmpWorkPath as string) as string
+    for i%=1 to Len(sTmpWorkPath)
+        sTemp = Mid (sTmpWorkPath, i%, 1)
+        if sTemp = "/" then
+            sTmpWorkPath = Left (sTmpWorkPath, i%-1) + "\" + Right (sTmpWorkPath, Len(sTmpWorkPath)-i%)
+        else
+            if sTemp = "|" then
+                sTmpWorkPath = Left (sTmpWorkPath, i%-1) + ":" + Right (sTmpWorkPath, Len(sTmpWorkPath)-i%)
+            end If
+        end If
+    next i%
+    ConvertPathToWin = sTmpWorkPath
+end Function
+
+Sub TestAllDocs()
+DIM sDocURL as String, sDocPath as String
+DIM nStrPos as Long
+
+    'search ExtensionURL
+    sDocURL = gOutputDoc.URL
+    CompatibilityMode(true)
+    nStrPos = InStrRev (sDocURL, "/" )
+    CompatibilityMode(false)
+    sExtensionURL = Left (sDocURL, nStrPos)
+
+    GlobalTestLog = OpenLogDat (sLogFileName)
+    call WriteTestSequence
+    if bMakeWriterTest then
+    gCurrentDocTest = frmWriter
+        call MakeDocTest
+    end if
+    if bMakeCalcTest then
+    gCurrentDocTest = frmCalc
+        call MakeDocTest
+    end if
+    if bMakeImpressTest then
+    gCurrentDocTest = frmImpress
+        call MakeDocTest
+    end if
+    if bMakeDrawTest then
+    gCurrentDocTest = frmDraw
+        call MakeDocTest
+    end if
+    if bMakeHTMLTest then
+    gCurrentDocTest = frmHyperText
+        call MakeDocTest
+    end if
+    if bMakeChartTest then
+    gCurrentDocTest = frmChart
+        call MakeChartTest
+    end if
+    if bMakeMathTest then
+    gCurrentDocTest = frmMath
+        call MakeNewDoc
+    end if
+    if bMakeJavaTest then
+    gCurrentDocTest = frmJava
+        call TestJava
+    end if
+    if bMakeDBTest then
+    gCurrentDocTest = frmDataBase
+        call Test_DB.TestDB
+    end if
+    if bMakeExtensionTest then
+    gCurrentDocTest = frmExtension
+        call Test_Ext.TestExtensions
+    end if
+
+    Close #GlobalTestLog
+    GlobalTestLog = 0
+end Sub
+
+Sub WriteTestSequence
+    Print #GlobalTestLog, "Sequence of testing"
+
+    if bMakeWriterTest then
+        WriteTests ("writer  : ", true, GlobalTestLog)
+    end if
+    if bMakeCalcTest then
+        WriteTests ("calc    : ", true, GlobalTestLog)
+    end if
+    if bMakeImpressTest then
+        WriteTests ("impress : ", true, GlobalTestLog)
+    end if
+    if bMakeDrawTest then
+        WriteTests ("draw    : ", true, GlobalTestLog)
+    end if
+    if bMakeHTMLTest then
+        WriteTests ("HTML    : ", true, GlobalTestLog)
+    end if
+    if bMakeChartTest then
+        WriteTests ("chart   : ", false, GlobalTestLog)
+    end if
+    if bMakeMathTest then
+        WriteTests ("math    : ", false, GlobalTestLog)
+    end if
+    if bMakeJavaTest then
+        WriteTests ("Java    : ", false, GlobalTestLog)
+    end if
+    if bMakeDBTest then
+        WriteDBTests ("Database    : ", GlobalTestLog)
+    end if
+    if bMakeExtensionTest then
+        WriteExtensionTests ("Extension   : ", GlobalTestLog)
+  end if
+
+  Print #GlobalTestLog, "testclosure : setup, write_status"
+
+  Print #GlobalTestLog
+  end Sub
+
+  Sub WriteTests (sText as string, bTestAll as boolean)
+  Dim sWriteStr as string
+
+  sWriteStr = sText
+  sWriteStr = sWriteStr + "new"
+    if bTestAll then
+    if bMakeSaveOpen8Test then
+        sWriteStr = sWriteStr + ", save 8.0"
+    end if
+    if bMakeSaveOpenXMLTest then
+        sWriteStr = sWriteStr + ", save XML"
+    end if
+    if bMakeSaveOpen8Test then
+        sWriteStr = sWriteStr + ", open 8.0"
+    end if
+    if bMakeSaveOpenXMLTest then
+        sWriteStr = sWriteStr + ", open XML"
+    end if
+    if bMakeMacrosTest then
+        sWriteStr = sWriteStr + ", run macros"
+    end if
+    end if
+
+    sWriteStr = sWriteStr + ", close"
+
+    Print #GlobalTestLog, sWriteStr
+end Sub
+
+Sub WriteDBTests (sText as string, nFileChannel as integer)
+    Dim sWriteStr as string
+
+    sWriteStr = sText
+    sWriteStr = sWriteStr + "open / services"
+    sWriteStr = sWriteStr + ", insert"
+    sWriteStr = sWriteStr + ", delete"
+    sWriteStr = sWriteStr + ", seek"
+    sWriteStr = sWriteStr + ", close"
+
+    Print #nFileChannel, sWriteStr
+end Sub
+
+Sub WriteExtensionTests (sText as string, nFileChannel as integer)
+    Dim sWriteStr as string
+
+    sWriteStr = sText
+    sWriteStr = sWriteStr + "services"
+    sWriteStr = sWriteStr + ", install"
+    sWriteStr = sWriteStr + ", uninstall"
+
+    Print #nFileChannel, sWriteStr
+end Sub
+
+Sub MakeDocTest
+    Dim oDoc as Object
+    Dim sFileNameXML$, sFileName8$
+    Dim bSuccess as Boolean
+
+    On Local Error GoTo DOCTESTERROR
+    gCurrentTestCase = cLogfileFailed
+    LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+    gCurrentTestCase = cDocNew
+    oDoc = LoadDoc ("private:factory/" + GetDocFilter(gCurrentDocTest or cFltNewDoc))
+    LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ cMessageNewDoc, not IsNull (oDoc) )
+    if not IsNull (oDoc) then
+        gCurrentTestCase = cDocSaveOpen8
+        if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
+            sFileName8 = sWorkPathURL+cTempFileName+"."+GetDocEndings(gCurrentDocTest or cFlt8)
+            SaveDoc (sFileName8, oDoc, GetDocFilter(gCurrentDocTest or cFlt8))
+        end if
+        gCurrentTestCase = cDocSaveOpenXML
+        if bMakeSaveOpenXMLTest and IsFilterAvailable (gCurrentDocTest or cFltXML) then
+            sFileNameXML = sWorkPathURL+cTempFileName+"."+GetDocEndings(gCurrentDocTest or cFltXML)
+            SaveDoc (sFileNameXML, oDoc, GetDocFilter(gCurrentDocTest or cFltXML))
+        end if
+        gCurrentTestCase = cDocClose
+        bSuccess = CloseDoc( oDoc )
+        LogTestResult( GetDocFilter(gCurrentDocTest)+" "+ cMessageCloseDoc, bSuccess )
+        gCurrentTestCase = cDocSaveOpen8
+        if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
+            oDoc = LoadDoc (sFileName8)
+
+'          oDoc = Documents.open(sFileName)
+            LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ cMessageSaveOpen8Doc, not IsNull (oDoc) )
+
+            if not IsNull (oDoc) then
+                gCurrentTestCase = cDocClose
+                oDoc.close (true)
+            end If
+        end if
+
+        gCurrentTestCase = cDocSaveOpenXML
+        if bMakeSaveOpenXMLTest and IsFilterAvailable (gCurrentDocTest or cFltXML) then
+            oDoc = LoadDoc (sFileNameXML)
+
+'          oDoc = Documents.open(sFileName)
+            LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ cMessageSaveOpenXMLDoc, not IsNull (oDoc) )
+
+            if not IsNull (oDoc) then
+                gCurrentTestCase = cDocClose
+                oDoc.close (true)
+            end If
+        end if
+
+        gCurrentTestCase = cDocMacros
+	' Just one calc macro test for now
+	' To-Do split this into its own per-module/test .xml and add more
+        if bMakeMacrosTest and gCurrentDocTest = frmCalc then
+            oDoc = LoadDoc ("private:factory/" + GetDocFilter(gCurrentDocTest or cFltNewDoc))
+            oDocCtrl = oDoc.getCurrentController()
+            oDocFrame = oDocCtrl.getFrame()
+            oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
+
+            dim args(0) as new com.sun.star.beans.PropertyValue
+
+            args(0).Name = "ToPoint"
+            args(0).Value = "$A$1"
+            oDispatcher.executeDispatch(oDocFrame, ".uno:GoToCell", "", 0, args())
+            args(0).Name = "By"
+            args(0).Value = 5
+            oDispatcher.executeDispatch(oDocFrame, ".uno:GoRightSel", "", 0, args())
+            args(0).Name = "By"
+            args(0).Value = 5
+            oDispatcher.executeDispatch(oDocFrame, ".uno:GoDownSel", "", 0, args())
+
+            oRangeAddr = oDoc.getCurrentSelection().getRangeAddress()
+
+            bResult = oRangeAddr.StartColumn = 0 and oRangeAddr.EndColumn = 5 and oRangeAddr.StartRow = 0 and oRangeAddr.EndRow = 5
+
+            LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ cMessageRunMacros, bResult )
+
+            if not IsNull (oDoc) then
+                gCurrentTestCase = cDocClose
+                oDoc.close (true)
+            end If
+        end if
+
+    end If
+    Print #LocalTestLog, "---"
+    Close #LocalTestLog%
+    LocalTestLog = 0
+    Exit Sub ' Without error
+
+    DOCTESTERROR:
+    If ( gCurrentTestCase = cLogfileFailed ) then
+        LogTestResult( " ", False )
+        Exit Sub
+    else
+        LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ GetErrorMessage(gCurrentTestCase), False )
+        Close #LocalTestLog%
+        LocalTestLog = 0
+    End If
+    Exit Sub ' With error
+End Sub
+
+Sub MakeNewDoc
+    DIM oDoc as Object
+    Dim bSuccess as Boolean
+    On Local Error GoTo DOCTESTERROR2
+    gCurrentTestCase = cLogfileFailed
+    LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+    gCurrentTestCase = cDocNew
+'  oDoc = Documents.Add(GetDocFilter(gCurrentDocTest))
+    oDoc = LoadDoc ("private:factory/" + GetDocFilter(gCurrentDocTest or cFltNewDoc))
+    LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ cMessageNewDoc, not IsNull (oDoc) )
+    if not IsNull (oDoc) then
+        gCurrentTestCase = cDocClose
+        bSuccess = CloseDoc( oDoc )
+        LogTestResult( GetDocFilter(gCurrentDocTest)+" "+ cMessageCloseDoc, bSuccess )
+    end If
+    Print #LocalTestLog, "---"
+    Close #LocalTestLog%
+    LocalTestLog = 0
+    Exit Sub ' Without error
+
+    DOCTESTERROR2:
+    If ( gCurrentTestCase = cLogfileFailed ) then
+        LogTestResult( " ", False )
+        Exit Sub
+    else
+        LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ GetErrorMessage(gCurrentTestCase), False )
+        Close #LocalTestLog%
+        LocalTestLog = 0
+    End If
+    Exit Sub ' With error
+End Sub
+
+Sub MakeChartTest
+    Dim oCharts as Object
+    Dim oDoc as Object
+    Dim oRange(0) as New com.sun.star.table.CellRangeAddress
+    Dim oRect as New com.sun.star.awt.Rectangle
+    const cChartName="TestChart"
+  Dim bSuccess as Boolean
+  On Local Error GoTo CHARTTESTERROR
+  gCurrentTestCase = cLogfileFailed
+  LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+  gCurrentTestCase = cDocNew
+  oDoc = LoadDoc ("private:factory/" + GetDocFilter(frmCalc or cFltNewDoc))
+    if not IsNull (oDoc) then
+        oCharts = oDoc.sheets(0).Charts
+        oCharts.AddNewByName (cChartName, oRect, oRange(), true, true)
+        bSuccess=oCharts.HasByName(cChartName)
+        LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ cMessageNewDoc, bSuccess )
+        gCurrentTestCase = cDocClose
+        oDoc.close (true)
+    else
+        LogTestResult( GetDocFilter(frmCalc or cFltNewDoc)+" "+ cMessageNewDoc, FALSE )
+    End if
+    Print #LocalTestLog, "---"
+    Close #LocalTestLog%
+    LocalTestLog = 0
+    Exit Sub ' Without error
+
+    CHARTTESTERROR:
+    If ( gCurrentTestCase = cLogfileFailed ) then
+        LogTestResult( " ", False )
+        Exit Sub
+    else
+        LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ GetErrorMessage(gCurrentTestCase), FALSE )
+        Close #LocalTestLog%
+        LocalTestLog = 0
+    End If
+    Exit Sub ' With error
+End Sub
+
+Sub LogState (bState as Boolean, sText as String, nLocaleFileChannel as integer)
+    if bState then
+        Print #nLocaleFileChannel, sText+" -> ok"
+    else
+        Print #nLocaleFileChannel, sText+" -> error"
+    end If
+end Sub
+
+Function GetDocEndings (DocType as Integer) as String
+    Select Case ( DocType )
+        case frmWriter or cFlt8
+            GetDocEndings = "odt" ' Textdokument
+        case frmCalc or cFlt8
+            GetDocEndings = "ods" 'Tabellendokument
+        case frmImpress or cFlt8
+            GetDocEndings = "odp" 'PrÕsentation
+        case frmDraw or cFlt8
+            GetDocEndings = "odg" 'Zeichen
+        case frmHyperText, frmHyperText or cFltXML
+            GetDocEndings = "html" 'Hypertext-Dokument
+        case frmWriter or cFltXML
+            GetDocEndings = "sxw" ' Textdokument
+        case frmCalc or cFltXML
+            GetDocEndings = "sxc" 'Tabellendokument
+        case frmImpress or cFltXML
+            GetDocEndings = "sxi" 'PrÕsentation
+        case frmDraw or cFltXML
+            GetDocEndings = "sxd" 'Zeichen
+        case else
+            GetDocEndings = ""
+    end Select
+end Function
+
+Function GetDocFilter (DocType as Integer) as String
+    Select Case ( DocType )
+        case frmWriter or cFlt8
+            GetDocFilter = "writer8" ' text document
+        case frmCalc or cFlt8
+            GetDocFilter = "calc8" ' spreadsheet document
+        case frmImpress or cFlt8
+            GetDocFilter = "impress8" ' presentation
+        case frmDraw or cFlt8
+            GetDocFilter = "draw8" ' drawing
+        case frmMath or cFlt8
+            GetDocFilter = "math8" ' formula
+
+        case frmWriter or cFltXML
+            GetDocFilter = "StarOffice XML (Writer)" ' text document
+        case frmCalc or cFltXML
+            GetDocFilter = "StarOffice XML (Calc)" ' spreadsheet document
+        case frmImpress or cFltXML
+            GetDocFilter = "StarOffice XML (Impress)" ' presentation
+        case frmDraw or cFltXML
+            GetDocFilter = "StarOffice XML (Draw)" ' drawing
+        case frmMath or cFltXML
+            GetDocFilter = "StarOffice XML (Math)" ' formula
+
+        case frmHyperText, frmHyperText or cFltXML
+            GetDocFilter = "HTML" ' HTML document
+
+        case frmWriter or cFltNewDoc
+            GetDocFilter = "swriter" ' text document
+        case frmCalc or cFltNewDoc
+            GetDocFilter = "scalc" ' spreadsheet document
+        case frmImpress or cFltNewDoc
+            GetDocFilter = "simpress" ' presentation
+        case frmDraw or cFltNewDoc
+            GetDocFilter = "sdraw" ' drawing
+        case frmMath or cFltNewDoc
+            GetDocFilter = "smath" ' formula
+        case frmHyperText or cFltNewDoc
+            GetDocFilter = "swriter/web" ' HTML document
+        case frmChart or cFltNewDoc
+            GetDocFilter = "schart" ' chart
+        case else
+            GetDocFilter = ""
+    end Select
+end Function
+
+Function GetLogFileName (DocType as Integer) as String
+    Select Case ( DocType )
+        case frmWriter
+            GetLogFileName = sSWLogFileName ' text document
+        case frmCalc
+            GetLogFileName = sSCLogFileName ' spreadsheet document
+        case frmImpress
+            GetLogFileName = sSDLogFileName ' presentation
+        case frmDraw
+            GetLogFileName = sSDrawLogFileName ' drawing
+        case frmMath
+            GetLogFileName = sSMathLogFileName ' formula
+        case frmHyperText
+            GetLogFileName = sSHptLogFileName ' HTML document
+        case frmChart
+            GetLogFileName = sSChartLogFileName ' chart
+        case frmJava
+            GetLogFileName = sJavaLogFileName 'Java
+        case frmTestClosure
+            GetLogFileName = sTestGlueLogFileName ' test framework
+        case frmDataBase
+            GetLogFileName = sSDBLogFileName 'Database
+        case frmExtension
+            GetLogFileName = sExtLogFileName 'Extension
+        case else
+            GetLogFileName = ""
+    end Select
+end Function
+
+Function GetErrorMessageOnAction (nAction as Integer) as String
+    Select Case ( nAction )
+        case cDocNew
+            GetErrorMessageOnAction = cMessageNewDoc
+        case cDocSaveOpen8
+            GetErrorMessageOnAction = cMessageSaveOpen8Doc
+        case cDocSaveOpenXML
+            GetErrorMessageOnAction = cMessageSaveOpenXMLDoc
+        case cDocMacros
+            GetErrorMessageOnAction = cMessageRunMacros
+        case cDocClose
+            GetErrorMessageOnAction = cMessageCloseDoc
+        case else
+            GetErrorMessageOnAction = ""
+    end Select
+end Function
+
+Function IsFilterAvailable (FilterType as Integer) as boolean
+    IsFilterAvailable = true
+    if (FilterType = (frmHyperText or cFltXML)) then
+        IsFilterAvailable = false
+    end if
+End Function
+
+Function TestJava
+    Dim oObj as Object
+    gCurrentTestCase = cLogfileFailed
+    LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+    gCurrentTestCase = cDocNew
+    oObj = createUnoService( cUnoJavaLoader )
+    LogTestResult( "Java "+ cMessageNewDoc, not IsNull (oObj) )
+
+    Print #LocalTestLog, "---"
+    Close #LocalTestLog%
+    LocalTestLog = 0
+
+    TestJava = not IsNull (oObj)
+End Function
+
+Sub LoadLibrary( LibName as String )
+
+    dim args(1)
+    dim arg as new com.sun.star.beans.PropertyValue
+    arg.Name = "LibraryName"
+    arg.Value = LibName
+    args(0) = arg
+
+    dim url as new com.sun.star.util.URL
+    dim trans as object
+    trans = createUnoService("com.sun.star.util.URLTransformer" )
+    url.Complete = "slot:6517"
+    trans.parsestrict( url )
+
+    dim disp as object
+    disp = StarDesktop.currentFrame.queryDispatch( url, "", 0 )
+    disp.dispatch( url, args() )
+
+End Sub
+
+Sub LoadDoc (DocName as String) as Object
+    dim trans as object
+    trans = createUnoService("com.sun.star.util.URLTransformer" )
+    url = createUnoStruct("com.sun.star.util.URL" )
+    url.Complete = DocName
+    if Left(DocName, 5 ) <> "file:" then
+    trans.parsestrict( url )
+    endif
+
+    Dim aPropArray(0) as Object
+    aPropArray(0) = CreateUnoStruct("com.sun.star.beans.PropertyValue")
+    aPropArray(0).Name = "OpenFlags"
+    aPropArray(0).Value = "S"
+
+    dim doc as object
+    dim noargs()
+    doc = StarDesktop.loadComponentFromURL( url.Complete, "_blank", 0, aPropArray() ) ' XModel
+    LoadDoc = doc
+End Sub
+
+Sub SaveDoc (DocName as String, oDoc as Object, sFilterName as string )
+    dim trans as object
+    trans = createUnoService("com.sun.star.util.URLTransformer" )
+    url = createUnoStruct("com.sun.star.util.URL" )
+    url.Complete = DocName
+    if Left(DocName, 5 ) <> "file:" then
+    trans.parsestrict( url )
+    endif
+
+    if not (sFilterName = "") then
+        Dim aPropArray(0) as Object
+        aPropArray(0) = CreateUnoStruct("com.sun.star.beans.PropertyValue")
+        aPropArray(0).Name = "FilterName"
+        aPropArray(0).Value = sFilterName
+
+        oDoc.storeAsURL( url.Complete, aPropArray() )
+    else
+        MessageBox "Filtername is unknown!"
+    end if
+end Sub
+
+Function CloseDoc( oDoc as Object )
+  Dim oListener as Object
+  oListener = CreateUnoListener( "Events.closeListener_", "com.sun.star.util.XCloseListener" )
+  oDoc.addCloseListener( oListener )
+
+  Events.ResetCloseListenerFlag()
+  oDoc.close( true )
+  closeDoc = Events.HasCloseListenerBeenCalled()
+
+  if ( Not Events.HasCloseListenerBeenCalled() ) Then
+    ' do this only if closing was not successful - otherwise, we'd get a DisposedException
+    oDoc.removeCloseListener( oListener )
+  End If
+End Function
+</script:module>
diff --git a/smoketest/data/Basic/Standard/Test_DB.xml b/smoketest/data/Basic/Standard/Test_DB.xml
new file mode 100644
index 0000000..4572f3d
--- /dev/null
+++ b/smoketest/data/Basic/Standard/Test_DB.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Test_DB" script:language="StarBasic">REM  *****  Database Test  *****
+
+const cMessageDatabaseService = "Database Service"
+const cMessageDatabaseOpen = "Open Database"
+const cMessageDatabaseInsert = "Insert record into Database"
+const cMessageDatabaseDelete = "Delete record from Database"
+const cMessageDatabaseSeek = "Read other record from Database"
+const cMessageDatabaseClose = "Close Database"
+
+Sub TestDB
+
+    Dim oDBConnection as Object, oDataSource as Object, oDBContext as Object
+    Dim sDBName as String, sTable as String, sCurrentMessage as String
+    Dim nRowCount as Integer
+    Dim bResult as Boolean
+    Const sTestString = "Automatical Test"
+
+    On Local Error GoTo DBERROR
+
+    gCurrentTestCase = cLogfileFailed
+    LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+
+    gCurrentTestCase = cDBService
+    sCurrentMessage = cMessageDatabaseService + " " + cUnoDatabaseContext
+
+    oDBContext = CreateUnoService(cUnoDatabaseContext)
+    sDBName="Bibliography" 'Names of Databases
+
+    gCurrentTestCase = cDBOpen
+    sCurrentMessage = cMessageDatabaseOpen
+
+    oDataSource = oDBContext.GetByName(sDBName)
+    sTable=oDataSource.Tables.ElementNames(0)
+    oDBConnection = oDBContext.GetByName(sDBName).GetConnection("","")
+
+    LogTestResult( "Database "+ cMessageDatabaseOpen, not IsNull (oDBConnection) )
+    if (IsNull(oDBConnection)) then
+       Close #LocalTestLog%
+        LocalTestLog = 0
+        Exit Sub
+    End If
+
+    ' Database is open now
+
+    gCurrentTestCase = cDBService
+    sCurrentMessage = cMessageDatabaseService + " " + cUnoRowSet
+    oRowSet = createUnoService(cUnoRowSet)
+
+    if (IsNull(oRowSet)) then
+        LogTestResult( "Database "+ cMessageDatabaseService + " " + cUnoRowSet, not IsNull (oRowSet) )
+        Exit Sub
+    else
+        LogTestResult( "Database "+ cMessageDatabaseService, TRUE )
+    End If
+
+    gCurrentTestCase = cDBInsert
+    sCurrentMessage = cMessageDatabaseInsert
+
+    oRowSet.ActiveConnection = oDBConnection
+
+    oRowSet.CommandType = com.sun.star.sdb.CommandType.COMMAND
+    oRowSet.Command = "SELECT * FROM " + sTable
+    oRowSet.execute()
+
+    oRowSet.moveToInsertRow
+    oRowSet.updateString(5, sTestString)
+
+    oRowSet.insertRow()
+    nRowCount=oRowSet.RowCount
+
+    oRowSet.moveToCurrentRow()
+
+    bResult = (oRowSet.getString(5) = sTestString)
+    LogTestResult( "Database "+ cMessageDatabaseInsert, bResult )
+
+    'delete only if insert passed
+
+    if (bResult) Then
+        gCurrentTestCase = cDBDelete
+        sCurrentMessage = cMessageDatabaseDelete
+        oRowSet.deleteRow()
+        bResult = (nRowCount - oRowSet.RowCount = 0)
+        if ( bResult ) Then
+            oRowSet.next()
+            bResult = (nRowCount - oRowSet.RowCount = 1)
+        End If
+        LogTestResult( "Database "+ cMessageDatabaseDelete, bResult )
+    End If
+
+    ' read other record
+
+    gCurrentTestCase = cDBSeek
+    sCurrentMessage = cMessageDatabaseSeek
+    oRowSet.first()
+    bResult = not (oRowSet.getString(5) = sTestString)
+    LogTestResult( "Database "+ cMessageDatabaseSeek, bResult )
+
+    gCurrentTestCase = cDBClose
+    sCurrentMessage = cMessageDatabaseClose
+    oDBConnection.Dispose()
+    LogTestResult( "Database "+ cMessageDatabaseClose, True )
+
+    Print #LocalTestLog, "---"
+    Close #LocalTestLog%
+    LocalTestLog = 0
+    Exit Sub ' Without error
+
+    DBERROR:
+    If ( gCurrentTestCase = cLogfileFailed ) then
+        LogTestResult( " ", False )
+        Exit Sub
+    else
+        LogTestResult( "Database "+ sCurrentMessage, FALSE )
+        Close #LocalTestLog%
+        LocalTestLog = 0
+    End If
+    Exit Sub ' With error
+End Sub
+</script:module>
diff --git a/smoketest/data/Basic/Standard/Test_Ext.xml b/smoketest/data/Basic/Standard/Test_Ext.xml
new file mode 100644
index 0000000..06639d4
--- /dev/null
+++ b/smoketest/data/Basic/Standard/Test_Ext.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Test_Ext" script:language="StarBasic">REM  *****  BASIC  *****
+
+const cMessageExtensionService = "Extension Service"
+const cMessageExtensionInstall = "Install Extension"
+const cMessageExtensionUninstall = "Uninstall Extension"
+
+Sub TestExtensions
+    Dim oTestExtension as Object, obj_null as Object
+    Dim sCurrentMessage as String
+    Dim bResult as Boolean
+    Dim sImplementationNameString as String
+    sImplementationNameString = cUnoSmoketestTestExtension + "$_TestExtension"
+
+    On Local Error GoTo EXTERROR
+
+    gCurrentTestCase = cLogfileFailed
+    LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+
+    sCurrentMessage = "SmokeTestCommandEnvironment (implemented in Java)"
+    gCurrentTestCase = cEXTService
+
+    'Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for
+    'adding the extension. The implementation is in
+    'javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java and the code is in juh.jar
+    cmdEnv = createUnoService(cUnoSmoketestCommandEnvironment)
+
+    'Create the component context and then get the singleton ExtensionManager
+    'A singleton cannot be created with createUnoService
+    sCurrentMessage = cMessageExtensionService
+    ctx = getDefaultContext
+    ext_mgr = ctx.getValueByName("/singletons/" + cExtensionManager)
+
+    LogTestResult( "Extension "+ cMessageExtensionService, not IsNull (ext_mgr) )
+    if (IsNull(ext_mgr)) then
+        Close #LocalTestLog%
+        LocalTestLog = 0
+        Exit Sub
+    End If
+
+    sCurrentMessage = cMessageExtensionInstall
+    gCurrentTestCase = cEXTInstall
+
+    'Add the extension. We must provide a file URL here.
+    'By passing "user" we determine that the actions we perform on
+    'XExtensionManager only affect the user installation. To modify the share installation one would pass "share".
+
+    Dim props() as Object
+    ext_mgr.addExtension(sExtensionURL + cExtensionFileName, props, "user", obj_null, cmdEnv)
+
+    'Check if the extension has been added by creating a service which is contained in the extension.
+    oTestExtension = createUnoService(cUnoSmoketestTestExtension)
+    bResult = (oTestExtension.getImplementationName = sImplementationNameString)
+    LogTestResult( "Extension "+ cMessageExtensionInstall, bResult )
+    if (not bResult) then
+        Close #LocalTestLog%
+        LocalTestLog = 0
+        Exit Sub
+    End If
+
+    sCurrentMessage = cMessageExtensionUninstall
+    gCurrentTestCase = cEXTUninstall
+
+    'Remove the package
+    ext_mgr.removeExtension("org.openoffice.legacy." + cExtensionFileName, cExtensionFileName, "user",obj_null, cmdEnv)
+
+    'Try to create the service which is contained in the now removed extension.
+    oTestExtension = createUnoService(cUnoSmoketestTestExtension)
+
+    'The service must not be available anymore. Therefor isNull must return true.
+    LogTestResult( "Extension "+ cMessageExtensionUninstall, IsNull (oTestExtension) )
+
+    Print #LocalTestLog, "---"
+    Close #LocalTestLog%
+    LocalTestLog = 0
+    Exit Sub ' Without error
+
+    EXTERROR:
+    If ( gCurrentTestCase = cLogfileFailed ) then
+        LogTestResult( " ", False )
+        Exit Sub
+    else
+        LogTestResult( "Extension "+ sCurrentMessage, False )
+        Close #LocalTestLog%
+        LocalTestLog = 0
+    End If
+    Exit Sub ' With error
+
+End Sub
+</script:module>
diff --git a/smoketest/data/Basic/Standard/script-lb.xml b/smoketest/data/Basic/Standard/script-lb.xml
new file mode 100644
index 0000000..e91b91f
--- /dev/null
+++ b/smoketest/data/Basic/Standard/script-lb.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Standard" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="Global"/>
+ <library:element library:name="Test_10er"/>
+ <library:element library:name="Test_DB"/>
+ <library:element library:name="Events"/>
+ <library:element library:name="Test_Ext"/>
+</library:library>
diff --git a/smoketest/data/Basic/script-lc.xml b/smoketest/data/Basic/script-lc.xml
new file mode 100644
index 0000000..9d2b85b
--- /dev/null
+++ b/smoketest/data/Basic/script-lc.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd">
+<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <library:library library:name="Standard" library:link="false"/>
+</library:libraries>
diff --git a/smoketest/data/Dialogs/Standard/OptionsDlg.xml b/smoketest/data/Dialogs/Standard/OptionsDlg.xml
new file mode 100644
index 0000000..d3217c7
--- /dev/null
+++ b/smoketest/data/Dialogs/Standard/OptionsDlg.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="OptionsDlg" dlg:left="173" dlg:top="100" dlg:width="223" dlg:height="214" dlg:closeable="true" dlg:moveable="true" dlg:title="Options for smoketest">
+ <dlg:bulletinboard>
+  <dlg:titledbox dlg:id="fmTests" dlg:tab-index="0" dlg:left="114" dlg:top="7" dlg:width="100" dlg:height="157">
+   <dlg:title dlg:value="Tests"/>
+  </dlg:titledbox>
+  <dlg:checkbox dlg:id="cbWriterTest" dlg:tab-index="1" dlg:left="19" dlg:top="21" dlg:width="80" dlg:height="8" dlg:value="Writer" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbCalcTest" dlg:tab-index="2" dlg:left="19" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Calc" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbImpressTest" dlg:tab-index="3" dlg:left="19" dlg:top="49" dlg:width="80" dlg:height="8" dlg:value="Impress" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbDrawTest" dlg:tab-index="4" dlg:left="19" dlg:top="63" dlg:width="80" dlg:height="8" dlg:value="Draw" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbHTMLTest" dlg:tab-index="5" dlg:left="19" dlg:top="77" dlg:width="80" dlg:height="8" dlg:value="HTML" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbMathTest" dlg:tab-index="6" dlg:left="19" dlg:top="91" dlg:width="80" dlg:height="8" dlg:value="Math" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbChartTest" dlg:tab-index="7" dlg:left="19" dlg:top="105" dlg:width="80" dlg:height="8" dlg:value="Chart" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbJavaTest" dlg:tab-index="8" dlg:left="19" dlg:top="119" dlg:width="80" dlg:height="8" dlg:value="Java" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbDatabaseTest" dlg:tab-index="9" dlg:left="19" dlg:top="133" dlg:width="80" dlg:height="8" dlg:value="Database" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbExtensionTest" dlg:tab-index="10" dlg:left="19" dlg:top="147" dlg:width="80" dlg:height="8" dlg:value="Extension" dlg:checked="false"/>
+
+  <dlg:titledbox dlg:id="fmInstalls" dlg:tab-index="11" dlg:left="7" dlg:top="7" dlg:width="100" dlg:height="157">
+   <dlg:title dlg:value="Functions"/>
+  </dlg:titledbox>
+  <dlg:checkbox dlg:id="cbSaveOpen8Test" dlg:tab-index="12" dlg:left="126" dlg:top="21" dlg:width="80" dlg:height="8" dlg:value="Save / Open V8.0" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbSaveOpenXMLTest" dlg:tab-index="13" dlg:left="126" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Save / Open XML" dlg:checked="false"/>
+  <dlg:checkbox dlg:id="cbMacrosTest" dlg:tab-index="15" dlg:left="126" dlg:top="63" dlg:width="80" dlg:height="8" dlg:value="Macros" dlg:checked="false"/>
+  <dlg:titledbox dlg:id="fmBroker" dlg:tab-index="16" dlg:left="7" dlg:top="169" dlg:width="208" dlg:height="17"/>
+  <dlg:checkbox dlg:id="cbTerminateAfterTest" dlg:tab-index="17" dlg:disabled="true" dlg:left="19" dlg:top="174" dlg:width="190" dlg:height="8" dlg:value="Terminate Office after test" dlg:checked="false"/>
+
+  <dlg:button dlg:id="btOk" dlg:tab-index="18" dlg:left="7" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Ok" dlg:button-type="ok" dlg:default="true">
+   <script:event script:event-name="on-performaction" script:location="document" script:macro-name="Standard.Events.PressOk" script:language="StarBasic"/>
+  </dlg:button>
+  <dlg:button dlg:id="btCancel" dlg:tab-index="19" dlg:left="80" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Cancel" dlg:button-type="ok">
+   <script:event script:event-name="on-performaction" script:location="document" script:macro-name="Standard.Events.PressCancel" script:language="StarBasic"/>
+  </dlg:button>
+  <dlg:button dlg:id="btStart" dlg:tab-index="20" dlg:left="152" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Smoketest">
+   <script:event script:event-name="on-performaction" script:location="vnd.sun.star.script" script:macro-name="Standard.Events.PressTest?language=Basic&location=document" script:language="Script"/>
+  </dlg:button>
+ </dlg:bulletinboard>
+</dlg:window>
diff --git a/smoketest/data/Dialogs/Standard/dialog-lb.xml b/smoketest/data/Dialogs/Standard/dialog-lb.xml
new file mode 100644
index 0000000..a035955
--- /dev/null
+++ b/smoketest/data/Dialogs/Standard/dialog-lb.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Standard" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="OptionsDlg"/>
+</library:library>
diff --git a/smoketest/data/Dialogs/dialog-lc.xml b/smoketest/data/Dialogs/dialog-lc.xml
new file mode 100644
index 0000000..9d2b85b
--- /dev/null
+++ b/smoketest/data/Dialogs/dialog-lc.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd">
+<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <library:library library:name="Standard" library:link="false"/>
+</library:libraries>
diff --git a/smoketest/data/Events.xml b/smoketest/data/Events.xml
deleted file mode 100644
index 127af2f..0000000
--- a/smoketest/data/Events.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- -->
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Events" script:language="StarBasic">REM  *****  BASIC  *****
-
-Global s_CloseListenerCalled As Boolean
-
-Sub PressCancel
-    gDlgState = cDlgCancel
-end Sub
-
-Sub PressOk
-    gDlgState = cDlgOk
-end Sub
-
-Sub PressTest
-    gOptionsDialog.EndExecute()
-    gDlgState = cDlgStartTest
-end Sub
-
-Sub closeListener_queryClosing
-  ' not interested in
-  closeListener_queryClosing = TRUE
-End Sub
-
-Sub closeListener_notifyClosing
-  s_CloseListenerCalled = TRUE
-End Sub
-
-Sub closeListener_disposing
-  ' not interested in
-End Sub
-
-Sub ResetCloseListenerFlag
-  s_CloseListenerCalled = FALSE
-End Sub
-
-Function HasCloseListenerBeenCalled As Boolean
-  HasCloseListenerBeenCalled = s_CloseListenerCalled
-End Function
-</script:module>
diff --git a/smoketest/data/Global.xml b/smoketest/data/Global.xml
deleted file mode 100644
index 64e6a3d..0000000
--- a/smoketest/data/Global.xml
+++ /dev/null
@@ -1,825 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- -->
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Global" script:language="StarBasic">REM  *****  BASIC  *****
-
-const cMaxErrorStates = 14
-
-const cCoGreen = 4057917, cCoRed = 16711680, cCoGrey = 12632256
-const cParagraphBreak = 0
-
-global const cExtensionFileName = "TestExtension.oxt"
-
-global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocClose = 3, cDocMacros = 4
-global const cDBService = 0, cDBOpen = 1, cDBInsert = 2, cDBDelete = 3, cDBSeek = 4, cDBClose = 5
-global const cEXTService = 0, cEXTInstall = 1, cEXTUninstall = 2
-global const cTestClosureSetupDoc = 0, cTestClosureWriteStatus = 1
-global const cLogfileFailed = 255
-
-global const cStWriter = 0, cStCalc = 1, cStPraesentation = 2, cStZeichnen = 3
-global const cStHTML = 6, cStChart = 4, cStJava = 7
-global const cStMath = 5, cStDataBase = 9
-global const cStExtension = 11
-global const cStTestGlue = 12
-global const cStNone = -1
-
-global const cFlt8 = 0, cFltNewDoc = 64, cFltXML = 128
-
-global const frmWriter = 1, frmCalc = 2, frmImpress = 4
-global const frmMath = 5, frmChart = 7, frmHyperText = 8, frmDraw = 9
-global const frmDataBase = 10, frmJava = 13
-global const frmExtension = 14
-global const frmTestClosure = 15
-
-Global gCurrentDocTest As Integer
-Global gCurrentTestCase As Integer
-
-global const cLogUnknown = 0, cLogFalse = 1, cLogTrue = 2
-
-'UserFieldKennungen
-Global const cYes = "y", cNo = "n"
-Global const cStateNo = 0, cStateYes = 1
-
-'Feldtypen
-Global const cFtExtUser = 21, cFtPageNum = 5, cFtStatistic = 8, cFtDateTime = 27, cFtDatabase = 31
-
-'UnoStrings
-Global const cUnoSeparator = "."
-Global const cUnoPrefix = "com.sun.star."
-Global const cUnoUserField = cUnoPrefix + "text.FieldMaster.User"
-Global const cUnoExtUserField = cUnoPrefix + "text.TextField.ExtendedUser"
-Global const cUnoMasterDataBase = cUnoPrefix + "text.FieldMaster.Database"
-Global const cUnoDataBase = cUnoPrefix + "text.TextField.Database"
-Global const cUnoDateTime = cUnoPrefix + "text.TextField.DateTime"
-Global const cUnoTextGraphi2 = cUnoPrefix + "text.Graphic"
-Global const cUnoJavaLoader = cUnoPrefix + "loader.Java"
-Global const cUnoDatabaseContext = cUnoPrefix + "sdb.DatabaseContext"
-Global const cUnoRowSet = cUnoPrefix + "sdb.RowSet"
-Global const cUnoSmoketestTestExtension = cUnoPrefix + "comp.smoketest.TestExtension"
-Global const cUnoSmoketestCommandEnvironment = cUnoPrefix + "deployment.test.SmoketestCommandEnvironment"
-Global const cExtensionManager = cUnoPrefix + "deployment.ExtensionManager"
-
-'UserFieldNames
-Global const cUserFieldTestWriter = "Writer", cUserFieldTestCalc = "Calc", cUserFieldTestImpress = "Impress"
-Global const cUserFieldTestDraw = "Draw", cUserFieldTestMath = "Math", cUserFieldTestChart = "Chart"
-Global const cUserFieldTestHTML = "HTML", cUserFieldTestJava = "Java", cUserFieldTestDatabase = "Database"
-Global const cUserFieldTestExtension = "Extension"

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list