core.git: sysui/CustomTarget_rpm.mk sysui/desktop

2024-09-22 Thread Stephan Bergmann (via logerrit)
 sysui/CustomTarget_rpm.mk|1 +
 sysui/desktop/freedesktop/freedesktop-menus.spec |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 52b3b38f1448d2468a3e9edec758515151dc067b
Author: Stephan Bergmann 
AuthorDate: Sun Sep 22 20:34:12 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Sep 22 22:26:18 2024 +0200

Adapt to RPM 4.20

...which builds the spec file's code in a dedicated directory now, see
<https://github.com/rpm-software-management/rpm/issues/2078> "RFE: 
introduce an
rpm-controlled per-build directory to builds", and no longer in the 
directory
from which rpm is invoked.  So invent some libo_start_dir parameter to
communicate that directory into the rpm build.

Change-Id: I28268837caafe3b892f76e936dfa747fe13fb9bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173779
    Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/sysui/CustomTarget_rpm.mk b/sysui/CustomTarget_rpm.mk
index c0ef34cc7d4d..075d3e324b27 100644
--- a/sysui/CustomTarget_rpm.mk
+++ b/sysui/CustomTarget_rpm.mk
@@ -36,6 +36,7 @@ 
$(rpm_WORKDIR)/$(1)/$(1)$(PKGVERSIONSHORT)-$(2)-menus-$(PKGVERSION)-$(LIBO_VERSI
--define "version $(PKGVERSION)" \
--define "release $(LIBO_VERSION_PATCH)" \
--define "__debug_install_post %nil" \
+   --define "libo_start_dir 
$(gb_CustomTarget_workdir)/sysui/share/$(1)" \
, $$@.log \
)
 endef
diff --git a/sysui/desktop/freedesktop/freedesktop-menus.spec 
b/sysui/desktop/freedesktop/freedesktop-menus.spec
index ff083d71fe9c..9c84305e51b6 100644
--- a/sysui/desktop/freedesktop/freedesktop-menus.spec
+++ b/sysui/desktop/freedesktop/freedesktop-menus.spec
@@ -60,7 +60,7 @@ export KDEMAINDIR=/usr
 export PREFIXDIR=/usr
 export BINDIR=/usr/bin
 
-./create_tree.sh
+(cd %libo_start_dir && ./create_tree.sh)
 
 cd $RPM_BUILD_ROOT
 


core.git: configure.ac

2024-09-20 Thread Stephan Bergmann (via logerrit)
 configure.ac |   13 +
 1 file changed, 13 insertions(+)

New commits:
commit 3b4ecb07a6f0295441317ab889796034506bc8af
Author: Stephan Bergmann 
AuthorDate: Fri Sep 20 15:21:34 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 20 21:25:03 2024 +0200

Invent --with-extra-cc/cxx-flags

Change-Id: I22ce959f1fe74b8eb1fa0d0fbffe8b257e7f3110
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173731
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index 698fadaf1940..32df06e53e70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2190,6 +2190,16 @@ AC_ARG_ENABLE(cli,
 [Disable the generation of old CLI bindings.]),
 ,enable_cli=yes)
 
+AC_ARG_WITH(extra-cc-flags,
+AS_HELP_STRING([--with-extra-cc-flags=...],
+[Specify extra flags (like GCC's -fdiagnostics-color=always, which is 
useful in combination
+ with the GNU Make --output-sync option) to add to the end of the CC 
variable.]))
+
+AC_ARG_WITH(extra-cxx-flags,
+AS_HELP_STRING([--with-extra-cxx-flags=...],
+[Specify extra flags (like GCC's -fdiagnostics-color=always, which is 
useful in combination
+ with the GNU Make --output-sync option) to add to the end of the CXX 
variable.]))
+
 dnl ===
 dnl Optional Packages (--with/without-)
 dnl ===
@@ -7323,6 +7333,9 @@ if test "$_os" != "WINNT"; then
 fi
 fi
 
+CC="$CC $with_extra_cc_flags"
+CXX="$CXX $with_extra_cxx_flags"
+
 dnl check for GNU C++ compiler version
 if test "$GXX" = "yes" -a -z "$COM_IS_CLANG"; then
 AC_MSG_CHECKING([the GNU C++ compiler version])


core.git: configure.ac

2024-09-20 Thread Stephan Bergmann (via logerrit)
 configure.ac |1 -
 1 file changed, 1 deletion(-)

New commits:
commit f231ca7a43c7ac6d31973eb45168f2dd87f694bd
Author: Stephan Bergmann 
AuthorDate: Fri Sep 20 09:20:36 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 20 13:28:09 2024 +0200

GCC_HOME no longer needs to be SUBST'ed

...since 411e8c24a289649797c679afc084113f7f61667a "vscode: make it work 
better
when srcdir=buildir and add mac lldb config" removed its use in
.vscode/vs-code-template.code-workspace.in

Change-Id: I7454f5d4443eedbb8ca143eb3e140cd0a0d708f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173694
Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann 

diff --git a/configure.ac b/configure.ac
index 9d3c459b8559..25324da03940 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3582,7 +3582,6 @@ if test "$_os" != "WINNT"; then
 GCC_HOME="$with_gcc_home"
 fi
 AC_MSG_RESULT($GCC_HOME)
-AC_SUBST(GCC_HOME)
 
 if test "$GCC_HOME_SET" = "true"; then
 if test -z "$CC"; then


Re: Bug 143148 - "make allheaders.hxx" not working

2024-09-19 Thread Stephan Bergmann

On 9/19/24 21:23, Marc wrote:

make[1]: *** No rule to make target 'CustomTarget_odk/allheaders'.  Stop.
make: *** [Makefile:175: CustomTarget_odk/allheaders] Error 2


since 
 
"make --disable-odk the default", you need to explicitly configure your 
build with --enable-odk (i.e., add that to your autogen.input) for that 
to work




core.git: Branch 'feature/allo_contract45533b' - 2 commits - configure.ac oox/source

2024-09-19 Thread Stephan Bergmann (via logerrit)
 configure.ac |8 ++--
 oox/source/drawingml/chart/plotareaconverter.cxx |3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 5306df81b8069feeb4755a9f4e6d13e954521f04
Author: Stephan Bergmann 
AuthorDate: Fri Jan 19 08:42:13 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Sep 19 22:19:22 2024 +0200

PlotAreaConverter::mbSingleSeriesTitle is apparently read uninitialized

...in code newly introduced in 135ce256ce9e879663d828ec6e699de521fad867
"tdf#146487 Don't show generic diagram title when there is an empty title
given", which caused CppunitTest_chart2_export2 to fail with

> /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62: runtime error: load 
of value 222, which is not a valid value for type 'bool'
> #0 0x7f95cd9ed87c in 
oox::drawingml::chart::PlotAreaConverter::isSingleSeriesTitle() const 
/oox/inc/drawingml/chart/plotareaconverter.hxx:78:62
> #1 0x7f95cd9e506f in 
oox::drawingml::chart::ChartSpaceConverter::convertFromModel(com::sun::star::uno::Reference
 const&, com::sun::star::awt::Point const&) 
/oox/source/drawingml/chart/chartspaceconverter.cxx:189:53
> #2 0x7f95cd9b6c34 in 
oox::drawingml::chart::ChartConverter::convertFromModel(oox::core::XmlFilterBase&,
 oox::drawingml::chart::ChartSpaceModel&, 
com::sun::star::uno::Reference const&, 
com::sun::star::uno::Reference const&, 
com::sun::star::awt::Point const&, com::sun::star::awt::Size const&) 
/oox/source/drawingml/chart/chartconverter.cxx:93:20
> #3 0x7f95ce548f59 in 
oox::drawingml::Shape::finalizeXShape(oox::core::XmlFilterBase&, 
com::sun::star::uno::Reference const&) 
/oox/source/drawingml/shape.cxx:2245:50
> #4 0x7f95438150b2 in 
oox::xls::Shape::finalizeXShape(oox::core::XmlFilterBase&, 
com::sun::star::uno::Reference const&) 
/sc/source/filter/oox/drawingfragment.cxx:113:30
> #5 0x7f95ce5267bb in 
oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase&, rtl::OUString 
const&, oox::drawingml::Theme const*, 
com::sun::star::uno::Reference const&, bool, 
bool, basegfx::B2DHomMatrix&, oox::drawingml::FillProperties const&, 
std::shared_ptr) /oox/source/drawingml/shape.cxx:1964:9
> #6 0x7f95ce4edb54 in 
oox::drawingml::Shape::addShape(oox::core::XmlFilterBase&, 
oox::drawingml::Theme const*, 
com::sun::star::uno::Reference const&, 
basegfx::B2DHomMatrix const&, oox::drawingml::FillProperties const&, 
std::__debug::map, 
std::less, std::allocator > > >*, 
std::shared_ptr) /oox/source/drawingml/shape.cxx:366:41
> #7 0x7f954381ef79 in oox::xls::DrawingFragment::onEndElement() 
/sc/source/filter/oox/drawingfragment.cxx:335:30
> #8 0x7f95cdcaee54 in 
oox::core::ContextHandler2Helper::implEndElement(int) 
/oox/source/core/contexthandler2.cxx:125:9
> #9 0x7f95cdd5c116 in oox::core::FragmentHandler2::endFastElement(int) 
/oox/source/core/fragmenthandler2.cxx:91:5
> #10 0x7f95caf68fca in (anonymous namespace)::Entity::endElement() 
/sax/source/fastparser/fastparser.cxx:514:27
> #11 0x7f95caf68998 in 
sax_fastparser::FastSaxParserImpl::callbackEndElement() 
/sax/source/fastparser/fastparser.cxx:1331:17
> #12 0x7f95caf58444 in (anonymous 
namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char 
const*, unsigned char const*) /sax/source/fastparser/fastparser.cxx:338:18
> #13 0x7f960adebeda in xmlParseEndTag2 
/workdir/UnpackedTarball/libxml2/parser.c:10090:2
> #14 0x7f960ad929b5 in xmlParseTryOrFinish 
/workdir/UnpackedTarball/libxml2/parser.c:11868:14
> #15 0x7f960ad86334 in xmlParseChunk 
/workdir/UnpackedTarball/libxml2/parser.c:12151:5
> #16 0x7f95caf53231 in sax_fastparser::FastSaxParserImpl::parse() 
/sax/source/fastparser/fastparser.cxx:1085:21
> #17 0x7f95caf4cd18 in 
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource
 const&) /sax/source/fastparser/fastparser.cxx:890:9
> #18 0x7f95caf6e950 in 
sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource
 const&) /sax/source/fastparser/fastparser.cxx:1470:13
> #19 0x7f95cdce50d1 in 
oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource 
const&, bool) /oox/source/core/fastparser.cxx:121:15
> #20 0x7f95cdce5868 in 
oox::core::FastParser::parseStream(com::sun::star::uno::Reference
 const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5
> #21 0x7f95cddbb234 in 
oox::core::XmlFilterBase::importFragment(rtl::Reference
 const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21
> #22 0x7f95cddb9b8d in 
oox::core::XmlFilterBase::importFragment(rtl::Refere

core.git: pyuno/source solenv/gbuild

2024-09-18 Thread Stephan Bergmann (via logerrit)
 pyuno/source/module/pyuno.cxx  |7 +++
 pyuno/source/module/pyuno_module.cxx   |7 +++
 pyuno/source/module/pyuno_struct.cxx   |7 +++
 solenv/gbuild/platform/com_GCC_defs.mk |7 ---
 4 files changed, 21 insertions(+), 7 deletions(-)

New commits:
commit d02310ba14a4c400eef4821c99287c797d376714
Author: Stephan Bergmann 
AuthorDate: Wed Sep 18 17:42:59 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Sep 19 07:35:49 2024 +0200

Remaining GCC -Wcast-function-type issues

As Clang supports that warning now too, lots of occurrences have meanwhile 
been
cleaned up for good (0c29c417ef3f0b749042e5a461abae9c36cf655b "Avoid
-Werror,-Wcast-function-type-mismatch", 
1344e6261a1d856c71eca1e0cc29215a586bf335
"Avoid -Werror,-Wcast-function-type-mismatch",
85a2bb9f52a0d834b02681344ce56e0b091e1abd "Avoid
-Werror,-Wcast-function-type-mismatch", etc.), so
ce99754e9b5b954be4360f39356ed7198b298265 "Globally disable 
-Wcast-function-type
new with upcoming GCC 8" in solenv/gbuild/platform/com_GCC_defs.mk should no
longer be necessary.

One remaining issue I encountered was 
dae7304df68493afcf6e9c9e490d65ea20d8211f
"Silence Clang 19 trunk -Werror,-Wcast-function-type-mismatch", where GCC 
needs
a different way for silencing the warnings in pyuno/source/module/ than had 
been
used there for Clang.

Change-Id: I5d0404b957d798114051209c31e022a898cf91f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173623
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index af35283e6139..56836aed7498 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -1529,6 +1529,10 @@ static PyObject* PyUNO_cmp( PyObject *self, PyObject 
*that, int op )
 return result;
 }
 
+#if defined __GNUC__ && !defined __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
 static PyMethodDef PyUNOMethods[] =
 {
 #if defined __clang__
@@ -1545,6 +1549,9 @@ static PyMethodDef PyUNOMethods[] =
 #endif
 {nullptr, nullptr,0,   
 nullptr}
 };
+#if defined __GNUC__ && !defined __clang__
+#pragma GCC diagnostic pop
+#endif
 
 static PyNumberMethods PyUNONumberMethods[] =
 {
diff --git a/pyuno/source/module/pyuno_module.cxx 
b/pyuno/source/module/pyuno_module.cxx
index 1fc2e8bf00a2..216f4f5a663a 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -907,6 +907,10 @@ static PyObject *sal_debug(
 
 }
 
+#if defined __GNUC__ && !defined __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
 struct PyMethodDef PyUNOModule_methods [] =
 {
 {"private_initTestEnvironment", initTestEnvironment, METH_VARARGS, 
nullptr},
@@ -942,6 +946,9 @@ struct PyMethodDef PyUNOModule_methods [] =
 {"sal_debug", sal_debug, METH_VARARGS, nullptr},
 {nullptr, nullptr, 0, nullptr}
 };
+#if defined __GNUC__ && !defined __clang__
+#pragma GCC diagnostic pop
+#endif
 
 }
 
diff --git a/pyuno/source/module/pyuno_struct.cxx 
b/pyuno/source/module/pyuno_struct.cxx
index 6f4dd47a4b35..e1592eac929d 100644
--- a/pyuno/source/module/pyuno_struct.cxx
+++ b/pyuno/source/module/pyuno_struct.cxx
@@ -281,6 +281,10 @@ static PyObject* PyUNOStruct_cmp( PyObject *self, PyObject 
*that, int op )
 return result;
 }
 
+#if defined __GNUC__ && !defined __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
 static PyMethodDef PyUNOStructMethods[] =
 {
 #if defined __clang__
@@ -297,6 +301,9 @@ static PyMethodDef PyUNOStructMethods[] =
 #endif
 {nullptr, nullptr,  0, 
   nullptr}
 };
+#if defined __GNUC__ && !defined __clang__
+#pragma GCC diagnostic pop
+#endif
 
 static PyTypeObject PyUNOStructType =
 {
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index 29a1942faa7b..528e45630b25 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -146,13 +146,6 @@ gb_CXXFLAGS_COMMON += \
 -Wunused-const-variable=1
 endif
 
-# GCC 8 -Wcast-function-type (included in -Wextra) unhelpfully even warns on 
reinterpret_cast
-# between incompatible function types:
-ifeq ($(shell expr '$(GCC_VERSION)' '>=' 800),1)
-gb_CXXFLAGS_COMMON += \
--Wno-cast-function-type
-endif
-
 # If CC or CXX already include -fvisibility=hidden, don't duplicate it
 ifeq (,$(filter -fvisibility=hidden,$(CC)))
 gb_VISIBILITY_FLAGS := -fvisibility=hidden


core.git: Branch 'distro/allotropia/zeta-24-2' - configure.ac

2024-09-18 Thread Stephan Bergmann (via logerrit)
 configure.ac |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 24a367eccdbe7d71134e874d565a3cd34f0d207c
Author: Stephan Bergmann 
AuthorDate: Wed Sep 18 13:53:08 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 18 22:11:24 2024 +0200

Do not hardcode --with-locales=en for Emscripten build

...which had been done in 7a9e4c4ba8c6b8e068005f3831b989e3c929e8eb "WASM add
strip flags to configure.ac", but without giving a rationale.  For
--enable-assert-always-abort builds, it could have caused the

> assert(pUpperMonthText[0] == "JANUAR");

in ImpSvNumberInputScan::GetMonth (svl/source/numbers/zforfind.cxx) to fire 
when
running in a German-locale browser, because the rule to generate the
DISABLE_DYNLOADING-specific localedata_static.hxx in
i18npool/Library_i18npool.mk then only included English-locale fallback
locale data, so pUpperMonthText[0] was always the English "JANUARY", 
regardless
of locale used.

With with_locales left uninitialized here, the generated 
localedata_static.hxx
now includes the full set of locale data.  Which comes with a small 
increase in
size, though:  For one non-debug build scenario, sofice.data stayed at ca. 
68M
but soffice.wasm grew from ca. 138M to ca. 143M.

Change-Id: I46dae3f5c795ae30fc44d3ac4cb8dd162cd72966
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173619
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 80d4e666dde9954a1f7387e7833e8a52d24e22df)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173632
Tested-by: Stephan Bergmann 

diff --git a/configure.ac b/configure.ac
index e6e69f047c83..b061edda4da1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3153,7 +3153,6 @@ if test "$enable_wasm_strip" = "yes"; then
 with_x=no
 
 test "${with_fonts+set}" = set || with_fonts=yes
-test "${with_locales+set}" = set || with_locales=en
 
 AC_DEFINE(ENABLE_WASM_STRIP_ACCESSIBILITY)
 AC_DEFINE(ENABLE_WASM_STRIP_WRITER)


core.git: configure.ac

2024-09-18 Thread Stephan Bergmann (via logerrit)
 configure.ac |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 80d4e666dde9954a1f7387e7833e8a52d24e22df
Author: Stephan Bergmann 
AuthorDate: Wed Sep 18 13:53:08 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 18 22:10:50 2024 +0200

Do not hardcode --with-locales=en for Emscripten build

...which had been done in 7a9e4c4ba8c6b8e068005f3831b989e3c929e8eb "WASM add
strip flags to configure.ac", but without giving a rationale.  For
--enable-assert-always-abort builds, it could have caused the

> assert(pUpperMonthText[0] == "JANUAR");

in ImpSvNumberInputScan::GetMonth (svl/source/numbers/zforfind.cxx) to fire 
when
running in a German-locale browser, because the rule to generate the
DISABLE_DYNLOADING-specific localedata_static.hxx in
i18npool/Library_i18npool.mk then only included English-locale fallback
locale data, so pUpperMonthText[0] was always the English "JANUARY", 
regardless
of locale used.

With with_locales left uninitialized here, the generated 
localedata_static.hxx
now includes the full set of locale data.  Which comes with a small 
increase in
size, though:  For one non-debug build scenario, sofice.data stayed at ca. 
68M
but soffice.wasm grew from ca. 138M to ca. 143M.

Change-Id: I46dae3f5c795ae30fc44d3ac4cb8dd162cd72966
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173619
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/configure.ac b/configure.ac
index 5597a9d6f198..9d3c459b8559 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3265,7 +3265,6 @@ if test "$enable_wasm_strip" = "yes"; then
 with_x=no
 
 test "${with_fonts+set}" = set || with_fonts=yes
-test "${with_locales+set}" = set || with_locales=en
 
 AC_DEFINE(ENABLE_WASM_STRIP_ACCESSIBILITY)
 AC_DEFINE(ENABLE_WASM_STRIP_WRITER)


core.git: basic/source

2024-09-18 Thread Stephan Bergmann (via logerrit)
 basic/source/sbx/sbxscan.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c54b8e5682373934c826702a965f97f4a7a36193
Author: Stephan Bergmann 
AuthorDate: Wed Sep 18 09:51:44 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 18 20:12:09 2024 +0200

Avoid -Werror,-Wunused-function

Change-Id: I95ca13db07a778fc260cbb78364916cc7400e378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173590
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index bc87c2af158f..dbb45c34b88e 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -535,6 +535,7 @@ void BasicFormatNum(double d, const OUString* pFmt, 
SbxDataType eType, OUString&
 ImpCvtNum(d, eType == SbxSINGLE ? 6 : eType == SbxDOUBLE ? 14 : 0, 
rRes);
 }
 
+#if HAVE_FEATURE_SCRIPTING
 // For numeric types, takes the number directly; otherwise, tries to take 
string and convert it
 bool GetNumberIntl(const SbxValue& val, double& ret)
 {
@@ -558,6 +559,7 @@ bool GetNumberIntl(const SbxValue& val, double& ret)
 return SbxValue::ScanNumIntnl(val.GetOUString(), ret) == 
ERRCODE_NONE;
 }
 }
+#endif
 } // namespace
 
 void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const


core.git: Branch 'distro/allotropia/zeta-24-2' - external/libexttextcat

2024-09-18 Thread Stephan Bergmann (via logerrit)
 external/libexttextcat/ExternalProject_libexttextcat.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f01975a0877170e89bc486eb05e8256bd295c170
Author: Stephan Bergmann 
AuthorDate: Wed Jul 31 09:56:21 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 18 16:11:00 2024 +0200

external/libexttextcat: Only pass gb_DEBUGINFO_FLAGS in debug builds

broken since 797681b4f569212a0f306151167534e23a2e37af "Pass all relevant 
CFLAGS
on to external/libexttextcat"

Change-Id: Idd648c8cd7eaa7e78815dd2071d0a3b786fa6d23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171273
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 374c785daff03f10116781d364f3024aff19d46c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173631
Tested-by: Stephan Bergmann 

diff --git a/external/libexttextcat/ExternalProject_libexttextcat.mk 
b/external/libexttextcat/ExternalProject_libexttextcat.mk
index 479bc9bb3b60..37ed06aded7d 100644
--- a/external/libexttextcat/ExternalProject_libexttextcat.mk
+++ b/external/libexttextcat/ExternalProject_libexttextcat.mk
@@ -20,7 +20,7 @@ $(call 
gb_ExternalProject_get_state_target,libexttextcat,build):
$(if 
$(verbose),--disable-silent-rules,--enable-silent-rules) \
$(if $(ENABLE_WERROR),--enable-werror,--disable-werror) 
\
$(gb_CONFIGURE_PLATFORMS) \
-   CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_DEBUGINFO_FLAGS) 
$(call gb_ExternalProject_get_build_flags,libexttextcat) \
+   CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(if 
$(debug),$(gb_DEBUGINFO_FLAGS)) $(call 
gb_ExternalProject_get_build_flags,libexttextcat) \
$(if $(COM_IS_CLANG),-Qunused-arguments)" \
LDFLAGS="$(call 
gb_ExternalProject_get_link_flags,libexttextcat)" \
&& $(MAKE) \


core.git: Branch 'distro/allotropia/zeta-24-2' - include/osl solenv/bin

2024-09-17 Thread Stephan Bergmann (via logerrit)
 include/osl/detail/component-mapping.h |2 +-
 solenv/bin/native-code.py  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 64f484854be274d621abd42d32c04d773b5dac15
Author: Stephan Bergmann 
AuthorDate: Mon Sep 16 17:52:53 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 17 21:02:29 2024 +0200

Avoid -Werror,-Wcast-function-type-mismatch

...as seen when building LOWA (i.e., --disable-dynloading) with a recent 
Clang
with

<https://github.com/llvm/llvm-project/commit/999d4f840777bf8de26d45947192aa0728edc0fb>
"Split -Wcast-function-type into a separate group (#86131)", where
-Wcast-function-type-mismatch generally warns about casts between 
incompatible
function types...

> cppuhelper/source/shlib.cxx:294:23: error: cast from 'void *(*)(void *, 
void *)' to 'ImplementationConstructorFn *' (aka 'css::uno::XInterface 
*(*)(css::uno::XComponentContext *, const css::uno::Sequence 
&)') converts to incompatible function type 
[-Werror,-Wcast-function-type-mismatch]
>   294 | = 
reinterpret_cast(
>   |   
^~~~
>   295 | map[i].constructor_function);
>   | 

...but not for the special case of casting from/to void(*)(void).

(Using the correct function type

> css::uno::XInterface * (*)(css::uno::XComponentContext *, 
css::uno::Sequence const &)

throughout would be even better, but doesn't easily fit into this C code 
that is
included in low-level places that don't know those UNO types and is shared
between LOWA and Android etc.)

Change-Id: Ic4dbabbff0f772b34cf692db968c3ad257c37cb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173463
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins
(cherry picked from commit 4bbe329ef07bb38c939c6bef53ae4aa9928b9a52)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173496
Tested-by: Stephan Bergmann 

diff --git a/include/osl/detail/component-mapping.h 
b/include/osl/detail/component-mapping.h
index 4d4264180476..64c967019ba0 100644
--- a/include/osl/detail/component-mapping.h
+++ b/include/osl/detail/component-mapping.h
@@ -31,7 +31,7 @@ typedef struct {
 
 typedef struct {
 const char *name;
-void * (*constructor_function)(void *, void *);
+void (*constructor_function)(void);
 } lib_to_constructor_mapping;
 
 const lib_to_factory_mapping *lo_get_factory_map(void);
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 955317ebc0ca..18c907fad0ef 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -879,7 +879,7 @@ for constructor in sorted(full_constructor_map.keys()):
 constructor_guard = get_constructor_guard(constructor)
 if constructor_guard:
 print (constructor_guard)
-print ('void * '+constructor+'( void *, void * );')
+print ('void '+constructor+'( void );')
 if constructor_guard:
 print ('#endif')
 


core.git: include/osl solenv/bin

2024-09-17 Thread Stephan Bergmann (via logerrit)
 include/osl/detail/component-mapping.h |2 +-
 solenv/bin/native-code.py  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4bbe329ef07bb38c939c6bef53ae4aa9928b9a52
Author: Stephan Bergmann 
AuthorDate: Mon Sep 16 17:52:53 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 17 21:01:48 2024 +0200

Avoid -Werror,-Wcast-function-type-mismatch

...as seen when building LOWA (i.e., --disable-dynloading) with a recent 
Clang
with

<https://github.com/llvm/llvm-project/commit/999d4f840777bf8de26d45947192aa0728edc0fb>
"Split -Wcast-function-type into a separate group (#86131)", where
-Wcast-function-type-mismatch generally warns about casts between 
incompatible
function types...

> cppuhelper/source/shlib.cxx:294:23: error: cast from 'void *(*)(void *, 
void *)' to 'ImplementationConstructorFn *' (aka 'css::uno::XInterface 
*(*)(css::uno::XComponentContext *, const css::uno::Sequence 
&)') converts to incompatible function type 
[-Werror,-Wcast-function-type-mismatch]
>   294 | = 
reinterpret_cast(
>   |   
^~~~
>   295 | map[i].constructor_function);
>   | 

...but not for the special case of casting from/to void(*)(void).

(Using the correct function type

> css::uno::XInterface * (*)(css::uno::XComponentContext *, 
css::uno::Sequence const &)

throughout would be even better, but doesn't easily fit into this C code 
that is
included in low-level places that don't know those UNO types and is shared
between LOWA and Android etc.)

