summaryrefslogtreecommitdiff
path: root/oovbaapi
diff options
context:
space:
mode:
Diffstat (limited to 'oovbaapi')
-rw-r--r--oovbaapi/UnoApi_oovbaapi.mk7
-rw-r--r--oovbaapi/ooo/vba/TypeAndIID.idl30
-rw-r--r--oovbaapi/ooo/vba/XConnectable.idl38
-rw-r--r--oovbaapi/ooo/vba/XConnectionPoint.idl34
-rw-r--r--oovbaapi/ooo/vba/XInterfaceWithIID.idl34
-rw-r--r--oovbaapi/ooo/vba/XSink.idl36
-rw-r--r--oovbaapi/ooo/vba/XSinkCaller.idl29
-rw-r--r--oovbaapi/ooo/vba/word/XApplication.idl2
-rw-r--r--oovbaapi/ooo/vba/word/XApplicationOutgoing.idl36
9 files changed, 245 insertions, 1 deletions
diff --git a/oovbaapi/UnoApi_oovbaapi.mk b/oovbaapi/UnoApi_oovbaapi.mk
index f977f44d0b08..39c558257153 100644
--- a/oovbaapi/UnoApi_oovbaapi.mk
+++ b/oovbaapi/UnoApi_oovbaapi.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,oovbaapi,ooo/vba/excel,\
$(eval $(call gb_UnoApi_add_idlfiles,oovbaapi,ooo/vba,\
FormShowConstants \
+ TypeAndIID \
VbAppWinStyle \
VbCalendar \
VbCallType \
@@ -70,6 +71,8 @@ $(eval $(call gb_UnoApi_add_idlfiles,oovbaapi,ooo/vba,\
XCommandBarControls \
XCommandBarPopup \
XCommandBars \
+ XConnectable \
+ XConnectionPoint \
XControlProvider \
XDialogBase \
XDialogsBase \
@@ -82,8 +85,11 @@ $(eval $(call gb_UnoApi_add_idlfiles,oovbaapi,ooo/vba,\
XFontBase \
XGlobalsBase \
XHelperInterface \
+ XInterfaceWithIID \
XPageSetupBase \
XPropValue \
+ XSink \
+ XSinkCaller \
XVBAToOOEventDescGen \
XWindowBase \
))
@@ -1028,6 +1034,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,oovbaapi,ooo/vba/word,\
XAddin \
XAddins \
XApplication \
+ XApplicationOutgoing \
XAutoTextEntries \
XAutoTextEntry \
XBookmark \
diff --git a/oovbaapi/ooo/vba/TypeAndIID.idl b/oovbaapi/ooo/vba/TypeAndIID.idl
new file mode 100644
index 000000000000..61fdc5219336
--- /dev/null
+++ b/oovbaapi/ooo/vba/TypeAndIID.idl
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __ooo_vba_TypeAndIID_idl__
+#define __ooo_vba_TypeAndIID_idl__
+
+module ooo { module vba {
+
+// Despite being here in ooo::vba, this has nothing to do with "VBA" (Visual Basic for
+// Applications), or the VBA compatibility in StarBasic. This is related to using LibreOffice from
+// (OLE) Automation clients. It is here anyway because much of the API available to such clients
+// is identical to that offered to StarBasic code written in a VBA-like fashion.
+
+struct TypeAndIID
+{
+ type Type;
+ string IID;
+};
+
+}; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oovbaapi/ooo/vba/XConnectable.idl b/oovbaapi/ooo/vba/XConnectable.idl
new file mode 100644
index 000000000000..d6bcfd9173ec
--- /dev/null
+++ b/oovbaapi/ooo/vba/XConnectable.idl
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __ooo_vba_XConnectable_idl__
+#define __ooo_vba_XConnectable_idl__
+
+module ooo { module vba {
+
+// Despite being here in ooo::vba, this has nothing to do with "VBA" (Visual Basic for
+// Applications), or the VBA compatibility in StarBasic. This is related to using LibreOffice from
+// (OLE) Automation clients. It is here anyway because much of the API available to such clients
+// is identical to that offered to StarBasic code written in a VBA-like fashion.
+
+// An object that implements this interface should intend to be usable from an Automation client
+// that wants the object to do callbacks, i.e. generate "events" in the client (for instance
+// implemented in VBScript, VB6, or even C++).
+
+interface XConnectable
+{
+ interface XInterfaceWithIID;
+ // Silly name yes, but I can't find what the proper term for this thing is. This is not a
+ // published interface anyway.
+ string GetIIDForClassItselfNotCoclass();
+ TypeAndIID GetConnectionPoint();
+ XConnectionPoint FindConnectionPoint();
+};
+
+}; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oovbaapi/ooo/vba/XConnectionPoint.idl b/oovbaapi/ooo/vba/XConnectionPoint.idl
new file mode 100644
index 000000000000..b3471c6445ff
--- /dev/null
+++ b/oovbaapi/ooo/vba/XConnectionPoint.idl
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __ooo_vba_XConnectionPoint_idl__
+#define __ooo_vba_XConnectionPoint_idl__
+
+module ooo { module vba {
+
+// Despite being here in ooo::vba, this has nothing to do with "VBA" (Visual Basic for
+// Applications), or the VBA compatibility in StarBasic. This is related to using LibreOffice from
+// (OLE) Automation clients. It is here anyway because much of the API available to such clients
+// is identical to that offered to StarBasic code written in a VBA-like fashion.
+
+// This is quite different from css::lang::XConnectionPoint.
+
+// This is tailored to be slimmer and match the use case from Automation clients much better.
+
+interface XConnectionPoint
+{
+ unsigned long Advise([in] XSink Sink);
+ void Unadvise([in] unsigned long Cookie);
+};
+
+}; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oovbaapi/ooo/vba/XInterfaceWithIID.idl b/oovbaapi/ooo/vba/XInterfaceWithIID.idl
new file mode 100644
index 000000000000..0752cced0c56
--- /dev/null
+++ b/oovbaapi/ooo/vba/XInterfaceWithIID.idl
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __ooo_vba_XInterfaceWithIID_idl__
+#define __ooo_vba_XInterfaceWithIID_idl__
+
+module ooo { module vba {
+
+// Despite being here in ooo::vba, this has nothing to do with "VBA" (Visual Basic for
+// Applications), or the VBA compatibility in StarBasic. This is related to using LibreOffice from
+// (OLE) Automation clients. It is here anyway because much of the API available to such clients
+// is identical to that offered to StarBasic code written in a VBA-like fashion.
+
+// An interface that has an IID.
+
+interface XInterfaceWithIID : com::sun::star::uno::XInterface
+{
+ // The IID of the interface, in the string form with braces, as
+ // accepted by IIDFromString, for instance
+ // "{82154421-0fbf-11d4-8313-005004526ab4}"
+ [attribute, readonly] string IID;
+};
+
+}; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oovbaapi/ooo/vba/XSink.idl b/oovbaapi/ooo/vba/XSink.idl
new file mode 100644
index 000000000000..110c9b6a573f
--- /dev/null
+++ b/oovbaapi/ooo/vba/XSink.idl
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __ooo_vba_XConnectionPointSink_idl__
+#define __ooo_vba_XConnectionPointSink_idl__
+
+module ooo { module vba {
+
+// Despite being here in ooo::vba, this has nothing to do with "VBA" (Visual Basic for
+// Applications), or the VBA compatibility in StarBasic. This is related to using LibreOffice from
+// (OLE) Automation clients. It is here anyway because much of the API available to such clients
+// is identical to that offered to StarBasic code written in a VBA-like fashion.
+
+// This is the interface LibreOffice code actually uses when doing "outgoing" calls to Automation
+// clients (for events).
+
+interface XSink
+{
+ // This will be massaged by the Automation-UNO bridge into a call into the sink provided by the
+ // Automation client.
+
+ // FIXME: Add "out" arguments, and perhaps exceptions?
+ void Call([in] string Method, [in] sequence<any> Arguments);
+};
+
+}; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oovbaapi/ooo/vba/XSinkCaller.idl b/oovbaapi/ooo/vba/XSinkCaller.idl
new file mode 100644
index 000000000000..33be504fbe62
--- /dev/null
+++ b/oovbaapi/ooo/vba/XSinkCaller.idl
@@ -0,0 +1,29 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __ooo_vba_XSinkCaller_idl__
+#define __ooo_vba_XSinkCaller_idl__
+
+module ooo { module vba {
+
+// Despite being here in ooo::vba, this has nothing to do with "VBA" (Visual Basic for
+// Applications), or the VBA compatibility in StarBasic. This is related to using LibreOffice from
+// (OLE) Automation clients. It is here anyway because much of the API available to such clients
+// is identical to that offered to StarBasic code written in a VBA-like fashion.
+
+interface XSinkCaller
+{
+ void CallSinks([in] string Method, [in] sequence<any> Arguments);
+};
+
+}; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oovbaapi/ooo/vba/word/XApplication.idl b/oovbaapi/ooo/vba/word/XApplication.idl
index 0d667551e4a3..de6fafc085a7 100644
--- a/oovbaapi/ooo/vba/word/XApplication.idl
+++ b/oovbaapi/ooo/vba/word/XApplication.idl
@@ -29,7 +29,7 @@ interface XWindow;
interface XSystem;
interface XOptions;
interface XSelection;
-interface XApplication : com::sun::star::uno::XInterface
+interface XApplication : XConnectable
{
[attribute, readonly] XDocument ActiveDocument;
[attribute, readonly] XWindow ActiveWindow;
diff --git a/oovbaapi/ooo/vba/word/XApplicationOutgoing.idl b/oovbaapi/ooo/vba/word/XApplicationOutgoing.idl
new file mode 100644
index 000000000000..11ac1da2a540
--- /dev/null
+++ b/oovbaapi/ooo/vba/word/XApplicationOutgoing.idl
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __ooo_vba_word_XApplicationOutgoing_idl__
+#define __ooo_vba_word_XApplicationOutgoing_idl__
+
+module ooo { module vba { module word {
+
+// Despite being here in ooo::vba, this has nothing to do with "VBA" (Visual Basic for
+// Applications), or the VBA compatibility in StarBasic. This is related to using LibreOffice from
+// (OLE) Automation clients. It is here anyway because much of the API available to such clients
+// is identical to that offered to StarBasic code written in a VBA-like fashion.
+
+// This interface exists for technical reasons only, we don't actually have any UNO object that
+// would implemenrt (inherit from) this. We just advertise the type of this interface from Writer to
+// the Automation-UNO bridge code (in extensions/source/ole) so that it can tell the Automation
+// client what the Automation server expects and construct a corresponding COM interface that can
+// receive the callbacks. Or something like that.
+
+interface XApplicationOutgoing : XInterfaceWithIID
+{
+ void DocumentChange();
+ void Quit();
+};
+
+}; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */