23#include <com/sun/star/awt/XTopWindow.hpp>
24#include <com/sun/star/awt/XTopWindowListener.hpp>
25#include <com/sun/star/awt/XWindowListener.hpp>
26#include <com/sun/star/frame/XBorderResizeListener.hpp>
27#include <com/sun/star/frame/XControllerBorder.hpp>
28#include <com/sun/star/script/ModuleType.hpp>
29#include <com/sun/star/script/vba/VBAEventId.hpp>
30#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
31#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
32#include <com/sun/star/table/XCellRange.hpp>
33#include <com/sun/star/util/XChangesListener.hpp>
34#include <com/sun/star/util/XChangesNotifier.hpp>
45#include <document.hxx>
51using namespace ::com::sun::star::script::vba::VBAEventId;
62SCTAB lclGetTabFromArgs(
const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex )
68 if( rArgs[ nIndex ] >>= nTab )
70 if( (nTab < 0) || (nTab >
MAXTAB) )
71 throw lang::IllegalArgumentException();
72 return static_cast< SCTAB >( nTab );
76 uno::Reference< excel::XRange > xVbaRange = getXSomethingFromArgs< excel::XRange >( rArgs, nIndex );
79 uno::Reference< XHelperInterface > xVbaHelper( xVbaRange, uno::UNO_QUERY_THROW );
81 uno::Reference< excel::XWorksheet > xVbaSheet( xVbaHelper->getParent(), uno::UNO_QUERY_THROW );
83 return static_cast< SCTAB >( xVbaSheet->getIndex() - 1 );
87 uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable = getXSomethingFromArgs< sheet::XCellRangeAddressable >( rArgs, nIndex );
88 if( xCellRangeAddressable.is() )
89 return xCellRangeAddressable->getRangeAddress().Sheet;
92 uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
95 uno::Sequence< table::CellRangeAddress > aRangeAddresses = xRanges->getRangeAddresses();
96 if( aRangeAddresses.hasElements() )
97 return aRangeAddresses[ 0 ].Sheet;
100 throw lang::IllegalArgumentException();
104uno::Reference< awt::XWindow > lclGetWindowForController(
const uno::Reference< frame::XController >& rxController )
106 if( rxController.is() )
try
108 uno::Reference< frame::XFrame >
xFrame( rxController->getFrame(), uno::UNO_SET_THROW );
109 return xFrame->getContainerWindow();
111 catch( uno::Exception& )
121 awt::XWindowListener,
122 frame::XBorderResizeListener,
123 util::XChangesListener >
134 virtual void SAL_CALL
windowOpened(
const lang::EventObject& rEvent )
override;
135 virtual void SAL_CALL
windowClosing(
const lang::EventObject& rEvent )
override;
136 virtual void SAL_CALL
windowClosed(
const lang::EventObject& rEvent )
override;
137 virtual void SAL_CALL
windowMinimized(
const lang::EventObject& rEvent )
override;
138 virtual void SAL_CALL
windowNormalized(
const lang::EventObject& rEvent )
override;
139 virtual void SAL_CALL
windowActivated(
const lang::EventObject& rEvent )
override;
140 virtual void SAL_CALL
windowDeactivated(
const lang::EventObject& rEvent )
override;
143 virtual void SAL_CALL
windowResized(
const awt::WindowEvent& rEvent )
override;
144 virtual void SAL_CALL
windowMoved(
const awt::WindowEvent& rEvent )
override;
145 virtual void SAL_CALL
windowShown(
const lang::EventObject& rEvent )
override;
146 virtual void SAL_CALL
windowHidden(
const lang::EventObject& rEvent )
override;
149 virtual void SAL_CALL
borderWidthsChanged(
const uno::Reference< uno::XInterface >& rSource,
const frame::BorderWidths& aNewSize )
override;
152 virtual void SAL_CALL
changesOccurred(
const util::ChangesEvent& rEvent )
override;
155 virtual void SAL_CALL
disposing(
const lang::EventObject& rEvent )
override;
189 mrVbaEvents( rVbaEvents ),
191 mpDocShell( pDocShell ),
192 mpActiveWindow( nullptr ),
193 mbWindowResized( false ),
194 mbBorderChanged( false ),
195 mbDisposed( !rxModel.is() )
203 uno::Reference< frame::XController >
xController(
mxModel->getCurrentController(), uno::UNO_SET_THROW );
206 catch( uno::Exception& )
213 ::osl::MutexGuard aGuard(
maMutex );
215 uno::Reference< awt::XWindow > xWindow = lclGetWindowForController( rxController );
217 try { xWindow->addWindowListener(
this ); }
catch( uno::Exception& ) {}
219 uno::Reference< awt::XTopWindow > xTopWindow( xWindow, uno::UNO_QUERY );
220 if( xTopWindow.is() )
221 try { xTopWindow->addTopWindowListener(
this ); }
catch( uno::Exception& ) {}
223 uno::Reference< frame::XControllerBorder > xControllerBorder( rxController, uno::UNO_QUERY );
224 if( xControllerBorder.is() )
225 try { xControllerBorder->addBorderResizeListener(
this ); }
catch( uno::Exception& ) {}
235 ::osl::MutexGuard aGuard(
maMutex );
237 uno::Reference< awt::XWindow > xWindow = lclGetWindowForController( rxController );
239 try { xWindow->removeWindowListener(
this ); }
catch( uno::Exception& ) {}
241 uno::Reference< awt::XTopWindow > xTopWindow( xWindow, uno::UNO_QUERY );
242 if( xTopWindow.is() )
243 try { xTopWindow->removeTopWindowListener(
this ); }
catch( uno::Exception& ) {}
245 uno::Reference< frame::XControllerBorder > xControllerBorder( rxController, uno::UNO_QUERY );
246 if( xControllerBorder.is() )
247 try { xControllerBorder->removeBorderResizeListener(
this ); }
catch( uno::Exception& ) {}
279 ::osl::MutexGuard aGuard(
maMutex );
284 uno::Reference< awt::XWindow > xWindow( rEvent.Source, uno::UNO_QUERY );
300 ::osl::MutexGuard aGuard(
maMutex );
304 uno::Reference< awt::XWindow > xWindow( rEvent.Source, uno::UNO_QUERY );
316 ::osl::MutexGuard aGuard(
maMutex );
321 uno::Reference< awt::XWindow > xWindow( rEvent.Source, uno::UNO_QUERY );
340 ::osl::MutexGuard aGuard(
maMutex );
345 uno::Reference< frame::XController >
xController( rSource, uno::UNO_QUERY );
346 uno::Reference< awt::XWindow > xWindow = lclGetWindowForController(
xController );
353 ::osl::MutexGuard aGuard(
maMutex );
355 sal_Int32
nCount = rEvent.Changes.getLength();
359 util::ElementChange aChange = rEvent.Changes[ 0 ];
361 aChange.Accessor >>= sOperation;
362 if( !sOperation.equalsIgnoreAsciiCase(
"cell-change") )
367 uno::Reference< table::XCellRange > xRangeObj;
368 aChange.ReplacedElement >>= xRangeObj;
371 uno::Sequence< uno::Any > aArgs{
uno::Any(xRangeObj) };
378 for(
const util::ElementChange& rChange : rEvent.Changes )
380 rChange.Accessor >>= sOperation;
381 uno::Reference< table::XCellRange > xRangeObj;
382 rChange.ReplacedElement >>= xRangeObj;
383 if( xRangeObj.is() && sOperation.equalsIgnoreAsciiCase(
"cell-change") )
385 uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable( xRangeObj, uno::UNO_QUERY );
386 if( xCellRangeAddressable.is() )
395 if (!aRangeList.
empty())
397 uno::Reference< sheet::XSheetCellRangeContainer > xRanges(
new ScCellRangesObj(
mpDocShell, aRangeList ) );
398 uno::Sequence< uno::Any > aArgs{
uno::Any(xRanges) };
405 ::osl::MutexGuard aGuard(
maMutex );
407 uno::Reference< frame::XModel >
xModel( rEvent.Source, uno::UNO_QUERY );
410 OSL_ENSURE(
xModel.get() ==
mxModel.get(),
"ScVbaEventListener::disposing - disposing from unknown model" );
416 uno::Reference< frame::XController >
xController( rEvent.Source, uno::UNO_QUERY );
430 uno::Reference< util::XChangesNotifier > xChangesNotifier(
mxModel, uno::UNO_QUERY_THROW );
431 xChangesNotifier->addChangesListener(
this );
433 catch( uno::Exception& )
442 uno::Reference< util::XChangesNotifier > xChangesNotifier(
mxModel, uno::UNO_QUERY_THROW );
443 xChangesNotifier->removeChangesListener(
this );
445 catch( uno::Exception& )
452 WindowControllerMap::const_iterator aIt =
maControllers.find( pWindow );
453 return (aIt ==
maControllers.end()) ? uno::Reference< frame::XController >() : aIt->second;
481 ::osl::MutexGuard aGuard(
maMutex );
491 if( !mbDisposed && pWindow && !pWindow->
isDisposed() && (maControllers.count(pWindow) > 0) )
497 uno::Reference< frame::XController >
xController = getControllerForWindow( pWindow );
502 mrVbaEvents.processVbaEventNoThrow( WORKBOOK_WINDOWRESIZE, aArgs );
510 auto const iter(m_PostedWindows.find(pWindow));
511 assert(iter != m_PostedWindows.end());
512 m_PostedWindows.erase(iter);
528 auto registerAutoEvent = [
this](sal_Int32 nID,
const char*
sName)
530 registerAutoEvent(AUTO_OPEN,
"Open");
531 registerAutoEvent(AUTO_CLOSE,
"Close");
534 auto registerWorkbookEvent = [
this](sal_Int32 nID,
const char*
sName, sal_Int32 nCancelIndex)
536 registerWorkbookEvent( WORKBOOK_ACTIVATE,
"Activate", -1 );
537 registerWorkbookEvent( WORKBOOK_DEACTIVATE,
"Deactivate", -1 );
538 registerWorkbookEvent( WORKBOOK_OPEN,
"Open", -1 );
539 registerWorkbookEvent( WORKBOOK_BEFORECLOSE,
"BeforeClose", 0 );
540 registerWorkbookEvent( WORKBOOK_BEFOREPRINT,
"BeforePrint", 0 );
541 registerWorkbookEvent( WORKBOOK_BEFORESAVE,
"BeforeSave", 1 );
542 registerWorkbookEvent( WORKBOOK_AFTERSAVE,
"AfterSave", -1 );
543 registerWorkbookEvent( WORKBOOK_NEWSHEET,
"NewSheet", -1 );
544 registerWorkbookEvent( WORKBOOK_WINDOWACTIVATE,
"WindowActivate", -1 );
545 registerWorkbookEvent( WORKBOOK_WINDOWDEACTIVATE,
"WindowDeactivate", -1 );
546 registerWorkbookEvent( WORKBOOK_WINDOWRESIZE,
"WindowResize", -1 );
549 auto registerWorksheetEvent = [
this](sal_Int32 nID,
const char*
sName, sal_Int32 nCancelIndex)
554 OString(OString::Concat(
"Workbook_Worksheet") +
sName).getStr(),
555 ((nCancelIndex >= 0) ? (nCancelIndex + 1) : -1),
uno::Any(
false));
557 registerWorksheetEvent( WORKSHEET_ACTIVATE,
"Activate", -1 );
558 registerWorksheetEvent( WORKSHEET_DEACTIVATE,
"Deactivate", -1 );
559 registerWorksheetEvent( WORKSHEET_BEFOREDOUBLECLICK,
"BeforeDoubleClick", 1 );
560 registerWorksheetEvent( WORKSHEET_BEFORERIGHTCLICK,
"BeforeRightClick", 1 );
561 registerWorksheetEvent( WORKSHEET_CALCULATE,
"Calculate", -1 );
562 registerWorksheetEvent( WORKSHEET_CHANGE,
"Change", -1 );
563 registerWorksheetEvent( WORKSHEET_SELECTIONCHANGE,
"SelectionChange", -1 );
564 registerWorksheetEvent( WORKSHEET_FOLLOWHYPERLINK,
"FollowHyperlink", -1 );
573 static const uno::Sequence< uno::Any > saEmptyArgs;
591 uno::Sequence< uno::Any > aArgs{
uno::Any(
true) };
598 uno::Sequence< uno::Any > aArgs{
uno::Any(
false) };
624 return "ScVbaEventsHelper";
629 return {
"com.sun.star.script.vba.VBASpreadsheetEventProcessor"};
635 const EventHandlerInfo& rInfo,
const uno::Sequence< uno::Any >& rArgs )
639 throw uno::RuntimeException();
653 if( bExecuteEvent )
switch( rInfo.mnEventId )
658 rEventQueue.emplace_back(WORKBOOK_ACTIVATE );
659 uno::Sequence< uno::Any > aArgs{
uno::Any(
mxModel->getCurrentController()) };
660 rEventQueue.emplace_back( WORKBOOK_WINDOWACTIVATE, aArgs );
662 rEventQueue.emplace_back(AUTO_OPEN );
667 case WORKSHEET_SELECTIONCHANGE:
676 bool bSheetEvent =
false;
677 if( (rInfo.maUserData >>= bSheetEvent) && bSheetEvent )
678 rEventQueue.emplace_back( rInfo.mnEventId + USERDEFINED_START, rArgs );
681 return bExecuteEvent;
685 const uno::Sequence< uno::Any >& rArgs )
688 bool bSheetEventAsBookEvent = rInfo.mnEventId > USERDEFINED_START;
689 sal_Int32 nEventId = bSheetEventAsBookEvent ? (rInfo.mnEventId - USERDEFINED_START) : rInfo.mnEventId;
691 uno::Sequence< uno::Any > aVbaArgs;
697 case WORKBOOK_ACTIVATE:
698 case WORKBOOK_DEACTIVATE:
702 case WORKBOOK_BEFORECLOSE:
703 case WORKBOOK_BEFOREPRINT:
704 aVbaArgs.realloc( 1 );
708 case WORKBOOK_BEFORESAVE:
709 checkArgumentType< bool >( rArgs, 0 );
710 aVbaArgs = { rArgs[ 0 ], {} };
714 case WORKBOOK_AFTERSAVE:
715 checkArgumentType< bool >( rArgs, 0 );
716 aVbaArgs = { rArgs[ 0 ] };
719 case WORKBOOK_WINDOWACTIVATE:
720 case WORKBOOK_WINDOWDEACTIVATE:
721 case WORKBOOK_WINDOWRESIZE:
725 case WORKBOOK_NEWSHEET:
732 case WORKSHEET_ACTIVATE:
733 case WORKSHEET_CALCULATE:
734 case WORKSHEET_DEACTIVATE:
737 case WORKSHEET_CHANGE:
738 case WORKSHEET_SELECTIONCHANGE:
742 case WORKSHEET_BEFOREDOUBLECLICK:
743 case WORKSHEET_BEFORERIGHTCLICK:
748 case WORKSHEET_FOLLOWHYPERLINK:
755 if( bSheetEventAsBookEvent )
757 sal_Int32
nLength = aVbaArgs.getLength();
758 uno::Sequence< uno::Any > aVbaArgs2(
nLength + 1 );
759 auto pVbaArgs2 = aVbaArgs2.getArray();
761 std::copy_n(std::cbegin(aVbaArgs),
nLength, std::next(pVbaArgs2));
762 aVbaArgs = aVbaArgs2;
769 const EventHandlerInfo& rInfo,
bool bCancel )
771 switch( rInfo.mnEventId )
779 case WORKBOOK_BEFORECLOSE:
782 if (!bCancel && !
hasModule(
"Auto_Close"))
783 rEventQueue.emplace_back(AUTO_CLOSE );
789 const uno::Sequence< uno::Any >& rArgs )
const
791 bool bSheetEvent =
false;
792 rInfo.maUserData >>= bSheetEvent;
793 SCTAB nTab = bSheetEvent ? lclGetTabFromArgs( rArgs, 0 ) : -1;
794 if( bSheetEvent && (nTab < 0) )
795 throw lang::IllegalArgumentException();
814 bool bLeftEmpty = rLeft.
empty();
815 bool bRightEmpty = rRight.
empty();
816 if( bLeftEmpty || bRightEmpty )
817 return !(bLeftEmpty && bRightEmpty);
820 if (rLeft[0].aStart.Tab() != rRight[0].aStart.Tab())
824 return rLeft != rRight;
831 uno::Reference< uno::XInterface > xOldSelection(
maOldSelection, uno::UNO_QUERY );
832 uno::Reference< uno::XInterface > xNewSelection = getXSomethingFromArgs< uno::XInterface >( rArgs,
nIndex,
false );
833 ScCellRangesBase* pOldCellRanges =
dynamic_cast<ScCellRangesBase*
>( xOldSelection.get() );
834 ScCellRangesBase* pNewCellRanges =
dynamic_cast<ScCellRangesBase*
>( xNewSelection.get() );
835 bool bChanged = !pOldCellRanges || !pNewCellRanges || lclSelectionChanged( pOldCellRanges->GetRangeList(), pNewCellRanges->GetRangeList() );
850 uno::Reference< excel::XRange > xVbaRange = getXSomethingFromArgs< excel::XRange >( rArgs,
nIndex );
851 if( !xVbaRange.is() )
853 uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs,
nIndex );
854 uno::Reference< table::XCellRange > xRange = getXSomethingFromArgs< table::XCellRange >( rArgs,
nIndex );
855 if ( !xRanges.is() && !xRange.is() )
856 throw lang::IllegalArgumentException();
858 uno::Sequence< uno::Any > aArgs;
874 uno::Reference< table::XCell > xCell = getXSomethingFromArgs< table::XCell >( rArgs,
nIndex,
false );
885 uno::Any(getXSomethingFromArgs< frame::XController >( rArgs,
nIndex,
false )) };
890extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
892 css::uno::XComponentContext * ,
893 css::uno::Sequence<css::uno::Any>
const &arguments)
css::uno::Reference< css::frame::XModel2 > mxModel
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static OUString GetEventName(GlobalEventId nID)
const ScDocument & GetDocument() const
const OUString & GetCodeName() const
void push_back(const ScRange &rRange)
static void FillScRange(ScRange &rScRange, const css::table::CellRangeAddress &rApiRange)
static bool getDocumentEventsEnabled()
Returns true, if VBA document events are enabled.
bool mbWindowResized
Currently activated window, to prevent multiple (de)activation.
uno::Reference< frame::XController > getControllerForWindow(vcl::Window *pWindow) const
Returns the controller for the passed VCL window.
ScVbaEventListener(ScVbaEventsHelper &rVbaEvents, const uno::Reference< frame::XModel > &rxModel, ScDocShell *pDocShell)
virtual void SAL_CALL windowActivated(const lang::EventObject &rEvent) override
std::multiset< VclPtr< vcl::Window > > m_PostedWindows
Maps VCL top windows to their controllers.
virtual void SAL_CALL windowMoved(const awt::WindowEvent &rEvent) override
void postWindowResizeEvent(vcl::Window *pWindow)
Posts a Workbook_WindowResize user event.
WindowControllerMap maControllers
virtual void SAL_CALL changesOccurred(const util::ChangesEvent &rEvent) override
virtual void SAL_CALL windowOpened(const lang::EventObject &rEvent) override
::std::map< VclPtr< vcl::Window >, uno::Reference< frame::XController > > WindowControllerMap
void startControllerListening(const uno::Reference< frame::XController > &rxController)
Starts listening to the passed document controller.
virtual void SAL_CALL borderWidthsChanged(const uno::Reference< uno::XInterface > &rSource, const frame::BorderWidths &aNewSize) override
bool mbBorderChanged
True = window resize system event processed.
DECL_LINK(processWindowResizeEvent, void *, void)
Callback link for Application::PostUserEvent().
virtual void SAL_CALL windowHidden(const lang::EventObject &rEvent) override
ScVbaEventsHelper & mrVbaEvents
void processWindowActivateEvent(vcl::Window *pWindow, bool bActivate)
Calls the Workbook_Window[Activate|Deactivate] event handler.
virtual void SAL_CALL windowDeactivated(const lang::EventObject &rEvent) override
void startModelListening()
Starts listening to the document model.
virtual void SAL_CALL windowShown(const lang::EventObject &rEvent) override
virtual void SAL_CALL windowNormalized(const lang::EventObject &rEvent) override
uno::Reference< frame::XModel > mxModel
VclPtr< vcl::Window > mpActiveWindow
Keeps processWindowResizeEvent windows from being deleted between postWindowResizeEvent and processWi...
bool mbDisposed
True = borders changed system event processed.
virtual void SAL_CALL windowMinimized(const lang::EventObject &rEvent) override
virtual void SAL_CALL windowClosed(const lang::EventObject &rEvent) override
void stopControllerListening(const uno::Reference< frame::XController > &rxController)
Stops listening to the passed document controller.
void stopModelListening()
Stops listening to the document model.
virtual void SAL_CALL disposing(const lang::EventObject &rEvent) override
virtual void SAL_CALL windowResized(const awt::WindowEvent &rEvent) override
virtual void SAL_CALL windowClosing(const lang::EventObject &rEvent) override
OUString SAL_CALL getImplementationName() override
::rtl::Reference< ScVbaEventListener > mxListener
virtual void SAL_CALL notifyEvent(const css::document::EventObject &rEvent) override
css::uno::Any createWorksheet(const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex) const
Creates a VBA Worksheet object (the argument must contain a sheet index).
css::uno::Any createHyperlink(const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex) const
Creates a VBA Hyperlink object (the argument must contain a UNO cell).
virtual void implPostProcessEvent(EventQueue &rEventQueue, const EventHandlerInfo &rInfo, bool bCancel) override
css::uno::Any createWindow(const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex) const
Creates a VBA Window object (the argument must contain a model controller).
virtual ~ScVbaEventsHelper() override
virtual OUString implGetDocumentModuleName(const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs) const override
css::uno::Any createRange(const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex) const
Creates a VBA Range object (the argument must contain a UNO range or UNO range list).
bool isSelectionChanged(const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex)
Checks if selection has been changed compared to selection of last call.
virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList(const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs) override
virtual bool implPrepareEvent(EventQueue &rEventQueue, const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs) override
ScVbaEventsHelper(const css::uno::Sequence< css::uno::Any > &rArgs)
css::uno::Any maOldSelection
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
::std::deque< EventQueueEntry > EventQueue
void processVbaEventNoThrow(sal_Int32 nEventId, const css::uno::Sequence< css::uno::Any > &rArgs)
virtual void SAL_CALL notifyEvent(const css::document::EventObject &rEvent) override
void registerEventHandler(sal_Int32 nEventId, sal_Int32 nModuleType, const char *pcMacroName, sal_Int32 nCancelIndex=-1, const css::uno::Any &rUserData=css::uno::Any())
css::uno::Reference< css::frame::XModel > mxModel
static void checkArgument(const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex)
bool hasModule(const OUString &rModuleName)
PointerState GetPointerState()
#define LINK(Instance, Class, Member)
uno::Reference< XHelperInterface > getUnoSheetModuleObj(const uno::Reference< table::XCellRange > &xRange)
VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getVBADocument(const css::uno::Reference< css::frame::XModel > &xModel)
css::uno::Reference< css::uno::XInterface > createVBAUnoAPIServiceWithArgs(SfxObjectShell const *pShell, const char *_pAsciiName, const css::uno::Sequence< css::uno::Any > &aArgs)
Reference< XController > xController
Reference< XFrame > xFrame
Reference< XModel > xModel
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * ScVbaEventsHelper_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &arguments)
IMPL_LINK(ScVbaEventListener, processWindowResizeEvent, void *, p, void)