summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2011-04-01 09:34:55 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2011-04-01 09:34:55 +0200
commitea50cf6ef53e01732df5622832fcd9c8f1c5933e (patch)
treeddf532cd10c2cb3154a51ac99bcf1803ec15f02d /offapi
parent872d13bf1e6e7de111cf0e44e973871d49d276d1 (diff)
parent4dfbcda719f8aec8d257162e5e4b4a64855183ea (diff)
CWS-TOOLING: integrate CWS calcvba
Diffstat (limited to 'offapi')
-rwxr-xr-xoffapi/com/sun/star/script/vba/VBAEventId.idl6
-rwxr-xr-xoffapi/com/sun/star/script/vba/VBAScriptEvent.idl73
-rwxr-xr-xoffapi/com/sun/star/script/vba/VBAScriptEventId.idl100
-rw-r--r--offapi/com/sun/star/script/vba/XVBACompatibility.idl19
-rwxr-xr-xoffapi/com/sun/star/script/vba/XVBAEventProcessor.idl14
-rwxr-xr-xoffapi/com/sun/star/script/vba/XVBAScriptListener.idl51
-rwxr-xr-xoffapi/com/sun/star/script/vba/makefile.mk5
7 files changed, 254 insertions, 14 deletions
diff --git a/offapi/com/sun/star/script/vba/VBAEventId.idl b/offapi/com/sun/star/script/vba/VBAEventId.idl
index fda83a18d495..18b84b5ef14d 100755
--- a/offapi/com/sun/star/script/vba/VBAEventId.idl
+++ b/offapi/com/sun/star/script/vba/VBAEventId.idl
@@ -97,11 +97,11 @@ constants VBAEventId
const long WORKBOOK_AFTERSAVE = 2007;
/** New sheet inserted. Arguments: short nSheet. */
const long WORKBOOK_NEWSHEET = 2008;
- /** Document window has been activated. No arguments. */
+ /** Document window has been activated. Arguments: XController aController. */
const long WORKBOOK_WINDOWACTIVATE = 2009;
- /** Document window has been deactivated. No arguments. */
+ /** Document window has been deactivated. Arguments: XController aController. */
const long WORKBOOK_WINDOWDEACTIVATE = 2010;
- /** Document window has been resized. No arguments. */
+ /** Document window has been resized. Arguments: XController aController. */
const long WORKBOOK_WINDOWRESIZE = 2011;
//-------------------------------------------------------------------------
diff --git a/offapi/com/sun/star/script/vba/VBAScriptEvent.idl b/offapi/com/sun/star/script/vba/VBAScriptEvent.idl
new file mode 100755
index 000000000000..c1fc7096bcee
--- /dev/null
+++ b/offapi/com/sun/star/script/vba/VBAScriptEvent.idl
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_script_vba_VBAScriptEvent_idl__
+#define __com_sun_star_script_vba_VBAScriptEvent_idl__
+
+#include <com/sun/star/lang/EventObject.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module script { module vba {
+
+//=============================================================================
+
+/** Describes a VBA script event fired via <member>XVBACompatibility::
+ broadcastVBAScriptEvent</member>, and received by <member>
+ XVBAScriptListener::notifyVBAScriptEvent</member>.
+
+ @see XVBACompatibility
+ @see XVBAScriptListener
+ */
+struct VBAScriptEvent : ::com::sun::star::lang::EventObject
+{
+ //-------------------------------------------------------------------------
+
+ /** Identifies the type of the event.
+
+ @see VBAScriptEventId
+ */
+ long Identifier;
+
+ //-------------------------------------------------------------------------
+
+ /** Contains the name of the involved VBA module.
+
+ @see VBAScriptEventId
+ */
+ string ModuleName;
+
+ //-------------------------------------------------------------------------
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/script/vba/VBAScriptEventId.idl b/offapi/com/sun/star/script/vba/VBAScriptEventId.idl
new file mode 100755
index 000000000000..cc66a3fc098c
--- /dev/null
+++ b/offapi/com/sun/star/script/vba/VBAScriptEventId.idl
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_script_vba_VBAScriptEventId_idl__
+#define __com_sun_star_script_vba_VBAScriptEventId_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module script { module vba {
+
+//=============================================================================
+
+/** Identifies a VBA script event fired via <member>XVBACompatibility::
+ broadcastVBAScriptEvent</member>, and received by <member>
+ XVBAScriptListener::notifyVBAScriptEvent</member>.
+
+ @see VBAScriptEvent
+ @see XVBACompatibility
+ @see XVBAScriptListener
+ */
+constants VBAScriptEventId
+{
+ //-------------------------------------------------------------------------
+ /** This event is fired when a VBA script in the current document has been
+ started.
+
+ <p>Several scripts may run simultaneously, e.g. when a running script
+ triggers a document event that starts another script.</p>
+
+ <p>The number of running scripts can be obtained via <member>
+ XVBACompatibility::RunningVBAScripts</member>. The number returned
+ there will already contain the new script notified with this event.</p>
+
+ <p>The member <member>VBAScriptEvent::ModuleName</member> of the event
+ object will contain the name of the code module that contains the
+ started script.</p>
+ */
+ const long SCRIPT_STARTED = 0;
+
+ //-------------------------------------------------------------------------
+ /** This event is fired when a VBA script in the current document stops
+ running.
+
+ <p>Several scripts may run simultaneously, e.g. when a running script
+ triggers a document event that starts another script.</p>
+
+ <p>The number of scripts still running can be obtained via <member>
+ XVBACompatibility::RunningVBAScripts</member>. The number returned
+ there will not contain the stopped script notified with this event
+ anymore.</p>
+
+ <p>The member <member>VBAScriptEvent::ModuleName</member> of the event
+ object will contain the name of the code module that contains the
+ script that has been stopped.</p>
+ */
+ const long SCRIPT_STOPPED = 1;
+
+ //-------------------------------------------------------------------------
+ /** This event is fired when a VBA script in the current document tries to
+ instanciate a userform.
+
+ <p>The member <member>VBAScriptEvent::ModuleName</member> of the event
+ object will contain the name of the userform module.</p>
+ */
+ const long INITIALIZE_USERFORM = 2;
+
+ //-------------------------------------------------------------------------
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/script/vba/XVBACompatibility.idl b/offapi/com/sun/star/script/vba/XVBACompatibility.idl
index bfa9d01655fa..9c77046b1159 100644
--- a/offapi/com/sun/star/script/vba/XVBACompatibility.idl
+++ b/offapi/com/sun/star/script/vba/XVBACompatibility.idl
@@ -28,7 +28,8 @@
#ifndef __com_sun_star_script_vba_XVBACompatibility_idl__
#define __com_sun_star_script_vba_XVBACompatibility_idl__
-#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/frame/XModel.idl>
+#include <com/sun/star/script/vba/XVBAScriptListener.idl>
//=============================================================================
@@ -41,6 +42,22 @@ interface XVBACompatibility
[attribute] boolean VBACompatibilityMode;
//-------------------------------------------------------------------------
+
+ [attribute, readonly] long RunningVBAScripts;
+
+ //-------------------------------------------------------------------------
+
+ [oneway] void addVBAScriptListener( [in] XVBAScriptListener Listener );
+
+ //-------------------------------------------------------------------------
+
+ [oneway] void removeVBAScriptListener( [in] XVBAScriptListener Listener );
+
+ //-------------------------------------------------------------------------
+
+ void broadcastVBAScriptEvent( [in] long Identifier, [in] string ModuleName );
+
+ //-------------------------------------------------------------------------
};
}; }; }; }; };
diff --git a/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl b/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl
index 4a3534de8412..1bc139243493 100755
--- a/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl
+++ b/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl
@@ -30,7 +30,6 @@
#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/lang/IllegalArgumentException.idl>
-#include <com/sun/star/script/provider/ScriptFrameworkErrorException.idl>
#include <com/sun/star/util/VetoException.idl>
//=============================================================================
@@ -75,23 +74,20 @@ interface XVBAEventProcessor
The input arguments needed to create the argument list of the VBA
event handler.
+ @return
+ <TRUE/>, if event handing is enabled, and the event handler macro
+ exists and has been invoked.
+
@throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
if the passed event identifier is not supported, or if the passed
arguments do not conform to the arguments expected by the specified
event.
- @throws <type scope="::com::sun::star::script::provider">ScriptFrameworkErrorException</type>
- if the VBA event handler could not be invoked. Reasons may be, that
- handling of VBA events is not enabled, that the VBA event handler
- macro has not been found, or that the execution of the macro has
- been aborted with an error.
-
@throws <type scope="::com::sun::star::util">VetoException</type>
if the VBA event handler has indicated to veto the event.
**/
- void processVbaEvent( [in] long nEventId, [in] sequence< any > aArgs )
+ boolean processVbaEvent( [in] long nEventId, [in] sequence< any > aArgs )
raises (::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::script::provider::ScriptFrameworkErrorException,
::com::sun::star::util::VetoException);
//-------------------------------------------------------------------------
diff --git a/offapi/com/sun/star/script/vba/XVBAScriptListener.idl b/offapi/com/sun/star/script/vba/XVBAScriptListener.idl
new file mode 100755
index 000000000000..2f5594d3b416
--- /dev/null
+++ b/offapi/com/sun/star/script/vba/XVBAScriptListener.idl
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_script_vba_XVBAScriptListener_idl__
+#define __com_sun_star_script_vba_XVBAScriptListener_idl__
+
+#include <com/sun/star/lang/XEventListener.idl>
+#include <com/sun/star/script/vba/VBAScriptEvent.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module script { module vba {
+
+//=============================================================================
+
+interface XVBAScriptListener : ::com::sun::star::lang::XEventListener
+{
+ void notifyVBAScriptEvent( [in] VBAScriptEvent Event );
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/script/vba/makefile.mk b/offapi/com/sun/star/script/vba/makefile.mk
index 336be1b5e7a6..6f13245f7d1e 100755
--- a/offapi/com/sun/star/script/vba/makefile.mk
+++ b/offapi/com/sun/star/script/vba/makefile.mk
@@ -41,12 +41,15 @@ IDLFILES=\
VBAEventId.idl \
VBAEventProcessor.idl \
VBAMacroResolver.idl \
+ VBAScriptEvent.idl \
+ VBAScriptEventId.idl \
VBASpreadsheetEventProcessor.idl \
VBATextEventProcessor.idl \
XVBACompatibility.idl \
XVBAEventProcessor.idl \
XVBAMacroResolver.idl \
- XVBAModuleInfo.idl
+ XVBAModuleInfo.idl \
+ XVBAScriptListener.idl
# ------------------------------------------------------------------