[Libreoffice-commits] core.git: cui/source include/sfx2 sfx2/sdi sfx2/source

homeboy445 (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 29 11:42:01 UTC 2021


 cui/source/dialogs/GraphicTestsDialog.cxx |    4 ++--
 cui/source/factory/dlgfact.cxx            |    8 --------
 cui/source/factory/dlgfact.hxx            |    3 ---
 cui/source/inc/GraphicsTestsDialog.hxx    |    2 +-
 cui/source/options/optgdlg.cxx            |    7 ++++---
 cui/source/options/optgdlg.hxx            |    2 +-
 include/sfx2/sfxdlg.hxx                   |    2 --
 include/sfx2/sfxsids.hrc                  |    1 -
 sfx2/sdi/appslots.sdi                     |    4 ----
 sfx2/sdi/sfx.sdi                          |   17 -----------------
 sfx2/source/appl/appserv.cxx              |    9 ---------
 11 files changed, 8 insertions(+), 51 deletions(-)

New commits:
commit 3e35fb78ac577d6bca9a05276f50ab98a8b6425f
Author:     homeboy445 <akshitsan13 at gmail.com>
AuthorDate: Tue Jun 29 21:16:26 2021 +0530
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Jul 29 13:41:26 2021 +0200

    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 at gmail.com>

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>
@@ -1695,13 +1694,6 @@ AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent)
         std::make_unique<AboutDialog>(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)
 {
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());


More information about the Libreoffice-commits mailing list