summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/macrodlg.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2016-11-06 01:19:01 +0300
committerCaolán McNamara <caolanm@redhat.com>2016-11-14 08:56:42 +0000
commit450762b224d62ded0c55144fee0796085dd4def3 (patch)
tree29ff18f83485fe8d0c3ad3f70f70f02b6c071a01 /basctl/source/basicide/macrodlg.cxx
parent6b35488c723e2f2266f7e377ad53a82af7b6fede (diff)
tdf#68118: Pass current document frame to SvxScriptSelectorDialog
... through MacroChooser Without this, current document's macros library is unavailable in "Assign" dialog Change-Id: I83baa3b98858260eab61e8f4fefde3f9979c6d83 Reviewed-on: https://gerrit.libreoffice.org/30600 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 'basctl/source/basicide/macrodlg.cxx')
-rw-r--r--basctl/source/basicide/macrodlg.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index dcbccac9efcd..84273aed8cf4 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -46,8 +46,9 @@ using ::std::map;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-MacroChooser::MacroChooser( vcl::Window* pParnt, bool bCreateEntries )
+MacroChooser::MacroChooser( vcl::Window* pParnt, const Reference< frame::XFrame >& xDocFrame, bool bCreateEntries )
: SfxModalDialog(pParnt, "BasicMacroDialog", "modules/BasicIDE/ui/basicmacrodialog.ui")
+ , m_xDocumentFrame(xDocFrame)
, bNewDelIsDel(true)
// the Sfx doesn't ask the BasicManager whether modified or not
// => start saving in case of a change without a into the BasicIDE.
@@ -735,7 +736,12 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton, void )
OUString aComment( GetInfo( pMethod ) );
SfxMacroInfoItem aItem( SID_MACROINFO, pBasMgr, aLib, aMod, aSub, aComment );
SfxAllItemSet Args( SfxGetpApp()->GetPool() );
- SfxRequest aRequest( SID_CONFIG, SfxCallMode::SYNCHRON, Args );
+
+ SfxAllItemSet aInternalSet(SfxGetpApp()->GetPool());
+ if (m_xDocumentFrame.is())
+ aInternalSet.Put(SfxUnoFrameItem(SID_FILLFRAME, m_xDocumentFrame));
+
+ SfxRequest aRequest(SID_CONFIG, SfxCallMode::SYNCHRON, Args, aInternalSet);
aRequest.AppendItem( aItem );
SfxGetpApp()->ExecuteSlot( aRequest );
}