[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - cui/source include/sfx2 sfx2/source sw/source
Jan Holesovsky
kendy at collabora.com
Mon Mar 19 11:17:47 UTC 2018
cui/source/factory/dlgfact.cxx | 4 ++--
cui/source/factory/dlgfact.hxx | 2 +-
include/sfx2/sfxdlg.hxx | 2 +-
sfx2/source/appl/appserv.cxx | 3 ++-
sw/source/uibase/app/docsh2.cxx | 2 +-
5 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 7b83827d7b5d07401878fe552c421331629a7880
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Mar 16 22:23:14 2018 +0100
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 at collabora.co.uk>
Tested-by: pranavk <pranavk at collabora.co.uk>
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 8bf720fa4b04..86450a41e22b 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -867,9 +867,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 61e018f009e4..5df80fe028b8 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 14e93052b5be..89a376220e36 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 aad7dcdec3a6..9368185ebd04 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1616,7 +1616,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 469239160b26..93a65fad30ff 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -373,7 +373,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();
More information about the Libreoffice-commits
mailing list