Change-Id: Ic4dbabbff0f772b34cf692db968c3ad257c37cb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173463
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/include/osl/detail/component-mapping.h 
b/include/osl/detail/component-mapping.h
index 4d4264180476..64c967019ba0 100644
--- a/include/osl/detail/component-mapping.h
+++ b/include/osl/detail/component-mapping.h
@@ -31,7 +31,7 @@ typedef struct {
 
 typedef struct {
 const char *name;
-void * (*constructor_function)(void *, void *);
+void (*constructor_function)(void);
 } lib_to_constructor_mapping;
 
 const lib_to_factory_mapping *lo_get_factory_map(void);
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index bd84bd68e305..b64606bac16e 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -879,7 +879,7 @@ for constructor in sorted(full_constructor_map.keys()):
 constructor_guard = get_constructor_guard(constructor)
 if constructor_guard:
 print (constructor_guard)
-print ('void * '+constructor+'( void *, void * );')
+print ('void '+constructor+'( void );')
 if constructor_guard:
 print ('#endif')
 


core.git: configure.ac

2024-09-17 Thread Stephan Bergmann (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 45ffeed6674e4f3c5b92f951094d41a0d0ec8002
Author: Stephan Bergmann 
AuthorDate: Mon Sep 16 21:29:40 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 17 21:01:18 2024 +0200

Fix missing quotation

...that appears to be broken ever since 
9892af3cbf85e9793f21683aa16c84354d866ad5
"Modernize wasm debug symbol generation" and to have gone largely 
unnoticed, but
now happened to cause

> ./configure: line 14652: -gpubnames: command not found
> checking whether ccache emcc supports ... configure: error: no

in an odd Emscripten build of mine where I accidentally used a broken emcc 
(so
that autogen.sh started to draw bogus conclusions and get into otherwise
untested code branches)

Change-Id: Idff3a52d61464f00f2c811b207c5a214672b5b42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173480
    Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index 5e4dc02eddb1..5597a9d6f198 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5035,7 +5035,7 @@ if test "$enable_split_debug" != no; then
 fi
 if test -n "$use_split_debug"; then
 if test "$_os" = "Emscripten"; then
-TEST_CC_FLAG=-gsplit-dwarf -gpubnames
+TEST_CC_FLAG='-gsplit-dwarf -gpubnames'
 else
 TEST_CC_FLAG=-gsplit-dwarf
 fi


core.git: Branch 'distro/allotropia/zeta-24-2' - 2 commits - sal/osl sw/source

2024-09-17 Thread Stephan Bergmann (via logerrit)
 sal/osl/unx/signal.cxx  |   43 +++-
 sw/source/core/docnode/node2lay.cxx |4 +--
 2 files changed, 25 insertions(+), 22 deletions(-)

New commits:
commit d4186da423f393f042ae98aeb5747c3fca23224b
Author: Stephan Bergmann 
AuthorDate: Mon Apr 8 07:52:38 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Sep 16 22:42:39 2024 +0200

-Werror,-Wunused-but-set-variable

...ever since the code got introduced in
9dc6e2c9062725ef1f9d7e321cae5f4dbe8ca749 "sw: fix expansion of 
SetGetExpField in
headers with split table rows"

Change-Id: I44e8d375a47286b625ce9a7808484a32dc1f0aa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165879
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit a57ade9be3aa03634933e767eab5e8fb640760ca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173404
Tested-by: Stephan Bergmann 

diff --git a/sw/source/core/docnode/node2lay.cxx 
b/sw/source/core/docnode/node2lay.cxx
index 607ebada8ef4..312ce2dff440 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -146,7 +146,7 @@ SwFrame const* FindNeighbourFrameForNode(SwNode const& 
rNode)
 {
 SwNodeIndex idx(rNode);
 SwFlowFrame const* pFlow(nullptr);
-if (SwNode *const pNode = GoPreviousWithFrame(&idx, &pFlow))
+if (GoPreviousWithFrame(&idx, &pFlow))
 {
 if (::CheckNodesRange(rNode, idx.GetNode(), true))
 {
@@ -158,7 +158,7 @@ SwFrame const* FindNeighbourFrameForNode(SwNode const& 
rNode)
 }
 }
 idx = rNode;
-if (SwNode *const pNode = GoNextWithFrame(idx.GetNodes(), &idx, &pFlow))
+if (GoNextWithFrame(idx.GetNodes(), &idx, &pFlow))
 {
 if (::CheckNodesRange(rNode, idx.GetNode(), true))
 {
commit 8f3437b1c0db184d7b6c5180aaa832beea2cd0ea
Author: Stephan Bergmann 
AuthorDate: Sun Mar 24 18:17:28 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Sep 16 22:42:19 2024 +0200

Avoid -Werror,-Wcast-function-type-mismatch

Change-Id: I93a69c57856169aeff613e34d5c0bf7fa08a0de7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165251
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 85a2bb9f52a0d834b02681344ce56e0b091e1abd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173403
Tested-by: Stephan Bergmann 

diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 50c260f9d592..2e49918c71a6 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -49,14 +49,17 @@
 
 namespace
 {
-extern "C" using Handler1 = void (*)(int);
-extern "C" using Handler2 = void (*)(int, siginfo_t *, void *);
+extern "C" using Handler1_t = void (*)(int);
+extern "C" using Handler2_t = void (*)(int, siginfo_t *, void *);
 struct SignalAction
 {
 int Signal;
 int Action;
-Handler1 Handler;
-bool siginfo; // Handler's type is Handler2
+union {
+Handler1_t Handler1;
+Handler2_t Handler2;
+};
+bool siginfo; // Handler2 is active
 } Signals[] =
 {
 { SIGHUP,ACT_HIDE,   SIG_DFL, false }, /* hangup */
@@ -204,13 +207,13 @@ bool onInitSignal()
 if (sigaction(rSignal.Signal, &ign, &oact) == 0) {
 rSignal.siginfo = (oact.sa_flags & SA_SIGINFO) != 0;
 if (rSignal.siginfo) {
-rSignal.Handler = reinterpret_cast(
-oact.sa_sigaction);
+rSignal.Handler2 =
+oact.sa_sigaction;
 } else {
-rSignal.Handler = oact.sa_handler;
+rSignal.Handler1 = oact.sa_handler;
 }
 } else {
-rSignal.Handler = SIG_DFL;
+rSignal.Handler1 = SIG_DFL;
 rSignal.siginfo = false;
 }
 }
@@ -220,13 +223,13 @@ bool onInitSignal()
 if (sigaction(rSignal.Signal, &act, &oact) == 0) {
 rSignal.siginfo = (oact.sa_flags & SA_SIGINFO) != 0;
 if (rSignal.siginfo) {
-rSignal.Handler = reinterpret_cast(
-oact.sa_sigaction);
+rSignal.Handler2 =
+oact.sa_sigaction;
 } else {
-rSignal.Handler = oact.sa_handler;
+rSignal.Handler1 = oact.sa_handler;
 }
 } else {
-rSignal.Handler = SIG_DFL;
+rSignal.Handler1 = SIG_DFL;
  

core.git: Branch 'distro/allotropia/zeta-24-2' - 210 commits - android/CustomTarget_lo_android.mk bin/find-unneeded-includes bridges/CustomTarget_gcc3_linux_arm.mk bridges/CustomTarget_gcc3_wasm.mk br

2024-09-13 Thread Stephan Bergmann (via logerrit)
 
   |2 
 winaccessibility/CustomTarget_ia2_idl.mk   
   |2 
 wizards/CustomTarget_share.mk  
   |8 
 wizards/CustomTarget_wizards.mk
   |2 
 wizards/Package_share.mk   
   |2 
 wizards/Package_wizards_properties.mk  
   |2 
 writerfilter/CustomTarget_source.mk
   |4 
 writerperfect/CppunitTest_writerperfect_epubexport.mk  
   |2 
 xmloff/CustomTarget_generated.mk   
   |4 
 xmlsecurity/source/xmlsec/xmlsec_init.cxx  
   |1 
 309 files changed, 9635 insertions(+), 2385 deletions(-)

New commits:
commit 80a44ed45822a716fd4e7906ca232052531af918
Author: Stephan Bergmann 
AuthorDate: Tue Sep 10 12:49:49 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 13 11:11:42 2024 +0200

Demonstrate that Embind is not multi-threading capable

Enabling the line commented out with "TODO" in embindtest.js would fail with
something like

> Aborted(Assertion failed: invalid handle: 8)
> worker.js onmessage() captured an uncaught exception: RuntimeError: 
unreachable
> RuntimeError: unreachable
> at soffice.wasm.__trap 
(http://localhost:6931/soffice.wasm:wasm-function[446445]:0x8f952b3)
> at ___trap 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:16657:54)
> at abort 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:1091:5)
> at assert 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:731:5)
> at HandleAllocator.get 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:7212:11)
> at Object.toValue 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:7270:30)
> at __emval_call_void_method 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:10183:22)
> at 
soffice.wasm.the_wrappers::com::sun::star::task::XJobExecutor::trigger(rtl::OUString
 const&) (http://localhost:6931/soffice.wasm:wasm-function[77042]:0xafbb24)
> at soffice.wasm.(anonymous namespace)::JobExecutorThread::execute() 
(http://localhost:6931/soffice.wasm:wasm-function[243534]:0x43250b5)
> at soffice.wasm.non-virtual thunk to salhelper::Thread::run() 
(http://localhost:6931/soffice.wasm:wasm-function[87641]:0xdff5cf)

(cherry-picked from b418f3d8d332276e6990cf7532a8f66aeb1d2f6c)

Change-Id: I4e35dc19c5c0f97de7158bf9c07fd3171684
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173132
    Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/org/libreoffice/embindtest/XTest.idl 
b/offapi/org/libreoffice/embindtest/XTest.idl
index 276ce260a8e1..e579a606202a 100644
--- a/offapi/org/libreoffice/embindtest/XTest.idl
+++ b/offapi/org/libreoffice/embindtest/XTest.idl
@@ -129,7 +129,7 @@ interface XTest {
 [out] XTest value18);
 void throwRuntimeException();
 void passJob([in] com::sun::star::task::XJob object);
-void passJobExecutor([in] com::sun::star::task::XJobExecutor object);
+void passJobExecutor([in] com::sun::star::task::XJobExecutor object, [in] 
boolean newThread);
 void passInterface([in] com::sun::star::uno::XInterface object);
 boolean checkAttributes([in] org::libreoffice::embindtest::XAttributes 
object);
 [attribute] string StringAttribute;
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 60150dcd2ad9..4a335f6f6be3 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -67,6 +67,21 @@ private:
 }
 };
 
+class JobExecutorThread : public salhelper::Thread
+{
+public:
+JobExecutorThread(css::uno::Reference const& 
object)
+: Thread("jobexecutor")
+, object_(object)
+{
+}
+
+private:
+void execute() override { object_->trigger(u"executor thread"_ustr); }
+
+css::uno::Reference object_;
+};
+
 class Test : public cppu::WeakImplHelper
 {
 sal_Bool SAL_CALL getBoolean() override { return true; }
@@ -861,10 +876,19 @@ class Test : public 
cppu::WeakImplHelper
 }
 }
 
-void SAL_CALL
-passJobExecutor(css::uno::Reference const& 
object) override
+void SAL_CALL passJobExecutor(css::uno::Reference 
const& object,
+  sal_Bool newThread) override
 {
-object->trigger(u"executor"_ustr);
+if (newThread)
+{
+

core.git: include/vcl

2024-09-13 Thread Stephan Bergmann (via logerrit)
 include/vcl/dndhelp.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e5ef04874a73d87bc66578b73b44ca3e3a0e76ee
Author: Stephan Bergmann 
AuthorDate: Fri Sep 13 08:35:02 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 13 11:03:46 2024 +0200

UBSan CppunitTest_editeng_borderline etc. need more RTTI now

...presumably since 5ba893dfb8838b0ef946b52de9ef1336d2ab0512 "use more 
concrete
UNO type in editeng",

> DynamicLibraryManagerException: "Failed to load dynamic library: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/LinkTarget/CppunitTest/libtest_editeng_borderline.so
> 
/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libeditenglo.so: 
undefined symbol: _ZTIN3vcl9unohelper18DragAndDropWrapperE"

(<https://ci.libreoffice.org/job/lo_ubsan/3306/>)

Change-Id: I4501c3df9f353d9b1244f92b5bbc6fb2dafc24bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173311
Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann 

diff --git a/include/vcl/dndhelp.hxx b/include/vcl/dndhelp.hxx
index 0d1af70d69e8..bb0f75aef853 100644
--- a/include/vcl/dndhelp.hxx
+++ b/include/vcl/dndhelp.hxx
@@ -64,7 +64,7 @@ public:
 SAL_DLLPRIVATE virtual void dragOver( const 
css::datatransfer::dnd::DropTargetDragEvent& dtde );
 };
 
-class DragAndDropWrapper final :
+class SAL_DLLPUBLIC_RTTI DragAndDropWrapper final :
 public 
css::datatransfer::dnd::XDragGestureListener,
 public css::datatransfer::dnd::XDragSourceListener,
 public css::datatransfer::dnd::XDropTargetListener,


core.git: connectivity/source vcl/source

2024-09-11 Thread Stephan Bergmann (via logerrit)
 connectivity/source/manager/mdrivermanager.cxx |4 ++--
 vcl/source/window/layout.cxx   |   12 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 294b4cc5458b9e20da98d12405a5942ae1551aee
Author: Stephan Bergmann 
AuthorDate: Wed Sep 11 20:22:25 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Sep 12 08:03:43 2024 +0200

These bogus -Wdangling-reference still hit with current GCC 15 trunk

Change-Id: Ice2be2156474cf486ad1c461d65e2711ebf43d2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173232
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/connectivity/source/manager/mdrivermanager.cxx 
b/connectivity/source/manager/mdrivermanager.cxx
index 61b5b528f624..3d9754867bf7 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -565,12 +565,12 @@ Reference< XDriver > 
OSDBCDriverManager::implGetDriverForURL(const OUString& _rU
 m_aDriversBS.end(), // end of search range
 [&_rURL, this] (const DriverAccessArray::value_type& 
driverAccess) {
 // extract the driver from the access, then ask the 
resulting driver for acceptance
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdangling-reference"
 #endif
 const DriverAccess& ensuredAccess = 
EnsureDriver(m_xContext)(driverAccess);
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15
 #pragma GCC diagnostic pop
 #endif
 const Reference driver = 
ExtractDriverFromAccess()(ensuredAccess);
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index d9ce06bc1ae0..988b470ca31f 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -964,12 +964,12 @@ static array_type assembleGrid(const VclGrid &rGrid)
 {
 for (sal_Int32 y = 0; y < nMaxY; ++y)
 {
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdangling-reference"
 #endif
 const GridEntry &rEntry = A[x][y];
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15
 #pragma GCC diagnostic pop
 #endif
 const vcl::Window *pChild = rEntry.pChild;
@@ -1101,7 +1101,7 @@ static void calcMaxs(const array_type &A, 
std::vector &rWidths,
 {
 for (sal_Int32 y = 0; y < nMaxY; ++y)
 {
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdangling-reference"
 #elif defined _MSC_VER
@@ -1109,7 +1109,7 @@ static void calcMaxs(const array_type &A, 
std::vector &rWidths,
 #pragma warning(disable : 4459)
 #endif
 const GridEntry &rEntry = A[x][y];
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15
 #pragma GCC diagnostic pop
 #elif defined _MSC_VER
 #pragma warning(pop)
@@ -1144,12 +1144,12 @@ static void calcMaxs(const array_type &A, 
std::vector &rWidths,
 {
 for (sal_Int32 y = 0; y < nMaxY; ++y)
 {
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdangling-reference"
 #endif
 const GridEntry &rEntry = A[x][y];
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15
 #pragma GCC diagnostic pop
 #endif
 const vcl::Window *pChild = rEntry.pChild;


core.git: offapi/org unotest/source

2024-09-10 Thread Stephan Bergmann (via logerrit)
 offapi/org/libreoffice/embindtest/XTest.idl |2 -
 unotest/source/embindtest/embindtest.cxx|   30 +---
 unotest/source/embindtest/embindtest.js |3 +-
 3 files changed, 30 insertions(+), 5 deletions(-)

New commits:
commit b418f3d8d332276e6990cf7532a8f66aeb1d2f6c
Author: Stephan Bergmann 
AuthorDate: Tue Sep 10 12:49:49 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 10 19:52:15 2024 +0200

Demonstrate that Embind is not multi-threading capable

Enabling the line commented out with "TODO" in embindtest.js would fail with
something like

> Aborted(Assertion failed: invalid handle: 8)
> worker.js onmessage() captured an uncaught exception: RuntimeError: 
unreachable
> RuntimeError: unreachable
> at soffice.wasm.__trap 
(http://localhost:6931/soffice.wasm:wasm-function[446445]:0x8f952b3)
> at ___trap 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:16657:54)
> at abort 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:1091:5)
> at assert 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:731:5)
> at HandleAllocator.get 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:7212:11)
> at Object.toValue 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:7270:30)
> at __emval_call_void_method 
(blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:10183:22)
> at 
soffice.wasm.the_wrappers::com::sun::star::task::XJobExecutor::trigger(rtl::OUString
 const&) (http://localhost:6931/soffice.wasm:wasm-function[77042]:0xafbb24)
> at soffice.wasm.(anonymous namespace)::JobExecutorThread::execute() 
(http://localhost:6931/soffice.wasm:wasm-function[243534]:0x43250b5)
> at soffice.wasm.non-virtual thunk to salhelper::Thread::run() 
(http://localhost:6931/soffice.wasm:wasm-function[87641]:0xdff5cf)

Change-Id: I4e35dc19c5c0f97de7158bf9c07fd3171684
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173132
    Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/org/libreoffice/embindtest/XTest.idl 
b/offapi/org/libreoffice/embindtest/XTest.idl
index 276ce260a8e1..e579a606202a 100644
--- a/offapi/org/libreoffice/embindtest/XTest.idl
+++ b/offapi/org/libreoffice/embindtest/XTest.idl
@@ -129,7 +129,7 @@ interface XTest {
 [out] XTest value18);
 void throwRuntimeException();
 void passJob([in] com::sun::star::task::XJob object);
-void passJobExecutor([in] com::sun::star::task::XJobExecutor object);
+void passJobExecutor([in] com::sun::star::task::XJobExecutor object, [in] 
boolean newThread);
 void passInterface([in] com::sun::star::uno::XInterface object);
 boolean checkAttributes([in] org::libreoffice::embindtest::XAttributes 
object);
 [attribute] string StringAttribute;
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 60150dcd2ad9..4a335f6f6be3 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -67,6 +67,21 @@ private:
 }
 };
 
+class JobExecutorThread : public salhelper::Thread
+{
+public:
+JobExecutorThread(css::uno::Reference const& 
object)
+: Thread("jobexecutor")
+, object_(object)
+{
+}
+
+private:
+void execute() override { object_->trigger(u"executor thread"_ustr); }
+
+css::uno::Reference object_;
+};
+
 class Test : public cppu::WeakImplHelper
 {
 sal_Bool SAL_CALL getBoolean() override { return true; }
@@ -861,10 +876,19 @@ class Test : public 
cppu::WeakImplHelper
 }
 }
 
-void SAL_CALL
-passJobExecutor(css::uno::Reference const& 
object) override
+void SAL_CALL passJobExecutor(css::uno::Reference 
const& object,
+  sal_Bool newThread) override
 {
-object->trigger(u"executor"_ustr);
+if (newThread)
+{
+JobExecutorThread t(object);
+t.launch();
+t.join();
+}
+else
+{
+object->trigger(u"executor"_ustr);
+}
 }
 
 void SAL_CALL passInterface(css::uno::Reference 
const& object) override
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 9551a9a56bca..082150ff6605 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -878,7 +878,8 @@ Module.uno_init.then(function() {
 s.delete();
 }
 test.passJob(css.task.XJob.query(obj));
-test.passJobExecutor(css.task.XJobExecutor.query(obj));
+test.passJobExecutor(css.task.XJobExecutor.query(obj), false);
+//TODO: test.passJobExecutor(css.task.XJobExecutor.query(obj), true);
 test.passInterface(obj);
 css.task.XJobExecutor.query(obj).trigger('from JS');
 {


core.git: svx/source

2024-09-10 Thread Stephan Bergmann (via logerrit)
 svx/source/fmcomp/gridctrl.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit b472e1cedddf083d6b04d233cdefe686c8aa07ae
Author: Stephan Bergmann 
AuthorDate: Tue Sep 10 13:04:00 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 10 18:24:11 2024 +0200

-Werror,-Wunused-private-field

...since f9ff22db058180d161b32f5dcd87e72cfa3b6889 
"tsan:lock-order-inversion in
forms"

Change-Id: I6a31c661a6604e7c701e49b147d5372bef50dc3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173133
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index b891f2081a04..e716d9eeb0ab 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -123,7 +123,6 @@ private:
 
 class GridFieldValueListener : protected ::comphelper::OPropertyChangeListener
 {
-osl::Mutex  m_aMutex;
 DbGridControl&  m_rParent;
 rtl::Reference<::comphelper::OPropertyChangeMultiplexer> m_pRealListener;
 sal_uInt16  m_nId;
@@ -240,8 +239,6 @@ class FmXGridSourcePropListener : public 
::comphelper::OPropertyChangeListener
 {
 VclPtr m_pParent;
 
-// a DbGridControl has no mutex, so we use our own as the base class 
expects one
-osl::Mutex  m_aMutex;
 sal_Int16   m_nSuspended;
 
 public:


core.git: sw/source

2024-09-10 Thread Stephan Bergmann (via logerrit)
 sw/source/core/doc/docfld.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e663655d04b6f2d65722a83475bf4d997b4a4078
Author: Stephan Bergmann 
AuthorDate: Tue Sep 10 08:33:56 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 10 14:42:32 2024 +0200

Fix certain build configurations

...after 8849c1d9cc7fbf990b1e1633b59a09c818dabc72 "dont use 
GetItemSurrogates
for gathering SwFormatField",

> 
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_wasm/sw/source/core/doc/docfld.cxx:941:37:
 error: use of undeclared identifier 'bIsDBManager'
>   941 | [this, eGetMode, &rDoc, bIsDBManager] (const 
SwFormatField& rFormatField) -> bool
>   | ^

(<https://ci.libreoffice.org/job/lo_daily_tb_linux_wasm/825/>)

Change-Id: Ic6335797f68f082971e46535479ee8a9c44d6bc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173119
    Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 45fda23a806a..eb4737575a71 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -938,7 +938,11 @@ void SwDocUpdateField::MakeFieldList_( SwDoc& rDoc, int 
eGetMode )
 for (const TypedWhichId & nWhichHint : { RES_TXTATR_FIELD, 
RES_TXTATR_INPUTFIELD })
 {
 rDoc.ForEachFormatField(nWhichHint,
-[this, eGetMode, &rDoc, bIsDBManager] (const SwFormatField& 
rFormatField) -> bool
+[this, eGetMode, &rDoc
+#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
+  , bIsDBManager
+#endif
+] (const SwFormatField& rFormatField) -> bool
 {
 const SwTextField* pTextField = rFormatField.GetTextField();
 


core.git: Branch 'feature/cib_contract49c' - configure.ac

2024-09-10 Thread Stephan Bergmann (via logerrit)
 configure.ac |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 5d2297f35201a14543b6fe551cb8a238d6742f23
Author: Stephan Bergmann 
AuthorDate: Tue Apr 9 10:37:09 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 10 13:34:37 2024 +0200

Avoid -O2 in AC_PROG_CC/CXX, work around occasional Clang 12.0.1 SEGVs

At least with one ASan/UBSan setup of mine using LODE's Clang 12.0.1,
./autogen.sh would occasionally detect -std=gnu11 as the required CC 
"option to
enable C11 features" (which would in turn cause building external/firebird 
to
fail oddly; an issue worth investigations of its own), because Clang would
occasionally crash with a SEGV on the corresponding configure test program's
first invocation (without -std=gnu11) when invoked with -O2 (and happen to
succeed on second invocation with -std=gnu11, so configure thinks that's
needed), see below for a relevant config.log excerpt.

When CC/CXX are already set (as is the case in this scenario), we could 
arguably
skip the AC_PROG_CC/CXX checks entirely (and thus avoid configure 
potentially
adding -std=gnu11 to CC), but at least AC_PROG_CC also internally sets the 
GCC
shell var, which we use in configure.ac.  So better be conservative and just
avoid -O2 during AC_PROG_CC/CXX (whatever the autoconf motivation to 
include it
in the first place).

> configure:8165: checking for 
/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang 
-fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero 
-fsanitize=local-bounds 
-fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist option to 
enable C11 features
> configure:8180: 
/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang 
-fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero 
-fsanitize=local-bounds 
-fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist  -c -g -O2 
 conftest.c >&5
> PLEASE submit a bug report to https://bugs.llvm.org/ and include the 
crash backtrace, preprocessed source, and associated run script.
> Stack dump:
> 0.Program arguments: 
/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang 
-fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero 
-fsanitize=local-bounds 
-fsanitize-blacklist=/home/sberg/lo0/core/sanitize-ubsan-excludelist -c -g -O2 
conftest.c
> 1. parser at end of file
> 2.Code generation
>  #0 0x55f3a890caf2 llvm::sys::PrintStackTrace(llvm::raw_ostream&, 
int) (/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3eaf2)
>  #1 0x55f3a890a734 llvm::sys::RunSignalHandlers() 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1c3c734)
>  #2 0x55f3a887b998 CrashRecoverySignalHandler(int) 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1bad998)
>  #3 0x7f750d24e520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
>  #4 0x55f3a93f9cd4 llvm::DIE::getUnitDie() const 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x272bcd4)
>  #5 0x55f3a9404574 llvm::DwarfDebug::finishEntityDefinitions() 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2736574)
>  #6 0x55f3a941df99 llvm::DwarfDebug::finalizeModuleInfo() 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x274ff99)
>  #7 0x55f3a9421128 llvm::DwarfDebug::endModule() 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2753128)
>  #8 0x55f3a93f1219 llvm::AsmPrinter::doFinalization(llvm::Module&) 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2723219)
>  #9 0x55f3a82478f5 llvm::FPPassManager::doFinalization(llvm::Module&) 
(.localalias) 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x15798f5)
> #10 0x55f3a8253900 llvm::legacy::PassManagerImpl::run(llvm::Module&) 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1585900)
> #11 0x55f3a8bb57d3 (anonymous 
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, 
std::unique_ptr >) (.constprop.0) 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee77d3)
> #12 0x55f3a8bb76ea 
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions 
const&, clang::CodeGenOptions const&, clang::TargetOptions const&, 
clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, 
clang::BackendAction, std::unique_ptr >) 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x1ee96ea)
> #13 0x55f3a9825876 
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x2b57876)
> #14 0x55f3aa35c549 cla

core.git: Branch 'libreoffice-24-8-1' - bridges/source

2024-09-05 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 79ca1a3c7697a85ea272faad3861792f97da2b5e
Author: Stephan Bergmann 
AuthorDate: Tue Sep 3 11:19:53 2024 +0200
Commit: Xisco Fauli 
CommitDate: Thu Sep 5 15:37:34 2024 +0200

tdf#160945: queryInterface must pass back indirect return value address in 
x0

Change-Id: I28dacffbbcdf26ee453fd32aeb82166484612846
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172791
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit f610a602c94925f2cae7765bae4a53816dd46aa5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172764
Reviewed-by: Ilmari Lauhakangas 
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 
Reviewed-by: Michael Stahl 

diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx 
b/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
index 9a79ce543940..f864e193c729 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
@@ -278,6 +278,7 @@ extern "C" void vtableCall(sal_Int32 functionIndex, 
sal_Int32 vtableOffset, sal_
   
reinterpret_cast(uno::cpp_acquire));
 ifc->release();
 TYPELIB_DANGER_RELEASE(td);
+gpr[0] = reinterpret_cast(indirectRet);
 break;
 }
 TYPELIB_DANGER_RELEASE(td);


core.git: Branch 'libreoffice-24-8' - bridges/source

2024-09-04 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0c8443c69a8e8c3c6da24748050d238ba3227b17
Author: Stephan Bergmann 
AuthorDate: Tue Sep 3 11:19:53 2024 +0200
Commit: Michael Stahl 
CommitDate: Wed Sep 4 10:52:02 2024 +0200

tdf#160945: queryInterface must pass back indirect return value address in 
x0

Change-Id: I28dacffbbcdf26ee453fd32aeb82166484612846
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172791
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit f610a602c94925f2cae7765bae4a53816dd46aa5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172763
Reviewed-by: Michael Stahl 

diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx 
b/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
index 9a79ce543940..f864e193c729 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
@@ -278,6 +278,7 @@ extern "C" void vtableCall(sal_Int32 functionIndex, 
sal_Int32 vtableOffset, sal_
   
reinterpret_cast(uno::cpp_acquire));
 ifc->release();
 TYPELIB_DANGER_RELEASE(td);
+gpr[0] = reinterpret_cast(indirectRet);
 break;
 }
 TYPELIB_DANGER_RELEASE(td);


core.git: solenv/gbuild

2024-09-03 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 7d3251adf2e95768c9169b92c8b3366c95f71bfa
Author: Stephan Bergmann 
AuthorDate: Tue Sep 3 15:24:50 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 3 21:04:51 2024 +0200

Emscripten: Move -sEXPORT_EXCEPTION_HANDLING_HELPERS to 
gb_LinkTarget_LDFLAGS

...following up on 95e719730dc62cee3edc959bd9d96edfb992a642 "Emscripten:
Explicitly set -sEXPORT_EXCEPTION_HANDLING_HELPERS".  For one, it should 
indeed
only be relevant for linking.  For another, the previous change had caused 
at
least ExternalProject_libtiff to fail with "checking whether the C compiler
works... no" because of "emcc: error: EXPORT_EXCEPTION_HANDLING_HELPERS 
requires
either of -fexceptions or -fwasm-exceptions".

Change-Id: I477731c1cffd2b6ee895116043eda91fca44d08f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172825
Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann 

diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 313b7280a0fe..37d23aabcfe9 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -23,7 +23,7 @@ gb_EMSCRIPTEN_LDFLAGS += -sSTACK_SIZE=131072 
-sDEFAULT_PTHREAD_STACK_SIZE=65536
 # To keep the link time (and memory) down, prevent all rewriting options from 
wasm-emscripten-finalize
 # See emscripten.py, finalize_wasm, modify_wasm = True
 # So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s 
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s 
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","ccall","cwrap","addOnPreMain","addOnPostRun","registerType","throwBindingError"$(if
 $(ENABLE_QT6),$(COMMA)"callMain"$(COMMA)"specialHTMLTargets")] 
-sEXPORT_EXCEPTION_HANDLING_HELPERS
+gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s 
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s 
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","ccall","cwrap","addOnPreMain","addOnPostRun","registerType","throwBindingError"$(if
 $(ENABLE_QT6),$(COMMA)"callMain"$(COMMA)"specialHTMLTargets")]
 gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS 
-DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
 
 ifeq ($(ENABLE_EMSCRIPTEN_PROXY_POSIX_SOCKETS),TRUE)
@@ -45,7 +45,8 @@ ifeq ($(ENABLE_QT5),TRUE)
 gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_QTDEFS)
 gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_QTDEFS)
 endif
-gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) 
$(gb_EMSCRIPTEN_EXCEPT)
+gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) \
+$(gb_EMSCRIPTEN_EXCEPT) -sEXPORT_EXCEPTION_HANDLING_HELPERS
 
 # Linker and compiler optimize + debug flags are handled in LinkTarget.mk
 gb_LINKEROPTFLAGS :=


core.git: bridges/source

2024-09-03 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f610a602c94925f2cae7765bae4a53816dd46aa5
Author: Stephan Bergmann 
AuthorDate: Tue Sep 3 11:19:53 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 3 14:21:55 2024 +0200

tdf#160945: queryInterface must pass back indirect return value address in 
x0

Change-Id: I28dacffbbcdf26ee453fd32aeb82166484612846
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172791
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx 
b/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
index 9a79ce543940..f864e193c729 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
@@ -278,6 +278,7 @@ extern "C" void vtableCall(sal_Int32 functionIndex, 
sal_Int32 vtableOffset, sal_
   
reinterpret_cast(uno::cpp_acquire));
 ifc->release();
 TYPELIB_DANGER_RELEASE(td);
+gpr[0] = reinterpret_cast(indirectRet);
 break;
 }
 TYPELIB_DANGER_RELEASE(td);


core.git: desktop/source

2024-09-03 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/appinit.cxx |   17 +
 1 file changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 24a3a7c72714c4f45c46cd2b6274013503d444d6
Author: Stephan Bergmann 
AuthorDate: Tue Sep 3 09:38:58 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 3 13:47:21 2024 +0200

Emscripten: workerID is only defined under -sASSERTIONS

...and explicitly passing in pthread_self() on the calling side is better 
than
trying to identify the calling thread on the callee side, anyway

Change-Id: Ib26a7cbdede246280b6985b6eb1582baf172bf59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172786
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 3a8bce551d6a..16f023b0a414 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -93,20 +93,13 @@ EM_JS(void, setupMainChannel, (), {
 };
 });
 
-extern "C" void resolveUnoMain() {
-EM_ASM(
-let sofficeMain;
-for (const i in PThread.pthreads) {
-const worker = PThread.pthreads[i];
-if (worker.workerID === 1) {
-sofficeMain = worker;
-break;
-}
-}
+extern "C" void resolveUnoMain(pthread_t id) {
+EM_ASM({
+const sofficeMain = PThread.pthreads[$0];
 const channel = new MessageChannel();
 sofficeMain.postMessage({cmd:"LOWA-channel"}, [channel.port2]);
 Module.uno_main$resolve(channel.port1);
-);
+}, id);
 }
 
 void initUno() {
@@ -120,7 +113,7 @@ void initUno() {
 runUnoScriptUrl(url.getStr());
 }
 setupMainChannel();
-emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_V, resolveUnoMain);
+emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_VI, 
resolveUnoMain, pthread_self());
 }
 
 }


core.git: solenv/gbuild

2024-09-03 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 95e719730dc62cee3edc959bd9d96edfb992a642
Author: Stephan Bergmann 
AuthorDate: Tue Sep 3 09:52:12 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 3 12:07:54 2024 +0200

Emscripten: Explicitly set -sEXPORT_EXCEPTION_HANDLING_HELPERS

...so that getCppExceptionTag and
getCppExceptionThrownObjectFromWebAssemblyException are available in
static/emscripten/uno.js.  Those apparently happen to already be available 
due
to -sASSERTIONS=1, but better make that explicit (e.g., when we ever want 
to do
-sASSERTIONS=0 builds).

Change-Id: I3d94580930603eaf0f609d7878f97d12fb026714
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172788
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 416cdbc4c1a4..313b7280a0fe 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -23,7 +23,7 @@ gb_EMSCRIPTEN_LDFLAGS += -sSTACK_SIZE=131072 
-sDEFAULT_PTHREAD_STACK_SIZE=65536
 # To keep the link time (and memory) down, prevent all rewriting options from 
wasm-emscripten-finalize
 # See emscripten.py, finalize_wasm, modify_wasm = True
 # So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s 
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s 
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","ccall","cwrap","addOnPreMain","addOnPostRun","registerType","throwBindingError"$(if
 $(ENABLE_QT6),$(COMMA)"callMain"$(COMMA)"specialHTMLTargets")]
+gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s 
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s 
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","ccall","cwrap","addOnPreMain","addOnPostRun","registerType","throwBindingError"$(if
 $(ENABLE_QT6),$(COMMA)"callMain"$(COMMA)"specialHTMLTargets")] 
-sEXPORT_EXCEPTION_HANDLING_HELPERS
 gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS 
-DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
 
 ifeq ($(ENABLE_EMSCRIPTEN_PROXY_POSIX_SOCKETS),TRUE)


core.git: static/emscripten

2024-09-02 Thread Stephan Bergmann (via logerrit)
 static/emscripten/uno.js |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 32ce555c9daff2d4044c041e220fde44cf4aff67
Author: Stephan Bergmann 
AuthorDate: Mon Sep 2 08:48:21 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Sep 2 10:57:36 2024 +0200

Explicitly .delete() one more interface object in uno.js

...accidentally left over from 91842724235bca73690d67d8084ec7581512d791
"Explicitly .delete() type and interface objects in uno.js"

Change-Id: I84b1b7b5ee283a1a87f5d3aa894776b1bf23c607
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172731
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/static/emscripten/uno.js b/static/emscripten/uno.js
index 6591a7441220..714dbf20dc3a 100644
--- a/static/emscripten/uno.js
+++ b/static/emscripten/uno.js
@@ -40,10 +40,13 @@ Module.unoObject = function(interfaces, obj) {
 obj.queryInterface = function(type) {
 for (const i in obj.impl_typemap) {
 if (i === type.toString()) {
-return new Module.uno_Any(
-type,
-Module['uno_Type_' + i.replace(/\./g, '$')].reference(
-obj.impl_interfaces[obj.impl_typemap[i]]));
+const ifc = Module['uno_Type_' + i.replace(/\./g, 
'$')].reference(
+obj.impl_interfaces[obj.impl_typemap[i]]);
+try {
+return new Module.uno_Any(type, ifc);
+} finally {
+ifc.delete();
+}
 }
 }
 const ty = Module.uno_Type.Void();


core.git: static/emscripten

2024-08-30 Thread Stephan Bergmann (via logerrit)
 static/emscripten/uno.js |   30 ++
 1 file changed, 22 insertions(+), 8 deletions(-)

New commits:
commit 91842724235bca73690d67d8084ec7581512d791
Author: Stephan Bergmann 
AuthorDate: Fri Aug 30 16:19:10 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sat Aug 31 08:29:23 2024 +0200

Explicitly .delete() type and interface objects in uno.js

These objects use smart proxies, so Embind adds them to a JS finalizer (in 
JS
runtimes where FinalizationRegistry is available), so it shouldn't be 
necessary
to manually .delete() them, but Embind then emits "Embind found a leaked C++
instance..." warnings about them, which clutter the JS console.

While it is probably impractical for client code to manually .delete() all 
such
instances, we can at least explicitly .delete() those that occur in uno.js
itself.

Change-Id: Ia21ca5f0bdb246cc5ea272599befd9a16bc970a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172661
Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann 

diff --git a/static/emscripten/uno.js b/static/emscripten/uno.js
index fb634cc63c9d..6591a7441220 100644
--- a/static/emscripten/uno.js
+++ b/static/emscripten/uno.js
@@ -46,7 +46,10 @@ Module.unoObject = function(interfaces, obj) {
 obj.impl_interfaces[obj.impl_typemap[i]]));
 }
 }
-return new Module.uno_Any(Module.uno_Type.Void(), undefined);
+const ty = Module.uno_Type.Void();
+const ret = new Module.uno_Any(ty, undefined);
+ty.delete();
+return ret;
 };
 obj.acquire = function() { ++obj.impl_refcount; };
 obj.release = function() {
@@ -59,7 +62,9 @@ Module.unoObject = function(interfaces, obj) {
 obj.getTypes = function() {
 const types = new Module.uno_Sequence_type(interfaces.length, 
Module.uno_Sequence.FromSize);
 for (let i = 0; i !== interfaces.length; ++i) {
-types.set(i, Module.uno_Type.Interface(interfaces[i]));
+const type = Module.uno_Type.Interface(interfaces[i]);
+types.set(i, type);
+type.delete();
 }
 return types;
 };
@@ -76,23 +81,32 @@ Module.unoObject = function(interfaces, obj) {
 throw new Error('not a UNO interface type: ' + name);
 }
 obj.impl_typemap[name] = impl;
-const bases = 
Module.uno.com.sun.star.reflection.XInterfaceTypeDescription2.query(td)
-  .getBaseTypes();
+const itd = 
Module.uno.com.sun.star.reflection.XInterfaceTypeDescription2.query(td);
+const bases = itd.getBaseTypes();
+itd.delete();
 for (let i = 0; i !== bases.size(); ++i) {
 walk(bases.get(i), impl);
 }
 bases.delete();
 }
+td.delete();
 };
-const tdmAny = Module.getUnoComponentContext().getValueByName(
+const ctx = Module.getUnoComponentContext();
+const tdmAny = ctx.getValueByName(
 '/singletons/com.sun.star.reflection.theTypeDescriptionManager');
-const tdm = 
Module.uno.com.sun.star.container.XHierarchicalNameAccess.query(tdmAny.get());
+ctx.delete();
+const ifc = tdmAny.get();
+tdmAny.delete();
+const tdm = 
Module.uno.com.sun.star.container.XHierarchicalNameAccess.query(ifc);
+ifc.delete();
 interfaces.forEach((i) => {
 const td = tdm.getByHierarchicalName(i);
-
walk(Module.uno.com.sun.star.reflection.XTypeDescription.query(td.get()), i);
+const ifc = td.get();
 td.delete();
+walk(Module.uno.com.sun.star.reflection.XTypeDescription.query(ifc), 
i);
+ifc.delete();
 })
-tdmAny.delete();
+tdm.delete();
 return Module.uno.com.sun.star.uno.XInterface.reference(
 obj.impl_interfaces[obj.impl_typemap['com.sun.star.uno.XInterface']]);
 };


core.git: static/emscripten

2024-08-30 Thread Stephan Bergmann (via logerrit)
 static/emscripten/uno.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1732bf1c47d7b53cee55097620aa574ab78d85b8
Author: Stephan Bergmann 
AuthorDate: Fri Aug 30 16:24:43 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 30 22:34:29 2024 +0200

Consistenly terminate statements with semicolons in JS code

Change-Id: Ie52917f6f487f5de2d67179f67f2935a1f6c838a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172662
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/static/emscripten/uno.js b/static/emscripten/uno.js
index af1f20dd5cdb..fb634cc63c9d 100644
--- a/static/emscripten/uno.js
+++ b/static/emscripten/uno.js
@@ -79,7 +79,7 @@ Module.unoObject = function(interfaces, obj) {
 const bases = 
Module.uno.com.sun.star.reflection.XInterfaceTypeDescription2.query(td)
   .getBaseTypes();
 for (let i = 0; i !== bases.size(); ++i) {
-walk(bases.get(i), impl)
+walk(bases.get(i), impl);
 }
 bases.delete();
 }


core.git: vcl/qt5

2024-08-28 Thread Stephan Bergmann (via logerrit)
 vcl/qt5/QtInstance.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 54385e8952e89fd00feb0e8c3e623c522bc6eb09
Author: Stephan Bergmann 
AuthorDate: Wed Aug 28 16:38:16 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 28 23:03:13 2024 +0200

`ImplGetSVData()->mpDefInst` is `this` here

Change-Id: I8f9e00b4b3cefca62d214ee37fd4b6d0634db50a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index dfcf0c2c4f08..089ec9dc7488 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -774,7 +774,7 @@ bool QtInstance::DoExecute(int& nExitCode)
 #if defined EMSCRIPTEN
 // For Emscripten, QApplication::exec() will unwind the stack by 
throwing a JavaScript
 // exception, so we need to manually undo the call of 
AcquireYieldMutex() done in InitVCL:
-ImplGetSVData()->mpDefInst->ReleaseYieldMutex(false);
+ReleaseYieldMutex(false);
 #endif
 nExitCode = QApplication::exec();
 #if defined EMSCRIPTEN


core.git: desktop/Executable_soffice_bin.mk instsetoo_native/CustomTarget_emscripten-install.mk vcl/headless vcl/inc

2024-08-28 Thread Stephan Bergmann (via logerrit)
 desktop/Executable_soffice_bin.mk   |3 +
 instsetoo_native/CustomTarget_emscripten-install.mk |8 +++--
 vcl/headless/svpinst.cxx|   32 
 vcl/inc/headless/svpinst.hxx|8 -
 4 files changed, 46 insertions(+), 5 deletions(-)

New commits:
commit 858fed2a98ad5a04ca65dc504722e2db52746e64
Author: Stephan Bergmann 
AuthorDate: Wed Aug 28 16:30:10 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 28 23:02:51 2024 +0200

Emscripten: Support --disable-gui

Change-Id: Iab28ee0bb533b0cdabb374c982fbb898bf04aac5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172537
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index f50cfb17633e..fcf16e041fb9 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -63,7 +63,8 @@ $(call gb_Executable_get_linktarget_target,soffice_bin): \
 
 $(eval $(call gb_Executable_add_ldflags,soffice_bin,\
-s 
EXPORTED_FUNCTIONS=@$(gb_CustomTarget_workdir)/desktop/soffice_bin-emscripten-exports/exports
 -Wl$(COMMA)--whole-archive $(call gb_StaticLibrary_get_target,unoembind) 
-Wl$(COMMA)--no-whole-archive \
-   -sPROXY_TO_PTHREAD=1 -sOFFSCREENCANVAS_SUPPORT=1 
-sOFFSCREENCANVASES_TO_PTHREAD=\#qtcanvas \
+   -sPROXY_TO_PTHREAD=1 \
+   $(if $(DISABLE_GUI),,-sOFFSCREENCANVAS_SUPPORT=1 
-sOFFSCREENCANVASES_TO_PTHREAD=\#qtcanvas) \
 ))
 ifeq ($(ENABLE_QT6),TRUE)
 $(eval $(call gb_Executable_add_ldflags,soffice_bin, \
diff --git a/instsetoo_native/CustomTarget_emscripten-install.mk 
b/instsetoo_native/CustomTarget_emscripten-install.mk
index 23a5ee81885b..f4e63f729ab6 100644
--- a/instsetoo_native/CustomTarget_emscripten-install.mk
+++ b/instsetoo_native/CustomTarget_emscripten-install.mk
@@ -14,15 +14,17 @@ $(if $(or $(gb_not $(filter 
emscripten,$(PKGFORMAT))),$(filter-out emscripten,$(
 
 emscripten_install_files := \
 favicon.ico \
-qt_soffice.html \
-qtloader.js \
-qtlogo.svg \
 soffice.data \
 soffice.data.js.metadata \
 soffice.js \
 soffice.wasm \
 soffice.worker.js \
 $(if $(ENABLE_SYMBOLS_FOR),soffice.wasm.dwp) \
+$(if $(DISABLE_GUI), \
+soffice.html, \
+qt_soffice.html \
+qtloader.js \
+qtlogo.svg) \
 
 .PHONY: $(call gb_CustomTarget_get_target,instsetoo_native/emscripten-install)
 $(call gb_CustomTarget_get_target,instsetoo_native/emscripten-install): \
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 82c24771027a..0b65626947aa 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -50,6 +50,11 @@
 #include 
 #include 
 #include 
+#include 
+
+#if defined EMSCRIPTEN
+#include 
+#endif
 
 SvpSalInstance* SvpSalInstance::s_pDefaultInstance = nullptr;
 
@@ -95,6 +100,9 @@ SvpSalInstance::SvpSalInstance( 
std::unique_ptr pMutex )
 #if !defined(ANDROID) && !defined(IOS) && !defined(EMSCRIPTEN)
 pthread_atfork(nullptr, nullptr, atfork_child);
 #endif
+#if defined EMSCRIPTEN
+ImplGetSVData()->maAppData.m_bUseSystemLoop = true;
+#endif
 }
 
 SvpSalInstance::~SvpSalInstance()
@@ -272,6 +280,30 @@ void SvpSalInstance::ProcessEvent( SalUserEvent aEvent )
 pMutex->m_NonMainWaitingYieldCond.set();
 }
 
+#if defined EMSCRIPTEN
+
+static void loop(void * arg) {
+SolarMutexGuard g;
+static_cast(arg)->ImplYield(false, false);
+}
+
+bool SvpSalInstance::DoExecute(int &) {
+assert(Application::IsOnSystemEventLoop());
+// emscripten_set_main_loop will unwind the stack by throwing a JavaScript 
exception, so we need
+// to manually undo the call of AcquireYieldMutex() done in InitVCL:
+ReleaseYieldMutex(false);
+// Somewhat randomly use an fps=100 argument so the loop callback is 
called 100 times per
+// second:
+emscripten_set_main_loop_arg(loop, this, 100, 1);
+O3TL_UNREACHABLE;
+}
+
+void SvpSalInstance::DoQuit() {
+assert(Application::IsOnSystemEventLoop());
+}
+
+#endif
+
 SvpSalYieldMutex::SvpSalYieldMutex()
 {
 }
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index 34f3019c7b70..f3d9205a8981 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -100,7 +100,11 @@ class VCL_DLLPUBLIC SvpSalInstance : public 
SalGenericInstance, public SalUserEv
 
 virtual voidTriggerUserEventProcessing() override;
 virtual voidProcessEvent( SalUserEvent aEvent ) override;
-SAL_DLLPRIVATE bool ImplYield(bool bWait, bool bHandleAllCurrentEvents);
+
+#if defined EMSCRIPTEN
+bool DoExecute(int &nExitCode) override;
+void DoQuit() override;
+#endif
 
 public:
 static SvpSalInstance*  s_pDefaultInstance;
@@ -108,6 +112,8 @@ public:
 SvpSalInstance( std::unique_ptr pMutex );
 virtual ~SvpSalInstance() override;
 
+SAL_DLLPRIVAT

core.git: Branch 'distro/collabora/co-24.04' - 8 commits - connectivity/source download.lst hwpfilter/source sal/osl sal/rtl sc/source sw/qa sw/source vcl/source writerfilter/source

2024-08-28 Thread Stephan Bergmann (via logerrit)
 connectivity/source/manager/mdrivermanager.cxx   |4 -
 download.lst |4 -
 hwpfilter/source/hstyle.cxx  |4 -
 sal/osl/unx/thread.cxx   |2 
 sal/rtl/byteseq.cxx  |7 ++
 sal/rtl/hash.cxx |2 
 sc/source/core/tool/compiler.cxx |6 +-
 sw/qa/extras/uiwriter/uiwriter7.cxx  |4 -
 sw/qa/extras/unowriter/data/textboxInColumn2.fodt|   39 +++
 sw/qa/extras/unowriter/unowriter.cxx |   19 +++
 sw/source/core/doc/textboxhelper.cxx |   36 +++--
 sw/source/uibase/inc/textsh.hxx  |2 
 sw/source/uibase/shells/textsh.cxx   |   34 ++---
 vcl/source/window/layout.cxx |   12 ++--
 writerfilter/source/dmapper/DomainMapperTableManager.cxx |9 ++-
 15 files changed, 140 insertions(+), 44 deletions(-)

New commits:
commit ee7138afe13f0f3a53447605e3f019520507a284
Author: Stephan Bergmann 
AuthorDate: Wed Apr 3 23:58:18 2024 +0200
Commit: Andras Timar 
CommitDate: Wed Aug 28 16:12:17 2024 +0200

A number of bogus GCC 13 warnings still hit with recent GCC 14 trunk

Change-Id: I0ec7743cd79429591fcfc3eb9715ff36d06fc00b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 6b7245f51274424a6c634424161e8766f8827033)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172464
Reviewed-by: Michael Stahl 

diff --git a/connectivity/source/manager/mdrivermanager.cxx 
b/connectivity/source/manager/mdrivermanager.cxx
index ee80460621f5..d301b2c4841b 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -601,12 +601,12 @@ Reference< XDriver > 
OSDBCDriverManager::implGetDriverForURL(const OUString& _rU
 m_aDriversBS.end(), // end of search range
 [&_rURL, this] (const DriverAccessArray::value_type& 
driverAccess) {
 // extract the driver from the access, then ask the 
resulting driver for acceptance
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdangling-reference"
 #endif
 const DriverAccess& ensuredAccess = 
EnsureDriver(m_xContext)(driverAccess);
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
 #pragma GCC diagnostic pop
 #endif
 const Reference driver = 
ExtractDriverFromAccess()(ensuredAccess);
diff --git a/hwpfilter/source/hstyle.cxx b/hwpfilter/source/hstyle.cxx
index 013f755496a5..9a0040edcf08 100644
--- a/hwpfilter/source/hstyle.cxx
+++ b/hwpfilter/source/hstyle.cxx
@@ -68,14 +68,14 @@ void HWPStyle::SetName(int n, char const* name)
 
 if (name)
 {
-#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 13) && !defined __clang__
+#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 14) && !defined __clang__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wstringop-truncation"
 #endif
 auto const p = style[n].name;
 strncpy(p, name, MAXSTYLENAME);
 p[MAXSTYLENAME] = '
-#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 13) && !defined __clang__
+#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 14) && !defined __clang__
 #pragma GCC diagnostic pop
 #endif
 }
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 5639d8e62d57..ec4331528f9a 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -954,12 +954,12 @@ array_type assembleGrid(const VclGrid &rGrid)
 {
 for (sal_Int32 y = 0; y < nMaxY; ++y)
 {
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdangling-reference"
 #endif
 const GridEntry &rEntry = A[x][y];
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
 #pragma GCC diagnostic pop
 #endif
 const vcl::Window *pChild = rEntry.pChi

Re: Help with XImplementationLoader for .NET Bindings

2024-08-28 Thread Stephan Bergmann

On 8/27/24 17:56, Ritobroto Mukherjee wrote:

Based on my current understanding, the steps involved are:
1. Adding an IDL file for com.sun.star.loader.Dotnet.
2. Creating a C++ implementation of css.loader.Dotnet in the stoc/
module along with a .component file, similar to stoc/source/javaloader.
3. Modifying dp_component.cxx and dp_package.cxx in the desktop/ module
to support css.loader.Dotnet (I believe this is for .oxt support?).


yes, the above is for .oxt support


4. Adding css.loader.Dotnet support to cpputools/source/unoexe.cxx for
the UNO executable runner.

Could you please let me know if these steps are sufficient? Are there
any additional changes that need to be made?


I don't remember the details myself either, but yeah, the most important 
thing would be step (2) above, to have a 
css.loader.XImplementationLoader implementation (and to put the code 
somewhere in stoc sounds like a good idea), with a corresponding 
.component file similar to the 
stoc/source/javaloader/javaloader.component one, but just a single 
`` entry.


Then, it should work to have other .component files (for components 
implemented in .Net) to use `loader="com.sun.star.loader.Dotnet" ...`.


All the other points above are of secondary relevance (point (3) being 
perhaps the most important of them, as otherwise extensions couldn't 
bring along components implemented in .Net, I think).


core.git: solenv/gbuild

2024-08-28 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/AllLangMoTarget.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 07fda011173917aaad75678b86e2b0570e004f93
Author: Stephan Bergmann 
AuthorDate: Wed Aug 28 07:48:44 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 28 09:07:23 2024 +0200

Put back the mkdir

...that 1c84943890afea8eaa8fdaeabbd4394680d657f9 "run msguniq .. | msgfmt 
in a
subshell to help out wsl1", and which caused all kinds of from-scratch 
builds to
fail now with

> [build MO ] accde
> msgfmt: error while opening 
"/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/MoTarget/accde.mo" for 
writing: No such file or directory
> make[1]: *** 
[/home/tdf/lode/jenkins/workspace/lo_ubsan/solenv/gbuild/AllLangMoTarget.mk:40: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/MoTarget/accde.mo] Error 1

etc. (<https://ci.libreoffice.org/job/lo_ubsan/3288/>

Change-Id: I756ebdf68f09367d24181ed47b6b5735c45aebf9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172484
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/solenv/gbuild/AllLangMoTarget.mk b/solenv/gbuild/AllLangMoTarget.mk
index f590f4d84ac0..3811ff4ee478 100644
--- a/solenv/gbuild/AllLangMoTarget.mk
+++ b/solenv/gbuild/AllLangMoTarget.mk
@@ -37,6 +37,7 @@ $(call gb_MoTarget_get_clean_target,%) :
 $(call gb_MoTarget_get_target,%) : $(gb_Helper_MISCDUMMY)
$(call gb_Output_announce,$*,$(true),MO ,2)
$(call gb_Trace_StartRange,$*,MO )
+   $(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@)) && \
$(call gb_Helper_wsl_path,$(WSL) /bin/sh -c "$(MSGUNIQ) --force-po 
$(gb_POLOCATION)/$(LANGUAGE)/$(POLOCATION)/messages.po | $(MSGFMT) - -o $@")
$(call gb_Trace_EndRange,$*,MO )
 


core.git: Branch 'libreoffice-24-2' - 3 commits - connectivity/source hwpfilter/source sal/osl sal/rtl vcl/source

2024-08-27 Thread Stephan Bergmann (via logerrit)
 connectivity/source/manager/mdrivermanager.cxx |4 ++--
 hwpfilter/source/hstyle.cxx|4 ++--
 sal/osl/unx/thread.cxx |2 +-
 sal/rtl/byteseq.cxx|7 +++
 sal/rtl/hash.cxx   |2 +-
 vcl/source/window/layout.cxx   |   12 ++--
 6 files changed, 19 insertions(+), 12 deletions(-)

New commits:
commit 2e56b56894c4176e9e7ce88a27b90f7687e118ed
Author: Stephan Bergmann 
AuthorDate: Wed Apr 3 23:58:18 2024 +0200
Commit: Michael Stahl 
CommitDate: Tue Aug 27 15:13:34 2024 +0200

A number of bogus GCC 13 warnings still hit with recent GCC 14 trunk

Change-Id: I0ec7743cd79429591fcfc3eb9715ff36d06fc00b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 6b7245f51274424a6c634424161e8766f8827033)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172464
Reviewed-by: Michael Stahl 

diff --git a/connectivity/source/manager/mdrivermanager.cxx 
b/connectivity/source/manager/mdrivermanager.cxx
index 5c283be5d82d..c0c979079946 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -601,12 +601,12 @@ Reference< XDriver > 
OSDBCDriverManager::implGetDriverForURL(const OUString& _rU
 m_aDriversBS.end(), // end of search range
 [&_rURL, this] (const DriverAccessArray::value_type& 
driverAccess) {
 // extract the driver from the access, then ask the 
resulting driver for acceptance
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdangling-reference"
 #endif
 const DriverAccess& ensuredAccess = 
EnsureDriver(m_xContext)(driverAccess);
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
 #pragma GCC diagnostic pop
 #endif
 const Reference driver = 
ExtractDriverFromAccess()(ensuredAccess);
diff --git a/hwpfilter/source/hstyle.cxx b/hwpfilter/source/hstyle.cxx
index 013f755496a5..9a0040edcf08 100644
--- a/hwpfilter/source/hstyle.cxx
+++ b/hwpfilter/source/hstyle.cxx
@@ -68,14 +68,14 @@ void HWPStyle::SetName(int n, char const* name)
 
 if (name)
 {
-#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 13) && !defined __clang__
+#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 14) && !defined __clang__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wstringop-truncation"
 #endif
 auto const p = style[n].name;
 strncpy(p, name, MAXSTYLENAME);
 p[MAXSTYLENAME] = '
-#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 13) && !defined __clang__
+#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 14) && !defined __clang__
 #pragma GCC diagnostic pop
 #endif
 }
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 5639d8e62d57..ec4331528f9a 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -954,12 +954,12 @@ array_type assembleGrid(const VclGrid &rGrid)
 {
 for (sal_Int32 y = 0; y < nMaxY; ++y)
 {
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdangling-reference"
 #endif
 const GridEntry &rEntry = A[x][y];
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
 #pragma GCC diagnostic pop
 #endif
 const vcl::Window *pChild = rEntry.pChild;
@@ -1084,12 +1084,12 @@ static void calcMaxs(const array_type &A, 
std::vector &rWidths,
 {
 for (sal_Int32 y = 0; y < nMaxY; ++y)
 {
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdangling-reference"
 #endif
 const GridEntry &rEntry = A[x][y];
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 &&

core.git: static/emscripten

2024-08-26 Thread Stephan Bergmann (via logerrit)
 static/emscripten/environment.js |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 39de116b733685881f0defe9cc10070c826ad9c2
Author: Stephan Bergmann 
AuthorDate: Mon Aug 26 09:04:04 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Aug 26 16:30:12 2024 +0200

+WARN is the default with an unset SAL_LOG env var, anyway

Change-Id: Ia8bbc1bdc09705f1ecab783d0d73a417f0ef84e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172378
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/static/emscripten/environment.js b/static/emscripten/environment.js
index 29f2dfaa0bc8..de978115af75 100644
--- a/static/emscripten/environment.js
+++ b/static/emscripten/environment.js
@@ -1,6 +1,5 @@
 if (!('preRun' in Module)) Module['preRun'] = [];
 Module.preRun.push(function() {
 ENV.MAX_CONCURRENCY = '4';
-ENV.SAL_LOG = "+WARN"
 });
 Module.ignoreApplicationExit = true;


core.git: static/emscripten unotest/source

2024-08-26 Thread Stephan Bergmann (via logerrit)
 static/emscripten/environment.js|2 --
 static/emscripten/uno.js|2 --
 unotest/source/embindtest/embindtest.js |2 --
 3 files changed, 6 deletions(-)

New commits:
commit a3a71ed916994df700f42b58b6400dafed3db8e4
Author: Stephan Bergmann 
AuthorDate: Mon Aug 26 09:24:34 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Aug 26 16:29:28 2024 +0200

'use strict' is of no use here...

...in snippets that are included with --pre-js/--post-js

Change-Id: I928aa16b78284314796a0645479dce0dfc7b42cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172383
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/static/emscripten/environment.js b/static/emscripten/environment.js
index 74536a665ccc..29f2dfaa0bc8 100644
--- a/static/emscripten/environment.js
+++ b/static/emscripten/environment.js
@@ -1,5 +1,3 @@
-'use strict';
-
 if (!('preRun' in Module)) Module['preRun'] = [];
 Module.preRun.push(function() {
 ENV.MAX_CONCURRENCY = '4';
diff --git a/static/emscripten/uno.js b/static/emscripten/uno.js
index 84b301f3e3b3..af1f20dd5cdb 100644
--- a/static/emscripten/uno.js
+++ b/static/emscripten/uno.js
@@ -7,8 +7,6 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-'use strict';
-
 Module.unoTagSymbol = Symbol('unoTag');
 
 Module.uno_init = new Promise(function (resolve, reject) {
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index f75653a897cf..9551a9a56bca 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -7,8 +7,6 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-'use strict';
-
 Module.uno_init.then(function() {
 console.log('Running embindtest');
 let css = Module.uno.com.sun.star;


core.git: desktop/source

2024-08-23 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/appinit.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 96f3aeaa70d91b26861ac28f0b077b46546d3676
Author: Stephan Bergmann 
AuthorDate: Fri Aug 23 17:49:39 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 23 22:06:38 2024 +0200

Emscripten: Only resolve Module.uno_init after Module.uno_mainPort is set

Otherwise, client code (which is run as soon as Module.uno_init is resolved)
could try to use Module.uno_mainPort before it has been set.

Change-Id: Ibac992d965f43e9f6766d06e3bd80f1964258b19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172326
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 1dc962e7a008..3a8bce551d6a 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -86,6 +86,7 @@ EM_JS(void, setupMainChannel, (), {
 if (e.data.cmd === "LOWA-channel") {
 self.onmessage = orig;
 Module.uno_mainPort = e.ports[0];
+Module.uno_init$resolve();
 } else if (orig) {
 orig(e);
 }
@@ -119,7 +120,6 @@ void initUno() {
 runUnoScriptUrl(url.getStr());
 }
 setupMainChannel();
-EM_ASM(Module.uno_init$resolve(););
 emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_V, resolveUnoMain);
 }
 


core.git: desktop/source

2024-08-23 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/appinit.cxx |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 7d37241dcb7aa20adfa7510323cfd7984ff5e911
Author: Stephan Bergmann 
AuthorDate: Fri Aug 23 14:09:41 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 23 22:06:21 2024 +0200

Emscripten: Module.uno_scripts are relative to document.baseURI

...so explicitly make them absolute, in case the WorkerGlboalScope used in
runUnoScriptUrl would make them absolute relative to a different base URL.

(See <https://github.com/mdn/content/issues/35568>
"WorkerGlobalScope.importScripts URLs relative to what base URL?" for my
confusion of what base URL should actually be used there.  But at least 
with an
emsdk that uses recent Emscripten trunk towards 3.1.65, and where meanwhile
worker threads no longer load an soffice.worker.js but instead use some 
blob:
URL, a

> Module.uno_scripts = ['example.js'];

now failed with

> Error: Failed to execute 'importScripts' on 'WorkerGlobalScope': The URL 
'example.js' is invalid.

on Chrome 127.)

Change-Id: I9f9b43d501a7b5d933c8506debdebe67ff1b5795
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172325
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 6253b7afe20b..1dc962e7a008 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -63,13 +64,14 @@ using namespace ::com::sun::star::ucb;
 
 namespace {
 
-extern "C" void getUnoScriptUrls(std::vector * urls) {
+extern "C" void getUnoScriptUrls(std::vector * urls) {
 assert(urls != nullptr);
+OUString const 
base(emscripten::val::global("document")["baseURI"].as());
 auto const val = emscripten::val::module_property("uno_scripts");
 if (!val.isUndefined()) {
 auto const len = val["length"].as();
 for (std::uint32_t i = 0; i != len; ++i) {
-urls->push_back(val[i].as());
+urls->push_back(rtl::Uri::convertRelToAbs(base, 
OUString(val[i].as(;
 }
 }
 }
@@ -108,13 +110,13 @@ extern "C" void resolveUnoMain() {
 
 void initUno() {
 init_unoembind_uno();
-std::vector urls;
+std::vector urls;
 emscripten_sync_run_in_main_runtime_thread(EM_FUNC_SIG_VI, 
getUnoScriptUrls, &urls);
 for (auto const & url: urls) {
-if (url.find('
+if (url.indexOf('
 throw std::invalid_argument("Module.uno_scripts element contains 
embedded NUL");
 }
-runUnoScriptUrl(url.c_str());
+runUnoScriptUrl(url.getStr());
 }
 setupMainChannel();
 EM_ASM(Module.uno_init$resolve(););


core.git: desktop/source

2024-08-23 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/appinit.cxx |8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 5dbc995f73da45ad99b95bc3119c75451b2c415d
Author: Stephan Bergmann 
AuthorDate: Fri Aug 23 13:26:16 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 23 17:46:29 2024 +0200

Emscritpen: Use WorkerGlobalScope.importScripts

Change-Id: I19be38564aca4fdd3d827657055b41a867582ba0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172315
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 4490529a77ba..6253b7afe20b 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -75,13 +75,7 @@ extern "C" void getUnoScriptUrls(std::vector 
* urls) {
 }
 
 EM_JS(void, runUnoScriptUrl, (char16_t const * url), {
-fetch(UTF16ToString(url)).then(res => {
-if (!res.ok) {
-throw Error(
-"Loading <" + res.url + "> failed with " + res.status + " " + 
res.statusText);
-}
-return res.blob();
-}).then(blob => blob.text()).then(text => eval(text));
+importScripts(UTF16ToString(url));
 });
 
 EM_JS(void, setupMainChannel, (), {


Re: Build fail on Debian x86-64 with master sources

2024-08-23 Thread Stephan Bergmann

On 8/23/24 09:51, Julien Nabet wrote:

checking if ccache gcc is -fvisibility-inlines-hidden safe (Clang bug 11250)... 
no
configure: error: Your gcc/clang is not -fvisibility-inlines-hidden safe. This 
is no longer supported.
Error running configure at ./autogen.sh line 323.


yeah, you'd need to look into config.log to find out why that trips up 
that specific configure.ac check


Re: Build fail on Debian x86-64 with master sources

2024-08-23 Thread Stephan Bergmann

On 8/23/24 09:32, Julien Nabet wrote:

Any idea how to fix this?


report it as a compiler bug and/or try to workaround it with something 
like configuring `CXX=gcc -Wno-stringop-overflow`


ESC meeting minutes: 2024-08-22

2024-08-22 Thread Stephan Bergmann

* Present:
+ Thorsten, Michael W., Olivier, Stephan, Ilmari, Cloph, Hossein, 
Heiko, Caolan,

  Regina, Michael S., Xisco

* Completed Action Items:

* Pending Action Items:
  + perf.libreoffice.org: switch the default to the new data (Cloph)

* Release Engineering update (Cloph)
  + 24.8.0 final released today
  + 24.8.1 rc1 this week, probably tomorrow during the day
  + 24.2.6 rc2 next week
  + OK to enable MAR updater by default for 24.8.1? (Stephan)
- OK, test runs done (Cloph)
- come up with a nice web page to show after updating (Cloph)
- minor issue: if you do a multi-step update you might get
  multiple web pages opening in the browser
- workaround: remove the url from the N-1 .. etc MAR files, so users
  will always only see the last patch update URL (Thorsten)
- possible to role updates gradually, only to few people first? 
(Hossein)

  - to find possible issues, avoid heavy load
  - not easy, but testing side for QA before update (Cloph)
  - delay switching MAR updater notification live for a few days 
(Cloph)
  - assume our users & QA community would notice any catastrophic 
issues quickly

(Thorsten)
- 24.2.5 -> 24.2.6 -> 24.2.7 -> 24.8.3 (or 4) planned updating 
scheme (Cloph)
- already mention latest 24.8 on page shown after incremental 
upate? (Cloph)

   AI: enable MAR updater by default (Stephan)

* Documentation (Olivier)
+ Helpcontents2
   + Updates and fixes (Pierre F, D. Maddern, ohallot, A. Romedenne)
   + New Help pages on Sidebar (ohallot)
  + Obsolete HID's
+ not critical, but helpful to remove them (easy hack?)
   + Online Help pages updated for 24.8
+ Guides
   + Getting Started 24.8 released with LO24.8
   + Work on Calc Guide

+ Bugzilla Documentation statistics
237(237) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 24(1) 72(14)   106(4) 245(8)
 commented 43(7)133(36)   269(6) 905(36)
  resolved  9(1) 39(6) 66(0) 155(3)
+ top 10 contributors:
  Pierre F made 88 changes in 1 month, and 124 changes in 1 year
  Dione Maddern made 62 changes in 1 month, and 75 changes in 1 
year
  Olivier Hallot made 58 changes in 1 month, and 308 changes in 
1 year
  Vernon, Stuart Foote made 27 changes in 1 month, and 152 
changes in 1 year
  Ilmari Lauhakangas made 14 changes in 1 month, and 102 
changes in 1 year

  Dieter made 10 changes in 1 month, and 26 changes in 1 year
  Alain Romedenne made 8 changes in 1 month, and 20 changes in 
1 year
  Kaganski, Mike made 8 changes in 1 month, and 85 changes in 1 
year
  Henschel, Regina made 6 changes in 1 month, and 20 changes in 
1 year
  Roman Kuznetsov made 5 changes in 1 month, and 10 changes in 
1 year


* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
233(233) (topicUI) bugs open, 29(29) (needsUXEval) needs to be 
evaluated by the UXteam

+ Updates:
BZ changes   1 week1 month3 months   12 months
 added  5(-1)  9(1)  10(1)   18(1)
 commented 34(-17)   132(-20)   412(-12)   1747(-15)
   removed  0(0)   0(0)   2(0)   10(0)
  resolved  1(-5) 24(-9) 73(-4) 281(-7)
+ top 10 contributors:
  Eyal Rozenberg made 56 changes in 1 month, and 196 changes in 
1 year
  Heiko Tietze made 56 changes in 1 month, and 954 changes in 1 
year
  Stéphane Guillou made 26 changes in 1 month, and 587 changes 
in 1 year
  Vernon, Stuart Foote made 23 changes in 1 month, and 338 
changes in 1 year
  Ilmari Lauhakangas made 13 changes in 1 month, and 144 
changes in 1 year

  Justin Luth made 9 changes in 1 month, and 70 changes in 1 year
  steve made 8 changes in 1 month, and 17 changes in 1 year
  Dieter made 6 changes in 1 month, and 145 changes in 1 year
  Kelemen, Gabor made 6 changes in 1 month, and 27 changes in 1 
year

  kolAflash made 6 changes in 1 month, and 12 changes in 1 year
+ [Bug 153759] EDITING: Mark column -> Ctrl+C -> right-click -> 
Insert Columns

   Before -> Ctrl+V -> wrong reference despite $
+ [Bug 161532] Selection in formula view is not reflected in the 
source view when

   visual editing is active
+ [Bug 161588] Autoinput suggestions cannot be rejected (e.g. with Esc)
+ [Bug 162501] Draw - no useful scaling factors for English units
+ [Bug 155712] Footnote numbering should be page-style-specific

* Crash Testing (Caolan)
+ 16(+0) import failure, 13(+0) export failures
  - https://wiki.documentfoundation.org/Development/Crashtesting
  - missing a week's update
+ 542 (down from peak of 3486) coverity issues
+ 4 ossfuzz issues
  - 1 3rd party crash, 3 timeou

core.git: config_host/config_emscripten.h.in config_host.mk.in configure.ac desktop/source external/curl solenv/gbuild

2024-08-22 Thread Stephan Bergmann (via logerrit)
 config_host.mk.in  |1 
 config_host/config_emscripten.h.in |   14 
 configure.ac   |   18 +++
 desktop/source/app/app.cxx |   39 +
 external/curl/ExternalProject_curl.mk  |1 
 external/curl/UnpackedTarball_curl.mk  |6 +++
 external/curl/emscripten-proxy-poll.patch.0|   20 
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |4 ++
 8 files changed, 103 insertions(+)

New commits:
commit 2d9f8f45be0c9bc5f56864f66a37c3cc60069fe5
Author: Stephan Bergmann 
AuthorDate: Thu Aug 22 11:49:08 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 22 14:24:35 2024 +0200

Emscripten: Experimental -sPROXY_POSIX_SOCKETS support

...see

<https://emscripten.org/docs/porting/networking.html#full-posix-sockets-over-websocket-proxy-server>.

This requires

<https://github.com/stbergmann/emscripten/commit/4aff1f28b88480791236adcc6d5cb2d919ad4bf3>
"-sPROXY_POSIX_SOCKETS: Add websocket_proxy_poll".  When configured with
--disable-socketpair (which appears to have no negative consequences),
external/curl appears to only call poll(2) with socket-related file 
descriptors,
so we can use websocket_proxy_poll instead.

The URL on which the websocket_to_posix_proxy process listens must be 
specified
as Module.uno_websocket_to_posix_socket_url.

Change-Id: I4ad23098b5bbc0646fa50859c0aeb9870d1cc92a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172243
    Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/config_host.mk.in b/config_host.mk.in
index 15b1c2b74e9a..810abab5f4ca 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -175,6 +175,7 @@ export ENABLE_DEBUG=@ENABLE_DEBUG@
 ENABLE_DOTNET=@ENABLE_DOTNET@
 SYSTEM_DRAGONBOX=@SYSTEM_DRAGONBOX@
 SYSTEM_FROZEN=@SYSTEM_FROZEN@
+export 
ENABLE_EMSCRIPTEN_PROXY_POSIX_SOCKETS=@ENABLE_EMSCRIPTEN_PROXY_POSIX_SOCKETS@
 export ENABLE_EPOXY=@ENABLE_EPOXY@
 export ENABLE_EOT=@ENABLE_EOT@
 export ENABLE_EVOAB2=@ENABLE_EVOAB2@
diff --git a/config_host/config_emscripten.h.in 
b/config_host/config_emscripten.h.in
new file mode 100644
index ..24d1a9ca5dd8
--- /dev/null
+++ b/config_host/config_emscripten.h.in
@@ -0,0 +1,14 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#define HAVE_EMSCRIPTEN_PROXY_POSIX_SOCKETS 0
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/configure.ac b/configure.ac
index 2c11703cb3ff..f0fb5765abc9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2166,6 +2166,15 @@ AC_ARG_WITH(main-module,
 Default value is 'writer'.]),
 ,)
 
+if test "$_os" = Emscripten; then
+AC_ARG_ENABLE(emscripten-proxy-posix-sockets,
+AS_HELP_STRING([--enable-emscripten-proxy-posix-sockets],
+[Enable experimental Emscripten support for full POSIX sockets 
over WebSocket proxy
+ server (-sPROXY_POSIX_SOCKETS).]))
+else
+enable_emscripten_proxy_posix_sockets=
+fi
+
 AC_ARG_ENABLE(xmlhelp,
 AS_HELP_STRING([--disable-xmlhelp],
 [Disable XML help support]),
@@ -4238,6 +4247,14 @@ AC_SUBST(ENABLE_WASM_STRIP)
 AC_SUBST(ENABLE_WASM_STRIP_WRITER)
 AC_SUBST(ENABLE_WASM_STRIP_CALC)
 
+if test "$enable_emscripten_proxy_posix_sockets" = yes; then
+ENABLE_EMSCRIPTEN_PROXY_POSIX_SOCKETS=TRUE
+AC_DEFINE(HAVE_EMSCRIPTEN_PROXY_POSIX_SOCKETS)
+else
+ENABLE_EMSCRIPTEN_PROXY_POSIX_SOCKETS=
+fi
+AC_SUBST(ENABLE_EMSCRIPTEN_PROXY_POSIX_SOCKETS)
+
 # Use -isystem (gcc) if possible, to avoid warnings in 3rd party headers.
 # NOTE: must _not_ be used for bundled external libraries!
 ISYSTEM=
@@ -15697,6 +15714,7 @@ AC_CONFIG_HEADERS([config_host/config_cairo_canvas.h])
 AC_CONFIG_HEADERS([config_host/config_cairo_rgba.h])
 AC_CONFIG_HEADERS([config_host/config_cxxabi.h])
 AC_CONFIG_HEADERS([config_host/config_dbus.h])
+AC_CONFIG_HEADERS([config_host/config_emscripten.h])
 AC_CONFIG_HEADERS([config_host/config_features.h])
 AC_CONFIG_HEADERS([config_host/config_feature_desktop.h])
 AC_CONFIG_HEADERS([config_host/config_feature_opencl.h])
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 2a52f9843f75..a4ce4c965d3a 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -150,6 +151,15 @@
 #define GETPID getpid
 #endif
 
+#if HAVE_EMSCRIPTEN_PROXY_POSIX_SOCKETS
+#include 
+#include 
+#include 
+#include 

core.git: configure.ac

2024-08-21 Thread Stephan Bergmann (via logerrit)
 configure.ac |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 962c76d85bef03fb717914d8eddda9295427614a
Author: Stephan Bergmann 
AuthorDate: Wed Aug 21 20:22:47 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 21 22:49:59 2024 +0200

Allow building against emsdk that uses Emscripten trunk

(see

<https://github.com/emscripten-core/emsdk/?tab=readme-ov-file#how-do-i-track-the-latest-emscripten-development-with-the-sdk>),
which has emscripten/main/ instead of upstream/emscripten/

Change-Id: I10dfc7e30cddf8a798cb70104126b45757fcba63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172219
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/configure.ac b/configure.ac
index 123c03e35661..2c11703cb3ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1446,6 +1446,9 @@ if test "$_os" = "Emscripten"; then
 AS_IF([test -z "$EMSDK"],
   [AC_MSG_ERROR([No \$EMSDK environment variable.])])
 
EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h
+if test ! -f "$EMSCRIPTEN_VERSION_H"; then
+
EMSCRIPTEN_VERSION_H=$EMSDK/emscripten/main/cache/sysroot/include/emscripten/version.h
+fi
 fi
 if test -f "$EMSCRIPTEN_VERSION_H"; then
 EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" 
| $SED -ne 's/.*__EMSCRIPTEN_major__ //p')


core.git: external/freetype

2024-08-21 Thread Stephan Bergmann (via logerrit)
 external/freetype/UnpackedTarball_freetype.mk |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 5a8171415c29f101865f762cbe855fe71a414df3
Author: Stephan Bergmann 
AuthorDate: Wed Aug 21 12:24:37 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 21 17:01:13 2024 +0200

external/freetype: Enabling debug logging only works for DISABLE_DYNLOADING

Change-Id: I603d3fe9f34925997f847f91db8266beeb944cc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172206
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/external/freetype/UnpackedTarball_freetype.mk 
b/external/freetype/UnpackedTarball_freetype.mk
index 7dcd942baa44..bf0d78120ae8 100644
--- a/external/freetype/UnpackedTarball_freetype.mk
+++ b/external/freetype/UnpackedTarball_freetype.mk
@@ -17,10 +17,14 @@ $(eval $(call gb_UnpackedTarball_add_patches,freetype,\
external/freetype/freetype-fd-hack.patch.0 \
 ))
 
-# Enable FreeType's FT_DEBUG_LOGGING at least in --enable-dbgutil builds (and 
see
+# Enable FreeType's FT_DEBUG_LOGGING at least in --enable-dbgutil 
DISABLE_DYNLOADING builds (in
+# non-DISABLE_DYNLOADING builds, this would not work, as libfreetype.a 
contains a global variable
+# ft_trace_levels that is initialized in ft_debug_init, but various of our 
shared libraries each
+# include libfreetype.a, so each have their own ft_trace_levels instance, but 
only one ft_debug_init
+# is called, so only one of those instances is initailized while the others 
remain nullptrs; and see
 # workdir/UnpackedTarball/freetype/docs/DEBUG for how to actually make use of 
that by setting an
 # FT2_DEBUG environment variable at runtime):
-ifeq ($(ENABLE_DBGUTIL),TRUE)
+ifeq ($(ENABLE_DBGUTIL)-$(DISABLE_DYNLOADING),TRUE-TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,freetype, \
 external/freetype/logging.patch.0 \
 ))


ESC meeting agenda: 2024-08-22 16:00 CEST

2024-08-21 Thread Stephan Bergmann

The prototype agenda is below. Extra items are appreciated either in
this document or as a reply to this mail:

https://pad.documentfoundation.org/p/esc

You can join using Jitsi here:

https://jitsi.documentfoundation.org/esc

---

* Present:
+

* Completed Action Items:

* Pending Action Items:
  + perf.libreoffice.org: switch the default to the new data (Cloph)

* Release Engineering update (Cloph)
  + 24.8.0 final release this week?
  + 24.8.1 rc1 this week?
  + 24.2.6 rc2 next week?
  + OK to enable MAR updater by default for 24.8.1? (Stephan)

* Documentation (Olivier)
+ Bugzilla Documentation statistics
237(237) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 24(1) 72(14)   106(4) 245(8)
 commented 43(7)133(36)   269(6) 905(36)
  resolved  9(1) 39(6) 66(0) 155(3)
+ top 10 contributors:
  Pierre F made 88 changes in 1 month, and 124 changes in 1 year
  Dione Maddern made 62 changes in 1 month, and 75 changes in 1 
year
  Olivier Hallot made 58 changes in 1 month, and 308 changes in 
1 year
  Vernon, Stuart Foote made 27 changes in 1 month, and 152 
changes in 1 year
  Ilmari Lauhakangas made 14 changes in 1 month, and 102 
changes in 1 year

  Dieter made 10 changes in 1 month, and 26 changes in 1 year
  Alain Romedenne made 8 changes in 1 month, and 20 changes in 
1 year
  Kaganski, Mike made 8 changes in 1 month, and 85 changes in 1 
year
  Henschel, Regina made 6 changes in 1 month, and 20 changes in 
1 year
  Roman Kuznetsov made 5 changes in 1 month, and 10 changes in 
1 year


* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
233(233) (topicUI) bugs open, 29(29) (needsUXEval) needs to be 
evaluated by the UXteam

+ Updates:
BZ changes   1 week1 month3 months   12 months
 added  5(-1)  9(1)  10(1)   18(1)
 commented 34(-17)   132(-20)   412(-12)   1747(-15)
   removed  0(0)   0(0)   2(0)   10(0)
  resolved  1(-5) 24(-9) 73(-4) 281(-7)
+ top 10 contributors:
  Eyal Rozenberg made 56 changes in 1 month, and 196 changes in 
1 year
  Heiko Tietze made 56 changes in 1 month, and 954 changes in 1 
year
  Stéphane Guillou made 26 changes in 1 month, and 587 changes 
in 1 year
  Vernon, Stuart Foote made 23 changes in 1 month, and 338 
changes in 1 year
  Ilmari Lauhakangas made 13 changes in 1 month, and 144 
changes in 1 year

  Justin Luth made 9 changes in 1 month, and 70 changes in 1 year
  steve made 8 changes in 1 month, and 17 changes in 1 year
  Dieter made 6 changes in 1 month, and 145 changes in 1 year
  Kelemen, Gabor made 6 changes in 1 month, and 27 changes in 1 
year

  kolAflash made 6 changes in 1 month, and 12 changes in 1 year

* Crash Testing (Caolan)
+ 16(+0) import failure, 13(+0) export failures
+ ??? coverity issues
+ Google / ossfuzz: ?? fuzzers active now

* Crash Reporting (Xisco)
+ 24.2.2.220137(+362)
+ 24.2.3.218072(+546)
+ 24.2.4.213818(+698)
+ 24.2.5.210808(+2806)

* Mentoring (Hossein)
  committer...   1 week 1 month  3 months12 months
  open  93(12) 181(11)  187(14)  187(14)
   reviews 366(-90)   1388(-140)   3740(-92)   13194(-16)
merged 252(30)1049(-57)3486(19)13019(74)
 abandoned  17(0)   89(0)   240(10)  780(3)
   own commits 184(7)  752(-44)2371(17) 9516(53)
review commits  59(13) 238(12)  747(-16)3131(34)
contributor...   1 week 1 month 3 months   12 months
  open  64(12) 114(3)  118(4)  118(4)
   reviews 872(114)   2952(-70)   8108(92)   29892(-100)
merged  41(17) 121(23) 298(16)1544(29)
 abandoned   4(-5)  39(-1)  89(-4) 595(-150)
   own commits  25(4)  111(5)  330(-8)1276(20)
review commits   0(0)0(0)0(0)0(0)
+ easyHack statistics:
   needsDevEval 8(8)   needsUXEval 1(1)   cleanup_comments 328(328)
   total 411(411)   assigned 23(23)   open 353(353)
+ top 10 contributors:
  Pierre F made 34 patches in 1 month, and 66 patches in 1 year
made 13 patches in 1 month, and 28 patches in 1 year
  Dione Maddern made 11 patches in 1 month, and 78 patches in 1 
year
  Ritobroto Mukherjee made 5 patches in 1 month, and 28 patches 
in 1 year

  Weblate made 4 patches in 1 month, and 37 patches in 1 year
  Adam Seskunas made 4 patches in 1 month, and 21 patches in 1 year
  Hubert Figuière made

core.git: configure.ac external/curl include/systools sw/source vcl/source

2024-08-21 Thread Stephan Bergmann (via logerrit)
 configure.ac|4 +---
 external/curl/ExternalProject_curl.mk   |4 
 include/systools/curlinit.hxx   |   17 ++---
 include/systools/opensslinit.hxx|2 +-
 sw/source/uibase/inc/translatehelper.hxx|2 +-
 sw/source/uibase/shells/translatehelper.cxx |4 ++--
 vcl/source/app/svmain.cxx   |   15 +++
 7 files changed, 30 insertions(+), 18 deletions(-)

New commits:
commit e180d2a8fda78d1373dc3ecec4bd69992bc4337c
Author: Stephan Bergmann 
AuthorDate: Wed Aug 21 08:00:48 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 21 11:20:54 2024 +0200

Emscripten: Enable the WebDAV UCP

*  Which also requires external/curl.  But implicitly use --without-gssapi,
checking for it in configure.ac would fail with

> configure: error: could not find function 'gss_init_sec_context' required 
for GSSAPI

And building ExternalProject_curl needs to see the -pthread from
gb_EMSCRIPTEN_CPPFLAGS, otherwise linking Executable_soffice_bin would fail 
with

> wasm-ld: error: --shared-memory is disallowed by libcurl_la-easy.o 
because it was not compiled with 'atomics' or 'bulk-memory' features.

*  By default, GetCABundleFile in include/systools/opensslinit.hxx will fail
now.  (But to make https work, applications could bring along their own such
file in the Emscripten FS, in one of the places where GetCABundleFile 
checks for
it.)  So, for Emscripten only, make failure of GetCABundleFile non-fatal in
InitCurl_easy.

*  Some code in sw was erroneously hidden behind !ENABLE_WASM_STRIP_EXTRA 
(off
by default for Emscripten), but is needed with HAVE_FEATURE_CURL.

*  See <https://emscripten.org/docs/porting/networking.html> for how to 
actually
use networking in an Emscripten application.

Change-Id: I2bbe9f3fd0e20143e18eb1e8104568b1c7a304de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172167
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/configure.ac b/configure.ac
index 61f961f66370..123c03e35661 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3204,7 +3204,6 @@ if test "$enable_wasm_strip" = "yes"; then
 enable_libcmis=no
 enable_coinmp=no
 enable_cups=no
-test "$_os" = Emscripten && enable_curl=no
 enable_database_connectivity=no
 enable_dbus=no
 enable_dconf=no
@@ -3239,10 +3238,9 @@ if test "$enable_wasm_strip" = "yes"; then
 test_libqxp=no
 test_libvisio=no
 test_libzmf=no
-test_webdav=no
 with_galleries=no
+with_gssapi=no
 with_templates=no
-with_webdav=no
 with_x=no
 
 test "${with_fonts+set}" = set || with_fonts=yes
diff --git a/external/curl/ExternalProject_curl.mk 
b/external/curl/ExternalProject_curl.mk
index d44f8e77ee2c..9d39e62e6fd3 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -20,7 +20,11 @@ $(eval $(call gb_ExternalProject_register_targets,curl,\
 
 ifneq ($(OS),WNT)
 
+ifeq ($(OS),EMSCRIPTEN)
+curl_CPPFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS)
+else
 curl_CPPFLAGS :=
+endif
 curl_LDFLAGS := $(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin 
-Wl$(COMMA)-rpath$(COMMA)\ORIGIN)
 
 ifneq ($(OS),ANDROID)
diff --git a/include/systools/curlinit.hxx b/include/systools/curlinit.hxx
index 7fe72370c858..5167a06d995f 100644
--- a/include/systools/curlinit.hxx
+++ b/include/systools/curlinit.hxx
@@ -34,10 +34,21 @@ static void InitCurl_easy(CURL* const pCURL)
 
 #if defined(LO_CURL_NEEDS_CA_BUNDLE)
 char const* const path = GetCABundleFile();
-rc = curl_easy_setopt(pCURL, CURLOPT_CAINFO, path);
-if (rc != CURLE_OK) // only if OOM?
+if (path == nullptr)
 {
-throw css::uno::RuntimeException(u"CURLOPT_CAINFO failed"_ustr);
+#if defined EMSCRIPTEN
+SAL_WARN("ucb.ucp.webdav.curl", "no OpenSSL CA certificate bundle 
found");
+#else
+throw css::uno::RuntimeException(u"no OpenSSL CA certificate bundle 
found"_ustr);
+#endif
+}
+else
+{
+rc = curl_easy_setopt(pCURL, CURLOPT_CAINFO, path);
+if (rc != CURLE_OK) // only if OOM?
+{
+throw css::uno::RuntimeException(u"CURLOPT_CAINFO failed"_ustr);
+}
 }
 #endif
 
diff --git a/include/systools/opensslinit.hxx b/include/systools/opensslinit.hxx
index be9cd43c58d5..45715d1bc0bf 100644
--- a/include/systools/opensslinit.hxx
+++ b/include/systools/opensslinit.hxx
@@ -36,7 +36,7 @@ static char const* GetCABundleFile()
 }
 }
 
-throw css::uno::RuntimeException(u"no OpenSSL CA certificate bundle 
found"_ustr);
+return nullptr;
 }
 #endif
 
diff --git a/sw/source/uibase/inc/translatehelper.hxx 
b/sw/source/uibase/in

core.git: unoidl/Module_unoidl.mk

2024-08-20 Thread Stephan Bergmann (via logerrit)
 unoidl/Module_unoidl.mk |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 399ed986e5a15988c8b08dc715ad698ef3f4fe83
Author: Stephan Bergmann 
AuthorDate: Tue Aug 20 22:37:13 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 21 07:25:40 2024 +0200

Clean up conditions in Module_unoidl

unoidl-check and unoidl-write are needed during the build.
unoidl-read and unoidl-write are part of the SDK.

Change-Id: I82fc79a09524fa14638b4d2daeafeeb024f1fd66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172159
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/unoidl/Module_unoidl.mk b/unoidl/Module_unoidl.mk
index 834c8668c661..01f7f8852ae3 100644
--- a/unoidl/Module_unoidl.mk
+++ b/unoidl/Module_unoidl.mk
@@ -9,17 +9,13 @@
 
 $(eval $(call gb_Module_Module,unoidl))
 
-# unoidl-check is needed as a component of the ODK / SDK package and
-# a build-tool. In case of cross-compiling a build-native tool must
-# be provided in addition to the ODK one (!CROSS_COMPILING phase).
-
 $(eval $(call gb_Module_add_targets,unoidl, \
-$(if $(filter DESKTOP,$(BUILD_TYPE)), \
+$(if $(call gb_not,$(CROSS_COMPILING)), \
+Executable_unoidl-check) \
+$(if $(filter ODK,$(BUILD_TYPE)), \
 Executable_unoidl-read) \
 $(if $(or $(filter ODK,$(BUILD_TYPE)),$(call gb_not,$(CROSS_COMPILING))), \
-Executable_unoidl-check \
-Executable_unoidl-write \
-) \
+Executable_unoidl-write) \
 Library_unoidl \
 ))
 


core.git: ucb/source

2024-08-20 Thread Stephan Bergmann (via logerrit)
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 85e4dc15d09dc3193870041b2814263971a27791
Author: Stephan Bergmann 
AuthorDate: Tue Aug 20 14:14:46 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Aug 20 23:35:34 2024 +0200

A more precise SAL_WARN message

Change-Id: I37d61f33c7b7cccde70b49d8926d21586e006964
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172155
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 4dec9779fd4e..e38e2851fc33 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -4077,7 +4077,7 @@ void Content::getResourceOptions(
 // not same as not found, this instead happens when the 
server doesn't exist or doesn't answer at all
 // probably a new bit stating 'timed out' should be added 
to opts var?
 // in any case abort the command
-SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAVException: 
DAV_HTTP_TIMEOUT or DAV_HTTP_CONNECT for URL <" << 
m_xIdentifier->getContentIdentifier() << ">" );
+SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAVException: 
DAV_HTTP_" << (e.getError() == DAVException::DAV_HTTP_TIMEOUT ? "TIMEOUT" : 
"CONNECT") << " for URL <" << m_xIdentifier->getContentIdentifier() << ">" );
 // cache the internal unofficial status code
 
 aDAVOptions.setHttpResponseStatusCode(e.getError() == 
DAVException::DAV_HTTP_CONNECT ? USC_CONNECT_FAILED : USC_CONNECTION_TIMED_OUT);


core.git: config_host.mk.in configure.ac desktop/Executable_soffice_bin.mk static/README.wasm.md

2024-08-20 Thread Stephan Bergmann (via logerrit)
 config_host.mk.in |2 +-
 configure.ac  |2 +-
 desktop/Executable_soffice_bin.mk |4 ++--
 static/README.wasm.md |2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit b88b5f53a2e5a40a673bbb587571cc068cae6d6e
Author: Stephan Bergmann 
AuthorDate: Tue Aug 20 17:52:49 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Aug 20 23:16:49 2024 +0200

More useful to have an EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS

...than an EMSCRIPTEN_EXTRA_SOFFICE_POST_JS.  That way, we can e.g. set up
Module.arguments there.

Change-Id: I4990ab6daac2f74326ab2ee9508828f1b79bceb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172154
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/config_host.mk.in b/config_host.mk.in
index 6d4e5036c70a..15b1c2b74e9a 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -147,7 +147,7 @@ export DPKG=@DPKG@
 export EBOOK_CFLAGS=$(gb_SPACE)@EBOOK_CFLAGS@
 export EBOOK_LIBS=$(gb_SPACE)@EBOOK_LIBS@
 export EMSDK_FILE_PACKAGER=@EMSDK_FILE_PACKAGER@
-export EMSCRIPTEN_EXTRA_SOFFICE_POST_JS=@EMSCRIPTEN_EXTRA_SOFFICE_POST_JS@
+export EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS=@EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS@
 export ENABLE_ANDROID_LOK=@ENABLE_ANDROID_LOK@
 export ENABLE_ANDROID_EDITING=@ENABLE_ANDROID_EDITING@
 export ENABLE_AVAHI=@ENABLE_AVAHI@
diff --git a/configure.ac b/configure.ac
index 1de3ce8e6b99..61f961f66370 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1489,7 +1489,7 @@ if test "$_os" = "Emscripten"; then
 BUILD_TYPE="$BUILD_TYPE EMSCRIPTEN"
 fi
 AC_SUBST(EMSDK_FILE_PACKAGER)
-AC_SUBST(EMSCRIPTEN_EXTRA_SOFFICE_POST_JS)
+AC_SUBST(EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS)
 
 ###
 # Extensions switches --enable/--disable
diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index be3b303190c2..f50cfb17633e 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -75,12 +75,12 @@ endif
 $(call gb_Executable_get_linktarget_target,soffice_bin): \
 $(gb_CustomTarget_workdir)/static/unoembind/bindings_uno.js \
 $(SRCDIR)/static/emscripten/uno.js \
-$(EMSCRIPTEN_EXTRA_SOFFICE_POST_JS)
+$(EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS)
 
 $(eval $(call gb_Executable_add_ldflags,soffice_bin, \
 --post-js $(gb_CustomTarget_workdir)/static/unoembind/bindings_uno.js \
 --post-js $(SRCDIR)/static/emscripten/uno.js \
-$(foreach i,$(EMSCRIPTEN_EXTRA_SOFFICE_POST_JS),--post-js $(i)) \
+$(foreach i,$(EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS),--pre-js $(i)) \
 ))
 
 ifeq ($(ENABLE_DBGUTIL)-$(gb_SUPPRESS_TESTS),TRUE-)
diff --git a/static/README.wasm.md b/static/README.wasm.md
index 48a109bd8469..8eb226f6e97e 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -264,7 +264,7 @@ put next to the `qt_soffice.html` that you serve to the 
browser (i.e., in
 Module.uno_scripts = ['./example.js'];
 ```
 And rebuild LO configured with an additional
-`EMSCRIPTEN_EXTRA_SOFFICE_POST_JS=/...path-to.../include.js`.
+`EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS=/...path-to.../include.js`.
 
 ## Tools for problem diagnosis
 


core.git: external/freetype

2024-08-20 Thread Stephan Bergmann (via logerrit)
 external/freetype/UnpackedTarball_freetype.mk |9 +
 external/freetype/logging.patch.0 |   11 +++
 2 files changed, 20 insertions(+)

New commits:
commit 370398910a23cf313c94a7ac279da94bce9e4de8
Author: Stephan Bergmann 
AuthorDate: Tue Aug 20 13:04:53 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Aug 20 21:35:14 2024 +0200

external/freetype: Enable debug logging support for --enable-dbgutil

Change-Id: I4f605166f5a6e0b2bd9196472db9ea3ad400d44c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172108
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/external/freetype/UnpackedTarball_freetype.mk 
b/external/freetype/UnpackedTarball_freetype.mk
index 5ea678f80280..7dcd942baa44 100644
--- a/external/freetype/UnpackedTarball_freetype.mk
+++ b/external/freetype/UnpackedTarball_freetype.mk
@@ -17,6 +17,15 @@ $(eval $(call gb_UnpackedTarball_add_patches,freetype,\
external/freetype/freetype-fd-hack.patch.0 \
 ))
 
+# Enable FreeType's FT_DEBUG_LOGGING at least in --enable-dbgutil builds (and 
see
+# workdir/UnpackedTarball/freetype/docs/DEBUG for how to actually make use of 
that by setting an
+# FT2_DEBUG environment variable at runtime):
+ifeq ($(ENABLE_DBGUTIL),TRUE)
+$(eval $(call gb_UnpackedTarball_add_patches,freetype, \
+external/freetype/logging.patch.0 \
+))
+endif
+
 $(eval $(call gb_UnpackedTarball_set_patchlevel,freetype,0))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/freetype/logging.patch.0 
b/external/freetype/logging.patch.0
new file mode 100644
index ..8ed2f05b1bb2
--- /dev/null
+++ b/external/freetype/logging.patch.0
@@ -0,0 +1,11 @@
+--- include/freetype/config/ftoption.h
 include/freetype/config/ftoption.h
+@@ -448,7 +448,7 @@
+*
+*   This option needs a C99 compiler.
+*/
+-/* #define FT_DEBUG_LOGGING */
++#define FT_DEBUG_LOGGING
+ 
+ 
+   /**


core.git: Repository.mk static/CustomTarget_wasm-qt5-mandelbrot_moc.mk static/Executable_wasm-qt5-mandelbrot.mk static/Module_static.mk static/README.wasm.md static/source

2024-08-19 Thread Stephan Bergmann (via logerrit)
 Repository.mk |1 
 static/CustomTarget_wasm-qt5-mandelbrot_moc.mk|   37 ---
 static/Executable_wasm-qt5-mandelbrot.mk  |   32 ---
 static/Module_static.mk   |4 
 static/README.wasm.md |1 
 static/source/qt5-mandelbrot/main.cxx |   66 --
 static/source/qt5-mandelbrot/mandelbrotwidget.cxx |  228 -
 static/source/qt5-mandelbrot/mandelbrotwidget.h   |   91 
 static/source/qt5-mandelbrot/renderthread.cxx |  232 --
 static/source/qt5-mandelbrot/renderthread.h   |   94 
 10 files changed, 786 deletions(-)

New commits:
commit af6a5ba20f7c69cb2f4818c780db9a60862d06a3
Author: Stephan Bergmann 
AuthorDate: Mon Aug 19 22:25:29 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Aug 20 07:58:01 2024 +0200

Remove wasm-qt-mandelbrot demo

...that had been added with f90c68316c622971706568303a025bbc58351df3 "WASM: 
add
Emscripten demo application".  Whatever the original intention, it has 
probably
served its purpose by now---and now only negatively impacts (re-)build 
times.

Change-Id: I2bda8d12b91e741c4d0f7d3f02597e0e9505a73a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172087
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/Repository.mk b/Repository.mk
index e372bc4b6fc8..6ef9293061f4 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -85,7 +85,6 @@ $(eval $(call gb_Helper_register_executables,NONE, \
listglyphs \
$(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), 
gtktiledviewer) \
$(if $(and $(ENABLE_GTKTILEDVIEWER), $(filter WNT,$(OS))), 
gtktiledviewer) \
-$(if $(filter EMSCRIPTEN,$(OS)),wasm-qt5-mandelbrot) \
 ))
 
 $(eval $(call gb_Helper_register_executables_for_install,SDK,sdk, \
diff --git a/static/CustomTarget_wasm-qt5-mandelbrot_moc.mk 
b/static/CustomTarget_wasm-qt5-mandelbrot_moc.mk
deleted file mode 100644
index 3d43dadb8832..
--- a/static/CustomTarget_wasm-qt5-mandelbrot_moc.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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_CustomTarget_CustomTarget,static/qt5-mandelbrot))
-
-$(call gb_CustomTarget_get_target,static/qt5-mandelbrot) : \
-   $(gb_CustomTarget_workdir)/static/qt5-mandelbrot/renderthread.moc \
-   $(gb_CustomTarget_workdir)/static/qt5-mandelbrot/mandelbrotwidget.moc \
-
-qt5_mandelbrot_MOCDEFS_H := 
$(gb_CustomTarget_workdir)/static/qt5-mandelbrot/moc_predefs.h
-qt5_mandelbrot_MOCDEFS_CXX := 
$(gb_CustomTarget_workdir)/static/qt5-mandelbrot/moc_dummy.cxx
-qt5_mandelbrot_WORKDIR :=  
$(gb_CustomTarget_workdir)/static/qt5-mandelbrot/.dir
-
-$(qt5_mandelbrot_MOCDEFS_CXX): | $(qt5_mandelbrot_WORKDIR)
-   touch $@
-
-$(qt5_mandelbrot_MOCDEFS_H): $(qt5_mandelbrot_MOCDEFS_CXX) | 
$(qt5_mandelbrot_WORKDIR)
-   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CXX,1)
-   $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),CXX)
-   $(CXX) -pipe -O2 -std=gnu++11 -fno-exceptions $(gb_EMSCRIPTEN_CPPFLAGS) 
-dM -E -o $@ $<
-   $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),CXX)
-
-$(gb_CustomTarget_workdir)/static/qt5-mandelbrot/%.moc : \
-   $(SRCDIR)/static/source/qt5-mandelbrot/%.h \
-   $(qt5_mandelbrot_MOCDEFS_H) | $(qt5_mandelbrot_WORKDIR)
-   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MOC,1)
-   $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),MOC)
-   $(MOC5) --include $(qt5_mandelbrot_MOCDEFS_H) $(gb_EMSCRIPTEN_QTDEFS) 
$< -o $@
-   $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),MOC)
-
-# vim: set noet sw=4:
diff --git a/static/Executable_wasm-qt5-mandelbrot.mk 
b/static/Executable_wasm-qt5-mandelbrot.mk
deleted file mode 100644
index e7eac989110e..
--- a/static/Executable_wasm-qt5-mandelbrot.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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_Executable_Executable,wasm-qt5-mandelbrot))
-
-$(eval $(call 
gb_Executable_use_custom_headers,wasm-qt5-mandelbrot,static/qt5-mandelbrot))
-
-$(eval $(call gb_Executable_use_externals,wasm-qt5-mandelbrot,\
-graphite \
-freetype \
-harfbuzz \
-libpng \
-qt5 \
-))
-
-$(eval $(call gb_Executable_add_exception_objects,wasm-qt5-mandelbrot,\
-s

core.git: 2 commits - solenv/gbuild static/README.wasm.md

2024-08-18 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |3 +++
 static/README.wasm.md  |   12 
 2 files changed, 15 insertions(+)

New commits:
commit e0178cfdba827dafcb192fec005ea45bd041c485
Author: Stephan Bergmann 
AuthorDate: Sun Aug 18 15:45:26 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Aug 18 17:43:51 2024 +0200

Emscripten: Document how Qt builds its own freetype, but we link against 
LO's

Change-Id: I6413c64db3d50f163ee9cc4feda395a54aab3cf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172012
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/static/README.wasm.md b/static/README.wasm.md
index c69129303aa5..9d005fe7f286 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -102,6 +102,18 @@ Current Qt fails to start the demo webserver: 
<https://bugreports.qt.io/browse/Q
 
 Use `emrun --serve_after_close` to run Qt WASM demos.
 
+Qt builds some 3rd-party libraries that it brings along (e.g., 
qt5/qtbase/src/3rdparty/freetype) and
+compiles its own code against the C/C++ include files of those 3rd-party 
libraries.  But when we
+link LO, we link against our own versions of those libraries' archives (e.g.,
+workdir/UnpackedTarball/freetype/instdir/lib/libfreetype.a), not against the 
Qt ones (e.g.,
+$QT5DIR/lib/libqtfreetype.a).  This mismatch between the include files that Qt 
is compiled against,
+vs. the archive actually linked in, seems to not cause issues in practice.  
(If it did, we could
+either try to make both Qt and LO link against e.g. -sUSE_FREETYPE from 
emscripten-ports, or we
+could move Qt from a prequisite to a proper external/qt5 LO module built 
during the LO build, and
+hack its configuration to build against LO's exernal/freetype etc.  The former 
approach, building Qt
+with -sUSE_FREETYPE, is even tried in qtbase/src/gui/configure.json, but 
apparently fails for
+reasons not studied further yet, cf. Qt's config.log.)
+
 ### Setup LO
 
 `autogen.sh` is patched to use emconfigure. That basically sets various
commit 4f41c19a03072b8c0ab7e882eea55a7f51619ef7
Author: Stephan Bergmann 
AuthorDate: Sun Aug 18 15:15:29 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Aug 18 17:43:39 2024 +0200

Emscripten: Increase the main thread stack size

At least when LO tries to download a document and
UUIInteractionHelper::handleErrorHandlerRequest wants to show a 
MessageDialog
via Qt, the stack grows relatively large, and gray_convert_glyph
(workdir/UnpackedTarball/freetype/src/smooth/ftgrays.c) alone allocates on 
the
stack a buffer of size FT_MAX_GRAY_POOL * sizeof(TCell) = 1024 * 16 = 16K, 
which
causes (silent, due to no -sSTACK_OVERFLOW_CHECK=2) stack overflow.

So (somewhat randomly) double the size of the main thread stack to 128K; 
but, at
least for now, keep the default value of 64K for other threads (which would
otherwise inherit the explicitly set -sSTACK_SIZE value via the
-sDEFUALT_PTHREAD_STACK_SIZE=0 default).

Change-Id: I96583f4af93c84b15c67f310068c5631fb129d40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172011
Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann 

diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 08ead6996a94..268d2dbf932e 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -17,6 +17,9 @@ gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS)
 # Initial memory size
 gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB
 
+# Double the main thread stack size, but keep the default value for other 
threads:
+gb_EMSCRIPTEN_LDFLAGS += -sSTACK_SIZE=131072 -sDEFAULT_PTHREAD_STACK_SIZE=65536
+
 # To keep the link time (and memory) down, prevent all rewriting options from 
wasm-emscripten-finalize
 # See emscripten.py, finalize_wasm, modify_wasm = True
 # So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)


core.git: solenv/gbuild

2024-08-18 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3d27d68c21bb868e9571a75f219dd8eac0063b16
Author: Stephan Bergmann 
AuthorDate: Sun Aug 18 15:05:32 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Aug 18 17:43:14 2024 +0200

Drop obsolete comment

...after 6e6451ce96f47e0ef5e8ecf1750f394ff3fb48e4 "Emscripten: Move the Qt 
event
loop off the JS main thread"

Change-Id: Iea9cb74fa2fc3dd036ee865e1bd8ede93fb33c78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172010
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 6ba9efe66a5c..08ead6996a94 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -14,7 +14,7 @@ gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
 gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1 -D_LARGEFILE64_SOURCE 
-D_LARGEFILE_SOURCE -s SUPPORT_LONGJMP=wasm
 gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS)
 
-# Initial memory size and worker thread pool
+# Initial memory size
 gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB
 
 # To keep the link time (and memory) down, prevent all rewriting options from 
wasm-emscripten-finalize


core.git: offapi/org unotest/Library_embindtest.mk unotest/source vcl/inc vcl/qt5 vcl/source vcl/win

2024-08-18 Thread Stephan Bergmann (via logerrit)
 offapi/org/libreoffice/embindtest/XTest.idl |1 
 unotest/Library_embindtest.mk   |2 +
 unotest/source/embindtest/embindtest.cxx|   29 
 unotest/source/embindtest/embindtest.js |1 
 vcl/inc/salinst.hxx |2 -
 vcl/qt5/QtInstance.cxx  |   11 ++
 vcl/source/app/salvtables.cxx   |2 -
 vcl/source/app/svapp.cxx|2 -
 vcl/source/app/svmain.cxx   |2 -
 vcl/win/gdi/salprn.cxx  |2 -
 10 files changed, 49 insertions(+), 5 deletions(-)

New commits:
commit 50cd19debbd3f94df0fc4b370f6f6e69d4a1e085
Author: Stephan Bergmann 
AuthorDate: Fri Aug 16 15:02:15 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Aug 18 15:10:00 2024 +0200

Emscripten: Clean up SolarMutex

...before disappearing through the QApplication::exec() hole, or else the
SolarMutex would remain locked forever on the application's main thread.

This requires changing SalInstance::ReleaseYieldMutexAll() to
SalInstance::ReleaseYieldMutex(bool all).  (Further recursive locking of the
SolarMutex via SolarMutexGuard instances that would be present on the call 
stack
leading up to the call to QApplication::exec() would be released during the
stack unwinding, so just undo the one acquiring done in InitVCL, not all of
them.)

Change-Id: I9ef57abb7da7f840999700e4eaeeefd2da784645
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171956
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/org/libreoffice/embindtest/XTest.idl 
b/offapi/org/libreoffice/embindtest/XTest.idl
index 8d46c9e71d5a..276ce260a8e1 100644
--- a/offapi/org/libreoffice/embindtest/XTest.idl
+++ b/offapi/org/libreoffice/embindtest/XTest.idl
@@ -133,6 +133,7 @@ interface XTest {
 void passInterface([in] com::sun::star::uno::XInterface object);
 boolean checkAttributes([in] org::libreoffice::embindtest::XAttributes 
object);
 [attribute] string StringAttribute;
+boolean testSolarMutex();
 };
 
 }; }; };
diff --git a/unotest/Library_embindtest.mk b/unotest/Library_embindtest.mk
index e71fedc069dd..be18ca4d792d 100644
--- a/unotest/Library_embindtest.mk
+++ b/unotest/Library_embindtest.mk
@@ -19,6 +19,8 @@ $(eval $(call gb_Library_use_libraries,embindtest, \
 cppu \
 cppuhelper \
 sal \
+salhelper \
+vcl \
 ))
 
 $(eval $(call gb_Library_use_sdk_api,embindtest))
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 292c492a4478..60150dcd2ad9 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -35,10 +35,12 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star::uno
 {
@@ -47,6 +49,24 @@ class XComponentContext;
 
 namespace
 {
+class TestThread : public salhelper::Thread
+{
+public:
+TestThread()
+: Thread("embindtest")
+{
+}
+
+bool value = false;
+
+private:
+void execute() override
+{
+SolarMutexGuard g;
+value = true;
+}
+};
+
 class Test : public cppu::WeakImplHelper
 {
 sal_Bool SAL_CALL getBoolean() override { return true; }
@@ -871,6 +891,15 @@ class Test : public 
cppu::WeakImplHelper
 
 void SAL_CALL setStringAttribute(OUString const& value) override { 
stringAttribute_ = value; }
 
+sal_Bool SAL_CALL testSolarMutex() override
+{
+TestThread t;
+t.launch();
+t.join();
+SolarMutexGuard g;
+return t.value;
+}
+
 OUString stringAttribute_ = u"hä"_ustr;
 };
 
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 2242e5f81a8f..f75653a897cf 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -901,6 +901,7 @@ Module.uno_init.then(function() {
 console.assert(test.StringAttribute === 'hä');
 test.StringAttribute = 'foo';
 console.assert(test.StringAttribute === 'foo');
+console.assert(test.testSolarMutex());
 
 const args = new Module.uno_Sequence_any(
 [new 
Module.uno_Any(Module.uno_Type.Interface('com.sun.star.uno.XInterface'), 
test)]);
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index 380ee2ce202e..1fbe86285054 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -137,7 +137,7 @@ public:
 
 // YieldMutex
 comphelper::SolarMutex* GetYieldMutex();
-sal_uInt32  ReleaseYieldMutexAll();
+sal_uInt32  ReleaseYieldMutex(bool all);
 voidAcquireYieldMutex(sal_uInt32 nCount = 1);
 
 // return true, if the current thread is the main thread
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 6872fb0

core.git: unotest/source

2024-08-18 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.cxx |   40 +++
 1 file changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 38b9d5e86dcab74288163bb8c6ad798e93e3bedf
Author: Stephan Bergmann 
AuthorDate: Fri Aug 16 15:25:04 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Aug 18 15:09:36 2024 +0200

Those XTest::is... methods return boolean, not any

Change-Id: Ie76e3551cac714fee56a087aed6aa851c4569209
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171957
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 963939fb71b5..292c492a4478 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -927,85 +927,85 @@ private:
 auto const val = ifcCpp->getBoolean();
 assert(val);
 auto const ok = ifcCpp->isBoolean(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getByte();
 assert(val == -12);
 auto const ok = ifcCpp->isByte(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getShort();
 assert(val == -1234);
 auto const ok = ifcCpp->isShort(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getUnsignedShort();
 assert(val == 54321);
 auto const ok = ifcCpp->isUnsignedShort(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getLong();
 assert(val == -123456);
 auto const ok = ifcCpp->isLong(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getUnsignedLong();
 assert(val == 3456789012);
 auto const ok = ifcCpp->isUnsignedLong(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getHyper();
 assert(val == -123456789);
 auto const ok = ifcCpp->isHyper(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getUnsignedHyper();
 assert(val == 9876543210);
 auto const ok = ifcCpp->isUnsignedHyper(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getFloat();
 assert(val == -10.25);
 auto const ok = ifcCpp->isFloat(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getDouble();
 assert(val == 100.5);
 auto const ok = ifcCpp->isDouble(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getChar();
 assert(val == u'Ö');
 auto const ok = ifcCpp->isChar(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getString();
 assert(val == u"hä"_ustr);
 auto const ok = ifcCpp->isString(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getType();
 assert(val == cppu::UnoType::get());
 auto const ok = ifcCpp->isType(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getEnum();
 assert(val == org::libreoffice::embindtest::Enum_E_2);
 auto const ok = ifcCpp->isEnum(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getStruct();
@@ -1034,37 +1034,37 @@ private:
  { u"barr"_ustr } },
ifcCpp }));
 auto const ok = ifcCpp->isStruct(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getStructLong();
 assert(val == org::libreoffice::embindtest::StructLong{ -123456 });
 auto const ok = ifcCpp->isStructLong(val);
-assert(ok == css::uno::Any(true));
+assert(ok);
 }
 {
 auto const val = ifcCpp->getStructString();
 

core.git: vcl/inc vcl/qt5

2024-08-16 Thread Stephan Bergmann (via logerrit)
 vcl/inc/qt5/QtFrame.hxx |4 
 vcl/qt5/QtFrame.cxx |4 
 2 files changed, 8 insertions(+)

New commits:
commit c767e78e629721771c1b9b16b647963ef652732d
Author: Stephan Bergmann 
AuthorDate: Fri Aug 16 09:52:41 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 16 13:37:56 2024 +0200

Keep SessionManagerInhibitor disabled for Emscripten

...after 2f6f717073084b17e9be80e32a87200bacd1b74c "qt: Drop X11 condition 
for
session/screensaver inhibition" caused

> em++: warning: 
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnpackedTarball/argon2/libargon2.a:
 archive is missing an index; Use emar when creating libraries to ensure an 
index is created [-Wemcc]
> em++: warning: 
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnpackedTarball/argon2/libargon2.a:
 adding index [-Wemcc]
> wasm-ld: error: 
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/instdir/program/libvclplug_qt5lo.a(QtFrame.o):
 undefined symbol: SessionManagerInhibitor::inhibit(bool, 
std::__2::basic_string_view>, 
ApplicationInhibitFlags, unsigned int, char const*)
> wasm-ld: error: 
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/instdir/program/libvclplug_qt5lo.a(QtFrame.o):
 undefined symbol: SessionManagerInhibitor::inhibit(bool, 
std::__2::basic_string_view>, 
ApplicationInhibitFlags, unsigned int, char const*)
> em++: error: '/home/tdf/lode/emsdk/upstream/bin/wasm-ld 
@/tmp/emscripten_3x0hflai.rsp.utf-8' failed (returned 1)
> make[1]: *** 
[/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_wasm/desktop/Executable_soffice_bin.mk:10:
 
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/instdir/program/soffice.html]
 Error 1

(<https://ci.libreoffice.org/job/lo_daily_tb_linux_wasm/800/>).  Most 
likely its
implementation would not work on Emscripten, anyway.

Change-Id: Ie7a643a8326df8c90645526930af21d54847a3ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171941
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/vcl/inc/qt5/QtFrame.hxx b/vcl/inc/qt5/QtFrame.hxx
index 57a1b8cd1e2c..147c44b58085 100644
--- a/vcl/inc/qt5/QtFrame.hxx
+++ b/vcl/inc/qt5/QtFrame.hxx
@@ -33,7 +33,9 @@
 
 #include 
 
+#if !defined EMSCRIPTEN
 #include 
+#endif
 #if CHECK_ANY_QT_USING_X11
 // any better way to get rid of the X11 / Qt type clashes?
 #undef Bool
@@ -101,7 +103,9 @@ class VCLPLUG_QT_PUBLIC QtFrame : public QObject, public 
SalFrame
 sal_uInt32 m_nRestoreScreen;
 QRect m_aRestoreGeometry;
 
+#if !defined EMSCRIPTEN
 SessionManagerInhibitor m_SessionManagerInhibitor;
+#endif
 #if CHECK_ANY_QT_USING_X11
 ModKeyFlags m_nKeyModifiers;
 #endif
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 80c03174c221..e3bc65e185d1 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -745,6 +745,7 @@ void QtFrame::ShowFullScreen(bool bFullScreen, sal_Int32 
nScreen)
 
 void QtFrame::StartPresentation(bool bStart)
 {
+#if !defined EMSCRIPTEN
 assert(m_aSystemData.platform != SystemEnvData::Platform::Invalid);
 
 #if CHECK_QT5_USING_X11
@@ -760,6 +761,9 @@ void QtFrame::StartPresentation(bool bStart)
 #else
 m_SessionManagerInhibitor.inhibit(bStart, u"presentation", 
APPLICATION_INHIBIT_IDLE);
 #endif
+#else
+Q_UNUSED(bStart)
+#endif
 }
 
 void QtFrame::SetAlwaysOnTop(bool bOnTop)


core.git: desktop/source static/emscripten

2024-08-15 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/appinit.cxx |   32 +++-
 static/emscripten/uno.js   |5 +
 2 files changed, 36 insertions(+), 1 deletion(-)

New commits:
commit e952204b4010a80775ce63a9986506f16d8d7cb9
Author: Stephan Bergmann 
AuthorDate: Thu Aug 15 15:18:29 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 15 17:16:27 2024 +0200

Emscripten: Establish a channel between browser and LO main threads

...to be used by external code, to mitigate the issue mentioned in the 
commit
message of 983eb3f0532dbf7e3edf4477ce63ec3d2795 "Emscripten: Run 
external
code on LO's main thread":  "Alternatively, running external code on the
browser's main thread rather than on LO's main thread could be more ideal 
in the
sense that the external code would then have access to the browser's 
document
object."

On the browser main thread, external JS code can now await a Module.uno_main
Promise that provides one port of a MessageChannel.  And on the LO main 
thread,
external JS code has access to the other port of that MessageChannel as
Module.uno_mainPort.  (And the external code is completely free in what
onmessage handlers to set up and what form of postMessage calls to use on 
those
two MessagePorts.)

Change-Id: Iab6bc7676c744eacb70ddd9f3f80f64e9efd1cf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171907
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 6f8bffa1146a..4490529a77ba 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -84,9 +84,36 @@ EM_JS(void, runUnoScriptUrl, (char16_t const * url), {
 }).then(blob => blob.text()).then(text => eval(text));
 });
 
+EM_JS(void, setupMainChannel, (), {
+const orig = self.onmessage;
+self.onmessage = function(e) {
+if (e.data.cmd === "LOWA-channel") {
+self.onmessage = orig;
+Module.uno_mainPort = e.ports[0];
+} else if (orig) {
+orig(e);
+}
+};
+});
+
+extern "C" void resolveUnoMain() {
+EM_ASM(
+let sofficeMain;
+for (const i in PThread.pthreads) {
+const worker = PThread.pthreads[i];
+if (worker.workerID === 1) {
+sofficeMain = worker;
+break;
+}
+}
+const channel = new MessageChannel();
+sofficeMain.postMessage({cmd:"LOWA-channel"}, [channel.port2]);
+Module.uno_main$resolve(channel.port1);
+);
+}
+
 void initUno() {
 init_unoembind_uno();
-EM_ASM(Module.uno_init$resolve(););
 std::vector urls;
 emscripten_sync_run_in_main_runtime_thread(EM_FUNC_SIG_VI, 
getUnoScriptUrls, &urls);
 for (auto const & url: urls) {
@@ -95,6 +122,9 @@ void initUno() {
 }
 runUnoScriptUrl(url.c_str());
 }
+setupMainChannel();
+EM_ASM(Module.uno_init$resolve(););
+emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_V, resolveUnoMain);
 }
 
 }
diff --git a/static/emscripten/uno.js b/static/emscripten/uno.js
index 7d051a24a84b..84b301f3e3b3 100644
--- a/static/emscripten/uno.js
+++ b/static/emscripten/uno.js
@@ -19,6 +19,11 @@ Module.uno_init = new Promise(function (resolve, reject) {
 Module.uno_init$reject = reject;
 });
 
+Module.uno_main = new Promise(function (resolve, reject) {
+Module.uno_main$resolve = resolve;
+Module.uno_main$reject = reject;
+});
+
 Module.catchUnoException = function(exception) {
 // Rethrow non-C++ exceptions (non-UNO C++ exceptions are mapped to 
css.uno.RuntimeException in
 // Module.getUnoExceptionFromCxaException):


Re: Help with .NET UNO Bridges for LibreOffice

2024-08-14 Thread Stephan Bergmann

On 8/15/24 05:42, Ritobroto Mukherjee wrote:

So to clarify, every thread has an UNO generated ID, independent of
its OS thread ID. Is this thread ID unique across a bridge or only
unique in a process/environment?


yes, see 
 
(though I can't remember how LO's URP implementations compute those 
globally unique TIDs; one would need to look into the code)



What I can get from the code is that UNO Threads are modeled as a pair
of JobQueues, one sync and one async, managed by the ThreadPool. Is
this correct?

[...]

And I assume the asynchronous calls are similar but without a "done"
blocking job?


Yeah, async messages complicate the picture somewhat.  In olden times, 
UNO had a concept of [oneway] interface methods (that had to have a void 
return type, and don't do a response message over URP, and can be 
executed on top of another synchronous execution job that is currently 
calling out to another environment and is thus blocked waiting for a 
response).  But today, the only remaining async operation in URP is the 
XInterface release operation, see 
.



That's because the older implementation in cli_ure/ uses a Microsoft
specific extension to C++ called C++/CLI, which allows seamless
interop between C++ and C#. This is however not cross-platform and
hence needs to be replaced with a combination of standard C++ and C#
to achieve cross-platform bridging for the GSoC project.


Ah, that's useful information.



core.git: desktop/source static/README.wasm.md

2024-08-14 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/appinit.cxx |   51 +++--
 static/README.wasm.md  |   14 ++-
 2 files changed, 62 insertions(+), 3 deletions(-)

New commits:
commit 983eb3f0532dbf7e3edf4477ce63ec3d2795
Author: Stephan Bergmann 
AuthorDate: Wed Aug 14 16:54:49 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 14 21:57:00 2024 +0200

Emscripten: Run external code on LO's main thread

...and not the browser's main thread.  Those are different threads now since
6e6451ce96f47e0ef5e8ecf1750f394ff3fb48e4 "Emscripten: Move the Qt event 
loop off
the JS main thread".  Running `Module.uno_init.then` on the browser's main
thread would never trigger, as that promise is only resolved on LO's main
thread.

When external code was included in soffice.js via
EMSCRIPTEN_EXTRA_SOFFICE_POST_JS, that didn't make a difference:  Emscripten
effectively replicates that code to all the worker threads, so whatever 
worker
thread resolved the Module.uno_init promise (i.e., the LO main thread) had 
the
external code available and ran it.  But when external code was included
directly in some HTML file (which "manually" provides a canvas and loads
soffice.js, not relying on the qt_soffice.html convenience functionality), 
it
was available in the browser's main thread but not in LO's main thread.  For
that use case, introduce a new Module.uno_scripts array that can be set up 
in
the HTML file to contain an array of URLs (represented as strings) of 
scripts to
load into LO's main thread.

(Alternatively, running external code on the browser's main thread rather 
than
on LO's main thread could be more ideal in the sense that the external code
would then have access to the browser's document object.  But, for one, it 
would
be less ideal in the sense that we would then potentially again execute LO 
code
(which we call into from the external code via UNO) on the browser's main
thread, which would bring back the issues that
6e6451ce96f47e0ef5e8ecf1750f394ff3fb48e4 "Emscripten: Move the Qt event 
loop off
the JS main thread" solved.  And, for another, when I experimentally tried 
it
out, it caused massive Qt threading issues, so I quickly gave up again.)

Change-Id: If01a7859751706f168e93ccac75758ae5ce17cd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171870
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index f2b7edba1c8e..6f8bffa1146a 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -19,6 +19,10 @@
 
 
 #include 
+#include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
@@ -46,6 +50,8 @@
 
 #if defined EMSCRIPTEN
 #include 
+#include 
+#include 
 #include 
 #endif
 
@@ -53,6 +59,48 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::ucb;
 
+#if defined EMSCRIPTEN
+
+namespace {
+
+extern "C" void getUnoScriptUrls(std::vector * urls) {
+assert(urls != nullptr);
+auto const val = emscripten::val::module_property("uno_scripts");
+if (!val.isUndefined()) {
+auto const len = val["length"].as();
+for (std::uint32_t i = 0; i != len; ++i) {
+urls->push_back(val[i].as());
+}
+}
+}
+
+EM_JS(void, runUnoScriptUrl, (char16_t const * url), {
+fetch(UTF16ToString(url)).then(res => {
+if (!res.ok) {
+throw Error(
+"Loading <" + res.url + "> failed with " + res.status + " " + 
res.statusText);
+}
+return res.blob();
+}).then(blob => blob.text()).then(text => eval(text));
+});
+
+void initUno() {
+init_unoembind_uno();
+EM_ASM(Module.uno_init$resolve(););
+std::vector urls;
+emscripten_sync_run_in_main_runtime_thread(EM_FUNC_SIG_VI, 
getUnoScriptUrls, &urls);
+for (auto const & url: urls) {
+if (url.find('
+throw std::invalid_argument("Module.uno_scripts element contains 
embedded NUL");
+}
+runUnoScriptUrl(url.c_str());
+}
+}
+
+}
+
+#endif
+
 namespace desktop
 {
 
@@ -86,8 +134,7 @@ void Desktop::InitApplicationServiceManager()
 #endif
 comphelper::setProcessServiceFactory(sm);
 #if defined EMSCRIPTEN
-init_unoembind_uno();
-EM_ASM(Module.uno_init$resolve(););
+initUno();
 #endif
 }
 
diff --git a/static/README.wasm.md b/static/README.wasm.md
index 84635d09390d..c69129303aa5 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -241,7 +241,19 @@ Module.uno_init.then(function() {
 });
 ```
 
-
+If you enter the above examples into the browser console, you need to enter 
them into the

core.git: vcl/inc

2024-08-13 Thread Stephan Bergmann (via logerrit)
 vcl/inc/headless/SvpGraphicsBackend.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0f186fb79d292d5123153873286addfb29ebd8da
Author: Stephan Bergmann 
AuthorDate: Tue Aug 13 18:02:28 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 14 07:40:58 2024 +0200

UBSan SAL_USE_VCLPLUGIN=qt5 needs SvpGraphicsBackend RTTI

...as it leaks out of Library_vcl into Library_vcplug_qt5 via
GenPspGraphics::m_pBackend in vcl/inc/unx/genpspgraphics.h, included from
vcl/qt5/QtInstance_Print.cxx

Change-Id: Id89217f1eef346b70a7f9269c2dc76e28b78ca69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171835
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/vcl/inc/headless/SvpGraphicsBackend.hxx 
b/vcl/inc/headless/SvpGraphicsBackend.hxx
index 4475216148c0..dc028b465a29 100644
--- a/vcl/inc/headless/SvpGraphicsBackend.hxx
+++ b/vcl/inc/headless/SvpGraphicsBackend.hxx
@@ -27,7 +27,7 @@
 
 #include 
 
-class SvpGraphicsBackend final : public SalGraphicsImpl
+class SAL_DLLPUBLIC_RTTI SvpGraphicsBackend final : public SalGraphicsImpl
 {
 CairoCommon& m_rCairoCommon;
 


core.git: sw/inc

2024-08-13 Thread Stephan Bergmann (via logerrit)
 sw/inc/unotbl.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 509aa9e70535ab9b0e317983b1ca0f0423ce70b6
Author: Stephan Bergmann 
AuthorDate: Tue Aug 13 07:29:18 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 13 13:25:51 2024 +0200

UBSan CppunitTest_sw_writerfilter_misc needs the SwXTableRows now

...presumably since 883febd60593e8a3c0c85c9859006cc0a35b10c2 "use more 
concrete
UNO type in writerfilter",

> DynamicLibraryManagerException: "Failed to load dynamic library: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/LinkTarget/CppunitTest/libtest_sw_writerfilter_misc.so
> 
/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libsw_writerfilterlo.so:
 undefined symbol: _ZTI12SwXTableRows"

(<https://ci.libreoffice.org//job/lo_ubsan/3273/>)

Change-Id: I856ff7e2d7f31c83ad75b301caf4f8084f3e19a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171806
Reviewed-by: Noel Grandin 
Tested-by: Jenkins

diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index de6a1e3d833a..d42e9460570e 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -423,7 +423,7 @@ public:
 };
 
 /// UNO API wrapper for SwTableLines.
-class SwXTableRows final : public cppu::WeakImplHelper
+class SAL_DLLPUBLIC_RTTI SwXTableRows final : public cppu::WeakImplHelper
 <
 css::table::XTableRows,
 css::lang::XServiceInfo


core.git: desktop/Executable_soffice_bin.mk solenv/gbuild static/emscripten static/README.wasm.md

2024-08-12 Thread Stephan Bergmann (via logerrit)
 desktop/Executable_soffice_bin.mk  |1 +
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |2 +-
 static/README.wasm.md  |5 -
 static/emscripten/environment.js   |1 +
 4 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 6e6451ce96f47e0ef5e8ecf1750f394ff3fb48e4
Author: Stephan Bergmann 
AuthorDate: Mon Aug 12 13:04:48 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Aug 12 16:31:35 2024 +0200

Emscripten: Move the Qt event loop off the JS main thread

...so that spawning and joining new threads works now and we no longer need 
a
hardcoded -sPTHREAD_POOL_SIZE of pre-spawned threads (see
b84ef4d67eaf9f9fd7fd700ca05339cb0cdff742 "Adapt comphelper::ThreadPool to
Emscripten's threading needs"; lets keep MAX_CONCURRENCY capped at 4, at 
least
for now, though).

This requires

<https://github.com/allotropia/qtbase/commit/167b08844df06e3cea85c98161b26e97442ab242>
"Minimal support for Emscripten -sPROXY_TO_PTHREAD=1" and

<https://github.com/allotropia/qtbase/commit/c722a25630a5390f18a4d974aa942f6376fcb8e1>
"Implement QWasmCursor::changeCursor for Emscripten PROXY_TO_PTHREAD case" 
(see
TODOs there).

Change-Id: I8cea827bd7786e3c9fd9401b4b2bef9d3ec00d5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171758
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index 350e4a84a0b8..be3b303190c2 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -63,6 +63,7 @@ $(call gb_Executable_get_linktarget_target,soffice_bin): \
 
 $(eval $(call gb_Executable_add_ldflags,soffice_bin,\
-s 
EXPORTED_FUNCTIONS=@$(gb_CustomTarget_workdir)/desktop/soffice_bin-emscripten-exports/exports
 -Wl$(COMMA)--whole-archive $(call gb_StaticLibrary_get_target,unoembind) 
-Wl$(COMMA)--no-whole-archive \
+   -sPROXY_TO_PTHREAD=1 -sOFFSCREENCANVAS_SUPPORT=1 
-sOFFSCREENCANVASES_TO_PTHREAD=\#qtcanvas \
 ))
 ifeq ($(ENABLE_QT6),TRUE)
 $(eval $(call gb_Executable_add_ldflags,soffice_bin, \
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 3898ead4448d..6ba9efe66a5c 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -15,7 +15,7 @@ gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1 
-D_LARGEFILE64_SOURCE -D_LA
 gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS)
 
 # Initial memory size and worker thread pool
-gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=6
+gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB
 
 # To keep the link time (and memory) down, prevent all rewriting options from 
wasm-emscripten-finalize
 # See emscripten.py, finalize_wasm, modify_wasm = True
diff --git a/static/README.wasm.md b/static/README.wasm.md
index de595b19b459..84635d09390d 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -64,11 +64,14 @@ With "-opensource -confirm-license" you agree to the open 
source license.
 
 git clone https://github.com/allotropia/qt5.git
 cd qt5
-git checkout v5.15.2+wasm
+git checkout 5.15.2+wasm
 ./init-repository --module-subset=qtbase
 ./configure -opensource -confirm-license -xplatform wasm-emscripten 
-feature-thread -prefix  QMAKE_CFLAGS+=-sSUPPORT_LONGJMP=wasm 
QMAKE_CXXFLAGS+=-sSUPPORT_LONGJMP=wasm
 make -j module-qtbase
 
+Note that `5.15.2+wasm` is a branch that is expected to contain further fixes 
as they become
+necessary.
+
 Do not include `-fwasm-exceptions` in the above `QMAKE_CXXFLAGS`, see
 
<https://emscripten.org/docs/api_reference/emscripten.h.html#c.emscripten_set_main_loop>
 "Note:
 Currently, using the new Wasm exception handling and simulate_infinite_loop == 
true at the same time
diff --git a/static/emscripten/environment.js b/static/emscripten/environment.js
index 4e5d1f98c596..74536a665ccc 100644
--- a/static/emscripten/environment.js
+++ b/static/emscripten/environment.js
@@ -5,3 +5,4 @@ Module.preRun.push(function() {
 ENV.MAX_CONCURRENCY = '4';
 ENV.SAL_LOG = "+WARN"
 });
+Module.ignoreApplicationExit = true;


Re: Help with .NET UNO Bridges for LibreOffice

2024-08-12 Thread Stephan Bergmann

On 8/10/24 15:19, Ritobroto Mukherjee wrote:

1) Managed Bridge

The managed bridge is a completely C# reimplementation of the bridge,
including the URP protocol, and is based on the ridljar/ and binaryurp/
modules. It is less fleshed out right now, only containing
implementations of some of the interfaces and services. I'm trying to
understand the Java UNO bridge in ridljar/ and the C++ binaryurp/
modules so I could port them to C#, and they include a pair of classes
named JobQueue and ThreadPool in there that I'm having trouble
understanding what role they play and how they handle threads and jobs.

I would really appreciate it if someone can explain how they work.


The overall idea is that UNO is multithreaded across the involved 
processes, and each such abstract thread has a unique ID that it carries 
across all the processes (and different language runtimes, in each 
process) it executes on.  The runtimes then need to make sure that each 
abstract thread is mapped to exactly one process thread (and that no two 
concurrently active abstract threads share a single process thread, as 
that could lead to deadlock).  The details are at 
.


So the typical implementation is that in a process you have a thread 
pool with one thread for each abstract UNO thread that is currently 
active in that process.  A call coming in via URP is modeled as some job 
that is sent to the matching process thread; and when those threads 
execute synchronous calls that reach out to remote URP endpoints, they 
block waiting on a corresponding "done" response, which is turned into a 
job that unblocks the matching process thread again.



2) Native Bridge

The native bridge uses P/Invoke to reuse the existing C++ bootstrap and
bridge code via C#. It is at a stage where parameter-less functions and
interface attribute getters are mostly implemented. However, I am
facing challenges with marshaling and unmarshaling various types of
parameters between C# and native memory, including complex types such
as arrays and structs, and managing object lifetimes (acquire and
release calls).


I'm not very familiar with the existing UNO .Net binding, but I wonder 
why you would need to implement something new from scratch at 
bridges/source/net_uno/ rather than continue using what is already 
available in cli_ure/?



Should arrays be pinned or copied to native memory, and same for
structs? Would lumping all parameter data in a single block of memory
be better?


Sorry, I'm way to unfamiliar with the UNO .Net bindings to give you a 
useful answer here.


core.git: Branch 'distro/mimo/mimo-7-3' - 6 commits - configure.ac desktop/source download.lst extensions/source external/curl external/libcmis include/curlinit.hxx svl/source ucb/source

2024-08-09 Thread Stephan Bergmann (via logerrit)
 configure.ac   
  |   18 
 desktop/source/app/updater.cxx 
  |4 
 desktop/source/minidump/minidump.cxx   
  |4 
 download.lst   
  |8 
 extensions/source/update/check/download.cxx
  |4 
 external/curl/README   
  |2 
 
external/libcmis/0001-rename-class-GetObject-to-avoid-name-clash-on-Window.patch
 |   69 
 external/libcmis/UnpackedTarball_libcmis.mk
  |8 
 external/libcmis/libcmis-boost-string.patch
  |   11 
 external/libcmis/libcmis-libxml2_compatibility.patch   
  |   14 
 external/libcmis/libcmis_gdrive.patch.1
  |  702 --
 external/libcmis/libcmis_oauth_pw_as_refreshtoken.patch.1  
  |  185 --
 external/libcmis/libcmis_onedrive.patch
  |  445 --
 include/curlinit.hxx   
  |   59 
 svl/source/crypto/cryptosign.cxx   
  |6 
 ucb/source/ucp/cmis/auth_provider.hxx  
  |8 
 ucb/source/ucp/cmis/cmis_content.cxx   
  |4 
 ucb/source/ucp/ftp/ftploaderthread.cxx 
  |4 
 ucb/source/ucp/webdav-curl/CurlSession.cxx 
  |2 
 19 files changed, 94 insertions(+), 1463 deletions(-)

New commits:
commit 226651260fef867060e4b1d7807acea4dbedf6d8
Author: Stephan Bergmann 
AuthorDate: Mon Jul 31 21:34:49 2023 +0200
Commit: Aron Budea 
CommitDate: Thu Aug 8 04:48:51 2024 +0200

Update to curl-8.2.1.tar.xz

...obtained from <https://curl.se/download/curl-8.2.1.tar.xz>

Change-Id: I7260f79e2f72501869ff58c77f0d9dfa3ebdece1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155116
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 85c07891ad9424661d8e1adb8e93364e3964ce34)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155133
Reviewed-by: Xisco Fauli 
(cherry picked from commit 4b8da4693bf5322e4f18ae9168ec434c99f4f9f6)

diff --git a/download.lst b/download.lst
index 53d9eb8bbe6f..53404b35f696 100644
--- a/download.lst
+++ b/download.lst
@@ -37,8 +37,8 @@ export CPPUNIT_SHA256SUM := 
89c5c6665337f56fd2db36bc3805a5619709d51fb136e5193707
 export CPPUNIT_TARBALL := cppunit-1.15.1.tar.gz
 export CT2N_SHA256SUM := 
71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3
 export CT2N_TARBALL := 
1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
-export CURL_SHA256SUM := 
31b1118eb8bfd43cd95d9a3f146f814ff874f6ed3999b29d94f4d1e7dbac5ef6
-export CURL_TARBALL := curl-8.1.2.tar.xz
+export CURL_SHA256SUM := 
dd322f6bd0a20e6cebdfd388f69e98c3d183bed792cf4713c8a7ef498cba4894
+export CURL_TARBALL := curl-8.2.1.tar.xz
 export EBOOK_SHA256SUM := 
7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9
 export EBOOK_TARBALL := libe-book-0.1.3.tar.xz
 export EPOXY_SHA256SUM := 
a7ced37f4102b745ac86d6a70a9da399cc139ff168ba6b8002b4d8d43c900c15
commit d3d0c5ec145c4d593e18cf08f02d662a85d7f1bb
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sat Jun 10 15:57:28 2023 +0900
Commit: Aron Budea 
CommitDate: Thu Aug 8 04:47:25 2024 +0200

curl: upgrade to release 8.1.2

Fixes CVE-2023-28321, CVE-2023-28322, and 2 more CVEs that
probably don't affect LibreOffice.

Change-Id: If8720ba3647216063bffc8678aa64dad9a317128
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152809
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi  <20001...@ymail.ne.jp>
Reviewed-by: Michael Stahl 
(cherry picked from commit dc19ef0d42e89edffcc21795194eb1eeb5957d0f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152888
Reviewed-by: Xisco Fauli 
(cherry picked from commit 244fdcf2f4a318b876acb20594811c8905125739)

diff --git a/download.lst b/download.lst
index fb8f0e2c4a3d..53d9eb8bbe6f 100644
--- a/download.lst
+++ b/download.lst
@@ -37,8 +37,8 @@ export CPPUNIT_SHA256SUM := 
89c5c6665337f56fd2db36bc3805a5619709d51fb136e5193707
 export CPPUNIT_TARBALL := cppunit-1.15.1.tar.gz
 export CT2N_SHA256SUM := 
71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3
 export CT2N_TARBALL := 
1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
-export CURL_SHA256SUM := 
0a381cd82f4d00a9a334438b8ca239afea5bfefcfa9a1025f2bf118e79e0b5f0
-export CURL_TARBALL := curl-8.0.1.tar.xz
+export CURL_SHA256SUM := 
31b1118eb8bfd43cd95d9a3f146f814ff874f6ed3

core.git: solenv/gbuild

2024-08-09 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/platform/com_GCC_class.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit da00cd9ef98bd1910be1d91d2d7a57278f818c76
Author: Stephan Bergmann 
AuthorDate: Fri Aug 9 13:11:02 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 9 14:24:42 2024 +0200

Avoid -Werror,-Wunused-command-line-argument in CompilerTests

...after

<https://github.com/llvm/llvm-project/commit/6461e537815f7fa68cef06842505353cf5600e9c>
"[Driver] Don't claim -c/-S",

> [CPT] sal/qa/rtl/strings/compile-oustring.cxx
> clang++: error: argument unused during compilation: '-c' 
[-Werror,-Wunused-command-line-argument]

etc.

Change-Id: I2a128c21fdc8a8858981a359880cf1d92c60cd68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171692
    Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/solenv/gbuild/platform/com_GCC_class.mk 
b/solenv/gbuild/platform/com_GCC_class.mk
index 6c81efcc6e35..cb6e37e39422 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -82,7 +82,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(6), $(call 
gb_CObject__filter_out_clang_cflags,$(2)),$(2)) \
$(if $(WARNINGS_DISABLED),$(gb_CXXFLAGS_DISABLE_WARNINGS)) \
$(if 
$(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \
-   -c $(3) \
+   $(if $(COMPILER_TEST),,-c) $(3) \
-o $(1) \
$(if $(COMPILER_TEST),,$(call 
gb_cxx_dep_generation_options,$(1),$(4))) \
$(INCLUDE) \


heap-use-after-free in ~ScDocument

2024-08-09 Thread Stephan Bergmann
with an (Linux ASan) master build from earlier today, 
JunitTest_svx_unoapi seems to fail in various unclear ways, but at least 
one attempt showed a



==1998659==ERROR: AddressSanitizer: heap-use-after-free on address 
0x51900064d5a9 at pc 0x7f314553a04b bp 0x7f30e0df9a80 sp 0x7f30e0df9a78
READ of size 1 at 0x51900064d5a9 thread T25
 #0 in SdrModel::IsInDestruction() const at include/svx/svdmodel.hxx:602:43
 #1 in SdrObject::IsInDestruction() const at 
svx/source/svdraw/svdobj.cxx:3068:39
 #2 in sdr::properties::AttributeProperties::Notify(SfxBroadcaster&, SfxHint 
const&) at svx/source/sdr/properties/attributeproperties.cxx:460:38
 #3 in sdr::properties::TextProperties::Notify(SfxBroadcaster&, SfxHint const&) 
at svx/source/sdr/properties/textproperties.cxx:549:34
 #4 in SfxBroadcaster::Broadcast(SfxHint const&) at 
svl/source/notify/SfxBroadcaster.cxx:40:24
 #5 in SfxStyleSheet::~SfxStyleSheet() at svl/source/items/style.cxx:817:5
 #6 in ScStyleSheet::~ScStyleSheet() at sc/source/core/data/stlsheet.cxx:70:1
 #7 in ScStyleSheet::~ScStyleSheet() at sc/source/core/data/stlsheet.cxx:69:1
 #8 in cppu::OWeakObject::release() at cppuhelper/source/weak.cxx:229:9
 #9 in cppu::WeakImplHelper<>::release() at 
include/cppuhelper/implbase.hxx:115:66
 #10 in rtl::Reference::clear() at include/rtl/ref.hxx:193:19
 #11 in svl::IndexedStyleSheets::Clear(svl::StyleSheetDisposer&) at 
svl/source/items/IndexedStyleSheets.cxx:200:22
 #12 in SfxStyleSheetBasePool::~SfxStyleSheetBasePool() at 
svl/source/items/style.cxx:614:34
 #13 in SfxStyleSheetPool::~SfxStyleSheetPool() at include/svl/style.hxx:305:21
 #14 in ScStyleSheetPool::~ScStyleSheetPool() at 
sc/source/core/data/stlpool.cxx:64:1
 #15 in ScStyleSheetPool::~ScStyleSheetPool() at 
sc/source/core/data/stlpool.cxx:63:1
 #16 in cppu::OWeakObject::release() at cppuhelper/source/weak.cxx:229:9
 #17 in cppu::WeakImplHelper<>::release() at 
include/cppuhelper/implbase.hxx:115:66
 #18 in rtl::Reference::clear() at include/rtl/ref.hxx:193:19
 #19 in ScPoolHelper::~ScPoolHelper() at sc/source/core/data/poolhelp.cxx:41:17
 #20 in ScPoolHelper::~ScPoolHelper() at sc/source/core/data/poolhelp.cxx:37:1
 #21 in salhelper::SimpleReferenceObject::release() at 
include/salhelper/simplereferenceobject.hxx:76:49
 #22 in rtl::Reference::clear() at include/rtl/ref.hxx:193:19
 #23 in ScDocument::~ScDocument() at sc/source/core/data/documen2.cxx:424:18
 #24 in void std::destroy_at(ScDocument*) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/stl_construct.h:88:15
 #25 in void std::_Destroy(ScDocument*) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/stl_construct.h:149:7
 #26 in void 
std::allocator_traits>::destroy(std::allocator&,
 ScDocument*) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/alloc_traits.h:671:4
 #27 in std::_Sp_counted_ptr_inplace, 
(__gnu_cxx::_Lock_policy)2>::_M_dispose() at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/shared_ptr_base.h:616:2
 #28 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/shared_ptr_base.h:346:8
 #29 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/shared_ptr_base.h:1069:11
 #30 in std::__shared_ptr::~__shared_ptr() at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/shared_ptr_base.h:1525:31
 #31 in std::shared_ptr::~shared_ptr() at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/shared_ptr.h:175:11
 #32 in ScDocShell::~ScDocShell() at sc/source/ui/docshell/docsh.cxx:3013:1
 #33 in ScDocShell::~ScDocShell() at sc/source/ui/docshell/docsh.cxx:2983:1
 #34 in cppu::OWeakObject::release() at cppuhelper/source/weak.cxx:229:9
 #35 in rtl::Reference::~Reference() at 
include/rtl/ref.hxx:126:22
 #36 in IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() at 
sfx2/source/doc/sfxbasemodel.cxx:265:5
 #37 in void 
std::destroy_at(IMPL_SfxBaseModel_DataContainer*)
 at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/stl_construct.h:88:15
 #38 in void 
std::_Destroy(IMPL_SfxBaseModel_DataContainer*)
 at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/stl_construct.h:149:7
 #39 in void 
std::allocator_traits>::destroy(std::allocator&,
 IMPL_SfxBaseModel_DataContainer*) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/alloc_traits.h:671:4
 #40 in std::_Sp_counted_ptr_inplace, (__gnu_cxx::_Lock_policy)2>::_M_dispose() at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/shared_ptr_base.h:616:2
 #41 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() at 
~/gcc/inst/lib/gcc/

core.git: vcl/source

2024-08-09 Thread Stephan Bergmann (via logerrit)
 vcl/source/app/svapp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9065a5b7b7fdcc2425bac78d64d6deb61edbfc57
Author: Stephan Bergmann 
AuthorDate: Fri Aug 9 11:12:48 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 9 12:33:32 2024 +0200

Under Application::IsOnSystemEventLoop, do nothing in 
Application::Reschedule

...as e.g. loading an HTML document via SwHTMLParser calls it at various 
places,
presumably to make loading more responsive for the user, but without any
functional impact beyond that.  So instead of aborting better just do 
nothing.

Change-Id: I99350ab98b1b75be9a8c7adcc72973174bc258e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171688
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index e3332817f4e4..458da9d8c251 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -399,7 +399,7 @@ bool Application::Reschedule( bool i_bAllEvents )
 if (bAbort)
 {
 SAL_WARN("vcl.schedule", "Application::Reschedule(" << i_bAllEvents << 
")");
-std::abort();
+return false;
 }
 return ImplYield(false, i_bAllEvents);
 }


core.git: sw/inc

2024-08-09 Thread Stephan Bergmann (via logerrit)
 sw/inc/unocoll.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c103bf49619a0a3f0fbb0d89bf3b7e7261a7b8a7
Author: Stephan Bergmann 
AuthorDate: Fri Aug 9 08:40:01 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 9 10:05:35 2024 +0200

UBSan CppunitTest_sw_writerfilter_misc needs the SwXFootnotes now

...presumably since 5b1bf578fb23ab929602715077138a5362dcb5ce "use more 
concrete
UNO type in writerfilter",

> DynamicLibraryManagerException: "Failed to load dynamic library: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/LinkTarget/CppunitTest/libtest_sw_writerfilter_misc.so
> 
/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libsw_writerfilterlo.so:
 undefined symbol: _ZTI12SwXFootnotes"

(<https://ci.libreoffice.org//job/lo_ubsan/3268/>)

Change-Id: I3be4a8b804cd02d62e38075b3b601360c5c299ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171663
Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann 

diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
index 365336ad61f3..0e2a5e1d1d68 100644
--- a/sw/inc/unocoll.hxx
+++ b/sw/inc/unocoll.hxx
@@ -453,7 +453,7 @@ cppu::WeakImplHelper
 >
 SwSimpleIndexAccessBaseClass;
 
-class SwXFootnotes final : public SwSimpleIndexAccessBaseClass,
+class SAL_DLLPUBLIC_RTTI SwXFootnotes final : public 
SwSimpleIndexAccessBaseClass,
  public SwUnoCollection
 {
 const bool m_bEndnote;


core.git: sw/inc

2024-08-08 Thread Stephan Bergmann (via logerrit)
 sw/inc/unofieldcoll.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d36dda5d52d56bf684b7ebe3cc26d8c1e49382c0
Author: Stephan Bergmann 
AuthorDate: Thu Aug 8 08:31:22 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 8 10:26:38 2024 +0200

UBSan CppunitTest_sw_writerfilter_misc needs the SwXTextFieldMasters now

...presumably since 85b2d335a4ec0af84ca4801ba04f45f0ed5a7c10 "use more 
concrete
UNO type in writerfilter",

> DynamicLibraryManagerException: "Failed to load dynamic library: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/LinkTarget/CppunitTest/libtest_sw_writerfilter_misc.so
> 
/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libsw_writerfilterlo.so:
 undefined symbol: _ZTI19SwXTextFieldMasters"

(<https://ci.libreoffice.org//job/lo_ubsan/3266/>)

Change-Id: I312cad93ec81546bbd7c67ec725815a07378b462
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171617
Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann 

diff --git a/sw/inc/unofieldcoll.hxx b/sw/inc/unofieldcoll.hxx
index 7989cb52b919..658fb27b3130 100644
--- a/sw/inc/unofieldcoll.hxx
+++ b/sw/inc/unofieldcoll.hxx
@@ -34,7 +34,7 @@ typedef ::cppu::WeakImplHelper
 ,   css::lang::XServiceInfo
 > SwXTextFieldMasters_Base;
 
-class SwXTextFieldMasters final
+class SAL_DLLPUBLIC_RTTI SwXTextFieldMasters final
 : public SwXTextFieldMasters_Base
 , public SwUnoCollection
 {


core.git: desktop/source static/README.wasm.md

2024-08-07 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/sofficemain.cxx |   15 +--
 static/README.wasm.md  |7 +++
 2 files changed, 20 insertions(+), 2 deletions(-)

New commits:
commit 146fafa691e63de00d6030d88626833ab43d7a65
Author: Stephan Bergmann 
AuthorDate: Wed Aug 7 15:01:25 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 7 17:18:34 2024 +0200

I finally understand why we need that hack

...that 77129fbb74bcefde4551d494f029169e7c6026e3 "Emscripten: Add hack to
prepare for --enable-wasm-exceptions" was puzzled about

Change-Id: Iba54a77e3c2a71fe45b97795ca2da0606c3adf41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171594
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/source/app/sofficemain.cxx 
b/desktop/source/app/sofficemain.cxx
index 9470add3b488..bfa1a66d886a 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -75,8 +75,19 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
 tools::extendApplicationEnvironment();
 
 #if defined EMSCRIPTEN
-//TODO, see "Experimental (AKA currently broken) WASM exception + SjLj 
build" in
-// static/README.wasm.md:
+//HACK: Qt5 QWasmEventDispatcher::processEvents
+// (qtbase/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp) calls
+// emscripten_set_main_loop_arg with simulateInfiniteLoop == true, and as 
we use
+// -fwasm-exceptions (cf. solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk), 
aDesktop allocated on
+// the stack would run into the issue warned about at
+// 
<https://emscripten.org/docs/api_reference/emscripten.h.html#c.emscripten_set_main_loop>
+// "Note: Currently, using the new Wasm exception handling and 
simulate_infinite_loop == true at
+// the same time does not work yet in C++ projects that have objects with 
destructors on the
+// stack at the time of the call."  (Also see the mailing list thread at
+// <https://groups.google.com/g/emscripten-discuss/c/xpWDVwyJu-M> 
"Implementation of
+// -fexceptions and -fwasm-exceptions" for why such automatic variables 
are destroyed with
+// -fwasm-exceptions but not with -fexceptions.)  So deliberately leak the 
Desktop instance
+// here:
 new desktop::Desktop();
 #else
 desktop::Desktop aDesktop;
diff --git a/static/README.wasm.md b/static/README.wasm.md
index cb5d0aa7fc3e..de595b19b459 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -69,6 +69,13 @@ With "-opensource -confirm-license" you agree to the open 
source license.
 ./configure -opensource -confirm-license -xplatform wasm-emscripten 
-feature-thread -prefix  QMAKE_CFLAGS+=-sSUPPORT_LONGJMP=wasm 
QMAKE_CXXFLAGS+=-sSUPPORT_LONGJMP=wasm
 make -j module-qtbase
 
+Do not include `-fwasm-exceptions` in the above `QMAKE_CXXFLAGS`, see
+<https://emscripten.org/docs/api_reference/emscripten.h.html#c.emscripten_set_main_loop>
 "Note:
+Currently, using the new Wasm exception handling and simulate_infinite_loop == 
true at the same time
+does not work yet in C++ projects that have objects with destructors on the 
stack at the time of the
+call."  (Also see the EMSCRIPTEN-specific HACK in soffice_main, 
desktop/source/app/sofficemain.cxx,
+for what we need to do to work around that.)
+
 Optionally you can add the configure flag "-compile-examples". But then you 
also have to
 patch at least mkspecs/wasm-emscripten/qmake.conf with EXIT_RUNTIME=0, 
otherwise they will
 fail to run. In addition, building with examples will break with some of them, 
but at that


core.git: ucb/source

2024-08-05 Thread Stephan Bergmann (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 7e464f04014f820f3e935708de432205a7507b1e
Author: Stephan Bergmann 
AuthorDate: Mon Aug 5 12:31:38 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Aug 5 21:21:36 2024 +0200

Fix CURLSHOPT_UNLOCKFUNC function signature

(cf. <https://curl.se/libcurl/c/CURLSHOPT_UNLOCKFUNC.html>; I noticed this 
with
an experimental Emscripten --enable-curl --with-webdav build that failed 
with a
"RuntimeError: null function or function signature mismatch" during the 
call to

> rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_SHARE, 
g_Init.pShare.get());

in the CurlSession ctor)

Change-Id: Iec4bd5a263484e2e615d0b7bb08928feb7dc4658
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171487
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 9976bda67c01..6eb3e3f2c41e 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -54,7 +54,7 @@ using namespace ::com::sun::star;
 namespace
 {
 void lock_cb(CURL*, curl_lock_data, curl_lock_access, void*);
-void unlock_cb(CURL*, curl_lock_data, curl_lock_access, void*);
+void unlock_cb(CURL*, curl_lock_data, void*);
 
 /// globals container
 struct Init
@@ -126,8 +126,7 @@ void lock_cb(CURL* /*handle*/, curl_lock_data const data, 
curl_lock_access /*acc
 }
 }
 
-void unlock_cb(CURL* /*handle*/, curl_lock_data const data, curl_lock_access 
/*access*/,
-   void* /*userptr*/)
+void unlock_cb(CURL* /*handle*/, curl_lock_data const data, void* /*userptr*/)
 {
 assert(0 <= data && data < CURL_LOCK_DATA_LAST);
 g_Init.ShareLock[data].unlock();


core.git: sw/inc

2024-08-05 Thread Stephan Bergmann (via logerrit)
 sw/inc/unostyle.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e6d470293243f1a8dd3dbcb42258dd22e408e127
Author: Stephan Bergmann 
AuthorDate: Mon Aug 5 07:59:18 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Aug 5 11:57:32 2024 +0200

UBSan CppunitTest_sw_writerfilter_misc needs the SwXStyleFamilies now

...presumably since f13e5718f53c3e460a6aacdb8f429d18ac011fa3 "use more 
concrete
UNO type in writerfilter":

> DynamicLibraryManagerException: "Failed to load dynamic library: 
/home/sberg/lo/core/workdir/LinkTarget/CppunitTest/libtest_sw_writerfilter_misc.so
> /home/sberg/lo/core/instdir/program/libsw_writerfilterlo.so: undefined 
symbol: _ZTI16SwXStyleFamilies"

Change-Id: I55014caff2c7b662edf1a552e496d4c9955ce23e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171468
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index 1790944e282f..a1e232939aa9 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -52,7 +52,7 @@ class SwXFrameStyle;
 class StyleFamilyEntry;
 class SwXStyleFamily;
 
-class SwXStyleFamilies final : public cppu::WeakImplHelper
+class SAL_DLLPUBLIC_RTTI SwXStyleFamilies final : public cppu::WeakImplHelper
 <
 css::container::XIndexAccess,
 css::container::XNameAccess,


core.git: offapi/com offapi/UnoApi_offapi.mk toolkit/inc toolkit/source

2024-08-02 Thread Stephan Bergmann (via logerrit)
 offapi/UnoApi_offapi.mk |1 +
 offapi/com/sun/star/awt/XTopWindow3.idl |   23 +++
 toolkit/inc/awt/vclxtopwindow.hxx   |8 ++--
 toolkit/source/awt/vclxtopwindow.cxx|   14 ++
 4 files changed, 44 insertions(+), 2 deletions(-)

New commits:
commit af5c4092052c98853b88cf886adb11b4a1532fff
Author: Stephan Bergmann 
AuthorDate: Fri Aug 2 13:37:44 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 2 15:47:54 2024 +0200

Expose WorkWindow fullscreen mode via new XTopWindow3

...deriving from the existing XTopWindow2.  (Exposing this functionality 
via UNO
is useful e.g. for some embedded LOWA example application.)

Change-Id: Ib92f75510b7a2ca26933ea35afcc78882a7804fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171403
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 9613a54eb27a..959f805d3894 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1901,6 +1901,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/awt,\
XToolkitRobot \
XTopWindow \
XTopWindow2 \
+   XTopWindow3 \
XTopWindowListener \
XUnitConversion \
XUnoControlContainer \
diff --git a/offapi/com/sun/star/awt/XTopWindow3.idl 
b/offapi/com/sun/star/awt/XTopWindow3.idl
new file mode 100644
index ..d64076423132
--- /dev/null
+++ b/offapi/com/sun/star/awt/XTopWindow3.idl
@@ -0,0 +1,23 @@
+/* -*- 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 com { module sun { module star { module awt {
+
+/** extends XTopWindow with additional functionality
+
+@since LibreOffice 25.2
+*/
+interface XTopWindow3: XTopWindow2 {
+/** controls whether the window is currently shown full screen */
+[attribute] boolean FullScreen;
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/toolkit/inc/awt/vclxtopwindow.hxx 
b/toolkit/inc/awt/vclxtopwindow.hxx
index 1913c4594f6d..9e77edcef43b 100644
--- a/toolkit/inc/awt/vclxtopwindow.hxx
+++ b/toolkit/inc/awt/vclxtopwindow.hxx
@@ -21,7 +21,7 @@
 #define INCLUDED_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -31,7 +31,7 @@ namespace com::sun::star::awt { class XMenuBar; }
 
 
 class VCLXTopWindow: public cppu::ImplInheritanceHelper<
-VCLXContainer, css::awt::XTopWindow2, 
css::awt::XSystemDependentWindowPeer >
+VCLXContainer, css::awt::XTopWindow3, 
css::awt::XSystemDependentWindowPeer >
 {
 public:
 VCLXTopWindow();
@@ -55,6 +55,10 @@ public:
 virtual ::sal_Int32 SAL_CALL getDisplay() override;
 virtual void SAL_CALL setDisplay( ::sal_Int32 _display ) override;
 
+// XTopWindow3
+virtual sal_Bool SAL_CALL getFullScreen() override;
+virtual void SAL_CALL setFullScreen(sal_Bool value) override;
+
 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
 virtual voidGetPropertyIds( std::vector< sal_uInt16 > &aIds ) override 
{ return ImplGetPropertyIds( aIds ); }
 };
diff --git a/toolkit/source/awt/vclxtopwindow.cxx 
b/toolkit/source/awt/vclxtopwindow.cxx
index c0ce4d891d94..55dbb8070b91 100644
--- a/toolkit/source/awt/vclxtopwindow.cxx
+++ b/toolkit/source/awt/vclxtopwindow.cxx
@@ -209,6 +209,20 @@ void SAL_CALL VCLXTopWindow::setDisplay( ::sal_Int32 
_display )
 pWindow->SetScreenNumber( _display );
 }
 
+sal_Bool VCLXTopWindow::getFullScreen() {
+SolarMutexGuard g;
+if (auto const win = VCLXContainer::GetAsDynamic()) {
+return win->IsFullScreenMode();
+}
+return false;
+}
+
+void VCLXTopWindow::setFullScreen(sal_Bool value) {
+SolarMutexGuard g;
+if (auto const win = VCLXContainer::GetAsDynamic()) {
+return win->ShowFullScreenMode(value);
+}
+}
 
 
 


core.git: distro-configs/LibreOfficeWASM32.conf

2024-07-31 Thread Stephan Bergmann (via logerrit)
 distro-configs/LibreOfficeWASM32.conf |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b740afe2fe42a4bb639157a63f44e8d0c0f7310d
Author: Stephan Bergmann 
AuthorDate: Wed Jul 31 11:24:21 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 1 08:52:18 2024 +0200

Add --with-package-format=emscripten to 
distro-configs/LibreOfficeWASM32.conf

Change-Id: Ic5f07aa77b7c073264326dcbac56e6d2593bdc96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171281
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/distro-configs/LibreOfficeWASM32.conf 
b/distro-configs/LibreOfficeWASM32.conf
index 61c3f8f9da53..b49d7d801bfa 100644
--- a/distro-configs/LibreOfficeWASM32.conf
+++ b/distro-configs/LibreOfficeWASM32.conf
@@ -2,3 +2,4 @@
 --enable-qt5
 --disable-gen
 --disable-scripting
+--with-package-format=emscripten


core.git: desktop/Executable_soffice_bin.mk

2024-07-31 Thread Stephan Bergmann (via logerrit)
 desktop/Executable_soffice_bin.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9dfcb5f6b61b67596a86facd35806e38da16e12b
Author: Stephan Bergmann 
AuthorDate: Wed Jul 31 14:19:13 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 1 07:41:05 2024 +0200

Use gb_SUPPRESS_TESTS to control inclusion of embindtest.js

Change-Id: Ic020678e531322b9c3af194c3529464775fd1a61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171318
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index df1db8ae1260..350e4a84a0b8 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -82,7 +82,7 @@ $(eval $(call gb_Executable_add_ldflags,soffice_bin, \
 $(foreach i,$(EMSCRIPTEN_EXTRA_SOFFICE_POST_JS),--post-js $(i)) \
 ))
 
-ifneq ($(ENABLE_DBGUTIL),)
+ifeq ($(ENABLE_DBGUTIL)-$(gb_SUPPRESS_TESTS),TRUE-)
 
 $(call gb_Executable_get_linktarget_target,soffice_bin): \
 $(SRCDIR)/unotest/source/embindtest/embindtest.js


core.git: external/libexttextcat

2024-07-31 Thread Stephan Bergmann (via logerrit)
 external/libexttextcat/ExternalProject_libexttextcat.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 374c785daff03f10116781d364f3024aff19d46c
Author: Stephan Bergmann 
AuthorDate: Wed Jul 31 09:56:21 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jul 31 13:14:56 2024 +0200

external/libexttextcat: Only pass gb_DEBUGINFO_FLAGS in debug builds

broken since 797681b4f569212a0f306151167534e23a2e37af "Pass all relevant 
CFLAGS
on to external/libexttextcat"

Change-Id: Idd648c8cd7eaa7e78815dd2071d0a3b786fa6d23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171273
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/libexttextcat/ExternalProject_libexttextcat.mk 
b/external/libexttextcat/ExternalProject_libexttextcat.mk
index 479bc9bb3b60..37ed06aded7d 100644
--- a/external/libexttextcat/ExternalProject_libexttextcat.mk
+++ b/external/libexttextcat/ExternalProject_libexttextcat.mk
@@ -20,7 +20,7 @@ $(call 
gb_ExternalProject_get_state_target,libexttextcat,build):
$(if 
$(verbose),--disable-silent-rules,--enable-silent-rules) \
$(if $(ENABLE_WERROR),--enable-werror,--disable-werror) 
\
$(gb_CONFIGURE_PLATFORMS) \
-   CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_DEBUGINFO_FLAGS) 
$(call gb_ExternalProject_get_build_flags,libexttextcat) \
+   CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(if 
$(debug),$(gb_DEBUGINFO_FLAGS)) $(call 
gb_ExternalProject_get_build_flags,libexttextcat) \
$(if $(COM_IS_CLANG),-Qunused-arguments)" \
LDFLAGS="$(call 
gb_ExternalProject_get_link_flags,libexttextcat)" \
&& $(MAKE) \


core.git: Branch 'distro/collabora/co-24.04' - configure.ac

2024-07-30 Thread Stephan Bergmann (via logerrit)
 configure.ac |   19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

New commits:
commit b24e920c6dc00ce39decee2596217e99f798a95c
Author: Stephan Bergmann 
AuthorDate: Wed Feb 7 08:33:35 2024 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jul 31 08:33:14 2024 +0200

MSVC 2022 Preview: One HAVE_CPP_CONSTEVAL blocker down, one up

While the previously known issue appears to be fixed in VS 2022 Preview 
17.9.0
Preview 5.0, a new one showed up that now caused

> sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx(63): error 
C2440: '': cannot convert from 'initializer list' to 
'rtl::OUStringLiteral<2>'
> sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx(63): note: 
Invalid aggregate initialization
> sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx(63): note: too 
many initializers

etc.

Change-Id: Ia74a8d6454bb5f15c0af4d3cf29989342f2eef7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163072
    Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170423
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/configure.ac b/configure.ac
index e1d6f25419f0..7f0ccc560913 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14801,11 +14801,14 @@ dnl expression' with consteval constructor", 
<https://bugs.llvm.org/show_bug.cgi
 dnl using consteval: 'clang/lib/CodeGen/Address.h:38: llvm::Value*
 dnl clang::CodeGen::Address::getPointer() const: Assertion `isValid()' 
failed.'" (which should be
 dnl fixed since Clang 14), 
<https://developercommunity.visualstudio.com/t/1581879> "Bogus error
-dnl C7595 with consteval constructor in ternary expression (/std:c++latest)", 
or
+dnl C7595 with consteval constructor in ternary expression (/std:c++latest)" 
(which appears to be
+dnl fixed at least in Visual Studio Community 2022 Preview 17.9.0 Preview 5.0),
 dnl <https://github.com/llvm/llvm-project/issues/54612> "C++20, consteval, 
anonymous union:
 dnl llvm/lib/IR/Instructions.cpp:1491: void llvm::StoreInst::AssertOK(): 
Assertion
 dnl 
`cast(getOperand(1)->getType())->isOpaqueOrPointeeTypeMatches(getOperand(0)->getType())
-dnl && "Ptr must be a pointer to Val type!"' failed." (which should be fixed 
since Clang 17):
+dnl && "Ptr must be a pointer to Val type!"' failed." (which should be fixed 
since Clang 17), or
+dnl 
<https://developercommunity.visualstudio.com/t/Bogus-error-C2440-with-consteval-constru/10579616>
+dnl "Bogus error C2440 with consteval constructor (/std:c++20)":
 AC_LANG_PUSH([C++])
 save_CXX=$CXX
 if test "$COM" = MSC && test "$COM_IS_CLANG" != TRUE; then
@@ -14850,6 +14853,18 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([
 };
 };
 auto s5 = S5().f();
+
+struct S6 {
+consteval S6(char const (&lit)[2]) {
+buf[0] = lit[0];
+buf[1] = lit[1];
+}
+union {
+int x;
+char buf[2];
+};
+};
+void f6() { S6("a"); }
 ], [
 return (s.i == 1) ? 0 : 1;
 ])], [


core.git: offapi/org unotest/source

2024-07-30 Thread Stephan Bergmann (via logerrit)
 offapi/org/libreoffice/embindtest/Struct.idl |   23 +-
 unotest/source/embindtest/embindtest.cxx |  306 +--
 unotest/source/embindtest/embindtest.js  |  218 ---
 3 files changed, 492 insertions(+), 55 deletions(-)

New commits:
commit 0bf2e317ac34512b348dcf0e7d9a8c10a47d6aef
Author: Stephan Bergmann 
AuthorDate: Tue Jul 30 11:08:48 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Jul 30 14:15:58 2024 +0200

More exhaustive org.libreoffice.embindtest.Struct

Change-Id: I91085ef8cd7cd80852c0d0ab4f87fd3226a10a00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171236
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/org/libreoffice/embindtest/Struct.idl 
b/offapi/org/libreoffice/embindtest/Struct.idl
index b62d917256c6..a24f53374e65 100644
--- a/offapi/org/libreoffice/embindtest/Struct.idl
+++ b/offapi/org/libreoffice/embindtest/Struct.idl
@@ -10,10 +10,25 @@
 module org { module libreoffice { module embindtest {
 
 struct Struct {
-long m1;
-double m2;
-string m3;
-any m4;
+boolean m1;
+byte m2;
+short m3;
+unsigned short m4;
+long m5;
+unsigned long m6;
+hyper m7;
+unsigned hyper m8;
+float m9;
+double m10;
+char m11;
+string m12;
+type m13;
+any m14;
+sequence m15;
+Enum m16;
+StructLong m17;
+Template m18;
+com::sun::star::uno::XInterface m19;
 };
 
 }; }; };
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 3883c031755c..963939fb71b5 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -116,14 +116,53 @@ class Test : public 
cppu::WeakImplHelper
 
 org::libreoffice::embindtest::Struct SAL_CALL getStruct() override
 {
-return { -123456, 100.5, u"hä"_ustr, css::uno::Any(true) };
+return { true,
+ -12,
+ -1234,
+ 54321,
+ -123456,
+ 3456789012,
+ -123456789,
+ 9876543210,
+ -10.25,
+ 100.5,
+ u'Ö',
+ u"hä"_ustr,
+ cppu::UnoType::get(),
+ css::uno::Any(sal_Int32(-123456)),
+ { u"foo"_ustr, u"barr"_ustr, u"bazzz"_ustr },
+ org::libreoffice::embindtest::Enum_E_2,
+ { -123456 },
+ { { u"foo"_ustr }, -123456, 
css::uno::Any(sal_Int32(-123456)), { u"barr"_ustr } },
+ static_cast(this) };
 }
 
 sal_Bool SAL_CALL isStruct(org::libreoffice::embindtest::Struct const& 
value) override
 {
 return value
-   == org::libreoffice::embindtest::Struct{ -123456, 100.5, 
u"hä"_ustr,
-css::uno::Any(true) };
+   == org::libreoffice::embindtest::Struct{ true,
+-12,
+-1234,
+54321,
+-123456,
+3456789012,
+-123456789,
+9876543210,
+-10.25,
+100.5,
+u'Ö',
+u"hä"_ustr,
+
cppu::UnoType::get(),
+
css::uno::Any(sal_Int32(-123456)),
+{ u"foo"_ustr, 
u"barr"_ustr,
+  u"bazzz"_ustr },
+
org::libreoffice::embindtest::Enum_E_2,
+{ -123456 },
+{ { u"foo"_ustr },
+  -123456,
+  
css::uno::Any(sal_Int32(-123456)),
+  { u"barr"_ustr } },
+
static_cast(this) };
 }
 
 org::libreoffice::embindtest::StructLong SAL_CALL getStructLong() override
@@ -314,16 +353,56 @@ class Test : public 
cppu::WeakImp

core.git: offapi/org offapi/UnoApi_offapi.mk static/source unotest/source

2024-07-30 Thread Stephan Bergmann (via logerrit)
 offapi/UnoApi_offapi.mk|1 
 offapi/org/libreoffice/embindtest/Template.idl |   21 +++
 offapi/org/libreoffice/embindtest/XTest.idl|2 
 static/source/embindmaker/embindmaker.cxx  |  171 +++--
 unotest/source/embindtest/embindtest.cxx   |   19 ++
 unotest/source/embindtest/embindtest.js|   10 +
 6 files changed, 214 insertions(+), 10 deletions(-)

New commits:
commit f504bd1ac99fe9464d6a5e41febbdcab08af1c97
Author: Stephan Bergmann 
AuthorDate: Tue Jul 30 09:13:35 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Jul 30 11:00:49 2024 +0200

Embind: Missing support for UNO polymorphic struct types

Change-Id: I6bb29a951e6e5a3ed7d825172ba7b92ef95a5619
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171228
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index b3c1c4e52ddf..9613a54eb27a 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -4448,6 +4448,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,org/libreoffice/embindtest, \
 Struct \
 StructLong \
 StructString \
+Template \
 XAttributes \
 XTest \
 ))
diff --git a/offapi/org/libreoffice/embindtest/Template.idl 
b/offapi/org/libreoffice/embindtest/Template.idl
new file mode 100644
index ..73e94a491307
--- /dev/null
+++ b/offapi/org/libreoffice/embindtest/Template.idl
@@ -0,0 +1,21 @@
+/* -*- 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 Template {
+T2 m1;
+long m2;
+T1 m3;
+T2 m4;
+};
+
+}; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/offapi/org/libreoffice/embindtest/XTest.idl 
b/offapi/org/libreoffice/embindtest/XTest.idl
index 370363cf9a09..8d46c9e71d5a 100644
--- a/offapi/org/libreoffice/embindtest/XTest.idl
+++ b/offapi/org/libreoffice/embindtest/XTest.idl
@@ -44,6 +44,8 @@ interface XTest {
 boolean isStructLong([in] StructLong value);
 StructString getStructString();
 boolean isStructString([in] StructString value);
+Template getTemplate();
+boolean isTemplate([in] Template value);
 any getAnyVoid();
 boolean isAnyVoid([in] any value);
 any getAnyBoolean();
diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index 9953512a8bf0..4956376bed16 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -262,7 +262,100 @@ void scan(rtl::Reference const& 
cursor, std::u16string_view p
 }
 }
 
-OUString cppName(OUString const& name) { return "::" + name.replaceAll(u".", 
u"::"); }
+OUString cppName(OUString const& name)
+{
+sal_Int32 k;
+std::vector args;
+OUString n(b2u(codemaker::UnoType::decompose(u2b(name), &k, &args)));
+OUStringBuffer buf;
+for (sal_Int32 i = 0; i != k; ++i)
+{
+buf.append("::com::sun::star::uno::Sequence<");
+}
+if (n == "boolean")
+{
+buf.append("::sal_Bool");
+}
+else if (n == "byte")
+{
+buf.append("::sal_Int8");
+}
+else if (n == "short")
+{
+buf.append("::sal_Int16");
+}
+else if (n == "unsigned short")
+{
+buf.append("::sal_uInt16");
+}
+else if (n == "long")
+{
+buf.append("::sal_Int32");
+}
+else if (n == "unsigned long")
+{
+buf.append("::sal_uInt32");
+}
+else if (n == "hyper")
+{
+buf.append("::sal_Int64");
+}
+else if (n == "unsigned hyper")
+{
+buf.append("::sal_uInt64");
+}
+else if (n == "float")
+{
+buf.append("float");
+}
+else if (n == "double")
+{
+buf.append("double");
+}
+else if (n == "char")
+{
+buf.append("::sal_Unicode");
+}
+else if (n == "string")
+{
+buf.append("::rtl::OUString");
+}
+else if (n == "type")
+{
+buf.append("::com::sun::star::uno::Type");
+}
+else if (n == "any")
+{
+buf.append("::com::sun::star::uno::Any");
+}
+else
+{
+buf.append("::" + n.replaceAll(u".", u"::"));
+}

core.git: xmlsecurity/UITest_xmlsecurity_gpg.mk

2024-07-29 Thread Stephan Bergmann (via logerrit)
 xmlsecurity/UITest_xmlsecurity_gpg.mk |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 82f837102e1efbf979bb139c52d9b60d68eeeae1
Author: Stephan Bergmann 
AuthorDate: Mon Jul 29 08:52:32 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jul 29 12:10:44 2024 +0200

Consistently name UITest targets

Change-Id: Ibdf28a56f66f9513a3d4abb25cea8176e47da941
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171174
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/xmlsecurity/UITest_xmlsecurity_gpg.mk 
b/xmlsecurity/UITest_xmlsecurity_gpg.mk
index 1cc130e37c3c..90cb75bee813 100644
--- a/xmlsecurity/UITest_xmlsecurity_gpg.mk
+++ b/xmlsecurity/UITest_xmlsecurity_gpg.mk
@@ -7,13 +7,13 @@
 # file, You can obtain one at https://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_UITest_UITest,gpg))
+$(eval $(call gb_UITest_UITest,xmlsecurity_gpg))
 
-$(eval $(call gb_UITest_add_modules,gpg,$(SRCDIR)/xmlsecurity/qa/uitest,\
+$(eval $(call 
gb_UITest_add_modules,xmlsecurity_gpg,$(SRCDIR)/xmlsecurity/qa/uitest,\
gpg/ \
 ))
 
-$(eval $(call gb_UITest_set_defs,gpg, \
+$(eval $(call gb_UITest_set_defs,xmlsecurity_gpg, \
 TDOC="$(SRCDIR)/xmlsecurity/qa/uitest/data" \
 ))
 


core.git: offapi/org unotest/source

2024-07-27 Thread Stephan Bergmann (via logerrit)
 offapi/org/libreoffice/embindtest/Struct.idl |1 
 unotest/source/embindtest/embindtest.cxx |   34 ---
 unotest/source/embindtest/embindtest.js  |   16 +++-
 3 files changed, 37 insertions(+), 14 deletions(-)

New commits:
commit 4d18fa7694bae0b3d4364aa3072216782b7a5f26
Author: Stephan Bergmann 
AuthorDate: Fri Jul 26 17:36:59 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sat Jul 27 18:33:59 2024 +0200

In embindtest, also test Any included in Struct

Change-Id: Id268692c750873629c1ceaf232e1e61912164872
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171078
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/org/libreoffice/embindtest/Struct.idl 
b/offapi/org/libreoffice/embindtest/Struct.idl
index 6b9d36e40a1b..b62d917256c6 100644
--- a/offapi/org/libreoffice/embindtest/Struct.idl
+++ b/offapi/org/libreoffice/embindtest/Struct.idl
@@ -13,6 +13,7 @@ struct Struct {
 long m1;
 double m2;
 string m3;
+any m4;
 };
 
 }; }; };
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 01e18d0b42f4..166fa9650b8a 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -115,12 +115,14 @@ class Test : public 
cppu::WeakImplHelper
 
 org::libreoffice::embindtest::Struct SAL_CALL getStruct() override
 {
-return { -123456, 100.5, u"hä"_ustr };
+return { -123456, 100.5, u"hä"_ustr, css::uno::Any(true) };
 }
 
 sal_Bool SAL_CALL isStruct(org::libreoffice::embindtest::Struct const& 
value) override
 {
-return value == org::libreoffice::embindtest::Struct{ -123456, 100.5, 
u"hä"_ustr };
+return value
+   == org::libreoffice::embindtest::Struct{ -123456, 100.5, 
u"hä"_ustr,
+css::uno::Any(true) };
 }
 
 org::libreoffice::embindtest::StructLong SAL_CALL getStructLong() override
@@ -293,14 +295,16 @@ class Test : public 
cppu::WeakImplHelper
 
 css::uno::Any SAL_CALL getAnyStruct() override
 {
-return css::uno::Any(org::libreoffice::embindtest::Struct{ -123456, 
100.5, u"hä"_ustr });
+return css::uno::Any(org::libreoffice::embindtest::Struct{ -123456, 
100.5, u"hä"_ustr,
+   
css::uno::Any(true) });
 }
 
 sal_Bool SAL_CALL isAnyStruct(css::uno::Any const& value) override
 {
 return value.getValueType() == 
cppu::UnoType::get()
&& 
*o3tl::forceAccess(value)
-  == org::libreoffice::embindtest::Struct{ -123456, 100.5, 
u"hä"_ustr };
+  == org::libreoffice::embindtest::Struct{ -123456, 100.5, 
u"hä"_ustr,
+   
css::uno::Any(true) };
 }
 
 css::uno::Any SAL_CALL getAnyException() override
@@ -517,9 +521,9 @@ class Test : public 
cppu::WeakImplHelper
 
 css::uno::Sequence SAL_CALL 
getSequenceStruct() override
 {
-return { { -123456, -100.5, u"foo"_ustr },
- { 1, 1.25, u"barr"_ustr },
- { 123456, 100.75, u"bazzz"_ustr } };
+return { { -123456, -100.5, u"foo"_ustr, css::uno::Any() },
+ { 1, 1.25, u"barr"_ustr, css::uno::Any(true) },
+ { 123456, 100.75, u"bazzz"_ustr, css::uno::Any(u"buzzz"_ustr) 
} };
 }
 
 sal_Bool SAL_CALL
@@ -527,9 +531,9 @@ class Test : public 
cppu::WeakImplHelper
 {
 return value
== css::uno::Sequence{
-  { -123456, -100.5, u"foo"_ustr },
-  { 1, 1.25, u"barr"_ustr },
-  { 123456, 100.75, u"bazzz"_ustr }
+  { -123456, -100.5, u"foo"_ustr, css::uno::Any() },
+  { 1, 1.25, u"barr"_ustr, css::uno::Any(true) },
+  { 123456, 100.75, u"bazzz"_ustr, 
css::uno::Any(u"buzzz"_ustr) }
   };
 }
 
@@ -569,7 +573,7 @@ class Test : public 
cppu::WeakImplHelper
 value14 = css::uno::Any(sal_Int32(-123456));
 value15 = { u"foo"_ustr, u"barr"_ustr, u"bazzz"_ustr };
 value16 = org::libreoffice::embindtest::Enum_E_2;
-value17 = { -123456, 100.5, u"hä"_ustr };
+value17 = { -123456, 100.5, u"hä"_ustr, css::uno::Any(true) };
 value18 = this;
 }
 
@@ -758,7 +762,9 @@ private:
 }
 {
 auto const val = ifcCpp->getStruct();
-assert((val == org::libreoffice::embindtest::Struct{ -123456, 
100.5, u"hä"_ustr }));
+

core.git: instsetoo_native/CustomTarget_emscripten-install.mk

2024-07-26 Thread Stephan Bergmann (via logerrit)
 instsetoo_native/CustomTarget_emscripten-install.mk |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit c91c190379f727f2a98bbdf6e7c0846b830433a4
Author: Stephan Bergmann 
AuthorDate: Fri Jul 26 17:27:17 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 26 23:00:21 2024 +0200

Fix --with-package-format=emscripten

For one, a dependency on 
gb_Postprocess_get_target,AllModulesButInstsetNative
was missing, so copying from instdir might have kicked in too early, before 
the
instdir files had been updated (e.g., in an incremental build).  For 
another, in
a from-scratch build, files like instdir/program/qt_soffice.html might not 
yet
have been around, but I'm too dumb to get gbuild to do what I want here 
(i.e.,
copy files from instdir to workdir once the files are available in instdir 
and
only if the files in instdir are newer than those in workdir).  So just make
this .PHONY and always copy all the files (in line with how other PKGFORMATs
also always rebuild their artifacts, IIUC).

Change-Id: I8b84677cdf867a2b66027ec4a4d781cd1fe623b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171077
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/instsetoo_native/CustomTarget_emscripten-install.mk 
b/instsetoo_native/CustomTarget_emscripten-install.mk
index a4a2031c45cb..23a5ee81885b 100644
--- a/instsetoo_native/CustomTarget_emscripten-install.mk
+++ b/instsetoo_native/CustomTarget_emscripten-install.mk
@@ -24,12 +24,12 @@ emscripten_install_files := \
 soffice.worker.js \
 $(if $(ENABLE_SYMBOLS_FOR),soffice.wasm.dwp) \
 
+.PHONY: $(call gb_CustomTarget_get_target,instsetoo_native/emscripten-install)
 $(call gb_CustomTarget_get_target,instsetoo_native/emscripten-install): \
-$(foreach 
i,$(emscripten_install_files),$(WORKDIR)/installation/LibreOffice/emscripten/$(i))
-
-$(foreach 
i,$(emscripten_install_files),$(WORKDIR)/installation/LibreOffice/emscripten/$(i)):
 \
-$(WORKDIR)/installation/LibreOffice/emscripten/%: $(INSTDIR)/program/%
-   mkdir -p $(dir $@)
-   cp $< $@
+| $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
+   mkdir -p $(WORKDIR)/installation/LibreOffice/emscripten
+   for i in $(emscripten_install_files); do \
+cp $(INSTDIR)/program/$$i 
$(WORKDIR)/installation/LibreOffice/emscripten/ || exit 1; \
+done
 
 # vim: set noet sw=4 ts=4:


core.git: configure.ac instsetoo_native/CustomTarget_emscripten-install.mk instsetoo_native/Module_instsetoo_native.mk static/README.wasm.md

2024-07-26 Thread Stephan Bergmann (via logerrit)
 configure.ac|5 +-
 instsetoo_native/CustomTarget_emscripten-install.mk |   35 
 instsetoo_native/Module_instsetoo_native.mk |6 +++
 static/README.wasm.md   |6 ++-
 4 files changed, 49 insertions(+), 3 deletions(-)

New commits:
commit 7d5c62537cce395fb46aac9403d42b1597c8186d
Author: Stephan Bergmann 
AuthorDate: Fri Jul 26 11:17:36 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 26 13:02:11 2024 +0200

Add --with-package-format=emscripten

...to have $(WORKDIR)/installation/LibreOffice/emscripten populated with 
just
the relevant files from $(INSTDIR).  (This doesn't reuse the complicated
CustomTarget_instsetoo_native/install used for other PKGFORMATs; as a 
special
case, it uses a much simpler 
CustomTarget_instsetoo_native/emscripten-install.)

Change-Id: I9c7509aadbc0e6e49ec95bf51c748c2ff9f778b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171066
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index f4dcde811f30..81dfe1a3b924 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2278,7 +2278,7 @@ AC_ARG_WITH(package-format,
 AS_HELP_STRING([--with-package-format],
 [Specify package format(s) for LibreOffice installation sets. The
  implicit --without-package-format leads to no installation sets being
- generated. Possible values: archive, bsd, deb, dmg,
+ generated. Possible values: archive, bsd, deb, dmg, emscripten,
  installed, msi, pkg, and rpm.
  Example: --with-package-format='deb rpm']),
 ,)
@@ -5725,7 +5725,7 @@ AC_MSG_CHECKING([which package format to use])
 if test -n "$with_package_format" -a "$with_package_format" != no; then
 for i in $with_package_format; do
 case "$i" in
-bsd | deb | pkg | rpm | archive | dmg | installed | msi)
+bsd | deb | pkg | rpm | archive | dmg | installed | msi | emscripten)
 ;;
 *)
 AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
@@ -5737,6 +5737,7 @@ rpm - RedHat software distribution
 LibreOffice additionally supports:
 archive - .tar.gz or .zip
 dmg - macOS .dmg
+emscripten - directory with qt_soffice.html etc.
 installed - installation tree
 msi - Windows .msi
 ])
diff --git a/instsetoo_native/CustomTarget_emscripten-install.mk 
b/instsetoo_native/CustomTarget_emscripten-install.mk
new file mode 100644
index ..a4a2031c45cb
--- /dev/null
+++ b/instsetoo_native/CustomTarget_emscripten-install.mk
@@ -0,0 +1,35 @@
+# -*- 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_CustomTarget_CustomTarget,instsetoo_native/emscripten-install))
+
+$(if $(or $(gb_not $(filter emscripten,$(PKGFORMAT))),$(filter-out 
emscripten,$(PKGFORMAT))), \
+$(error Emscripten only supports --with-package-format=emscripten))
+
+emscripten_install_files := \
+favicon.ico \
+qt_soffice.html \
+qtloader.js \
+qtlogo.svg \
+soffice.data \
+soffice.data.js.metadata \
+soffice.js \
+soffice.wasm \
+soffice.worker.js \
+$(if $(ENABLE_SYMBOLS_FOR),soffice.wasm.dwp) \
+
+$(call gb_CustomTarget_get_target,instsetoo_native/emscripten-install): \
+$(foreach 
i,$(emscripten_install_files),$(WORKDIR)/installation/LibreOffice/emscripten/$(i))
+
+$(foreach 
i,$(emscripten_install_files),$(WORKDIR)/installation/LibreOffice/emscripten/$(i)):
 \
+$(WORKDIR)/installation/LibreOffice/emscripten/%: $(INSTDIR)/program/%
+   mkdir -p $(dir $@)
+   cp $< $@
+
+# vim: set noet sw=4 ts=4:
diff --git a/instsetoo_native/Module_instsetoo_native.mk 
b/instsetoo_native/Module_instsetoo_native.mk
index 9ba7bd8b8182..1b24ebaaed85 100644
--- a/instsetoo_native/Module_instsetoo_native.mk
+++ b/instsetoo_native/Module_instsetoo_native.mk
@@ -11,9 +11,15 @@ $(eval $(call gb_Module_Module,instsetoo_native))
 
 ifneq (,$(PKGFORMAT)$(filter TRUE,$(LIBO_TEST_INSTALL) $(ENABLE_WIX)))
 
+ifeq ($(OS),EMSCRIPTEN)
+$(eval $(call gb_Module_add_targets,instsetoo_native, \
+CustomTarget_emscripten-install \
+))
+else
 $(eval $(call gb_Module_add_targets,instsetoo_native,\
CustomTarget_install \
 ))
+endif
 
 endif
 
diff --git a/static/README.wasm.md b/static/README.wasm.md
index 4cf0688d0796..cb5d0aa7fc3e 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -15,9 +15,12 @@ purpose, look towards the end of the document for the section
 
 ## Status of LibreOffice as WASM with Qt
 
+Configure `--with-package-format=emscripten` to have 
`workdir/installation/

core.git: configure.ac

2024-07-26 Thread Stephan Bergmann (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6ea2464edbe3df1282fa96aeb6c53770dbc04860
Author: Stephan Bergmann 
AuthorDate: Thu Jul 25 16:28:29 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 26 11:21:39 2024 +0200

Bump minimum emsdk to known-good 3.1.46

...as 3.1.3 has compilation issues with our code now, see

<https://git.libreoffice.org/lode/+/197e973f8ce3ba8495f9c0c7baa5695335b39e13%5E%21>
"update emsdk to known-good 3.1.46 to avoid clang segfault"

Change-Id: Id500cdde2f776eaaedcc1bcbd43c5b3c727eef2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171017
    Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index 9949b508dd39..f4dcde811f30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1437,7 +1437,7 @@ dnl 
===
 
 EMSCRIPTEN_MIN_MAJOR=3
 EMSCRIPTEN_MIN_MINOR=1
-EMSCRIPTEN_MIN_TINY=3
+EMSCRIPTEN_MIN_TINY=46
 
EMSCRIPTEN_MIN_VERSION="${EMSCRIPTEN_MIN_MAJOR}.${EMSCRIPTEN_MIN_MINOR}.${EMSCRIPTEN_MIN_TINY}"
 
 if test "$_os" = "Emscripten"; then


core.git: static/source unotest/source

2024-07-25 Thread Stephan Bergmann (via logerrit)
 static/source/unoembindhelpers/PrimaryBindings.cxx |   12 --
 unotest/source/embindtest/embindtest.js|   24 -
 2 files changed, 33 insertions(+), 3 deletions(-)

New commits:
commit ac175a43c95457129c418ae0efb9cbe5f32f9ee5
Author: Stephan Bergmann 
AuthorDate: Thu Jul 25 18:27:46 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 25 22:39:23 2024 +0200

Add a toDelete parameter to Module.throwUnoException

...as there can be situations (cf. the newly added test code in 
embindtest.js)
where objects that need to be deleted are passed as payload of the exception
value to be thrown.  So there now is a (mandatory, as Embind doesn't allow 
to
implicitly pass undefined) third parameter now that must be an array of 
objects
on which to call .delete().

(75fe059974dcb80c3f78110c73ab799afc6f4ca3 "Embind: throwUnoException from 
JS"
had deliberately made throwUnoException take two arguments, because if it
"directly took a css::uno::Any argument, JS client code would need to 
create one
with `new Module.uno_Any(...)` and call .delete() on it, but there is no 
place
where it could call .delete()".  There now would be such a place, but it 
would
probably still be tedious most of the time to explicitly construct a new 
uno_Any
to pass into throwUnoException both as the exception and in the toDelete 
array.
So keep that design decision to have throwUnoException take individual type 
and
value arguments.)

Change-Id: Idec029d9e500457b02d20d899b9a2328cd7a5d7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171024
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index f1e57f281220..ab2adecad091 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -34,6 +34,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -407,8 +408,15 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 
 function("getCurrentModelFromViewSh", &getCurrentModelFromViewSh);
 function("getUnoComponentContext", 
&comphelper::getProcessComponentContext);
-function("throwUnoException", +[](css::uno::Type const& type, 
emscripten::val const& value) {
-cppu::throwException(constructAny(type, value));
+function("throwUnoException", +[](css::uno::Type const& type, 
emscripten::val const& value,
+  emscripten::val const& toDelete) {
+auto const any = constructAny(type, value);
+auto const len = toDelete["length"].as();
+for (std::size_t i = 0; i != len; ++i)
+{
+toDelete[i].call("delete");
+}
+cppu::throwException(any);
 });
 function("sameUnoObject",
  +[](css::uno::Reference const& ref1,
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index a81937deed87..ba25b050ffb7 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -645,6 +645,28 @@ Module.uno_init.then(function() {
 console.assert(exc.Message.startsWith('test'));
 any.delete();
 }
+try {
+const wrapped = new Module.uno_Any(
+Module.uno_Type.Exception('com.sun.star.uno.RuntimeException'),
+{Message: 'test', Context: test});
+Module.throwUnoException(
+
Module.uno_Type.Exception('com.sun.star.lang.WrappedTargetException'),
+{Message: 'wrapped', Context: test, TargetException: wrapped}, 
[wrapped]);
+console.assert(false);
+} catch (e) {
+const any = Module.catchUnoException(e);
+console.assert(any.getType() == 
'com.sun.star.lang.WrappedTargetException');
+const exc = any.get();
+console.assert(exc.Message.startsWith('wrapped'));
+console.assert(Module.sameUnoObject(exc.Context, test));
+const wrappedAny = exc.TargetException;
+console.assert(wrappedAny.getType() == 
'com.sun.star.uno.RuntimeException');
+const wrappedExc = wrappedAny.get();
+console.assert(wrappedExc.Message.startsWith('test'));
+console.assert(Module.sameUnoObject(wrappedExc.Context, test));
+any.delete();
+wrappedAny.delete();
+}
 const obj = Module.unoObject(
 ['com.sun.star.task.XJob', 'com.sun.star.task.XJobExecutor',
  'org.libreoffice.embindtest.XAttributes'],
@@ -653,7 +675,7 @@ Module.uno_init.then(function() {
 if (args.size() !== 1 || args.get(0).

core.git: Branch 'libreoffice-24-8' - sw/qa

2024-07-25 Thread Stephan Bergmann (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 8479a49bca0a5a6600285acd93efb38a00cff53a
Author: Stephan Bergmann 
AuthorDate: Thu Jul 25 12:49:37 2024 +0200
Commit: Xisco Fauli 
CommitDate: Thu Jul 25 18:58:00 2024 +0200

-Werror,-Wunused-variable

...in code newly introduced in 62974cf6a8148377091cb709e7e00dacac152093
"tdf#158661 docx import plaintext sdt: remove unnecessary goRight"

Change-Id: I8d05c4936cdf17d2c819f8ab93ddab3ba6bfdc61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171005
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins
(cherry picked from commit e6d98900a9b035e616083416302759a28acdeb26)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170964
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index ec0037196a3c..5b5010ecb750 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -481,7 +481,6 @@ CPPUNIT_TEST_FIXTURE(Test, testParagraphSdt)
 CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
 uno::Reference xContentControl;
 xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
-uno::Reference xContentControlProps(xContentControl, 
uno::UNO_QUERY);
 uno::Reference 
xContentControlEnumAccess(xContentControl, uno::UNO_QUERY);
 uno::Reference xContentControlEnum = 
xContentControlEnumAccess->createEnumeration();
 uno::Reference 
xTextPortionRange(xContentControlEnum->nextElement(), uno::UNO_QUERY);


core.git: config_host.mk.in solenv/gbuild static/emscripten static/README.wasm.md

2024-07-25 Thread Stephan Bergmann (via logerrit)
 config_host.mk.in |2 +-
 solenv/gbuild/platform/unxgcc.mk  |2 +-
 static/README.wasm.md |   20 ++--
 static/emscripten/soffice_args.js |4 +---
 4 files changed, 21 insertions(+), 7 deletions(-)

New commits:
commit dd332f72ce68d2a6109e390b8e45e84143d10960
Author: Stephan Bergmann 
AuthorDate: Thu Jul 25 16:59:33 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 25 18:37:58 2024 +0200

Enable start center in Emscripten build

...and let it open with that instead of with a hard-coded example.odt.  (But
keep that example.odt in CustomTarget,static_emscripten_fs_image and adapt 
the
example code in static/README.wasm.md to explicitly load it now.)

Change-Id: Ie43e3795e44542acba5a8e755f65acc56fa753f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171019
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/config_host.mk.in b/config_host.mk.in
index 4a5b6c12e843..70e8552fdced 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -252,7 +252,7 @@ export ENABLE_WASM_STRIP_LANGUAGETOOL=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_LOCALES=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_PINGUSER=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_PREMULTIPLY=@ENABLE_WASM_STRIP@
-export ENABLE_WASM_STRIP_RECENT=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_RECENT=
 export ENABLE_WASM_STRIP_RECOVERYUI=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_SPLASH=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_SWEXPORTS=@ENABLE_WASM_STRIP@
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 68ea5c571c32..591eceeb9839 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -185,7 +185,7 @@ $(if $(filter TRUE,$(ENABLE_QT5)), \
 sed -e 's/@APPNAME@/$(subst $(gb_Executable_EXT),,$(notdir $(1)))/' 
$(QT5_PLATFORMS_SRCDIR)/wasm_shell.html > $(dir $(1))qt_$(notdir $(1)) && \
 cp $(QT5_PLATFORMS_SRCDIR)/qtlogo.svg $(QT5_PLATFORMS_SRCDIR)/qtloader.js 
$(dir $(1)) && \
 ,$(if $(filter TRUE,$(ENABLE_QT6)), \
-sed -e 's/@APPNAME@/$(basename $(notdir $(1)))/g' -e 
's/@APPEXPORTNAME@/$(basename $(notdir $(1)))_entry/g' -e 's/@PRELOAD@//g' -e 
's|const instance = await qtLoad$(OPEN_PAREN){|const instance = await 
qtLoad$(OPEN_PAREN){ "arguments": ["--norestore"$(COMMA) "--nologo"$(COMMA) 
"--writer"$(COMMA) "/android/default-document/example.odt"]$(COMMA)|' -e 
's/}$(CLOSE_PAREN);$$/}$(CLOSE_PAREN); window.Module = instance;/' 
$(QT6_PLATFORMS_SRCDIR)/wasm_shell.html > $(dir $(1))qt_$(basename $(notdir 
$(1))).html && \
+sed -e 's/@APPNAME@/$(basename $(notdir $(1)))/g' -e 
's/@APPEXPORTNAME@/$(basename $(notdir $(1)))_entry/g' -e 's/@PRELOAD@//g' -e 
's|const instance = await qtLoad$(OPEN_PAREN){|const instance = await 
qtLoad$(OPEN_PAREN){ "arguments": ["--norestore"$(COMMA) "--nologo"]$(COMMA)|' 
-e 's/}$(CLOSE_PAREN);$$/}$(CLOSE_PAREN); window.Module = instance;/' 
$(QT6_PLATFORMS_SRCDIR)/wasm_shell.html > $(dir $(1))qt_$(basename $(notdir 
$(1))).html && \
 cp $(QT6_PLATFORMS_SRCDIR)/qtlogo.svg $(QT6_PLATFORMS_SRCDIR)/qtloader.js 
$(dir $(1)) && \
 )) \
 cp $(gb_CustomTarget_workdir)/static/emscripten_fs_image/soffice.data 
$(dir $(1))/soffice.data && \
diff --git a/static/README.wasm.md b/static/README.wasm.md
index a28a23efac67..4cf0688d0796 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -182,7 +182,15 @@ Some usage examples through javascript of the current 
implementation:
 // inserts a string at the start of the Writer document.
 Module.uno_init.then(function() {
 const css = Module.uno.com.sun.star;
-const xModel = Module.getCurrentModelFromViewSh();
+let xModel = Module.getCurrentModelFromViewSh();
+if (xModel === null || !css.text.XTextDocument.query(xModel)) {
+const desktop = 
css.frame.Desktop.create(Module.getUnoComponentContext());
+const args = new Module.uno_Sequence_com$sun$star$beans$PropertyValue(
+0, Module.uno_Sequence.FromSize);
+xModel = 
css.frame.XComponentLoader.query(desktop).loadComponentFromURL(
+'file:///android/default-document/example.odt', '_default', 0, 
args);
+args.delete();
+}
 const xTextDocument = css.text.XTextDocument.query(xModel);
 const xText = xTextDocument.getText();
 const xTextCursor = xText.createTextCursor();
@@ -194,7 +202,15 @@ Module.uno_init.then(function() {
 // changes each paragraph of the Writer document to a random color.
 Module.uno_init.then(function() {
 const css = Module.uno.com.sun.star;
-const xModel = Module.getCurrentModelFromViewSh();
+let xModel = Module.getCurrent

ESC meeting minutes: 2024-07-25

2024-07-25 Thread Stephan Bergmann

* Present:
+ Heiko, Jonathan, Olivier, Stephan, Michael W., Ilmari, Regina, 
Caolan, Cloph,

  Hossein, Xisco, Stephane

* Completed Action Items:

* Pending Action Items:

* Release Engineering update (Cloph)
  * 24.8.0 rc2 this week, probably later today
+ libreoffice-24-8 now needs 1 review
+ libreoffice-24-8-0 branch will be created today, need 2 more
  * 24.2.6 rc1 in 3 weeks, as a current plan

* Documentation (Olivier)
+ Helpcontents
   + Maintenance and updates (ohallot D. Maddern, Pierre F, S. 
Horacek, Ilmari)

+ Guides
   + Update getting started guide 24.8
  + please add new features in RN! e.g. tdf#86790, or we miss 
documentation.

  + wherever suitable, please add a screenshot of the feature.

+ Bugzilla Documentation statistics
251(251) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 5(-4)20(-7) 89(-4)228(-9)
 commented 5(-13)   40(-36)   223(-20)   856(-39)
  resolved 1(-1) 6(-7) 53(-3)135(-6)
+ top 10 contributors:
  Ilmari Lauhakangas made 13 changes in 1 month, and 93 changes 
in 1 year
  Olivier Hallot made 11 changes in 1 month, and 271 changes in 
1 year
  Stéphane Guillou made 9 changes in 1 month, and 183 changes 
in 1 year
  Dione Maddern made 7 changes in 1 month, and 107 changes in 1 
year

  Heiko Tietze made 6 changes in 1 month, and 87 changes in 1 year
  *UNKNOWN* made 6 changes in 1 month, and 6 changes in 1 year
  Henschel, Regina made 6 changes in 1 month, and 17 changes in 
1 year

  Pierre F made 5 changes in 1 month, and 36 changes in 1 year
  m.a.riosv made 5 changes in 1 month, and 28 changes in 1 year
  Kaganski, Mike made 5 changes in 1 month, and 80 changes in 1 
year


* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
236(236) (topicUI) bugs open, 28(28) (needsUXEval) needs to be 
evaluated by the UXteam

+ Updates:
BZ changes   1 week   1 month3 months   12 months
 added  3(-2) 5(-5)  9(-4)  15(-4)
 commented 45(1)153(-21)   443(-13)   1758(-13)
   removed  0(0)  0(0)   4(-1)  10(0)
  resolved 11(5) 23(2)  79(4)  285(0)
+ top 10 contributors:
  Heiko Tietze made 90 changes in 1 month, and 966 changes in 1 
year
  Stéphane Guillou made 32 changes in 1 month, and 624 changes 
in 1 year
  Vernon, Stuart Foote made 27 changes in 1 month, and 328 
changes in 1 year

  Ady made 17 changes in 1 month, and 121 changes in 1 year
  Ilmari Lauhakangas made 17 changes in 1 month, and 137 
changes in 1 year

  Rafael Lima made 16 changes in 1 month, and 71 changes in 1 year
  Dieter made 10 changes in 1 month, and 151 changes in 1 year
  Eyal Rozenberg made 10 changes in 1 month, and 159 changes in 
1 year

  Cor Nouws made 6 changes in 1 month, and 25 changes in 1 year
  Kaganski, Mike made 6 changes in 1 month, and 73 changes in 1 
year
+ [Bug 162133] Tab stop of list contents increases then decreases 
in Roman numeral

   lists. Should be right-aligned.
+ [Bug 159167] Conditional formatting of cells based on rules for 
checking values

   greater than or less than
+ [Bug 162133] Tab stop of list contents increases then decreases 
in default Roman

   numeral list, looking messy
+ [Bug 162120] Auto-detect paragraph directions when they were not 
set explicitly
+ [Bug 162112] Toolbar position locking/unlocking should, by 
default, apply to all

   toolbars
 -> + [Bug 156223] FILEOPEN DOCX: Wrong automatic numbering for a 
heading after a page

   break
   + input welcome!
   + compatibility issue with a use case for separate chapter 
pages (Hossein)
+ [Bug 162101] Magnifier Tool for a quick overview and spot zoom 
into a document

   in Multiple-page view
+ [Bug 160560] WRITER / Tools / Language / For selection: checkbox 
doesn't act

   like a checkbox...


* Crash Testing (Caolan)
+ 20(+0) import failure, 16(+1) export failures
  - https://wiki.documentfoundation.org/Development/Crashtesting
+ 1368 coverity issues
  - downward trend
+ 8 ossfuzz issues

* Crash Reporting (Xisco)
+ 24.2.2.218362(+545)
+ 24.2.3.215707(+692)
+ 24.2.4.210280(+1395)
+ 24.2.5.21787(+1295)

- Regression in 24.2.5

- 
https://crashreport.libreoffice.org/stats/signature/ucbhelper::Content::getPropertyValuesInterface(com::sun::star::uno::Sequence%3Crtl::OUString%3E%20const%20&)


- Autocorrect. Related to 50be3fa1f0f3b8870af5bda88b65f835ef37d77e "

tdf#141773 AutoCorrect: fix broken [All] dictionaries" ?


* Mentoring (Hossein)
 + Reviewed submissions from newcomers
 + Worked on tdf#

core.git: sw/qa

2024-07-25 Thread Stephan Bergmann (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit e6d98900a9b035e616083416302759a28acdeb26
Author: Stephan Bergmann 
AuthorDate: Thu Jul 25 12:49:37 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 25 14:59:42 2024 +0200

-Werror,-Wunused-variable

...in code newly introduced in 62974cf6a8148377091cb709e7e00dacac152093
"tdf#158661 docx import plaintext sdt: remove unnecessary goRight"

Change-Id: I8d05c4936cdf17d2c819f8ab93ddab3ba6bfdc61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171005
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index ec0037196a3c..5b5010ecb750 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -481,7 +481,6 @@ CPPUNIT_TEST_FIXTURE(Test, testParagraphSdt)
 CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
 uno::Reference xContentControl;
 xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
-uno::Reference xContentControlProps(xContentControl, 
uno::UNO_QUERY);
 uno::Reference 
xContentControlEnumAccess(xContentControl, uno::UNO_QUERY);
 uno::Reference xContentControlEnum = 
xContentControlEnumAccess->createEnumeration();
 uno::Reference 
xTextPortionRange(xContentControlEnum->nextElement(), uno::UNO_QUERY);


core.git: include/comphelper solenv/gbuild static/emscripten

2024-07-25 Thread Stephan Bergmann (via logerrit)
 include/comphelper/threadpool.hxx  |8 +++-
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |2 +-
 static/emscripten/environment.js   |1 +
 3 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit b84ef4d67eaf9f9fd7fd700ca05339cb0cdff742
Author: Stephan Bergmann 
AuthorDate: Thu Jul 25 10:51:16 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 25 13:27:53 2024 +0200

Adapt comphelper::ThreadPool to Emscripten's threading needs

...by keeping the worker threads around by default instead of joining and 
later
re-spawning them; see 5b1df7709d75c6dd993da5a272e7e37e55a70174 "Document the
Emscripten threads issue".  But lets be cautious and change the bJoin 
default
only for Emscripten.

Also, cap the thread pool size to MAX_CONCURRENCY=4 and increase to
-sPTHREAD_POOL_SIZE=6.  In an experimental setup where the Emscripten build
starts up with the start center rather than a Writer document, that is just
enough to cover the thread-spawning needs when executing the start center
window's paint task:  Four threads for the comphelper::ThreadPool (used from
within drawinglayer::convertToBitmapEx -> ... ->
BitmapBasicMorphologyFilter::filter), and one each for
configmgr::Components::WriteThread (see 
e8358d0a0f7c2c4b1ccf800fe9ec8a7f2bf7066a
"Keep around a single configmgr::Components::WriteThread instance") and
salhelper::TimerManager.

Change-Id: I5b1d0e9dc09f05fb3b679c8dc1c38ee45c61c0f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171004
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/include/comphelper/threadpool.hxx 
b/include/comphelper/threadpool.hxx
index 84f9dc9284f6..0b2ebc8ac9e6 100644
--- a/include/comphelper/threadpool.hxx
+++ b/include/comphelper/threadpool.hxx
@@ -67,7 +67,13 @@ public:
 /** Wait until all queued tasks associated with the tag are completed
 @param  bJoin - if set call joinThreadsIfIdle() at the end
 */
-voidwaitUntilDone(const std::shared_ptr&, bool 
bJoin = true);
+voidwaitUntilDone(const std::shared_ptr&, bool 
bJoin =
+#if defined EMSCRIPTEN
+ false
+#else
+ true
+#endif
+ );
 
 /// join all threads if there are no tasks presently.
 voidjoinThreadsIfIdle();
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 45beedd1af34..3898ead4448d 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -15,7 +15,7 @@ gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1 
-D_LARGEFILE64_SOURCE -D_LA
 gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS)
 
 # Initial memory size and worker thread pool
-gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=4
+gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=6
 
 # To keep the link time (and memory) down, prevent all rewriting options from 
wasm-emscripten-finalize
 # See emscripten.py, finalize_wasm, modify_wasm = True
diff --git a/static/emscripten/environment.js b/static/emscripten/environment.js
index 5ad1f41363ed..4e5d1f98c596 100644
--- a/static/emscripten/environment.js
+++ b/static/emscripten/environment.js
@@ -2,5 +2,6 @@
 
 if (!('preRun' in Module)) Module['preRun'] = [];
 Module.preRun.push(function() {
+ENV.MAX_CONCURRENCY = '4';
 ENV.SAL_LOG = "+WARN"
 });


core.git: sfx2/source

2024-07-25 Thread Stephan Bergmann (via logerrit)
 sfx2/source/doc/guisaveas.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ebada44e9bac76d6ccbdc387ed673d938830bfd0
Author: Stephan Bergmann 
AuthorDate: Thu Jul 25 09:13:23 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 25 12:30:38 2024 +0200

Read of uninitialized bool

after 426c641976688e3e4d1ce66f76b27ccbd2dca55a "tdf#159040: add sign with
default certificate to save dialog", causing

> /sfx2/source/doc/guisaveas.cxx:307:54: runtime error: load of value 190, 
which is not a valid value for type 'bool'
> #0 0x7f1ab45ca7d6 in ModelData_Impl::IsSignWithDefaultSignature() 
const /sfx2/source/doc/guisaveas.cxx:307:54
> #1 0x7f1ab45957de in 
SfxStoringHelper::FinishGUIStoreModel(__gnu_debug::_Safe_iterator, false, true>, 
std::__debug::unordered_map > >, std::forward_iterator_tag>&, ModelData_Impl&, 
bool, short, 
com::sun::star::uno::Sequence&, bool, 
bool, bool, std::basic_string_view >, 
std::basic_string_view >, 
com::sun::star::uno::Sequence&, 
rtl::OUString) /sfx2/source/doc/guisaveas.cxx:1896:20
> #2 0x7f1ab45b49b0 in 
SfxStoringHelper::GUIStoreModel(com::sun::star::uno::Reference
 const&, std::basic_string_view >, 
com::sun::star::uno::Sequence&, bool, 
SignatureState, bool) /sfx2/source/doc/guisaveas.cxx:1626:12
> #3 0x7f1ab46b6ac3 in SfxObjectShell::ExecFile_Impl(SfxRequest&) 
/sfx2/source/doc/objserv.cxx:1096:26
> #4 0x7f1ab46a2ea4 in SfxStubSfxObjectShellExecFile_Impl(SfxShell*, 
SfxRequest&) /workdir/SdiTarget/sfx2/sdi/sfxslots.hxx:221:1
> #5 0x7f1ab343ae1e in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot 
const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:254:9
> #6 0x7f1ab3450745 in SfxDispatcher::Execute_(SfxShell&, SfxSlot 
const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9
> #7 0x7f1ab34515ab in SfxDispatcher::Execute(unsigned short, 
SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) 
/sfx2/source/control/dispatch.cxx:812:9
> #8 0x7f1ab3861c1b in 
SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, 
com::sun::star::uno::Sequence const&, 
com::sun::star::uno::Reference 
const&) /sfx2/source/control/unoctitm.cxx:675:46
> #9 0x7f1ab3864f41 in 
SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, 
com::sun::star::uno::Sequence const&, 
com::sun::star::uno::Reference 
const&) /sfx2/source/control/unoctitm.cxx:270:16
> #10 0x7f1a86be9616 in 
framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference
 const&, com::sun::star::util::URL const&, bool, 
com::sun::star::uno::Sequence const&) 
/framework/source/services/dispatchhelper.cxx:164:30
> #11 0x7f1a86be84eb in 
framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference
 const&, rtl::OUString const&, rtl::OUString const&, int, 
com::sun::star::uno::Sequence const&) 
/framework/source/services/dispatchhelper.cxx:121:16
> #12 0x7f1a86be9ec4 in non-virtual thunk to 
framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference
 const&, rtl::OUString const&, rtl::OUString const&, int, 
com::sun::star::uno::Sequence const&) 
/framework/source/services/dispatchhelper.cxx
> #13 0x7f1aaea0e879 in 
unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference
 const&, rtl::OUString const&, 
com::sun::star::uno::Sequence const&) 
/unotest/source/cpp/macros_test.cxx:94:33
> #14 0x7f1ad66c521e in 
ScPDFExportTest::exportToPDFWithUnoCommands(rtl::OUString const&) 
/sc/qa/extras/scpdfexport.cxx:196:5
> #15 0x7f1ad66d1e94 in ScPDFExportTest::testUnoCommands_Tdf120161() 
/sc/qa/extras/scpdfexport.cxx:376:9

during CppunitTest_sc_pdf_export
(<https://ci.libreoffice.org/job/lo_ubsan/3255/>)

Change-Id: If9e1b4b75a430506b999ecff916191ab1d3d58d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171000
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index eee91ba06a38..dc88659e6b1e 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -356,6 +356,7 @@ ModelData_Impl::ModelData_Impl( SfxStoringHelper& aOwner,
 , m_xModel(std::move( xModel ))
 , m_aMediaDescrHM( aMediaDescr )
 , m_bRecommendReadOnly( false )
+, m_bSignWithDefaultSignature( false )
 {
 CheckInteractionHandler();
 }


core.git: configmgr/source

2024-07-25 Thread Stephan Bergmann (via logerrit)
 configmgr/source/components.cxx |   54 +++-
 1 file changed, 42 insertions(+), 12 deletions(-)

New commits:
commit e8358d0a0f7c2c4b1ccf800fe9ec8a7f2bf7066a
Author: Stephan Bergmann 
AuthorDate: Thu Jul 25 07:59:58 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 25 09:51:52 2024 +0200

Keep around a single configmgr::Components::WriteThread instance

...instead of joining and later re-spawning one.  This helps with the 
current
Emscripten setup (see 5b1df7709d75c6dd993da5a272e7e37e55a70174 "Document the
Emscripten threads issue"), and probably doesn't matter much either way on 
other
platforms (so just get it in unconditionally).  (Renaming the delay_ member
variable to delayOrTerminate_, to make its overall role more clear.)

(I ran into this when trying to turn the Emscripten build from starting up 
with
a Writer document to starting up with the start center, and then manually
opening a new Writer document.  The resulting different usage scheme 
happened to
exhaust our current -sPTHREAD_POOL_SIZE=4 pool quickly, so this is one of
multiple commits to address that.)

Change-Id: I1bd28604b4640d2afad982bfd82b1acee8200e26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170993
    Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index d2b709e9c337..4790cdd4bd3c 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -21,6 +21,8 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -153,7 +155,16 @@ public:
 rtl::Reference< WriteThread > * reference, Components & components,
 OUString url, Data const & data);
 
-void flush() { delay_.set(); }
+void trigger() {
+std::scoped_lock l(triggerMutex_);
+triggered_ = true;
+triggerCondition_.notify_all();
+}
+
+void flush() {
+delayOrTerminate_.set();
+trigger();
+}
 
 private:
 virtual ~WriteThread() override {}
@@ -164,7 +175,10 @@ private:
 Components & components_;
 OUString url_;
 Data const & data_;
-osl::Condition delay_;
+osl::Condition delayOrTerminate_;
+std::mutex triggerMutex_;
+std::condition_variable triggerCondition_;
+bool triggered_;
 std::shared_ptr lock_;
 };
 
@@ -173,26 +187,41 @@ Components::WriteThread::WriteThread(
 OUString url, Data const & data):
 Thread("configmgrWriter"), reference_(reference), components_(components),
 url_(std::move(url)), data_(data),
+triggered_(false),
 lock_( lock() )
 {
 assert(reference != nullptr);
 }
 
 void Components::WriteThread::execute() {
-delay_.wait(std::chrono::seconds(1)); // must not throw; result_error is 
harmless and ignored
-osl::MutexGuard g(*lock_); // must not throw
-try {
+for (;;) {
+{
+std::unique_lock l(triggerMutex_);
+while (!triggered_) {
+triggerCondition_.wait(l);
+}
+triggered_ = false;
+}
+delayOrTerminate_.wait(std::chrono::seconds(1));
+// must not throw; result_error is harmless and ignored
+osl::MutexGuard g(*lock_); // must not throw
 try {
-writeModFile(components_, url_, data_);
-} catch (css::uno::RuntimeException &) {
-// Ignore write errors, instead of aborting:
-TOOLS_WARN_EXCEPTION("configmgr", "error writing modifications");
+try {
+writeModFile(components_, url_, data_);
+} catch (css::uno::RuntimeException &) {
+// Ignore write errors, instead of aborting:
+TOOLS_WARN_EXCEPTION("configmgr", "error writing 
modifications");
+}
+} catch (...) {
+reference_->clear();
+throw;
+}
+if (!delayOrTerminate_.check()) {
+continue;
 }
-} catch (...) {
 reference_->clear();
-throw;
+break;
 }
-reference_->clear();
 }
 
 Components & Components::getSingleton(
@@ -284,6 +313,7 @@ void Components::writeModifications() {
 &writeThread_, *this, modificationFileUrl_, data_);
 writeThread_->launch();
 }
+writeThread_->trigger();
 break;
 case ModificationTarget::Dconf:
 #if ENABLE_DCONF


core.git: configmgr/source

2024-07-24 Thread Stephan Bergmann (via logerrit)
 configmgr/source/components.cxx |   30 +-
 1 file changed, 1 insertion(+), 29 deletions(-)

New commits:
commit 8cdf186fac523959d011d76dc0ae8083cc266614
Author: Stephan Bergmann 
AuthorDate: Wed Jul 24 14:04:07 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jul 24 22:15:30 2024 +0200

Remove bExitWasCalled-handling from confgimgr::Components dtor

That code had been added with 9fa4eff9be5e440099517a522a83e20debaf2955
"profilesafe: Enhancements to BackupFileHelper", but it looks dubious:

For one, I cannot find proof for the claim that MSVC would run destructors 
of
static objects upon _exit.  Building a simple C++ test program

> #include 
> #include 
> struct S { ~S() { std::cerr << "hello
"; } };
> S s;
> void f() { _exit(1); }
> int main() { f(); }

with contemporary MSVC 17.10 and executing it shows no "hello" stderr output
(see

<https://gcc.godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,selection:(endColumn:13,endLineNumber:5,positionColumn:13,positionLineNumber:5,selectionStartColumn:13,selectionStartLineNumber:5,startColumn:13,startLineNumber:5),source:'%23include+%3Ciostream%3E%0A%23include+%3Cstdlib.h%3E%0Astruct+S+%7B+~S()+%7B+std::cerr+%3C%3C+%22hello%5Cn%22%3B+%7D+%7D%3B%0AS+s%3B%0Avoid+f()+%7B+_exit(1)%3B+%7D%0Aint+main()+%7B+f()%3B+%7D%0A'),l:'5',n:'1',o:'C%2B%2B+source+%231',t:'0')),k:32.19670284753087,l:'4',m:100,n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:vcpp_v19_40_VS17_10_x64,filters:(b:'0',binary:'1',binaryObject:'1',commentOnly:'0',debugCalls:'1',demangle:'0',directives:'0',execute:'0',intel:'0',libraryCode:'0',trim:'1',verboseDemangling:'0'),flagsViewOpen:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,libs:!(),options:'',overrides:!(),selection:(endColumn:1,endLineNumber:1,positionColumn:1,positionLineNumber:1,selectionStart
 
Column:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1),l:'5',n:'0',o:'+x64+msvc+v19.40+VS17.10+(Editor+%231)',t:'0'),(h:output,i:(compilerName:'x86-64+clang+18.1.0',editorid:1,fontScale:14,fontUsePx:'0',j:1,wrap:'1'),l:'5',n:'0',o:'Output+of+x64+msvc+v19.40+VS17.10+(Compiler+%231)',t:'0')),k:67.80329715246913,l:'4',m:100.01,n:'0',o:'',s:1,t:'0')),l:'2',n:'0',o:'',t:'0')),version:4>).

If there indeed were issues with MSVC and non-standard _exit, a solution 
might
be to use standard _Exit instead (in FatalError in 
desktop/source/app/app.cxx).

And for another, when bExitWasCalled was true in
configmgr::Components::~Components, it would still have called
writeThread_->join() (i.e., it would potentially still have called
writeModFile from within configmgr::Components::WriteThread::execute()), 
but (a)
only after waiting out its full

> delay_.wait(std::chrono::seconds(1));

(because it missed to call configmgr::Components::WriteThread::flush, which
calls delay_.set()), and (b) potentially running into a deadlock because it
called writeThread_->join() with *lock_ locked, which
configmgr::Components::WriteThread::execute wants to lock too.

(I came across this because it got into my way when trying to adapt the
lifecycle of configmgr::Components::WriteThread to the needs of the 
Emscripten
build.)

Change-Id: Icb4ebf00d1d316b80c29f7bd91b86614ef4ac430
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170940
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 8afaaff3bae8..d2b709e9c337 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -51,7 +51,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "additions.hxx"
@@ -607,34 +606,7 @@ Components::Components(
 
 Components::~Components()
 {
-// get flag if _exit was already called which is a sign to not secure user 
config.
-// this is used for win only currently where calling _exit() unfortunately 
still
-// calls destructors (what is not wanted). May be needed for other 
systems, too
-// (unknown yet) but can do no harm
-const bool 
bExitWasCalled(comphelper::BackupFileHelper::getExitWasCalled());
-
-#ifndef _WIN32
-// we can add a SAL_WARN here for other systems where the destructor gets 
called

core.git: static/README.wasm.md

2024-07-24 Thread Stephan Bergmann (via logerrit)
 static/README.wasm.md |   25 +
 1 file changed, 25 insertions(+)

New commits:
commit 5b1df7709d75c6dd993da5a272e7e37e55a70174
Author: Stephan Bergmann 
AuthorDate: Wed Jul 24 17:26:46 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jul 24 22:15:08 2024 +0200

Document the Emscripten threads issue

Change-Id: Ia26b48d46283a9528a665eb5028bd5b9bd0dd953
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170972
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/static/README.wasm.md b/static/README.wasm.md
index 54efd7ac4636..4aa2f592e6ef 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -337,6 +337,31 @@ Emscripten supports standalone WASI binaries:
 - 
<https://emscripten.org/docs/introducing_emscripten/about_emscripten.html#about-emscripten-porting-code>
 - <https://emscripten.org/docs/compiling/Building-Projects.html>
 
+### Threads and the event loop
+
+The Emscripten emulation of pthreads requires the JS main thread event loop to 
be able to promptly
+respond both when spawning and when exiting a pthread.  But the Qt5 event loop 
runs on the JS main
+thread, so the JS main thread event loop is blocked while a LO VCL Task is 
executed.  And our
+pthreads are typically spawned and joined from within such Task executions, 
which means that the JS
+main thread event loop is not available to reliably perform those Emscripten 
pthread operations.
+
+For pthread spawning, the solution is to set -sPTHREAD_POOL_SIZE to a 
sufficiently large value, so
+that each of our pthread spawning requests during an inappropriate time finds 
a pre-spawned JS
+Worker available.
+
+There are patterns (like, at the time of writing this, the 
configmgr::Components::WriteThread) where
+a pthread can get spawned and joined and then re-spawned (and re-joined) 
multiple times during a
+single VCL Task execution (i.e., without the JS main thread event loop having 
a chance to get in
+between any of those operations).  But as the underlying Emscripten ptherad 
exiting operations will
+therefore queue up, the pthread spawning operations will eventually run out of 
-sPTHREAD_POOL_SIZE
+pre-spawned JS Workers.  The solution here is to change our pthread usage 
patterns accordingly, so
+that such pthreads are rather kept running than being joined and re-spawned.
+
+(-sPROXY_TO_PTHREAD would move the Qt5 event loop off the JS main thread, 
which should elegantly
+solve all of the above issues.  But Qt5 just doesn't appear to be prepared to 
run on anything but
+the JS main thread; e.g., it tries to access the global JS `window` object in 
various places, which
+is available on the JS main thread but not in a JS Worker.)
+
 ## Building headless LibreOffice as WASM for use in another product
 
 ### Set up Emscripten


ESC meeting agenda: 2024-07-25 16:00 CEST

2024-07-24 Thread Stephan Bergmann

The prototype agenda is below. Extra items are appreciated either in
this document or as a reply to this mail:

https://pad.documentfoundation.org/p/esc

You can join using Jitsi here:

https://jitsi.documentfoundation.org/esc

---

* Present:
+

* Completed Action Items:

* Pending Action Items:

* Release Engineering update (Cloph)
  * 24.8.0 rc2 this week?
+ libreoffice-24-8 now needs 1 review
  * 24.2.6 rc1 in 4 weeks, as a current plan

* Documentation (Olivier)
+ Bugzilla Documentation statistics
251(251) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 5(-4)20(-7) 89(-4)228(-9)
 commented 5(-13)   40(-36)   223(-20)   856(-39)
  resolved 1(-1) 6(-7) 53(-3)135(-6)
+ top 10 contributors:
  Ilmari Lauhakangas made 13 changes in 1 month, and 93 changes 
in 1 year
  Olivier Hallot made 11 changes in 1 month, and 271 changes in 
1 year
  Stéphane Guillou made 9 changes in 1 month, and 183 changes 
in 1 year
  Dione Maddern made 7 changes in 1 month, and 107 changes in 1 
year

  Heiko Tietze made 6 changes in 1 month, and 87 changes in 1 year
  *UNKNOWN* made 6 changes in 1 month, and 6 changes in 1 year
  Henschel, Regina made 6 changes in 1 month, and 17 changes in 
1 year

  Pierre F made 5 changes in 1 month, and 36 changes in 1 year
  m.a.riosv made 5 changes in 1 month, and 28 changes in 1 year
  Kaganski, Mike made 5 changes in 1 month, and 80 changes in 1 
year

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
236(236) (topicUI) bugs open, 28(28) (needsUXEval) needs to be 
evaluated by the UXteam

+ Updates:
BZ changes   1 week   1 month3 months   12 months
 added  3(-2) 5(-5)  9(-4)  15(-4)
 commented 45(1)153(-21)   443(-13)   1758(-13)
   removed  0(0)  0(0)   4(-1)  10(0)
  resolved 11(5) 23(2)  79(4)  285(0)
+ top 10 contributors:
  Heiko Tietze made 90 changes in 1 month, and 966 changes in 1 
year
  Stéphane Guillou made 32 changes in 1 month, and 624 changes 
in 1 year
  Vernon, Stuart Foote made 27 changes in 1 month, and 328 
changes in 1 year

  Ady made 17 changes in 1 month, and 121 changes in 1 year
  Ilmari Lauhakangas made 17 changes in 1 month, and 137 
changes in 1 year

  Rafael Lima made 16 changes in 1 month, and 71 changes in 1 year
  Dieter made 10 changes in 1 month, and 151 changes in 1 year
  Eyal Rozenberg made 10 changes in 1 month, and 159 changes in 
1 year

  Cor Nouws made 6 changes in 1 month, and 25 changes in 1 year
  Kaganski, Mike made 6 changes in 1 month, and 73 changes in 1 
year

* Crash Testing (Caolan)
+ 20(+0) import failure, 16(+1) export failures
+ ??? coverity issues
+ Google / ossfuzz: ?? fuzzers active now

* Crash Reporting (Xisco)
+ 24.2.2.218362(+545)
+ 24.2.3.215707(+692)
+ 24.2.4.210280(+1395)
+ 24.2.5.21787(+1295)
* Mentoring (Hossein)
  committer...   1 week 1 month  3 months12 months
  open 100(9)  196(10)  197(10)  197(10)
   reviews 476(-48)   1676(-164)   3762(90)13166(60)
merged 285(-34)   1313(-93)3683(33)12925(52)
 abandoned  17(4)   81(-1)  199(-1)  735(9)
   own commits 203(-5) 845(-16)2535(12) 9419(-9)
review commits  37(-22)244(-70) 727(-28)3055(-38)
contributor...   1 week 1 month 3 months12 months
  open  59(19) 102(2)  104(4)   104(4)
   reviews 938(10)3408(-68)   8314(148)   29942(114)
merged  16(-1) 121(-10)264(-11)1521(-28)
 abandoned   6(-2)  25(0)   77(-6)  722(2)
   own commits  14(-15)132(-16)318(-13)1207(-6)
review commits   0(0)0(0)0(0) 0(0)
+ easyHack statistics:
   needsDevEval 9(9)   needsUXEval 1(1)   cleanup_comments 327(327)
   total 410(410)   assigned 22(22)   open 352(352)
+ top 10 contributors:
  Bogdan B made 57 patches in 1 month, and 88 patches in 1 year
  Pierre F made 8 patches in 1 month, and 32 patches in 1 year
  Armin Le Grand (allotropia) made 5 patches in 1 month, and 82 
patches in 1 year

  Weblate made 3 patches in 1 month, and 34 patches in 1 year
  Adam Seskunas made 3 patches in 1 month, and 17 patches in 1 year
  Ritobroto Mukherjee made 3 patches in 1 month, and 23 patches 
in 1 year
  Srebotnjak, Martin made 2 patches in 1 month, and 21 patches 
in 1 year
  Theppitak Karoonboonyanan made 2 patche

core.git: static/README.wasm.md

2024-07-19 Thread Stephan Bergmann (via logerrit)
 static/README.wasm.md |   30 --
 1 file changed, 30 deletions(-)

New commits:
commit f0b9cec9274b5770ec6f78ec958b2ce08baf9260
Author: Stephan Bergmann 
AuthorDate: Fri Jul 19 15:26:23 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 19 19:24:40 2024 +0200

Drop obsolete "Ideas for an UNO bridge implementation"

Change-Id: Ibf1de9cf8dc18e62b5ee67b31a8e3f3748c3941b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170769
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/static/README.wasm.md b/static/README.wasm.md
index 523658868e58..54efd7ac4636 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -171,36 +171,6 @@ The lode setup expects, inside the lode/docker subdir, the 
following directories
 - cache (`ccache tree`)
 - tarballs (external project tarballs gets written and cached there)
 
-
-## Ideas for an UNO bridge implementation
-
-My post to Discord #emscripten:
-
-"I'm looking for a way to do an abstract call
-from one WASM C++ object to another WASM C++ object, so like FFI / WebIDL,
-just within WASM. All my code is C++ and normally I have bridge code, with
-assembler to implement the function call /RTTI and exception semantics of the
-specified platform. Code is at
-<https://cgit.freedesktop.org/libreoffice/core/tree/bridges/source/cpp_uno>.
-I've read a bit about `call_indirect` and stuff, but I don't have yet a good
-idea, how I could implement this (and  there is an initial feature/wasm branch
-for the interested). I probably need some fixed lookup table, like on iOS,
-because AFAIK you can't dynamically generate code in WASM. So any pointers or
-ideas for an implementation? I can disassemble some minimalistic WASM example
-and read clang code for `WASM_EmscriptenInvoke`, but if there were some
-standalone code or documentation I'm missing, that would be nice to know."
-
-We basically would go the same way then the other backends. Write the bridge in
-C++, which is probably largely boilerplate code, but the function call in WAT
-(<https://github.com/WebAssembly/wabt>) based on the LLVM WASM calling
-conventions in `WASM_EmscriptenInvoke`. I didn't get a reply to that question 
for
-hours. Maybe I'll open an Emscripten issue, if we really have to implement
-this.
-
-WASM dynamic dispatch:
-
-- 
<https://fitzgeraldnick.com/2018/04/26/how-does-dynamic-dispatch-work-in-wasm.html>
-
 ### UNO bindings with Embind
 
 Right now there's a very rough implementation in place. With lots of different


core.git: desktop/source static/emscripten static/README.wasm.md unotest/source

2024-07-18 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/appinit.cxx  |2 +
 static/README.wasm.md   |   49 
 static/emscripten/uno.js|   11 +++
 unotest/source/embindtest/embindtest.js |3 -
 4 files changed, 35 insertions(+), 30 deletions(-)

New commits:
commit 91bedcab61424cdfb2f3ba9e48481406fe141ceb
Author: Stephan Bergmann 
AuthorDate: Thu Jul 18 11:44:45 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 18 15:55:12 2024 +0200

Change from Module.intiUno() to Module.uno_init promise

...that is resolved from within C++ Desktop::InitApplicationServiceManager 
once
UNO is fully initialized, so client code can trigger on
Module.uno_init.then(...)

Change-Id: I2d4c542d9729d09f434502e3f966e9ee474e926c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170683
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 633ebde2d967..f2b7edba1c8e 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -45,6 +45,7 @@
 #include 
 
 #if defined EMSCRIPTEN
+#include 
 #include 
 #endif
 
@@ -86,6 +87,7 @@ void Desktop::InitApplicationServiceManager()
 comphelper::setProcessServiceFactory(sm);
 #if defined EMSCRIPTEN
 init_unoembind_uno();
+EM_ASM(Module.uno_init$resolve(););
 #endif
 }
 
diff --git a/static/README.wasm.md b/static/README.wasm.md
index 7d69716e7173..523658868e58 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -210,33 +210,36 @@ improvement! ;)
 Some usage examples through javascript of the current implementation:
 ```js
 // inserts a string at the start of the Writer document.
-Module.initUno();
-const css = Module.uno.com.sun.star;
-const xModel = Module.getCurrentModelFromViewSh();
-const xTextDocument = css.text.XTextDocument.query(xModel);
-const xText = xTextDocument.getText();
-const xTextCursor = xText.createTextCursor();
-xTextCursor.setString("string here!");
+Module.uno_init.then(function() {
+const css = Module.uno.com.sun.star;
+const xModel = Module.getCurrentModelFromViewSh();
+const xTextDocument = css.text.XTextDocument.query(xModel);
+const xText = xTextDocument.getText();
+const xTextCursor = xText.createTextCursor();
+xTextCursor.setString("string here!");
+});
 ```
 
 ```js
 // changes each paragraph of the Writer document to a random color.
-Module.initUno();
-const css = Module.uno.com.sun.star;
-const xModel = Module.getCurrentModelFromViewSh();
-const xTextDocument = css.text.XTextDocument.query(xModel);
-const xText = xTextDocument.getText();
-const xEnumAccess = css.container.XEnumerationAccess.query(xText);
-const xParaEnumeration = xEnumAccess.createEnumeration();
-while (xParaEnumeration.hasMoreElements()) {
-const next = xParaEnumeration.nextElement();
-const xParagraph = css.text.XTextRange.query(next.get());
-const xParaProps = css.beans.XPropertySet.query(xParagraph);
-const color = new Module.uno_Any(Module.uno_Type.Long(), 
Math.floor(Math.random() * 0xFF));
-xParaProps.setPropertyValue("CharColor", color);
-next.delete();
-color.delete();
-}
+Module.uno_init.then(function() {
+const css = Module.uno.com.sun.star;
+const xModel = Module.getCurrentModelFromViewSh();
+const xTextDocument = css.text.XTextDocument.query(xModel);
+const xText = xTextDocument.getText();
+const xEnumAccess = css.container.XEnumerationAccess.query(xText);
+const xParaEnumeration = xEnumAccess.createEnumeration();
+while (xParaEnumeration.hasMoreElements()) {
+const next = xParaEnumeration.nextElement();
+const xParagraph = css.text.XTextRange.query(next.get());
+const xParaProps = css.beans.XPropertySet.query(xParagraph);
+const color = new Module.uno_Any(
+Module.uno_Type.Long(), Math.floor(Math.random() * 0xFF));
+xParaProps.setPropertyValue("CharColor", color);
+next.delete();
+color.delete();
+}
+});
 ```
 
 
diff --git a/static/emscripten/uno.js b/static/emscripten/uno.js
index 6a9c4cd5cb6e..7d051a24a84b 100644
--- a/static/emscripten/uno.js
+++ b/static/emscripten/uno.js
@@ -11,11 +11,13 @@
 
 Module.unoTagSymbol = Symbol('unoTag');
 
-Module.initUno = function() {
-if (Module.uno === undefined) {
+Module.uno_init = new Promise(function (resolve, reject) {
+Module.uno_init$resolve = function() {
 Module.uno = init_unoembind_uno(Module, Module.unoTagSymbol);
-}
-};
+resolve();
+};
+Module.uno_init$reject = reject;
+});
 
 Module.catchUnoException = function(exception) {
 // Rethrow non-C++ exceptions (non-UNO C++ exceptions are mapped to 
css.uno.RuntimeException in
@@ -30,7 +32,6 @@ Module.catchUnoException = function(exception) {
 }
 
 Module.unoObject = function(interfa

  1   2   3   4   5   6   7   8   9   10   >