[Libreoffice-commits] core.git: cui/source include/sfx2 sfx2/source sw/source
Jan Holesovsky
kendy at collabora.com
Mon Mar 19 19:15:49 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 67a023ef9b251c1e6e2a46521a51ad829c417451
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>
(cherry picked from commit 7b83827d7b5d07401878fe552c421331629a7880)
Reviewed-on: https://gerrit.libreoffice.org/51548
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 2683c93264b3..f8ed8b406591 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -860,9 +860,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 b0c22bb2f0b5..157e949bebf0 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -492,7 +492,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 78cbf7361968..030b866a5977 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -128,7 +128,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 f7765defa192..d73bc3a61da9 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1615,7 +1615,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 33f942256ff9..f2c34c8f21c1 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -376,7 +376,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