summaryrefslogtreecommitdiff
path: root/cui/source/factory
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-09 13:03:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-09 21:48:09 +0200
commit40ca52ee802ea3992caa82f811eab124381bc121 (patch)
tree0c20f242b1900069b8af516013d57f99924b5fa4 /cui/source/factory
parent54e13125860b124535c48e93b8001cd1aab25d8f (diff)
weld SvxSearchSimilarityDialog
Change-Id: Ifff02a6e9a9b8ce78b1e7d15f5f9a73ec2574872 Reviewed-on: https://gerrit.libreoffice.org/52631 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/factory')
-rw-r--r--cui/source/factory/dlgfact.cxx20
-rw-r--r--cui/source/factory/dlgfact.hxx11
2 files changed, 21 insertions, 10 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 091c920b9c5a..2002a4339183 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -113,7 +113,12 @@ IMPL_ABSTDLG_BASE(AbstractTitleDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractScriptSelectorDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractURLDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractSvxSearchSimilarityDialog_Impl);
+
+short AbstractSvxSearchSimilarityDialog_Impl::Execute()
+{
+ return m_xDlg->run();
+}
+
IMPL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl);
@@ -498,22 +503,22 @@ OUString AbstractURLDlg_Impl::GetName() const
sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetOther()
{
- return pDlg->GetOther();
+ return m_xDlg->GetOther();
}
sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetShorter()
{
- return pDlg->GetShorter();
+ return m_xDlg->GetShorter();
}
sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetLonger()
{
- return pDlg->GetLonger();
+ return m_xDlg->GetLonger();
}
bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed()
{
- return pDlg->IsRelaxed();
+ return m_xDlg->IsRelaxed();
}
// AbstractSvxTransformTabDialog implementations just forwards everything to the dialog
@@ -1074,14 +1079,13 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxSearchAttributeDi
return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg );
}
-VclPtr<AbstractSvxSearchSimilarityDialog> AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog( vcl::Window* pParent,
+VclPtr<AbstractSvxSearchSimilarityDialog> AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog(weld::Window* pParent,
bool bRelax,
sal_uInt16 nOther,
sal_uInt16 nShorter,
sal_uInt16 nLonger)
{
- VclPtrInstance<SvxSearchSimilarityDialog> pDlg( pParent, bRelax, nOther, nShorter, nLonger );
- return VclPtr<AbstractSvxSearchSimilarityDialog_Impl>::Create( pDlg );
+ return VclPtr<AbstractSvxSearchSimilarityDialog_Impl>::Create(new SvxSearchSimilarityDialog(pParent, bRelax, nOther, nShorter, nLonger));
}
VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg(
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index e9ea89b340e3..731b37a27530 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -251,7 +251,14 @@ class AbstractURLDlg_Impl :public AbstractURLDlg
class SvxSearchSimilarityDialog;
class AbstractSvxSearchSimilarityDialog_Impl :public AbstractSvxSearchSimilarityDialog
{
- DECL_ABSTDLG_BASE(AbstractSvxSearchSimilarityDialog_Impl,SvxSearchSimilarityDialog)
+protected:
+ std::unique_ptr<SvxSearchSimilarityDialog> m_xDlg;
+public:
+ explicit AbstractSvxSearchSimilarityDialog_Impl(SvxSearchSimilarityDialog* p)
+ : m_xDlg(p)
+ {
+ }
+ virtual short Execute() override;
virtual sal_uInt16 GetOther() override;
virtual sal_uInt16 GetShorter() override;
virtual sal_uInt16 GetLonger() override;
@@ -618,7 +625,7 @@ public:
virtual VclPtr<VclAbstractDialog> CreateSvxSearchAttributeDialog( vcl::Window* pParent,
SearchAttrItemList& rLst,
const sal_uInt16* pWhRanges) override;
- virtual VclPtr<AbstractSvxSearchSimilarityDialog> CreateSvxSearchSimilarityDialog( vcl::Window* pParent,
+ virtual VclPtr<AbstractSvxSearchSimilarityDialog> CreateSvxSearchSimilarityDialog( weld::Window* pParent,
bool bRelax,
sal_uInt16 nOther,
sal_uInt16 nShorter,