diff options
author | homeboy445 <akshitsan13@gmail.com> | 2021-06-29 21:16:26 +0530 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-07-29 13:41:26 +0200 |
commit | 3e35fb78ac577d6bca9a05276f50ab98a8b6425f (patch) | |
tree | 9e0b7c46721c95df867bb1e0fbcb4c620e2cfb01 /cui | |
parent | 27612dc0d3afad4f7eec7109a09262e877c63399 (diff) |
Intialize the VCL test dialog directly instead of dispatching command
Change-Id: Ia24c97b12266dac3a6f315993558f3cdac8a4652
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118124
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/GraphicTestsDialog.cxx | 4 | ||||
-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 | 2 | ||||
-rw-r--r-- | cui/source/options/optgdlg.cxx | 7 | ||||
-rw-r--r-- | cui/source/options/optgdlg.hxx | 2 |
6 files changed, 8 insertions, 18 deletions
diff --git a/cui/source/dialogs/GraphicTestsDialog.cxx b/cui/source/dialogs/GraphicTestsDialog.cxx index 0bd3bdd0fc39..8cacba0d1607 100644 --- a/cui/source/dialogs/GraphicTestsDialog.cxx +++ b/cui/source/dialogs/GraphicTestsDialog.cxx @@ -47,7 +47,7 @@ IMPL_LINK(GraphicTestEntry, HandleResultViewRequest, weld::Button&, rButton, voi m_ImgVwDialog.run(); } -GraphicsTestsDialog::GraphicsTestsDialog(weld::Window* pParent) +GraphicsTestsDialog::GraphicsTestsDialog(weld::Container* pParent) : GenericDialogController(pParent, "cui/ui/graphictestdlg.ui", "GraphicTestsDialog") , m_xResultLog(m_xBuilder->weld_text_view("gptest_txtVW")) , m_xDownloadResults(m_xBuilder->weld_button("gptest_downld")) @@ -81,7 +81,7 @@ short GraphicsTestsDialog::run() IMPL_LINK_NOARG(GraphicsTestsDialog, HandleDownloadRequest, weld::Button&, void) { - osl::File::remove(m_xZipFileUrl); // Remove previous exports + osl::File::remove(m_xZipFileUrl); // Remove the previous export try { utl::ZipPackageHelper aZipHelper(comphelper::getProcessComponentContext(), m_xZipFileUrl); diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 943bf5c84023..75fb59b7fe29 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -64,7 +64,6 @@ #include <SignatureLineDialog.hxx> #include <SignSignatureLineDialog.hxx> #include <QrCodeGenDialog.hxx> -#include <GraphicsTestsDialog.hxx> #include <SpellDialog.hxx> #include <cfg.hxx> #include <numpages.hxx> @@ -1696,13 +1695,6 @@ 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 c0b1f7714418..16de55fd05a3 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -37,7 +37,6 @@ #include <cuitbxform.hxx> #include <dlgname.hxx> #include <DiagramDialog.hxx> -#include <GraphicsTestsDialog.hxx> #include <hangulhanjadlg.hxx> #include <hyphen.hxx> #include <insdlg.hxx> @@ -952,8 +951,6 @@ 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 index 09e7fb28ff8e..3f8a151f8080 100644 --- a/cui/source/inc/GraphicsTestsDialog.hxx +++ b/cui/source/inc/GraphicsTestsDialog.hxx @@ -52,7 +52,7 @@ class GraphicsTestsDialog : public weld::GenericDialogController DECL_LINK(HandleResultViewRequest, weld::Button&, void); public: - GraphicsTestsDialog(weld::Window* pParent); + GraphicsTestsDialog(weld::Container* pParent); ~GraphicsTestsDialog(); virtual short run() override; }; diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index b1c2ac5b4adc..6c35426bce6d 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -46,6 +46,7 @@ #include <editeng/editids.hrc> #include <svx/svxids.hrc> #include <svl/intitem.hxx> +#include <GraphicsTestsDialog.hxx> #include <unotools/searchopt.hxx> #include <sal/log.hxx> #include <officecfg/Office/Common.hxx> @@ -585,10 +586,10 @@ OfaViewTabPage::~OfaViewTabPage() { } -IMPL_STATIC_LINK_NOARG(OfaViewTabPage, OnRunGPTestClick, weld::Button&, void) +IMPL_LINK_NOARG(OfaViewTabPage, OnRunGPTestClick, weld::Button&, void) { - comphelper::dispatchCommand(".uno:GraphicTestDialog",{}); - //Launch the Dialog box from here. + GraphicsTestsDialog m_xGraphicsTestDialog(m_xContainer.get()); + m_xGraphicsTestDialog.run(); } IMPL_STATIC_LINK_NOARG(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void) diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index ffdfdb423195..198ecb50e0e8 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -117,7 +117,7 @@ private: 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); + DECL_LINK(OnRunGPTestClick, weld::Button&, void); void UpdateSkiaStatus(); void HideSkiaWidgets(); void UpdateHardwareAccelStatus(); |