summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-03-16 22:23:14 +0100
committerAndras Timar <andras.timar@collabora.com>2018-03-28 00:05:09 +0200
commit1af833522249c7ed0e4d41bfb742382814d54d97 (patch)
tree695d17805aec069107d446b1d50bd81d2a3c1c90
parent80481f4e2c76bcfbc7e735f78f5c5c81f6ab0d67 (diff)
lokdialog: Set parent for AutoCorrect Options... so that it can be tunneled.
To get this dialog: Right-click on a mis-spelled word, and it's in the tunneled context menu. Still it should be converted to async though. Change-Id: Ia8f2aaf0d04f144c74999107de98e52cd51876e7 Reviewed-on: https://gerrit.libreoffice.org/51441 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk> (cherry picked from commit 7b83827d7b5d07401878fe552c421331629a7880) Reviewed-on: https://gerrit.libreoffice.org/51548 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 67a023ef9b251c1e6e2a46521a51ad829c417451)
-rw-r--r--cui/source/factory/dlgfact.cxx4
-rw-r--r--cui/source/factory/dlgfact.hxx2
-rw-r--r--include/sfx2/sfxdlg.hxx2
-rw-r--r--sfx2/source/appl/appserv.cxx3
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
5 files changed, 7 insertions, 6 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index c903cc3b4d76..10d3724ce658 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -866,9 +866,9 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog( const R
}
// TabDialog outside the drawing layer
-VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateAutoCorrTabDialog( const SfxItemSet* pAttrSet )
+VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(vcl::Window* pParent, const SfxItemSet* pAttrSet)
{
- VclPtrInstance<OfaAutoCorrDlg> pDlg( nullptr, pAttrSet );
+ VclPtrInstance<OfaAutoCorrDlg> pDlg(pParent, pAttrSet);
return VclPtr<CuiAbstractTabDialog_Impl>::Create( pDlg );
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index e997d784f261..221480ce530a 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -473,7 +473,7 @@ public:
virtual VclPtr<VclAbstractDialog> CreateFrameDialog( const css::uno::Reference< css::frame::XFrame >& rxFrame,
sal_uInt32 nResId,
const OUString& rParameter ) override;
- virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog( const SfxItemSet* pAttrSet ) override;
+ virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog(vcl::Window* pParent, const SfxItemSet* pAttrSet) override;
virtual VclPtr<SfxAbstractTabDialog> CreateCustomizeTabDialog(
const SfxItemSet* pAttrSet,
const css::uno::Reference< css::frame::XFrame >& xViewFrame ) override;
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index 35aaa384a15c..e6e8a4046695 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -129,7 +129,7 @@ public:
virtual ~SfxAbstractDialogFactory() override; // needed for export of vtable
static SfxAbstractDialogFactory* Create();
virtual VclPtr<VclAbstractDialog> CreateFrameDialog( const css::uno::Reference< css::frame::XFrame >& rFrame, sal_uInt32 nResId, const rtl::OUString& rParameter ) = 0;
- virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog( const SfxItemSet* pAttrSet ) = 0;
+ virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog(vcl::Window* pParent, const SfxItemSet* pAttrSet) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateCustomizeTabDialog(
const SfxItemSet* pAttrSet,
const css::uno::Reference< css::frame::XFrame >& xViewFrame ) = 0;
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index b9c2ddad88f9..334330afda8e 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1600,7 +1600,8 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), false, &pItem ) == SfxItemState::SET )
aSet.Put( *pItem );
- ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateAutoCorrTabDialog( &aSet ));
+ const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+ ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateAutoCorrTabDialog(pViewFrame? &pViewFrame->GetWindow(): nullptr, &aSet));
pDlg->Execute();
}
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index efad6a1cf4e8..59a28f720d1e 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -372,7 +372,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) );
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- VclPtr<SfxAbstractTabDialog> pDlg = pFact->CreateAutoCorrTabDialog( &aSet );
+ VclPtr<SfxAbstractTabDialog> pDlg = pFact->CreateAutoCorrTabDialog(&GetView()->GetViewFrame()->GetWindow(), &aSet);
pDlg->Execute();
pDlg.disposeAndClear();