summaryrefslogtreecommitdiffstats
path: root/include/test
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-09 13:55:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-10 20:25:07 +0200
commitbb6bcabda53dbd64dda43f09fab9f4ad6f34eba6 (patch)
tree4fe51458a061c92587c22be397fd74a2e4436aaf /include/test
parentvcl, BitmapEx transformed draw: special-case simple rotations (diff)
downloadcore-bb6bcabda53dbd64dda43f09fab9f4ad6f34eba6.tar.gz
core-bb6bcabda53dbd64dda43f09fab9f4ad6f34eba6.zip
support screenshotting .ui files with GtkBuilder
so... SAL_USE_VCLPLUGIN=gtk3 make screenshot for the "unknown dialog" cases of make screenshot, which loads .ui files and tries to render them, will render them with the native gtk infrastructure Change-Id: Ifc8fe264155887c4d01b7ce0e2aa53e12acbfcb0 Reviewed-on: https://gerrit.libreoffice.org/80545 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/test')
-rw-r--r--include/test/screenshot_test.hxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/test/screenshot_test.hxx b/include/test/screenshot_test.hxx
index 74bcfc721d53..3e1f3f84a06f 100644
--- a/include/test/screenshot_test.hxx
+++ b/include/test/screenshot_test.hxx
@@ -15,7 +15,8 @@
#include <unotest/macros_test.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <osl/file.hxx>
-#include <vcl/dialog.hxx>
+#include <vcl/vclptr.hxx>
+#include <vcl/weld.hxx>
#include <map>
class VclAbstractDialog;
@@ -30,11 +31,18 @@ private:
/// the set of known dialogs and their ID for usage in createDialogByID
mapType maKnownDialogs;
+ /// parent for non-dialog buildables
+ weld::GenericDialogController maParent;
+ std::unique_ptr<weld::Container> mxParentWidget;
+
private:
/// helpers
void implSaveScreenshot(const BitmapEx& rScreenshot, const OString& rScreenshotId);
void saveScreenshot(VclAbstractDialog const & rDialog);
- void saveScreenshot(Dialog& rDialog);
+ void saveScreenshot(weld::Window& rDialog);
+
+ /// helper method to create and dump a dialog based on Builder contents.
+ void dumpDialogToPath(weld::Builder& rDialog);
/// helper method to populate maKnownDialogs, called in setUp(). Needs to be
/// written and has to add entries to maKnownDialogs
@@ -58,9 +66,6 @@ public:
/// version for AbstractDialogs, the ones created in AbstractDialogFactories
void dumpDialogToPath(VclAbstractDialog& rDialog);
- /// version for pure vcl-based dialogs
- void dumpDialogToPath(Dialog& rDialog);
-
/// fallback version for dialogs for which only the UXMLDescription is known.
/// This should be used with care - no active layouting will be done, only the
/// VclBuilder will be activated for layouting. Result can thus vary drastically