summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-09 20:43:09 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-10 16:40:05 +0100
commit4dba9820cf44718121a38b3f89eb8caa244d7321 (patch)
tree70bd1e02f89742f70b1a542042dd57cacdfc2c4d /include
parent4c9349aef26499b9d80a4d6354680b688a95fb0b (diff)
rework tdf#113647 solution to be safe
rather than passing the pointer around, tragic use of uno apis means monstrous awt::Window thingy has to be passed around and still smuggled through the dispatch arguments to get through the eye of the XDispatch::dispatch needle Change-Id: I353f8a3b0bb698bb58f75576e49efd701f3db8bf Reviewed-on: https://gerrit.libreoffice.org/44585 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 'include')
-rw-r--r--include/sfx2/dispatch.hxx11
-rw-r--r--include/sfx2/request.hxx11
2 files changed, 16 insertions, 6 deletions
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index 2c41b9ae98bb..e8ad3783c9f8 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -124,11 +124,12 @@ public:
sal_uInt16 nModi = 0,
const SfxPoolItem **pInternalArgs = nullptr);
- const SfxPoolItem* Execute( sal_uInt16 nSlot,
- SfxCallMode nCall,
- SfxItemSet const * pArgs,
- SfxItemSet const * pInternalArgs,
- sal_uInt16 nModi);
+ const SfxPoolItem* Execute(sal_uInt16 nSlot,
+ SfxCallMode nCall,
+ SfxItemSet const * pArgs,
+ SfxItemSet const * pInternalArgs,
+ sal_uInt16 nModi,
+ vcl::Window* pDialogParent = nullptr);
const SfxPoolItem* ExecuteList( sal_uInt16 nSlot,
SfxCallMode nCall,
diff --git a/include/sfx2/request.hxx b/include/sfx2/request.hxx
index 86a9630b0f03..72d98071007f 100644
--- a/include/sfx2/request.hxx
+++ b/include/sfx2/request.hxx
@@ -41,6 +41,11 @@ class SfxViewFrame;
struct SfxRequest_Impl;
enum class SfxCallMode : sal_uInt16;
+namespace vcl
+{
+ class Window;
+}
+
class SFX2_DLLPUBLIC SfxRequest: public SfxHint
{
friend struct SfxRequest_Impl;
@@ -61,7 +66,7 @@ public:
SfxRequest( sal_uInt16 nSlot, SfxCallMode nCallMode, SfxItemPool &rPool );
SfxRequest( const SfxSlot* pSlot, const css::uno::Sequence < css::beans::PropertyValue >& rArgs,
SfxCallMode nCallMode, SfxItemPool &rPool );
- SfxRequest( sal_uInt16 nSlot, SfxCallMode nCallMode, const SfxAllItemSet& rSfxArgs );
+ SfxRequest(sal_uInt16 nSlot, SfxCallMode nCallMode, const SfxAllItemSet& rSfxArgs, vcl::Window* pDialogParent = nullptr);
SfxRequest( sal_uInt16 nSlot, SfxCallMode nCallMode, const SfxAllItemSet& rSfxArgs, const SfxAllItemSet& rSfxInternalArgs );
SfxRequest( const SfxRequest& rOrig );
virtual ~SfxRequest() override;
@@ -90,6 +95,10 @@ public:
return nullptr;
}
+ /** Return the window that should be used as the parent for any dialogs this request creates
+ */
+ vcl::Window* GetDialogParent() const;
+
void ReleaseArgs();
void SetReturnValue(const SfxPoolItem &);
const SfxPoolItem* GetReturnValue() const;