Adds the following features in order to make the QuickJS engine slightly more compatible with the Rhino engine: Makes “Packages” be an alias for “uno.idl” Adds an implementation of importClass. This tries to get the name of the thing that is being imported and then sets a global variable with that name to point to that thing. The name is retrieved by adding a getImportClassName method to most of the objects returned by moduleGetOwnProperty. Inserts a com.sun.star.uno.UnoRuntime object with a hack on moduleGetOwnProperty. This object has a method called “queryInterface” to allow doing UnoRuntime.queryInterface(interface,obj). The implementation just calls obj.queryInterface(uno.type.interface(interface)) This is enough to run the HelloWorld example from the Rhino JavaScript provider. Change-Id: I569fe4dad4cd8cdc6029a60f8e5421a5de1588c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204912 Tested-by: Jenkins Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
33 lines
821 B
Makefile
33 lines
821 B
Makefile
# -*- 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_Library_Library,jsuno))
|
|
|
|
$(eval $(call gb_Library_add_defs,jsuno,-DLO_DLLIMPLEMENTATION_JSUNO))
|
|
|
|
$(eval $(call gb_Library_add_exception_objects,jsuno, \
|
|
jsuno/source/jsuno \
|
|
jsuno/source/rhinocompatibility \
|
|
))
|
|
|
|
$(eval $(call gb_Library_use_externals,jsuno, \
|
|
quickjs \
|
|
))
|
|
|
|
$(eval $(call gb_Library_use_libraries,jsuno, \
|
|
comphelper \
|
|
cppu \
|
|
cppuhelper \
|
|
sal \
|
|
))
|
|
|
|
$(eval $(call gb_Library_use_sdk_api,jsuno))
|
|
|
|
# vim: set noet sw=4 ts=4:
|