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 | |
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>
-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 | ||||
-rw-r--r-- | include/sfx2/sfxdlg.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/sfxsids.hrc | 1 | ||||
-rw-r--r-- | sfx2/sdi/appslots.sdi | 4 | ||||
-rw-r--r-- | sfx2/sdi/sfx.sdi | 17 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 9 |
11 files changed, 8 insertions, 51 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(); diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx index 8313693e1c70..fc2941d3189a 100644 --- a/include/sfx2/sfxdlg.hxx +++ b/include/sfx2/sfxdlg.hxx @@ -146,8 +146,6 @@ 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 94ef74e86107..d9a8b14eb514 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -63,7 +63,6 @@ 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/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index 0a759a45a22f..5503c624e84c 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -25,10 +25,6 @@ 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 b3042125a7e5..85570cdbb08c 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -134,23 +134,6 @@ 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 b0e08c424563..7339f34791d8 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -637,15 +637,6 @@ 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()); |