[Libreoffice-commits] core.git: 53 commits - basctl/CppunitTest_basctl_dialogs_test.mk basctl/Module_basctl.mk basctl/qa bin/gbuild-to-ide chart2/CppunitTest_chart2_dialogs_test.mk chart2/Module_chart2.mk chart2/qa cui/CppunitTest_cui_dialogs_test.mk cui/Module_cui.mk cui/qa dbaccess/CppunitTest_dbaccess_dialogs_test.mk dbaccess/Module_dbaccess.mk dbaccess/qa desktop/CppunitTest_desktop_dialogs_test.mk desktop/Module_desktop.mk desktop/qa filter/CppunitTest_filter_dialogs_test.mk filter/Module_filter.mk filter/qa formula/CppunitTest_formula_dialogs_test.mk formula/Module_formula.mk formula/qa fpicker/CppunitTest_fpicker_dialogs_test.mk fpicker/Module_fpicker.mk fpicker/qa include/sfx2 include/test include/vcl Makefile.in postprocess/CustomTarget_signing.mk reportdesign/CppunitTest_reportdesign_dialogs_test.mk reportdesign/Module_reportdesign.mk reportdesign/qa RepositoryModule_host.mk sc/CppunitTest_sc_screenshots.mk sc/inc sc/Module_sc.mk sc/qa sc/source sd/CppunitTest_sd_dialogs_test.mk sd/inc sd/Module_sd.mk sd/qa sd/source sfx2/CppunitTest_sfx2_dialogs_test.mk sfx2/Module_sfx2.mk sfx2/qa sfx2/source solenv/gbuild starmath/CppunitTest_starmath_dialogs_test.mk starmath/Module_starmath.mk starmath/qa svtools/CppunitTest_svtools_dialogs_test.mk svtools/Module_svtools.mk svtools/qa svx/CppunitTest_svx_dialogs_test.mk svx/Module_svx.mk svx/qa sw/CppunitTest_sw_dialogs_test.mk sw/Module_sw.mk sw/qa test/Library_test.mk test/source uui/CppunitTest_uui_dialogs_test.mk uui/Module_uui.mk uui/qa vcl/CppunitTest_vcl_dialogs_test.mk vcl/Module_vcl.mk vcl/qa vcl/source xmlsecurity/CppunitTest_xmlsecurity_dialogs_test.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/qa
Armin Le Grand
Armin.Le.Grand at cib.de
Thu Aug 18 00:42:16 UTC 2016
Makefile.in | 2
RepositoryModule_host.mk | 2
basctl/CppunitTest_basctl_dialogs_test.mk | 67 +
basctl/Module_basctl.mk | 5
basctl/qa/unit/basctl-dialogs-test.cxx | 78 +
basctl/qa/unit/data/basctl-dialogs-test.txt | 47 +
bin/gbuild-to-ide | 44 -
chart2/CppunitTest_chart2_dialogs_test.mk | 69 +
chart2/Module_chart2.mk | 5
chart2/qa/unit/chart2-dialogs-test.cxx | 78 +
chart2/qa/unit/data/chart2-dialogs-test.txt | 69 +
cui/CppunitTest_cui_dialogs_test.mk | 68 +
cui/Module_cui.mk | 5
cui/qa/unit/cui-dialogs-test.cxx | 78 +
cui/qa/unit/data/cui-dialogs-test.txt | 226 +++++
dbaccess/CppunitTest_dbaccess_dialogs_test.mk | 67 +
dbaccess/Module_dbaccess.mk | 5
dbaccess/qa/unit/data/dbaccess-dialogs-test.txt | 102 ++
dbaccess/qa/unit/dbaccess-dialogs-test.cxx | 78 +
desktop/CppunitTest_desktop_dialogs_test.mk | 67 +
desktop/Module_desktop.mk | 5
desktop/qa/unit/data/desktop-dialogs-test.txt | 45 +
desktop/qa/unit/desktop-dialogs-test.cxx | 78 +
filter/CppunitTest_filter_dialogs_test.mk | 66 +
filter/Module_filter.mk | 5
filter/qa/unit/data/filter-dialogs-test.txt | 50 +
filter/qa/unit/filter-dialogs-test.cxx | 78 +
formula/CppunitTest_formula_dialogs_test.mk | 61 +
formula/Module_formula.mk | 5
formula/qa/unit/data/formula-dialogs-test.txt | 40
formula/qa/unit/formula-dialogs-test.cxx | 78 +
fpicker/CppunitTest_fpicker_dialogs_test.mk | 61 +
fpicker/Module_fpicker.mk | 5
fpicker/qa/unit/data/fpicker-dialogs-test.txt | 40
fpicker/qa/unit/fpicker-dialogs-test.cxx | 78 +
include/sfx2/tabdlg.hxx | 3
include/test/screenshot_test.hxx | 91 ++
include/vcl/abstdlg.hxx | 9
include/vcl/builder.hxx | 15
include/vcl/dialog.hxx | 12
include/vcl/tabdlg.hxx | 4
include/vcl/window.hxx | 2
postprocess/CustomTarget_signing.mk | 3
reportdesign/CppunitTest_reportdesign_dialogs_test.mk | 67 +
reportdesign/Module_reportdesign.mk | 5
reportdesign/qa/unit/data/reportdesign-dialogs-test.txt | 51 +
reportdesign/qa/unit/reportdesign-dialogs-test.cxx | 78 +
sc/CppunitTest_sc_screenshots.mk | 63 +
sc/Module_sc.mk | 4
sc/inc/scabstdlg.hxx | 3
sc/qa/unit/screenshots/data/screenshots.txt | 164 +++
sc/qa/unit/screenshots/screenshots.cxx | 291 +++++++
sc/source/ui/attrdlg/scdlgfact.cxx | 5
sc/source/ui/attrdlg/scdlgfact.hxx | 25
sc/source/ui/inc/protectiondlg.hxx | 4
sc/source/ui/inc/sharedocdlg.hxx | 2
sc/source/ui/inc/tabbgcolordlg.hxx | 3
sc/source/ui/inc/viewfunc.hxx | 2
sc/source/ui/miscdlgs/tabbgcolordlg.cxx | 4
sc/source/ui/view/tabvwshf.cxx | 3
sd/CppunitTest_sd_dialogs_test.mk | 71 +
sd/Module_sd.mk | 5
sd/inc/sdabstdlg.hxx | 3
sd/qa/unit/data/dialogs-test.txt | 76 +
sd/qa/unit/dialogs-test.cxx | 662 ++++++++++++++++
sd/source/filter/html/pubdlg.cxx | 27
sd/source/ui/dlg/headerfooterdlg.cxx | 41
sd/source/ui/dlg/sddlgfact.hxx | 24
sd/source/ui/inc/drawview.hxx | 2
sd/source/ui/inc/pubdlg.hxx | 4
sfx2/CppunitTest_sfx2_dialogs_test.mk | 67 +
sfx2/Module_sfx2.mk | 5
sfx2/qa/unit/data/sfx2-dialogs-test.txt | 71 +
sfx2/qa/unit/sfx2-dialogs-test.cxx | 78 +
sfx2/source/dialog/tabdlg.cxx | 50 +
solenv/gbuild/CppunitTest.mk | 11
solenv/gbuild/Module.mk | 40
solenv/gbuild/Postprocess.mk | 1
solenv/gbuild/TargetLocations.mk | 1
solenv/gbuild/extensions/post_SpeedUpTargets.mk | 14
solenv/gbuild/gbuild.help.txt | 1
starmath/CppunitTest_starmath_dialogs_test.mk | 66 +
starmath/Module_starmath.mk | 5
starmath/qa/unit/data/starmath-dialogs-test.txt | 47 +
starmath/qa/unit/starmath-dialogs-test.cxx | 78 +
svtools/CppunitTest_svtools_dialogs_test.mk | 67 +
svtools/Module_svtools.mk | 5
svtools/qa/unit/data/svtools-dialogs-test.txt | 45 +
svtools/qa/unit/svtools-dialogs-test.cxx | 78 +
svx/CppunitTest_svx_dialogs_test.mk | 69 +
svx/Module_svx.mk | 5
svx/qa/unit/data/svx-dialogs-test.txt | 80 +
svx/qa/unit/svx-dialogs-test.cxx | 78 +
sw/CppunitTest_sw_dialogs_test.mk | 71 +
sw/Module_sw.mk | 5
sw/qa/unit/data/sw-dialogs-test.txt | 211 +++++
sw/qa/unit/sw-dialogs-test.cxx | 78 +
test/Library_test.mk | 1
test/source/screenshot_test.cxx | 255 ++++++
uui/CppunitTest_uui_dialogs_test.mk | 66 +
uui/Module_uui.mk | 5
uui/qa/unit/data/uui-dialogs-test.txt | 44 +
uui/qa/unit/uui-dialogs-test.cxx | 78 +
vcl/CppunitTest_vcl_dialogs_test.mk | 66 +
vcl/Module_vcl.mk | 6
vcl/qa/unit/data/vcl-dialogs-test.txt | 45 +
vcl/qa/unit/vcl-dialogs-test.cxx | 78 +
vcl/source/app/settings.cxx | 2
vcl/source/window/abstdlg.cxx | 19
vcl/source/window/dialog.cxx | 45 +
vcl/source/window/paint.cxx | 11
vcl/source/window/tabdlg.cxx | 141 +++
xmlsecurity/CppunitTest_xmlsecurity_dialogs_test.mk | 66 +
xmlsecurity/Module_xmlsecurity.mk | 5
xmlsecurity/qa/unit/data/xmlsecurity-dialogs-test.txt | 45 +
xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx | 78 +
116 files changed, 5985 insertions(+), 83 deletions(-)
New commits:
commit a06a8ecb743aa3ffb1be83fbb98f7aa06bc230cb
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Wed Aug 17 12:30:11 2016 +0200
screenshots: fix sc screenshot test
Seems to need a 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..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
@@ -72,11 +71,9 @@ public:
virtual ~ScScreenshotTest();
void testOpeningModalDialogs();
- //void testOpeningModelessDialogs();
CPPUNIT_TEST_SUITE(ScScreenshotTest);
CPPUNIT_TEST(testOpeningModalDialogs);
- //CPPUNIT_TEST(testOpeningModelessDialogs);
CPPUNIT_TEST_SUITE_END();
};
@@ -95,11 +92,12 @@ ScScreenshotTest::~ScScreenshotTest()
{
}
-void ScScreenshotTest::initializeWithDoc(const char* pName)
+void ScScreenshotTest::initialize()
{
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);
@@ -114,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)
@@ -273,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");
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 ce6cbf86a5e4e23404a6102d18bb7433a64531d1
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Wed Aug 17 09:43:33 2016 +0200
screenshots: add new global make target
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..ab0e356 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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 2bc4917a9b9f961e74f2953a82b1f3a01212f457
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Thu Jul 28 17:10:15 2016 +0200
screenshots: clang plugin & tabpage usage fixes
Adapted clang compiler results, 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 b85600c9d49e555421612fdeca6c6316d192bbd6
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Thu Jul 28 14:07:44 2016 +0200
screenshots: fix Linux, exclude a few crashing dialogs
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 2a5ac6f6348acdfacc3a551b184369fe7dbfa0cd
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Thu Jul 28 12:22:00 2016 +0200
screenshots: unify 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,
- // 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("svt/ui/addresstemplatedialog.ui");
-
- dumpDialogToPath(aUIXMLDescription);
- }
+ /// process input file containing the UXMLDescriptions of the dialogs to dump
+ processDialogBatchFile("svtools/qa/unit/data/svtools-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(SvtoolsDialogsTest);
diff --git a/svx/qa/unit/svx-dialogs-test.cxx b/svx/qa/unit/svx-dialogs-test.cxx
index 17bbfd2..fec1e18 100644
--- a/svx/qa/unit/svx-dialogs-test.cxx
+++ b/svx/qa/unit/svx-dialogs-test.cxx
@@ -67,80 +67,8 @@ VclAbstractDialog* SvxDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void SvxDialogsTest::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("svx/qa/unit/data/svx-dialogs-test.txt");
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list