[Libreoffice-commits] core.git: Branch 'feature/dialog-screenshots' - 1443 commits - accessibility/inc accessibility/source animations/source avmedia/inc avmedia/Library_avmedia.mk avmedia/Module_avmedia.mk avmedia/source basctl/CppunitTest_basctl_dialogs_test.mk basctl/inc basctl/Module_basctl.mk basctl/qa basctl/source basctl/uiconfig basegfx/source basegfx/test basic/inc basic/qa basic/source binaryurp/source bin/gbuild-to-ide bin/get-bugzilla-attachments-by-mimetype bin/odfvalidator.sh.in bin/officeotron.sh.in bin/upload_symbols.py bridges/Library_cpp_uno.mk bridges/source canvas/source chart2/CppunitTest_chart2_dialogs_test.mk chart2/CppunitTest_chart2_export.mk chart2/CppunitTest_chart2_import.mk chart2/CppunitTest_chart2_trendcalculators.mk chart2/inc chart2/Library_chartcontroller.mk chart2/Library_chartcore.mk chart2/Module_chart2.mk chart2/qa chart2/source chart2/uiconfig chart2/workbench codemaker/source comphelper/qa comphelper/source comphelper/util compilerplugins/clang config_host/ config_features.h.in config_host/config_writerperfect.h.in config_host.mk.in configmgr/qa configmgr/source configure.ac connectivity/qa connectivity/source cppcanvas/CppunitTest_cppcanvas_emfplus.mk cppcanvas/CppunitTest_cppcanvas_test.mk cppuhelper/source cppu/source cui/CppunitTest_cui_dialogs_test.mk cui/Library_cui.mk cui/Module_cui.mk cui/qa cui/source cui/uiconfig cui/UIConfig_cui.mk dbaccess/CppunitTest_dbaccess_dialog_save.mk dbaccess/CppunitTest_dbaccess_dialogs_test.mk dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk dbaccess/CppunitTest_dbaccess_firebird_test.mk dbaccess/CppunitTest_dbaccess_hsqldb_test.mk dbaccess/CppunitTest_dbaccess_macros_test.mk dbaccess/CppunitTest_dbaccess_nolib_save.mk dbaccess/CppunitTest_dbaccess_RowSetClones.mk dbaccess/Module_dbaccess.mk dbaccess/qa dbaccess/source dbaccess/uiconfig dbaccess/win32 desktop/CppunitTest_desktop_app.mk desktop/CppunitTest_desktop_dialogs_test.mk desktop/CppunitTest_desktop_lib.mk desktop/inc desktop/Library_depl oyment.mk desktop/Library_sofficeapp.mk desktop/Module_desktop.mk desktop/qa desktop/source desktop/unx desktop/win32 dictionaries distro-configs/Jenkins download.lst drawinglayer/CppunitTest_drawinglayer_border.mk drawinglayer/source dtrans/source editeng/CppunitTest_editeng_core.mk editeng/source embeddedobj/source extensions/source extensions/uiconfig external/curl external/expat external/icu external/jpeg-turbo external/lcms2 external/libcmis external/libexttextcat external/libodfgen external/libstaroffice external/libxmlsec external/lpsolve external/Module_external.mk external/more_fonts external/poppler external/python3 external/python33 external/twain extras/Module_extras.mk extras/Package_tpllayoutimpr.mk extras/Package_tplpresnt.mk extras/source filter/Configuration_filter.mk filter/CppunitTest_filter_dialogs_test.mk filter/CppunitTest_filter_eps_test.mk filter/Module_filter.mk filter/qa filter/source forms/source formula/CppunitTest_formula_dialogs_test.mk formula/Module_f ormula.mk formula/qa formula/source fpicker/CppunitTest_fpicker_dialogs_test.mk fpicker/Module_fpicker.mk fpicker/qa fpicker/source framework/inc framework/Library_fwl.mk framework/qa framework/source framework/uiconfig framework/util .gitignore helpcontent2 hwpfilter/source i18nlangtag/source i18npool/inc i18npool/qa i18npool/source icon-themes/breeze icon-themes/breeze_svg icon-themes/galaxy icon-themes/hicontrast icon-themes/sifr icon-themes/tango icon-themes/tango_testing idlc/inc idlc/source idl/inc include/avmedia include/basegfx include/basic include/codemaker include/comphelper include/connectivity include/cppuhelper include/drawinglayer include/editeng include/filter include/formula include/framework include/i18nlangtag include/LibreOfficeKit include/onlineupdate include/oox include/opencl include/registry include/rsc include/sal include/sax include/sfx2 include/sot include/svl include/svtools include/svx include/test include/toolkit include/tools include/ucbhelper include/ unotools include/vbahelper include/vcl include/xmloff instsetoo_native/CustomTarget_install.mk instsetoo_native/CustomTarget_setup.mk instsetoo_native/util io/source jvmfwk/inc jvmfwk/plugins jvmfwk/source l10ntools/inc l10ntools/source librelogo/source libreofficekit/qa libreofficekit/source lingucomponent/source linguistic/source lotuswordpro/source Makefile.fetch Makefile.in mysqlc/source odk/examples odk/settings offapi/com offapi/UnoApi_offapi.mk officecfg/Configuration_officecfg.mk officecfg/files.mk officecfg/registry onlineupdate/source oox/inc oox/source opencl/inc opencl/Library_opencl.mk opencl/source package/inc package/qa package/source postprocess/CppunitTest_services.mk postprocess/CustomTarget_registry.mk postprocess/CustomTarget_signing.mk postprocess/Rdb_services.mk pyuno/source qadevOOo/objdsc qadevOOo/tests readlicense_oo/license registry/Module_registry.mk registry/source reportdesign/CppunitTest_reportdesign_dialogs_test.mk reportdesign/inc reportdesign/Module_ reportdesign.mk reportdesign/qa reportdesign/source reportdesign/uiconfig RepositoryExternal.mk Repository.mk RepositoryModule_host.mk rsc/inc rsc/source sal/cpprt sal/osl sal/qa sal/rtl sax/CppunitTest_sax_parser.mk sax/CppunitTest_sax_xmlimport.mk sax/qa sax/source scaddins/source sccomp/CppunitTest_sccomp_lpsolver.mk sc/CppunitTest_sc_annotationobj.mk sc/CppunitTest_sc_annotationsobj.mk sc/CppunitTest_sc_bugfix_test.mk sc/CppunitTest_sc_cellrangeobj.mk sc/CppunitTest_sc_condformats.mk sc/CppunitTest_sc_copypaste.mk sc/CppunitTest_sc_databaserangeobj.mk sc/CppunitTest_sc_datapilotfieldobj.mk sc/CppunitTest_sc_datapilottableobj.mk sc/CppunitTest_sc_filters_test.mk sc/CppunitTest_sc_functions_test.mk sc/CppunitTest_sc_html_export_test.mk sc/CppunitTest_sc_macros_test.mk sc/CppunitTest_sc_modelobj.mk sc/CppunitTest_sc_namedrangeobj.mk sc/CppunitTest_sc_namedrangesobj.mk sc/CppunitTest_sc_new_cond_format_api.mk sc/CppunitTest_sc_opencl_test.mk sc/CppunitTest_sc_outlineobj.mk sc/Cppuni tTest_sc_recordchanges.mk sc/CppunitTest_sc_screenshots.mk sc/CppunitTest_sc_styleloaderobj.mk sc/CppunitTest_sc_subsequent_export_test.mk sc/CppunitTest_sc_subsequent_filters_test.mk sc/CppunitTest_sc_tablesheetobj.mk sc/CppunitTest_sc_tablesheetsobj.mk sc/inc sc/Library_sc.mk sc/Module_sc.mk scp2/InstallModule_impress.mk scp2/source sc/Package_opencl.mk sc/qa scripting/source sc/sdi sc/source sc/uiconfig sc/UIConfig_scalc.mk sd/CppunitTest_sd_dialogs_test.mk sd/CppunitTest_sd_filters_test.mk sd/CppunitTest_sd_html_export_tests.mk sd/CppunitTest_sd_import_tests.mk sd/CppunitTest_sd_misc_tests.mk sdext/source sd/inc sd/Library_sd.mk sd/Module_sd.mk sd/qa sd/sdi sd/source sd/uiconfig sd/UIConfig_simpress.mk sfx2/classification sfx2/CppunitTest_sfx2_dialogs_test.mk sfx2/emojiconfig sfx2/inc sfx2/Library_sfx.mk sfx2/Module_sfx2.mk sfx2/Package_classification.mk sfx2/Package_emoji.mk sfx2/qa sfx2/sdi sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk shell/source slideshow/Library_slideshow .mk slideshow/Module_slideshow.mk slideshow/source solenv/bin solenv/gbuild solenv/gdb sot/source starmath/CppunitTest_starmath_dialogs_test.mk starmath/CppunitTest_starmath_export.mk starmath/CppunitTest_starmath_import.mk starmath/CppunitTest_starmath_qa_cppunit.mk starmath/inc starmath/Library_sm.mk starmath/Module_starmath.mk starmath/qa starmath/source starmath/uiconfig stoc/source store/source svgio/inc svgio/qa svgio/source svl/qa svl/source svtools/CppunitTest_svtools_dialogs_test.mk svtools/inc svtools/Module_svtools.mk svtools/qa svtools/source svtools/uiconfig svx/CppunitTest_svx_dialogs_test.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/Module_svx.mk svx/qa svx/README svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk sw/CppunitTest_sw_dialogs_test.mk sw/CppunitTest_sw_htmlexport.mk sw/CppunitTest_sw_macros_test.mk sw/CppunitTest_sw_mailmerge.mk sw/CppunitTest_sw_ooxmlimport.mk sw/CppunitTest_sw_rtfimport.mk sw/CppunitTest_sw_uwriter.mk sw/CppunitTest_sw_ww8e xport.mk sw/CppunitTest_sw_ww8import.mk sw/inc sw/Library_sw.mk sw/Module_sw.mk sw/qa sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk sysui/desktop test/Library_test.mk test/source testtools/source toolkit/Library_tk.mk toolkit/source tools/CppunitTest_tools_test.mk tools/inc tools/Library_tl.mk tools/qa tools/source translations ucb/CppunitTest_ucb_webdav_neon_opts.mk ucbhelper/source ucb/Library_ucpdav1.mk ucb/Module_ucb.mk ucb/qa ucb/source uitest/calc_tests uitest/demo_ui uitest/helper.py uitest/impress_tests uitest/libreoffice uitest/math_tests uitest/Module_uitest.mk uitest/test_main.py uitest/uitest uitest/uitest_helper.py uitest/UITest_math_demo.mk uitest/writer_tests UnoControls/source unodevtools/source unoidl/source unotools/Library_utl.mk unotools/source unoxml/source uui/CppunitTest_uui_dialogs_test.mk uui/Module_uui.mk uui/qa uui/source vbahelper/source vcl/CppunitTest_vcl_bitmap_test.mk vcl/CppunitTest_vcl_dialogs_test.mk vcl/CppunitTest_vcl_filters_test.mk vcl/Ex ecutable_icontest.mk vcl/Executable_vcldemo.mk vcl/headless vcl/inc vcl/ios vcl/Library_vcl.mk vcl/Module_vcl.mk vcl/opengl vcl/osx vcl/qa vcl/quartz vcl/source vcl/unx vcl/win vcl/workben wizards/com writerfilter/inc writerfilter/qa writerfilter/source writerperfect/inc writerperfect/Library_wpftcalc.mk writerperfect/Library_wpftdraw.mk writerperfect/Library_wpftwriter.mk writerperfect/qa writerperfect/source xmlhelp/source xmloff/CppunitTest_xmloff_tokenmap.mk xmloff/CppunitTest_xmloff_uxmloff.mk xmloff/CustomTarget_generated.mk xmloff/inc xmloff/Library_xo.mk xmloff/Module_xmloff.mk xmloff/qa xmloff/source xmlscript/source xmlsecurity/CppunitTest_xmlsecurity_dialogs_test.mk xmlsecurity/Library_xsec_xmlsec.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source xmlsecurity/workben
Armin Le Grand
Armin.Le.Grand at cib.de
Wed Aug 17 16:28:41 UTC 2016
Rebased ref, commits from common ancestor:
commit 7e4cf5bd2880724329ae467e5e23faddc157947c
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Wed Aug 17 18:22:03 2016 +0200
Resync to master & adaptions
Change-Id: Ib3d58165c3727c011ff65a7ef1bfb00f3ba7b4cb
diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx
index 8edeca8..97fa0af 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -42,7 +42,6 @@
#include <scitems.hxx>
using namespace css;
-static const char* DATA_DIRECTORY = "/sc/qa/unit/screenshots/data/";
class ScScreenshotTest : public ScreenshotTest
{
@@ -53,11 +52,11 @@ private:
ScDocShellRef mxDocSh;
ScTabViewShell* mpViewShell;
ScAbstractDialogFactory* mpFact;
- std::unique_ptr<ScImportStringStream> mpStream;
+ std::unique_ptr<SvMemoryStream> mpStream;
std::unique_ptr<SfxItemSet> mpItemSet;
/// helper
- void initializeWithDoc(const char* pName);
+ void initialize();
/// helper method to populate KnownDialogs, called in setUp(). Needs to be
/// written and has to add entries to KnownDialogs
@@ -93,7 +92,7 @@ ScScreenshotTest::~ScScreenshotTest()
{
}
-void ScScreenshotTest::initializeWithDoc(const char* pName)
+void ScScreenshotTest::initialize()
{
if (mxComponent.is())
mxComponent->dispose();
@@ -113,7 +112,14 @@ void ScScreenshotTest::initializeWithDoc(const char* pName)
CPPUNIT_ASSERT_MESSAGE("Failed to create dialog factory", mpFact);
const OUString aCsv("some, strings, here, separated, by, commas");
- mpStream.reset(new ScImportStringStream(aCsv));
+ SvMemoryStream* pNewMemStream = new SvMemoryStream(const_cast<sal_Unicode *>(aCsv.getStr()), aCsv.getLength() * sizeof(sal_Unicode), StreamMode::READ);
+ pNewMemStream->SetStreamCharSet( RTL_TEXTENCODING_UNICODE );
+ #ifdef OSL_BIGENDIAN
+ pNewMemStream->SetEndian(SvStreamEndian::BIG);
+ #else
+ pNewMemStream->SetEndian(SvStreamEndian::LITTLE);
+ #endif
+ mpStream.reset(pNewMemStream);
}
void ScScreenshotTest::registerKnownDialogsByID(mapType& rKnownDialogs)
@@ -272,7 +278,7 @@ VclAbstractDialog* ScScreenshotTest::createDialogByID(sal_uInt32 nID)
void ScScreenshotTest::testOpeningModalDialogs()
{
- initializeWithDoc("empty.ods");
+ initialize();
/// process input file containing the UXMLDescriptions of the dialogs to dump
processDialogBatchFile("sc/qa/unit/screenshots/data/screenshots.txt");
commit 3a195837c1ca92bca0f3154a84fda78751342186
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Wed Aug 17 12:30:11 2016 +0200
Adapted sc screenshot test to create new document
Change-Id: I644d2fcb9fe4ec66e964192d3dda61ca331acece
diff --git a/sc/qa/unit/screenshots/data/empty.ods b/sc/qa/unit/screenshots/data/empty.ods
deleted file mode 100644
index 14b4232..0000000
Binary files a/sc/qa/unit/screenshots/data/empty.ods and /dev/null differ
diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx
index c52bbc5..8edeca8 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -72,11 +72,9 @@ public:
virtual ~ScScreenshotTest();
void testOpeningModalDialogs();
- //void testOpeningModelessDialogs();
CPPUNIT_TEST_SUITE(ScScreenshotTest);
CPPUNIT_TEST(testOpeningModalDialogs);
- //CPPUNIT_TEST(testOpeningModelessDialogs);
CPPUNIT_TEST_SUITE_END();
};
@@ -99,7 +97,8 @@ void ScScreenshotTest::initializeWithDoc(const char* pName)
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc(DATA_DIRECTORY) + OUString::createFromAscii(pName), "com.sun.star.sheet.SpreadsheetDocument");
+ // use new, epty doc to avoid file locking
+ mxComponent = loadFromDesktop("private:factory/scalc", "com.sun.star.sheet.SpreadsheetDocument");
mpFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent);
CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", mpFoundShell);
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 335c00c..99da7cc 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -21,6 +21,7 @@
#include <vcl/layout.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/tabdlg.hxx>
+#include <vcl/tabpage.hxx>
#include <tools/rc.h>
void TabDialog::ImplInitTabDialogData()
commit 1dd07de59c6f67b388dd206cbb1d276e96089299
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Wed Aug 17 09:43:33 2016 +0200
added and adapted to target screenshot
Up to now the screenshot creation was added/dependent of
target slowcheck. Since quite some modules have added screenshot
creations now, I added an own target 'screenshot' to allow to keep
current slowcheck and screenshot creation separated
Change-Id: I80a49a0db607edf8e0405672d570f624d29912e7
diff --git a/Makefile.in b/Makefile.in
index f7f68ed..a27d55d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -7,7 +7,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck uicheck
+gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck uicheck screenshot
.PHONY : all check-if-root bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch findunusedcode get-submodules id install install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS)
@@ -97,7 +97,7 @@ $(1).clean $(1).showdeliverables:
cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
$(1).all: bootstrap fetch
- $$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1))
+ $$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1) $(WORKDIR)/Module/screenshot/$(1))
endef
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 5954a50..2a174e5 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -182,7 +182,7 @@ endef
# otherwise cyclic dependencies ruin everything.
# do not serialize on a partial build as that may fail due to missing deps.
# the default goal is all (see Module.mk)
-ifeq (,$(filter-out all build check unitcheck slowcheck subsequentcheck uicheck,$(MAKECMDGOALS)))
+ifeq (,$(filter-out all build check unitcheck slowcheck screenshot subsequentcheck uicheck,$(MAKECMDGOALS)))
$(eval $(call repositorymodule_serialize,\
scfilt \
$(call gb_Helper_optional,SCRIPTING,vbaobj) \
diff --git a/basctl/Module_basctl.mk b/basctl/Module_basctl.mk
index 5cedca0..7d0901c 100644
--- a/basctl/Module_basctl.mk
+++ b/basctl/Module_basctl.mk
@@ -35,7 +35,8 @@ $(eval $(call gb_Module_add_l10n_targets,basctl,\
UIConfig_basicide \
))
-$(eval $(call gb_Module_add_slowcheck_targets,basctl,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,basctl,\
CppunitTest_basctl_dialogs_test \
))
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index a4b837b..0492920 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -561,16 +561,16 @@ isExecutable=true
result = KdevelopIntegrationGenerator.launchestemplate % {'launches': launches}
result += self.generate_launch(0, 'Local tests -- quick tests (unitcheck)', self.gbuildparser.makecmd,
'unitcheck', moduledir)
- result += self.generate_launch(1, 'Local tests -- slow tests (unitcheck, slowcheck)', self.gbuildparser.makecmd,
- 'unitcheck slowcheck', moduledir)
- result += self.generate_launch(2, 'Local tests -- integration tests (unitcheck, slowcheck, subsequentcheck)',
- self.gbuildparser.makecmd, 'unitcheck slowcheck subsequentcheck', moduledir)
+ result += self.generate_launch(1, 'Local tests -- slow tests (unitcheck, slowcheck, screenshot)', self.gbuildparser.makecmd,
+ 'unitcheck slowcheck screenshot', moduledir)
+ result += self.generate_launch(2, 'Local tests -- integration tests (unitcheck, slowcheck, screenshot, subsequentcheck)',
+ self.gbuildparser.makecmd, 'unitcheck slowcheck screenshot subsequentcheck', moduledir)
result += self.generate_launch(3, 'Global tests -- quick tests (unitcheck)', self.gbuildparser.makecmd,
'unitcheck', self.gbuildparser.builddir)
- result += self.generate_launch(4, 'Global tests -- slow tests (unitcheck, slowcheck)',
- self.gbuildparser.makecmd, 'unitcheck slowcheck', self.gbuildparser.builddir)
- result += self.generate_launch(5, 'Global tests -- integration tests (unitcheck, slowcheck, subsequentcheck)',
- self.gbuildparser.makecmd, 'unitcheck slowcheck subsequentcheck',
+ result += self.generate_launch(4, 'Global tests -- slow tests (unitcheck, slowcheck, screenshot)',
+ self.gbuildparser.makecmd, 'unitcheck slowcheck screenshot', self.gbuildparser.builddir)
+ result += self.generate_launch(5, 'Global tests -- integration tests (unitcheck, slowcheck, screenshot, subsequentcheck)',
+ self.gbuildparser.makecmd, 'unitcheck slowcheck screenshot subsequentcheck',
self.gbuildparser.builddir)
result += self.generate_launch(6, 'Run LibreOffice',
os.path.join(self.gbuildparser.instdir, 'program/soffice.bin'), '',
@@ -826,9 +826,9 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
'rebuild': self.module_make_command('clean unitcheck'),
},
'Integration tests': {
- 'build': self.module_make_command('unitcheck slowcheck subsequentcheck'),
+ 'build': self.module_make_command('unitcheck slowcheck screenshot subsequentcheck'),
'clean': self.module_make_command('clean'),
- 'rebuild': self.module_make_command('clean unitcheck slowcheck subsequentcheck')
+ 'rebuild': self.module_make_command('clean unitcheck slowcheck screenshot subsequentcheck')
}
}
@@ -1102,14 +1102,14 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
xml += QtCreatorIntegrationGenerator.build_configs_template % {
'index': '2',
'base_folder': module_folder,
- 'arg': "unitcheck slowcheck",
- 'name': "3-Local tests -- slow tests (unitcheck, slowcheck)",
+ 'arg': "unitcheck slowcheck screenshot",
+ 'name': "3-Local tests -- slow tests (unitcheck, slowcheck, screenshot)",
}
xml += QtCreatorIntegrationGenerator.build_configs_template % {
'index': '3',
'base_folder': module_folder,
- 'arg': "unitcheck slowcheck subsequentcheck",
- 'name': "4-Local tests -- integration tests (unitcheck, slowcheck, subsequentcheck)",
+ 'arg': "unitcheck slowcheck screenshot subsequentcheck",
+ 'name': "4-Local tests -- integration tests (unitcheck, slowcheck, screenshot, subsequentcheck)",
}
xml += QtCreatorIntegrationGenerator.build_configs_template % {
'index': '4',
@@ -1120,14 +1120,14 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
xml += QtCreatorIntegrationGenerator.build_configs_template % {
'index': '5',
'base_folder': self.base_folder,
- 'arg': "unitcheck slowcheck",
- 'name': "6-Global tests -- slow tests (unitcheck, slowcheck)",
+ 'arg': "unitcheck slowcheck screenshot",
+ 'name': "6-Global tests -- slow tests (unitcheck, slowcheck, screenshot)",
}
xml += QtCreatorIntegrationGenerator.build_configs_template % {
'index': '6',
'base_folder': self.base_folder,
- 'arg': "unitcheck slowcheck subsequentcheck",
- 'name': "7-Global tests -- integration tests (unitcheck, slowcheck, subsequentcheck)",
+ 'arg': "unitcheck slowcheck screenshot subsequentcheck",
+ 'name': "7-Global tests -- integration tests (unitcheck, slowcheck, screenshot, subsequentcheck)",
}
xml += QtCreatorIntegrationGenerator.build_configs_template % {
'index': '7',
@@ -1167,14 +1167,14 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
xml += QtCreatorIntegrationGenerator.build_configs_template % {
'index': '2',
'base_folder': self.base_folder,
- 'arg': "unitcheck slowcheck",
- 'name': "03-Global tests -- slow tests (unitcheck, slowcheck)",
+ 'arg': "unitcheck slowcheck screenshot",
+ 'name': "03-Global tests -- slow tests (unitcheck, slowcheck, screenshot)",
}
xml += QtCreatorIntegrationGenerator.build_configs_template % {
'index': '3',
'base_folder': self.base_folder,
- 'arg': "unitcheck slowcheck subsequentcheck",
- 'name': "04-Global tests -- integration tests (unitcheck, slowcheck, subsequentcheck)",
+ 'arg': "unitcheck slowcheck screenshot subsequentcheck",
+ 'name': "04-Global tests -- integration tests (unitcheck, slowcheck, screenshot, subsequentcheck)",
}
xml += QtCreatorIntegrationGenerator.build_configs_template % {
'index': '4',
diff --git a/chart2/Module_chart2.mk b/chart2/Module_chart2.mk
index 0d9c3f3..705321f 100644
--- a/chart2/Module_chart2.mk
+++ b/chart2/Module_chart2.mk
@@ -46,7 +46,8 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,chart2,\
JunitTest_chart2_unoapi \
))
-$(eval $(call gb_Module_add_slowcheck_targets,chart2,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,chart2,\
CppunitTest_chart2_dialogs_test \
))
diff --git a/cui/Module_cui.mk b/cui/Module_cui.mk
index 9bd48b8..0b21707 100644
--- a/cui/Module_cui.mk
+++ b/cui/Module_cui.mk
@@ -18,7 +18,8 @@ $(eval $(call gb_Module_add_l10n_targets,cui,\
UIConfig_cui \
))
-$(eval $(call gb_Module_add_slowcheck_targets,cui,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,cui,\
CppunitTest_cui_dialogs_test \
))
diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
index af8becd..9c2a125 100644
--- a/dbaccess/Module_dbaccess.mk
+++ b/dbaccess/Module_dbaccess.mk
@@ -78,7 +78,8 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,dbaccess,\
endif
endif
-$(eval $(call gb_Module_add_slowcheck_targets,dbaccess,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,dbaccess,\
CppunitTest_dbaccess_dialogs_test \
))
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index 24255d9..5a6604c 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -141,7 +141,8 @@ $(eval $(call gb_Module_add_check_targets,desktop, \
))
endif
-$(eval $(call gb_Module_add_slowcheck_targets,desktop,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,desktop,\
CppunitTest_desktop_dialogs_test \
))
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 204d208..9b6421c 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -84,7 +84,8 @@ endif
JunitTest_filter_complex \
))
-$(eval $(call gb_Module_add_slowcheck_targets,filter,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,filter,\
CppunitTest_filter_dialogs_test \
))
diff --git a/formula/Module_formula.mk b/formula/Module_formula.mk
index 6a3833b..7543a47 100644
--- a/formula/Module_formula.mk
+++ b/formula/Module_formula.mk
@@ -20,7 +20,8 @@ $(eval $(call gb_Module_add_l10n_targets,formula,\
UIConfig_formula \
))
-$(eval $(call gb_Module_add_slowcheck_targets,formula,\
+# screenshots
+$(eval $(call gb_Module_add_screeshot_targets,formula,\
CppunitTest_formula_dialogs_test \
))
diff --git a/fpicker/Module_fpicker.mk b/fpicker/Module_fpicker.mk
index 2805ca7..1217355 100644
--- a/fpicker/Module_fpicker.mk
+++ b/fpicker/Module_fpicker.mk
@@ -32,7 +32,8 @@ $(eval $(call gb_Module_add_targets,fpicker,\
))
endif
-$(eval $(call gb_Module_add_slowcheck_targets,fpicker,\
+# screenshots
+$(eval $(call gb_Module_add_screeshot_targets,fpicker,\
CppunitTest_fpicker_dialogs_test \
))
diff --git a/postprocess/CustomTarget_signing.mk b/postprocess/CustomTarget_signing.mk
index 23a81ef..29b0532 100644
--- a/postprocess/CustomTarget_signing.mk
+++ b/postprocess/CustomTarget_signing.mk
@@ -23,7 +23,8 @@ $(call gb_CustomTarget_get_workdir,postprocess/signing)/signing.done: \
$(call gb_Postprocess_get_target,AllLibraries) \
$(call gb_Postprocess_get_target,AllExecutables) \
$(call gb_Postprocess_get_target,AllModuleTests) \
- $(call gb_Postprocess_get_target,AllModuleSlowtests)
+ $(call gb_Postprocess_get_target,AllModuleSlowtests) \
+ $(call gb_Postprocess_get_target,AllModuleScreenshots)
$(call gb_CustomTarget_get_workdir,postprocess/signing)/signing.done:
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
diff --git a/reportdesign/Module_reportdesign.mk b/reportdesign/Module_reportdesign.mk
index a06efb0..518addb 100644
--- a/reportdesign/Module_reportdesign.mk
+++ b/reportdesign/Module_reportdesign.mk
@@ -27,7 +27,8 @@ $(eval $(call gb_Module_add_l10n_targets,reportdesign,\
JunitTest_reportdesign_complex \
))
-$(eval $(call gb_Module_add_slowcheck_targets,reportdesign,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,reportdesign,\
CppunitTest_reportdesign_dialogs_test \
))
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index e9a49ef..05af307 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -65,7 +65,6 @@ $(eval $(call gb_Module_add_slowcheck_targets,sc, \
CppunitTest_sc_opencl_test \
CppunitTest_sc_copypaste \
CppunitTest_sc_functions_test \
- CppunitTest_sc_screenshots \
))
# Disabled to allow the check tinderbox execute the sd tests
@@ -110,5 +109,9 @@ $(eval $(call gb_Module_add_perfcheck_targets,sc,\
CppunitTest_sc_tablesheetobj \
))
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,sc,\
+ CppunitTest_sc_screenshots \
+))
# vim: set noet sw=4 ts=4:
diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk
index 1171eb8..62bfd89 100644
--- a/sd/Module_sd.mk
+++ b/sd/Module_sd.mk
@@ -46,7 +46,8 @@ $(eval $(call gb_Module_add_check_targets,sd,\
))
endif
-$(eval $(call gb_Module_add_slowcheck_targets,sd, \
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,sd, \
CppunitTest_sd_dialogs_test \
))
diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk
index 4f6f4b4..d892973 100644
--- a/sfx2/Module_sfx2.mk
+++ b/sfx2/Module_sfx2.mk
@@ -61,7 +61,8 @@ endif
#todo: clean up quickstarter stuff in both libraries
#todo: move standard pool to svl
-$(eval $(call gb_Module_add_slowcheck_targets,sfx2,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,sfx2,\
CppunitTest_sfx2_dialogs_test \
))
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index d4217ea..eb558a8 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -26,12 +26,14 @@
# Module/unitcheck run unit tests all unit tests
# recursive Module/checks
# Module/slowcheck run all slow unit tests
+# Module/screenshot create all screenshots
# Module/subsequentcheck run system tests all system tests
# Module/uicheck run uitests all uitests
# recursive Module/subsequentchecks
# build (global) build the product top-level Module
# unitcheck (global) run unit tests top-level Module/unitcheck
# slowcheck (global) run slow unit tests top-level Module/slowcheck
+# screenshot (global) create all screenshots top-level Module/screenshot
# subsequentcheck (global) run system tests top-level Module/subsequentcheck
# perfcheck (global) run performance unit tests top-level Module/perfcheck
# uicheck (global) run the uitests run all uitests
@@ -46,6 +48,7 @@ gb_Module_TARGETSTACK :=
gb_Module_L10NTARGETSTACK :=
gb_Module_CHECKTARGETSTACK :=
gb_Module_SLOWCHECKTARGETSTACK :=
+gb_Module_SCREENSHOTTARGETSTACK :=
gb_Module_SUBSEQUENTCHECKTARGETSTACK :=
gb_Module_STAGINGCHECKTARGETSTACK :=
gb_Module_PERFCHECKTARGETSTACK :=
@@ -71,7 +74,7 @@ $(call gb_Module_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),MOD,5)
$(call gb_Output_announce_title,module $* cleared.)
-$(call gb_Helper_abbreviate_dirs,\
- rm -f $(call gb_Module_get_target,$*) $(call gb_Module_get_nonl10n_target,$*) $(call gb_Module_get_l10n_target,$*) $(call gb_Module_get_check_target,$*) $(call gb_Module_get_slowcheck_target,$*) $(call gb_Module_get_subsequentcheck_target,$*) $(call gb_Module_get_perfcheck_target,$*) $(call gb_Module_get_uicheck,$*))
+ rm -f $(call gb_Module_get_target,$*) $(call gb_Module_get_nonl10n_target,$*) $(call gb_Module_get_l10n_target,$*) $(call gb_Module_get_check_target,$*) $(call gb_Module_get_slowcheck_target,$*) $(call gb_Module_get_screenshot_target,$*) $(call gb_Module_get_subsequentcheck_target,$*) $(call gb_Module_get_perfcheck_target,$*) $(call gb_Module_get_uicheck,$*))
$(call gb_Module_get_l10n_target,%) :
$(call gb_Output_announce,$*,$(true),LOC,5)
@@ -94,6 +97,13 @@ $(call gb_Module_get_slowcheck_target,%) :
mkdir -p $(dir $@) && \
touch $@)
+$(call gb_Module_get_screenshot_target,%) :
+ $(call gb_Output_announce,$*,$(true),SCR,5)
+ $(call gb_Output_announce_title,module $* screenshots done.)
+ -$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $@) && \
+ touch $@)
+
$(call gb_Module_get_subsequentcheck_target,%) :
$(call gb_Output_announce,$*,$(true),SCK,5)
$(call gb_Output_announce_title,module $* subsequentchecks done.)
@@ -129,7 +139,7 @@ $(call gb_Module_get_target,%) :
mkdir -p $(dir $@) && \
touch $@)
-.PHONY : all build build-l10n-only build-non-l10n-only unitcheck slowcheck subsequentcheck stagingcheck perfcheck uicheck clean check debugrun help showmodules translations
+.PHONY : all build build-l10n-only build-non-l10n-only unitcheck slowcheck screenshot subsequentcheck stagingcheck perfcheck uicheck clean check debugrun help showmodules translations
.DEFAULT_GOAL := all
all : build $(if $(CROSS_COMPILING),,unitcheck $(if $(gb_PARTIAL_BUILD),,slowcheck))
@@ -167,6 +177,11 @@ slowcheck :
$(call gb_Output_announce_title,all slowtests checked.)
$(call gb_Output_announce_bell)
+screenshot :
+ $(if $(gb_VERBOSE),$(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),SCR,6))
+ $(call gb_Output_announce_title,all screenshots checked.)
+ $(call gb_Output_announce_bell)
+
# removing the dependency on build for now until we can make a full build with gbuild
#subsequentcheck : all
subsequentcheck :
@@ -232,6 +247,7 @@ gb_Module_TARGETSTACK := $(call gb_Module_get_target,$(1)) $(gb_Module_TARGETSTA
gb_Module_L10NTARGETSTACK := $(call gb_Module_get_l10n_target,$(1)) $(gb_Module_L10NTARGETSTACK)
gb_Module_CHECKTARGETSTACK := $(call gb_Module_get_check_target,$(1)) $(gb_Module_CHECKTARGETSTACK)
gb_Module_SLOWCHECKTARGETSTACK := $(call gb_Module_get_slowcheck_target,$(1)) $(gb_Module_SLOWCHECKTARGETSTACK)
+gb_Module_SCREENSHOTTARGETSTACK := $(call gb_Module_get_screenshot_target,$(1)) $(gb_Module_SCREENSHOTTARGETSTACK)
gb_Module_UICHECKTARGETSTACK := $(call gb_Module_get_uicheck_target,$(1)) $(gb_Module_UICHECKTARGETSTACK)
gb_Module_SUBSEQUENTCHECKTARGETSTACK := $(call gb_Module_get_subsequentcheck_target,$(1)) $(gb_Module_SUBSEQUENTCHECKTARGETSTACK)
gb_Module_STAGINGCHECKTARGETSTACK := $(call gb_Module_get_stagingcheck_target,$(1)) $(gb_Module_STAGINGCHECKTARGETSTACK)
@@ -245,6 +261,7 @@ $(if $(filter-out libreoffice instsetoo_native android ios,$(1)),\
$(call gb_Postprocess_get_target,AllModuleTests) : $(call gb_Module_get_check_target,$(1))
$(call gb_Postprocess_get_target,AllModuleSlowtests) : $(call gb_Module_get_slowcheck_target,$(1))
+$(call gb_Postprocess_get_target,AllModuleScreenshots) : $(call gb_Module_get_screenshot_target,$(1))
$(call gb_Postprocess_get_target,AllModuleUITest) : $(call gb_Module_get_uicheck_target,$(1))
endef
@@ -306,6 +323,14 @@ $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
endef
+define gb_Module_add_screenshot_target
+$(call gb_Module__read_targetfile,$(1),$(2),screenshot target)
+
+$(call gb_Module_get_screenshot_target,$(1)) : $$(gb_Module_CURRENTTARGET)
+$(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
+
+endef
+
# has order dependency on AllModulesButInstsetNative to be able to run
# subsequentcheck in the same make process on "make check"
define gb_Module_add_subsequentcheck_target
@@ -355,6 +380,7 @@ $(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK))
$(call gb_Module_get_l10n_target,$(1)) : $$(firstword $$(gb_Module_L10NTARGETSTACK))
$(call gb_Module_get_check_target,$(1)) : $$(firstword $$(gb_Module_CHECKTARGETSTACK))
$(call gb_Module_get_slowcheck_target,$(1)) : $$(firstword $$(gb_Module_SLOWCHECKTARGETSTACK))
+$(call gb_Module_get_screenshot_target,$(1)) : $$(firstword $$(gb_Module_SCREENSHOTTARGETSTACK))
$(call gb_Module_get_subsequentcheck_target,$(1)) : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK))
$(call gb_Module_get_stagingcheck_target,$(1)) : $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK))
$(call gb_Module_get_perfcheck_target,$(1)) : $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK))
@@ -364,6 +390,7 @@ gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb
gb_Module_L10NTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_L10NTARGETSTACK)),$$(gb_Module_L10NTARGETSTACK))
gb_Module_CHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CHECKTARGETSTACK)),$$(gb_Module_CHECKTARGETSTACK))
gb_Module_SLOWCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SLOWCHECKTARGETSTACK)),$$(gb_Module_SLOWCHECKTARGETSTACK))
+gb_Module_SCREENSHOTTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SCREENSHOTTARGETSTACK)),$$(gb_Module_SCREENSHOTTARGETSTACK))
gb_Module_SUBSEQUENTCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK))
gb_Module_STAGINGCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_STAGINGCHECKTARGETSTACK)),$$(gb_Module_STAGINGCHECKTARGETSTACK))
gb_Module_PERFCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_PERFCHECKTARGETSTACK)),$$(gb_Module_PERFCHECKTARGETSTACK))
@@ -396,6 +423,11 @@ $(foreach target,$(2),$(call gb_Module_add_slowcheck_target,$(1),$(target)))
endef
+define gb_Module_add_screenshot_targets
+$(foreach target,$(2),$(call gb_Module_add_screenshot_target,$(1),$(target)))
+
+endef
+
define gb_Module_add_subsequentcheck_targets
$(foreach target,$(2),$(call gb_Module_add_subsequentcheck_target,$(1),$(target)))
@@ -433,6 +465,7 @@ build-non-l10n-only : $$(firstword $$(gb_Module_TARGETSTACK))
build-l10n-only : $$(firstword $$(gb_Module_L10NTARGETSTACK))
unitcheck : $$(firstword $$(gb_Module_CHECKTARGETSTACK))
slowcheck : $$(firstword $$(gb_Module_SLOWCHECKTARGETSTACK))
+screenshot : $$(firstword $$(gb_Module_SCREENSHOTTARGETSTACK))
subsequentcheck : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK))
stagingcheck : $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK))
perfcheck : $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK))
@@ -447,13 +480,14 @@ gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb
gb_Module_L10NTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_L10NTARGETSTACK)),$$(gb_Module_L10NTARGETSTACK))
gb_Module_CHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CHECKTARGETSTACK)),$$(gb_Module_CHECKTARGETSTACK))
gb_Module_SLOWCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SLOWCHECKTARGETSTACK)),$$(gb_Module_SLOWCHECKTARGETSTACK))
+gb_Module_SCREENSHOTTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SCREENSHOTTARGETSTACK)),$$(gb_Module_SCREENSHOTTARGETSTACK))
gb_Module_SUBSEQUENTCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK))
gb_Module_UICHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_UICHECKTARGETSTACK)),$$(gb_Module_UICHECKTARGETSTACK))
gb_Module_STAGINGCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_STAGINGCHECKTARGETSTACK)),$$(gb_Module_STAGINGCHECKTARGETSTACK))
gb_Module_PERFCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_PERFCHECKTARGETSTACK)),$$(gb_Module_PERFCHECKTARGETSTACK))
gb_Module_CLEANTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CLEANTARGETSTACK)),$$(gb_Module_CLEANTARGETSTACK))
-ifneq ($$(and $$(gb_Module_TARGETSTACK),$$(gb_Module_CHECKTARGETSTACK),$$(gb_Module_SLOWCHECKTARGETSTACK),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK),$$(gb_Module_UICHECKTARGETSTACK),$$(gb_Module_STAGINGCHECKTARGETSTACK),$$(gb_Module_PERFCHECKTARGETSTACK),$$(gb_Module_L10NTARGETSTACK)),)
+ifneq ($$(and $$(gb_Module_TARGETSTACK),$$(gb_Module_CHECKTARGETSTACK),$$(gb_Module_SLOWCHECKTARGETSTACK),$$(gb_Module_SCREENSHOTTARGETSTACK),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK),$$(gb_Module_UICHECKTARGETSTACK),$$(gb_Module_STAGINGCHECKTARGETSTACK),$$(gb_Module_PERFCHECKTARGETSTACK),$$(gb_Module_L10NTARGETSTACK)),)
$$(eval $$(call gb_Output_error,Corrupted module target stack!3))
endif
diff --git a/solenv/gbuild/Postprocess.mk b/solenv/gbuild/Postprocess.mk
index a256a21..5b20a66 100644
--- a/solenv/gbuild/Postprocess.mk
+++ b/solenv/gbuild/Postprocess.mk
@@ -47,6 +47,7 @@ $(call gb_Postprocess_Postprocess,AllResources,All resources,$(WORKDIR)/AllLangR
$(call gb_Postprocess_Postprocess,AllUIConfigs,All UI configuration files,$(WORKDIR)/UIConfig/)
$(call gb_Postprocess_Postprocess,AllModuleTests,All modules' tests,$(WORKDIR)/Module/check/)
$(call gb_Postprocess_Postprocess,AllModuleSlowtests,All modules' slowtests,$(WORKDIR)/Module/slowcheck/)
+$(call gb_Postprocess_Postprocess,AllModuleScreenshots,All modules' screenshots,$(WORKDIR)/Module/screenshot/)
$(call gb_Postprocess_Postprocess,AllModuleUITests,All modules' uitests,$(WORKDIR)/Module/uicheck/)
endef
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 34577ca..3cf0cdf 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -118,6 +118,7 @@ gb_Module_get_nonl10n_target = $(WORKDIR)/Module/nonl10n/$(1)
gb_Module_get_l10n_target = $(WORKDIR)/Module/l10n/$(1)
gb_Module_get_check_target = $(WORKDIR)/Module/check/$(1)
gb_Module_get_slowcheck_target = $(WORKDIR)/Module/slowcheck/$(1)
+gb_Module_get_screenshot_target = $(WORKDIR)/Module/screenshot/$(1)
gb_Module_get_subsequentcheck_target = $(WORKDIR)/Module/subsequentcheck/$(1)
gb_Module_get_stagingcheck_target = $(WORKDIR)/Module/stagingcheck/$(1)
gb_Module_get_perfcheck_target = $(WORKDIR)/Module/perfcheck/$(1)
diff --git a/solenv/gbuild/extensions/post_SpeedUpTargets.mk b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
index 921038e..3db6355 100644
--- a/solenv/gbuild/extensions/post_SpeedUpTargets.mk
+++ b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
@@ -9,21 +9,21 @@
ifneq ($(CROSS_COMPILING),)
gb_Module_add_targets_for_build :=
-gb_Module_SKIPTARGETS := check slowcheck subsequentcheck uicheck
+gb_Module_SKIPTARGETS := check slowcheck screenshot subsequentcheck uicheck
endif
ifeq ($(gb_Side),build)
-gb_Module_SKIPTARGETS := check slowcheck subsequentcheck uicheck
+gb_Module_SKIPTARGETS := check slowcheck screenshot subsequentcheck uicheck
endif
ifeq ($(MAKECMDGOALS),build)
-gb_Module_SKIPTARGETS := check slowcheck subsequentcheck uicheck
+gb_Module_SKIPTARGETS := check slowcheck screenshot subsequentcheck uicheck
endif
ifeq (,$(filter perfcheck,$(MAKECMDGOALS)))
gb_Module_SKIPTARGETS += perfcheck
else
-gb_Module_SKIPTARGETS += check slowcheck subsequentcheck uicheck
+gb_Module_SKIPTARGETS += check slowcheck screenshot subsequentcheck uicheck
endif
ifneq ($(strip $(MAKECMDGOALS)),)
@@ -37,7 +37,7 @@ ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_1),$(MAKECMDGOALS)),,T))
gb_FULLDEPS :=
ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_2),$(MAKECMDGOALS)),,T))
-gb_Module_SKIPTARGETS += check slowcheck subsequentcheck uicheck
+gb_Module_SKIPTARGETS += check slowcheck screenshot subsequentcheck uicheck
ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_3),$(MAKECMDGOALS)),,T))
gb_Module_SKIPTARGETS += build
@@ -65,6 +65,10 @@ ifneq (,$(filter slowcheck,$(gb_Module_SKIPTARGETS)))
gb_Module_add_slowcheck_target =
endif
+ifneq (,$(filter screenshot,$(gb_Module_SKIPTARGETS)))
+gb_Module_add_screenshot_target =
+endif
+
ifneq (,$(filter subsequentcheck,$(gb_Module_SKIPTARGETS)))
gb_Module_add_subsequentcheck_target =
endif
diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index bbf74f7..a790334 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -36,6 +36,7 @@ AVAILABLE TARGETS
check run unit tests and if in toplevel subsequentcheck
unitcheck run unit tests
slowcheck run slow unit tests
+ screenshot create all screenshots
subsequentcheck run system tests (requires full installation)
stagingcheck run (unstable/failing) tests from staging area
(requires full installation)
diff --git a/starmath/Module_starmath.mk b/starmath/Module_starmath.mk
index 58fc7fe..0049211 100644
--- a/starmath/Module_starmath.mk
+++ b/starmath/Module_starmath.mk
@@ -30,7 +30,8 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,starmath,\
JunitTest_starmath_unoapi \
))
-$(eval $(call gb_Module_add_slowcheck_targets,starmath,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,starmath,\
CppunitTest_starmath_dialogs_test \
))
diff --git a/svtools/Module_svtools.mk b/svtools/Module_svtools.mk
index 2062ce7..7e28e42 100644
--- a/svtools/Module_svtools.mk
+++ b/svtools/Module_svtools.mk
@@ -49,7 +49,8 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,svtools,\
))
endif
-$(eval $(call gb_Module_add_slowcheck_targets,svtools,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,svtools,\
CppunitTest_svtools_dialogs_test \
))
diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk
index 7739dcf..c8bf3a3 100644
--- a/svx/Module_svx.mk
+++ b/svx/Module_svx.mk
@@ -36,7 +36,8 @@ $(eval $(call gb_Module_add_check_targets,svx,\
CppunitTest_svx_unit \
))
-$(eval $(call gb_Module_add_slowcheck_targets,svx,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,svx,\
CppunitTest_svx_dialogs_test \
))
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index d635f4c..3341552 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -85,10 +85,6 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
))
endif
-$(eval $(call gb_Module_add_slowcheck_targets,sw,\
- CppunitTest_sw_dialogs_test \
-))
-
ifneq ($(OOO_JUNIT_JAR),)
$(eval $(call gb_Module_add_subsequentcheck_targets,sw,\
JunitTest_sw_complex \
@@ -105,4 +101,9 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sw,\
))
endif
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,sw,\
+ CppunitTest_sw_dialogs_test \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/uui/Module_uui.mk b/uui/Module_uui.mk
index 0f197a3..436efbf 100644
--- a/uui/Module_uui.mk
+++ b/uui/Module_uui.mk
@@ -18,7 +18,8 @@ $(eval $(call gb_Module_add_l10n_targets,uui,\
UIConfig_uui \
))
-$(eval $(call gb_Module_add_slowcheck_targets,uui,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,uui,\
CppunitTest_uui_dialogs_test \
))
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 5d5a2ac..ad08e59 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -130,7 +130,8 @@ $(eval $(call gb_Module_add_check_targets,vcl,\
))
endif
-$(eval $(call gb_Module_add_slowcheck_targets,vcl,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,vcl,\
CppunitTest_vcl_dialogs_test \
))
diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk
index 63b2f8c..3c9b220 100644
--- a/xmlsecurity/Module_xmlsecurity.mk
+++ b/xmlsecurity/Module_xmlsecurity.mk
@@ -31,7 +31,8 @@ $(eval $(call gb_Module_add_l10n_targets,xmlsecurity,\
CppunitTest_qa_certext \
))
-$(eval $(call gb_Module_add_slowcheck_targets,xmlsecurity,\
+# screenshots
+$(eval $(call gb_Module_add_screenshot_targets,xmlsecurity,\
CppunitTest_xmlsecurity_dialogs_test \
))
commit 06df117e81467d02f9534fc9b85913a4f25cd6a0
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Thu Jul 28 17:10:15 2016 +0200
Changes for clang andUXMLDescription usage
Adapted clang compiler reesults, made TabDialog implementaions
of ScreenShot API work with real UXMLDescription names, including
a solution for using multiple tabPages with the same *.ui file
Change-Id: I56df878b3db3bcc18fa2b4713b7ad72d42e8eb30
diff --git a/include/vcl/tabdlg.hxx b/include/vcl/tabdlg.hxx
index d4edb0e..a3c0601 100644
--- a/include/vcl/tabdlg.hxx
+++ b/include/vcl/tabdlg.hxx
@@ -51,8 +51,8 @@ public:
void SetViewAlign( WindowAlign eAlign ) { meViewAlign = eAlign; }
// Screenshot interface
- virtual std::vector<OString> getAllPageUIXMLDescriptions() const;
- virtual bool selectPageByUIXMLDescription(const OString& rUIXMLDescription);
+ virtual std::vector<OString> getAllPageUIXMLDescriptions() const override;
+ virtual bool selectPageByUIXMLDescription(const OString& rUIXMLDescription) override;
};
#endif // INCLUDED_VCL_TABDLG_HXX
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index ddd9593..f55e483 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -65,10 +65,10 @@ public: \
{} \
virtual ~Class(); \
virtual short Execute() override ; \
- std::vector<OString> getAllPageUIXMLDescriptions() const; \
+ std::vector<OString> getAllPageUIXMLDescriptions() const override; \
bool selectPageByUIXMLDescription(const OString& rUIXMLDescription) override; \
virtual Bitmap createScreenshot() const override; \
- virtual OString GetScreenshotId() const; \
+ virtual OString GetScreenshotId() const override; \
#define DECL_ABSTDLG2_BASE(Class,DialogClass) \
ScopedVclPtr<DialogClass> pDlg; \
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index eb7597d..5ccb90a 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -32,7 +32,7 @@ public: \
virtual std::vector<OString> getAllPageUIXMLDescriptions() const override; \
virtual bool selectPageByUIXMLDescription(const OString& rUIXMLDescription) override; \
virtual Bitmap createScreenshot() const override; \
- virtual OString GetScreenshotId() const; \
+ virtual OString GetScreenshotId() const override; \
virtual ~Class(); \
virtual short Execute() override ;
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
index a700b8d..012623a 100644
--- a/test/source/screenshot_test.cxx
+++ b/test/source/screenshot_test.cxx
@@ -131,7 +131,7 @@ void ScreenshotTest::dumpDialogToPath(VclAbstractDialog& rDialog)
if (aPageDescriptions.size())
{
- for (sal_uInt32 a(0); a < aPageDescriptions.size(); a++)
+ for (size_t a(0); a < aPageDescriptions.size(); a++)
{
if (rDialog.selectPageByUIXMLDescription(aPageDescriptions[a]))
{
@@ -155,7 +155,7 @@ void ScreenshotTest::dumpDialogToPath(Dialog& rDialog)
if (aPageDescriptions.size())
{
- for (sal_uInt32 a(0); a < aPageDescriptions.size(); a++)
+ for (size_t a(0); a < aPageDescriptions.size(); a++)
{
if (rDialog.selectPageByUIXMLDescription(aPageDescriptions[a]))
{
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 5706e64..335c00c 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -290,12 +290,32 @@ std::vector<OString> TabDialog::getAllPageUIXMLDescriptions() const
if (pCandidate)
{
- // use UIXMLDescription (without '.ui', with '/')
- // aRetval.push_back(pCandidate->getUIFile());
+ OString aNewName(pCandidate->getUIFile());
- // for now, directly use nPageID since we had a case where
- // two TabPages had the same ui file (HeaderFooterDialog)
- aRetval.push_back(OString::number(nPageId));
+ if (!aNewName.isEmpty())
+ {
+ // we have to check for double entries, this may happen e.g.
+ // in the HeaderFooterDialog which has two times the same
+ // tabPage added. Add the PageID as hint to the name, separated
+ // by a token (using "|" here). Do not do this for 1st ocurrence,
+ // that is used for detection and is not necessary.
+ // Use the UIXMLDescription without trailing '.ui', with one trailing '/'
+ bool bAlreadyAdded(false);
+
+ for (auto i = aRetval.begin(); !bAlreadyAdded && i != aRetval.end(); i++)
+ {
+ bAlreadyAdded = (*i == aNewName);
+ }
+
+ if (bAlreadyAdded)
+ {
+ // add the PageId to be able to detect the correct tabPage in
+ // selectPageByUIXMLDescription below
+ aNewName = aNewName + "|" + OString::number(nPageId);
+ }
+
+ aRetval.push_back(aNewName);
+ }
}
}
}
@@ -310,6 +330,19 @@ bool TabDialog::selectPageByUIXMLDescription(const OString& rUIXMLDescription)
if (pTabCtrl)
{
+ sal_uInt32 nTargetPageId(0);
+ OString aTargetName(rUIXMLDescription);
+ const sal_Int32 nIndexOfSeparator(rUIXMLDescription.indexOf("|"));
+
+ if (-1 != nIndexOfSeparator)
+ {
+ // more than one tabPage with that UXMLDescription is added to this dialog,
+ // see getAllPageUIXMLDescriptions() above. Extract target PageId and
+ // strip the UXMLDescription name for comparison
+ nTargetPageId = rUIXMLDescription.copy(nIndexOfSeparator + 1).toUInt32();
+ aTargetName = rUIXMLDescription.copy(0, nIndexOfSeparator);
+ }
+
for (sal_uInt16 a(0); a < pTabCtrl->GetPageCount(); a++)
{
const sal_uInt16 nPageId(pTabCtrl->GetPageId(a));
@@ -320,15 +353,26 @@ bool TabDialog::selectPageByUIXMLDescription(const OString& rUIXMLDescription)
if (pCandidate)
{
- // if (pCandidate->getUIFile() == rUIXMLDescription)
-
- // for now, directly work with nPageID, see above. Will need to be
- // adapted to the schema later planned to be used in rUIXMLDescription
- if (rUIXMLDescription.toUInt32() == nPageId)
+ if (pCandidate->getUIFile() == aTargetName)
{
- pTabCtrl->SelectTabPage(nPageId);
-
- return true;
+ if (nTargetPageId)
+ {
+ // when multiple versions may exist, name is not sufficient. Also
+ // check for the given PageId to select the correct tabPage
+ // for cases where the same TabPage is used more than once
+ // in a tabDialog (e.g. HeaderFooterDialog)
+ if (nTargetPageId == nPageId)
+ {
+ pTabCtrl->SelectTabPage(nPageId);
+ return true;
+ }
+ }
+ else
+ {
+ // select that tabPage
+ pTabCtrl->SelectTabPage(nPageId);
+ return true;
+ }
}
}
}
commit 427551618cedea0a8ebb5969d78d7edf0d3ea5fc
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Thu Jul 28 14:07:44 2016 +0200
Linux build and test, excluded critical *.ui files
Change-Id: Ie06bb6b0bfd280e386bc418abdc496cb747f44b6
diff --git a/cui/qa/unit/data/cui-dialogs-test.txt b/cui/qa/unit/data/cui-dialogs-test.txt
index 4e1fc44..4f9bf42 100644
--- a/cui/qa/unit/data/cui-dialogs-test.txt
+++ b/cui/qa/unit/data/cui-dialogs-test.txt
@@ -35,6 +35,7 @@
# test case since they need some document and model data to work
#
# cui/ui/bitmaptabpage.ui
+# cui/ui/thesaurus.ui <- problems under Linux
cui/ui/customizedialog.ui
cui/ui/gallerythemedialog.ui
@@ -205,7 +206,6 @@ cui/ui/hyperlinkdialog.ui
cui/ui/insertoleobject.ui
cui/ui/insertfloatingframe.ui
cui/ui/splitcellsdialog.ui
-cui/ui/thesaurus.ui
cui/ui/macroselectordialog.ui
cui/ui/spellingdialog.ui
cui/ui/aboutconfigdialog.ui
diff --git a/sc/qa/unit/screenshots/data/screenshots.txt b/sc/qa/unit/screenshots/data/screenshots.txt
index 933fd23..033d788 100644
--- a/sc/qa/unit/screenshots/data/screenshots.txt
+++ b/sc/qa/unit/screenshots/data/screenshots.txt
@@ -50,6 +50,12 @@ modules/scalc/ui/formatcellsdialog.ui
#
# modules/scalc/ui/headerfootercontent.ui
# modules/scalc/ui/pivottablelayoutdialog.ui
+#
+# problems under Linux:
+# modules/scalc/ui/RowHeightDialog.ui
+# modules/scalc/ui/OptimalRowHeightDialog.ui
+# modules/scalc/ui/ColWidthDialog.ui
+# modules/scalc/ui/OptimalColWidthDialog.ui
modules/scalc/ui/autoformattable.ui
modules/scalc/ui/sortwarning.ui
@@ -127,10 +133,6 @@ modules/scalc/ui/ungroupdialog.ui
modules/scalc/ui/groupdialog.ui
modules/scalc/ui/showchangesdialog.ui
modules/scalc/ui/insertcells.ui
-modules/scalc/ui/RowHeightDialog.ui
-modules/scalc/ui/OptimalRowHeightDialog.ui
-modules/scalc/ui/ColWidthDialog.ui
-modules/scalc/ui/OptimalColWidthDialog.ui
modules/scalc/ui/solverprogressdialog.ui
modules/scalc/ui/nosolutiondialog.ui
modules/scalc/ui/solversuccessdialog.ui
diff --git a/svx/qa/unit/data/svx-dialogs-test.txt b/svx/qa/unit/data/svx-dialogs-test.txt
index f60d860..07ddb87 100644
--- a/svx/qa/unit/data/svx-dialogs-test.txt
+++ b/svx/qa/unit/data/svx-dialogs-test.txt
@@ -34,6 +34,7 @@
# This is typically a hint that these should be hard-coded in the
# test case since they need some document and model data to work
#
+# svx/ui/asianphoneticguidedialog.ui <- problems under linux
svx/ui/textcontrolchardialog.ui
svx/ui/textcontrolparadialog.ui
@@ -61,7 +62,6 @@ svx/ui/fontworkspacingdialog.ui
svx/ui/chinesedictionary.ui
svx/ui/chineseconversiondialog.ui
svx/ui/imapdialog.ui
-svx/ui/asianphoneticguidedialog.ui
svx/ui/findreplacedialog.ui
svx/ui/crashreportdlg.ui
svx/ui/docrecoverysavedialog.ui
diff --git a/sw/qa/unit/data/sw-dialogs-test.txt b/sw/qa/unit/data/sw-dialogs-test.txt
index 8dc4721..e219358 100644
--- a/sw/qa/unit/data/sw-dialogs-test.txt
+++ b/sw/qa/unit/data/sw-dialogs-test.txt
@@ -41,6 +41,7 @@
# modules/swriter/ui/linenumbering.ui
# modules/swriter/ui/footnotepage.ui
# modules/swriter/ui/outlinenumberingpage.ui
+# modules/swriter/ui/picturepage.ui <- problems under Linux
modules/swriter/ui/abstractdialog.ui
modules/swriter/ui/addentrydialog.ui
@@ -150,7 +151,6 @@ modules/swriter/ui/opttestpage.ui
modules/swriter/ui/outlinenumbering.ui
modules/swriter/ui/outlinepositionpage.ui
modules/swriter/ui/paradialog.ui
-modules/swriter/ui/picturepage.ui
modules/swriter/ui/previewzoomdialog.ui
modules/swriter/ui/printeroptions.ui
modules/swriter/ui/printmergedialog.ui
commit d78b3e54d94bfa59fb7316619c9942dc84304b1e
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Thu Jul 28 12:22:00 2016 +0200
Unified dumping of dialog test batch file
Change-Id: Ia1e79216d9537c65f8b7362778a2e1ad3ec6c2c2
diff --git a/basctl/qa/unit/basctl-dialogs-test.cxx b/basctl/qa/unit/basctl-dialogs-test.cxx
index 629cf4c..e0af831 100644
--- a/basctl/qa/unit/basctl-dialogs-test.cxx
+++ b/basctl/qa/unit/basctl-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* BasctlDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void BasctlDialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("basctl/qa/unit/data/basctl-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("modules/BasicIDE/ui/organizedialog.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("basctl/qa/unit/data/basctl-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(BasctlDialogsTest);
diff --git a/chart2/qa/unit/chart2-dialogs-test.cxx b/chart2/qa/unit/chart2-dialogs-test.cxx
index 9a9921f..112adbf 100644
--- a/chart2/qa/unit/chart2-dialogs-test.cxx
+++ b/chart2/qa/unit/chart2-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* Chart2DialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void Chart2DialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("chart2/qa/unit/data/chart2-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("modules/schart/ui/datarangedialog.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("chart2/qa/unit/data/chart2-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2DialogsTest);
diff --git a/cui/qa/unit/cui-dialogs-test.cxx b/cui/qa/unit/cui-dialogs-test.cxx
index 5e819ce..58cc3b9 100644
--- a/cui/qa/unit/cui-dialogs-test.cxx
+++ b/cui/qa/unit/cui-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* CuiDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void CuiDialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("cui/qa/unit/data/cui-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("cui/ui/customizedialog.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("cui/qa/unit/data/cui-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(CuiDialogsTest);
diff --git a/dbaccess/qa/unit/dbaccess-dialogs-test.cxx b/dbaccess/qa/unit/dbaccess-dialogs-test.cxx
index 6ebecd3..a95a8ce 100644
--- a/dbaccess/qa/unit/dbaccess-dialogs-test.cxx
+++ b/dbaccess/qa/unit/dbaccess-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* DbaccessDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void DbaccessDialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("dbaccess/qa/unit/data/dbaccess-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("dbaccess/ui/advancedsettingsdialog.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("dbaccess/qa/unit/data/dbaccess-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(DbaccessDialogsTest);
diff --git a/desktop/qa/unit/desktop-dialogs-test.cxx b/desktop/qa/unit/desktop-dialogs-test.cxx
index 5768b43..ff654ff 100644
--- a/desktop/qa/unit/desktop-dialogs-test.cxx
+++ b/desktop/qa/unit/desktop-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* DesktopDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void DesktopDialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("desktop/qa/unit/data/desktop-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("desktop/ui/cmdlinehelp.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("desktop/qa/unit/data/desktop-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(DesktopDialogsTest);
diff --git a/filter/qa/unit/filter-dialogs-test.cxx b/filter/qa/unit/filter-dialogs-test.cxx
index 91a891d..8cc1497 100644
--- a/filter/qa/unit/filter-dialogs-test.cxx
+++ b/filter/qa/unit/filter-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* FilterDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void FilterDialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("filter/qa/unit/data/filter-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("filter/ui/pdfoptionsdialog.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("filter/qa/unit/data/filter-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(FilterDialogsTest);
diff --git a/formula/qa/unit/formula-dialogs-test.cxx b/formula/qa/unit/formula-dialogs-test.cxx
index 80d2d3f..97f3c90 100644
--- a/formula/qa/unit/formula-dialogs-test.cxx
+++ b/formula/qa/unit/formula-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* FormulaDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void FormulaDialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("formula/qa/unit/data/formula-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("formula/ui/functionpage.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("formula/qa/unit/data/formula-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(FormulaDialogsTest);
diff --git a/fpicker/qa/unit/fpicker-dialogs-test.cxx b/fpicker/qa/unit/fpicker-dialogs-test.cxx
index 82269a1..622138d 100644
--- a/fpicker/qa/unit/fpicker-dialogs-test.cxx
+++ b/fpicker/qa/unit/fpicker-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* FpickerDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void FpickerDialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("fpicker/qa/unit/data/fpicker-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("fps/ui/foldernamedialog.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("fpicker/qa/unit/data/fpicker-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(FpickerDialogsTest);
diff --git a/include/test/screenshot_test.hxx b/include/test/screenshot_test.hxx
index 443db31..473d44a 100644
--- a/include/test/screenshot_test.hxx
+++ b/include/test/screenshot_test.hxx
@@ -68,6 +68,20 @@ public:
/// compared to the active dialog (can be compared with dialog previewer)
void dumpDialogToPath(const OString& rUIXMLDescription);
+ /// helper to process all known dialogs
+ void processAllKnownDialogs();
+
+ /// helper to process an input file containing the UXMLDescriptions
+ /// of the dialogs to dump. It will internally try to detect and open
+ /// as known dialog first. If not successful, it will then use the
+ /// fallback version to dump the dialog.
+ /// The syntax of the input file is as follows:
+ /// - emty lines are allowed
+ /// - lines starting with '#' are treated as comment
+ /// - all other lines should contain a *.ui filename in the same
+ /// notation as in the dialog constructors(see code)
+ void processDialogBatchFile(const OUString& rFile);
+
/// const access to known dialogs
const mapType& getKnownDialogs() const { return maKnownDialogs; }
};
diff --git a/reportdesign/qa/unit/reportdesign-dialogs-test.cxx b/reportdesign/qa/unit/reportdesign-dialogs-test.cxx
index ac59b80..3f37364 100644
--- a/reportdesign/qa/unit/reportdesign-dialogs-test.cxx
+++ b/reportdesign/qa/unit/reportdesign-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* ReportdesignDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void ReportdesignDialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("reportdesign/qa/unit/data/reportdesign-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("modules/dbreport/ui/background.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("reportdesign/qa/unit/data/reportdesign-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(ReportdesignDialogsTest);
diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx
index 255fe9c..c52bbc5 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -275,61 +275,8 @@ void ScScreenshotTest::testOpeningModalDialogs()
{
initializeWithDoc("empty.ods");
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("sc/qa/unit/screenshots/data/screenshots.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("sc/qa/unit/screenshots/data/screenshots.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScScreenshotTest);
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 1b0cf2b..92e3da5 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -608,58 +608,33 @@ void SdDialogsTest::openAnyDialog()
/// to dump
if (true)
{
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("sd/qa/unit/data/dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
+ processDialogBatchFile("sd/qa/unit/data/dialogs-test.txt");
}
/// example how to dump all known dialogs
if (false)
{
+ processAllKnownDialogs();
+ }
+
+ /// example how to dump exactly one known dialog
+ if (false)
+ {
// example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
// example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
// example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
+ std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID(5));
+
+ if (pDlg)
+ {
+ // known dialog, dump screenshot to path
+ dumpDialogToPath(*pDlg);
+ }
+ else
{
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
+ // unknown dialog, should not happen in this basic loop.
+ // You have probably forgotten to add a case and
+ // implementastion to createDialogByID, please do this
}
}
diff --git a/sfx2/qa/unit/sfx2-dialogs-test.cxx b/sfx2/qa/unit/sfx2-dialogs-test.cxx
index 8e144eb..42fb59e 100644
--- a/sfx2/qa/unit/sfx2-dialogs-test.cxx
+++ b/sfx2/qa/unit/sfx2-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* Sfx2DialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void Sfx2DialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("sfx2/qa/unit/data/sfx2-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("sfx/ui/documentpropertiesdialog.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("sfx2/qa/unit/data/sfx2-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(Sfx2DialogsTest);
diff --git a/starmath/qa/unit/starmath-dialogs-test.cxx b/starmath/qa/unit/starmath-dialogs-test.cxx
index 82f576b..2bd480d 100644
--- a/starmath/qa/unit/starmath-dialogs-test.cxx
+++ b/starmath/qa/unit/starmath-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* StarmathDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void StarmathDialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("starmath/qa/unit/data/starmath-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- //
- // Take any example here, it's only for demonstration - using
- // even a known one to demonstrate the fallback possibility
- const OString aUIXMLDescription("modules/smath/ui/printeroptions.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("starmath/qa/unit/data/starmath-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(StarmathDialogsTest);
diff --git a/svtools/qa/unit/svtools-dialogs-test.cxx b/svtools/qa/unit/svtools-dialogs-test.cxx
index 1bc1a8c..9be029e 100644
--- a/svtools/qa/unit/svtools-dialogs-test.cxx
+++ b/svtools/qa/unit/svtools-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* SvtoolsDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void SvtoolsDialogsTest::openAnyDialog()
{
- /// example how to process an input file containing the UXMLDescriptions of the dialogs
- /// to dump
- if (true)
- {
- test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("svtools/qa/unit/data/svtools-dialogs-test.txt");
- SvFileStream aStream(aURL, StreamMode::READ);
- OString aNextUIFile;
- const OString aComment("#");
-
- while (aStream.ReadLine(aNextUIFile))
- {
- if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
- {
- // first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
- // only use for fallback when only the UI file is available.
- dumpDialogToPath(aNextUIFile);
- }
- }
- }
- }
-
- /// example how to dump all known dialogs
- if (false)
- {
- // example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
- // example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
- // example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); i++)
- {
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
-
- if (pDlg)
- {
- // known dialog, dump screenshot to path
- dumpDialogToPath(*pDlg);
- }
- else
- {
- // unknown dialog, should not happen in this basic loop.
- // You have probably forgotten to add a case and
- // implementastion to createDialogByID, please do this
- }
- }
- }
-
- /// example how to dump a dialog using fallback functionality
- if (false)
- {
- // unknown dialog, try fallback to generic created
- // VclBuilder-generated instance. Keep in mind that Dialogs
- // using this mechanism will probably not be layouted well
- // since the setup/initialization part is missing. Thus,
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list