summaryrefslogtreecommitdiff
path: root/oovbaapi
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2017-09-07 22:00:01 +0200
committerTamás Bunth <btomi96@gmail.com>2017-09-08 09:29:36 +0200
commit8e8c789742874ac823e68f6154050c64b6fc5b85 (patch)
tree39c3f0bbb622a215c76f1dc73c7ed78ecf420667 /oovbaapi
parent2e0a25ce2b87d3a4bbf944025fc3720933fb391d (diff)
oovbaapi: create XOval and XLine shape types
This is needed in order to make "TypeOf myLine Is Line" or similar expressions return the expected "true" value. The implementation of the basic interpreter of TypeOf uses XTypeProvider to determine the type of an object by getting the last part of the type name. E.g. "ooo:vba::msforms::XLine" is determined as a "Line". That's why I created the XLine and XOval blank classes. TypeOf doc: https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/typeof-operator Change-Id: Ia49cc92d672e30d0126f02d61a55a956ac1425f0 Reviewed-on: https://gerrit.libreoffice.org/42083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'oovbaapi')
-rw-r--r--oovbaapi/UnoApi_oovbaapi.mk2
-rw-r--r--oovbaapi/ooo/vba/msforms/XLine.idl41
-rw-r--r--oovbaapi/ooo/vba/msforms/XOval.idl41
3 files changed, 84 insertions, 0 deletions
diff --git a/oovbaapi/UnoApi_oovbaapi.mk b/oovbaapi/UnoApi_oovbaapi.mk
index d99d7c3772d9..f977f44d0b08 100644
--- a/oovbaapi/UnoApi_oovbaapi.mk
+++ b/oovbaapi/UnoApi_oovbaapi.mk
@@ -530,10 +530,12 @@ $(eval $(call gb_UnoApi_add_idlfiles,oovbaapi,ooo/vba/msforms,\
XGroupBox \
XImage \
XLabel \
+ XLine \
XLineFormat \
XListBox \
XMultiPage \
XNewFont \
+ XOval \
XPages \
XPictureFormat \
XProgressBar \
diff --git a/oovbaapi/ooo/vba/msforms/XLine.idl b/oovbaapi/ooo/vba/msforms/XLine.idl
new file mode 100644
index 000000000000..18cd4be551ea
--- /dev/null
+++ b/oovbaapi/ooo/vba/msforms/XLine.idl
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __ooo_vba_msforms_XLineShape_idl__
+#define __ooo_vba_msforms_XLineShape_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+
+module ooo { module vba { module msforms {
+
+/*
+ * This class stub is created in order to make "TypeOf myShape Is Line" expression
+ * return true. It is determined using XTypeProvider::getTypes(), which is
+ * implemented automatically based on the name of the class.
+ */
+interface XLine: com::sun::star::uno::XInterface
+{
+
+
+};
+
+}; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oovbaapi/ooo/vba/msforms/XOval.idl b/oovbaapi/ooo/vba/msforms/XOval.idl
new file mode 100644
index 000000000000..e87fea25484d
--- /dev/null
+++ b/oovbaapi/ooo/vba/msforms/XOval.idl
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __ooo_vba_msforms_XOvalShape_idl__
+#define __ooo_vba_msforms_XOvalShape_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+
+module ooo { module vba { module msforms {
+
+/*
+ * This class stub is created in order to make "TypeOf myShape Is Oval" expression
+ * return true. It is determined using XTypeProvider::getTypes(), which is
+ * implemented automatically based on the name of the class.
+ */
+interface XOval: com::sun::star::uno::XInterface
+{
+
+
+};
+
+}; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */