From 80e2c4e5b9ef1d299c6caa271c9f177a4d011937 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 27 Feb 2024 16:29:18 +0100 Subject: Fold InternalUnoApi_embindtest into UnoApi_udkapi 80d3f33876a2ad4ce32d3c6183131984e8c6b5da "Library_embindtest should use comprehensive InternalUnoApi_embindtest" was an attempt at making type information about that library available at runtime. Which worked for cases where code directly called one of the types' cppu_detail_getUnoType function. But it would still fail for cases where code indirectly wants to obtain one of the types' information by type name---which is what upcoming code will do that changes the Embind'ing of UNO sequences. So InternalUnoApi_embindtest would need to become a UnoApi_embindtest whose instdir/program/types/embindtest.rdb would be available at runtime. But I'm too dumb to convince gbuild to create that new UnoApi_embindtest. So instead just tack the embindtest UNOIDL entities onto the existing UnoApi_udkapi for the EMSCRIPTEN-ENABLE_DBGUTIL case. (Which requires that the single embindtest.idl is split into individual per-entity files, sigh.) Change-Id: Ie189b17213ac5b2de7a61ac5f97a143fa097337f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164057 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- static/StaticLibrary_unoembind.mk | 6 --- udkapi/UnoApi_udkapi.mk | 10 ++++ udkapi/org/libreoffice/embindtest/Struct.idl | 20 +++++++ udkapi/org/libreoffice/embindtest/Test.idl | 16 ++++++ udkapi/org/libreoffice/embindtest/XTest.idl | 71 +++++++++++++++++++++++++ unotest/InternalUnoApi_embindtest.mk | 16 ------ unotest/Library_embindtest.mk | 4 -- unotest/Module_unotest.mk | 1 - unotest/source/embindtest/embindtest.idl | 79 ---------------------------- 9 files changed, 117 insertions(+), 106 deletions(-) create mode 100644 udkapi/org/libreoffice/embindtest/Struct.idl create mode 100644 udkapi/org/libreoffice/embindtest/Test.idl create mode 100644 udkapi/org/libreoffice/embindtest/XTest.idl delete mode 100644 unotest/InternalUnoApi_embindtest.mk delete mode 100644 unotest/source/embindtest/embindtest.idl diff --git a/static/StaticLibrary_unoembind.mk b/static/StaticLibrary_unoembind.mk index 5d4438ef2f85..e2a2bfacd892 100644 --- a/static/StaticLibrary_unoembind.mk +++ b/static/StaticLibrary_unoembind.mk @@ -22,12 +22,6 @@ $(eval $(call gb_StaticLibrary_use_api,unoembind,\ udkapi \ )) -ifneq ($(ENABLE_DBGUTIL),) -$(eval $(call gb_StaticLibrary_use_internal_api,unoembind, \ - embindtest \ -)) -endif - $(call gb_StaticLibrary_get_target,unoembind): $(call gb_CustomTarget_get_target,static/unoembind) # vim: set noet sw=4 ts=4: diff --git a/udkapi/UnoApi_udkapi.mk b/udkapi/UnoApi_udkapi.mk index f18b9f758ddc..5f22026027ee 100644 --- a/udkapi/UnoApi_udkapi.mk +++ b/udkapi/UnoApi_udkapi.mk @@ -520,6 +520,16 @@ $(eval $(call gb_UnoApi_add_idlfiles,udkapi,com/sun/star/util,\ XVeto \ )) +ifeq ($(OS)-$(ENABLE_DBGUTIL),EMSCRIPTEN-TRUE) +$(eval $(call gb_UnoApi_add_idlfiles,udkapi,org/libreoffice/embindtest, \ + Struct \ + XTest \ +)) +$(eval $(call gb_UnoApi_add_idlfiles_nohdl,udkapi,org/libreoffice/embindtest, \ + Test \ +)) +endif + $(eval $(call gb_UnoApi_set_reference_rdbfile,udkapi,$(SRCDIR)/udkapi/type_reference/udkapi.idl)) # vim: set noet sw=4 ts=4: diff --git a/udkapi/org/libreoffice/embindtest/Struct.idl b/udkapi/org/libreoffice/embindtest/Struct.idl new file mode 100644 index 000000000000..6b9d36e40a1b --- /dev/null +++ b/udkapi/org/libreoffice/embindtest/Struct.idl @@ -0,0 +1,20 @@ +/* -*- 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/. + */ + +module org { module libreoffice { module embindtest { + +struct Struct { + long m1; + double m2; + string m3; +}; + +}; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/udkapi/org/libreoffice/embindtest/Test.idl b/udkapi/org/libreoffice/embindtest/Test.idl new file mode 100644 index 000000000000..ac7a1ece34f3 --- /dev/null +++ b/udkapi/org/libreoffice/embindtest/Test.idl @@ -0,0 +1,16 @@ +/* -*- 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/. + */ + +module org { module libreoffice { module embindtest { + +singleton Test: XTest; + +}; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/udkapi/org/libreoffice/embindtest/XTest.idl b/udkapi/org/libreoffice/embindtest/XTest.idl new file mode 100644 index 000000000000..36aae5c7c394 --- /dev/null +++ b/udkapi/org/libreoffice/embindtest/XTest.idl @@ -0,0 +1,71 @@ +/* -*- 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/. + */ + +module org { module libreoffice { module embindtest { + +interface XTest { + boolean getBoolean(); + boolean isBoolean([in] boolean value); + byte getByte(); + boolean isByte([in] byte value); + short getShort(); + boolean isShort([in] short value); + unsigned short getUnsignedShort(); + boolean isUnsignedShort([in] unsigned short value); + long getLong(); + boolean isLong([in] long value); + unsigned long getUnsignedLong(); + boolean isUnsignedLong([in] unsigned long value); + hyper getHyper(); + boolean isHyper([in] hyper value); + unsigned hyper getUnsignedHyper(); + boolean isUnsignedHyper([in] unsigned hyper value); + float getFloat(); + boolean isFloat([in] float value); + double getDouble(); + boolean isDouble([in] double value); + char getChar(); + boolean isChar([in] char value); + string getString(); + boolean isString([in] string value); + Struct getStruct(); + boolean isStruct([in] Struct value); + sequence getSequenceBoolean(); + boolean isSequenceBoolean([in] sequence value); + sequence getSequenceByte(); + boolean isSequenceByte([in] sequence value); + sequence getSequenceShort(); + boolean isSequenceShort([in] sequence value); + sequence getSequenceUnsignedShort(); + boolean isSequenceUnsignedShort([in] sequence value); + sequence getSequenceLong(); + boolean isSequenceLong([in] sequence value); + sequence getSequenceUnsignedLong(); + boolean isSequenceUnsignedLong([in] sequence value); + sequence getSequenceHyper(); + boolean isSequenceHyper([in] sequence value); + sequence getSequenceUnsignedHyper(); + boolean isSequenceUnsignedHyper([in] sequence value); + sequence getSequenceFloat(); + boolean isSequenceFloat([in] sequence value); + sequence getSequenceDouble(); + boolean isSequenceDouble([in] sequence value); + sequence getSequenceChar(); + boolean isSequenceChar([in] sequence value); + sequence getSequenceString(); + boolean isSequenceString([in] sequence value); + sequence > getSequenceSequenceString(); + boolean isSequenceSequenceString([in] sequence > value); + sequence getSequenceStruct(); + boolean isSequenceStruct([in] sequence value); +}; + +}; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/unotest/InternalUnoApi_embindtest.mk b/unotest/InternalUnoApi_embindtest.mk deleted file mode 100644 index ed96a209ce81..000000000000 --- a/unotest/InternalUnoApi_embindtest.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; 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/. -# - -$(eval $(call gb_InternalUnoApi_InternalUnoApi,embindtest,unotest/source/embindtest/embindtest.idl)) - -$(eval $(call gb_InternalUnoApi_use_api,embindtest, \ - udkapi \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/unotest/Library_embindtest.mk b/unotest/Library_embindtest.mk index 6dc356ace4d5..8f53db5e52d0 100644 --- a/unotest/Library_embindtest.mk +++ b/unotest/Library_embindtest.mk @@ -19,8 +19,4 @@ $(eval $(call gb_Library_use_api,embindtest, \ udkapi \ )) -$(eval $(call gb_Library_use_internal_comprehensive_api,embindtest, \ - embindtest \ -)) - # vim: set noet sw=4 ts=4: diff --git a/unotest/Module_unotest.mk b/unotest/Module_unotest.mk index a12267817d27..196d6cd1af7f 100644 --- a/unotest/Module_unotest.mk +++ b/unotest/Module_unotest.mk @@ -33,7 +33,6 @@ endif ifeq ($(OS)-$(ENABLE_DBGUTIL),EMSCRIPTEN-TRUE) $(eval $(call gb_Module_add_targets,unotest, \ - InternalUnoApi_embindtest \ Library_embindtest \ )) endif diff --git a/unotest/source/embindtest/embindtest.idl b/unotest/source/embindtest/embindtest.idl deleted file mode 100644 index a0884661b395..000000000000 --- a/unotest/source/embindtest/embindtest.idl +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- 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/. - */ - -module org { module libreoffice { module embindtest { - -struct Struct { - long m1; - double m2; - string m3; -}; - -interface XTest { - boolean getBoolean(); - boolean isBoolean([in] boolean value); - byte getByte(); - boolean isByte([in] byte value); - short getShort(); - boolean isShort([in] short value); - unsigned short getUnsignedShort(); - boolean isUnsignedShort([in] unsigned short value); - long getLong(); - boolean isLong([in] long value); - unsigned long getUnsignedLong(); - boolean isUnsignedLong([in] unsigned long value); - hyper getHyper(); - boolean isHyper([in] hyper value); - unsigned hyper getUnsignedHyper(); - boolean isUnsignedHyper([in] unsigned hyper value); - float getFloat(); - boolean isFloat([in] float value); - double getDouble(); - boolean isDouble([in] double value); - char getChar(); - boolean isChar([in] char value); - string getString(); - boolean isString([in] string value); - Struct getStruct(); - boolean isStruct([in] Struct value); - sequence getSequenceBoolean(); - boolean isSequenceBoolean([in] sequence value); - sequence getSequenceByte(); - boolean isSequenceByte([in] sequence value); - sequence getSequenceShort(); - boolean isSequenceShort([in] sequence value); - sequence getSequenceUnsignedShort(); - boolean isSequenceUnsignedShort([in] sequence value); - sequence getSequenceLong(); - boolean isSequenceLong([in] sequence value); - sequence getSequenceUnsignedLong(); - boolean isSequenceUnsignedLong([in] sequence value); - sequence getSequenceHyper(); - boolean isSequenceHyper([in] sequence value); - sequence getSequenceUnsignedHyper(); - boolean isSequenceUnsignedHyper([in] sequence value); - sequence getSequenceFloat(); - boolean isSequenceFloat([in] sequence value); - sequence getSequenceDouble(); - boolean isSequenceDouble([in] sequence value); - sequence getSequenceChar(); - boolean isSequenceChar([in] sequence value); - sequence getSequenceString(); - boolean isSequenceString([in] sequence value); - sequence > getSequenceSequenceString(); - boolean isSequenceSequenceString([in] sequence > value); - sequence getSequenceStruct(); - boolean isSequenceStruct([in] sequence value); -}; - -singleton Test: XTest; - -}; }; }; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ -- cgit