summaryrefslogtreecommitdiffstats
path: root/smoketest
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /smoketest
parentInitial commit. (diff)
downloadlibreoffice-upstream.tar.xz
libreoffice-upstream.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'smoketest')
-rw-r--r--smoketest/CppunitTest_smoketest.mk55
-rw-r--r--smoketest/Extension_TestExtension.mk14
-rw-r--r--smoketest/Jar_TestExtension.mk29
-rw-r--r--smoketest/Jar_smoketest.mk27
-rw-r--r--smoketest/Library_smoketest.mk37
-rw-r--r--smoketest/Makefile7
-rw-r--r--smoketest/Module_smoketest.mk47
-rw-r--r--smoketest/README.md19
-rw-r--r--smoketest/Zip_smoketestdoc.mk38
-rw-r--r--smoketest/com/sun/star/comp/smoketest/MANIFEST.MF2
-rw-r--r--smoketest/com/sun/star/comp/smoketest/META-INF/manifest.xml4
-rw-r--r--smoketest/com/sun/star/comp/smoketest/TestExtension.java126
-rw-r--r--smoketest/com/sun/star/comp/smoketest/description.xml26
-rw-r--r--smoketest/data/Basic/Standard/Events.xml57
-rw-r--r--smoketest/data/Basic/Standard/Global.xml811
-rw-r--r--smoketest/data/Basic/Standard/Test_10er.xml671
-rw-r--r--smoketest/data/Basic/Standard/Test_DB.xml138
-rw-r--r--smoketest/data/Basic/Standard/Test_Ext.xml108
-rw-r--r--smoketest/data/Basic/Standard/script-lb.xml26
-rw-r--r--smoketest/data/Basic/script-lc.xml22
-rw-r--r--smoketest/data/Dialogs/Standard/OptionsDlg.xml54
-rw-r--r--smoketest/data/Dialogs/Standard/dialog-lb.xml22
-rw-r--r--smoketest/data/Dialogs/dialog-lc.xml22
-rw-r--r--smoketest/data/META-INF/manifest.xml40
-rw-r--r--smoketest/data/content.xml103
-rw-r--r--smoketest/data/meta.xml33
-rw-r--r--smoketest/data/mimetype1
-rw-r--r--smoketest/data/settings.xml109
-rw-r--r--smoketest/data/styles.xml115
-rw-r--r--smoketest/org/libreoffice/smoketest/Services.java51
-rw-r--r--smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java108
-rw-r--r--smoketest/org/libreoffice/smoketest/manifest3
-rw-r--r--smoketest/org/libreoffice/smoketest/smoketest.component25
-rw-r--r--smoketest/smoketest.cxx199
-rw-r--r--smoketest/smoketest_too.cxx1
35 files changed, 3150 insertions, 0 deletions
diff --git a/smoketest/CppunitTest_smoketest.mk b/smoketest/CppunitTest_smoketest.mk
new file mode 100644
index 000000000..f7d64cae5
--- /dev/null
+++ b/smoketest/CppunitTest_smoketest.mk
@@ -0,0 +1,55 @@
+# -*- 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/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,smoketest))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,smoketest,\
+ smoketest/smoketest_too \
+))
+
+$(eval $(call gb_CppunitTest_use_external,smoketest,boost_headers))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,smoketest))
+
+$(eval $(call gb_CppunitTest_use_libraries,smoketest,\
+ cppu \
+ cppuhelper \
+ sal \
+ unotest \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,smoketest))
+
+ifeq ($(ENABLE_MACOSX_SANDBOX),TRUE)
+userinstallation=$(shell $(INSTROOT)/$(LIBO_BIN_FOLDER)/soffice --nstemporarydirectory)
+else
+userinstallation=$(WORKDIR)/CustomTarget/smoketest
+endif
+
+$(eval $(call gb_CppunitTest_add_arguments,smoketest,\
+ -env:arg-soffice=$(gb_JunitTest_SOFFICEARG) \
+ -env:arg-user=$(userinstallation) \
+ -env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \
+ -env:arg-testarg.smoketest.doc=$(WORKDIR)/Zip/smoketestdoc.sxw \
+))
+
+$(call gb_CppunitTest_get_target,smoketest): \
+ clean_CustomTarget_smoketest \
+ $(WORKDIR)/Zip/smoketestdoc.sxw
+
+clean_CustomTarget_smoketest:
+ rm -rf $(WORKDIR)/CustomTarget/smoketest
+ mkdir -p $(WORKDIR)/CustomTarget/smoketest/user
+ cp $(SRCDIR)/qadevOOo/qa/registrymodifications.xcu $(WORKDIR)/CustomTarget/smoketest/user
+
+$(WORKDIR)/Zip/smoketestdoc.sxw: $(call gb_Zip_get_target,smoketestdoc)
+ cp $< $@
+
+# vim: set noet sw=4 ts=4:
diff --git a/smoketest/Extension_TestExtension.mk b/smoketest/Extension_TestExtension.mk
new file mode 100644
index 000000000..83ab2517f
--- /dev/null
+++ b/smoketest/Extension_TestExtension.mk
@@ -0,0 +1,14 @@
+# -*- 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/.
+#
+
+$(eval $(call gb_Extension_Extension,TestExtension,smoketest/com/sun/star/comp/smoketest,nodeliver))
+
+$(eval $(call gb_Extension_add_file,TestExtension,TestExtension.jar,$(call gb_Jar_get_target,TestExtension)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/smoketest/Jar_TestExtension.mk b/smoketest/Jar_TestExtension.mk
new file mode 100644
index 000000000..c0621d94d
--- /dev/null
+++ b/smoketest/Jar_TestExtension.mk
@@ -0,0 +1,29 @@
+# -*- 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/.
+#
+
+$(eval $(call gb_Jar_Jar,TestExtension))
+
+$(eval $(call gb_Jar_set_manifest,TestExtension,$(SRCDIR)/smoketest/com/sun/star/comp/smoketest/MANIFEST.MF))
+
+$(eval $(call gb_Jar_add_manifest_classpath,TestExtension,\
+ libreoffice.jar \
+))
+
+$(eval $(call gb_Jar_use_jars,TestExtension,\
+ libreoffice \
+))
+
+$(eval $(call gb_Jar_set_packageroot,TestExtension,com))
+
+$(eval $(call gb_Jar_add_sourcefiles,TestExtension,\
+ smoketest/com/sun/star/comp/smoketest/TestExtension \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/smoketest/Jar_smoketest.mk b/smoketest/Jar_smoketest.mk
new file mode 100644
index 000000000..a62022031
--- /dev/null
+++ b/smoketest/Jar_smoketest.mk
@@ -0,0 +1,27 @@
+# -*- 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/.
+#
+
+$(eval $(call gb_Jar_Jar,smoketest))
+
+$(eval $(call gb_Jar_add_sourcefiles,smoketest, \
+ smoketest/org/libreoffice/smoketest/Services \
+ smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment \
+))
+
+$(eval $(call gb_Jar_set_componentfile,smoketest,smoketest/org/libreoffice/smoketest/smoketest,OOO,services))
+
+$(eval $(call gb_Jar_set_manifest,smoketest,$(SRCDIR)/smoketest/org/libreoffice/smoketest/manifest))
+
+$(eval $(call gb_Jar_set_packageroot,smoketest,org))
+
+$(eval $(call gb_Jar_use_jars,smoketest, \
+ libreoffice \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/smoketest/Library_smoketest.mk b/smoketest/Library_smoketest.mk
new file mode 100644
index 000000000..b7751491a
--- /dev/null
+++ b/smoketest/Library_smoketest.mk
@@ -0,0 +1,37 @@
+# -*- 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/.
+#
+
+# this is a Library that contains a unit test, so it can be packaged
+$(eval $(call gb_Library_Library,smoketest))
+
+# necessary because this is no CppUnitTest but a Library
+$(eval $(call gb_Library_add_defs,smoketest,\
+ -DCPPUNIT_PLUGIN_EXPORT='extern "C" SAL_DLLPUBLIC_EXPORT' \
+))
+
+$(eval $(call gb_Library_use_sdk_api,smoketest))
+
+$(eval $(call gb_Library_use_libraries,smoketest,\
+ cppu \
+ cppuhelper \
+ sal \
+ unotest \
+))
+
+$(eval $(call gb_Library_use_externals,smoketest,\
+ boost_headers \
+ cppunit \
+))
+
+$(eval $(call gb_Library_add_exception_objects,smoketest,\
+ smoketest/smoketest \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/smoketest/Makefile b/smoketest/Makefile
new file mode 100644
index 000000000..ccb1c85a0
--- /dev/null
+++ b/smoketest/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/smoketest/Module_smoketest.mk b/smoketest/Module_smoketest.mk
new file mode 100644
index 000000000..5d66a0daa
--- /dev/null
+++ b/smoketest/Module_smoketest.mk
@@ -0,0 +1,47 @@
+# -*- 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/.
+#
+
+$(eval $(call gb_Module_Module,smoketest))
+
+ifeq ($(CROSS_COMPILING),)
+
+ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
+$(eval $(call gb_Module_add_targets,smoketest,\
+ Library_smoketest \
+ Zip_smoketestdoc \
+))
+endif
+
+ifneq ($(ENABLE_JAVA),)
+ifneq ($(filter EXTENSIONS,$(BUILD_TYPE)),)
+$(eval $(call gb_Module_add_targets,smoketest,\
+ Extension_TestExtension \
+ Jar_TestExtension \
+))
+endif
+endif
+
+ifneq (MACOSX/TRUE,$(OS)/$(ENABLE_MACOSX_SANDBOX))
+ifneq ($(filter EXTENSIONS,$(BUILD_TYPE)),)
+$(eval $(call gb_Module_add_subsequentcheck_targets,smoketest,\
+ CppunitTest_smoketest \
+))
+endif
+endif
+
+endif
+
+ifneq ($(ENABLE_JAVA),)
+$(eval $(call gb_Module_add_targets,smoketest,\
+ Jar_smoketest \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/smoketest/README.md b/smoketest/README.md
new file mode 100644
index 000000000..5cd48ecb3
--- /dev/null
+++ b/smoketest/README.md
@@ -0,0 +1,19 @@
+# Smoke Test
+Smoke test for each component of LibreOffice.
+
+* `smoketest`:
+
+The main `smoketest.cxx` is launched connects via binary UNO
+over a socket to a remote LibreOffice instance. This loads a document
+which is zipped at build time into the `workdir/` from the `data/`
+directory. This in turn contains a set of macros in
+`data/Basic/Standard`.
+
+`smoketest.cxx` does a remote the `StartTestWithDefaultOptions`
+macro and waits for a `dispatchFinished` from the macro's execution. To
+debug this best load `workdir/Zip/smoketestdoc.sxw` - and hit `start
+smoketest` - this will launch a number of components and build a
+suitable report in the form of a table.
+
+The StarBasic smoketests also log their output, this ends up
+in `instdir/user/temp/smoketest.log`.
diff --git a/smoketest/Zip_smoketestdoc.mk b/smoketest/Zip_smoketestdoc.mk
new file mode 100644
index 000000000..de3fb6b5e
--- /dev/null
+++ b/smoketest/Zip_smoketestdoc.mk
@@ -0,0 +1,38 @@
+# -*- 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/.
+#
+
+SMOKETESTDOC_DIR:=$(SRCDIR)/smoketest/data
+
+$(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))
+$(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))
+
+$(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))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Dialogs/Standard/dialog-lb.xml))
+$(eval $(call gb_Zip_add_file,smoketestdoc,Dialogs/Standard/OptionsDlg.xml))
+
+# vim: set noet sw=4 ts=4:
diff --git a/smoketest/com/sun/star/comp/smoketest/MANIFEST.MF b/smoketest/com/sun/star/comp/smoketest/MANIFEST.MF
new file mode 100644
index 000000000..09e2f42ca
--- /dev/null
+++ b/smoketest/com/sun/star/comp/smoketest/MANIFEST.MF
@@ -0,0 +1,2 @@
+RegistrationClassName: com.sun.star.comp.smoketest.TestExtension
+
diff --git a/smoketest/com/sun/star/comp/smoketest/META-INF/manifest.xml b/smoketest/com/sun/star/comp/smoketest/META-INF/manifest.xml
new file mode 100644
index 000000000..0e7304442
--- /dev/null
+++ b/smoketest/com/sun/star/comp/smoketest/META-INF/manifest.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
+ <manifest:file-entry manifest:full-path="TestExtension.jar" manifest:media-type="application/vnd.sun.star.uno-component;type=Java"/>
+</manifest:manifest>
diff --git a/smoketest/com/sun/star/comp/smoketest/TestExtension.java b/smoketest/com/sun/star/comp/smoketest/TestExtension.java
new file mode 100644
index 000000000..c953607e2
--- /dev/null
+++ b/smoketest/com/sun/star/comp/smoketest/TestExtension.java
@@ -0,0 +1,126 @@
+/*
+ * 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 .
+ */
+
+package com.sun.star.comp.smoketest;
+
+import com.sun.star.lib.uno.helper.Factory;
+import com.sun.star.lang.XSingleComponentFactory;
+import com.sun.star.lib.uno.helper.WeakBase;
+import com.sun.star.registry.XRegistryKey;
+import com.sun.star.lang.XServiceInfo;
+
+/** This class capsulates the class, that implements the minimal component, a
+ * factory for creating the service (<CODE>__getComponentFactory</CODE>) and a
+ * method, that writes the information into the given registry key
+ * (<CODE>__writeRegistryServiceInfo</CODE>).
+ */
+public class TestExtension {
+ /** This class implements the component. At least the interfaces XServiceInfo,
+ * XTypeProvider, and XInitialization should be provided by the service.
+ */
+ public static class _TestExtension extends WeakBase
+ implements XServiceInfo {
+ /** The service name, that must be used to get an instance of this service.
+ */
+ private static final String __serviceName =
+ "com.sun.star.comp.smoketest.TestExtension";
+
+ /** This method returns an array of all supported service names.
+ * @return Array of supported service names.
+ */
+ public String[] getSupportedServiceNames() {
+ return getServiceNames();
+ }
+
+ /** This method is a simple helper function to used in the
+ * static component initialisation functions as well as in
+ * getSupportedServiceNames.
+ */
+ public static String[] getServiceNames() {
+ String[] sSupportedServiceNames = { __serviceName };
+ return sSupportedServiceNames;
+ }
+
+ /** This method returns true, if the given service will be
+ * supported by the component.
+ * @param sServiceName Service name.
+ * @return True, if the given service name will be supported.
+ */
+ public boolean supportsService( String sServiceName ) {
+ return sServiceName.equals( __serviceName );
+ }
+
+ /** Return the class name of the component.
+ * @return Class name of the component.
+ */
+ public String getImplementationName() {
+ return _TestExtension.class.getName();
+ }
+ }
+
+
+ /**
+ * Gives a factory for creating the service.
+ * This method is called by the <code>JavaLoader</code>
+ * <p>
+ * @return returns a <code>XSingleComponentFactory</code> for creating
+ * the component
+ * @param sImplName the name of the implementation for which a
+ * service is desired
+ * @see com.sun.star.comp.loader.JavaLoader
+ */
+ public static XSingleComponentFactory __getComponentFactory(String sImplName)
+ {
+ XSingleComponentFactory xFactory = null;
+
+ if ( sImplName.equals( _TestExtension.class.getName() ) )
+ xFactory = Factory.createComponentFactory(_TestExtension.class,
+ _TestExtension.getServiceNames());
+
+ return xFactory;
+ }
+
+ /**
+ * Writes the service information into the given registry key.
+ * This method is called by the <code>JavaLoader</code>
+ * <p>
+ * @return returns true if the operation succeeded
+ * @param regKey the registryKey
+ * @see com.sun.star.comp.loader.JavaLoader
+ */
+ public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
+ return Factory.writeRegistryServiceInfo(_TestExtension.class.getName(),
+ _TestExtension.getServiceNames(),
+ regKey);
+ }
+ /** This method is a member of the interface for initializing an object
+ * directly after its creation.
+ * @param object This array of arbitrary objects will be passed to the
+ * component after its creation.
+ * @throws com.sun.star.uno.Exception Every exception will not be handled, but will be
+ * passed to the caller.
+ */
+ public void initialize( Object[] object )
+ throws com.sun.star.uno.Exception {
+ /* The component describes what arguments are expected and in which
+ * order! At this point you can read the objects and initialize
+ * your component using these objects.
+ */
+ }
+
+}
diff --git a/smoketest/com/sun/star/comp/smoketest/description.xml b/smoketest/com/sun/star/comp/smoketest/description.xml
new file mode 100644
index 000000000..ccbac75df
--- /dev/null
+++ b/smoketest/com/sun/star/comp/smoketest/description.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 .
+ -->
+
+<d:description xmlns:d="http://openoffice.org/extensions/description/2006">
+ <d:identifier value="org.libreoffice.smoketest.TestExtension"/>
+ <d:version value="1"/>
+ <d:dependencies>
+ <d:OpenOffice.org-minimal-version d:name="OpenOffice.org 2.3" value="2.3"/>
+ </d:dependencies>
+</d:description>
diff --git a/smoketest/data/Basic/Standard/Events.xml b/smoketest/data/Basic/Standard/Events.xml
new file mode 100644
index 000000000..127af2f79
--- /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
+ &apos; not interested in
+ closeListener_queryClosing = TRUE
+End Sub
+
+Sub closeListener_notifyClosing
+ s_CloseListenerCalled = TRUE
+End Sub
+
+Sub closeListener_disposing
+ &apos; 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 000000000..fa28297fe
--- /dev/null
+++ b/smoketest/data/Basic/Standard/Global.xml
@@ -0,0 +1,811 @@
+<?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 = &quot;TestExtension.oxt&quot;
+
+global const cDocNew = 0, cDocSaveOpen8 = 1, 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
+
+&apos;UserFieldKennungen
+Global const cYes = &quot;y&quot;, cNo = &quot;n&quot;
+Global const cStateNo = 0, cStateYes = 1
+
+&apos;FieldTypes
+Global const cFtExtUser = 21, cFtPageNum = 5, cFtStatistic = 8, cFtDateTime = 27, cFtDatabase = 31
+
+&apos;UnoStrings
+Global const cUnoSeparator = &quot;.&quot;
+Global const cUnoPrefix = &quot;com.sun.star.&quot;
+Global const cUnoUserField = cUnoPrefix + &quot;text.FieldMaster.User&quot;
+Global const cUnoExtUserField = cUnoPrefix + &quot;text.TextField.ExtendedUser&quot;
+Global const cUnoMasterDataBase = cUnoPrefix + &quot;text.FieldMaster.Database&quot;
+Global const cUnoDataBase = cUnoPrefix + &quot;text.TextField.Database&quot;
+Global const cUnoDateTime = cUnoPrefix + &quot;text.TextField.DateTime&quot;
+Global const cUnoTextGraphi2 = cUnoPrefix + &quot;text.Graphic&quot;
+Global const cUnoJavaLoader = cUnoPrefix + &quot;loader.Java&quot;
+Global const cUnoDatabaseContext = cUnoPrefix + &quot;sdb.DatabaseContext&quot;
+Global const cUnoRowSet = cUnoPrefix + &quot;sdb.RowSet&quot;
+Global const cUnoSmoketestTestExtension = cUnoPrefix + &quot;comp.smoketest.TestExtension&quot;
+Global const cUnoSmoketestCommandEnvironment = cUnoPrefix + &quot;deployment.test.SmoketestCommandEnvironment&quot;
+Global const cExtensionManager = cUnoPrefix + &quot;deployment.ExtensionManager&quot;
+
+&apos;UserFieldNames
+Global const cUserFieldTestWriter = &quot;Writer&quot;, cUserFieldTestCalc = &quot;Calc&quot;, cUserFieldTestImpress = &quot;Impress&quot;
+Global const cUserFieldTestDraw = &quot;Draw&quot;, cUserFieldTestMath = &quot;Math&quot;, cUserFieldTestChart = &quot;Chart&quot;
+Global const cUserFieldTestHTML = &quot;HTML&quot;, cUserFieldTestJava = &quot;Java&quot;, cUserFieldTestDatabase = &quot;Database&quot;
+Global const cUserFieldTestExtension = &quot;Extension&quot;
+Global const cUserFieldTestTerminateAfterTest = &quot;Terminate&quot;, cUserFieldTestOpenSave8 = &quot;SaveOpen8&quot;, cUserFieldTestMacros = &quot;Macros&quot;
+
+Global const cOptionsDialogName = &quot;OptionsDlg&quot;, cTest10Modul = &quot;Standard&quot;
+
+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 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 Main
+ On Local Error Goto MainError
+
+ gCurrentDocTest = frmTestClosure
+ gCurrentTestCase = cLogfileFailed
+
+ DeleteAllSavedFiles()
+ DeleteAllLogFiles()
+ SetupWorkPath()
+
+ if GetSystem (sWorkPath) = &quot;windows&quot; then
+ sWorkPath = ConvertPathToWin (sWorkPath)
+ end if
+
+ LocalTestLog% = OpenLogDat( GetLogFileName( gCurrentDocTest ) )
+
+ gCurrentTestCase = cTestClosureSetupDoc
+
+ 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 )
+ &apos; 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
+
+ &apos; print the &apos;test complete&apos; marker
+ Print #LocalTestLog%, &quot;---&quot;
+ LocalTestLog% = 0
+
+ gOutputDoc.setModified( bWasModified )
+
+ Exit Sub
+
+MainError:
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot;&quot;, False )
+ Exit Sub
+ else
+ LogTestResult( &quot;testclosure &quot; + GetTestGlueDescription( gCurrentTestCase ), FALSE )
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ End If
+End Sub
+
+Function GetTestGlueDescription( nTestCase as Integer )
+ Select Case ( nTestCase )
+ case cTestClosureSetupDoc
+ GetTestGlueDescription = &quot;setup&quot;
+ case cTestClosureWriteStatus
+ GetTestGlueDescription = &quot;write_status&quot;
+ case Else
+ GetTestGlueDescription = &quot;&quot;
+ End Select
+End Function
+
+Sub CreateStatusTable
+ dim tableHeaders(7) as string
+ tableHeaders(cStWriter) = &quot;Writer&quot;
+ tableHeaders(cStCalc) = &quot;Calc&quot;
+ tableHeaders(cStPraesentation) = &quot;Präsen- tation&quot;
+ tableHeaders(cStZeichnen) = &quot;Zeichn.&quot;
+ tableHeaders(cStChart) = &quot;Diagr.&quot;
+ tableHeaders(cStMath) = &quot;Math&quot;
+ tableHeaders(cStHTML) = &quot;HTML&quot;
+ tableHeaders(cStJava) = &quot;Java&quot;
+
+ dim tableRows(4) as string
+ tableRows(cDocNew) = &quot;new&quot;
+ tableRows(cDocSaveOpen8) = &quot;V8.0&quot;
+ tableRows(cDocClose) = &quot;close&quot;
+ tableRows(cDocMacros) = &quot;macros&quot;
+
+ 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(&quot;com.sun.star.text.TextTable&quot;)
+ table.initialize(7,9)
+ table.Name = &quot;StTab1&quot;
+ 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) = &quot;Database&quot;
+ tableHeaders(1) = &quot;&quot;
+ tableHeaders(2) = &quot;Extension&quot;
+ tableHeaders(3) = &quot;&quot;
+ tableHeaders(4) = &quot;Other&quot;
+
+ dim tableRows(5) as string
+ tableRows(cDBService ) = &quot;services&quot;
+ tableRows(cDBOpen ) = &quot;open&quot;
+ tableRows(cDBInsert ) = &quot;insert&quot;
+ tableRows(cDBDelete ) = &quot;delete&quot;
+ tableRows(cDBSeek ) = &quot;seek&quot;
+ tableRows(cDBClose ) = &quot;close&quot;
+
+ dim tableRows2(2) as string
+ tableRows2(cEXTService ) = &quot;services&quot;
+ tableRows2(cEXTInstall ) = &quot;install&quot;
+ tableRows2(cEXTUninstall ) = &quot;uninstall&quot;
+
+ dim tableRows3(1) as string
+ tableRows3(cTestClosureSetupDoc ) = &quot;setup test&quot;
+ tableRows3(cTestClosureWriteStatus ) = &quot;write test result&quot;
+
+ 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(&quot;com.sun.star.text.TextTable&quot;)
+ table.initialize(7,6)
+ table.Name = &quot;StTab2&quot;
+ 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% ) &lt;&gt; "" ) Then
+ Dim annotation as Object
+ annotation = aDoc.createInstance( &quot;com.sun.star.text.TextField.Annotation&quot; )
+ annotation.Author = &quot;smoketest&quot;
+ 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 ) &lt;&gt; &quot;&quot; ) Then
+ Dim annotation as Object
+ annotation = aDoc.createInstance( &quot;com.sun.star.text.TextField.Annotation&quot; )
+ annotation.Author = &quot;smoketest&quot;
+ 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 = &quot;creating logfile &apos;&quot; + GetLogFileName( gCurrentDocTest ) + &quot;&apos; failed&quot;
+ LogState( FALSE, sAnnotation, GlobalTestLog )
+ RecordTestCaseStatus( 0, FALSE, sAnnotation )
+ Else
+ bSuccess = RecordTestCaseStatus( gCurrentTestCase, bSuccess, sTestCaseDescription )
+ If ( LocalTestLog &lt;&gt; 0 ) Then
+ LogState( bSuccess, sTestCaseDescription, LocalTestLog )
+ EndIf
+ if ( GlobalTestLog &lt;&gt; 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
+ &apos; don't overwrite a previous &quot;failed&quot; 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 &lt;&gt; &quot;&quot; ) Then
+ if gTestCaseAnnotations(nStatusType, nAction) &lt;&gt; &quot;&quot; then
+ gTestCaseAnnotations(nStatusType, nAction) = _
+ gTestCaseAnnotations(nStatusType, nAction) &amp; &quot;; &quot;
+ 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 &apos; text document
+ case frmCalc
+ GetStatusType = cStCalc &apos; spreadsheet document
+ case frmImpress
+ GetStatusType = cStPraesentation &apos; presentation
+ case frmDraw
+ GetStatusType = cStZeichnen &apos; drawing
+ case frmMath
+ GetStatusType = cStMath &apos; formula
+ case frmHyperText
+ GetStatusType = cStHTML &apos; HTML document
+ case frmChart
+ GetStatusType = cStChart &apos; chart
+ case frmJava
+ GetStatusType = cStJava &apos;Java
+ case frmTestClosure
+ GetStatusType = cStTestGlue &apos; test framework
+ case frmDataBase
+ GetStatusType = cStDataBase &apos;DataBase
+ case frmExtension
+ GetStatusType = cStExtension &apos;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=&quot;&quot;
+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=&quot;&quot;
+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()
+
+ &apos; now the dialog will run until a button is pressed
+
+ 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(&quot;cbWriterTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestCalc, -(gOptionsDialog.getControl(&quot;cbCalcTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestImpress, -(gOptionsDialog.getControl(&quot;cbImpressTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestDraw, -(gOptionsDialog.getControl(&quot;cbDrawTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestHTML, -(gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl(&quot;cbMathTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl(&quot;cbChartTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl(&quot;cbJavaTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestMacros, -(gOptionsDialog.getControl(&quot;cbMacrosTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).getState), gOutputDoc)
+end Sub
+
+Sub GetOptions
+ call SetGlobalDoc
+ gOptionsDialog.getControl(&quot;cbWriterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestWriter, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbCalcTest&quot;).setState ( -( GetUserFieldState (cUserFieldTestCalc, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbImpressTest&quot;).setState( -( GetUserFieldState (cUserFieldTestImpress, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbDrawTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDraw, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestHTML, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbMathTest&quot;).setState( -( GetUserFieldState (cUserFieldTestMath, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbChartTest&quot;).setState( -( GetUserFieldState (cUserFieldTestChart, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbJavaTest&quot;).setState( -( GetUserFieldState (cUserFieldTestJava, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).setState( -( GetUserFieldState (cUserFieldTestExtension, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbMacrosTest&quot;).setState( -( GetUserFieldState (cUserFieldTestMacros, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).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)
+ 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(&quot;ENABLE_JAVA&quot;) = &quot;&quot; then
+ bMakeJavaTest = false
+ bMakeDBTest = false
+ bMakeExtensionTest = false
+ else
+ bMakeJavaTest = true
+ bMakeDBTest = true
+ bMakeExtensionTest = true
+ End If
+ bMakeSaveOpen8Test = true
+ bMakeMacrosTest = true
+ bMakeTerminateAfterTest = false
+end Sub
+
+Sub StartTestByOptions
+ bShowTable = true
+ call ReadOptions
+ call Main
+ if bMakeTerminateAfterTest then
+ ClearDocFull (gOutputDoc)
+ gOutputDoc.dispose
+ &apos;StarDesktop.Terminate
+
+ &apos;EnableReschedule( false )
+ &apos;DispatchSlot( 5300 )
+ stop
+ End If
+end Sub
+
+Function StartTestWithDefaultOptions
+ bShowTable = false
+ call SetDefaultOptions
+ call Main
+ dim component(cMaxErrorStates) as string
+ component(cStWriter) = &quot;Writer&quot;
+ component(cStCalc) = &quot;Calc&quot;
+ component(cStPraesentation) = &quot;Impress&quot;
+ component(cStZeichnen) = &quot;Draw&quot;
+ component(cStChart) = &quot;Chart&quot;
+ component(cStMath) = &quot;Math&quot;
+ component(cStHTML) = &quot;HTML&quot;
+ component(cStJava) = &quot;Java&quot;
+ component(cStDataBase) = &quot;Base&quot;
+ component(cStExtension) = &quot;Extensions&quot;
+ dim action(4) as string
+ action(cDocNew) = &quot;new&quot;
+ action(cDocSaveOpen8) = &quot;V8.0&quot;
+ action(cDocClose) = &quot;close&quot;
+ action(cDocMacros) = &quot;macros&quot;
+ dim baseAction(5) as string
+ baseAction(cDBService) = &quot;services&quot;
+ baseAction(cDBOpen) = &quot;open&quot;
+ baseAction(cDBInsert) = &quot;insert&quot;
+ baseAction(cDBDelete) = &quot;delete&quot;
+ baseAction(cDBSeek) = &quot;seek&quot;
+ baseAction(cDBClose) = &quot;close&quot;
+ dim extAction(2) as string
+ extAction(cEXTService) = &quot;services&quot;
+ extAction(cEXTInstall) = &quot;install&quot;
+ extAction(cEXTUninstall) = &quot;uninstall&quot;
+ dim result as string
+ for i = 0 to cMaxErrorStates
+ for j = 0 to 5
+ if gErrorState(i, j) = cLogFalse then
+ result = result &amp; &quot; &quot; &amp; component(i) &amp; &quot;:&quot;
+ if i = cStDataBase then
+ result = result &amp; baseAction(j)
+ else if i = cStExtension then
+ result = result &amp; extAction(j)
+ else
+ result = result &amp; action(j)
+ end if
+ end if
+ if gTestCaseAnnotations(i, j) &lt;&gt; &quot;&quot; then
+ result = result &amp; &quot;(&quot; &amp; _
+ gTestCaseAnnotations(i, j) &amp; &quot;)&quot;
+ 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(&quot;com.sun.star.util.URLTransformer&quot;)
+ oUrl.Complete = &quot;slot:&quot; &amp; CStr(SlotID)
+ oTrans.parsestrict(oUrl)
+
+ oDisp = StarDesktop.queryDispatch(oUrl, &quot;_self&quot;, 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 = &quot;LibraryName&quot;
+ arg.Value = LibName
+ args(0) = arg
+
+ dim url as new com.sun.star.util.URL
+ dim trans as object
+ trans = createUnoService(&quot;com.sun.star.util.URLTransformer&quot; )
+ url.Complete = &quot;slot:6517&quot;
+ trans.parsestrict( url )
+
+ dim disp as object
+ disp = StarDesktop.currentFrame.queryDispatch( url, &quot;&quot;, 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(&quot;com.sun.star.util.URLTransformer&quot; )
+ url.Complete = &quot;slot:&quot; + SlotNr
+ trans.parsestrict( url )
+
+ disp = oDoc.CurrentController.Frame.queryDispatch( url, &quot;&quot;, 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 &lt;&gt; 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 &apos;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 = &quot;&quot;
+ 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 000000000..67e5e40c1
--- /dev/null
+++ b/smoketest/data/Basic/Standard/Test_10er.xml
@@ -0,0 +1,671 @@
+<?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 = &quot;swlog.dat&quot;, sSCLogFileName = &quot;sclog.dat&quot;
+const sSDLogFileName = &quot;sdlog.dat&quot;, sSMathLogFileName = &quot;smalog.dat&quot;
+const sSChartLogFileName = &quot;schlog.dat&quot;
+const sSHptLogFileName = &quot;shptlog.dat&quot;
+const sSDrawLogFileName = &quot;sdrwlog.dat&quot;, sJavaLogFileName = &quot;javalog.dat&quot;
+const sSDBLogFileName = &quot;dblog.dat&quot;, sExtLogFileName = &quot;extlog.dat&quot;
+const sTestGlueLogFileName = &quot;testclosure.log&quot;
+const sLogFileName = &quot;smoketest.log&quot;
+const cTempFileName = &quot;smoketest_file&quot;
+
+const cMessageSaveOpen8Doc = &quot;Save/Open open Documents (8.0)&quot;
+const cMessageNewDoc = &quot;New Document&quot;
+const cMessageCloseDoc = &quot;Close Document&quot;
+const cMessageRunMacros = &quot;Run Macros&quot;
+
+Global sWorkPath$
+Global sWorkPathURL$
+Global LocalTestLog%
+Global GlobalTestLog%
+
+Sub Main
+ call TestAllDocs()
+end Sub
+
+Sub DeleteAllSavedFiles()
+ Dim sFileName as String
+ sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmWriter)
+ If FileExists (sFileName) then
+ Kill (sFileName)
+ End If
+ sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmCalc)
+ If FileExists (sFileName) then
+ Kill (sFileName)
+ End If
+ sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmImpress)
+ If FileExists (sFileName) then
+ Kill (sFileName)
+ End If
+ sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmDraw)
+ If FileExists (sFileName) then
+ Kill (sFileName)
+ End If
+ sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmHyperText)
+ 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( &quot;com.sun.star.config.SpecialConfigManager&quot; )
+
+ sWorkPath = configManager.SubstituteVariables( &quot;$(userpath)/temp/&quot; )
+ sWorkPathURL = configManager.SubstituteVariables( &quot;$(userurl)/temp/&quot; )
+End Sub
+
+Function GetSystem (sTmpWorkPath as string) as string
+ GetSystem = &quot;&quot;
+ if InStr (sTmpWorkPath, &quot;:&quot;) then
+ GetSystem = &quot;windows&quot;
+ else
+ GetSystem = &quot;unix&quot;
+ End If
+end Function
+
+Function ConvertPathToWin (sTmpWorkPath as string) as string
+ for i%=1 to Len(sTmpWorkPath)
+ sTemp = Mid (sTmpWorkPath, i%, 1)
+ if sTemp = &quot;/&quot; then
+ sTmpWorkPath = Left (sTmpWorkPath, i%-1) + &quot;\&quot; + Right (sTmpWorkPath, Len(sTmpWorkPath)-i%)
+ else
+ if sTemp = &quot;|&quot; then
+ sTmpWorkPath = Left (sTmpWorkPath, i%-1) + &quot;:&quot; + 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
+
+ &apos;search ExtensionURL
+ sDocURL = gOutputDoc.URL
+ CompatibilityMode(true)
+ nStrPos = InStrRev (sDocURL, &quot;/&quot; )
+ CompatibilityMode(false)
+ sExtensionURL = Left (sDocURL, nStrPos) + &quot;../Extension/&quot; + cExtensionFileName
+
+ GlobalTestLog = OpenLogDat (sLogFileName)
+ call WriteTestSequence
+
+ &apos; Do extension test first to avoid OOM with ASAN
+ if bMakeExtensionTest then
+ gCurrentDocTest = frmExtension
+ call Test_Ext.TestExtensions
+ end if
+
+ 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
+
+ Close #GlobalTestLog
+ GlobalTestLog = 0
+end Sub
+
+Sub WriteTestSequence
+ Print #GlobalTestLog, &quot;Sequence of testing&quot;
+
+ if bMakeExtensionTest then
+ WriteExtensionTests (&quot;Extension : &quot;, GlobalTestLog)
+ if bMakeWriterTest then
+ WriteTests (&quot;writer : &quot;, true, GlobalTestLog)
+ end if
+ if bMakeCalcTest then
+ WriteTests (&quot;calc : &quot;, true, GlobalTestLog)
+ end if
+ if bMakeImpressTest then
+ WriteTests (&quot;impress : &quot;, true, GlobalTestLog)
+ end if
+ if bMakeDrawTest then
+ WriteTests (&quot;draw : &quot;, true, GlobalTestLog)
+ end if
+ if bMakeHTMLTest then
+ WriteTests (&quot;HTML : &quot;, true, GlobalTestLog)
+ end if
+ if bMakeChartTest then
+ WriteTests (&quot;chart : &quot;, false, GlobalTestLog)
+ end if
+ if bMakeMathTest then
+ WriteTests (&quot;math : &quot;, false, GlobalTestLog)
+ end if
+ if bMakeJavaTest then
+ WriteTests (&quot;Java : &quot;, false, GlobalTestLog)
+ end if
+ if bMakeDBTest then
+ WriteDBTests (&quot;Database : &quot;, GlobalTestLog)
+ end if
+ end if
+
+ Print #GlobalTestLog, &quot;testclosure : setup, write_status&quot;
+
+ Print #GlobalTestLog
+ end Sub
+
+ Sub WriteTests (sText as string, bTestAll as boolean)
+ Dim sWriteStr as string
+
+ sWriteStr = sText
+ sWriteStr = sWriteStr + &quot;new&quot;
+ if bTestAll then
+ if bMakeSaveOpen8Test then
+ sWriteStr = sWriteStr + &quot;, save 8.0&quot;
+ end if
+ if bMakeSaveOpen8Test then
+ sWriteStr = sWriteStr + &quot;, open 8.0&quot;
+ end if
+ if bMakeMacrosTest then
+ sWriteStr = sWriteStr + &quot;, run macros&quot;
+ end if
+ end if
+
+ sWriteStr = sWriteStr + &quot;, close&quot;
+
+ Print #GlobalTestLog, sWriteStr
+end Sub
+
+Sub WriteDBTests (sText as string, nFileChannel as integer)
+ Dim sWriteStr as string
+
+ sWriteStr = sText
+ sWriteStr = sWriteStr + &quot;open / services&quot;
+ sWriteStr = sWriteStr + &quot;, insert&quot;
+ sWriteStr = sWriteStr + &quot;, delete&quot;
+ sWriteStr = sWriteStr + &quot;, seek&quot;
+ sWriteStr = sWriteStr + &quot;, close&quot;
+
+ Print #nFileChannel, sWriteStr
+end Sub
+
+Sub WriteExtensionTests (sText as string, nFileChannel as integer)
+ Dim sWriteStr as string
+
+ sWriteStr = sText
+ sWriteStr = sWriteStr + &quot;services&quot;
+ sWriteStr = sWriteStr + &quot;, install&quot;
+ sWriteStr = sWriteStr + &quot;, uninstall&quot;
+
+ 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 (&quot;private:factory/&quot; + GetDocFilter(gCurrentDocTest or cFltNewDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
+ if not IsNull (oDoc) then
+ gCurrentTestCase = cDocSaveOpen8
+ if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
+ sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(gCurrentDocTest or cFlt8)
+ SaveDoc (sFileName8, oDoc, GetDocFilter(gCurrentDocTest or cFlt8))
+ end if
+ gCurrentTestCase = cDocClose
+ bSuccess = CloseDoc( oDoc )
+ LogTestResult( GetDocFilter(gCurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
+ gCurrentTestCase = cDocSaveOpen8
+ if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
+ oDoc = LoadDoc (sFileName8)
+
+&apos; oDoc = Documents.open(sFileName)
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, not IsNull (oDoc) )
+
+ if not IsNull (oDoc) then
+ gCurrentTestCase = cDocClose
+ oDoc.close (true)
+ end If
+ end if
+
+ gCurrentTestCase = cDocMacros
+ &apos; Just one calc macro test for now
+ &apos; To-Do split this into its own per-module/test .xml and add more
+ if bMakeMacrosTest and gCurrentDocTest = frmCalc then
+ oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(gCurrentDocTest or cFltNewDoc))
+ oDocCtrl = oDoc.getCurrentController()
+ oDocFrame = oDocCtrl.getFrame()
+ oDispatcher = createUnoService(&quot;com.sun.star.frame.DispatchHelper&quot;)
+
+ dim args(0) as new com.sun.star.beans.PropertyValue
+
+ args(0).Name = &quot;ToPoint&quot;
+ args(0).Value = &quot;$A$1&quot;
+ oDispatcher.executeDispatch(oDocFrame, &quot;.uno:GoToCell&quot;, &quot;&quot;, 0, args())
+ args(0).Name = &quot;By&quot;
+ args(0).Value = 5
+ oDispatcher.executeDispatch(oDocFrame, &quot;.uno:GoRightSel&quot;, &quot;&quot;, 0, args())
+ args(0).Name = &quot;By&quot;
+ args(0).Value = 5
+ oDispatcher.executeDispatch(oDocFrame, &quot;.uno:GoDownSel&quot;, &quot;&quot;, 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)+&quot; &quot;+ cMessageRunMacros, bResult )
+
+ if not IsNull (oDoc) then
+ gCurrentTestCase = cDocClose
+ oDoc.close (true)
+ end If
+ end if
+
+ end If
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ Exit Sub &apos; Without error
+
+ DOCTESTERROR:
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
+ Exit Sub
+ else
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), False )
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ End If
+ Exit Sub &apos; 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
+&apos; oDoc = Documents.Add(GetDocFilter(gCurrentDocTest))
+ oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(gCurrentDocTest or cFltNewDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
+ if not IsNull (oDoc) then
+ gCurrentTestCase = cDocClose
+ bSuccess = CloseDoc( oDoc )
+ LogTestResult( GetDocFilter(gCurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
+ end If
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ Exit Sub &apos; Without error
+
+ DOCTESTERROR2:
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
+ Exit Sub
+ else
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), False )
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ End If
+ Exit Sub &apos; 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=&quot;TestChart&quot;
+ Dim bSuccess as Boolean
+ On Local Error GoTo CHARTTESTERROR
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+ oDoc = LoadDoc (&quot;private:factory/&quot; + 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)+&quot; &quot;+ cMessageNewDoc, bSuccess )
+ gCurrentTestCase = cDocClose
+ oDoc.close (true)
+ else
+ LogTestResult( GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FALSE )
+ End if
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ Exit Sub &apos; Without error
+
+ CHARTTESTERROR:
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
+ Exit Sub
+ else
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), FALSE )
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ End If
+ Exit Sub &apos; With error
+End Sub
+
+Sub LogState (bState as Boolean, sText as String, nLocaleFileChannel as integer)
+ if bState then
+ Print #nLocaleFileChannel, sText+&quot; -&gt; ok&quot;
+ else
+ Print #nLocaleFileChannel, sText+&quot; -&gt; error&quot;
+ end If
+end Sub
+
+Function GetDocEndings (DocType as Integer) as String
+ Select Case ( DocType )
+ case frmWriter or cFlt8
+ GetDocEndings = &quot;odt&quot; &apos; Textdokument
+ case frmCalc or cFlt8
+ GetDocEndings = &quot;ods&quot; &apos;Tabellendokument
+ case frmImpress or cFlt8
+ GetDocEndings = &quot;odp&quot; &apos;PrÕsentation
+ case frmDraw or cFlt8
+ GetDocEndings = &quot;odg&quot; &apos;Zeichen
+ case frmHyperText, frmHyperText or cFltXML
+ GetDocEndings = &quot;html&quot; &apos;Hypertext-Dokument
+ case frmWriter or cFltXML
+ GetDocEndings = &quot;sxw&quot; &apos; Textdokument
+ case frmCalc or cFltXML
+ GetDocEndings = &quot;sxc&quot; &apos;Tabellendokument
+ case frmImpress or cFltXML
+ GetDocEndings = &quot;sxi&quot; &apos;PrÕsentation
+ case frmDraw or cFltXML
+ GetDocEndings = &quot;sxd&quot; &apos;Zeichen
+ case else
+ GetDocEndings = &quot;&quot;
+ end Select
+end Function
+
+Function GetDocFilter (DocType as Integer) as String
+ Select Case ( DocType )
+ case frmWriter or cFlt8
+ GetDocFilter = &quot;writer8&quot; &apos; text document
+ case frmCalc or cFlt8
+ GetDocFilter = &quot;calc8&quot; &apos; spreadsheet document
+ case frmImpress or cFlt8
+ GetDocFilter = &quot;impress8&quot; &apos; presentation
+ case frmDraw or cFlt8
+ GetDocFilter = &quot;draw8&quot; &apos; drawing
+ case frmMath or cFlt8
+ GetDocFilter = &quot;math8&quot; &apos; formula
+
+ case frmWriter or cFltXML
+ GetDocFilter = &quot;StarOffice XML (Writer)&quot; &apos; text document
+ case frmCalc or cFltXML
+ GetDocFilter = &quot;StarOffice XML (Calc)&quot; &apos; spreadsheet document
+ case frmImpress or cFltXML
+ GetDocFilter = &quot;StarOffice XML (Impress)&quot; &apos; presentation
+ case frmDraw or cFltXML
+ GetDocFilter = &quot;StarOffice XML (Draw)&quot; &apos; drawing
+ case frmMath or cFltXML
+ GetDocFilter = &quot;StarOffice XML (Math)&quot; &apos; formula
+
+ case frmHyperText, frmHyperText or cFltXML
+ GetDocFilter = &quot;HTML&quot; &apos; HTML document
+
+ case frmWriter or cFltNewDoc
+ GetDocFilter = &quot;swriter&quot; &apos; text document
+ case frmCalc or cFltNewDoc
+ GetDocFilter = &quot;scalc&quot; &apos; spreadsheet document
+ case frmImpress or cFltNewDoc
+ GetDocFilter = &quot;simpress&quot; &apos; presentation
+ case frmDraw or cFltNewDoc
+ GetDocFilter = &quot;sdraw&quot; &apos; drawing
+ case frmMath or cFltNewDoc
+ GetDocFilter = &quot;smath&quot; &apos; formula
+ case frmHyperText or cFltNewDoc
+ GetDocFilter = &quot;swriter/web&quot; &apos; HTML document
+ case frmChart or cFltNewDoc
+ GetDocFilter = &quot;schart&quot; &apos; chart
+ case else
+ GetDocFilter = &quot;&quot;
+ end Select
+end Function
+
+Function GetLogFileName (DocType as Integer) as String
+ Select Case ( DocType )
+ case frmWriter
+ GetLogFileName = sSWLogFileName &apos; text document
+ case frmCalc
+ GetLogFileName = sSCLogFileName &apos; spreadsheet document
+ case frmImpress
+ GetLogFileName = sSDLogFileName &apos; presentation
+ case frmDraw
+ GetLogFileName = sSDrawLogFileName &apos; drawing
+ case frmMath
+ GetLogFileName = sSMathLogFileName &apos; formula
+ case frmHyperText
+ GetLogFileName = sSHptLogFileName &apos; HTML document
+ case frmChart
+ GetLogFileName = sSChartLogFileName &apos; chart
+ case frmJava
+ GetLogFileName = sJavaLogFileName &apos;Java
+ case frmTestClosure
+ GetLogFileName = sTestGlueLogFileName &apos; test framework
+ case frmDataBase
+ GetLogFileName = sSDBLogFileName &apos;Database
+ case frmExtension
+ GetLogFileName = sExtLogFileName &apos;Extension
+ case else
+ GetLogFileName = &quot;&quot;
+ end Select
+end Function
+
+Function GetErrorMessageOnAction (nAction as Integer) as String
+ Select Case ( nAction )
+ case cDocNew
+ GetErrorMessageOnAction = cMessageNewDoc
+ case cDocSaveOpen8
+ GetErrorMessageOnAction = cMessageSaveOpen8Doc
+ case cDocMacros
+ GetErrorMessageOnAction = cMessageRunMacros
+ case cDocClose
+ GetErrorMessageOnAction = cMessageCloseDoc
+ case else
+ GetErrorMessageOnAction = &quot;&quot;
+ 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( &quot;Java &quot;+ cMessageNewDoc, not IsNull (oObj) )
+
+ Print #LocalTestLog, &quot;---&quot;
+ 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 = &quot;LibraryName&quot;
+ arg.Value = LibName
+ args(0) = arg
+
+ dim url as new com.sun.star.util.URL
+ dim trans as object
+ trans = createUnoService(&quot;com.sun.star.util.URLTransformer&quot; )
+ url.Complete = &quot;slot:6517&quot;
+ trans.parsestrict( url )
+
+ dim disp as object
+ disp = StarDesktop.currentFrame.queryDispatch( url, &quot;&quot;, 0 )
+ disp.dispatch( url, args() )
+
+End Sub
+
+Sub LoadDoc (DocName as String) as Object
+ dim trans as object
+ trans = createUnoService(&quot;com.sun.star.util.URLTransformer&quot; )
+ url = createUnoStruct(&quot;com.sun.star.util.URL&quot; )
+ url.Complete = DocName
+ if Left(DocName, 5 ) &lt;&gt; &quot;file:&quot; then
+ trans.parsestrict( url )
+ endif
+
+ Dim aPropArray(0) as Object
+ aPropArray(0) = CreateUnoStruct(&quot;com.sun.star.beans.PropertyValue&quot;)
+ aPropArray(0).Name = &quot;OpenFlags&quot;
+ aPropArray(0).Value = &quot;S&quot;
+
+ dim doc as object
+ dim noargs()
+ doc = StarDesktop.loadComponentFromURL( url.Complete, &quot;_blank&quot;, 0, aPropArray() ) &apos; XModel
+ LoadDoc = doc
+End Sub
+
+Sub SaveDoc (DocName as String, oDoc as Object, sFilterName as string )
+ dim trans as object
+ trans = createUnoService(&quot;com.sun.star.util.URLTransformer&quot; )
+ url = createUnoStruct(&quot;com.sun.star.util.URL&quot; )
+ url.Complete = DocName
+ if Left(DocName, 5 ) &lt;&gt; &quot;file:&quot; then
+ trans.parsestrict( url )
+ endif
+
+ if not (sFilterName = &quot;&quot;) then
+ Dim aPropArray(0) as Object
+ aPropArray(0) = CreateUnoStruct(&quot;com.sun.star.beans.PropertyValue&quot;)
+ aPropArray(0).Name = &quot;FilterName&quot;
+ aPropArray(0).Value = sFilterName
+
+ oDoc.storeAsURL( url.Complete, aPropArray() )
+ else
+ MessageBox &quot;Filtername is unknown!&quot;
+ 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
+ &apos; 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 000000000..d3452d141
--- /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 = &quot;Database Service&quot;
+const cMessageDatabaseOpen = &quot;Open Database&quot;
+const cMessageDatabaseInsert = &quot;Insert record into Database&quot;
+const cMessageDatabaseDelete = &quot;Delete record from Database&quot;
+const cMessageDatabaseSeek = &quot;Read other record from Database&quot;
+const cMessageDatabaseClose = &quot;Close Database&quot;
+
+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 = &quot;Automatic Test&quot;
+
+ On Local Error GoTo DBERROR
+
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+
+ gCurrentTestCase = cDBService
+ sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoDatabaseContext
+
+ oDBContext = CreateUnoService(cUnoDatabaseContext)
+ sDBName=&quot;Bibliography&quot; &apos;Names of Databases
+
+ gCurrentTestCase = cDBOpen
+ sCurrentMessage = cMessageDatabaseOpen
+
+ oDataSource = oDBContext.GetByName(sDBName)
+ sTable=oDataSource.Tables.ElementNames(0)
+ oDBConnection = oDBContext.GetByName(sDBName).GetConnection(&quot;&quot;,&quot;&quot;)
+
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseOpen, not IsNull (oDBConnection) )
+ if (IsNull(oDBConnection)) then
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ Exit Sub
+ End If
+
+ &apos; Database is open now
+
+ gCurrentTestCase = cDBService
+ sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoRowSet
+ oRowSet = createUnoService(cUnoRowSet)
+
+ if (IsNull(oRowSet)) then
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseService + &quot; &quot; + cUnoRowSet, not IsNull (oRowSet) )
+ Exit Sub
+ else
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseService, TRUE )
+ End If
+
+ gCurrentTestCase = cDBInsert
+ sCurrentMessage = cMessageDatabaseInsert
+
+ oRowSet.ActiveConnection = oDBConnection
+
+ oRowSet.CommandType = com.sun.star.sdb.CommandType.COMMAND
+ oRowSet.Command = &quot;SELECT * FROM &quot; + sTable
+ oRowSet.execute()
+
+ oRowSet.moveToInsertRow
+ oRowSet.updateString(5, sTestString)
+
+ oRowSet.insertRow()
+ nRowCount=oRowSet.RowCount
+
+ oRowSet.moveToCurrentRow()
+
+ bResult = (oRowSet.getString(5) = sTestString)
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseInsert, bResult )
+
+ &apos;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( &quot;Database &quot;+ cMessageDatabaseDelete, bResult )
+ End If
+
+ &apos; read other record
+
+ gCurrentTestCase = cDBSeek
+ sCurrentMessage = cMessageDatabaseSeek
+ oRowSet.first()
+ bResult = not (oRowSet.getString(5) = sTestString)
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseSeek, bResult )
+
+ gCurrentTestCase = cDBClose
+ sCurrentMessage = cMessageDatabaseClose
+ oDBConnection.Dispose()
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseClose, True )
+
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ Exit Sub &apos; Without error
+
+ DBERROR:
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
+ Exit Sub
+ else
+ LogTestResult( &quot;Database &quot;+ sCurrentMessage, FALSE )
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ End If
+ Exit Sub &apos; 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 000000000..a46449a13
--- /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 = &quot;Extension Service&quot;
+const cMessageExtensionInstall = &quot;Install Extension&quot;
+const cMessageExtensionUninstall = &quot;Uninstall Extension&quot;
+
+Sub TestExtensions
+ Dim oTestExtension as Object, obj_null as Object
+ Dim sCurrentMessage as String
+ Dim bResult as Boolean
+ Dim sImplementationNameString as String
+ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&quot;
+
+ On Local Error GoTo EXTERROR
+
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+
+ sCurrentMessage = &quot;SmokeTestCommandEnvironment (implemented in Java)&quot;
+ gCurrentTestCase = cEXTService
+
+ &apos;Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for
+ &apos;adding the extension. The implementation is in
+ &apos;smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java and the code is in smoketest.jar
+ cmdEnv = createUnoService(cUnoSmoketestCommandEnvironment)
+
+ &apos;Create the component context and then get the singleton ExtensionManager
+ &apos;A singleton cannot be created with createUnoService
+ sCurrentMessage = cMessageExtensionService
+ ctx = getDefaultContext
+ ext_mgr = ctx.getValueByName(&quot;/singletons/&quot; + cExtensionManager)
+
+ LogTestResult( &quot;Extension &quot;+ cMessageExtensionService, not IsNull (ext_mgr) )
+ if (IsNull(ext_mgr)) then
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ Exit Sub
+ End If
+
+ sCurrentMessage = cMessageExtensionInstall
+ gCurrentTestCase = cEXTInstall
+
+ &apos;Add the extension. We must provide a file URL here.
+ &apos;By passing &quot;user&quot; we determine that the actions we perform on
+ &apos;XExtensionManager only affect the user installation. To modify the share installation one would pass &quot;share&quot;.
+
+ Dim props() as Object
+ ext_mgr.addExtension(sExtensionURL, props, &quot;user&quot;, obj_null, cmdEnv)
+
+ &apos;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( &quot;Extension &quot;+ cMessageExtensionInstall, bResult )
+ if (not bResult) then
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ Exit Sub
+ End If
+
+ sCurrentMessage = cMessageExtensionUninstall
+ gCurrentTestCase = cEXTUninstall
+
+ &apos;Remove the package
+ ext_mgr.removeExtension(&quot;org.libreoffice.smoketest.TestExtension&quot;, cExtensionFileName, &quot;user&quot;,obj_null, cmdEnv)
+
+ &apos;Try to create the service which is contained in the now removed extension.
+ oTestExtension = createUnoService(cUnoSmoketestTestExtension)
+
+ &apos;The service must not be available anymore. Therefore isNull must return true.
+ LogTestResult( &quot;Extension &quot;+ cMessageExtensionUninstall, IsNull (oTestExtension) )
+
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ Exit Sub &apos; Without error
+
+ EXTERROR:
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
+ Exit Sub
+ else
+ LogTestResult( &quot;Extension &quot;+ sCurrentMessage, False )
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ End If
+ Exit Sub &apos; 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 000000000..e91b91fda
--- /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 000000000..9d2b85bca
--- /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 000000000..69308d7a4
--- /dev/null
+++ b/smoketest/data/Dialogs/Standard/OptionsDlg.xml
@@ -0,0 +1,54 @@
+<?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="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&amp;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 000000000..a03595567
--- /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 000000000..9d2b85bca
--- /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/META-INF/manifest.xml b/smoketest/data/META-INF/manifest.xml
new file mode 100644
index 000000000..f515ffa84
--- /dev/null
+++ b/smoketest/data/META-INF/manifest.xml
@@ -0,0 +1,40 @@
+<?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 manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
+<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
+ <manifest:file-entry manifest:media-type="application/vnd.sun.xml.writer" manifest:full-path="/"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Dialogs/dialog-lc.xml"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Dialogs/Standard/dialog-lb.xml"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Dialogs/Standard/OptionsDlg.xml"/>
+ <manifest:file-entry manifest:media-type="" manifest:full-path="Dialogs/Standard/"/>
+ <manifest:file-entry manifest:media-type="" manifest:full-path="Dialogs/"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="content.xml"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/Global.xml"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/Events.xml"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/Test_DB.xml"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/script-lb.xml"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/Test_10er.xml"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/Test_Ext.xml"/>
+ <manifest:file-entry manifest:media-type="" manifest:full-path="Basic/Standard/"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/script-lc.xml"/>
+ <manifest:file-entry manifest:media-type="" manifest:full-path="Basic/"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="styles.xml"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="meta.xml"/>
+ <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="settings.xml"/>
+</manifest:manifest>
diff --git a/smoketest/data/content.xml b/smoketest/data/content.xml
new file mode 100644
index 000000000..fc43425f9
--- /dev/null
+++ b/smoketest/data/content.xml
@@ -0,0 +1,103 @@
+<?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 .
+ -->
+<office:document-content xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" office:version="1.2" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl" office:class="text">
+ <office:script/>
+ <office:font-decls>
+ <style:font-decl style:name="Arial Unicode MS" fo:font-family="&apos;Arial Unicode MS&apos;" style:font-pitch="variable"/>
+ <style:font-decl style:name="HG Mincho Light J" fo:font-family="&apos;HG Mincho Light J&apos;, &apos;MS Mincho&apos;, &apos;HG Mincho J&apos;, &apos;HG Mincho L&apos;, &apos;HG Mincho&apos;, Mincho, &apos;MS PMincho&apos;, &apos;MS Gothic&apos;, &apos;HG Gothic J&apos;, &apos;HG Gothic B&apos;, &apos;HG Gothic&apos;, Gothic, &apos;MS PGothic&apos;, &apos;Andale Sans UI&apos;, &apos;Arial Unicode MS&apos;, &apos;Lucida Sans Unicode&apos;, Tahoma" style:font-pitch="variable"/>
+ <style:font-decl style:name="Thorndale" fo:font-family="Thorndale, &apos;Times New Roman&apos;, Times, &apos;Lucida Serif&apos;, &apos;Lucida Bright&apos;, Timmons, &apos;New York&apos;, Serif" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-decl style:name="Arial" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-decls>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph">
+ <style:properties fo:text-align="center"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphics">
+ <style:properties style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:forms form:automatic-focus="true" form:apply-design-mode="false">
+ <form:form form:name="Standard" form:apply-filter="true" form:command-type="table" form:service-name="com.sun.star.form.component.Form" office:target-frame="" xlink:href="">
+ <form:control form:name="start" form:service-name="com.sun.star.form.component.CommandButton" form:id="control1">
+ <form:button form:label="start smoketest" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="DefaultControl" form:property-type="string">
+ <form:property-value>stardiv.one.form.control.CommandButton</form:property-value>
+ </form:property>
+ </form:properties>
+ <office:events>
+ <script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.StartTestByOptions" script:location="document" script:library="document"/>
+ </office:events>
+ </form:button>
+ </form:control>
+ <form:control form:name="options" form:service-name="com.sun.star.form.component.CommandButton" form:id="control2">
+ <form:button form:label="options" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="DefaultControl" form:property-type="string">
+ <form:property-value>stardiv.one.form.control.CommandButton</form:property-value>
+ </form:property>
+ </form:properties>
+ <office:events>
+ <script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.ShowOptionsDlg" script:location="document" script:library="document"/>
+ </office:events>
+ </form:button>
+ </form:control>
+ <form:control form:name="table" form:service-name="com.sun.star.form.component.CommandButton" form:id="control3">
+ <form:button form:label="delete table" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="DefaultControl" form:property-type="string">
+ <form:property-value>stardiv.one.form.control.CommandButton</form:property-value>
+ </form:property>
+ </form:properties>
+ <office:events>
+ <script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.ClearAllText" script:location="document" script:library="document"/>
+ </office:events>
+ </form:button>
+ </form:control>
+ </form:form>
+ </office:forms>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ </text:sequence-decls>
+ <text:user-field-decls>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Writer"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Calc"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Impress"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Draw"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="HTML"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Math"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Chart"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Macros"/>
+ <text:user-field-decl text:value-type="string" text:string-value="n" text:name="Terminate"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Java"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpen8"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Database"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Extension"/>
+ </text:user-field-decls>
+ <text:p text:style-name="Standard">
+ <draw:control text:anchor-type="page" text:anchor-page-number="1" svg:x="2cm" svg:y="2cm" draw:z-index="1" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control1"/>
+ <draw:control text:anchor-type="page" text:anchor-page-number="1" svg:x="5cm" svg:y="2cm" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control2"/>
+ <draw:control text:anchor-type="page" text:anchor-page-number="1" svg:x="8cm" svg:y="2cm" draw:z-index="2" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control3"/>
+ </text:p>
+ </office:body>
+</office:document-content>
diff --git a/smoketest/data/meta.xml b/smoketest/data/meta.xml
new file mode 100644
index 000000000..56c652335
--- /dev/null
+++ b/smoketest/data/meta.xml
@@ -0,0 +1,33 @@
+<?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 .
+ -->
+<office:document-meta xmlns:office="http://openoffice.org/2000/office" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:ooo="http://openoffice.org/2004/office" xmlns:grddl="http://www.w3.org/2003/g/data-view#" office:version="1.2" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl">
+ <office:meta>
+ <meta:generator>Oracle_Open_Office/3.2$Win32 OpenOffice.org_project/300m77$Build-9496$CWS-renaissance2</meta:generator>
+ <meta:creation-date>2001-06-08T15:59:03</meta:creation-date>
+ <dc:date>2007-01-18T12:45:22</dc:date>
+ <dc:language>de-DE</dc:language>
+ <meta:editing-cycles>0</meta:editing-cycles>
+ <meta:editing-duration>PT0S</meta:editing-duration>
+ <meta:user-defined meta:name="Info 0"/>
+ <meta:user-defined meta:name="Info 2"/>
+ <meta:user-defined meta:name="Info 3"/>
+ <meta:user-defined meta:name="Info 4"/>
+ <meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="0" meta:character-count="3"/>
+ </office:meta>
+</office:document-meta>
diff --git a/smoketest/data/mimetype b/smoketest/data/mimetype
new file mode 100644
index 000000000..9df49bfcd
--- /dev/null
+++ b/smoketest/data/mimetype
@@ -0,0 +1 @@
+application/vnd.sun.xml.writer \ No newline at end of file
diff --git a/smoketest/data/settings.xml b/smoketest/data/settings.xml
new file mode 100644
index 000000000..284db0962
--- /dev/null
+++ b/smoketest/data/settings.xml
@@ -0,0 +1,109 @@
+<?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 .
+ -->
+<office:document-settings xmlns:office="http://openoffice.org/2000/office" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="http://openoffice.org/2001/config" xmlns:ooo="http://openoffice.org/2004/office" office:version="1.2">
+ <office:settings>
+ <config:config-item-set config:name="view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="int">0</config:config-item>
+ <config:config-item config:name="ViewAreaLeft" config:type="int">0</config:config-item>
+ <config:config-item config:name="ViewAreaWidth" config:type="int">36382</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="int">17120</config:config-item>
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+ <config:config-item config:name="ViewLeft" config:type="int">17120</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="int">3002</config:config-item>
+ <config:config-item config:name="VisibleLeft" config:type="int">0</config:config-item>
+ <config:config-item config:name="VisibleTop" config:type="int">0</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="int">36380</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="int">17119</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="configuration-settings">
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary">GgX+/01pY3Jvc29mdCBYUFMgRG9jdW1lbnQgV3JpdGVyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATWljcm9zb2Z0IFhQUyBEb2N1bWVudCBXcml0ZXIAAAAWAAEAPAQAAAAAAAAFAFZUAAAkbQAAM1ROVwIACABNAGkAYwByAG8AcwBvAGYAdAAgAFgAUABTACAARABvAGMAdQBtAGUAbgB0ACAAVwByAGkAdABlAHIAAAAAAAAAAQQABtwAWAMD/wAAAQABAJoLNAhkAAEADwBYAgIAAQBYAgIAAABBADQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAACAAAAAQAAAP////8AAAAAAAAAAAAAAAAAAAAARElOVSIAEAFMAwwAytL2cgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAQAQAAU01USgAAAAAQAAABTQBpAGMAcgBvAHMAbwBmAHQAIABYAFAAUwAgAEQAbwBjAHUAbQBlAG4AdAAgAFcAcgBpAHQAZQByAAAASW5wdXRCaW4ARk9STVNPVVJDRQBSRVNETEwAVW5pcmVzRExMAEludGVybGVhdmluZwBPRkYASW1hZ2VUeXBlAEpQRUdNZWQAT3JpZW50YXRpb24AUE9SVFJBSVQAQ29sbGF0ZQBPRkYAUmVzb2x1dGlvbgBPcHRpb24xAFBhcGVyU2l6ZQBMRVRURVIAQ29sb3JNb2RlADI0YnBwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAABNWERXAQEAABIAQ09NUEFUX0RVUExFWF9NT0RFDgBEVVBMRVhfVU5LTk9XTg==</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string">Adreßbuch</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string">adressen</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string">Microsoft XPS Document Writer</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">disabled</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">false</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+</office:document-settings>
diff --git a/smoketest/data/styles.xml b/smoketest/data/styles.xml
new file mode 100644
index 000000000..d3ed484ed
--- /dev/null
+++ b/smoketest/data/styles.xml
@@ -0,0 +1,115 @@
+<?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 .
+ -->
+<office:document-styles xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" office:version="1.2" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl">
+ <office:font-decls>
+ <style:font-decl style:name="Arial Unicode MS" fo:font-family="'Arial Unicode MS'" style:font-pitch="variable"/>
+ <style:font-decl style:name="HG Mincho Light J" fo:font-family="'HG Mincho Light J', 'MS Mincho', 'HG Mincho J', 'HG Mincho L', 'HG Mincho', Mincho, 'MS PMincho', 'MS Gothic', 'HG Gothic J', 'HG Gothic B', 'HG Gothic', Gothic, 'MS PGothic', 'Andale Sans UI', 'Arial Unicode MS', 'Lucida Sans Unicode', Tahoma" style:font-pitch="variable"/>
+ <style:font-decl style:name="Thorndale" fo:font-family="Thorndale, 'Times New Roman', Times, 'Lucida Serif', 'Lucida Bright', Timmons, 'New York', Serif" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-decl style:name="Arial" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-decls>
+ <office:styles>
+ <style:default-style style:family="graphics">
+ <style:properties draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false" fo:color="#000000" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none">
+ <style:tab-stops/>
+ </style:properties>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="lr-tb" fo:color="#000000" style:font-name="Thorndale" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="HG Mincho Light J" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Arial Unicode MS" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:properties table:border-model="separating"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:properties fo:keep-together="always"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:properties fo:margin-top="0cm" fo:margin-bottom="0.212cm"/>
+ </style:style>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text body" style:class="text">
+ <style:properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:keep-with-next="true" style:font-name="Arial" fo:font-size="14pt"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text body" style:class="list"/>
+ <style:style style:name="Table Contents" style:family="paragraph" style:parent-style-name="Text body" style:class="extra"/>
+ <style:style style:name="Table Heading" style:family="paragraph" style:parent-style-name="Table Contents" style:class="extra">
+ <style:properties fo:text-align="center" style:justify-single-word="false" fo:font-style="italic" fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" fo:font-size="10pt" fo:font-style="italic"/>
+ </style:style>
+ <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index"/>
+ <style:style style:name="Footnote Symbol" style:family="text"/>
+ <style:style style:name="Endnote Symbol" style:family="text"/>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:properties/>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:footnotes-configuration text:citation-style-name="Footnote Symbol" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/>
+ <text:endnotes-configuration text:citation-style-name="Endnote Symbol" text:master-page-name="Endnote" style:num-format="1" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:page-master style:name="Mpm1">
+ <style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-master>
+ <style:page-master style:name="Mpm2">
+ <style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-master>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-master-name="Mpm1"/>
+ <style:master-page style:name="Endnote" style:page-master-name="Mpm2"/>
+ </office:master-styles>
+</office:document-styles>
diff --git a/smoketest/org/libreoffice/smoketest/Services.java b/smoketest/org/libreoffice/smoketest/Services.java
new file mode 100644
index 000000000..4f74769e1
--- /dev/null
+++ b/smoketest/org/libreoffice/smoketest/Services.java
@@ -0,0 +1,51 @@
+/*
+ * 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 .
+ */
+
+package org.libreoffice.smoketest;
+
+import com.sun.star.lib.uno.helper.Factory;
+import com.sun.star.lang.XSingleComponentFactory;
+
+/** This class is the registration class for all services in this module.
+ *
+ * Note that not all files which can be used as service need to be registered
+ * by this class.
+ */
+public class Services {
+
+ /**
+ * Gives a factory for creating the service.
+ * This method is called by the <code>JavaLoader</code>
+ * <p>
+ * @return returns a <code>XSingleComponentFactory</code> for creating
+ * the component
+ * @param sImplName the name of the implementation for which a
+ * service is desired
+ * @see com.sun.star.comp.loader.JavaLoader
+ */
+ public static XSingleComponentFactory __getComponentFactory(String sImplName)
+ {
+ XSingleComponentFactory xFactory = null;
+
+ if ( sImplName.equals( SmoketestCommandEnvironment.class.getName() ) )
+ xFactory = Factory.createComponentFactory(SmoketestCommandEnvironment.class,
+ SmoketestCommandEnvironment.getServiceNames());
+
+ return xFactory;
+ }
+}
diff --git a/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java b/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java
new file mode 100644
index 000000000..8d6fdb2e4
--- /dev/null
+++ b/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java
@@ -0,0 +1,108 @@
+/*
+ * 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 .
+ */
+
+package org.libreoffice.smoketest;
+
+import com.sun.star.lib.uno.helper.WeakBase;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.ucb.XCommandEnvironment;
+
+/** This service is for use by the smoketest which checks the installation of
+ * extensions. The service provides the XCommandEnvironment interface, which
+ * is needed for adding extensions.
+ */
+public class SmoketestCommandEnvironment extends WeakBase
+ implements XServiceInfo, XCommandEnvironment {
+
+ private static final String __serviceName =
+ "com.sun.star.deployment.test.SmoketestCommandEnvironment";
+
+ public static String[] getServiceNames() {
+ String[] sSupportedServiceNames = { __serviceName};
+ return sSupportedServiceNames;
+ }
+
+ //XServiceInfo -------------------------------------------------------------
+ public String[] getSupportedServiceNames() {
+ return getServiceNames();
+ }
+
+
+ public boolean supportsService( String sServiceName ) {
+ boolean bSupported = false;
+ if (sServiceName.equals(__serviceName))
+ bSupported = true;
+ return bSupported;
+ }
+
+ public String getImplementationName() {
+ return SmoketestCommandEnvironment.class.getName();
+ }
+
+ //XCommandEnvironment ================================================
+ public com.sun.star.task.XInteractionHandler getInteractionHandler()
+ {
+ return new InteractionImpl();
+ }
+
+ public com.sun.star.ucb.XProgressHandler getProgressHandler()
+ {
+ return new ProgressImpl();
+ }
+}
+
+
+
+
+class InteractionImpl implements com.sun.star.task.XInteractionHandler
+{
+ public void handle( com.sun.star.task.XInteractionRequest xRequest )
+ {
+ boolean approve = true;
+
+ com.sun.star.task.XInteractionContinuation[] conts = xRequest.getContinuations();
+ for (int i = 0; i < conts.length; i++)
+ {
+ if (approve)
+ {
+ com.sun.star.task.XInteractionApprove xApprove =
+ UnoRuntime.queryInterface(com.sun.star.task.XInteractionApprove.class, conts[i]);
+ if (xApprove != null)
+ xApprove.select();
+ //don't query again for ongoing extensions
+ approve = false;
+ }
+ }
+ }
+}
+
+class ProgressImpl implements com.sun.star.ucb.XProgressHandler
+{
+ public void push(Object status)
+ {
+ }
+
+ public void update(Object status)
+ {
+ }
+
+ public void pop()
+ {
+ }
+}
diff --git a/smoketest/org/libreoffice/smoketest/manifest b/smoketest/org/libreoffice/smoketest/manifest
new file mode 100644
index 000000000..88cb26f5b
--- /dev/null
+++ b/smoketest/org/libreoffice/smoketest/manifest
@@ -0,0 +1,3 @@
+Sealed: true
+RegistrationClassName: org.libreoffice.smoketest.Services
+UNO-Type-Path:
diff --git a/smoketest/org/libreoffice/smoketest/smoketest.component b/smoketest/org/libreoffice/smoketest/smoketest.component
new file mode 100644
index 000000000..fa7d8f100
--- /dev/null
+++ b/smoketest/org/libreoffice/smoketest/smoketest.component
@@ -0,0 +1,25 @@
+<?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 .
+ -->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.libreoffice.smoketest.SmoketestCommandEnvironment">
+ <service name="com.sun.star.deployment.test.SmoketestCommandEnvironment"/>
+ </implementation>
+</component>
diff --git a/smoketest/smoketest.cxx b/smoketest/smoketest.cxx
new file mode 100644
index 000000000..80a29036f
--- /dev/null
+++ b/smoketest/smoketest.cxx
@@ -0,0 +1,199 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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 .
+ */
+
+#include <sal/types.h>
+#include <chrono>
+#include <com/sun/star/awt/AsyncCallback.hpp>
+#include <com/sun/star/awt/XCallback.hpp>
+#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/document/MacroExecMode.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/frame/DispatchResultEvent.hpp>
+#include <com/sun/star/frame/DispatchResultState.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XDispatchResultListener.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XNotifyingDispatch.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/util/URL.hpp>
+#include <cppuhelper/implbase.hxx>
+#include <cppunit/TestAssert.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include <osl/conditn.hxx>
+#include <osl/diagnose.h>
+#include <osl/time.h>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+#include <unotest/gettestargument.hxx>
+#include <unotest/officeconnection.hxx>
+#include <unotest/toabsolutefileurl.hxx>
+
+namespace {
+
+struct Result {
+ osl::Condition condition;
+ bool success;
+ OUString result;
+ Result()
+ : success(false)
+ {
+ }
+ Result(const Result&) = delete;
+ Result& operator=(const Result&) = delete;
+};
+
+class Listener:
+ public cppu::WeakImplHelper< css::frame::XDispatchResultListener >
+{
+public:
+ explicit Listener(Result * result): result_(result) { OSL_ASSERT(result != nullptr); }
+
+private:
+ virtual void SAL_CALL disposing(css::lang::EventObject const &) override {}
+
+ virtual void SAL_CALL dispatchFinished(
+ css::frame::DispatchResultEvent const & Result) override;
+
+ Result * result_;
+};
+
+void Listener::dispatchFinished(css::frame::DispatchResultEvent const & Result)
+{
+ result_->success =
+ (Result.State == css::frame::DispatchResultState::SUCCESS) &&
+ (Result.Result >>= result_->result);
+ result_->condition.set();
+}
+
+class Callback: public cppu::WeakImplHelper< css::awt::XCallback > {
+public:
+ Callback(
+ css::uno::Reference< css::frame::XNotifyingDispatch > const & dispatch,
+ css::util::URL const & url,
+ css::uno::Sequence< css::beans::PropertyValue > const & arguments,
+ css::uno::Reference< css::frame::XDispatchResultListener > const &
+ listener):
+ dispatch_(dispatch), url_(url), arguments_(arguments),
+ listener_(listener)
+ { OSL_ASSERT(dispatch.is()); }
+
+private:
+ virtual void SAL_CALL notify(css::uno::Any const &) override
+ { dispatch_->dispatchWithNotification(url_, arguments_, listener_); }
+
+ css::uno::Reference< css::frame::XNotifyingDispatch > dispatch_;
+ css::util::URL url_;
+ css::uno::Sequence< css::beans::PropertyValue > arguments_;
+ css::uno::Reference< css::frame::XDispatchResultListener > listener_;
+};
+
+class Test: public CppUnit::TestFixture {
+public:
+ virtual void setUp() override;
+
+ virtual void tearDown() override;
+
+private:
+ CPPUNIT_TEST_SUITE(Test);
+ CPPUNIT_TEST(test);
+ CPPUNIT_TEST_SUITE_END();
+
+ void test();
+
+ test::OfficeConnection connection_;
+};
+
+void Test::setUp() {
+ connection_.setUp();
+}
+
+void Test::tearDown() {
+ connection_.tearDown();
+}
+
+void Test::test() {
+ OUString doc;
+ CPPUNIT_ASSERT(
+ test::getTestArgument(
+ u"smoketest.doc", &doc));
+ css::uno::Sequence< css::beans::PropertyValue > args{
+ { /* Name */ "MacroExecutionMode",
+ /* Handle */ -1,
+ /* Value */ css::uno::Any(css::document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN),
+ /* State */ css::beans::PropertyState_DIRECT_VALUE },
+ { /* Name */ "ReadOnly",
+ /* Handle */ -1,
+ /* Value */ css::uno::Any(true),
+ /* State */ css::beans::PropertyState_DIRECT_VALUE }
+ };
+ css::util::URL url;
+ url.Complete = "vnd.sun.star.script:Standard.Global.StartTestWithDefaultOptions?"
+ "language=Basic&location=document";
+
+ css::uno::Reference< css::frame::XDesktop2 > xDesktop = css::frame::Desktop::create(connection_.getComponentContext());
+
+ css::uno::Reference< css::frame::XNotifyingDispatch > disp(
+ css::uno::Reference< css::frame::XDispatchProvider >(
+ css::uno::Reference< css::frame::XController >(
+ css::uno::Reference< css::frame::XModel >(
+ xDesktop->loadComponentFromURL(
+ test::toAbsoluteFileUrl(doc),
+ "_default",
+ 0, args),
+ css::uno::UNO_QUERY_THROW)->getCurrentController(),
+ css::uno::UNO_SET_THROW)->getFrame(),
+ css::uno::UNO_QUERY_THROW)->queryDispatch(
+ url, "_self", 0),
+ css::uno::UNO_QUERY_THROW);
+ Result result;
+ // Shifted to main thread to work around potential deadlocks (i112867):
+ css::awt::AsyncCallback::create(
+ connection_.getComponentContext())->addCallback(
+ new Callback(
+ disp, url, css::uno::Sequence< css::beans::PropertyValue >(),
+ new Listener(&result)),
+ css::uno::Any());
+ // Wait for result.condition or connection_ going stale:
+ for (;;) {
+ osl::Condition::Result res = result.condition.wait(std::chrono::seconds(1)); // 1 sec delay
+ if (res == osl::Condition::result_ok) {
+ break;
+ }
+ CPPUNIT_ASSERT_EQUAL(osl::Condition::result_timeout, res);
+ CPPUNIT_ASSERT(connection_.isStillAlive());
+ }
+ CPPUNIT_ASSERT(result.success);
+ CPPUNIT_ASSERT_EQUAL(OUString(), result.result);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
+
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/smoketest/smoketest_too.cxx b/smoketest/smoketest_too.cxx
new file mode 100644
index 000000000..8c54d2554
--- /dev/null
+++ b/smoketest/smoketest_too.cxx
@@ -0,0 +1 @@
+#include "smoketest.cxx"