summaryrefslogtreecommitdiff
path: root/qadevOOo/objdsc/ftransl
ModeNameSize
-rw-r--r--com.sun.star.comp.datatransfer.DataFormatTranslator.csv640logplain
td>Stephan Bergmann ...though > let seq = new Module.uno_Sequence_string(["foo", "bar", "baz"]); > // ... > delete seq; is still ugly. And Embind only allows for overload resolution by number of parameters, not by their type, so using the original sequence constructor had to be changed to > let seq = new Module.uno_Sequence_string(3, Module.uno_Sequence.FromSize); > seq.set(0, "foo"); > seq.set(1, "bar"); > seq.set(2, "baz"); > // ... > delete seq; Change-Id: If26ff4a485ba16b65cf24b6fe729d379c733c473 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163097 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-02-08Embind: Map UNO structs to emscripten::value_objectStephan Bergmann ...so that it has a nicer integration into JS, at the expense of copying data between C++ and JS Change-Id: I19af55e8db0c374dd7b0f58f74d1af19214175b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163098 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-02-03First-class Embind JS support for OUStringStephan Bergmann Change-Id: Ic178737da802e17f87d0b5b09004a847b0fe91be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162956 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-02-01embindmaker: Add support for sequence typesStephan Bergmann Ideally, JS code would have a way to create instances of arbitrary UNO sequence types (to e.g. put them into Anys), but that goes against the static nature of Embind. So at least register JS support for all those UNO sequence types that are actually used in the UNO API. (This would cause duplicate failures, though, if we generated multiple separate .cxx files from embindmaker invocations, with registration code for the same UNO sequence types.) (Even more ideally, UNO sequence types could map to JS arrays, and/oror be garbage-collected on the JS side rather than needing explicit delete(). The resize/size/get/set interface in unoembindhelpers::registerSequence is modelled after Embind's emscripten::register_vector.) Change-Id: Icd38b2e03db442dd613b9222b9bd092f947f7bec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162849 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-31embindmaker: Consistently spell out "::com::sun::star::"Stephan Bergmann Change-Id: I253236c908b1827479c1824cf01c707e48ef58c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162832 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-31embindmaker: Handle (plain) structsStephan Bergmann Change-Id: I16ac3a6a2f42cf3054104a5ba90f4b75238e2ec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162843 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-31Rename UnoInOutParamXxx -> uno_InOutParam_xxxStephan Bergmann ...to harmonize with the other existing uno_Type_... etc. names, and with upcoming uno_Sequence_... names. (And template'ize the registration code.) Change-Id: I5dace5bc643ab636977fde84fa51825efc5cafa5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162838 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-31embindmaker: Handle enumsStephan Bergmann Change-Id: I07e068e52df2a838e76f32e691d23a47d7fcfdda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162809 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-31embindmaker: Handle new-style singletonsStephan Bergmann Change-Id: Icb3b179c95e1af8b12772401f58d4f4cf181e585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162795 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-31At least in its current form, embinding Any shouldn't need allow_raw_pointersStephan Bergmann Change-Id: Ib66df92c17768a05a402135729a75992b4b83d64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162789 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-31Embind in-out/out params of primitive type apparently need a wrapperStephan Bergmann > let translit = css.i18n.Transliteration.create(Module.getUnoComponentContext()); > let match1; > let match2; > let eq = translit.equals(new Module.OUString("test1"), 0, 5, match1, new Module.OUString("test2"), 0, 5, match2); > console.log('match ' + eq + ', ' + match1 + ', ' + match2); caused an uncaught UnboundTypeError with message "Cannot call uno_Type_com$sun$star$i18n$XTransliteration.equals due to unbound types: Pl", so use > let translit = css.i18n.Transliteration.create(Module.getUnoComponentContext()); > let match1 = new Module.UnoInOutParamLong; > let match2 = new Module.UnoInOutParamLong; > let eq = translit.equals(new Module.OUString("test1"), 0, 5, match1, new Module.OUString("test2"), 0, 5, match2); > console.log('match ' + eq + ', ' + match1.val + ', ' + match2.val); > delete match1; > delete match2; instead Change-Id: Ic5a0a9e37e884817158069702510eab0d29adefa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162784 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-31Embind clean up, only pass in-out/out params by raw pointerStephan Bergmann Change-Id: I141d3aace7b76182fe464626bbb8a336c8ec6a3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162783 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-30Pass the_self by const ref in Embind wrapper functionsStephan Bergmann Change-Id: Ie8bfec2a9fdd5f126fd2879d2ba06f1fa5c1019e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162781 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-30Embinding OUString shouldn't need allow_raw_pointersStephan Bergmann Change-Id: I92608ebe4edf65c7de96587aa39e990fb09c3e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162779 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-30embindmaker: Handle new-style servicesStephan Bergmann Change-Id: I41309a20666c17f0c8c8d456943b3c78d0273905 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162772 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-30Expose comphelper::getProcessComponentContext through EmbindStephan Bergmann Change-Id: I8b2cec04a1ffb99c33d39d8a63aa67778e960ab7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162773 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-30embindmaker: Handle interface inheritanceStephan Bergmann Change-Id: I81e66666f8a60bd34a9a3807adfb15c341303b9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162771 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-30Rework the Embind mapping of UNO interfacesStephan Bergmann ...to make use of the automatic finalization clean-up of smart pointers available with recent versions of Embind (so that explicitly calling delete() on them should largely be optional now). See the changes to static/README.wasm.md for how code should look like now. (The Module.uno_Reference.FromAny dummy argument for the interface constructor converting from an Any is only necessary to distinguish it from the other constructor, as otherwise Embind complains because: "Overload resolution is currently only performed using the parameter count, not actual type info!") Change-Id: Ia8a8c12e38af1093948bf8a20ecd31aa6591e912 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162697 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-30Some renaming of generated identifiersStephan Bergmann uno_Type_com$sun$star$... and uno_Reference_com$sun$star$... Change-Id: Ibc19f423a60c521c376172807b4d5a34cf0179a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162696 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-29Experimental support for latest Emscripten (and Qt6)Stephan Bergmann What I'm after in the context of our Embind-related code is the claim at <https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#memory-management>: "JavaScript only gained support for finalizers in ECMAScript 2021, or ECMA-262 Edition 12. The new API is called FinalizationRegistry and it still does not offer any guarantees that the provided finalization callback will be called. Embind uses this for cleanup if available, but only for smart pointers, and only as a last resort." However, with the recommended emsdk 2.0.31 my tests did not show any use of that finalization support. So I wanted to try with the latest emsdk 3.1.51 instead. But then, linking vcldemo failed with > wasm-ld: error: ~/allotropia-qt5/lib/libQt5Core.a(qlogging.o): undefined symbol: std::__2::__vector_base_common<true>::__throw_length_error() const etc., so I gave it a try to rather build against latest Qt6.7, with > --with-distro=LibreOfficeWASM32 > --disable-qt5 > --enable-qt6 > QT6DIR=... TODO: The result is highly experimental, and it uses ENABLE_QT5 (i.e., the recommended setup with emsdk 2.0.31 and the <https://github.com/allotropia/qt5.git> v5.15.2+wasm branch) vs. ENABLE_QT6 (i.e., my experimental setup with emsdk 3.1.51 and the <https://github.com/qt/qt5.git> 6.7 branch) not only to distinguish between Qt5- vs. Qt6-specific behavior, but also to distinguish between old- vs. new-Emscripten-specific behavior. Of note: * The startup code appears to have changed substantially (and required setting -s MODULARIZE=1 and -s EXPORT_NAME=soffice_entry now, and telling emcc to build just soffice.js and not the wrapper soffice.html. TODO: This also required hacking into qt_soffice.html: (1) The command-line arguments (--norestore, --nologo, --writer, and the exammple.odt; all of which we should eventually get rid of, anyway). (2) Saving the generated instance as window.Module (and adapting the embindmaker-generated code, cf. the changes to static/README.wasm.md). * There were some symbol clashes between external/argon2 and libQt6Core.a(qcryptographichash.cpp.o, so renamed the problematic symbols in external/argon2. Change-Id: I5420ab566d560b11954ac6613249bfc53d8acb31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162695 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-28Hack to speed up compilation of generated UNO Embind sourceStephan Bergmann ...workdir/CustomTarget/static/unoembind/bindings_uno.cxx, reducing an otherwise no-op build for me (against emcc 3.1.51) from multiple hours to "just" 3 min wall-clock time. Change-Id: Ic6477134b72f9d28cc3193fb514ceaa32b84209c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162666 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-26Fix typoAndrea Gelmini Change-Id: Ic038388a812e510fdb963f8f271d6377a71759c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162599 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins 2024-01-25Let embindmaker also generate a .js file with more natural namesStephan Bergmann (i.e., Module.unoembind_uno.com.sun.star... vs. Module.com$sun$star$..., and see the updated examples in static/README.wasm.md for further shortening that to just css...) Change-Id: I6dc079caa8c93a4042a6a8aa2d8fcc8f76bf80f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162580 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-21Extract embindmaker from cppumaker into its own toolStephan Bergmann ...that directly generates one large .cxx Change-Id: I046539b83f8fde5eda7168c93a8b819137399665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162343 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-19Remove unused includeStephan Bergmann Change-Id: I2cc863e7143dbb0fcfa4800854987e5f6db655ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162309 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-18Embind nicely supports std::u16string for OUStringStephan Bergmann Change-Id: I2477bc67b3c62d302917e63b6286ffb4a78dafd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162259 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2024-01-18-Werror,-Wdeprecated-enum-float-conversion (Emscripten)Stephan Bergmann > static/source/qt5-mandelbrot/renderthread.cxx:61:62: error: arithmetic between floating-point type 'double' and enumeration type 'RenderThread::(unnamed enum at workdir/CustomTarget/static/qt5-mandelbrot/../../../../static/source/qt5-mandelbrot/renderthread.h:92:5)' is deprecated [-Werror,-Wdeprecated-enum-float-conversion] > m_colormap[i] = rgbFromWaveLength(380.0 + (i * 400.0 / ColormapSize)); > ~~~~~~~~~ ^ ~~~~~~~~~~~~ Change-Id: I97dab1d11177a6e20ddd6703c146e31e316e0071 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162251 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> 2023-09-18JavaScript uno bindings for WASM with Embind - first cutSarper Akdemir A rough implementation of uno bindings for LOWA using embind. Adds new parameter '-W' to cppumaker to generate _embind.cxx files alongside .hdl & .hpp. For usage examples see static/README.wasm.md Change-Id: Iee5d05e37bfba8e101c08212b15c05f7f2fa6c33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156273 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de> 2022-01-19WASM merge wasm-qt into static moduleJan-Marek Glogowski Change-Id: I1ed26685561fd79d26cc0844faa3dfe4c00d439a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128625 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>