summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-11 20:54:17 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-11 21:19:46 +0100
commita7a96078ff5d7b0d5655db64e49ec4d48c6bb3f4 (patch)
tree54dcc7174516d3a6836ca95f21458070a2b65b6d /sw
parent58a64174a8679b10464180d3807e4b89a1535b42 (diff)
Resolves: tdf#99464 set what parent the dialogs are dialogs for
With nullptr a parent is searched for and assigned (unless NoParent is set which means no parent) since... commit dd46727b99d4bb5135451aa7e5e1bdb197373843 Author: Caolán McNamara <caolanm@redhat.com> Date: Tue Apr 5 15:27:38 2016 +0100 Resolves; tdf#87120 no keyboard navigation inside floating windows lets try and treat these the same as we do normal toplevels like dialogs if they popup with GrabFocus. This way focus can be set on widgets inside the floating windows, and so keyboard traversal of widgets etc all works. I believe an active menu is allowed as a parent (which I'll investigate and see if we can fix or revert that if necessary), but its good practice to explicitly set the right parent rather than depending on what happens to be on top anyway. Change-Id: I744f6d9bc133058a4a9db94d6c27d2e36e22179e
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/swabstdlg.hxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx5
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx1
-rw-r--r--sw/source/uibase/app/docst.cxx2
4 files changed, 6 insertions, 4 deletions
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index a46e2acec5b0..87b375207f28 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -396,7 +396,7 @@ public:
/// @param nSlot
/// Identifies optional Slot by which the creation of the Template (Style) dialog is triggered.
/// Currently used, if nRegion == SfxStyleFamily::Page in order to activate certain dialog pane
- virtual SfxAbstractApplyTabDialog* CreateTemplateDialog(
+ virtual SfxAbstractApplyTabDialog* CreateTemplateDialog(vcl::Window* pParent,
SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion,
const OString& sPage = OString(),
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 2c57b97a0425..760333cc657e 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -935,14 +935,15 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const O
}
SfxAbstractApplyTabDialog* SwAbstractDialogFactory_Impl::CreateTemplateDialog(
+ vcl::Window *pParent,
SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion,
const OString& sPage,
SwWrtShell* pActShell,
bool bNew )
{
- VclPtr<SfxTabDialog> pDlg = VclPtr<SwTemplateDlg>::Create( nullptr, rBase, nRegion, sPage, pActShell, bNew );
- return new AbstractApplyTabDialog_Impl( pDlg );
+ VclPtr<SfxTabDialog> pDlg = VclPtr<SwTemplateDlg>::Create(pParent, rBase, nRegion, sPage, pActShell, bNew);
+ return new AbstractApplyTabDialog_Impl(pDlg);
}
AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg(SfxViewFrame* pViewFrame,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 98116f90e890..b74968e715c6 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -434,6 +434,7 @@ public:
const OString& sDefPage = OString(),
const OUString* pFormatStr = nullptr) override;
virtual SfxAbstractApplyTabDialog* CreateTemplateDialog(
+ vcl::Window *pParent,
SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion,
const OString& sPage = OString(),
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 49feaa8da271..635a0daca4bc 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -793,7 +793,7 @@ sal_uInt16 SwDocShell::Edit(
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert( pFact );
- std::unique_ptr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog(
+ std::unique_ptr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog(&GetView()->GetViewFrame()->GetWindow(),
*(xTmp.get()), nFamily, sPage,
pActShell ? pActShell : m_pWrtShell, bNew));
assert( pDlg );