LibreOffice Module sc (master) 1
vbaeventshelper.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <rtl/ref.hxx>
24
25class ScDocShell;
26class ScDocument;
28
30{
31public:
32 ScVbaEventsHelper( const css::uno::Sequence< css::uno::Any >& rArgs );
33 virtual ~ScVbaEventsHelper() override;
34
35 virtual void SAL_CALL notifyEvent( const css::document::EventObject& rEvent ) override;
36
37 OUString SAL_CALL getImplementationName() override;
38
39 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
40
41protected:
42 virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) override;
43 virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) override;
44 virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bCancel ) override;
45 virtual OUString implGetDocumentModuleName( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) const override;
46
47private:
53 bool isSelectionChanged( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex );
54
59 css::uno::Any createWorksheet( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const;
64 css::uno::Any createRange( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const;
69 css::uno::Any createHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const;
74 css::uno::Any createWindow( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const;
75
76private:
78 css::uno::Any maOldSelection;
82};
83
84/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScDocShell * mpDocShell
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
::std::deque< EventQueueEntry > EventQueue
sal_Int32 nIndex