diff options
author | homeboy445 <akshitsan13@gmail.com> | 2021-06-17 17:42:41 +0530 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-06-29 06:14:59 +0200 |
commit | df3ed584b025b8a87a8a3042a04ac8c12ebe4f26 (patch) | |
tree | 14279a51292a90848cbe780393a32ffd639c7b86 | |
parent | 7c95c16deba975b0b282ccea1fbfcfadd7aa28b3 (diff) |
Added a UI dialog box for running the VCL backend tests
The UI dialog box will allow the user to run the VCL graphics tests
and will allow them to view the results as well.
Change-Id: Ice289444ff425496a3e400a4c2bc06c307168c62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117384
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r-- | cui/Library_cui.mk | 1 | ||||
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/GraphicTestsDialog.cxx | 55 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 8 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 3 | ||||
-rw-r--r-- | cui/source/inc/GraphicsTestsDialog.hxx | 24 | ||||
-rw-r--r-- | cui/source/options/optgdlg.cxx | 8 | ||||
-rw-r--r-- | cui/source/options/optgdlg.hxx | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/graphictestdlg.ui | 113 | ||||
-rw-r--r-- | cui/uiconfig/ui/optviewpage.ui | 146 | ||||
-rw-r--r-- | include/sfx2/sfxdlg.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/sfxsids.hrc | 1 | ||||
-rw-r--r-- | include/vcl/test/GraphicsRenderTests.hxx | 2 | ||||
-rw-r--r-- | sfx2/sdi/appslots.sdi | 4 | ||||
-rw-r--r-- | sfx2/sdi/sfx.sdi | 16 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 9 |
16 files changed, 289 insertions, 106 deletions
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index 6fdf446f97e9..345f84b7f008 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -138,6 +138,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/dialogs/pastedlg \ cui/source/dialogs/postdlg \ cui/source/dialogs/QrCodeGenDialog \ + cui/source/dialogs/GraphicTestsDialog \ cui/source/dialogs/scriptdlg \ cui/source/dialogs/SignatureLineDialogBase \ cui/source/dialogs/SignatureLineDialog \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index c6d9d1584a66..73da8e159f09 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -82,6 +82,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/gallerythemeiddialog \ cui/uiconfig/ui/gallerytitledialog \ cui/uiconfig/ui/galleryupdateprogress \ + cui/uiconfig/ui/graphictestdlg \ cui/uiconfig/ui/hangulhanjaadddialog \ cui/uiconfig/ui/hangulhanjaeditdictdialog \ cui/uiconfig/ui/hangulhanjaconversiondialog \ diff --git a/cui/source/dialogs/GraphicTestsDialog.cxx b/cui/source/dialogs/GraphicTestsDialog.cxx new file mode 100644 index 000000000000..275d33d75886 --- /dev/null +++ b/cui/source/dialogs/GraphicTestsDialog.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <GraphicsTestsDialog.hxx> + +GraphicsTestsDialog::GraphicsTestsDialog(weld::Window* pParent) + : GenericDialogController(pParent, "cui/ui/graphictestdlg.ui", "GraphicTestsDialog") + , m_xResultLog(m_xBuilder->weld_text_view("gptestresults")) + , m_xDownloadResults(m_xBuilder->weld_button("gptest_downld")) +{ + m_xResultLog->set_text("Running tests..."); + m_xDownloadResults->connect_clicked(LINK(this, GraphicsTestsDialog, HandleDownloadRequest)); + runGraphicsTestandUpdateLog(); +} + +void GraphicsTestsDialog::runGraphicsTestandUpdateLog() +{ + GraphicsRenderTests TestObject; + TestObject.run(); + OUString atemp = "--General Info--\nGraphics Backend used : " + TestObject.m_aCurGraphicsBackend + + "\nPassed Tests : " + OUString::number(TestObject.m_aPassed.size()) + + "\nQuirky Tests : " + OUString::number(TestObject.m_aQuirky.size()) + + "\nFailed Tests : " + OUString::number(TestObject.m_aFailed.size()) + + "\nSkipped Tests : " + OUString::number(TestObject.m_aSkipped.size()) + + "\n\n--Test Details--\n"; + OString writeResults; + for (const class OString& tests : TestObject.m_aPassed) + { + writeResults += tests + " [PASSED]\n"; + } + for (const class OString& tests : TestObject.m_aQuirky) + { + writeResults += tests + " [QUIRKY]\n"; + } + for (const class OString& tests : TestObject.m_aFailed) + { + writeResults += tests + " [FAILED]\n"; + } + for (const class OString& tests : TestObject.m_aSkipped) + { + writeResults += tests + " [SKIPPED]\n"; + } + m_xResultLog->set_text(atemp + OStringToOUString(writeResults, RTL_TEXTENCODING_UTF8)); +} + +IMPL_STATIC_LINK_NOARG(GraphicsTestsDialog, HandleDownloadRequest, weld::Button&, void) +{ + //TODO: Enter code for downloading the results to user's system. +} diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 19b30518e426..f49e3228134f 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -64,6 +64,7 @@ #include <SignatureLineDialog.hxx> #include <SignSignatureLineDialog.hxx> #include <QrCodeGenDialog.hxx> +#include <GraphicsTestsDialog.hxx> #include <SpellDialog.hxx> #include <cfg.hxx> #include <numpages.hxx> @@ -1695,6 +1696,13 @@ AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent) } VclPtr<VclAbstractDialog> +AbstractDialogFactory_Impl::CreateGraphicTestsDialog(weld::Window* pParent) +{ + return VclPtr<CuiAbstractController_Impl>::Create( + std::make_unique<GraphicsTestsDialog>(pParent)); +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent) { return VclPtr<CuiAbstractTipController_Impl>::Create( diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 1e16414f3b85..39e540c46352 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -37,6 +37,7 @@ #include <cuitbxform.hxx> #include <dlgname.hxx> #include <DiagramDialog.hxx> +#include <GraphicsTestsDialog.hxx> #include <hangulhanjadlg.hxx> #include <hyphen.hxx> #include <insdlg.hxx> @@ -951,6 +952,8 @@ public: virtual VclPtr<VclAbstractDialog> CreateAboutDialog(weld::Window* pParent) override; + virtual VclPtr<VclAbstractDialog> CreateGraphicTestsDialog(weld::Window* pParent) override; + virtual VclPtr<VclAbstractDialog> CreateTipOfTheDayDialog(weld::Window* pParent) override; virtual VclPtr<VclAbstractDialog> CreateToolbarmodeDialog(weld::Window* pParent) override; diff --git a/cui/source/inc/GraphicsTestsDialog.hxx b/cui/source/inc/GraphicsTestsDialog.hxx new file mode 100644 index 000000000000..d851fbf0b528 --- /dev/null +++ b/cui/source/inc/GraphicsTestsDialog.hxx @@ -0,0 +1,24 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#pragma once + +#include <vcl/weld.hxx> +#include <vcl/test/GraphicsRenderTests.hxx> + +class GraphicsTestsDialog : public weld::GenericDialogController +{ + std::unique_ptr<weld::TextView> m_xResultLog; + std::unique_ptr<weld::Button> m_xDownloadResults; + + DECL_STATIC_LINK(GraphicsTestsDialog, HandleDownloadRequest, weld::Button&, void); + +public: + GraphicsTestsDialog(weld::Window* pParent); + void runGraphicsTestandUpdateLog(); +};
\ No newline at end of file diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index fd79d34926f1..3870a3df3ca8 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -556,6 +556,7 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p , m_xMousePosLB(m_xBuilder->weld_combo_box("mousepos")) , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle")) , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons")) + , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest")) { if (Application::GetToolkitName().startsWith("gtk")) m_xMenuIconBox->hide(); @@ -590,12 +591,19 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png"); m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, OnMoreIconsClick)); + m_xRunGPTests->connect_clicked( LINK( this, OfaViewTabPage, OnRunGPTestClick)); } OfaViewTabPage::~OfaViewTabPage() { } +IMPL_STATIC_LINK_NOARG(OfaViewTabPage, OnRunGPTestClick, weld::Button&, void) +{ + comphelper::dispatchCommand(".uno:GraphicTestDialog",{}); + //Launch the Dialog box from here. +} + IMPL_STATIC_LINK_NOARG(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void) { css::uno::Sequence<css::beans::PropertyValue> aArgs(1); diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 1bd92980b1d5..38731cefd043 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -114,10 +114,12 @@ private: std::unique_ptr<weld::ComboBox> m_xMousePosLB; std::unique_ptr<weld::ComboBox> m_xMouseMiddleLB; std::unique_ptr<weld::Button> m_xMoreIcons; + std::unique_ptr<weld::Button> m_xRunGPTests; DECL_LINK(OnAntialiasingToggled, weld::Toggleable&, void); DECL_LINK(OnUseSkiaToggled, weld::Toggleable&, void); DECL_STATIC_LINK(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void); + DECL_STATIC_LINK(OfaViewTabPage, OnRunGPTestClick, weld::Button&, void); void UpdateSkiaStatus(); void HideSkiaWidgets(); void UpdateHardwareAccelStatus(); diff --git a/cui/uiconfig/ui/graphictestdlg.ui b/cui/uiconfig/ui/graphictestdlg.ui new file mode 100644 index 000000000000..339688d72d2f --- /dev/null +++ b/cui/uiconfig/ui/graphictestdlg.ui @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.38.2 --> +<interface domain="cui"> + <requires lib="gtk+" version="3.20"/> + <object class="GtkDialog" id="GraphicTestsDialog"> + <property name="can-focus">False</property> + <property name="title" translatable="yes" context="graphictestdlg|GraphicTestsDialog">Run Graphics Tests</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="default-width">500</property> + <property name="default-height">450</property> + <property name="type-hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="gptest-main"> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="gptestbtnrun"> + <property name="can-focus">False</property> + <property name="layout-style">end</property> + <child> + <object class="GtkButton" id="gptest_downld"> + <property name="label" translatable="yes" context="graphictestdlg|gptest_downld">Download Results</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="margin-start">20</property> + <property name="margin-end">20</property> + <property name="margin-top">5</property> + <property name="margin-bottom">5</property> + <accelerator key="c" signal="clicked" modifiers="GDK_CONTROL_MASK"/> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="gptest_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="tooltip-text" translatable="yes" context="graphictestdlg|gptest_label">Helps to determine the efficiency of LibreOffice's graphics rendering by running some tests under the hood and providing their results in the log.</property> + <property name="margin-start">400</property> + <property name="margin-top">10</property> + <property name="label" translatable="yes" context="graphictestdlg|gptest_label">What's this?</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="gptest_label1"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-end">400</property> + <property name="margin-top">10</property> + <property name="label" translatable="yes" context="graphictestdlg|gptest_label1">Results log:</property> + <property name="justify">center</property> + <accessibility> + <relation type="label-for" target="gptestresults"/> + </accessibility> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="gpscrollerwindow1"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="shadow-type">in</property> + <child> + <object class="GtkTextView" id="gptestresults"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="pixels-above-lines">3</property> + <property name="pixels-below-lines">3</property> + <property name="editable">False</property> + <property name="wrap-mode">word-char</property> + <property name="left-margin">10</property> + <property name="right-margin">10</property> + <property name="top-margin">10</property> + <property name="bottom-margin">10</property> + <property name="indent">2</property> + <accessibility> + <relation type="labelled-by" target="gptest_label1"/> + </accessibility> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + </child> + </object> +</interface> diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui index e7dd3e237fb9..9e37ea54389b 100644 --- a/cui/uiconfig/ui/optviewpage.ui +++ b/cui/uiconfig/ui/optviewpage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.1 --> +<!-- Generated with glade 3.38.2 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkAdjustment" id="adjustment2"> @@ -9,7 +9,7 @@ <property name="step-increment">1</property> <property name="page-increment">10</property> </object> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="OptViewPage"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -18,7 +18,7 @@ <property name="border-width">6</property> <property name="column-spacing">24</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=4 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -32,15 +32,15 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid" id="grid7"> <property name="visible">True</property> <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> <property name="hexpand">True</property> <property name="row-spacing">3</property> <property name="column-spacing">6</property> - <property name="margin-start">12</property> - <property name="margin-top">6</property> <child> <object class="GtkLabel" id="label11"> <property name="visible">True</property> @@ -136,20 +136,20 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=2 --> <object class="GtkGrid" id="grid8"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="row-spacing">3</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="row-spacing">3</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="menuiconsbox"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="column-spacing">6</property> <property name="hexpand">True</property> + <property name="column-spacing">6</property> <child> <object class="GtkLabel" id="label13"> <property name="visible">True</property> @@ -192,12 +192,12 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="menushortcutsbpx"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="column-spacing">6</property> <property name="hexpand">True</property> + <property name="column-spacing">6</property> <child> <object class="GtkComboBoxText" id="contextmenushortcuts"> <property name="visible">True</property> @@ -260,15 +260,15 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=3 --> <object class="GtkGrid" id="refgrid1"> <property name="visible">True</property> <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> <property name="hexpand">True</property> <property name="row-spacing">3</property> <property name="column-spacing">6</property> - <property name="margin-start">12</property> - <property name="margin-top">6</property> <child> <object class="GtkComboBoxText" id="notebookbariconsize"> <property name="visible">True</property> @@ -401,14 +401,14 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=3 n-rows=1 --> <object class="GtkGrid" id="refgrid"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="hexpand">True</property> - <property name="column-spacing">6</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="hexpand">True</property> + <property name="column-spacing">6</property> <child> <object class="GtkComboBoxText" id="iconstyle"> <property name="visible">True</property> @@ -488,7 +488,7 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -500,14 +500,14 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=6 --> <object class="GtkGrid" id="grid3"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="tooltip-text" translatable="yes" context="optviewpage|grid3|tooltip_text">Requires restart</property> - <property name="row-spacing">3</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="row-spacing">3</property> <child> <object class="GtkCheckButton" id="useaccel"> <property name="label" translatable="yes" context="optviewpage|useaccel">Use hard_ware acceleration</property> @@ -602,48 +602,6 @@ <property name="top-attach">5</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> </child> <child type="label"> @@ -669,13 +627,13 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid" id="grid9"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="row-spacing">3</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="row-spacing">3</property> <child> <object class="GtkCheckButton" id="showfontpreview"> <property name="label" translatable="yes" context="optviewpage|showfontpreview">Show p_review of fonts</property> @@ -717,7 +675,7 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -742,8 +700,8 @@ <property name="visible">True</property> <property name="can-focus">True</property> <property name="activates-default">True</property> - <property name="adjustment">adjustment2</property> <property name="truncate-multiline">True</property> + <property name="adjustment">adjustment2</property> <child internal-child="accessible"> <object class="AtkObject" id="aanf-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip | aanf">Enter the smallest font size to apply antialiasing.</property> @@ -755,51 +713,12 @@ <property name="top-attach">0</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="left-attach">0</property> <property name="top-attach">2</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> </child> <child type="label"> @@ -818,6 +737,21 @@ <property name="top-attach">1</property> </packing> </child> + <child> + <object class="GtkButton" id="btn_rungptest"> + <property name="label" translatable="yes" context="optviewpage|btn_rungptest">Run Graphics Tests</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="margin-start">10</property> + <property name="margin-end">10</property> + <property name="margin-top">10</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> </object> <packing> <property name="left-attach">1</property> diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx index d133e42f329c..1c4b25f335fd 100644 --- a/include/sfx2/sfxdlg.hxx +++ b/include/sfx2/sfxdlg.hxx @@ -146,6 +146,8 @@ public: virtual VclPtr<VclAbstractDialog> CreateAboutDialog(weld::Window* _pParent) = 0; + virtual VclPtr<VclAbstractDialog> CreateGraphicTestsDialog(weld::Window* pParent) = 0; + virtual VclPtr<VclAbstractDialog> CreateTipOfTheDayDialog(weld::Window* _pParent) = 0; virtual VclPtr<VclAbstractDialog> CreateToolbarmodeDialog(weld::Window* _pParent) = 0; diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 151503a98545..35d9ab895856 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -63,6 +63,7 @@ class SvxSearchItem; #define SID_PRINTER_NAME (SID_SFX_START + 322) #define SID_PRINTER_CHANGESTODOC (SID_SFX_START + 324) #define SID_PRINTPREVIEW (SID_SFX_START + 325) +#define SID_GRAPHICTEST_DIALOG (SID_SFX_START + 326) #define SID_MAIL_SUBJECT (SID_SFX_START + 328) #define SID_MAIL_SENDDOC (SID_SFX_START + 331) diff --git a/include/vcl/test/GraphicsRenderTests.hxx b/include/vcl/test/GraphicsRenderTests.hxx index 9ff5b7c33d90..bfe536b7aa53 100644 --- a/include/vcl/test/GraphicsRenderTests.hxx +++ b/include/vcl/test/GraphicsRenderTests.hxx @@ -19,6 +19,7 @@ class VCL_PLUGIN_PUBLIC GraphicsRenderTests { +public: //For storing the results correspondingly to the tests. std::vector<OString> m_aPassed; std::vector<OString> m_aQuirky; @@ -28,6 +29,7 @@ class VCL_PLUGIN_PUBLIC GraphicsRenderTests //For storing the current graphics Backend in use. OUString m_aCurGraphicsBackend; +private: void testDrawRectWithRectangle(); void testDrawRectWithPixel(); void testDrawRectWithLine(); diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index af5e394f3fb2..bf3f450a303d 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -25,6 +25,10 @@ interface Application [ ExecMethod = MiscExec_Impl ; ] + SID_GRAPHICTEST_DIALOG + [ + ExecMethod = MiscExec_Impl ; + ] SID_SETOPTIONS [ ExecMethod = MiscExec_Impl ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 79476c68fa7f..92add9f2abf0 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -134,6 +134,22 @@ SfxVoidItem About SID_ABOUT GroupId = SfxGroupId::Application; ] +SfxVoidItem GraphicTestDialog SID_GRAPHICTEST_DIALOG +() +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Application; +] SfxVoidItem Activate SID_ACTIVATE () diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 098f705410a4..fa2ec85a99c3 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -626,6 +626,15 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } + case SID_GRAPHICTEST_DIALOG: + { + SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); + ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateGraphicTestsDialog(rReq.GetFrameWeld())); + pDlg->Execute(); + bDone = true; + break; + } + case SID_TEMPLATE_MANAGER: { SfxTemplateManagerDlg aDialog(rReq.GetFrameWeld()); |