[Libreoffice-commits] core.git: cui/source include/sfx2 include/vcl sfx2/source
Heiko Tietze (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 3 06:49:30 UTC 2020
cui/source/factory/dlgfact.cxx | 10 +++-------
cui/source/factory/dlgfact.hxx | 16 +---------------
include/sfx2/sfxdlg.hxx | 2 ++
include/vcl/abstdlg.hxx | 10 ----------
sfx2/source/appl/appserv.cxx | 2 +-
5 files changed, 7 insertions(+), 33 deletions(-)
New commits:
commit e865acdcc9321a08fac00bd1fb2c27a7580d3cec
Author: Heiko Tietze <tietze.heiko at gmail.com>
AuthorDate: Sun Aug 2 17:50:53 2020 +0200
Commit: Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Mon Aug 3 08:48:51 2020 +0200
Clean-up of abstdlg
Unnecessary functions removed
Change-Id: I32dab4b4c5fe8ff351277cbbd32e0b462443d031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99959
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze at documentfoundation.org>
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 8ebff9022b23..35209dba8035 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1428,11 +1428,6 @@ short AbstractAdditionsDialog_Impl::Execute()
return m_xDlg->run();
}
-short AbstractTipOfTheDayDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
short AbstractDiagramDialog_Impl::Execute()
{
return m_xDlg->run();
@@ -1703,10 +1698,11 @@ AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent)
std::make_unique<AboutDialog>(pParent));
}
-VclPtr<AbstractTipOfTheDayDialog>
+VclPtr<VclAbstractDialog>
AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent)
{
- return VclPtr<AbstractTipOfTheDayDialog_Impl>::Create(std::make_unique<TipOfTheDayDialog>(pParent));
+ return VclPtr<CuiAbstractController_Impl>::Create(
+ std::make_unique<TipOfTheDayDialog>(pParent));
}
VclPtr<AbstractDiagramDialog>
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index cc4f90bd82ea..5519dba2dd72 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -767,20 +767,6 @@ public:
virtual short Execute() override;
};
-class TipOfTheDayDialog;
-class AbstractTipOfTheDayDialog_Impl : public AbstractTipOfTheDayDialog
-{
-protected:
- std::unique_ptr<TipOfTheDayDialog> m_xDlg;
-
-public:
- explicit AbstractTipOfTheDayDialog_Impl(std::unique_ptr<TipOfTheDayDialog> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
-};
-
class DiagramDialog;
/** Edit Diagram dialog */
@@ -986,7 +972,7 @@ public:
virtual VclPtr<AbstractAboutDialog> CreateAboutDialog(weld::Window* pParent) override;
- virtual VclPtr<AbstractTipOfTheDayDialog> CreateTipOfTheDayDialog(weld::Window* pParent) override;
+ virtual VclPtr<VclAbstractDialog> CreateTipOfTheDayDialog(weld::Window* pParent) override;
virtual VclPtr<AbstractDiagramDialog> CreateDiagramDialog(
weld::Window* pParent,
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index 26378ffb754c..1f9109744cd0 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -143,6 +143,8 @@ public:
virtual VclPtr<VclAbstractDialog> CreateOptionsDialog(
weld::Window* pParent, const OUString& rExtensionId ) = 0;
+
+ virtual VclPtr<VclAbstractDialog> CreateTipOfTheDayDialog(weld::Window* _pParent) = 0;
};
#endif
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index 8f8c334118fd..e5c6ec59c3e0 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -137,12 +137,6 @@ protected:
virtual ~AbstractAdditionsDialog() override = default;
};
-class VCL_DLLPUBLIC AbstractTipOfTheDayDialog : public VclAbstractDialog
-{
-protected:
- virtual ~AbstractTipOfTheDayDialog() override = default;
-};
-
/** Edit Diagram dialog */
class VCL_DLLPUBLIC AbstractDiagramDialog : public VclAbstractDialog
{
@@ -193,10 +187,6 @@ public:
virtual VclPtr<AbstractAdditionsDialog>
CreateAdditionsDialog(weld::Window* pParent, const OUString& sAdditionsTag) = 0;
- // create info dialog to show tip-of-the-day
- virtual VclPtr<AbstractTipOfTheDayDialog>
- CreateTipOfTheDayDialog(weld::Window* pParent) = 0;
-
virtual VclPtr<AbstractDiagramDialog> CreateDiagramDialog(
weld::Window* pParent,
std::shared_ptr<DiagramDataInterface> pDiagramData) = 0;
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 6dd813fdf7be..0c843bc6b83c 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -643,7 +643,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_TIPOFTHEDAY:
{
- VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create();
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateTipOfTheDayDialog(rReq.GetFrameWeld()));
pDlg->Execute();
bDone = true;
More information about the Libreoffice-commits
mailing list