diff options
author | Noel Power <noel.power@novell.com> | 2010-10-06 10:15:43 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-10-06 10:15:43 +0100 |
commit | f13fd7b138caee676cf5dbeae3474e4a4b0b177a (patch) | |
tree | 58bbab934d3fd26a8fd886a2dbc52b5a2d283092 /sc/source/ui/drawfunc/fusel.cxx | |
parent | 44231089eeda805727f6c7143729612059891b02 (diff) |
initial commit for vba blob ( not including container_control stuff )
Diffstat (limited to 'sc/source/ui/drawfunc/fusel.cxx')
-rw-r--r-- | sc/source/ui/drawfunc/fusel.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index 4a456522003c..6972834ced02 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -202,7 +202,6 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) } ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE ); -#ifdef ISSUE66550_HLINK_FOR_SHAPES // For interoperability favour links over macros if both are defined if ( pInfo->GetHlink().getLength() > 0 ) { @@ -210,20 +209,27 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) sURL = pInfo->GetHlink(); } else if ( pInfo->GetMacro().getLength() > 0 ) -#else - if ( pInfo->GetMacro().getLength() > 0 ) -#endif { SfxObjectShell* pObjSh = SfxObjectShell::Current(); if ( pObjSh && SfxApplication::IsXScriptURL( pInfo->GetMacro() ) ) { + uno::Reference< beans::XPropertySet > xProps( pObj->getUnoShape(), uno::UNO_QUERY ); + uno::Any aCaller; + if ( xProps.is() ) + { + try + { + aCaller = xProps->getPropertyValue( rtl::OUString::createFromAscii("Name") ); + } + catch( uno::Exception& ) {} + } uno::Any aRet; uno::Sequence< sal_Int16 > aOutArgsIndex; uno::Sequence< uno::Any > aOutArgs; uno::Sequence< uno::Any >* pInArgs = new uno::Sequence< uno::Any >(0); pObjSh->CallXScript( pInfo->GetMacro(), - *pInArgs, aRet, aOutArgsIndex, aOutArgs); + *pInArgs, aRet, aOutArgsIndex, aOutArgs, true, &aCaller ); pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() ); return TRUE; // kein CaptureMouse etc. } |