core.git: bridges/source unotest/source

2024-05-09 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx |   97 ---
 unotest/source/embindtest/embindtest.js  |   52 ++
 2 files changed, 125 insertions(+), 24 deletions(-)

New commits:
commit 3956472eb249e54d5b96af59b33646ee3ceec897
Author: Stephan Bergmann 
AuthorDate: Wed May 8 14:44:41 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 9 21:04:51 2024 +0200

Fix missing UNO<->C++ argument/return value conversions

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

diff --git a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
index 788d8b2ba99a..537b8f89a872 100644
--- a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
@@ -11,12 +11,17 @@
 
 #include 
 
+#include 
+
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -86,9 +91,12 @@ void call(bridges::cpp_uno::shared::UnoInterfaceProxy* proxy,
   sal_Int32 count, typelib_MethodParameter* parameters, void* 
returnValue, void** arguments,
   uno_Any** exception)
 {
+css::uno::TypeDescription rtd(returnType);
+auto const retConv = 
bridges::cpp_uno::shared::relatesToInterfaceType(rtd.get());
+auto const ret = retConv ? alloca(rtd.get()->nSize) : returnValue;
 OStringBuffer sig;
 std::vector args;
-switch (returnType->eTypeClass)
+switch (rtd.get()->eTypeClass)
 {
 case typelib_TypeClass_VOID:
 sig.append('v');
@@ -119,12 +127,11 @@ void call(bridges::cpp_uno::shared::UnoInterfaceProxy* 
proxy,
 case typelib_TypeClass_SEQUENCE:
 case typelib_TypeClass_INTERFACE:
 sig.append("vi");
-args.push_back(reinterpret_cast(returnValue));
+args.push_back(reinterpret_cast(ret));
 break;
 case typelib_TypeClass_STRUCT:
 {
-css::uno::TypeDescription td(returnType);
-switch (getKind(reinterpret_cast(td.get(
+switch (getKind(reinterpret_cast(rtd.get(
 {
 case StructKind::Empty:
 break;
@@ -142,7 +149,7 @@ void call(bridges::cpp_uno::shared::UnoInterfaceProxy* 
proxy,
 break;
 case StructKind::General:
 sig.append("vi");
-args.push_back(reinterpret_cast(returnValue));
+args.push_back(reinterpret_cast(ret));
 break;
 }
 break;
@@ -151,15 +158,14 @@ void call(bridges::cpp_uno::shared::UnoInterfaceProxy* 
proxy,
 O3TL_UNREACHABLE;
 }
 sig.append('i');
-args.push_back(reinterpret_cast(proxy->getCppI()));
+sal_uInt32 const* const* thisPtr
+= reinterpret_cast(proxy->getCppI()) + 
slot.offset;
+args.push_back(reinterpret_cast(thisPtr));
+std::vector cppArgs(count);
+std::vector ptds(count);
 for (sal_Int32 i = 0; i != count; ++i)
 {
-if (parameters[i].bOut)
-{
-sig.append('i');
-args.push_back(reinterpret_cast(arguments[i]));
-}
-else
+if (!parameters[i].bOut && 
bridges::cpp_uno::shared::isSimpleType(parameters[i].pTypeRef))
 {
 switch (parameters[i].pTypeRef->eTypeClass)
 {
@@ -208,25 +214,38 @@ void call(bridges::cpp_uno::shared::UnoInterfaceProxy* 
proxy,
 sig.append('i');
 args.push_back(*reinterpret_cast(arguments[i]));
 break;
-case typelib_TypeClass_STRING:
-case typelib_TypeClass_TYPE:
-case typelib_TypeClass_ANY:
-case typelib_TypeClass_SEQUENCE:
-case typelib_TypeClass_STRUCT:
-case typelib_TypeClass_INTERFACE:
-sig.append('i');
-args.push_back(reinterpret_cast(arguments[i]));
-break;
 default:
 O3TL_UNREACHABLE;
 }
 }
+else
+{
+sig.append('i');
+css::uno::TypeDescription ptd(parameters[i].pTypeRef);
+if (!parameters[i].bIn)
+{
+cppArgs[i] = alloca(ptd.get()->nSize);
+uno_constructData(cppArgs[i], ptd.get());
+ptds[i] = ptd;
+args.push_back(reinterpret_cast(cppArgs[i]));
+}
+else if 
(bridges::cpp_uno::shared::relatesToInterfaceType(ptd.get()))
+{
+cppArgs[i] = alloca(ptd.get()->nSize);
+uno_copyAndConvertData(cppArgs[i], arguments[i], ptd.get(),
+   proxy->getBridge()->getUno2Cpp());
+ptds[i] = 

core.git: static/source unotest/source

2024-05-09 Thread Stephan Bergmann (via logerrit)
 static/source/unoembindhelpers/PrimaryBindings.cxx |5 -
 unotest/source/embindtest/embindtest.js|   17 +
 2 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit c6f39e2deedd93ccf52ca5bb4402cabc3e8bdda7
Author: Stephan Bergmann 
AuthorDate: Wed May 8 11:08:15 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 9 18:48:29 2024 +0200

Embind: Fix uno_Any.get for null interface values

...which had caused an additional getNull/isNull check for
a469aea9c0b532d928cd41e389c9c51de1af06f0 "Emscripten: Towards a working C++ 
UNO
bridge" to fail

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 4972699178c8..9f9a5cf588d5 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -370,7 +370,10 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 auto const ifc = *static_cast(self.getValue());
 auto const copy = 
std::malloc(sizeof(css::uno::XInterface*));
 *static_cast(copy) = ifc;
-ifc->acquire();
+if (ifc != nullptr)
+{
+ifc->acquire();
+}
 emscripten::internal::WireTypePack argv(std::move(copy));
 return emscripten::val::take_ownership(
 _emval_take_value(getTypeId(self.getValueType()), 
argv));
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 3944f399e3b1..00d9ac68cd3c 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -1027,6 +1027,23 @@ Module.addOnPostRun(function() {
 outparamindex.delete();
 outparam.delete();
 }
+{
+const params1 = new Module.uno_Sequence_any(0, 
Module.uno_Sequence.FromSize);
+const outparamindex = new Module.uno_InOutParam_sequence_short;
+const outparam = new Module.uno_InOutParam_sequence_any;
+const ret1 = invoke.invoke('getNull', params1, outparamindex, 
outparam);
+console.log(ret1.get());
+const params2 = new Module.uno_Sequence_any([ret1]);
+const ret2 = invoke.invoke('isNull', params2, outparamindex, outparam);
+console.log(ret2.get());
+console.assert(ret2.get());
+ret1.delete();
+params1.delete();
+ret2.delete();
+params2.delete();
+outparamindex.delete();
+outparam.delete();
+}
 });
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


core.git: bridges/source

2024-05-09 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit e49fd672b17ba382d78a130648e714fa130d39c5
Author: Stephan Bergmann 
AuthorDate: Wed May 8 13:23:30 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 9 14:00:33 2024 +0200

Fix typelib_TypeDescriptionReference -> typelib_TypeDescription conversion

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

diff --git a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
index a0fdd15e05e6..788d8b2ba99a 100644
--- a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
@@ -12,11 +12,11 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -123,9 +123,8 @@ void call(bridges::cpp_uno::shared::UnoInterfaceProxy* 
proxy,
 break;
 case typelib_TypeClass_STRUCT:
 {
-typelib_TypeDescription* td = nullptr;
-css::uno::Type(returnType).getDescription();
-switch (getKind(reinterpret_cast(td)))
+css::uno::TypeDescription td(returnType);
+switch (getKind(reinterpret_cast(td.get(
 {
 case StructKind::Empty:
 break;


core.git: bridges/source

2024-05-08 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx |  315 +--
 1 file changed, 161 insertions(+), 154 deletions(-)

New commits:
commit 4fc4e24fb0ac549b7684aac8e020253c0cc76603
Author: Stephan Bergmann 
AuthorDate: Wed May 8 12:57:08 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 8 14:37:24 2024 +0200

Move call code out into a function of its own

...so that it can be reused in the future for attribute getters/setters

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

diff --git a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
index 41a471bcc9b0..a0fdd15e05e6 100644
--- a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
@@ -80,6 +80,165 @@ StructKind getKind(typelib_CompoundTypeDescription const* 
type)
 return StructKind::General;
 }
 }
+
+void call(bridges::cpp_uno::shared::UnoInterfaceProxy* proxy,
+  bridges::cpp_uno::shared::VtableSlot slot, 
typelib_TypeDescriptionReference* returnType,
+  sal_Int32 count, typelib_MethodParameter* parameters, void* 
returnValue, void** arguments,
+  uno_Any** exception)
+{
+OStringBuffer sig;
+std::vector args;
+switch (returnType->eTypeClass)
+{
+case typelib_TypeClass_VOID:
+sig.append('v');
+break;
+case typelib_TypeClass_BOOLEAN:
+case typelib_TypeClass_BYTE:
+case typelib_TypeClass_SHORT:
+case typelib_TypeClass_UNSIGNED_SHORT:
+case typelib_TypeClass_LONG:
+case typelib_TypeClass_UNSIGNED_LONG:
+case typelib_TypeClass_CHAR:
+case typelib_TypeClass_ENUM:
+sig.append('i');
+break;
+case typelib_TypeClass_HYPER:
+case typelib_TypeClass_UNSIGNED_HYPER:
+sig.append('j');
+break;
+case typelib_TypeClass_FLOAT:
+sig.append('f');
+break;
+case typelib_TypeClass_DOUBLE:
+sig.append('d');
+break;
+case typelib_TypeClass_STRING:
+case typelib_TypeClass_TYPE:
+case typelib_TypeClass_ANY:
+case typelib_TypeClass_SEQUENCE:
+case typelib_TypeClass_INTERFACE:
+sig.append("vi");
+args.push_back(reinterpret_cast(returnValue));
+break;
+case typelib_TypeClass_STRUCT:
+{
+typelib_TypeDescription* td = nullptr;
+css::uno::Type(returnType).getDescription();
+switch (getKind(reinterpret_cast(td)))
+{
+case StructKind::Empty:
+break;
+case StructKind::I32:
+sig.append('i');
+break;
+case StructKind::I64:
+sig.append('j');
+break;
+case StructKind::F32:
+sig.append('f');
+break;
+case StructKind::F64:
+sig.append('d');
+break;
+case StructKind::General:
+sig.append("vi");
+args.push_back(reinterpret_cast(returnValue));
+break;
+}
+break;
+}
+default:
+O3TL_UNREACHABLE;
+}
+sig.append('i');
+args.push_back(reinterpret_cast(proxy->getCppI()));
+for (sal_Int32 i = 0; i != count; ++i)
+{
+if (parameters[i].bOut)
+{
+sig.append('i');
+args.push_back(reinterpret_cast(arguments[i]));
+}
+else
+{
+switch (parameters[i].pTypeRef->eTypeClass)
+{
+case typelib_TypeClass_BOOLEAN:
+sig.append('i');
+args.push_back(*reinterpret_cast(arguments[i]));
+break;
+case typelib_TypeClass_BYTE:
+sig.append('i');
+args.push_back(*reinterpret_cast(arguments[i]));
+break;
+case typelib_TypeClass_SHORT:
+sig.append('i');
+args.push_back(*reinterpret_cast(arguments[i]));
+break;
+case typelib_TypeClass_UNSIGNED_SHORT:
+sig.append('i');
+args.push_back(*reinterpret_cast(arguments[i]));
+break;
+case typelib_TypeClass_LONG:
+case typelib_TypeClass_ENUM:
+sig.append('i');
+args.push_back(*reinterpret_cast(arguments[i]));
+break;
+case typelib_TypeClass_UNSIGNED_LONG:
+sig.append('i');
+

core.git: bridges/CustomTarget_gcc3_wasm.mk bridges/inc bridges/Library_cpp_uno.mk bridges/Module_bridges.mk bridges/source offapi/org offapi/UnoApi_offapi.mk Repository.mk solenv/gbuild static/Execut

2024-05-08 Thread Stephan Bergmann (via logerrit)
 Repository.mk  |2 
 bridges/CustomTarget_gcc3_wasm.mk  |   26 
 bridges/Library_cpp_uno.mk |6 
 bridges/Module_bridges.mk  |1 
 bridges/inc/wasm/callvirtualfunction.hxx   |   21 
 bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx   |  226 +++
 offapi/UnoApi_offapi.mk|2 
 offapi/org/libreoffice/embindtest/StructLong.idl   |   18 
 offapi/org/libreoffice/embindtest/StructString.idl |   18 
 offapi/org/libreoffice/embindtest/XTest.idl|4 
 solenv/gbuild/extensions/pre_BuildTools.mk |2 
 static/Executable_wasmcallgen.mk   |   26 
 static/Module_static.mk|1 
 static/source/wasmcallgen/wasmcallgen.cxx  |  610 +
 unotest/source/embindtest/embindtest.cxx   |   23 
 unotest/source/embindtest/embindtest.js|  330 +++
 16 files changed, 1313 insertions(+), 3 deletions(-)

New commits:
commit a469aea9c0b532d928cd41e389c9c51de1af06f0
Author: Stephan Bergmann 
AuthorDate: Wed May 8 09:46:55 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 8 13:01:04 2024 +0200

Emscripten: Towards a working C++ UNO bridge

...by making the general UNO -> C++ function call case work (modulo handling
exceptions, which I'll look into later).

Wasm call_indirect unfortunately needs to statically know the call target's
signature, so we statically need to know all possible signatures.  So 
introduce
wasmcallgen helper to scan the existing UNOIDL API upfront and generate the
relevant callvirtualfunction-wrapper.cxx and callvirtualfunction-inst.s 
code.
(The good thing is that the number of different signatures is somewhat 
limited,
each parameter can only be one of i32, i64, f32, or f64.  So even if 
3rd-party
extensions bring along new UNOIDL interface methods, chances are relatively 
high
that the signatures needed for them would already be covered by the existing
ones.)

Testing this can nicely be done in unotest/source/embindtest/embindtest.js 
via
css.script.Invocation (which internally exercises the relevant code).  
(Instead
of adding individual org.libreoffice.embindtest.StructLong/String etc., it 
would
be nicer to introduce some polymorphic StructOne, but the Emind UNO 
binding
does not support polymorphic structs, so the embindtest.js code would not 
work.)

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

diff --git a/Repository.mk b/Repository.mk
index e910b6d572b7..b6ebf64dcf39 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -33,7 +33,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
concat-deps \
cpp \
cppunittester \
-   $(if $(or $(filter EMSCRIPTEN,$(BUILD_TYPE_FOR_HOST)),$(filter 
EMSCRIPTEN,$(OS))),embindmaker) \
+   $(if $(or $(filter EMSCRIPTEN,$(BUILD_TYPE_FOR_HOST)),$(filter 
EMSCRIPTEN,$(OS))),embindmaker wasmcallgen) \
gbuildtojson \
$(if $(filter MSC,$(COM)), \
gcc-wrapper \
diff --git a/bridges/CustomTarget_gcc3_wasm.mk 
b/bridges/CustomTarget_gcc3_wasm.mk
new file mode 100644
index ..a88da8577282
--- /dev/null
+++ b/bridges/CustomTarget_gcc3_wasm.mk
@@ -0,0 +1,26 @@
+# -*- 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,bridges/gcc3_wasm))
+
+$(eval $(call gb_CustomTarget_register_targets,bridges/gcc3_wasm, \
+callvirtualfunction-wrapper.cxx \
+callvirtualfunction-impls.s \
+))
+
+$(gb_CustomTarget_workdir)/bridges/gcc3_wasm/callvirtualfunction-impls.s \
+$(gb_CustomTarget_workdir)/bridges/gcc3_wasm/callvirtualfunction-wrapper.cxx: \
+$(call gb_Executable_get_target_for_build,wasmcallgen) $(call 
gb_UnoApi_get_target,udkapi) \
+$(call gb_UnoApi_get_target,offapi)
+   $(call gb_Executable_get_command,wasmcallgen) \
+
$(gb_CustomTarget_workdir)/bridges/gcc3_wasm/callvirtualfunction-wrapper.cxx \
+
$(gb_CustomTarget_workdir)/bridges/gcc3_wasm/callvirtualfunction-impls.s \
++$(call gb_UnoApi_get_target,udkapi) +$(call 
gb_UnoApi_get_target,offapi)
+
+# vim: set noet sw=4 ts=4:
diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index dcf83cf34e5b..c42778f359c1 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -84,6 +84,12 @@ bridge_noopt_objects := except
 else ifeq ($(OS),EMSCRIPTEN)
 

core.git: solenv/bin solenv/gbuild

2024-05-07 Thread Stephan Bergmann (via logerrit)
 solenv/bin/concat-deps.c|5 ++
 solenv/gbuild/Library.mk|1 
 solenv/gbuild/LinkTarget.mk |   63 ++--
 solenv/gbuild/TargetLocations.mk|3 +
 solenv/gbuild/platform/android.mk   |1 
 solenv/gbuild/platform/com_MSC_class.mk |1 
 solenv/gbuild/platform/iOS.mk   |2 +
 solenv/gbuild/platform/macosx.mk|2 +
 solenv/gbuild/platform/solaris.mk   |2 +
 solenv/gbuild/platform/unxgcc.mk|3 +
 10 files changed, 81 insertions(+), 2 deletions(-)

New commits:
commit dfec385f3c80848abd5ead6f1ae682fcefc06b16
Author: Stephan Bergmann 
AuthorDate: Tue May 7 18:59:42 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue May 7 21:18:35 2024 +0200

Add gb_Library_add_generated_asmobjects

...to be used by a follow up commit in EMSCRIPTEN's 
bridges/Library_cpp_uno.mk

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

diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 996f874bf606..844b8bbd383f 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -1091,6 +1091,11 @@ static int process(struct hash* dep_hash, char* fn)
 created_line = generate_phony_line(src_relative, "o");
 rc = generate_phony_file(fn, created_line);
 }
+else if(strncmp(src_relative, "GenAsmObject/", 14) == 0)
+{
+created_line = generate_phony_line(src_relative, "o");
+rc = generate_phony_file(fn, created_line);
+}
 else if(strncmp(src_relative, "GenNasmObject/", 14) == 0)
 {
 created_line = generate_phony_line(src_relative, "o");
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index d82a261e002b..e58dc3974466 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -237,6 +237,7 @@ gb_Library_add_asmobject = $(call 
gb_Library__forward_to_Linktarget,$(0),$(1),$(
 gb_Library_add_asmobjects = $(call 
gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 gb_Library_add_exception_objects = $(call 
gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 gb_Library_add_x64_generated_exception_objects = $(call 
gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3))
+gb_Library_add_generated_asmobjects = $(call 
gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 gb_Library_add_generated_cobjects = $(call 
gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 gb_Library_add_generated_exception_objects = $(call 
gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 gb_Library_add_generated_objcobjects = $(call 
gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3))
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 3004fbbf24de..a4e44d52d6e9 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -170,9 +170,9 @@ endef
 # Overview of dependencies and tasks of LinkTarget
 #
 # target  task depends on
-# LinkTarget  linking  AsmObject CObject 
CxxObject GenCObject GenCxxObject ObjCObject ObjCxxObject GenObjCObject 
GenObjCxxObject GenNasmObject CxxClrObject
+# LinkTarget  linking  AsmObject CObject 
CxxObject GenCObject GenCxxObject ObjCObject ObjCxxObject GenObjCObject 
GenObjCxxObject GenAsmObject GenNasmObject CxxClrObject
 #  LinkTarget/headers
-# LinkTarget/dep  joined dep file  AsmObject/dep 
CObject/dep CxxObject/dep GenCObject/dep GenCxxObject/dep ObjCObject/dep 
ObjCxxObject/dep GenObjCObject/dep GenObjCxxObject/dep GenNasmObject/dep 
CxxClrObject/dep GenCxxClrObject/dep
+# LinkTarget/dep  joined dep file  AsmObject/dep 
CObject/dep CxxObject/dep GenCObject/dep GenCxxObject/dep ObjCObject/dep 
ObjCxxObject/dep GenObjCObject/dep GenObjCxxObject/dep GenAsmObject/dep 
GenNasmObject/dep CxxClrObject/dep GenCxxClrObject/dep
 #  | LinkTarget/headers
 # LinkTarget/headers  all headers available
 # including own generated
@@ -189,6 +189,8 @@ endef
 #  generated source
 # GenObjCxxObject objective c++ compile from   | LinkTarget/headers
 #  generated source
+# GenAsmObjectasm compile from | LinkTarget/headers
+#  generated source
 # GenNasmObject   nasm compile from| LinkTarget/headers
 #  generated source
 # CxxClrObjectC++ CLR compile  | 

core.git: sc/inc

2024-05-06 Thread Stephan Bergmann (via logerrit)
 sc/inc/stlalgorithm.hxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 76a74ae8a295e5a677a20507a8c855c376c0d23f
Author: Stephan Bergmann 
AuthorDate: Mon May 6 08:48:08 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 6 10:51:15 2024 +0200

Lets see if "MSVC '12 'unreferenced formal parameter'" workaround can go now

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

diff --git a/sc/inc/stlalgorithm.hxx b/sc/inc/stlalgorithm.hxx
index fe3244148618..f967154dc30c 100644
--- a/sc/inc/stlalgorithm.hxx
+++ b/sc/inc/stlalgorithm.hxx
@@ -49,9 +49,6 @@ public:
 static void destroy(T* p)
 {
 p->~value_type();
-#if defined _MSC_VER
-(void)p; // avoid bogus MSVC '12 "unreferenced formal parameter" 
warning
-#endif
 }
 
 static size_type max_size()


core.git: compilerplugins/clang

2024-05-05 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/noexceptmove.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7a895ec4205659038aa95941b65715fed1a3e7be
Author: Stephan Bergmann 
AuthorDate: Sun May 5 17:09:24 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sun May 5 22:30:56 2024 +0200

Avoid loplugin:noexceptmove failure with recent Clang 19 trunk

> CallExpr 0x7fae572c85e0 ''
> `-UnresolvedMemberExpr 0x7fae572c8580 '' 
lvalue
>   `-DeclRefExpr 0x7fae572c8560 'WeakReference' lvalue 
ParmVar 0x7fae572c76d0 'rWeakRef' 'WeakReference &&'
> In file included from tools/source/ref/ref.cxx:21:
> include/tools/weakbase.hxx:52:5: error: what's up doc? 
[loplugin:noexceptmove]
>52 | rWeakRef.reset();
>   | ^~~~

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

diff --git a/compilerplugins/clang/noexceptmove.cxx 
b/compilerplugins/clang/noexceptmove.cxx
index 04ec58044ce4..9be55e870e61 100644
--- a/compilerplugins/clang/noexceptmove.cxx
+++ b/compilerplugins/clang/noexceptmove.cxx
@@ -286,7 +286,8 @@ compat::optional NoExceptMove::IsCallThrows(const 
CallExpr* callExpr)
 }
 
 auto calleeExpr = callExpr->getCallee();
-if (isa(calleeExpr) || 
isa(calleeExpr))
+if (isa(calleeExpr) || 
isa(calleeExpr)
+|| isa(calleeExpr))
 {
 m_CannotFix.back() = true;
 return true;


core.git: sc/inc

2024-05-05 Thread Stephan Bergmann (via logerrit)
 sc/inc/stlalgorithm.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8c49dab215ed012fea195ea71cea079ddaa97ba3
Author: Stephan Bergmann 
AuthorDate: Sun May 5 17:10:37 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sun May 5 21:07:44 2024 +0200

Avoid loplugin:casttovoid with recent Clang 19 trunk

> In file included from sc/source/core/data/autonamecache.cxx:23:
> In file included from sc/inc/dociter.hxx:23:
> In file included from sc/inc/formulagroup.hxx:17:
> sc/inc/stlalgorithm.hxx:52:9: error: unnecessary cast to void 
[loplugin:casttovoid]
>52 | (void)p; // avoid bogus MSVC '12 "unreferenced formal 
parameter" warning
>   | ^~~
> sc/inc/stlalgorithm.hxx:51:9: note: first consumption is here 
[loplugin:casttovoid]
>51 | p->~value_type();
>   | ^

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

diff --git a/sc/inc/stlalgorithm.hxx b/sc/inc/stlalgorithm.hxx
index f2143b9a84c7..fe3244148618 100644
--- a/sc/inc/stlalgorithm.hxx
+++ b/sc/inc/stlalgorithm.hxx
@@ -49,7 +49,9 @@ public:
 static void destroy(T* p)
 {
 p->~value_type();
+#if defined _MSC_VER
 (void)p; // avoid bogus MSVC '12 "unreferenced formal parameter" 
warning
+#endif
 }
 
 static size_type max_size()


core.git: desktop/Executable_soffice_bin.mk

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

New commits:
commit 9d84957863d274501fe130319d972a3fc2572503
Author: Stephan Bergmann 
AuthorDate: Thu May 2 10:40:35 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 3 10:23:56 2024 +0200

Simplify condition

...after this got wrapped in an outer

> ifeq ($(OS),EMSCRIPTEN)

in cf0b0f0dd04fae98b686cd5768673c217a58fab6 "Emscripten: Only add the 
--pre-js
code to the soffice executable"

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

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index dba50e637aba..8ffd04ee1c24 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -33,7 +33,7 @@ $(call gb_LinkTarget_get_target,$(call 
gb_Executable_get_linktarget,soffice_bin)
 # don't sort; later can override previous settings!
 $(eval $(call 
gb_Executable_add_prejs,soffice_bin,$(SRCDIR)/static/emscripten/environment.js))
 $(eval $(call gb_Executable_add_prejs,soffice_bin,$(call 
gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.link))
-ifeq ($(OS)-$(ENABLE_QT5),EMSCRIPTEN-TRUE)
+ifeq ($(ENABLE_QT5),TRUE)
 $(eval $(call 
gb_Executable_add_prejs,soffice_bin,$(SRCDIR)/static/emscripten/soffice_args.js))
 endif
 endif


core.git: drawinglayer/CppunitTest_drawinglayer_processors.mk solenv/gbuild writerperfect/CppunitTest_writerperfect_epubexport.mk

2024-05-01 Thread Stephan Bergmann (via logerrit)
 drawinglayer/CppunitTest_drawinglayer_processors.mk   |2 +-
 solenv/gbuild/extensions/post_SpeedUpTargets.mk   |3 +++
 solenv/gbuild/gbuild.mk   |8 
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk|2 --
 writerperfect/CppunitTest_writerperfect_epubexport.mk |2 +-
 5 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit a3d758d528d3408fcccd7d3673439b5d68347e30
Author: Stephan Bergmann 
AuthorDate: Tue Apr 30 16:51:21 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 2 07:52:03 2024 +0200

Prepare to run (select) tests during Emscripten build

...by e.g. executing generated Wasm code with node.  This requires check 
targets
to not be skipped unconditionally, unlike for other CROSS_COMPILING builds, 
so
introduce gb_CAN_EXECUTE_HOST_CODE to distinguish these cases.

Which revealed that some CppunitTest targets unconditionally used artefacts 
that
are covered by some ENABLE_WASM_STRIP_*, so made those uses conditional
accordingly (even though the resulting binaries might actually be 
dysfunctional,
lacking relevant parts; we'll fix that if and when we actually build and run
them).

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

diff --git a/drawinglayer/CppunitTest_drawinglayer_processors.mk 
b/drawinglayer/CppunitTest_drawinglayer_processors.mk
index fcbbf247f10a..627809b814a8 100644
--- a/drawinglayer/CppunitTest_drawinglayer_processors.mk
+++ b/drawinglayer/CppunitTest_drawinglayer_processors.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_CppunitTest_use_api,drawinglayer_processors,\
 
 $(eval $(call gb_CppunitTest_use_libraries,drawinglayer_processors, \
basegfx \
-   cppcanvas \
+   $(if $(ENABLE_WASM_STRIP_CANVAS),,cppcanvas) \
cppu \
cppuhelper \
sal \
diff --git a/solenv/gbuild/extensions/post_SpeedUpTargets.mk 
b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
index 44539cc5576d..18f1277a8039 100644
--- a/solenv/gbuild/extensions/post_SpeedUpTargets.mk
+++ b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
@@ -9,6 +9,9 @@
 
 ifneq ($(CROSS_COMPILING),)
 gb_Module_add_targets_for_build :=
+endif
+
+ifeq ($(gb_CAN_EXECUTE_HOST_CODE),$(false))
 gb_Module_SKIPTARGETS := check coverage slowcheck screenshot subsequentcheck 
uicheck
 endif
 
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 2f5704896d42..ab6132e3b5d2 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -166,6 +166,14 @@ ifneq ($(strip $(ENVCFLAGSCXX)),)
 gb__ENV_CXXFLAGS := $(ENVCFLAGSCXX)
 endif
 
+ifeq ($(CROSS_COMPILING),)
+gb_CAN_EXECUTE_HOST_CODE := $(true)
+else ifeq ($(OS),EMSCRIPTEN)
+gb_CAN_EXECUTE_HOST_CODE := $(true)
+else
+gb_CAN_EXECUTE_HOST_CODE := $(false)
+endif
+
 include $(GBUILDDIR)/ExternalExecutable.mk
 include $(GBUILDDIR)/TargetLocations.mk
 
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index e660c20cc650..7cd4d3c6fa02 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -92,8 +92,6 @@ $(call gb_LinkTarget_add_auxtargets,$(2),\
 
 endef
 
-gb_SUPPRESS_TESTS := $(true)
-
 define gb_Library_get_rpath
 endef
 
diff --git a/writerperfect/CppunitTest_writerperfect_epubexport.mk 
b/writerperfect/CppunitTest_writerperfect_epubexport.mk
index 298a045b32e3..ff8410b345be 100644
--- a/writerperfect/CppunitTest_writerperfect_epubexport.mk
+++ b/writerperfect/CppunitTest_writerperfect_epubexport.mk
@@ -30,7 +30,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,writerperfect_epubexport, \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,writerperfect_epubexport,\
-epubgen \
+$(if $(ENABLE_WASM_STRIP_EPUB),,epubgen) \
 libxml2 \
 revenge \
 ))


core.git: desktop/Executable_soffice_bin.mk solenv/gbuild

2024-04-30 Thread Stephan Bergmann (via logerrit)
 desktop/Executable_soffice_bin.mk  |7 +++
 solenv/gbuild/Executable.mk|4 +++-
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |9 -
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit cf0b0f0dd04fae98b686cd5768673c217a58fab6
Author: Stephan Bergmann 
AuthorDate: Tue Apr 30 15:24:44 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Apr 30 17:49:17 2024 +0200

Emscripten: Only add the --pre-js code to the soffice executable

...so that e.g. executing `echo test | node instdir/program/uri-encode.js`
doesn't fail with

> instdir/program/uri-encode.js:460
>   throw ex;
>   ^
>
> ReferenceError: XMLHttpRequest is not defined
> at runMetaWithFS (instdir/program/uri-encode.js:312:15)
> at callRuntimeCallbacks (instdir/program/uri-encode.js:1882:26)
> at preRun (instdir/program/uri-encode.js:913:3)
> at run (instdir/program/uri-encode.js:6854:3)
> at runCaller (instdir/program/uri-encode.js:6802:19)
> at removeRunDependency (instdir/program/uri-encode.js:1060:7)
> at receiveInstance (instdir/program/uri-encode.js:1265:5)
> at receiveInstantiationResult (instdir/program/uri-encode.js:1281:5)

(There's nothing special about uri-encode here, it just happens to be the 
only
other executable that is built into instdir/program/ by the Emscripten 
build,
even if it is probably not even useful there.  It expects to read something 
from
stdin, hence the echo part.)

(The generic solenv/gbuild/Executable.mk no longer depends on
soffice.data.js.link, but it still depends on soffice.data and
soffice.data.js.metadata for some cp instructions in
solenv/gbuild/platform/unxgcc.mk, so make those dependencies explicit.  
That can
probably be cleaned up further in a next step.)

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

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index 34146dc5bfe9..dba50e637aba 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -27,9 +27,16 @@ $(eval $(call gb_Executable_add_cobjects,soffice_bin,\
 desktop/source/app/main \
 ))
 
+ifeq ($(OS),EMSCRIPTEN)
+$(call gb_LinkTarget_get_target,$(call 
gb_Executable_get_linktarget,soffice_bin)) : $(call 
gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.link
+
+# don't sort; later can override previous settings!
+$(eval $(call 
gb_Executable_add_prejs,soffice_bin,$(SRCDIR)/static/emscripten/environment.js))
+$(eval $(call gb_Executable_add_prejs,soffice_bin,$(call 
gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.link))
 ifeq ($(OS)-$(ENABLE_QT5),EMSCRIPTEN-TRUE)
 $(eval $(call 
gb_Executable_add_prejs,soffice_bin,$(SRCDIR)/static/emscripten/soffice_args.js))
 endif
+endif
 
 ifeq ($(OS),WNT)
 
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 7c8cf199496d..3027b0de30fa 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -76,7 +76,9 @@ $(call gb_Executable_get_clean_target,$(1)) : $(call 
gb_LinkTarget_get_clean_tar
 $(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS :=
 $(call 
gb_Executable_Executable_platform,$(1),$(2),$(gb_Executable_BINDIR)/$(1).lib)
 ifeq ($(OS),EMSCRIPTEN)
-$(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$(1))) : 
$(call 
gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.link
+$(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$(1))) : \
+$(call 
gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data \
+$(call 
gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.metadata
 endif
 
 $$(eval $$(call gb_Module_register_target,$(call 
gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 64713ec66fd1..e660c20cc650 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -9,11 +9,6 @@
 
 include $(GBUILDDIR)/platform/unxgcc.mk
 
-# don't sort; later can override previous settings!
-gb_EMSCRIPTEN_PRE_JS_FILES = \
-$(SRCDIR)/static/emscripten/environment.js \
-$(call 
gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.link \
-
 gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
 # avoid -s SAFE_HEAP=1 - c.f. gh#8584 this breaks source maps
 gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1 -D_LARGEFILE64_SOURCE 
-D_LARGEFILE_SOURCE
@@ -85,8 +80,6 @@ $(call gb_LinkTarget_add_auxtargets,$(2),\
 $(patsubst %.lib,%.worker.js,$(3)) \
 )
 
-$(foreach 

core.git: include/static offapi/org static/source unotest/source

2024-04-29 Thread Stephan Bergmann (via logerrit)
 include/static/unoembindhelpers/PrimaryBindings.hxx |6 +
 offapi/org/libreoffice/embindtest/XTest.idl |5 +
 static/source/embindmaker/embindmaker.cxx   |   79 
 static/source/unoembindhelpers/PrimaryBindings.cxx  |   18 
 unotest/source/embindtest/embindtest.cxx|   15 +++
 unotest/source/embindtest/embindtest.js |   38 +
 6 files changed, 95 insertions(+), 66 deletions(-)

New commits:
commit 735ea444f2c15771736260fc78704f6b9132ceac
Author: Stephan Bergmann 
AuthorDate: Mon Apr 29 14:20:05 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Apr 30 07:53:11 2024 +0200

Embind: Fix out-param handling

...by using UnoInOutParam in all cases.  Some types whose Embind mappings 
don't
employ any smart pointers (like any and sequence) would have worked directly
with pointers, but others (like string and type) would have caused Embind 
errors
at runtime.  So consistently use UnoInOutParam in all cases (and generate
bindings for all the used cases in embindmaker).

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

diff --git a/include/static/unoembindhelpers/PrimaryBindings.hxx 
b/include/static/unoembindhelpers/PrimaryBindings.hxx
index 6acf2803132a..2af843ef6a3d 100644
--- a/include/static/unoembindhelpers/PrimaryBindings.hxx
+++ b/include/static/unoembindhelpers/PrimaryBindings.hxx
@@ -122,6 +122,12 @@ template  void registerSequence(char const* 
name)
 });
 registerUnoType>();
 }
+
+template  void registerInOutParameter(char const* name)
+{
+emscripten::class_>(name).constructor().template 
constructor().property(
+"val", ::get, ::set);
+}
 }
 
 /* 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 38ac60a47618..b84753ebb8c6 100644
--- a/offapi/org/libreoffice/embindtest/XTest.idl
+++ b/offapi/org/libreoffice/embindtest/XTest.idl
@@ -117,7 +117,10 @@ interface XTest {
 void getOut(
 [out] boolean value1, [out] byte value2, [out] short value3, [out] 
unsigned short value4,
 [out] long value5, [out] unsigned long value6, [out] hyper value7,
-[out] unsigned hyper value8, [out] float value9, [out] double value10, 
[out] char value11);
+[out] unsigned hyper value8, [out] float value9, [out] double value10, 
[out] char value11,
+[out] string value12, [out] type value13, [out] any value14,
+[out] sequence value15, [out] Enum value16, [out] Struct 
value17,
+[out] XTest value18);
 void throwRuntimeException();
 void passJob([in] com::sun::star::task::XJob object);
 void passJobExecutor([in] com::sun::star::task::XJobExecutor object);
diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index 6c0017ccb8c2..0b7634cf8409 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -558,49 +558,13 @@ void dumpParameters(std::ostream& out, 
rtl::Reference const& manage
 {
 out << ", ";
 }
-bool wrap = false;
-if (param.direction != 
unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN)
-{
-switch (manager->getSort(resolveOuterTypedefs(manager, 
param.type)))
-{
-case codemaker::UnoType::Sort::Boolean:
-case codemaker::UnoType::Sort::Byte:
-case codemaker::UnoType::Sort::Short:
-case codemaker::UnoType::Sort::UnsignedShort:
-case codemaker::UnoType::Sort::Long:
-case codemaker::UnoType::Sort::UnsignedLong:
-case codemaker::UnoType::Sort::Hyper:
-case codemaker::UnoType::Sort::UnsignedHyper:
-case codemaker::UnoType::Sort::Float:
-case codemaker::UnoType::Sort::Double:
-case codemaker::UnoType::Sort::Char:
-case codemaker::UnoType::Sort::Enum:
-wrap = true;
-break;
-case codemaker::UnoType::Sort::String:
-case codemaker::UnoType::Sort::Type:
-case codemaker::UnoType::Sort::Any:
-case codemaker::UnoType::Sort::Sequence:
-case codemaker::UnoType::Sort::PlainStruct:
-case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
-case codemaker::UnoType::Sort::Interface:
-break;
-default:
-throw CannotDumpException("unexpected entity \"" + 
param.type
-  + "\" as parameter type");
-}
-}
 if (declarations)
   

core.git: sw/source

2024-04-29 Thread Stephan Bergmann (via logerrit)
 sw/source/core/inc/unobookmark.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a6d41c61daaf6f0822fc86d790eca19972e4a7c8
Author: Stephan Bergmann 
AuthorDate: Mon Apr 29 08:19:50 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Apr 29 13:15:18 2024 +0200

UBSan needs SwXBookmark RTTI now

...presumably since 6a11bf9f7bd209a082254c861d5a04c7f5729d68 "use more 
concrete
UNO classes in writerfilter (SwXBookmark)", failing sw_writerfilter_misc 
with

> DynamicLibraryManagerException: "Failed to load dynamic library: 
workdir/LinkTarget/CppunitTest/libtest_sw_writerfilter_misc.so
> instdir/program/libsw_writerfilterlo.so: undefined symbol: 
_ZTI11SwXBookmark"

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

diff --git a/sw/source/core/inc/unobookmark.hxx 
b/sw/source/core/inc/unobookmark.hxx
index d1d800d9a28e..7082e3c09587 100644
--- a/sw/source/core/inc/unobookmark.hxx
+++ b/sw/source/core/inc/unobookmark.hxx
@@ -46,7 +46,7 @@ typedef ::cppu::ImplInheritanceHelper
 > SwXBookmark_Base;
 
 /// UNO API wrapper around an internal sw::mark::IMark.
-class SwXBookmark
+class SAL_DLLPUBLIC_RTTI SwXBookmark
 : public SwXBookmark_Base
 {
 


core.git: chart2/qa connectivity/source dbaccess/source i18npool/source include/o3tl include/oox include/toolkit include/vbahelper sal/qa sax/source sc/qa svl/qa vbahelper/source vcl/workben

2024-04-28 Thread Stephan Bergmann (via logerrit)
 chart2/qa/extras/chart2dump/chart2dump.cxx|   10 ++---
 connectivity/source/drivers/hsqldb/HDriver.cxx|8 +---
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |2 -
 i18npool/source/indexentry/indexentrysupplier_default.cxx |2 -
 include/o3tl/nonstaticstring.hxx  |   27 ++
 include/oox/core/relations.hxx|2 -
 include/toolkit/helper/macros.hxx |2 -
 include/vbahelper/vbahelperinterface.hxx  |2 -
 sal/qa/rtl/alloc/rtl_alloc.cxx|3 +
 sax/source/expatwrap/sax_expat.cxx|2 -
 sc/qa/unit/ucalc.cxx  |   11 +++--
 svl/qa/unit/svl.cxx   |   19 +
 vbahelper/source/vbahelper/vbafontbase.cxx|2 -
 vcl/workben/vcldemo.cxx   |2 -
 14 files changed, 61 insertions(+), 33 deletions(-)

New commits:
commit d98e014cf6d4cea7ebd7898cbc9124f6fba07684
Author: Stephan Bergmann 
AuthorDate: Fri Oct 6 16:51:17 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Apr 28 11:29:52 2024 +0200

Extended loplugin:ostr manual changes

I had done these a while ago, when I looked into extending loplugin:ostr to 
do
more automatic rewriting, and these were places where I needed to do 
something
manually, for one reason or another, because the automatic rewriting would 
not
pick it up correctly.

However, I got distracted, and a wholesale automatic rewrite would still run
into cases where an _ostr/_ustr instance from a library's .rodata would 
still be
referenced after the library has already been dlcose'd.  So I never came 
around
to finishing all that.

But there appears to be renewed interest in (automatic) rewritings here 
now, so
it probably makes sense if I share this part of my work anyway.

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

diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx 
b/chart2/qa/extras/chart2dump/chart2dump.cxx
index d13d768c032f..f8cf7ad2d1bd 100644
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -32,7 +32,7 @@
 #define DECLARE_DUMP_TEST(TestName, BaseClass, DumpMode) \
 class TestName : public BaseClass { \
 protected:\
-virtual OUString getTestName() override { return #TestName; } \
+virtual OUString getTestName() override { return u"" #TestName 
""_ustr; } \
 public:\
 TestName() : BaseClass(DumpMode) {}; \
 CPPUNIT_TEST_SUITE(TestName); \
@@ -46,7 +46,7 @@
 
 #define CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(aActual) \
 if(isInDumpMode()) \
-writeActual(OUString::number(aActual), #aActual); \
+writeActual(OUString::number(aActual), u"" #aActual ""_ustr); \
 else \
 { \
 OString sTestFileName = OUStringToOString(getTestFileName(), 
RTL_TEXTENCODING_UTF8); \
@@ -55,7 +55,7 @@
 
 #define CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aActual, EPS_) \
 if(isInDumpMode()) \
-writeActual(OUString::number(aActual), #aActual); \
+writeActual(OUString::number(aActual), u"" #aActual ""_ustr); \
 else \
 { \
 OString sTestFileName = OUStringToOString(getTestFileName(), 
RTL_TEXTENCODING_UTF8); \
@@ -64,7 +64,7 @@
 
 #define CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aActual) \
 if(isInDumpMode()) \
-writeActual(aActual, #aActual); \
+writeActual(aActual, u"" #aActual ""_ustr); \
 else \
 { \
 OString sTestFileName = OUStringToOString(getTestFileName(), 
RTL_TEXTENCODING_UTF8); \
@@ -73,7 +73,7 @@
 
 #define CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aActual, EPS_) \
 if(isInDumpMode()) \
-writeActualTransformation(aActual, #aActual); \
+writeActualTransformation(aActual, u"" #aActual ""_ustr); \
 else \
 { \
 OUString expectedTransform; \
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx 
b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 19569dd77d61..234fc969db63 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -213,14 +213,12 @@ namespace connectivity
 aProperties.put( "JavaDriverClass",
 OUString(  "org.hsqldb.jdbcDriver"  ) );
 aProperties.put( "JavaDriverClassPath",
-OUString(
 #ifdef SYSTEM_HSQLDB
-HSQLDB_JAR
+u"" HSQLDB_JAR
 #else
-"vnd.sun.star.expand:$LO_JAVA_DIR/hsqldb.jar"
+u"vnd.sun.star.expand:$LO_JAVA_DIR/hsqldb.jar"
 #endif
-" 

core.git: sw/source

2024-04-28 Thread Stephan Bergmann (via logerrit)
 sw/source/writerfilter/filter/WriterFilter.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 817d35eb829db00329ea5437d50e5c682139f505
Author: Stephan Bergmann 
AuthorDate: Sun Apr 28 09:44:14 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Apr 28 11:29:29 2024 +0200

-Werror,-Wunused-variable

...after 87e0feafd3690a9b58890cc28f8ba0c521bfb557 "use more concrete UNO 
classes
in writerfilter (SwXDocumentSettings)"

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

diff --git a/sw/source/writerfilter/filter/WriterFilter.cxx 
b/sw/source/writerfilter/filter/WriterFilter.cxx
index 7aee1060ac39..413eb00c139c 100644
--- a/sw/source/writerfilter/filter/WriterFilter.cxx
+++ b/sw/source/writerfilter/filter/WriterFilter.cxx
@@ -301,7 +301,6 @@ void WriterFilter::setTargetDocument(const 
uno::Reference& xDo
 assert(m_xDstDoc);
 
 // Set some compatibility options that are valid for the DOCX format
-uno::Reference xFactory(xDoc, uno::UNO_QUERY);
 rtl::Reference xSettings = 
m_xDstDoc->createDocumentSettings();
 
 xSettings->setPropertyValue("UseOldNumbering", uno::Any(false));


core.git: bin/odfvalidator.sh.in bin/officeotron.sh.in configure.ac

2024-04-26 Thread Stephan Bergmann (via logerrit)
 bin/odfvalidator.sh.in |2 +-
 bin/officeotron.sh.in  |2 +-
 configure.ac   |3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 9add00445618057e16e0b7cf48c10bae255d49d2
Author: Stephan Bergmann 
AuthorDate: Fri Apr 26 10:51:47 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 26 22:29:52 2024 +0200

Make odfvalidator and officeotron work in WSL_ONLY_AS_HELPER mode

...where e.g. CppunitTest_oox_testscene3d
CPPUNIT_TEST_NAME=test_material_wireframe::TestBody had failed with

> forced failure
> - Error: Unable to access jarfile 
/mnt/d/lo/tar/odfvalidator-0.9.0-RC2-SNAPSHOT-jar-with-dependencies-2726ab578664434a545f8379a01a9faffac0ae73.jar

and e.g. CppunitTest_oox_mcgr
CPPUNIT_TEST_NAME=testAxialColorLinearTrans::TestBody had failed with

> equality assertion failed
> - Expected: 0
> - Actual  : 1
> - failed to execute: sh D:/lo-wsl/core/bin/officeotron.sh 
C:\Users\steph\AppData\Local\Temp   est_oox_mcgr.dll2epgul.tmp > 
C:\Users\steph\AppData\Local\Temp  est_oox_mcgr.dll2epgup.tmp 2>&1
> Error: Unable to access jarfile 
/mnt/d/lo/tar/8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar

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

diff --git a/bin/odfvalidator.sh.in b/bin/odfvalidator.sh.in
index 605e74731f20..99b2207ad138 100644
--- a/bin/odfvalidator.sh.in
+++ b/bin/odfvalidator.sh.in
@@ -1,2 +1,2 @@
 #!/usr/bin/env bash
-java 
-Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl
 
-Dorg.iso_relax.verifier.VerifierFactoryLoader=com.sun.msv.verifier.jarv.FactoryLoaderImpl
 -jar @TARFILE_LOCATION@/@ODFVALIDATOR_JAR@ "$@"
+java 
-Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl
 
-Dorg.iso_relax.verifier.VerifierFactoryLoader=com.sun.msv.verifier.jarv.FactoryLoaderImpl
 -jar @TARFILE_LOCATION_NATIVE@/@ODFVALIDATOR_JAR@ "$@"
diff --git a/bin/officeotron.sh.in b/bin/officeotron.sh.in
index 7281f1bcd17c..935ec5809cdd 100644
--- a/bin/officeotron.sh.in
+++ b/bin/officeotron.sh.in
@@ -1,2 +1,2 @@
 #!/usr/bin/env bash
-java -jar @TARFILE_LOCATION@/@OFFICEOTRON_JAR@ "$@"
+java -jar @TARFILE_LOCATION_NATIVE@/@OFFICEOTRON_JAR@ "$@"
diff --git a/configure.ac b/configure.ac
index 6c2cd76b904a..4263116f894b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6299,7 +6299,10 @@ else
 PathFormat "${absolute_path}"
 TARFILE_LOCATION="${formatted_path_unix}"
 fi
+PathFormat "$TARFILE_LOCATION"
+TARFILE_LOCATION_NATIVE="$formatted_path"
 AC_SUBST(TARFILE_LOCATION)
+AC_SUBST(TARFILE_LOCATION_NATIVE)
 
 AC_MSG_CHECKING([whether we want to fetch tarballs])
 if test "$enable_fetch_external" != "no"; then


core.git: configure.ac

2024-04-26 Thread Stephan Bergmann (via logerrit)
 configure.ac |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b68d717360d7141de62bf9391d8af5b07f9d
Author: Stephan Bergmann 
AuthorDate: Tue Apr 23 11:16:52 2024 +0200
Commit: Christian Lohmaier 
CommitDate: Fri Apr 26 14:03:03 2024 +0200

Support --with-junit/hamcrest in WSL_ONLY_AS_HELPER mode

...where it failed with

> checking for JUnit 4... ./configure: line 47354: cygpath: command not 
found

Change-Id: I56c930b6c8b738b39f26766f90476c32efb383e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166508
Reviewed-by: Christian Lohmaier 
Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index 48faa25c4acc..6c2cd76b904a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14318,7 +14318,8 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" 
-a "$cross_compiling" != "
 OOO_JUNIT_JAR=$with_junit
 fi
 if test "$_os" = "WINNT"; then
-OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
+PathFormat "$OOO_JUNIT_JAR"
+OOO_JUNIT_JAR="$formatted_path"
 fi
 printf 'import org.junit.Before;' > conftest.java
 if $JAVACOMPILER -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
@@ -14354,7 +14355,8 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" 
-a "$cross_compiling" != "
 HAMCREST_JAR=$with_hamcrest
 fi
 if test "$_os" = "WINNT"; then
-HAMCREST_JAR=`cygpath -m "$HAMCREST_JAR"`
+PathFormat "$HAMCREST_JAR"
+HAMCREST_JAR="$formatted_path"
 fi
 if $JAVACOMPILER -classpath "$HAMCREST_JAR" conftest.java >&5 2>&5; 
then
 AC_MSG_RESULT([$HAMCREST_JAR])


core.git: 3 commits - configure.ac instsetoo_native/CustomTarget_install.mk

2024-04-26 Thread Stephan Bergmann (via logerrit)
 configure.ac |   11 ---
 instsetoo_native/CustomTarget_install.mk |1 +
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 9bd93466e47c3a472b273f3846169afbdf063885
Author: Stephan Bergmann 
AuthorDate: Tue Apr 23 10:44:53 2024 +0200
Commit: Christian Lohmaier 
CommitDate: Fri Apr 26 14:02:52 2024 +0200

Honor TMPDIR configure option in WSL_ONLY_AS_HELPER mode

(It needs to be passed-in as a TMPDIR=/mnt/c/... style path, because 
configure
uses it early on and otherwise fails with some

> checking build system type... config.guess: cannot create a temporary 
directory in C:/...

error.)

Change-Id: I798ed7dd363eb5fd7614c5984861f77cf9d38266
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166506
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/configure.ac b/configure.ac
index 90cbfb33f9e2..48faa25c4acc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15296,6 +15296,9 @@ AC_SUBST(PERL)
 
 if test -n "$TMPDIR"; then
 TEMP_DIRECTORY="$TMPDIR"
+if test -n "$WSL_ONLY_AS_HELPER"; then
+   TEMP_DIRECTORY=$(wslpath -m "$TEMP_DIRECTORY")
+fi
 else
 TEMP_DIRECTORY="/tmp"
 fi
@@ -15426,8 +15429,10 @@ if test -n "$WSL_ONLY_AS_HELPER"; then
 # append strawberry tools dir to PATH (for e.g. windres, ar)
 LO_PATH="$LO_PATH:$STRAWBERRY_TOOLS"
 # temp-dir needs to be in windows realm, hardcode for now
-mkdir -p tmp
-TEMP_DIRECTORY="$BUILDDIR/tmp"
+if test "$TEMP_DIRECTORY" = /tmp; then
+mkdir -p tmp
+TEMP_DIRECTORY="$BUILDDIR/tmp"
+fi
 fi
 
 # Keep in sync with list of files far up, at AC_MSG_CHECKING([for
commit 649314399483331244538128149ebd0556166540
Author: Stephan Bergmann 
AuthorDate: Tue Apr 23 08:49:46 2024 +0200
Commit: Christian Lohmaier 
CommitDate: Fri Apr 26 14:02:45 2024 +0200

Don't hardcode build as x86_64 for WSL_ONLY_AS_HELPER

...to also make it work builds on aarch64

Change-Id: Ibc502b11eedceddb84481c2ad5d351bf8404c8cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166501
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/configure.ac b/configure.ac
index cf14c248e948..90cbfb33f9e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15404,7 +15404,7 @@ AC_CONFIG_LINKS([include:include])
 
 if test -n "$WSL_ONLY_AS_HELPER"; then
 # while we configure in linux, we actually compile in "cygwin" (close 
enough at least)
-build="x86_64-pc-cygwin"
+build=$host
 PathFormat "$SRC_ROOT"
 SRC_ROOT="$formatted_path"
 PathFormat "$BUILDDIR"
commit 683d9496bd993c638d7f44af8d03b86b9ed8faaa
Author: Christian Lohmaier 
AuthorDate: Fri Apr 19 16:12:22 2024 +0200
Commit: Christian Lohmaier 
CommitDate: Fri Apr 26 14:02:37 2024 +0200

use strawberry perl for installation packaging in wsl-as-helper case

changing it to git-bash perl can probably be done, but would require
more changes to the path handling in the packaging code

Change-Id: I9a31ee6e9f122a2c167e11f5b4f73b18c5c0fa81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166343
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/instsetoo_native/CustomTarget_install.mk 
b/instsetoo_native/CustomTarget_install.mk
index 4a6d92e1cd00..d3a6ad3a96a9 100644
--- a/instsetoo_native/CustomTarget_install.mk
+++ b/instsetoo_native/CustomTarget_install.mk
@@ -121,6 +121,7 @@ $(instsetoo_installer_targets): 
$(SRCDIR)/solenv/bin/make_installer.pl \
$(if $(filter %msi‧nostrip,$@),$(gb_Make_JobLimiter) grab)
$(call gb_Trace_StartRange,$@,INSTALLER)
$(call gb_Helper_print_on_error, \
+   $(if $(MSYSTEM),export PERLIO=:unix PERL=$(STRAWBERRY_PERL) &&) \
$(SRCDIR)/solenv/bin/call_installer.sh $(if 
$(verbose),-verbose,-quiet) $(subst ‧,:,$@),\
$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/$(if 
$(filter en-US$(COMMA)%,$(instsetoo_installer_langs)),$(subst 
$(instsetoo_installer_langs),multilang,$@),$@).log)
$(if $(filter %msi‧nostrip,$@),$(gb_Make_JobLimiter) release)


core.git: 3 commits - bridges/source editeng/CustomTarget_generated.mk extras/CustomTarget_autocorr.mk extras/CustomTarget_autotextshare.mk extras/CustomTarget_autotextuser.mk extras/CustomTarget_temp

2024-04-26 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx |  102 
 bridges/source/cpp_uno/msvc_win32_arm64/abi.hxx |2 
 bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx |   26 -
 bridges/source/cpp_uno/msvc_win32_arm64/uno2cpp.cxx |   22 
 editeng/CustomTarget_generated.mk   |2 
 extras/CustomTarget_autocorr.mk |4 
 extras/CustomTarget_autotextshare.mk|5 
 extras/CustomTarget_autotextuser.mk |7 -
 extras/CustomTarget_templates.mk|   14 +-
 extras/CustomTarget_tplpresnt.mk|7 -
 extras/CustomTarget_tplwizard.mk|   14 +-
 filter/CustomTarget_svg.mk  |6 -
 sdext/CustomTarget_pdfimport.mk |2 
 solenv/gbuild/CustomTarget.mk   |2 
 solenv/gbuild/Extension.mk  |8 -
 solenv/gbuild/Zip.mk|4 
 sw/CustomTarget_generated.mk|   34 +++---
 17 files changed, 61 insertions(+), 200 deletions(-)

New commits:
commit 1b9482e1d21aec6c40e724efb9109fe9f9ed3e49
Author: Stephan Bergmann 
AuthorDate: Fri Apr 26 10:17:36 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 26 14:01:54 2024 +0200

Drop unused RETURN_KIND_HFA_FLOAT/DOUBLE from msvc_win32_arm64 UNO bridge

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

diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx 
b/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx
index b8a1c73fb6f3..fbfdb1f34f40 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx
@@ -18,96 +18,11 @@
  */
 
 #include 
-#include 
 
 #include 
 
 #include "abi.hxx"
 
-enum StructKind
-{
-STRUCT_KIND_EMPTY,
-STRUCT_KIND_FLOAT,
-STRUCT_KIND_DOUBLE,
-STRUCT_KIND_POD,
-STRUCT_KIND_DTOR
-};
-
-static StructKind getStructKind(typelib_CompoundTypeDescription const* type)
-{
-StructKind k = type->pBaseTypeDescription == 0 ? STRUCT_KIND_EMPTY
-   : 
getStructKind(type->pBaseTypeDescription);
-
-for (sal_Int32 i = 0; i != type->nMembers; ++i)
-{
-StructKind k2 = StructKind();
-switch (type->ppTypeRefs[i]->eTypeClass)
-{
-case typelib_TypeClass_BOOLEAN:
-case typelib_TypeClass_BYTE:
-case typelib_TypeClass_SHORT:
-case typelib_TypeClass_UNSIGNED_SHORT:
-case typelib_TypeClass_LONG:
-case typelib_TypeClass_UNSIGNED_LONG:
-case typelib_TypeClass_HYPER:
-case typelib_TypeClass_UNSIGNED_HYPER:
-case typelib_TypeClass_CHAR:
-case typelib_TypeClass_ENUM:
-k2 = STRUCT_KIND_POD;
-break;
-case typelib_TypeClass_FLOAT:
-k2 = STRUCT_KIND_FLOAT;
-break;
-case typelib_TypeClass_DOUBLE:
-k2 = STRUCT_KIND_DOUBLE;
-break;
-case typelib_TypeClass_STRING:
-case typelib_TypeClass_TYPE:
-case typelib_TypeClass_ANY:
-case typelib_TypeClass_SEQUENCE:
-case typelib_TypeClass_INTERFACE:
-k2 = STRUCT_KIND_DTOR;
-break;
-case typelib_TypeClass_STRUCT:
-{
-typelib_TypeDescription* td = 0;
-TYPELIB_DANGER_GET(, type->ppTypeRefs[i]);
-k2 = 
getStructKind(reinterpret_cast(td));
-TYPELIB_DANGER_RELEASE(td);
-break;
-}
-default:
-assert(false);
-}
-switch (k2)
-{
-case STRUCT_KIND_EMPTY:
-// this means an empty sub-object, which nevertheless obtains 
a byte
-// of storage (TODO: does it?), so the full object cannot be a
-// homogeneous collection of float or double
-case STRUCT_KIND_POD:
-assert(k != STRUCT_KIND_DTOR);
-k = STRUCT_KIND_POD;
-break;
-case STRUCT_KIND_FLOAT:
-case STRUCT_KIND_DOUBLE:
-if (k == STRUCT_KIND_EMPTY)
-{
-k = k2;
-}
-else if (k != k2)
-{
-assert(k != STRUCT_KIND_DTOR);
-k = STRUCT_KIND_POD;
-}
-break;
-case STRUCT_KIND_DTOR:
-return STRUCT_KIND_DTOR;
-}
-}
-return k;
-}
-
 ReturnKind getReturnKind(typelib_TypeDescription const* type)
 {
 switch (type->eTypeClass)
@@ -134,24 +49,9 @@ ReturnKind 

core.git: basic/Library_sb.mk basic/source

2024-04-26 Thread Stephan Bergmann (via logerrit)
 basic/Library_sb.mk  |2 +-
 basic/source/runtime/dllmgr-none.cxx |2 +-
 basic/source/runtime/dllmgr.hxx  |4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8d775b92594b70a3f626006148365582c06f813f
Author: Stephan Bergmann 
AuthorDate: Fri Apr 26 09:21:17 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 26 12:43:59 2024 +0200

Use Windows dllmgr-x64 also for aarch64

At least, CppunitTest_basic_macros 
CPPUNIT_TEST_NAME=Coverage::Coverage_Iterator
(which exercises it in basic/qa/basic_coverage/test_declare_from_dll.bas)
succeeds.

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

diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index be0cbaeef005..dae083a34864 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -150,7 +150,7 @@ $(eval $(call gb_Library_add_asmobjects,sb,\
basic/source/runtime/wnt-x86 \
 ))
 else
-ifeq ($(OS)$(CPUNAME),WNTX86_64)
+ifeq ($(OS)$(filter-out AARCH64 X86_64,$(CPUNAME)),WNT)
 $(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/runtime/dllmgr-x64 \
 ))
diff --git a/basic/source/runtime/dllmgr-none.cxx 
b/basic/source/runtime/dllmgr-none.cxx
index 4c7f700a9eef..2a03e2ae7855 100644
--- a/basic/source/runtime/dllmgr-none.cxx
+++ b/basic/source/runtime/dllmgr-none.cxx
@@ -106,7 +106,7 @@ void SbiDllMgr::FreeDll(SAL_UNUSED_PARAMETER OUString const 
&) {}
 
 SbiDllMgr::SbiDllMgr() = default;
 
-#if defined(_WIN32) && !defined(_ARM64_)
+#if defined(_WIN32)
 SbiDllMgr::~SbiDllMgr() = default;
 #endif
 
diff --git a/basic/source/runtime/dllmgr.hxx b/basic/source/runtime/dllmgr.hxx
index a280e89b64db..fe76cfb681b6 100644
--- a/basic/source/runtime/dllmgr.hxx
+++ b/basic/source/runtime/dllmgr.hxx
@@ -33,7 +33,7 @@ public:
 
 SbiDllMgr();
 
-#if defined(_WIN32) && !defined(_ARM64_)
+#if defined(_WIN32)
 ~SbiDllMgr();
 #endif
 
@@ -44,7 +44,7 @@ public:
 void FreeDll(OUString const & library);
 
 private:
-#if defined(_WIN32) && !defined(_ARM64_)
+#if defined(_WIN32)
 struct Impl;
 
 std::unique_ptr< Impl > impl_;


core.git: Makefile.fetch

2024-04-26 Thread Stephan Bergmann (via logerrit)
 Makefile.fetch |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2b35405bce75d75e14fa376c80f26e1332b70fe9
Author: Stephan Bergmann 
AuthorDate: Fri Apr 26 08:42:49 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 26 10:46:04 2024 +0200

Fail early when external tarball can't be fetched

...so that the error output is

> fetching libabw-noexist-test.tar.xz
>   % Total% Received % Xferd  Average Speed   TimeTime Time  
Current
>  Dload  Upload   Total   SpentLeft  
Speed
>   0   1530 00 0  0  0 --:--:-- --:--:-- --:--:--  
   0
> curl: (22) The requested URL returned error: 404

rather than a somewhat misleading

> fetching libabw-noexist-test.tar.xz
>   % Total% Received % Xferd  Average Speed   TimeTime Time  
Current
>  Dload  Upload   Total   SpentLeft  
Speed
> 100   153  100   1530 0   2463  0 --:--:-- --:--:-- --:--:--  
2467
> ERROR: expected checksum for libabw-noexist-test.tar.xz is 
e763a9dc21c3d2667402d66e202e3f8ef4db51b34b79ef41f56cacb86dcd6eed

(see the mailing list sub-thread starting at
 
"Re:
Uploading external tarballs to ?")

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

diff --git a/Makefile.fetch b/Makefile.fetch
index afb7d176e79e..ed019e800954 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -16,7 +16,7 @@ endef
 
 else
 define fetch_Download__wget_command
-&& echo fetching $2 && bash -c '$(CURL) -L -O $1/$2 2>&1 | tee -a 
$(fetch_LOGFILE) && [ $$PIPESTATUS -eq 0 ]'
+&& echo fetching $2 && bash -c '$(CURL) -f -L -O $1/$2 2>&1 | tee -a 
$(fetch_LOGFILE) && [ $$PIPESTATUS -eq 0 ]'
 endef
 
 endif


core.git: download.lst external/boost

2024-04-25 Thread Stephan Bergmann (via logerrit)
 download.lst |4 +-
 external/boost/UnpackedTarball_boost.mk  |3 -
 external/boost/Wundef.patch.0|   22 ---
 external/boost/boost-emscripten-noshm.patch.0|   11 -
 external/boost/boost_1_59_0.property_tree.wreturn-type.patch |   14 ---
 5 files changed, 2 insertions(+), 52 deletions(-)

New commits:
commit edd6243b1f607f5e60d1bbe869e2e236bc021177
Author: Stephan Bergmann 
AuthorDate: Thu Apr 25 22:58:56 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 26 07:29:34 2024 +0200

Upgrade external/boost to latest Boost 1.85.0

 has been 
generated (on
Fedora 40) with

> $ wget 
https://boostorg.jfrog.io/artifactory/main/release/1.85.0/source/boost_1_85_0.tar.bz2
> $ printf 
'7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617 
boost_1_85_0.tar.bz2' | sha256sum -c # cf. 

> boost_1_85_0.tar.bz2: OK
> $ external/boost/repack_tarball.sh boost_1_85_0.tar.bz2
> Unpacking boost_1_85_0.tar.bz2 ...
> Removing unnecessary files ...
> Creating boost_1_85_0.tar.xz ...
> Cleaning up ...
> 4e23218ff5036d57afd20f7cdab2e94cdbf6ba9c509d656ace643a81c40a985a  
boost_1_85_0.tar.xz
> Done.

Three patches failed to apply:

* external/boost/boost_1_59_0.property_tree.wreturn-type.patch ("aka MSVC
  warning C4715: not all control paths return a value") should no longer be
  necessary after
  

  "Use BOOST_UNREACHABLE_RETURN at the end of function" (the referenced
   appears to no longer be
  reachable, though).

* The boost/math parts of external/boost/Wundef.patch.0 are obsoleted by
  

  "Fix -Wundef warnings".

* external/boost/boost-emscripten-noshm.patch.0 is obsoleeted by
  

  "emscripten doesn't support shm".

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

diff --git a/download.lst b/download.lst
index 9989521f9094..df1a213bbb95 100644
--- a/download.lst
+++ b/download.lst
@@ -14,8 +14,8 @@ ARGON2_TARBALL := phc-winner-argon2-20190702.tar.gz
 # so that git cherry-pick
 # will not run into conflicts
 # please repack the tarball using external/boost/repack_tarball.sh
-BOOST_SHA256SUM := 
fd4a2ee785ea0e4efc5221a4284e0cf51096e8409871fb70fdaced002eeffc0b
-BOOST_TARBALL := boost_1_84_0.tar.xz
+BOOST_SHA256SUM := 
4e23218ff5036d57afd20f7cdab2e94cdbf6ba9c509d656ace643a81c40a985a
+BOOST_TARBALL := boost_1_85_0.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/boost/UnpackedTarball_boost.mk 
b/external/boost/UnpackedTarball_boost.mk
index c49a2bc099fc..1d555de9861e 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -20,8 +20,6 @@ boost_patches += rtti.patch.0
 
 # https://svn.boost.org/trac/boost/ticket/11505
 boost_patches += boost_1_59_0.mpl.config.wundef.patch
-# https://svn.boost.org/trac/boost/ticket/11501
-boost_patches += boost_1_59_0.property_tree.wreturn-type.patch
 
 boost_patches += clang-cl.patch.0
 
@@ -44,7 +42,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,boost,3))
 
 $(eval $(call gb_UnpackedTarball_add_patches,boost,\
$(foreach patch,$(boost_patches),external/boost/$(patch)) \
-external/boost/boost-emscripten-noshm.patch.0 \
 external/boost/boost-emscripten-nowasm.patch.0 \
 ))
 
diff --git a/external/boost/Wundef.patch.0 b/external/boost/Wundef.patch.0
index 63dfc4afde00..8cb546464373 100644
--- a/external/boost/Wundef.patch.0
+++ b/external/boost/Wundef.patch.0
@@ -31,25 +31,3 @@
  #pragma clang diagnostic pop
  #endif
  }}} // namespace boost::locale::detail
 boost/math/tools/config.hpp
-+++ boost/math/tools/config.hpp
-@@ -147,7 +147,7 @@
- #endif
- 
- // C++23
--#if __cplusplus > 202002L || _MSVC_LANG > 202002L
-+#if __cplusplus > 202002L || (defined _MSVC_LANG && _MSVC_LANG > 202002L)
- #  if __GNUC__ >= 13
-  // libstdc++3 only defines to/from_chars for std::float128_t when one of 
these defines are set
-  // otherwise we're right out of luck...
 boost/math/tools/promotion.hpp
-+++ boost/math/tools/promotion.hpp
-@@ -27,7 +27,7 @@
- #include 
- 
- #if defined __has_include
--#  if __cplusplus > 202002L || _MSVC_LANG > 202002L 
-+#  if __cplusplus > 202002L || (defined _MSVC_LANG && _MSVC_LANG > 202002L) 
- #if 

core.git: bridges/source

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

New commits:
commit 7414fc841803201991d7e8e7b2959a89cca5a222
Author: Stephan Bergmann 
AuthorDate: Thu Apr 25 14:16:16 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 25 18:27:24 2024 +0200

Adapt queryInterface in fixed msvc_win32_arm64 UNO bridge

...where the function's argument is in x2, not x1 (see commit message of
ae6ee262d7649222a137f8722886a10db274ddf5 "Some fixing of msvc_win32_arm64 
UNO
bridge" for details)

Change-Id: I00ef5df1ebad4609918c0c6845ebdcfe810f6152
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166622
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 da8694667b3c..a43cd3e24698 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
@@ -290,7 +290,7 @@ extern "C" void vtableCall(sal_Int32 functionIndex, 
sal_Int32 vtableOffset, sal_
 {
 typelib_TypeDescription* td = nullptr;
 TYPELIB_DANGER_GET(,
-   
(reinterpret_cast(gpr[1])->getTypeLibType()));
+   
(reinterpret_cast(gpr[2])->getTypeLibType()));
 if (td != 0 && td->eTypeClass == 
typelib_TypeClass_INTERFACE)
 {
 uno::XInterface* ifc = nullptr;


core.git: bridges/source

2024-04-25 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 6fd06e0215602c61ce6cefb07a3d401fc85d30c2
Author: Stephan Bergmann 
AuthorDate: Thu Apr 25 09:48:40 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 25 14:44:27 2024 +0200

Add back the callVirtualFunction_fake boilerplate

...that ae6ee262d7649222a137f8722886a10db274ddf5 "Some fixing of
msvc_win32_arm64 UNO bridge" had removed, assuming it wasn't actually 
necessary.
But looks like Windows exception handling stack unwinding somehow needs it 
after
all.  Getting past the CustomTarget_testtools/uno_test getRaiseAttr1() call 
now
(but still failing at some later place).

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

diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S 
b/bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S
index 546c02cf5040..55fd3f95ff85 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S
@@ -25,7 +25,12 @@
x3 function
 */
 
-NESTED_ENTRY callVirtualFunction
+NESTED_ENTRY callVirtualFunction_fake
+
+// for unwind information, Windows has to store fp and lr
+PROLOG_SAVE_REG_PAIR   x29, x30, #-32!
+
+ALTERNATE_ENTRY callVirtualFunction
 
 sub   sp, sp, #32
 stp   fp, lr, [sp]
@@ -75,7 +80,7 @@ done
 ldp   fp, lr, [sp, #-32]
 ret
 
-NESTED_END callVirtualFunction
+NESTED_END callVirtualFunction_fake
 
 END
 


core.git: bridges/source

2024-04-24 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx   |6 
 bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S |   74 +-
 bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx   |6 
 bridges/source/cpp_uno/msvc_win32_arm64/uno2cpp.cxx   |   18 +-
 bridges/source/cpp_uno/msvc_win32_arm64/vtableslotcall.S  |1 
 5 files changed, 60 insertions(+), 45 deletions(-)

New commits:
commit ae6ee262d7649222a137f8722886a10db274ddf5
Author: Stephan Bergmann 
AuthorDate: Wed Apr 24 14:06:11 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Apr 24 19:03:19 2024 +0200

Some fixing of msvc_win32_arm64 UNO bridge

For one, the Windows ABI deviates from the generic aarch64 ABI regarding
returning class instances by value from non-static member functions, see

:
"The caller shall reserve a block of memory of sufficient size and 
alignment to
hold the result.  The address of the memory block shall be passed as an
additional argument to the function in x0, or x1 if $this is passed in x0.  
The
callee may modify the result memory block at any point during the execution 
of
the subroutine.  The callee returns the address of the memory block in x0."
That means RETURN_KIND_HFA_FLOAT and RETURN_KIND_HFA_DOUBLE are not needed, 
and
can be cleaned up in a follow-up commit.

And for another, setting up a call stack frame in call() in uno2cpp.cxx for
callVirtualFunction() didn't actually work, so go with a slightly less 
ambitious
aproach (as also used by the gcc_linux_aarch64 bridge) and explicitly copy 
the
arguments that end up on the stack around in callVirtualFunction().

This allows CustomTarget_testtools/uno_test to proceed at least as far as 
the
call of getRaiseAttr1(), which still leads to an uncaught
css::uno::RuntimeException.

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

diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx 
b/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx
index c88873143898..b8a1c73fb6f3 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx
@@ -144,13 +144,13 @@ ReturnKind getReturnKind(typelib_TypeDescription const* 
type)
 switch 
(getStructKind(reinterpret_cast(type)))
 {
 case STRUCT_KIND_FLOAT:
-return RETURN_KIND_HFA_FLOAT;
+return RETURN_KIND_INDIRECT;
 case STRUCT_KIND_DOUBLE:
-return RETURN_KIND_HFA_DOUBLE;
+return RETURN_KIND_INDIRECT;
 case STRUCT_KIND_DTOR:
 return RETURN_KIND_INDIRECT;
 default:
-return RETURN_KIND_REG;
+return RETURN_KIND_INDIRECT;
 }
 }
 }
diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S 
b/bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S
index a058e47d0038..546c02cf5040 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S
@@ -19,53 +19,63 @@
 /*
extern void callVirtualFunction
 
-   x0 stack
-   x1 frame
-   x2 function
-   x3 return
+   x0 regs
+   x1 stack
+   x2 stack count
+   x3 function
 */
 
-NESTED_ENTRY callVirtualFunction_fake
+NESTED_ENTRY callVirtualFunction
 
-// for unwind information, Windows has to store fp and lr
-PROLOG_SAVE_REG_PAIR   x29, x30, #-32!
+sub   sp, sp, #32
+stp   fp, lr, [sp]
+mov   fp, sp
 
-ALTERNATE_ENTRY callVirtualFunction
+// Stack space for arguments >= 8 (16-byte aligned):
+lsl   x2, x2, #3
+sub   x9, sp, x2
+bfc   x9, #0, #4
+mov   sp, x9
 
-// use a stack frame allocated by our caller
-stp   x29, x30, [x1]
-mov   x29, x1
-mov   sp, x0
+// Copy arguments >= 8:
+cbz   x2, done
+loop
+sub   x2, x2, #8
+ldr   x9, [x1, x2]
+str   x9, [sp, x2]
+cbnz  x2, loop
+done
 
-mov   x9, x2  // function
-mov   x8, x3  // complex return
-str   x3, [x29, #16]  // save rvalue
+mov   x9, x3  // function
+
+mov   x10, x0
+str   x10, [fp, #16]
 
 // load the core argument passing registers
-ldp   x0, x1, [sp, #-128]
-ldp   x2, x3, [sp, #-112]
-ldp   x4, x5, [sp, #-96]
-ldp   x6, x7, [sp, #-80]
+ldp   x0, x1, [x10, #0]
+ldp   x2, x3, [x10, #16]
+ldp   x4, x5, [x10, #32]
+ldp   x6, x7, 

core.git: external/icu

2024-04-23 Thread Stephan Bergmann (via logerrit)
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/no-python.patch|   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit 5d8e29c94edeed564df4b68aed01f695d5ece070
Author: Stephan Bergmann 
AuthorDate: Mon Apr 22 22:02:28 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Apr 23 11:32:51 2024 +0200

external/icu: Drop hidden dependency on Python

...which was always satisfied directly from the system, regardless of our
--enable-python=... setting.  (And which was a problem for my Git Bash and 
WSL
based Windows build attempt, where it happened to find a dysfunctional 
Python
wrapper at C:/Users/steph/AppData/Local/Microsoft/WindowsApps/python3 which
caused a

[...]
> Not rebuilding data/rules.mk, assuming prebuilt data in data/in
> Spawning Python to generate test/testdata/rules.mk...
> Python was not found; run without arguments to install from the Microsoft 
Store, or disable this shortcut from Settings > Manage App Execution Aliases.
> configure: error: Python failed to run; see above error.

error when building ExternalProject_icu.)

There are three uses of that PYTHON setting across 
workdir/UnpackedTarget/icu:

1  In source/configure.ac to generate source/data/rules.mk if
source/data/locales/root.txt would exist---but which doesn't, so we don't
actually need PYTHON there.

2  In source/configure.ac to generate source/test/testdata/rules.mk, but 
which
our (non-check) build apparently doesn't need anyway.

3  In source/data/Makefile.in for target check-local, which is a sub-target 
of
check (which we don't build).

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

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 655614447d53..019bec6546ce 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-khmerbreakengine.patch.1 \
external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch.1 \
$(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \
+   external/icu/no-python.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/no-python.patch b/external/icu/no-python.patch
new file mode 100644
index ..33960fcae321
--- /dev/null
+++ b/external/icu/no-python.patch
@@ -0,0 +1,11 @@
+--- source/configure.ac
 source/configure.ac
+@@ -202,7 +202,7 @@
+ m4_ifndef([AX_CHECK_COMPILE_FLAG], [AC_MSG_ERROR(['autoconf-archive' is 
missing])])
+ 
+ # TODO(ICU-20301): Remove fallback to Python 2.
+-AC_CHECK_PROGS(PYTHON, python3 "py -3" python "py")
++PYTHON=
+ AC_SUBST(PYTHON)
+ 
+ # Check for the platform make


core.git: sw/qa

2024-04-21 Thread Stephan Bergmann (via logerrit)
 sw/qa/core/text/text.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit b93a481d8a7ba396d29224403ca05ebe354aa0b3
Author: Stephan Bergmann 
AuthorDate: Sun Apr 21 18:52:39 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Apr 21 22:05:16 2024 +0200

-Werror,-Wunused-variable

...ever since the code was introduced in
0c7ae3bd96130eaa400d55a3ba9bf1e2fe6600de "tdf#156146 tdf#159903 sw: add unit
tests"

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

diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index e4e40fd11b9e..b1d89c5260ef 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -125,7 +125,6 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf156146)
 
 uno::Reference const xLevels1(
 getProperty>(getParagraph(1), 
"NumberingRules"));
-uno::Reference const xNum1(xLevels1, uno::UNO_QUERY);
 ::comphelper::SequenceAsHashMap props1(xLevels1->getByIndex(0));
 CPPUNIT_ASSERT_EQUAL(sal_Int32(-700), 
props1["FirstLineIndent"].get());
 CPPUNIT_ASSERT_EQUAL(sal_Int32(1330), props1["IndentAt"].get());
@@ -155,7 +154,6 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf159903)
 
 uno::Reference const xLevels1(
 getProperty>(getParagraph(1), 
"NumberingRules"));
-uno::Reference const xNum1(xLevels1, uno::UNO_QUERY);
 ::comphelper::SequenceAsHashMap props1(xLevels1->getByIndex(0));
 CPPUNIT_ASSERT_EQUAL(sal_Int32(-4001), 
props1["FirstLineIndent"].get());
 CPPUNIT_ASSERT_EQUAL(sal_Int32(4001), props1["IndentAt"].get());


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

2024-04-20 Thread Stephan Bergmann (via logerrit)
 offapi/org/libreoffice/embindtest/XTest.idl|4 +
 static/source/unoembindhelpers/PrimaryBindings.cxx |4 -
 unotest/source/embindtest/embindtest.cxx   |   18 
 unotest/source/embindtest/embindtest.js|   47 +
 4 files changed, 71 insertions(+), 2 deletions(-)

New commits:
commit e6ddfdf040f88d19e5ec9b4d10b8cccd79155ad1
Author: Stephan Bergmann 
AuthorDate: Fri Apr 19 17:05:31 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sat Apr 20 11:57:28 2024 +0200

Embind: Test and Fix out-param handling

(the types that are meant to be passed directly by pointer will need more
thought, to make them actually work)

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

diff --git a/offapi/org/libreoffice/embindtest/XTest.idl 
b/offapi/org/libreoffice/embindtest/XTest.idl
index 3dc1773c120a..38ac60a47618 100644
--- a/offapi/org/libreoffice/embindtest/XTest.idl
+++ b/offapi/org/libreoffice/embindtest/XTest.idl
@@ -114,6 +114,10 @@ interface XTest {
 boolean isSequenceStruct([in] sequence value);
 XTest getNull();
 boolean isNull([in] XTest value);
+void getOut(
+[out] boolean value1, [out] byte value2, [out] short value3, [out] 
unsigned short value4,
+[out] long value5, [out] unsigned long value6, [out] hyper value7,
+[out] unsigned hyper value8, [out] float value9, [out] double value10, 
[out] char value11);
 void throwRuntimeException();
 void passJob([in] com::sun::star::task::XJob object);
 void passJobExecutor([in] com::sun::star::task::XJobExecutor object);
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 862cbb1101e2..6ae2e68323dc 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -386,7 +386,7 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 };
 });
 
-registerInOutParam("uno_InOutParam_boolean");
+registerInOutParam("uno_InOutParam_boolean");
 registerInOutParam("uno_InOutParam_byte");
 registerInOutParam("uno_InOutParam_short");
 registerInOutParam("uno_InOutParam_unsigned_short");
@@ -396,7 +396,7 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 registerInOutParam("uno_InOutParam_unsigned_hyper");
 registerInOutParam("uno_InOutParam_float");
 registerInOutParam("uno_InOutParam_double");
-registerInOutParam("uno_InOutParam_char");
+registerInOutParam("uno_InOutParam_char");
 
 function("getCurrentModelFromViewSh", );
 function("getUnoComponentContext", 
::getProcessComponentContext);
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 9c10335ed704..bbc3496a7238 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -512,6 +512,24 @@ class Test : public 
cppu::WeakImplHelper
 return !value;
 }
 
+void SAL_CALL getOut(sal_Bool& value1, sal_Int8& value2, sal_Int16& 
value3, sal_uInt16& value4,
+ sal_Int32& value5, sal_uInt32& value6, sal_Int64& 
value7,
+ sal_uInt64& value8, float& value9, double& value10,
+ sal_Unicode& value11) override
+{
+value1 = true;
+value2 = -12;
+value3 = -1234;
+value4 = 54321;
+value5 = -123456;
+value6 = 3456789012;
+value7 = -123456789;
+value8 = 9876543210;
+value9 = -10.25;
+value10 = 100.5;
+value11 = u'Ö';
+}
+
 void SAL_CALL throwRuntimeException() override
 {
 throw css::uno::RuntimeException(u"test"_ustr);
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 6d89a728dbdf..e4dccefa6537 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -528,6 +528,53 @@ Module.addOnPostRun(function() {
 console.log(v);
 console.assert(v === null);
 }
+{
+const v1 = new Module.uno_InOutParam_boolean;
+const v2 = new Module.uno_InOutParam_byte;
+const v3 = new Module.uno_InOutParam_short;
+const v4 = new Module.uno_InOutParam_unsigned_short;
+const v5 = new Module.uno_InOutParam_long;
+const v6 = new Module.uno_InOutParam_unsigned_long;
+const v7 = new Module.uno_InOutParam_hyper;
+const v8 = new Module.uno_InOutParam_unsigned_hyper;
+const v9 = new Module.uno_InOutParam_float;
+const v10 = new Module.uno_InOutParam_double;
+const v11 = new Module.uno_InOutParam_char;
+test.getOut(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
+console.log(v1.val);
+console.log(v2.val);
+console.log(v3.val);
+  

core.git: 2 commits - static/source unotest/source

2024-04-20 Thread Stephan Bergmann (via logerrit)
 static/source/embindmaker/embindmaker.cxx  |7 +--
 static/source/unoembindhelpers/PrimaryBindings.cxx |5 +
 unotest/source/embindtest/embindtest.js|4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 1bf2d3fa8ed016eaf71d8b3acc3fc779ee32e223
Author: Stephan Bergmann 
AuthorDate: Fri Apr 19 10:35:14 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sat Apr 20 11:57:16 2024 +0200

Embind: Drop $equals, add sameUnoObject

$equals was the last remaining special $... method that we added to the UNO
interfaces, and it looks better anyway to turn it into a symmetric free 
function
(that can be called with null for either argument) that is actually 
independent
of specific interface types

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

diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index f9540c1f006b..6c0017ccb8c2 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -1088,12 +1088,7 @@ SAL_IMPLEMENT_MAIN()
   ".class_function(\"reference\", +[]("
<< cppName(ifc)
<< " * the_interface) { return 
::com::sun::star::uno::Reference(the_interface); "
-  "}, ::emscripten::allow_raw_pointers())
"
-  ".function(\"$equals\", 
+[](::com::sun::star::uno::Reference<"
-   << cppName(ifc)
-   << "> const & the_self, "
-  
"::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface> const & "
-  "the_other) { return the_self == the_other; })
";
+  "}, ::emscripten::allow_raw_pointers())
";
 if (bases.size() > 1)
 {
 std::set visitedBases;
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 7abf88669d02..862cbb1101e2 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -13,8 +13,10 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -401,6 +403,9 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 function("throwUnoException", +[](css::uno::Type const& type, 
emscripten::val const& value) {
 cppu::throwException(constructAny(type, value));
 });
+function("sameUnoObject",
+ +[](css::uno::Reference const& ref1,
+ css::uno::Reference const& ref2) { 
return ref1 == ref2; });
 function("rtl_uString_release",
  +[](std::uintptr_t ptr) { 
rtl_uString_release(reinterpret_cast(ptr)); });
 
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 784530597392..6d89a728dbdf 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -308,7 +308,7 @@ Module.addOnPostRun(function() {
 {
 let v = test.getAnyInterface();
 console.log(v);
-console.assert(v.get().$equals(test));
+console.assert(Module.sameUnoObject(v.get(), test));
 console.assert(test.isAnyInterface(v));
 v.delete();
 let a = new Module.uno_Any(
commit 1c8893876015b667fba5dabbc9d4422896021898
Author: Stephan Bergmann 
AuthorDate: Fri Apr 19 13:26:49 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sat Apr 20 11:57:03 2024 +0200

Embind: Don't use new when getting UNO singletons

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

diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index f3bd0df2740e..784530597392 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -11,7 +11,7 @@ Module.addOnPostRun(function() {
 console.log('Running embindtest');
 let uno = init_unoembind_uno(Module);
 let css = uno.com.sun.star;
-let test = new 
uno.org.libreoffice.embindtest.Test(Module.getUnoComponentContext());
+let test = 
uno.org.libreoffice.embindtest.Test(Module.getUnoComponentContext());
 console.assert(typeof test === 'object');
 {
 let v = test.getBoolean();


core.git: static/source

2024-04-19 Thread Stephan Bergmann (via logerrit)
 static/source/embindmaker/embindmaker.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 038c1983122ada4cfe0c85b527940a410643ace1
Author: Stephan Bergmann 
AuthorDate: Fri Apr 19 15:06:03 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 19 21:38:50 2024 +0200

Embind: Clarify need for emscripten::internal::raw_destructor 
specializations

...which are needed at compile time (the emscripten::class_ ctor always
records the address of emscripten::internal::raw_destructor, even in 
cases
where it never calls it; and raw_destructor internally calls delete, but the
dtor of the UNO interface types is protected) but not at runtime (as those 
UNO
interface types are only accessed through css::uno::Reference smart 
pointers)

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

diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index abce7e574f67..f9540c1f006b 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -951,6 +951,7 @@ SAL_IMPLEMENT_MAIN()
 cppOut << "#include 
"
   "#include 
"
   "#include 
"
+  "#include 
"
   "#include 
";
 for (auto const& enm : enums)
 {
@@ -977,14 +978,11 @@ SAL_IMPLEMENT_MAIN()
 cppOut << "#include <" << sng.replace('.', '/') << ".hpp>
";
 }
 cppOut << "
"
-  "// TODO: This is a temporary workaround that likely causes 
the Embind UNO
"
-  "// bindings to leak memory. Reference counting and cloning 
mechanisms of
"
-  "// Embind should be investigated to figure out what exactly 
we need here:
"
   "namespace emscripten::internal {
";
 for (auto const& ifc : interfaces)
 {
 cppOut << "template<> void raw_destructor<" << cppName(ifc) << 
">(" << cppName(ifc)
-   << " *) {}
";
+   << " *) { O3TL_UNREACHABLE; }
";
 }
 cppOut << "}

";
 unsigned long long n = 0;


core.git: solenv/gbuild

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

New commits:
commit 78c613d7df5138f7da9132a6e4aabb1e78321e90
Author: Stephan Bergmann 
AuthorDate: Fri Apr 19 12:31:42 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 19 21:21:24 2024 +0200

Emscripten: Drop unused, deprecated EXPORTED_RUNTIME_METHODS

Linking Executable/soffice.html kept warning about

> warning: JS library symbol '$allocateUTF8' is deprecated. Please open a 
bug if you have a continuing need for this symbol [-Wdeprecated]
> warning: deprecated item in EXPORTED_RUNTIME_METHODS: printErr use err 
instead.
> em++: warning: warnings in JS library compilation [-Wjs-compiler]

printErr had been introduced in f090004c5f236275ca5142fc578f0375872c0336 
"WASM
adapt link and debug flags" and allocateUTF8 had been introduced in
ce60a3dd4dbff0dcb5b82c9053ae5d90f8ac929d "Add LOKit functions and whitelist
export for it to WASM", but in both cases no code seems to ever have made 
use of
either of those two methods, before or after.

Change-Id: I1e81ca6ddad748d91653f709c272328cc8f2b679
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166296
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 5d960db61087..64713ec66fd1 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -25,7 +25,7 @@ gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s 
PTHREAD_POOL_SIZE=4
 # 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","allocateUTF8","printErr","ccall","cwrap","addOnPreMain"$(if
 
$(ENABLE_DBGUTIL),$(COMMA)"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"$(if
 
$(ENABLE_DBGUTIL),$(COMMA)"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
 
 gb_Executable_EXT := .html


core.git: offapi/org static/README.wasm.md static/source unotest/source

2024-04-19 Thread Stephan Bergmann (via logerrit)
 offapi/org/libreoffice/embindtest/XTest.idl |2 ++
 static/README.wasm.md   |   14 +++---
 static/source/embindmaker/embindmaker.cxx   |   13 +
 unotest/source/embindtest/embindtest.cxx|   11 +++
 unotest/source/embindtest/embindtest.js |   11 +++
 5 files changed, 36 insertions(+), 15 deletions(-)

New commits:
commit 1c81f63e91d39187748ea070d064e996481dbd3d
Author: Stephan Bergmann 
AuthorDate: Thu Apr 18 16:05:48 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 19 21:20:59 2024 +0200

Embind: Consistently represent empty interface references as JS null

The existing code had two issues:  For one, e.g. calling a function that
returned a null interface reference mapped that to JS null, while querying 
an
object for a non-supported interface via `new css.uno.X...(y)` mapped that 
to
an "empty" JS object instead.  (So checking for a non-null reference needed 
to
be done as either `x !=== null` or as `x.is()`, depending on context.)  And 
for
another, while calling $is() on a non-"empty" object worked fine, it failed 
on
such an "empty" object (as the Embind internals of that object lacked the $$
property).

So change the querying mechanism from the `new css.uno.X...(y)` constructor 
to a
`css.uno.Xquery(y)` function call syntax, which now returns JS null when
querying for a non-supported interface.  (And drop the broken $is method.)

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

diff --git a/offapi/org/libreoffice/embindtest/XTest.idl 
b/offapi/org/libreoffice/embindtest/XTest.idl
index 8817e94669fc..3dc1773c120a 100644
--- a/offapi/org/libreoffice/embindtest/XTest.idl
+++ b/offapi/org/libreoffice/embindtest/XTest.idl
@@ -112,6 +112,8 @@ interface XTest {
 boolean isSequenceEnum([in] sequence value);
 sequence getSequenceStruct();
 boolean isSequenceStruct([in] sequence value);
+XTest getNull();
+boolean isNull([in] XTest value);
 void throwRuntimeException();
 void passJob([in] com::sun::star::task::XJob object);
 void passJobExecutor([in] com::sun::star::task::XJobExecutor object);
diff --git a/static/README.wasm.md b/static/README.wasm.md
index 19da4518030c..5397e2124d16 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -228,11 +228,11 @@ Some usage examples through javascript of the current 
implementation:
 let uno = init_unoembind_uno(Module);
 let css = uno.com.sun.star;
 xModel = Module.getCurrentModelFromViewSh();
-xTextDocument = new css.text.XTextDocument(xModel);
+xTextDocument = css.text.XTextDocument.query(xModel);
 xText = xTextDocument.getText();
-xSimpleText = new css.text.XSimpleText(xText);
+xSimpleText = css.text.XSimpleText.query(xText);
 xTextCursor = xSimpleText.createTextCursor();
-xTextRange = new css.text.XTextRange(xTextCursor);
+xTextRange = css.text.XTextRange.query(xTextCursor);
 xTextRange.setString("string here!");
 xModel.delete(); xTextDocument.delete(); xText.delete(); xSimpleText.delete(); 
xTextCursor.delete(); xTextRange.delete();
 ```
@@ -242,13 +242,13 @@ xModel.delete(); xTextDocument.delete(); xText.delete(); 
xSimpleText.delete(); x
 let uno = init_unoembind_uno(Module);
 let css = uno.com.sun.star;
 xModel = Module.getCurrentModelFromViewSh();
-xEnumAccess = new css.container.XEnumerationAccess(xText);
+xEnumAccess = css.container.XEnumerationAccess.query(xText);
 xParaEnumeration = xEnumAccess.createEnumeration();
 
 while (xParaEnumeration.hasMoreElements()) {
-xParagraph = new css.text.XTextRange(xParaEnumeration.nextElement().get());
-if (xParagraph.$is()) {
-xParaProps = new css.beans.XPropertySet(xParagraph);
+xParagraph = 
css.text.XTextRange.query(xParaEnumeration.nextElement().get());
+if (xParagraph !== null) {
+xParaProps = css.beans.XPropertySet.query(xParagraph);
 let color = new Module.uno_Any(
 Module.uno_Type.Long(), Math.floor(Math.random() * 0xFF));
 xParaProps.setPropertyValue("CharColor", color);
diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index 252d7b25451c..abce7e574f67 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -1082,18 +1082,15 @@ SAL_IMPLEMENT_MAIN()
   ".smart_ptr<::com::sun::star::uno::Reference<"
<< cppName(ifc) << ">>(\"uno_Reference_" << jsName(ifc)
<< "\")
"
+  ".class_function(\"query\", "
+  
"+[](::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface> "
+  "const & the_object) { return 
::com::sun::star::uno::Reference<"
+   << cppName(ifc)
+   << 

core.git: static/source

2024-04-19 Thread Stephan Bergmann (via logerrit)
 static/source/embindmaker/embindmaker.cxx |   19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 41706fcd962a38627d20f62488c6110967396ee7
Author: Stephan Bergmann 
AuthorDate: Fri Apr 19 11:00:05 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 19 21:20:41 2024 +0200

Embind: Don't expose special XInterface methods to JS client code

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

diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index ea7879ecceb0..252d7b25451c 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -667,16 +667,19 @@ void dumpMethods(std::ostream& out, 
rtl::Reference const& manager,
  OUString const& name, 
rtl::Reference const& entity,
  std::list const& baseTrail)
 {
-for (auto const& meth : entity->getDirectMethods())
+if (name != "com.sun.star.uno.XInterface")
 {
-if (!baseTrail.empty() || hasInOutParameters(meth))
+for (auto const& meth : entity->getDirectMethods())
 {
-dumpWrapper(out, manager, name, meth, baseTrail);
-}
-else
-{
-out << ".function(\"" << meth.name << "\", &" << 
cppName(name)
-<< "::" << meth.name << ", ::emscripten::pure_virtual())
";
+if (!baseTrail.empty() || hasInOutParameters(meth))
+{
+dumpWrapper(out, manager, name, meth, baseTrail);
+}
+else
+{
+out << ".function(\"" << meth.name << "\", &" << 
cppName(name)
+<< "::" << meth.name << ", ::emscripten::pure_virtual())
";
+}
 }
 }
 }


core.git: compilerplugins/clang

2024-04-18 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/compat.hxx   |8 
 compilerplugins/clang/unusedmember.cxx |2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 4952f57feaa94447a632b8af317932d70f9d
Author: Stephan Bergmann 
AuthorDate: Thu Apr 18 22:30:51 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 19 07:47:03 2024 +0200

Adapt to Clang 19 trunk isUnnamedBitfield -> isUnnamedBitField rename



"[clang][NFC] Fix FieldDecl::isUnnamedBitfield() capitalization"

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

diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx
index cc3192ea9204..ac2a282c4fd8 100644
--- a/compilerplugins/clang/compat.hxx
+++ b/compilerplugins/clang/compat.hxx
@@ -250,6 +250,14 @@ inline bool isPureVirtual(clang::FunctionDecl const * 
decl) {
 #endif
 }
 
+inline bool isUnnamedBitField(clang::FieldDecl const * decl) {
+#if CLANG_VERSION >= 19
+return decl->isUnnamedBitField();
+#else
+return decl->isUnnamedBitfield();
+#endif
+}
+
 inline clang::TemplateTypeParmDecl const * getReplacedParameter(
 clang::SubstTemplateTypeParmType const * type)
 {
diff --git a/compilerplugins/clang/unusedmember.cxx 
b/compilerplugins/clang/unusedmember.cxx
index 305f9c606d31..610c94e162b3 100644
--- a/compilerplugins/clang/unusedmember.cxx
+++ b/compilerplugins/clang/unusedmember.cxx
@@ -155,7 +155,7 @@ public:
 }
 if (auto const d1 = dyn_cast(d))
 {
-if (d1->isUnnamedBitfield())
+if (compat::isUnnamedBitField(d1))
 {
 continue;
 }


core.git: static/source unotest/source

2024-04-18 Thread Stephan Bergmann (via logerrit)
 static/source/unoembindhelpers/PrimaryBindings.cxx |  122 +++--
 unotest/source/embindtest/embindtest.cxx   |9 +
 unotest/source/embindtest/embindtest.js|5 
 3 files changed, 77 insertions(+), 59 deletions(-)

New commits:
commit 75fe059974dcb80c3f78110c73ab799afc6f4ca3
Author: Stephan Bergmann 
AuthorDate: Thu Apr 18 15:16:01 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 18 22:16:33 2024 +0200

Embind: throwUnoException from JS

(If throwUnoException 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(), so make
throwUnoException take two arguments instead and assemble the css::uno::Any 
on
the C++ side.)

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index fee0c3e214d1..7abf88669d02 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -191,6 +192,65 @@ std::type_info const* getTypeId(css::uno::Type const& type)
 }
 return i->second;
 }
+
+Any constructAny(const css::uno::Type& rUnoType, const val& rObject)
+{
+switch (rUnoType.getTypeClass())
+{
+case TypeClass_VOID:
+return {};
+case TypeClass_BOOLEAN:
+return Any{ rObject.as() };
+case TypeClass_BYTE:
+return Any{ rObject.as() };
+case TypeClass_SHORT:
+return Any{ rObject.as() };
+case TypeClass_UNSIGNED_SHORT:
+return Any{ rObject.as() };
+case TypeClass_LONG:
+return Any{ rObject.as() };
+case TypeClass_UNSIGNED_LONG:
+return Any{ rObject.as() };
+case TypeClass_HYPER:
+return Any{ rObject.as() };
+case TypeClass_UNSIGNED_HYPER:
+return Any{ rObject.as() };
+case TypeClass_FLOAT:
+return Any{ rObject.as() };
+case TypeClass_DOUBLE:
+return Any{ rObject.as() };
+case TypeClass_CHAR:
+return Any{ rObject.as() };
+case TypeClass_STRING:
+return Any{ OUString(rObject.as()) };
+case TypeClass_TYPE:
+return css::uno::Any(rObject.as());
+case TypeClass_SEQUENCE:
+case TypeClass_STRUCT:
+case TypeClass_EXCEPTION:
+case TypeClass_INTERFACE:
+{
+emscripten::internal::EM_DESTRUCTORS destructors = nullptr;
+emscripten::internal::EM_GENERIC_WIRE_TYPE result
+= _emval_as(rObject.as_handle(), getTypeId(rUnoType), 
);
+emscripten::internal::DestructorsRunner dr(destructors);
+return 
css::uno::Any(emscripten::internal::fromGenericWireType(result),
+ rUnoType);
+}
+case TypeClass_ENUM:
+{
+emscripten::internal::EM_DESTRUCTORS destructors = nullptr;
+emscripten::internal::EM_GENERIC_WIRE_TYPE result
+= _emval_as(rObject.as_handle(), getTypeId(rUnoType), 
);
+emscripten::internal::DestructorsRunner dr(destructors);
+return css::uno::Any(
+
::temporary(emscripten::internal::fromGenericWireType(result)),
+rUnoType);
+}
+default:
+throw std::invalid_argument("bad type class");
+}
+}
 }
 
 namespace unoembindhelpers::detail
@@ -248,64 +308,7 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 
 // Any
 class_("uno_Any")
-.constructor(+[](const css::uno::Type& rUnoType, const val& rObject) 
-> Any {
-switch (rUnoType.getTypeClass())
-{
-case TypeClass_VOID:
-return {};
-case TypeClass_BOOLEAN:
-return Any{ rObject.as() };
-case TypeClass_BYTE:
-return Any{ rObject.as() };
-case TypeClass_SHORT:
-return Any{ rObject.as() };
-case TypeClass_UNSIGNED_SHORT:
-return Any{ rObject.as() };
-case TypeClass_LONG:
-return Any{ rObject.as() };
-case TypeClass_UNSIGNED_LONG:
-return Any{ rObject.as() };
-case TypeClass_HYPER:
-return Any{ rObject.as() };
-case TypeClass_UNSIGNED_HYPER:
-return Any{ rObject.as() };
-case TypeClass_FLOAT:
-return Any{ rObject.as() };
-case 

core.git: unotest/source

2024-04-18 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.js |5 +
 1 file changed, 5 insertions(+)

New commits:
commit edfe8adcec43241ad052c7c82b44e14bd443323b
Author: Stephan Bergmann 
AuthorDate: Thu Apr 18 14:29:28 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 18 20:58:50 2024 +0200

Embind: call decrementExceptionRefcount upon catching

The note at


is a bit vague whether decrementExceptionRefcount would only be needed for
Wasm-based (-fwasm-exceptions) exceptions, or also for the JS-based
(-fexceptions) ones that we currently use.  (But it does state clearly that 
for
the latter we need to manually call incrementExceptionRefcount first.)

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

diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 8da18fbb7d96..08bded0c81f8 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -540,9 +540,14 @@ Module.addOnPostRun(function() {
 try {
 test.throwRuntimeException();
 } catch (e) {
+incrementExceptionRefcount(e);
+//TODO, needed when building with JS-based -fexceptions, see
+//  
"[EH] Fix inconsistency
+// of refcounting in Emscripten EH vs. Wasm EH"
 console.assert(e.name === 'com::sun::star::uno::RuntimeException');
 console.assert(e.message === undefined); //TODO
 //TODO: console.assert(e.Message.startsWith('test'));
+decrementExceptionRefcount(e);
 }
 const obj = {
 implRefcount: 0,


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

2024-04-18 Thread Stephan Bergmann (via logerrit)
 include/static/unoembindhelpers/PrimaryBindings.hxx |5 -
 static/README.wasm.md   |2 +-
 static/source/embindmaker/embindmaker.cxx   |5 -
 static/source/unoembindhelpers/PrimaryBindings.cxx  |2 --
 4 files changed, 1 insertion(+), 13 deletions(-)

New commits:
commit 830ec75f2f172847d350a0801823cf87e004b33c
Author: Stephan Bergmann 
AuthorDate: Thu Apr 18 13:21:56 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 18 17:13:28 2024 +0200

Embind: We no longer need interface FromAny ctor

...now that we have uno_Any get() since 
8428368d79118f1d0e09615c5d2b92065b8838d4
"Improve Embing'ing of UNO Any somewhat"

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

diff --git a/include/static/unoembindhelpers/PrimaryBindings.hxx 
b/include/static/unoembindhelpers/PrimaryBindings.hxx
index 259c9c2944f8..6acf2803132a 100644
--- a/include/static/unoembindhelpers/PrimaryBindings.hxx
+++ b/include/static/unoembindhelpers/PrimaryBindings.hxx
@@ -41,11 +41,6 @@ namespace detail
 void registerUnoType(css::uno::Type const& type, std::type_info const* id);
 }
 
-enum class uno_Reference
-{
-FromAny
-};
-
 enum class uno_Sequence
 {
 FromSize
diff --git a/static/README.wasm.md b/static/README.wasm.md
index 69176bb8acbc..19da4518030c 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -246,7 +246,7 @@ xEnumAccess = new css.container.XEnumerationAccess(xText);
 xParaEnumeration = xEnumAccess.createEnumeration();
 
 while (xParaEnumeration.hasMoreElements()) {
-xParagraph = new css.text.XTextRange(xParaEnumeration.nextElement(), 
Module.uno_Reference.FromAny);
+xParagraph = new css.text.XTextRange(xParaEnumeration.nextElement().get());
 if (xParagraph.$is()) {
 xParaProps = new css.beans.XPropertySet(xParagraph);
 let color = new Module.uno_Any(
diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index 6d89f5a5ab10..ea7879ecceb0 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -1087,11 +1087,6 @@ SAL_IMPLEMENT_MAIN()
   
".constructor(+[](::com::sun::star::uno::Reference<::com::sun::star::uno::"
   "XInterface> const & the_object) { return 
::com::sun::star::uno::Reference<"
<< cppName(ifc)
-   << ">(the_object, ::com::sun::star::uno::UNO_QUERY); })
"
-  ".constructor(+[](::com::sun::star::uno::Any 
const & the_object, "
-  "[[maybe_unused]] ::unoembindhelpers::uno_Reference) { 
return "
-  "::com::sun::star::uno::Reference<"
-   << cppName(ifc)
<< ">(the_object, ::com::sun::star::uno::UNO_QUERY); })
"
   ".function(\"$is\", 
+[](::com::sun::star::uno::Reference<"
<< cppName(ifc)
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index d74b63ab8402..fee0c3e214d1 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -200,8 +200,6 @@ void registerUnoType(css::uno::Type const& type, 
std::type_info const* id) { uno
 
 EMSCRIPTEN_BINDINGS(PrimaryBindings)
 {
-enum_("uno_Reference")
-.value("FromAny", unoembindhelpers::uno_Reference::FromAny);
 enum_("uno_Sequence")
 .value("FromSize", unoembindhelpers::uno_Sequence::FromSize);
 


core.git: external/argon2

2024-04-18 Thread Stephan Bergmann (via logerrit)
 external/argon2/0002-Add-WinARM64-vcxproj-config.patch |   70 ++---
 1 file changed, 60 insertions(+), 10 deletions(-)

New commits:
commit 560989ff89eb1a3e91cfcae1cb524ece20463b86
Author: Stephan Bergmann 
AuthorDate: Thu Apr 18 08:15:31 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 18 11:55:00 2024 +0200

external/argon2: Adapt vcxproj to Debug|ARM64

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

diff --git a/external/argon2/0002-Add-WinARM64-vcxproj-config.patch 
b/external/argon2/0002-Add-WinARM64-vcxproj-config.patch
index 063296dd107c..4a33df9f0d7c 100644
--- a/external/argon2/0002-Add-WinARM64-vcxproj-config.patch
+++ b/external/argon2/0002-Add-WinARM64-vcxproj-config.patch
@@ -1,10 +1,14 @@
 diff -ur argon2.org/vs2015/Argon2OptDll/Argon2OptDll.vcxproj 
argon2/vs2015/Argon2OptDll/Argon2OptDll.vcxproj
 --- argon2.org/vs2015/Argon2OptDll/Argon2OptDll.vcxproj2023-12-23 
01:00:49.231059537 +0100
 +++ argon2/vs2015/Argon2OptDll/Argon2OptDll.vcxproj2023-12-23 
01:02:40.375527010 +0100
-@@ -13,6 +13,10 @@
+@@ -13,6 +13,14 @@
ReleaseStatic
x64
  
++
++  Debug
++  AMR64
++
 +
 +  Release
 +  AMR64
@@ -12,10 +16,15 @@ diff -ur 
argon2.org/vs2015/Argon2OptDll/Argon2OptDll.vcxproj argon2/vs2015/Argon
  
Release
Win32
-@@ -50,6 +54,12 @@
+@@ -50,6 +54,17 @@
  true
  MultiByte

++  
++DynamicLibrary
++true
++MultiByte
++  
 +  
 +DynamicLibrary
 +false
@@ -25,20 +34,28 @@ diff -ur 
argon2.org/vs2015/Argon2OptDll/Argon2OptDll.vcxproj argon2/vs2015/Argon

  DynamicLibrary
  false
-@@ -84,6 +94,9 @@
+@@ -84,6 +94,12 @@

  

++  
++
++  
 +  
 +
 +  

  

-@@ -107,6 +120,11 @@
+@@ -107,6 +120,16 @@
  $(SolutionDir)vs2015uild\$(ProjectName)\
  $(SolutionDir)include;$(IncludePath)

++  
++$(SolutionDir)vs2015uild\
++$(SolutionDir)vs2015uild\$(ProjectName)\
++$(SolutionDir)include;$(IncludePath)
++  
 +  
 +$(SolutionDir)vs2015uild\
 +$(SolutionDir)vs2015uild\$(ProjectName)\
@@ -47,10 +64,18 @@ diff -ur 
argon2.org/vs2015/Argon2OptDll/Argon2OptDll.vcxproj argon2/vs2015/Argon

  $(SolutionDir)vs2015uild\
  $(SolutionDir)vs2015uild\$(ProjectName)\
-@@ -158,6 +176,21 @@
+@@ -158,6 +176,29 @@
true
  

++  
++
++  Level3
++  Disabled
++  true
++  
_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
++
++  
 +  
 +
 +  Level3
@@ -90,10 +115,14 @@ Only in argon2/vs2015/Argon2OptDll: Argon2OptDll.vcxproj~
 diff -ur argon2.org/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj 
argon2/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj
 --- argon2.org/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj  2023-12-23 
01:00:49.231059537 +0100
 +++ argon2/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj  2023-12-23 
01:02:12.518576081 +0100
-@@ -17,6 +17,10 @@
+@@ -17,6 +17,14 @@
Release
Win32
  
++
++  Debug
++  ARM64
++
 +
 +  Release
 +  ARM64
@@ -101,10 +130,15 @@ diff -ur 
argon2.org/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj argon2/vs2015
  
Debug
x64
-@@ -51,6 +55,12 @@
+@@ -51,6 +55,17 @@
  true
  MultiByte

++  
++Application
++true
++MultiByte
++  
 +  
 +Application
 +false
@@ -114,20 +148,28 @@ diff -ur 
argon2.org/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj argon2/vs2015

  Application
  false
-@@ -85,6 +95,9 @@
+@@ -85,6 +95,12 @@

  

++  
++
++  
 +  
 +
 +  

  

-@@ -108,6 +121,11 @@
+@@ -108,6 +121,16 @@
  $(SolutionDir)vs2015uild\
  $(SolutionDir)vs2015uild\$(ProjectName)\

++  
++$(SolutionDir)include;$(IncludePath)
++$(SolutionDir)vs2015uild\
++$(SolutionDir)vs2015uild\$(ProjectName)\
++  
 +  
 +$(SolutionDir)include;$(IncludePath)
 +$(SolutionDir)vs2015uild\
@@ -136,13 +178,21 @@ diff -ur 
argon2.org/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj argon2/vs2015

  $(SolutionDir)include;$(IncludePath)
  $(SolutionDir)vs2015uild\
-@@ -162,6 +180,21 @@
+@@ -162,6 +180,29 @@
true
  

 +  
 +
 +  Level3
++  Disabled
++  true
++  
_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
++
++  
++  
++
++  Level3
 +  MaxSpeed
 +  true
 +  false


core.git: unotest/source

2024-04-17 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.js |   27 ---
 1 file changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 89610c2176e1370a8075187e7637e5844fe5f3e3
Author: Stephan Bergmann 
AuthorDate: Wed Apr 17 15:48:17 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Apr 17 20:40:54 2024 +0200

Embind: Clean up JS UNO obj implementation in embindtest.js

We don't need a dedicated implXInterface, any other interface derived from 
it
works as well.  But we should arguably implement css.lang.XTypeProvider.  
Which
in turn requires two sequences, which need to be eventually .delete()'ed, 
so add
impl* for them.  And while at it, rename refcount to implRefcount for
consistency.

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

diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 67c0d2b77c13..8da18fbb7d96 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -545,10 +545,19 @@ Module.addOnPostRun(function() {
 //TODO: console.assert(e.Message.startsWith('test'));
 }
 const obj = {
-refcount: 0,
+implRefcount: 0,
+implTypes: new Module.uno_Sequence_type([
+Module.uno_Type.Interface('com.sun.star.lang.XTypeProvider'),
+Module.uno_Type.Interface('com.sun.star.task.XJob'),
+Module.uno_Type.Interface('com.sun.star.task.XJobExecutor')]),
+implImplementationId: new Module.uno_Sequence_byte([]),
 queryInterface(type) {
 if (type == 'com.sun.star.uno.XInterface') {
-return new Module.uno_Any(type, 
css.uno.XInterface.reference(this.implXInterface));
+return new Module.uno_Any(
+type, 
css.uno.XInterface.reference(this.implXTypeProvider));
+} else if (type == 'com.sun.star.lang.XTypeProvider') {
+return new Module.uno_Any(
+type, 
css.lang.XTypeProvider.reference(this.implXTypeProvider));
 } else if (type == 'com.sun.star.task.XJob') {
 return new Module.uno_Any(type, 
css.task.XJob.reference(this.implXJob));
 } else if (type == 'com.sun.star.task.XJobExecutor') {
@@ -558,27 +567,31 @@ Module.addOnPostRun(function() {
 return new Module.uno_Any(Module.uno_Type.Void(), undefined);
 }
 },
-acquire() { ++this.refcount; },
+acquire() { ++this.implRefcount; },
 release() {
-if (--this.refcount === 0) {
-this.implXInterface.delete();
+if (--this.implRefcount === 0) {
+this.implXTypeProvider.delete();
 this.implXJob.delete();
 this.implXJobExecutor.delete();
+this.implTypes.delete();
+this.implImplementationId.delete();
 }
 },
+getTypes() { return this.implTypes; },
+getImplementationId() { return this.implImplementationId; },
 execute(args) {
 console.log('Hello ' + args.get(0).Value.get());
 return new Module.uno_Any(Module.uno_Type.Void(), undefined);
 },
 trigger(event) { console.log('Ola ' + event); }
 };
-obj.implXInterface = css.uno.XInterface.implement(obj);
+obj.implXTypeProvider = css.lang.XTypeProvider.implement(obj);
 obj.implXJob = css.task.XJob.implement(obj);
 obj.implXJobExecutor = css.task.XJobExecutor.implement(obj);
 obj.acquire();
 test.passJob(css.task.XJob.reference(obj.implXJob));
 
test.passJobExecutor(css.task.XJobExecutor.reference(obj.implXJobExecutor));
-test.passInterface(css.uno.XInterface.reference(obj.implXInterface));
+test.passInterface(css.uno.XInterface.reference(obj.implXTypeProvider));
 obj.release();
 });
 


core.git: static/source

2024-04-16 Thread Stephan Bergmann (via logerrit)
 static/source/unoembindhelpers/PrimaryBindings.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d304fdb3369235ff4916463687b5e625c7fa3650
Author: Stephan Bergmann 
AuthorDate: Tue Apr 16 20:37:25 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Apr 17 07:56:09 2024 +0200

Embind: css::uno::Type should probably use sharing_policy::NONE

Given the reasoning in 0957ee9f5d379c80fca4027c187b471118d0490d "Embind: No 
need
for $query", those sharing_policies appear to be (solely) about upcasting of
those smart pointers, and css::uno::Type doesn't involve any class 
hierarchies,
so NONE ("no upcasting", in genericPointerToWireType in Emscripten's
src/embind/embind.js) appears to be the best match here.

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index c8d4717aa347..d74b63ab8402 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -45,7 +45,7 @@ template <> struct emscripten::smart_ptr_trait
 {
 return ptr.getTypeLibType();
 }
-static sharing_policy get_sharing_policy() { return 
sharing_policy::INTRUSIVE; }
+static sharing_policy get_sharing_policy() { return sharing_policy::NONE; }
 static css::uno::Type* share(typelib_TypeDescriptionReference* v)
 {
 return new css::uno::Type(v);


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

2024-04-16 Thread Stephan Bergmann (via logerrit)
 static/README.wasm.md |   10 +-
 static/source/embindmaker/embindmaker.cxx |5 -
 unotest/source/embindtest/embindtest.js   |2 +-
 3 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit 0957ee9f5d379c80fca4027c187b471118d0490d
Author: Stephan Bergmann 
AuthorDate: Tue Apr 16 10:17:08 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Apr 16 20:35:22 2024 +0200

Embind: No need for $query

...to "upcast" from css::uno::Reference to base
css::uno::Reference.  My understanding now is that 
due to
the sharing_policy::INTRUSIVE we specify for
emscripten::smart_ptr_trait>
(include/static/unoembindhelpers/PrimaryBindings.hxx), Embind can internally
"upcast" from a css::uno::Reference to a base
css::uno::Reference by just treating the encapsulated 
raw
pointer of type T* as a raw pointer of type css::uno::XInterface* (see the 
use
of that sharingPolicy in genericPointerToWireType in Emscripten's
src/embind/embind.js; though documentation of that Embind sharing_policy is
rather poor).

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

diff --git a/static/README.wasm.md b/static/README.wasm.md
index 3cfe5f6c33c9..69176bb8acbc 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -228,11 +228,11 @@ Some usage examples through javascript of the current 
implementation:
 let uno = init_unoembind_uno(Module);
 let css = uno.com.sun.star;
 xModel = Module.getCurrentModelFromViewSh();
-xTextDocument = new css.text.XTextDocument(xModel.$query());
+xTextDocument = new css.text.XTextDocument(xModel);
 xText = xTextDocument.getText();
-xSimpleText = new css.text.XSimpleText(xText.$query());
+xSimpleText = new css.text.XSimpleText(xText);
 xTextCursor = xSimpleText.createTextCursor();
-xTextRange = new css.text.XTextRange(xTextCursor.$query());
+xTextRange = new css.text.XTextRange(xTextCursor);
 xTextRange.setString("string here!");
 xModel.delete(); xTextDocument.delete(); xText.delete(); xSimpleText.delete(); 
xTextCursor.delete(); xTextRange.delete();
 ```
@@ -242,13 +242,13 @@ xModel.delete(); xTextDocument.delete(); xText.delete(); 
xSimpleText.delete(); x
 let uno = init_unoembind_uno(Module);
 let css = uno.com.sun.star;
 xModel = Module.getCurrentModelFromViewSh();
-xEnumAccess = new css.container.XEnumerationAccess(xText.$query());
+xEnumAccess = new css.container.XEnumerationAccess(xText);
 xParaEnumeration = xEnumAccess.createEnumeration();
 
 while (xParaEnumeration.hasMoreElements()) {
 xParagraph = new css.text.XTextRange(xParaEnumeration.nextElement(), 
Module.uno_Reference.FromAny);
 if (xParagraph.$is()) {
-xParaProps = new css.beans.XPropertySet(xParagraph.$query());
+xParaProps = new css.beans.XPropertySet(xParagraph);
 let color = new Module.uno_Any(
 Module.uno_Type.Long(), Math.floor(Math.random() * 0xFF));
 xParaProps.setPropertyValue("CharColor", color);
diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index 07214c289681..6d89f5a5ab10 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -1096,11 +1096,6 @@ SAL_IMPLEMENT_MAIN()
   ".function(\"$is\", 
+[](::com::sun::star::uno::Reference<"
<< cppName(ifc)
<< "> const & the_self) { return the_self.is(); })
"
-  ".function(\"$query\", 
+[](::com::sun::star::uno::Reference<"
-   << cppName(ifc)
-   << "> const & the_self) { return "
-  
"::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface>(the_"
-  "self); })
"
   ".function(\"$equals\", 
+[](::com::sun::star::uno::Reference<"
<< cppName(ifc)
<< "> const & the_self, "
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 749488cfa567..67c0d2b77c13 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -308,7 +308,7 @@ Module.addOnPostRun(function() {
 {
 let v = test.getAnyInterface();
 console.log(v);
-console.assert(v.get().$equals(test.$query()));
+console.assert(v.get().$equals(test));
 console.assert(test.isAnyInterface(v));
 v.delete();
 let a = new Module.uno_Any(


core.git: Branch 'distro/cib/libreoffice-6-4' - officecfg/registry

2024-04-15 Thread Stephan Bergmann (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0a8075d5ec443155484923ae373442d47f37608b
Author: Stephan Bergmann 
AuthorDate: Mon Apr 15 15:29:02 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Apr 15 16:20:37 2024 +0200

Update documentation accidentally missing from previous commit

...951e255ac70fc64726012ac13d521010f24b255e "Allow overriding crash report
dialog texts"

Change-Id: I4cc7ce4ce911871bffa0979a12e55dc0f3f73374
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166128
Tested-by: allotropia jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index cc4e080795b7..18485882dd32 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5576,14 +5576,14 @@
 oor:localized="true">
 
   An override for the text presented in the crash report dialog 
before sending the
-  report.
+  report.  Supports %PRODUCTNAME replacements.
 
   
   
 
   An override for the text presented in the crash report dialog 
after successfully
-  sending the report.
+  sending the report.  Supports %CRASHID and %CrashDumpUrl% 
replacements.
 
   
   


core.git: Branch 'distro/cib/libreoffice-6-4' - officecfg/registry svx/source

2024-04-15 Thread Stephan Bergmann (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   14 +
 svx/source/dialog/crashreportdlg.cxx   |   31 -
 2 files changed, 44 insertions(+), 1 deletion(-)

New commits:
commit 951e255ac70fc64726012ac13d521010f24b255e
Author: Stephan Bergmann 
AuthorDate: Mon Apr 15 14:08:47 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Apr 15 15:14:07 2024 +0200

Allow overriding crash report dialog texts

...building on fb6cbbdcefbcc526405f517677a3214b4292b39e "Adapt crash 
submitted
dialog", which had already modified the dialog somewhat.

(The two new configuration properties are marked as non-nillable, even 
though
the default actually is nil.  That way, the nil default causes no 
overriding of
the dialog's content from the .ui file in any locale, while any non-nil 
strings
for at least one locale will always cause those strings to be used, even as 
a
last resort fallback for non-matching locales.  Which is probably a better
outcome here than falling back to the non-overridden .ui file content for
non-matching locales.)

Change-Id: I1028707f7aa1117c16ae6de131cd776ff96eeaa2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166126
Tested-by: allotropia jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 307caf9f2895..cc4e080795b7 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5572,6 +5572,20 @@
 
 true
   
+  
+
+  An override for the text presented in the crash report dialog 
before sending the
+  report.
+
+  
+  
+
+  An override for the text presented in the crash report dialog 
after successfully
+  sending the report.
+
+  
   
 
 
diff --git a/svx/source/dialog/crashreportdlg.cxx 
b/svx/source/dialog/crashreportdlg.cxx
index 9d3512c56fb7..398073efb527 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -12,13 +12,18 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
+#include 
+#include 
+#include 
 #include 
 #include 
 
@@ -32,7 +37,31 @@ CrashReportDialog::CrashReportDialog(weld::Window* pParent)
 , mxEditPostUpload(m_xBuilder->weld_text_view("ed_post"))
 , mxCBSafeMode(m_xBuilder->weld_check_button("check_safemode"))
 {
-maSuccessMsg = mxEditPostUpload->get_text();
+auto const config = css::configuration::ReadOnlyAccess::create(
+comphelper::getProcessComponentContext(),
+LanguageTag(
+css::uno::Reference(
+css::configuration::theDefaultProvider::get(
+comphelper::getProcessComponentContext()),
+css::uno::UNO_QUERY_THROW)->
+getLocale()).getBcp47());
+
+auto const preText = config->getByHierarchicalName(
+"/org.openoffice.Office.Common/Misc/CrashReportPreSendNotification");
+if (OUString text; preText >>= text) {
+mxEditPreUpload->set_label(
+text.replaceAll("%PRODUCTNAME", 
utl::ConfigManager::getProductName()));
+}
+
+auto const postText = config->getByHierarchicalName(
+"/org.openoffice.Office.Common/Misc/CrashReportPostSendNotification");
+if (OUString text; postText >>= text) {
+OUString url;
+rtl::Bootstrap::get("CrashDumpUrl", url);
+maSuccessMsg = text.replaceAll("%CrashDumpUrl%", url);
+} else {
+maSuccessMsg = mxEditPostUpload->get_text();
+}
 
 auto const offerSafeMode = 
officecfg::Office::Common::Misc::OfferSafeMode::get();
 mxCBSafeMode->set_visible(offerSafeMode);


core.git: Branch 'distro/cib/libreoffice-6-4' - desktop/source

2024-04-12 Thread Stephan Bergmann (via logerrit)
 desktop/source/minidump/minidump.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 344a00b2a4c358e3c0a66f0c163c874a5ebdcc08
Author: Stephan Bergmann 
AuthorDate: Fri Apr 12 17:42:45 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Sat Apr 13 00:30:21 2024 +0200

At least capture (English-only) cURL error when something goes wrong

...so that svx/source/dialog/crashreportdlg.cxx can at least present that,
instead of confusingly being silent about the error

Change-Id: I5e8af5f8df4cbcad84f8b60c2de4c55621b28890
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166037
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 324401ced3c2234903f9e0430a0380be968b492b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165941
Tested-by: allotropia jenkins 

diff --git a/desktop/source/minidump/minidump.cxx 
b/desktop/source/minidump/minidump.cxx
index 8b96d2ff37f1..e1f3eb4c5a94 100644
--- a/desktop/source/minidump/minidump.cxx
+++ b/desktop/source/minidump/minidump.cxx
@@ -184,7 +184,13 @@ static bool uploadContent(std::map& parameters, std::s
 response = response_body;
 
 if( CURLE_OK != cc )
+{
+if (response.empty())
+{
+response = curl_easy_strerror(cc);
+}
 return false;
+}
 
 return true;
 }


core.git: desktop/source

2024-04-12 Thread Stephan Bergmann (via logerrit)
 desktop/source/minidump/minidump.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 6a4031ec8338b005682493f65744ebcbc30a5f81
Author: Stephan Bergmann 
AuthorDate: Fri Apr 12 17:42:45 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 12 23:36:48 2024 +0200

At least capture (English-only) cURL error when something goes wrong

...so that svx/source/dialog/crashreportdlg.cxx can at least present that,
instead of confusingly being silent about the error

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

diff --git a/desktop/source/minidump/minidump.cxx 
b/desktop/source/minidump/minidump.cxx
index 0a31fff6f285..90d23f51acf3 100644
--- a/desktop/source/minidump/minidump.cxx
+++ b/desktop/source/minidump/minidump.cxx
@@ -184,7 +184,13 @@ static bool uploadContent(std::map& parameters, std::s
 response = response_body;
 
 if( CURLE_OK != cc )
+{
+if (response.empty())
+{
+response = curl_easy_strerror(cc);
+}
 return false;
+}
 
 return true;
 }


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

2024-04-12 Thread Stephan Bergmann (via logerrit)
 offapi/org/libreoffice/embindtest/XTest.idl |3 
 static/source/embindmaker/embindmaker.cxx   |  160 ++--
 unotest/source/embindtest/embindtest.cxx|   22 +++
 unotest/source/embindtest/embindtest.js |   36 ++
 4 files changed, 212 insertions(+), 9 deletions(-)

New commits:
commit 3454a73a11722c45016c9b5aa0d95402fc1196f0
Author: Stephan Bergmann 
AuthorDate: Fri Apr 12 08:57:44 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 12 20:52:54 2024 +0200

Embind: support .implement()-based JS UNO objects

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

diff --git a/offapi/org/libreoffice/embindtest/XTest.idl 
b/offapi/org/libreoffice/embindtest/XTest.idl
index b3b5237ce2b4..8817e94669fc 100644
--- a/offapi/org/libreoffice/embindtest/XTest.idl
+++ b/offapi/org/libreoffice/embindtest/XTest.idl
@@ -113,6 +113,9 @@ interface XTest {
 sequence getSequenceStruct();
 boolean isSequenceStruct([in] sequence value);
 void throwRuntimeException();
+void passJob([in] com::sun::star::task::XJob object);
+void passJobExecutor([in] com::sun::star::task::XJobExecutor object);
+void passInterface([in] com::sun::star::uno::XInterface object);
 };
 
 }; }; };
diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index 4241d10b1575..07214c289681 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -501,7 +501,7 @@ void dumpAttributes(std::ostream& out, 
rtl::Reference const& manage
 }
 out << "->get" << attr.name << "(); }";
 }
-out << ")
";
+out << ", ::emscripten::pure_virtual())
";
 if (!attr.readOnly)
 {
 out << ".function(\"set" << attr.name << "\", ";
@@ -530,7 +530,7 @@ void dumpAttributes(std::ostream& out, 
rtl::Reference const& manage
 }
 out << "->set" << attr.name << "(the_value); }";
 }
-out << ")
";
+out << ", ::emscripten::pure_virtual())
";
 }
 }
 }
@@ -660,7 +660,7 @@ void dumpWrapper(std::ostream& out, 
rtl::Reference const& manager,
 {
 out << ", ::emscripten::allow_raw_pointers()";
 }
-out << ")
";
+out << ", ::emscripten::pure_virtual())
";
 }
 
 void dumpMethods(std::ostream& out, rtl::Reference const& manager,
@@ -676,18 +676,18 @@ void dumpMethods(std::ostream& out, 
rtl::Reference const& manager,
 else
 {
 out << ".function(\"" << meth.name << "\", &" << 
cppName(name)
-<< "::" << meth.name << ")
";
+<< "::" << meth.name << ", ::emscripten::pure_virtual())
";
 }
 }
 }
 
-rtl::Reference 
resolveBase(rtl::Reference const& manager,
-OUString const& name)
+rtl::Reference
+resolveInterface(rtl::Reference const& manager, OUString const& 
name)
 {
 auto const ent = manager->getManager()->findEntity(name);
 if (!ent.is() || ent->getSort() != unoidl::Entity::SORT_INTERFACE_TYPE)
 {
-throw CannotDumpException("bad interface base \"" + name + "\"");
+throw CannotDumpException("bad interface \"" + name + "\"");
 }
 return static_cast(ent.get());
 }
@@ -695,7 +695,7 @@ rtl::Reference 
resolveBase(rtl::Reference const& manager, OUString 
const& name,
 std::set& visitedBases)
 {
-auto const ent = resolveBase(manager, name);
+auto const ent = resolveInterface(manager, name);
 for (auto const& base : ent->getDirectMandatoryBases())
 {
 if (visitedBases.insert(base.name).second)
@@ -709,7 +709,7 @@ void dumpBase(std::ostream& out, 
rtl::Reference const& manager,
   OUString const& interface, OUString const& name, 
std::set& visitedBases,
   std::list const& baseTrail)
 {
-auto const ent = resolveBase(manager, name);
+auto const ent = resolveInterface(manager, name);
 for (auto const& base : ent->getDirectMandatoryBases())
 {
 if (visitedBases.insert(base.name).second)
@@ -723,6 +723,126 @@ void dumpBase(std::ostream& out, 
rtl::Reference const& manager,
 dumpMethods(out, manager, interface, ent, baseTrail);
 }
 
+void dumpWrapperClassMembers(std::ostream& out, rtl::Reference 
const& manager,
+ OUString const& interface, OUString const& name,
+ std::set& visitedBases)
+{
+auto const ent = resolveInterface(manager, name);
+for (auto const& base : ent->getDirectMandatoryBases())
+{
+if (visitedBases.insert(base.name).second)
+{
+dumpWrapperClassMembers(out, manager, interface, base.name, 
visitedBases);
+}
+}
+for (auto const& attr : 

core.git: Branch 'distro/cib/libreoffice-6-4' - cui/source framework/source officecfg/registry svx/source

2024-04-11 Thread Stephan Bergmann (via logerrit)
 cui/source/dialogs/tipofthedaydlg.cxx  |   17 +++--
 framework/source/uielement/menubarmanager.cxx  |6 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |6 
 svx/source/dialog/crashreportdlg.cxx   |9 ++
 4 files changed, 35 insertions(+), 3 deletions(-)

New commits:
commit 93afc6258d67366d56bbd2f3358658ef390d6bfb
Author: Stephan Bergmann 
AuthorDate: Wed Apr 10 13:30:59 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Fri Apr 12 00:54:03 2024 +0200

New Expert Configuration setting to not offer Safe Mode in the UI

/org.openoffice.Office/Common/Misc/OfferSafeMode (default: true), 
controlling:
* "Help - Restart in Safe Mode..." menu entry
* "Restart LibreOffice to enter safe mode" checkbox in the "Crash Report" 
dialog
* "To start temporarily with a fresh user profile,..." tip of the day

(It does not control the --safe-mode command line argument, though.)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165926
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit fe66cf8c8048bfd8a4386c0c711bd6912af9ec63)
Conflicts:
cui/source/dialogs/tipofthedaydlg.cxx
framework/source/uielement/menubarmanager.cxx
officecfg/registry/schema/org/openoffice/Office/Common.xcs
svx/source/dialog/crashreportdlg.cxx

Change-Id: I66084448a1ba9427aaafef630187b4bf25219a2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165928
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/dialogs/tipofthedaydlg.cxx 
b/cui/source/dialogs/tipofthedaydlg.cxx
index 25722420ddfc..e3fc7e31e1a4 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -72,8 +72,21 @@ static bool file_exists(const OUString& fileName)
 
 void TipOfTheDayDialog::UpdateTip()
 {
-if ((nCurrentTip + 1 > nNumberOfTips) || (nCurrentTip < 0))
-nCurrentTip = 0;
+for (;;)
+{
+if ((nCurrentTip + 1 > nNumberOfTips) || (nCurrentTip < 0))
+nCurrentTip = 0;
+if (std::get<1>(TIPOFTHEDAY_STRINGARRAY[nCurrentTip])
+== "svx/ui/safemodedialog/SafeModeDialog"
+&& !officecfg::Office::Common::Misc::OfferSafeMode::get())
+{
+++nCurrentTip;
+}
+else
+{
+break;
+}
+}
 m_xDialog->set_title(CuiResId(STR_TITLE) + ": " + 
OUString::number(nCurrentTip + 1) + "/"
  + OUString::number(nNumberOfTips));
 
diff --git a/framework/source/uielement/menubarmanager.cxx 
b/framework/source/uielement/menubarmanager.cxx
index f7a41c75f9e3..68df9ce6586d 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -54,6 +54,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1455,6 +1456,11 @@ void MenuBarManager::FillMenu(
 {
 continue;
 }
+if (aCommandURL == ".uno:SafeMode"
+&& !officecfg::Office::Common::Misc::OfferSafeMode::get())
+{
+continue;
+}
 
 if ( nType == css::ui::ItemType::DEFAULT )
 {
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index b47794f128c4..307caf9f2895 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5813,6 +5813,12 @@
   Number of saved searches in the Find and Replace dialog.
 
   
+  
+
+  Offer Safe Mode to the user.
+
+true
+  
 
 
   
diff --git a/svx/source/dialog/crashreportdlg.cxx 
b/svx/source/dialog/crashreportdlg.cxx
index d09fde9b1882..9d3512c56fb7 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -33,8 +34,14 @@ CrashReportDialog::CrashReportDialog(weld::Window* pParent)
 {
 maSuccessMsg = mxEditPostUpload->get_text();
 
+auto const offerSafeMode = 
officecfg::Office::Common::Misc::OfferSafeMode::get();
+mxCBSafeMode->set_visible(offerSafeMode);
+
 auto nWidth = mxEditPreUpload->get_preferred_size().Width();
-nWidth = std::max(nWidth, mxCBSafeMode->get_size_request().Width());
+if (offerSafeMode)
+{
+nWidth = std::max(nWidth, mxCBSafeMode->get_size_request().Width());
+}
 mxEditPreUpload->set_size_request(nWidth, -1);
 mxCBSafeMode->set_size_request(nWidth, -1);
 


core.git: offapi/org offapi/UnoApi_offapi.mk udkapi/org udkapi/UnoApi_udkapi.mk unotest/Library_embindtest.mk

2024-04-11 Thread Stephan Bergmann (via logerrit)
 offapi/UnoApi_offapi.mk   |   13 +
 udkapi/UnoApi_udkapi.mk   |   13 -
 unotest/Library_embindtest.mk |4 +---
 3 files changed, 14 insertions(+), 16 deletions(-)

New commits:
commit febd03e31b2e45f2c4ad3277939a1316fcf1cc79
Author: Stephan Bergmann 
AuthorDate: Thu Apr 11 10:52:12 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 11 15:22:40 2024 +0200

Move org.libreoffice.embindtest from udkapi to offapi

...so it will be able to use e.g. css.task.XJob in its tests

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

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 0ef13a1f7372..8e93cd59389f 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -4438,6 +4438,19 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_nohdl,offapi,org/freedesktop/PackageKit,\
 SyncDbusSessionHelper \
 ))
 
+ifeq ($(OS)-$(ENABLE_DBGUTIL),EMSCRIPTEN-TRUE)
+$(eval $(call gb_UnoApi_add_idlfiles,offapi,org/libreoffice/embindtest, \
+Constants \
+Enum \
+Exception \
+Struct \
+XTest \
+))
+$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,org/libreoffice/embindtest, \
+Test \
+))
+endif
+
 $(eval $(call gb_UnoApi_set_reference_rdbfile,offapi,$(call 
gb_UnoApiTarget_get_target,udkapi) $(SRCDIR)/offapi/type_reference/offapi.idl))
 
 # vim: set noet sw=4 ts=4:
diff --git a/udkapi/org/libreoffice/embindtest/Constants.idl 
b/offapi/org/libreoffice/embindtest/Constants.idl
similarity index 100%
rename from udkapi/org/libreoffice/embindtest/Constants.idl
rename to offapi/org/libreoffice/embindtest/Constants.idl
diff --git a/udkapi/org/libreoffice/embindtest/Enum.idl 
b/offapi/org/libreoffice/embindtest/Enum.idl
similarity index 100%
rename from udkapi/org/libreoffice/embindtest/Enum.idl
rename to offapi/org/libreoffice/embindtest/Enum.idl
diff --git a/udkapi/org/libreoffice/embindtest/Exception.idl 
b/offapi/org/libreoffice/embindtest/Exception.idl
similarity index 100%
rename from udkapi/org/libreoffice/embindtest/Exception.idl
rename to offapi/org/libreoffice/embindtest/Exception.idl
diff --git a/udkapi/org/libreoffice/embindtest/Struct.idl 
b/offapi/org/libreoffice/embindtest/Struct.idl
similarity index 100%
rename from udkapi/org/libreoffice/embindtest/Struct.idl
rename to offapi/org/libreoffice/embindtest/Struct.idl
diff --git a/udkapi/org/libreoffice/embindtest/Test.idl 
b/offapi/org/libreoffice/embindtest/Test.idl
similarity index 100%
rename from udkapi/org/libreoffice/embindtest/Test.idl
rename to offapi/org/libreoffice/embindtest/Test.idl
diff --git a/udkapi/org/libreoffice/embindtest/XTest.idl 
b/offapi/org/libreoffice/embindtest/XTest.idl
similarity index 100%
rename from udkapi/org/libreoffice/embindtest/XTest.idl
rename to offapi/org/libreoffice/embindtest/XTest.idl
diff --git a/udkapi/UnoApi_udkapi.mk b/udkapi/UnoApi_udkapi.mk
index 1e338c807e07..f18b9f758ddc 100644
--- a/udkapi/UnoApi_udkapi.mk
+++ b/udkapi/UnoApi_udkapi.mk
@@ -520,19 +520,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,udkapi,com/sun/star/util,\
XVeto \
 ))
 
-ifeq ($(OS)-$(ENABLE_DBGUTIL),EMSCRIPTEN-TRUE)
-$(eval $(call gb_UnoApi_add_idlfiles,udkapi,org/libreoffice/embindtest, \
-Constants \
-Enum \
-Exception \
-Struct \
-XTest \
-))
-$(eval $(call gb_UnoApi_add_idlfiles_nohdl,udkapi,org/libreoffice/embindtest, \
-Test \
-))
-endif
-
 $(eval $(call 
gb_UnoApi_set_reference_rdbfile,udkapi,$(SRCDIR)/udkapi/type_reference/udkapi.idl))
 
 # vim: set noet sw=4 ts=4:
diff --git a/unotest/Library_embindtest.mk b/unotest/Library_embindtest.mk
index 8f53db5e52d0..b485bcd7ea83 100644
--- a/unotest/Library_embindtest.mk
+++ b/unotest/Library_embindtest.mk
@@ -15,8 +15,6 @@ $(eval $(call gb_Library_add_exception_objects,embindtest, \
 
 $(eval $(call 
gb_Library_set_componentfile,embindtest,unotest/source/embindtest/embindtest,services))
 
-$(eval $(call gb_Library_use_api,embindtest, \
-udkapi \
-))
+$(eval $(call gb_Library_use_sdk_api,embindtest))
 
 # vim: set noet sw=4 ts=4:


core.git: Branch 'libreoffice-24-2' - distro-configs/LibreOfficeFlatpak.conf solenv/flatpak-manifest.in

2024-04-11 Thread Stephan Bergmann (via logerrit)
 distro-configs/LibreOfficeFlatpak.conf |2 +-
 solenv/flatpak-manifest.in |   16 +---
 2 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit aee47bb74a824cffc029ef9173cedff078583205
Author: Stephan Bergmann 
AuthorDate: Wed Apr 10 08:52:21 2024 +0200
Commit: Xisco Fauli 
CommitDate: Thu Apr 11 11:36:38 2024 +0200

Adapt flatpak build to upstream changes



"Merge pull request #288 from
EliasTheGrandMasterOfMistakes/EliasTheGrandMasterOfMistakes-patch-2: Update 
JDK,
GVFS and ANT"

Change-Id: I021ddb9ca6b1fbec6cfe22784a9d023db2fa737c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165920
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 82c17b61e05b9373ab1100f9c72156d655e0a866)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165930
Reviewed-by: Xisco Fauli 

diff --git a/distro-configs/LibreOfficeFlatpak.conf 
b/distro-configs/LibreOfficeFlatpak.conf
index 911184c337eb..ab72dd7ceca1 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -3,7 +3,7 @@
 --with-ant-home=/run/build/libreoffice/ant
 --with-extra-buildid=Flatpak
 --with-help=html
---with-jdk-home=/usr/lib/sdk/openjdk17/jvm/openjdk-17
+--with-jdk-home=/usr/lib/sdk/openjdk21/jvm/openjdk-21
 --with-lang=ALL
 --with-system-libs
 --with-vendor=The Document Foundation
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 74beb39f21b9..e5150ccbc5c8 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -4,7 +4,7 @@
 "runtime-version": "23.08",
 "sdk": "org.freedesktop.Sdk",
 "sdk-extensions": [
-"org.freedesktop.Sdk.Extension.openjdk17"
+"org.freedesktop.Sdk.Extension.openjdk21"
 ],
 "command": "libreoffice",
 "modules": [
@@ -12,7 +12,7 @@
 "name": "openjdk",
 "buildsystem": "simple",
 "build-commands": [
-"/usr/lib/sdk/openjdk17/install.sh"
+"/usr/lib/sdk/openjdk21/install.sh"
 ]
 },
 {
@@ -34,6 +34,7 @@
 "-Dhttp=false",
 "-Dmtp=false",
 "-Dnfs=false",
+"-Donedrive=false",
 "-Dsftp=false",
 "-Dsmb=false",
 "-Dudisks2=false",
@@ -44,13 +45,14 @@
 "-Dgudev=false",
 "-Dkeyring=false",
 "-Dlogind=false",
-"-Dlibusb=false"
+"-Dlibusb=false",
+"-Dwsdd=false"
 ],
 "sources": [
 {
 "type": "archive",
-"url": 
"https://download.gnome.org/sources/gvfs/1.52/gvfs-1.52.2.tar.xz;,
-"sha256": 
"a643aceaa053caac0d8eff9a015f636e4bd1bb09cfe27864e347db67460e7b91",
+"url": 
"https://download.gnome.org/sources/gvfs/1.54/gvfs-1.54.0.tar.xz;,
+"sha256": 
"f53d81df86c2e86cdd25182c2d8a669a22371e83623ded1b9d5416dcfc6de366",
 "x-checker-data": {
 "type": "gnome",
 "name": "gvfs",
@@ -97,8 +99,8 @@
 },
 {
 "type": "archive",
-"url": 
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.13-bin.tar.xz;,
-"sha512": 
"26e56bf670c22c8093fe51ec952fa51e813b1ab4200cb09fcd68fa291c5f6f626d7c6a42b4d3358b38111466e249d4bc6089b8c4093383759d6f8a08d39bc32d",
+"url": 
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.14-bin.tar.bz2;,
+"sha512": 
"05e9f786044b9ba0dcc5e2b40ed2bd4ecfb25896a453ba78e2d4df18896c6be7d1564fd615f483c90c0d26dd1e0fb507c778f0c10712818b1fc8c9acbc0a26c6",
 "dest": "ant"
 },
 {


core.git: connectivity/source

2024-04-11 Thread Stephan Bergmann (via logerrit)
 connectivity/source/drivers/postgresql/pq_connection.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 3f5811a4649b9e43e610afd3ff57c14bd57589d0
Author: Stephan Bergmann 
AuthorDate: Wed Apr 10 21:31:36 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 11 08:18:31 2024 +0200

Silence strange -Warray-bounds with recent GCC 14

...seen at least with some (--enable-dbgutil --enable-optimized etc.)
configuration and a recent GCC 14 trunk,

> In file included from ~/gcc/inst/include/c++/14.0.1/vector:62,
>  from 
connectivity/source/drivers/postgresql/pq_connection.cxx:38:
> In static member function ‘static constexpr _Up* 
std::__copy_move<_IsMove, true, 
std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = long 
unsigned int; _Up = long unsigned int; bool _IsMove = false]’,
> inlined from ‘constexpr _OI std::__copy_move_a2(_II, _II, _OI) [with 
bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_algobase.h:521:30,
> inlined from ‘constexpr _OI std::__copy_move_a1(_II, _II, _OI) [with 
bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_algobase.h:548:42,
> inlined from ‘constexpr _OI std::__copy_move_a(_II, _II, _OI) [with 
bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_algobase.h:555:31,
> inlined from ‘constexpr _OI std::copy(_II, _II, _OI) [with _II = long 
unsigned int*; _OI = long unsigned int*]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_algobase.h:651:7,
> inlined from ‘constexpr std::__cxx1998::vector::iterator std::__cxx1998::vector::_M_copy_aligned(const_iterator, const_iterator, iterator) [with _Alloc 
= std::allocator]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_bvector.h:1342:28,
> inlined from ‘constexpr void std::__cxx1998::vector::_M_reallocate(size_type) [with _Alloc = std::allocator]’ at 
~/gcc/inst/include/c++/14.0.1/bits/vector.tcc:1054:40,
> inlined from ‘constexpr void std::__cxx1998::vector::reserve(size_type) [with _Alloc = std::allocator]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_bvector.h:1130:17,
> inlined from ‘constexpr void std::__debug::vector<_Tp, 
_Allocator>::reserve(size_type) [with _Tp = bool; _Allocator = 
std::allocator]’ at ~/gcc/inst/include/c++/14.0.1/debug/vector:495:16,
> inlined from 
‘pq_sdbc_driver::{anonymous}::cstr_vector::cstr_vector()’ at 
connectivity/source/drivers/postgresql/pq_connection.cxx:338:58:
> ~/gcc/inst/include/c++/14.0.1/bits/stl_algobase.h:452:30: error: ‘void* 
__builtin_memmove(void*, const void*, long unsigned int)’ forming offset 8 is 
out of the bounds [0, 8] [-Werror=array-bounds=]
>   452 | __builtin_memmove(__result, __first, sizeof(_Tp) * 
_Num);
>   | 
~^~~

and

> In file included from ~/gcc/inst/include/c++/14.0.1/vector:62,
>  from 
connectivity/source/drivers/postgresql/pq_connection.cxx:38:
> In static member function ‘static constexpr _Up* 
std::__copy_move<_IsMove, true, 
std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = long 
unsigned int; _Up = long unsigned int; bool _IsMove = false]’,
> inlined from ‘constexpr _OI std::__copy_move_a2(_II, _II, _OI) [with 
bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_algobase.h:521:30,
> inlined from ‘constexpr _OI std::__copy_move_a1(_II, _II, _OI) [with 
bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_algobase.h:548:42,
> inlined from ‘constexpr _OI std::__copy_move_a(_II, _II, _OI) [with 
bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_algobase.h:555:31,
> inlined from ‘constexpr _OI std::copy(_II, _II, _OI) [with _II = long 
unsigned int*; _OI = long unsigned int*]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_algobase.h:651:7,
> inlined from ‘constexpr std::__cxx1998::vector::iterator std::__cxx1998::vector::_M_copy_aligned(const_iterator, const_iterator, iterator) [with _Alloc 
= std::allocator]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_bvector.h:1342:28,
> inlined from ‘constexpr void std::__cxx1998::vector::_M_reallocate(size_type) [with _Alloc = std::allocator]’ at 
~/gcc/inst/include/c++/14.0.1/bits/vector.tcc:1054:40,
> inlined from ‘constexpr void std::__cxx1998::vector::reserve(size_type) [with _Alloc = std::allocator]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_bvector.h:1130:17,
> inlined from ‘constexpr void std::__debug::vector<_Tp, 
_Allocator>::reserve(size_type) [with _Tp 

core.git: Branch 'feature/cib_contract49' - download.lst external/rhino scripting/Jar_ScriptProviderForJavaScript.mk scripting/java

2024-04-10 Thread Stephan Bergmann (via logerrit)
 download.lst   
   |4 
 external/rhino/ExternalPackage_rhino.mk
   |2 
 external/rhino/ExternalProject_rhino.mk
   |   36 
 external/rhino/OfficeScriptInfo.java   
   |  118 -
 external/rhino/UnpackedTarball_rhino.mk
   |   11 
 external/rhino/filelist.txt
   |  330 +++
 external/rhino/rhino-classpath.patch.1 
   |   13 
 external/rhino/rhino1_5R5-find_swing.patch 
   |   16 
 external/rhino/rhino1_5R5-updateToolTip.patch  
   |   23 
 external/rhino/rhino1_5R5.patch
   | 1067 --
 scripting/Jar_ScriptProviderForJavaScript.mk   
   |6 
 
scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
   |  319 --
 
scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
 |   59 
 scripting/java/com/sun/star/script/framework/provider/javascript/template.js   
   |   54 
 14 files changed, 363 insertions(+), 1695 deletions(-)

New commits:
commit ca58bbd4964c71792dd75a3fdec92dca71e2f14d
Author: Stephan Bergmann 
AuthorDate: Fri Mar 22 15:53:49 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Apr 11 07:32:19 2024 +0200

Update to latest Rhino 1.7.14

...at the expense of losing, at least for now, the script editor for it 
(which
had been hacked into the old upstream sources in a hard-to-maintain way).

rhino-1.7.14.zip is taken from

.
Building it would now use Gradle, but instead just hack together an 
invocation
of javac and jar in external/rhino/ExternalProject_rhino.mk that effectively
generates the same jar as the upstream-built jar available at

.

All the various patches are no longer necessary:
* external/rhino/rhino1_5R5.patch and external/rhino/OfficeScriptInfo.java 
were
  mostly for the hacked-in script editor, which has been abandoned at least 
for
  now (see above).
* external/rhino/rhino1_5R5-find_swing.patch (originally from
  0a7f9346503a557f583bced269655fa1996550af "ause109: #i106296# make 
build.xml
  aware of TARFILE_LOCATION") appears to be obsolete.
* external/rhino/rhino1_5R5-updateToolTip.patch is covered by
  

  "Fix bug 414869: Rhino debugger fails to launch due to updates in mac os x
  leopard".
* external/rhino/rhino-classpath.patch.1 from
  bb58293296f843654045d7b0eba6899d11533a4a "rhino: unbreak build on Fedora 
34"
  was only relevant when building with Ant.

Change-Id: I5fca5915d785716f7aaf313ff2469a20f55f707a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165416
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/download.lst b/download.lst
index 21c6aa046ffb..b2af90eb35bc 100644
--- a/download.lst
+++ b/download.lst
@@ -501,8 +501,8 @@ REVENGE_TARBALL := 
librevenge-0.0.$(REVENGE_VERSION_MICRO).tar.bz2
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-RHINO_SHA256SUM := 
1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753
-RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+RHINO_SHA256SUM := 
bf4d2d0c5ff8889fd494486db09291cb7965f0bf2f93ef005d3b08070a5a4f5c
+RHINO_TARBALL := rhino-1.7.14.zip
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/rhino/ExternalPackage_rhino.mk 
b/external/rhino/ExternalPackage_rhino.mk
index 0ee1d60e309d..faac15c6978e 100644
--- a/external/rhino/ExternalPackage_rhino.mk
+++ b/external/rhino/ExternalPackage_rhino.mk
@@ -11,6 +11,6 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,rhino,rhino))
 
 $(eval $(call gb_ExternalPackage_use_external_project,rhino,rhino))
 
-$(eval $(call 
gb_ExternalPackage_add_file,rhino,$(LIBO_SHARE_JAVA_FOLDER)/js.jar,build/rhino1_5R5/js.jar))
+$(eval $(call 
gb_ExternalPackage_add_file,rhino,$(LIBO_SHARE_JAVA_FOLDER)/js.jar,build/js.jar))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/rhino/ExternalProject_rhino.mk 
b/external/rhino/ExternalProject_rhino.mk
index 6ef30ca34f24..3df0aaa4e2d9 100644
--- a/external/rhino/ExternalProject_rhino.mk
+++ 

core.git: cui/source framework/source officecfg/registry svx/source

2024-04-10 Thread Stephan Bergmann (via logerrit)
 cui/source/dialogs/tipofthedaydlg.cxx  |   17 +++--
 framework/source/uielement/menubarmanager.cxx  |5 +++
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |6 
 svx/source/dialog/crashreportdlg.cxx   |8 +-
 4 files changed, 33 insertions(+), 3 deletions(-)

New commits:
commit fe66cf8c8048bfd8a4386c0c711bd6912af9ec63
Author: Stephan Bergmann 
AuthorDate: Wed Apr 10 13:30:59 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Apr 10 14:54:41 2024 +0200

New Expert Configuration setting to not offer Safe Mode in the UI

/org.openoffice.Office/Common/Misc/OfferSafeMode (default: true), 
controlling:
* "Help - Restart in Safe Mode..." menu entry
* "Restart LibreOffice to enter safe mode" checkbox in the "Crash Report" 
dialog
* "To start temporarily with a fresh user profile,..." tip of the day

(It does not control the --safe-mode command line argument, though.)

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

diff --git a/cui/source/dialogs/tipofthedaydlg.cxx 
b/cui/source/dialogs/tipofthedaydlg.cxx
index bbb26a054be9..40bb606130f2 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -121,8 +121,21 @@ void TipOfTheDayDialog::UpdateTip()
 {
 constexpr sal_Int32 nNumberOfTips = std::size(TIPOFTHEDAY_STRINGARRAY);
 
-if ((m_nCurrentTip >= nNumberOfTips) || (m_nCurrentTip < 0))
-m_nCurrentTip = 0;
+for (;;)
+{
+if ((m_nCurrentTip >= nNumberOfTips) || (m_nCurrentTip < 0))
+m_nCurrentTip = 0;
+if (std::get<1>(TIPOFTHEDAY_STRINGARRAY[m_nCurrentTip])
+== "svx/ui/safemodedialog/SafeModeDialog"
+&& !officecfg::Office::Common::Misc::OfferSafeMode::get())
+{
+++m_nCurrentTip;
+}
+else
+{
+break;
+}
+}
 
 //title
 m_xDialog->set_title(CuiResId(STR_TITLE)
diff --git a/framework/source/uielement/menubarmanager.cxx 
b/framework/source/uielement/menubarmanager.cxx
index 8194cfc8e25f..95e17053d3fb 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1343,6 +1343,11 @@ void MenuBarManager::FillMenu(
 {
 continue;
 }
+if (aCommandURL == ".uno:SafeMode"
+&& !officecfg::Office::Common::Misc::OfferSafeMode::get())
+{
+continue;
+}
 
 if ( nType == css::ui::ItemType::DEFAULT )
 {
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index e43a6ac23765..15b3a481195c 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5583,6 +5583,12 @@
 
 true
   
+  
+
+  Offer Safe Mode to the user.
+
+true
+  
 
 
   
diff --git a/svx/source/dialog/crashreportdlg.cxx 
b/svx/source/dialog/crashreportdlg.cxx
index aad28436eea3..82ecf8beda5a 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -40,8 +40,14 @@ CrashReportDialog::CrashReportDialog(weld::Window* pParent)
 {
 maLinkTemplate = mxLinkButton->get_uri();
 
+auto const offerSafeMode = 
officecfg::Office::Common::Misc::OfferSafeMode::get();
+mxCBSafeMode->set_visible(offerSafeMode);
+
 auto nWidth = mxEditPreUpload->get_preferred_size().Width();
-nWidth = std::max(nWidth, mxCBSafeMode->get_size_request().Width());
+if (offerSafeMode)
+{
+nWidth = std::max(nWidth, mxCBSafeMode->get_size_request().Width());
+}
 mxEditPreUpload->set_size_request(nWidth, -1);
 mxCBSafeMode->set_size_request(nWidth, -1);
 


core.git: distro-configs/LibreOfficeFlatpak.conf solenv/flatpak-manifest.in

2024-04-10 Thread Stephan Bergmann (via logerrit)
 distro-configs/LibreOfficeFlatpak.conf |2 +-
 solenv/flatpak-manifest.in |   16 +---
 2 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 8559e6b5a5ac7f7400ae44adddbff5e3185414c6
Author: Stephan Bergmann 
AuthorDate: Wed Apr 10 08:52:21 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Apr 10 12:05:32 2024 +0200

Adapt flatpak build to upstream changes



"Merge pull request #288 from
EliasTheGrandMasterOfMistakes/EliasTheGrandMasterOfMistakes-patch-2: Update 
JDK,
GVFS and ANT"

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

diff --git a/distro-configs/LibreOfficeFlatpak.conf 
b/distro-configs/LibreOfficeFlatpak.conf
index 911184c337eb..ab72dd7ceca1 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -3,7 +3,7 @@
 --with-ant-home=/run/build/libreoffice/ant
 --with-extra-buildid=Flatpak
 --with-help=html
---with-jdk-home=/usr/lib/sdk/openjdk17/jvm/openjdk-17
+--with-jdk-home=/usr/lib/sdk/openjdk21/jvm/openjdk-21
 --with-lang=ALL
 --with-system-libs
 --with-vendor=The Document Foundation
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 1ba678b81d12..6866cad5c5ce 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -4,7 +4,7 @@
 "runtime-version": "23.08",
 "sdk": "org.freedesktop.Sdk",
 "sdk-extensions": [
-"org.freedesktop.Sdk.Extension.openjdk17"
+"org.freedesktop.Sdk.Extension.openjdk21"
 ],
 "command": "libreoffice",
 "modules": [
@@ -12,7 +12,7 @@
 "name": "openjdk",
 "buildsystem": "simple",
 "build-commands": [
-"/usr/lib/sdk/openjdk17/install.sh"
+"/usr/lib/sdk/openjdk21/install.sh"
 ]
 },
 {
@@ -34,6 +34,7 @@
 "-Dhttp=false",
 "-Dmtp=false",
 "-Dnfs=false",
+"-Donedrive=false",
 "-Dsftp=false",
 "-Dsmb=false",
 "-Dudisks2=false",
@@ -44,13 +45,14 @@
 "-Dgudev=false",
 "-Dkeyring=false",
 "-Dlogind=false",
-"-Dlibusb=false"
+"-Dlibusb=false",
+"-Dwsdd=false"
 ],
 "sources": [
 {
 "type": "archive",
-"url": 
"https://download.gnome.org/sources/gvfs/1.52/gvfs-1.52.2.tar.xz;,
-"sha256": 
"a643aceaa053caac0d8eff9a015f636e4bd1bb09cfe27864e347db67460e7b91",
+"url": 
"https://download.gnome.org/sources/gvfs/1.54/gvfs-1.54.0.tar.xz;,
+"sha256": 
"f53d81df86c2e86cdd25182c2d8a669a22371e83623ded1b9d5416dcfc6de366",
 "x-checker-data": {
 "type": "gnome",
 "name": "gvfs",
@@ -97,8 +99,8 @@
 },
 {
 "type": "archive",
-"url": 
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.13-bin.tar.xz;,
-"sha512": 
"26e56bf670c22c8093fe51ec952fa51e813b1ab4200cb09fcd68fa291c5f6f626d7c6a42b4d3358b38111466e249d4bc6089b8c4093383759d6f8a08d39bc32d",
+"url": 
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.14-bin.tar.bz2;,
+"sha512": 
"05e9f786044b9ba0dcc5e2b40ed2bd4ecfb25896a453ba78e2d4df18896c6be7d1564fd615f483c90c0d26dd1e0fb507c778f0c10712818b1fc8c9acbc0a26c6",
 "dest": "ant"
 },
 {


core.git: configure.ac

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

New commits:
commit 42f6e89d5e6458966de452af2978f206115394af
Author: Stephan Bergmann 
AuthorDate: Tue Apr 9 10:37:09 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Apr 9 23:40:49 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 clang::ParseAST(clang::Sema&, bool, bool) 
(/home/builder/lode/opt_private/clang-llvmorg-12.0.1/bin/clang+0x368e549)
> #15 0x55f3a91ef2d9 

core.git: unotest/source

2024-04-08 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.js |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit c16f7ca43bb338f23895733ee499505ee6a6e72e
Author: Stephan Bergmann 
AuthorDate: Mon Apr 8 15:15:33 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Apr 8 21:16:23 2024 +0200

Fix indentation

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

diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 410b3886be6d..8c0ee0138828 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -539,11 +539,11 @@ Module.addOnPostRun(function() {
 
console.assert(test.isDouble(uno.org.libreoffice.embindtest.Constants.Double));
 try {
 test.throwRuntimeException();
-   } catch (e) {
-   console.assert(e.name === 'com::sun::star::uno::RuntimeException');
-   console.assert(e.message === undefined); //TODO
-   //TODO: console.assert(e.Message.startsWith('test'));
-   }
+} catch (e) {
+console.assert(e.name === 'com::sun::star::uno::RuntimeException');
+console.assert(e.message === undefined); //TODO
+//TODO: console.assert(e.Message.startsWith('test'));
+}
 });
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


core.git: udkapi/org unotest/source

2024-04-08 Thread Stephan Bergmann (via logerrit)
 udkapi/org/libreoffice/embindtest/XTest.idl |1 +
 unotest/source/embindtest/embindtest.cxx|6 ++
 unotest/source/embindtest/embindtest.js |7 +++
 3 files changed, 14 insertions(+)

New commits:
commit 74b48a8f6e6c861ee791107c9cacd7a9f6b84904
Author: Stephan Bergmann 
AuthorDate: Mon Apr 8 11:34:05 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Apr 8 12:59:00 2024 +0200

Embind: Clarify poor UNO exception support

As UNO exceptions are not derived from std::exception in C++, the 
corresponding
JS object's name property is present but has undefined value.  And the UNO
Message property is not present at all.

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

diff --git a/udkapi/org/libreoffice/embindtest/XTest.idl 
b/udkapi/org/libreoffice/embindtest/XTest.idl
index 45042663cf47..b3b5237ce2b4 100644
--- a/udkapi/org/libreoffice/embindtest/XTest.idl
+++ b/udkapi/org/libreoffice/embindtest/XTest.idl
@@ -112,6 +112,7 @@ interface XTest {
 boolean isSequenceEnum([in] sequence value);
 sequence getSequenceStruct();
 boolean isSequenceStruct([in] sequence value);
+void throwRuntimeException();
 };
 
 }; }; };
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index d437f3907e3a..39ba4c839dae 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -496,6 +497,11 @@ class Test : public 
cppu::WeakImplHelper
   { 123456, 100.75, u"bazzz"_ustr }
   };
 }
+
+void SAL_CALL throwRuntimeException() override
+{
+throw css::uno::RuntimeException(u"test"_ustr);
+}
 };
 }
 
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 1b0cf8eb5fc6..410b3886be6d 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -537,6 +537,13 @@ Module.addOnPostRun(function() {
 
console.assert(test.isFloat(uno.org.libreoffice.embindtest.Constants.Float));
 console.assert(uno.org.libreoffice.embindtest.Constants.Double === 100.5);
 
console.assert(test.isDouble(uno.org.libreoffice.embindtest.Constants.Double));
+try {
+test.throwRuntimeException();
+   } catch (e) {
+   console.assert(e.name === 'com::sun::star::uno::RuntimeException');
+   console.assert(e.message === undefined); //TODO
+   //TODO: console.assert(e.Message.startsWith('test'));
+   }
 });
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


core.git: compilerplugins/clang

2024-04-08 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/unusedmember.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit fd7caefaacd91a16fce10b4e4fbfe6ef4f5ffce9
Author: Stephan Bergmann 
AuthorDate: Mon Apr 8 08:07:16 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Apr 8 10:48:45 2024 +0200

-Werror,-Wunused-but-set-variable

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

diff --git a/compilerplugins/clang/unusedmember.cxx 
b/compilerplugins/clang/unusedmember.cxx
index 9cf40d721259..305f9c606d31 100644
--- a/compilerplugins/clang/unusedmember.cxx
+++ b/compilerplugins/clang/unusedmember.cxx
@@ -126,6 +126,8 @@ public:
 {
 #if 0 //TODO: friend function definitions are not marked as referenced even if 
used?
 if (!d3->isThisDeclarationADefinition()) //TODO: do this 
check for all kinds?
+#else
+(void)d3;
 #endif
 {
 continue;


core.git: compilerplugins/clang

2024-04-08 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/stringconstant.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f1697d2b1e6b3ac63946070cc720234dc68efbe9
Author: Stephan Bergmann 
AuthorDate: Mon Apr 8 08:05:17 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Apr 8 09:50:46 2024 +0200

-Werror,-Wunused-but-set-variable

...ever since the code got introduced in
4f5b3e4bd53d6d61df1f65f496f7bc8dc525c8a1 "In O[U]StringBuffer, make 
string_view
params replacements for OUString ones"

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

diff --git a/compilerplugins/clang/stringconstant.cxx 
b/compilerplugins/clang/stringconstant.cxx
index 134be1940b82..344125dd4df0 100644
--- a/compilerplugins/clang/stringconstant.cxx
+++ b/compilerplugins/clang/stringconstant.cxx
@@ -96,7 +96,7 @@ CXXConstructExpr const * lookForCXXConstructExpr(Expr const * 
expr) {
 }
 if (auto const e = dyn_cast(expr)) {
 // Look through OString::operator std::string_view:
-if (auto const d = 
dyn_cast_or_null(e->getCalleeDecl())) {
+if (isa_and_nonnull(e->getCalleeDecl())) {
 return 
lookForCXXConstructExpr(e->getImplicitObjectArgument()->IgnoreParenImpCasts());
 }
 }


core.git: sw/source

2024-04-08 Thread Stephan Bergmann (via logerrit)
 sw/source/core/docnode/node2lay.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a57ade9be3aa03634933e767eab5e8fb640760ca
Author: Stephan Bergmann 
AuthorDate: Mon Apr 8 07:52:38 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Apr 8 09:50:20 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 

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(, ))
+if (GoPreviousWithFrame(, ))
 {
 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(), , ))
+if (GoNextWithFrame(idx.GetNodes(), , ))
 {
 if (::CheckNodesRange(rNode, idx.GetNode(), true))
 {


core.git: compilerplugins/clang

2024-04-08 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/getstr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6202211a09175e914298f93be8ee17260d8a5bf3
Author: Stephan Bergmann 
AuthorDate: Mon Apr 8 07:56:32 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Apr 8 09:49:53 2024 +0200

-Werror,-Wunused-but-set-variable

...ever since the code got introduced in
77d083f2cbe496274cdab38a3a34497d1b742d86 "New loplugin:getstr"

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

diff --git a/compilerplugins/clang/getstr.cxx b/compilerplugins/clang/getstr.cxx
index 671699e73551..97276591e19e 100644
--- a/compilerplugins/clang/getstr.cxx
+++ b/compilerplugins/clang/getstr.cxx
@@ -81,7 +81,7 @@ public:
 return true;
 }
 bool castToVoid = false;
-if (auto const ic = dyn_cast(arg1))
+if (isa(arg1))
 {
 if (loplugin::TypeCheck(arg1->getType()).Pointer().Void())
 {


core.git: download.lst external/boost

2024-04-07 Thread Stephan Bergmann (via logerrit)
 download.lst   
  |4 
 
external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2
 |   27 
 external/boost/UnpackedTarball_boost.mk
  |6 
 external/boost/Wundef.patch.0  
  |   55 
 external/boost/boost.between.warning.patch 
  |   22 +--
 external/boost/boost.noiconv.patch 
  |   66 +-
 external/boost/windows-no-utf8-locales.patch.0 
  |   28 +---
 7 files changed, 111 insertions(+), 97 deletions(-)

New commits:
commit f65d7265c63778ebf630b9d909617d064dce529e
Author: Stephan Bergmann 
AuthorDate: Thu Dec 21 20:39:17 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Apr 7 18:11:24 2024 +0200

Upgrade external/boost to latest Boost 1.84.0

 has been 
generated (on
Fedora 39) with

> $ wget 
https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.bz2
> $ printf 
'cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454 
boost_1_84_0.tar.bz2' | sha256sum -c # cf. 

> boost_1_84_0.tar.bz2: OK
> $ external/boost/repack_tarball.sh boost_1_84_0.tar.bz2
> Unpacking boost_1_84_0.tar.bz2 ...
> Removing unnecessary files ...
> Creating boost_1_84_0.tar.xz ...
> Cleaning up ...
> fd4a2ee785ea0e4efc5221a4284e0cf51096e8409871fb70fdaced002eeffc0b  
boost_1_84_0.tar.xz
> Done.

* 
external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2
  was obsoleted by
  

  "avoid ODR by making this const".

* The modified external/boost/windows-no-utf8-locales.patch.0, whose 
original
  version no longer applied as-is, should hopefully still mitigate the issue
  described in 072a25e1ef4815bbef4f18f59f025862a0d8e876 "tdf#157135 
workaround:
  restore and update windows-no-utf8-locales.patch.0".

* external/boost/Wundef.patch.0 is needed to silence

> In file included from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/throw_exception.hpp:24,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/serialize_tracked_address.hpp:16,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/fca.hpp:117,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/implementation.hpp:17,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/map.hpp:7,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/unordered_map.hpp:17,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered_map.hpp:17,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/external/boost/include/boost/unordered_map.hpp:30,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/configmgr/source/modifications.hxx:28,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/configmgr/source/data.hxx:34,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/configmgr/source/groupnode.cxx:26:
> 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/type_traits.hpp:51:22:
 error: "BOOST_LIBSTDCXX_VERSION_WORKAROUND_GUARD" is not defined, evaluates to 
0 [-Werror=undef]
>51 | #if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 5)
>   |  ^~~
> 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/config/workaround.hpp:272:10:
 note: in definition of macro ‘BOOST_WORKAROUND’
>   272 |((symbol ## _WORKAROUND_GUARD + 0 == 0) && \
>   |  ^~
> 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/type_traits.hpp:64:22:
 error: "BOOST_LIBSTDCXX_VERSION_WORKAROUND_GUARD" is not defined, evaluates to 
0 

core.git: xmloff/source

2024-04-05 Thread Stephan Bergmann (via logerrit)
 xmloff/source/text/txtflde.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 86842d70e983913002ca0faf35c7288983007a12
Author: Stephan Bergmann 
AuthorDate: Fri Apr 5 16:48:03 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 5 22:44:48 2024 +0200

Silence strange -Wmaybe-uninitialized with recent GCC 14

...seen at least with some (--enable-dbgutil --enable-otpimized etc.)
configuration and a recent GCC 14 trunk,

> In file included from ~/gcc/inst/include/c++/14.0.1/map:62,
>  from xmloff/inc/txtflde.hxx:32,
>  from xmloff/source/text/txtflde.cxx:26:
> In member function ‘std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, 
_KeyOfValue, _Compare, _Alloc>::_M_mbegin() const [with _Key = 
com::sun::star::uno::Reference; _Val = 
std::pair, 
std::__debug::set >; _KeyOfValue = 
std::_Select1st, 
std::__debug::set > >; _Compare = 
std::less >; _Alloc 
= std::allocator, 
std::__debug::set > >]’,
> inlined from ‘std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, 
_KeyOfValue, _Compare, _Alloc>::_M_begin() [with _Key = 
com::sun::star::uno::Reference; _Val = 
std::pair, 
std::__debug::set >; _KeyOfValue = 
std::_Select1st, 
std::__debug::set > >; _Compare = 
std::less >; _Alloc 
= std::allocator, 
std::__debug::set > >]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_tree.h:737:25,
> inlined from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, 
_Alloc>::~_Rb_tree() [with _Key = 
com::sun::star::uno::Reference; _Val = 
std::pair, 
std::__debug::set >; _KeyOfValue = 
std::_Select1st, 
std::__debug::set > >; _Compare = 
std::less >; _Alloc 
= std::allocator, 
std::__debug::set > >]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_tree.h:982:17,
> inlined from ‘std::__cxx1998::map<_Key, _Tp, _Compare, 
_Alloc>::~map() [with _Key = 
com::sun::star::uno::Reference; _Tp = 
std::__debug::set; _Compare = 
std::less >; _Alloc 
= std::allocator, 
std::__debug::set > >]’ at 
~/gcc/inst/include/c++/14.0.1/bits/stl_map.h:314:7,
> inlined from ‘std::__debug::map<_Key, _Tp, _Cmp, _Allocator>::~map() 
[with _Key = com::sun::star::uno::Reference; _Tp = 
std::__debug::set; _Compare = 
std::less >; 
_Allocator = std::allocator, 
std::__debug::set > >]’ at 
~/gcc/inst/include/c++/14.0.1/debug/map.h:136:7,
> inlined from ‘constexpr void 
std::_Optional_payload_base<_Tp>::_M_destroy() [with _Tp = 
std::__debug::map, 
std::__debug::set >]’ at 
~/gcc/inst/include/c++/14.0.1/optional:283:35,
> inlined from ‘constexpr void 
std::_Optional_payload_base<_Tp>::_M_reset() [with _Tp = 
std::__debug::map, 
std::__debug::set >]’ at 
~/gcc/inst/include/c++/14.0.1/optional:314:14,
> inlined from ‘constexpr void std::_Optional_base_impl<_Tp, 
_Dp>::_M_reset() [with _Tp = 
std::__debug::map, 
std::__debug::set >; _Dp = 
std::_Optional_base,
 std::__debug::set >, false, false>]’ at 
~/gcc/inst/include/c++/14.0.1/optional:466:53,
> inlined from ‘constexpr 
std::enable_if_t<((bool)is_constructible_v<_Tp, _Args ...>), _Tp&> 
std::optional<_Tp>::emplace(_Args&& ...) [with _Args = {}; _Tp = 
std::__debug::map, 
std::__debug::set >]’ at 
~/gcc/inst/include/c++/14.0.1/optional:915:18,
> inlined from ‘void 
XMLTextFieldExport::SetExportOnlyUsedFieldDeclarations(bool)’ at 
xmloff/source/text/txtflde.cxx:2250:30:
> ~/gcc/inst/include/c++/14.0.1/bits/stl_tree.h:733:73: error: ‘*(const 
std::_Rb_tree, 
std::pair, 
std::__debug::set, 
std::allocator > >, std::_Select1st, 
std::__debug::set, 
std::allocator > > >, 
std::less >, 
std::allocator, 
std::__debug::set, 
std::allocator > > > >*)((char*)this + 
32).std::_Rb_tree, 
std::pair, 
std::__debug::set >, std::_Select1st
 , 
std::__debug::set > >, 
std::less >, 
std::allocator, 
std::__debug::set > > 
>::_M_impl.std::_Rb_tree,
 std::pair, 
std::__debug::set >, std::_Select1st, 
std::__debug::set > >, 
std::less >, 
std::allocator, 
std::__debug::set > > 
>::_Rb_tree_impl
 >, true>::std::_Rb_tree_header.std::_Rb_tree_header::_M_head
 er.std::_Rb_tree_node_base::_M_parent’ may be used uninitialized 
[-Werror=maybe-uninitialized]
>   733 |   { return 
static_cast<_Link_type>(this->_M_impl._M_header._M_parent); }
>   |   
  ^

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

diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index c90c3e8fb479..f517bf3595d7 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -2247,7 +2247,14 @@ void 
XMLTextFieldExport::SetExportOnlyUsedFieldDeclarations(
 
 // create used masters set (if none is used)
 if (bExportOnlyUsed)
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 14
+#pragma GCC diagnostic push
+#pragma GCC 

core.git: 2 commits - linguistic/source vcl/source

2024-04-05 Thread Stephan Bergmann (via logerrit)
 linguistic/source/lngsvcmgr.cxx  |7 +++
 vcl/source/filter/png/PngImageReader.cxx |7 +++
 2 files changed, 14 insertions(+)

New commits:
commit 745ba22017fde53b50f38a1db5c3eaa388003871
Author: Stephan Bergmann 
AuthorDate: Fri Apr 5 16:43:08 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 5 20:06:08 2024 +0200

Silence strange -Wmaybe-uninitialized with recent GCC 14

...seen at least with some (--enable-dbgutil --enable-otpimized etc.)
configuration and a recent GCC 14 trunk,

> In file included from ~/gcc/inst/include/c++/14.0.1/vector:66,
>  from include/unotools/options.hxx:26,
>  from include/unotools/lingucfg.hxx:27,
>  from linguistic/source/lngsvcmgr.cxx:35:
> In destructor ‘constexpr std::__cxx1998::vector< 
,  >::~vector() [with _Tp = 
SvcInfo; _Alloc = std::allocator]’,
> inlined from ‘constexpr std::__debug::vector<_Tp, 
_Allocator>::~vector() [with _Tp = SvcInfo; _Allocator = 
std::allocator]’ at ~/gcc/inst/include/c++/14.0.1/debug/vector:245:7,
> inlined from ‘constexpr void 
std::_Optional_payload_base<_Tp>::_M_destroy() [with _Tp = 
std::__debug::vector]’ at 
~/gcc/inst/include/c++/14.0.1/optional:283:35,
> inlined from ‘constexpr void 
std::_Optional_payload_base<_Tp>::_M_reset() [with _Tp = 
std::__debug::vector]’ at 
~/gcc/inst/include/c++/14.0.1/optional:314:14,
> inlined from ‘constexpr std::_Optional_payload<_Tp, false, _Copy, 
_Move>::~_Optional_payload() [with _Tp = std::__debug::vector; bool 
_Copy = false; bool _Move = false]’ at 
~/gcc/inst/include/c++/14.0.1/optional:437:65,
> inlined from ‘constexpr 
std::_Optional_base, false, 
false>::~_Optional_base()’ at ~/gcc/inst/include/c++/14.0.1/optional:508:12,
> inlined from ‘constexpr std::optional 
>::~optional()’ at ~/gcc/inst/include/c++/14.0.1/optional:703:11,
> inlined from ‘LngSvcMgr::~LngSvcMgr()’ at 
linguistic/source/lngsvcmgr.cxx:519:1:
> ~/gcc/inst/include/c++/14.0.1/bits/stl_vector.h:735:22: error: 
‘((std::__cxx1998::vector >*)((char*)this + 
16))[22].std::__cxx1998::vector 
>::std::__cxx1998::_Vector_base 
>.std::__cxx1998::_Vector_base 
>::_M_impl.std::__cxx1998::_Vector_base 
>::_Vector_impl::std::__cxx1998::_Vector_base 
>::_Vector_impl_data.std::__cxx1998::_Vector_base >::_Vector_impl_data::_M_finish’ may be used 
uninitialized [-Werror=maybe-uninitialized]
>   735 | std::_Destroy(this->_M_impl._M_start, 
this->_M_impl._M_finish,
>   | 
~^
>   736 |   _M_get_Tp_allocator());
>   |   ~~
> ~/gcc/inst/include/c++/14.0.1/bits/stl_vector.h:735:22: error: 
‘((std::__cxx1998::vector >*)((char*)this + 
16))[22].std::__cxx1998::vector 
>::std::__cxx1998::_Vector_base 
>.std::__cxx1998::_Vector_base 
>::_M_impl.std::__cxx1998::_Vector_base 
>::_Vector_impl::std::__cxx1998::_Vector_base 
>::_Vector_impl_data.std::__cxx1998::_Vector_base >::_Vector_impl_data::_M_start’ may be used 
uninitialized [-Werror=maybe-uninitialized]

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

diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 8ab2efd46ad9..bb503360fbdf 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -504,6 +504,10 @@ void LngSvcMgr::disposing(const lang::EventObject&)
 stopListening();
 }
 
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 14
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
 LngSvcMgr::~LngSvcMgr()
 {
 stopListening();
@@ -517,6 +521,9 @@ LngSvcMgr::~LngSvcMgr()
 pAvailHyphSvcs.reset();
 pAvailThesSvcs.reset();
 }
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 14
+#pragma GCC diagnostic pop
+#endif
 
 namespace
 {
commit 2bcd9fe0fa10339294e6ab820498fa18334e02f3
Author: Stephan Bergmann 
AuthorDate: Fri Apr 5 16:55:28 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 5 20:05:58 2024 +0200

Silence strange -Wclobbered with recent GCC 14

...seen at least with some (--enable-dbgutil --enable-otpimized etc.)
configuration and a recent GCC 14 trunk,

> vcl/source/filter/png/PngImageReader.cxx: In function ‘bool 
{anonymous}::reader(SvStream&, Graphic&, GraphicFilterImportFlags, 
BitmapScopedWriteAccess*, BitmapScopedWriteAccess*)’:
> vcl/source/filter/png/PngImageReader.cxx:361:16: error: variable 
‘bSupportsBitmap32’ might be clobbered by ‘longjmp’ or ‘vfork’ 
[-Werror=clobbered]
>   361 | const bool bSupportsBitmap32 = bFuzzing || 
ImplGetSVData()->mpDefInst->supportsBitmap32();
>   |^


core.git: xmlsecurity/source

2024-04-04 Thread Stephan Bergmann (via logerrit)
 xmlsecurity/source/xmlsec/xmlsec_init.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 64909a84a354a8bee24fc4439a4b3fdeff67cad6
Author: Stephan Bergmann 
AuthorDate: Thu Apr 4 14:40:50 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 4 18:19:45 2024 +0200

Missing include, again

At least the Emscripten build was hit again by what had been fixed with
bddb0d87e809c96ee810de0e553f02bbe158907d "Missing include", after
a0c53ab43840d1c84d7d246b2cbc73c3a8862155 "tdf#146619 Remove unused #includes
from C/C++ files".

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

diff --git a/xmlsecurity/source/xmlsec/xmlsec_init.cxx 
b/xmlsecurity/source/xmlsec/xmlsec_init.cxx
index 84a7c9c6c368..c8eefe2c3aa0 100644
--- a/xmlsecurity/source/xmlsec/xmlsec_init.cxx
+++ b/xmlsecurity/source/xmlsec/xmlsec_init.cxx
@@ -11,6 +11,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #ifdef XMLSEC_CRYPTO_MSCRYPTO


core.git: static/README.wasm.md

2024-04-04 Thread Stephan Bergmann (via logerrit)
 static/README.wasm.md |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 164cb6ac273d34567f19b4e8a0df94efa053703c
Author: Stephan Bergmann 
AuthorDate: Thu Apr 4 16:02:16 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 4 18:14:44 2024 +0200

Drop spurious .delete() calls from example code

...that had been added there accidentally in
27ceca1996809c0f9390d1e9fb95dc7436ef1acf "Rework the Embind mapping of UNO
interfaces"

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

diff --git a/static/README.wasm.md b/static/README.wasm.md
index 1abfd39de6c8..006f1409f907 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -232,7 +232,6 @@ xSimpleText = new css.text.XSimpleText(xText.$query());
 xTextCursor = xSimpleText.createTextCursor();
 xTextRange = new css.text.XTextRange(xTextCursor.$query());
 xTextRange.setString("string here!");
-xSimpleText.delete(); xTextCursor.delete(); xTextRange.delete();
 xModel.delete(); xTextDocument.delete(); xText.delete(); xSimpleText.delete(); 
xTextCursor.delete(); xTextRange.delete();
 ```
 


core.git: sfx2/source

2024-04-04 Thread Stephan Bergmann (via logerrit)
 sfx2/source/dialog/splitwin.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 219dd67d6ad96e1c05e92e36583391946143dba6
Author: Stephan Bergmann 
AuthorDate: Thu Apr 4 09:53:34 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 4 14:14:26 2024 +0200

-Werror=maybe-uninitialized

...as reported at least with some recent GCC 14 trunk.  Lets assume that 
those
calls to GetWindowPos are never meant to fail.  (If it turns out that they 
can
fail after all, the code would presumably need some modifications to 
mitigate
the uninitialized reads from nL/nP.)

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

diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 210a9dbeaaff..b9597eacfc79 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -456,7 +457,8 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* 
pDockWin, const Size& rSize
 if ( bNewLine && !pFoundDock )
 {
 // Not known until now in which real line it is located
-GetWindowPos( rDock.pWin, nL, nPos );
+[[maybe_unused]] auto const ok = GetWindowPos( rDock.pWin, nL, 
nPos );
+assert(ok);
 nLine = static_cast(nL);
 }
 
@@ -544,7 +546,8 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* 
pDockWin, const Size& rSize,
 
 {
 sal_uInt16 nL, nP;
-GetWindowPos( pDockWin, nL, nP );
+[[maybe_unused]] auto const ok = GetWindowPos( pDockWin, nL, nP );
+assert(ok);
 
 if ( nLine > nL && GetItemCount( GetItemId( nL ) ) == 1 )
 {


core.git: connectivity/source hwpfilter/source vcl/source

2024-04-03 Thread Stephan Bergmann (via logerrit)
 connectivity/source/manager/mdrivermanager.cxx |4 ++--
 hwpfilter/source/hstyle.cxx|4 ++--
 vcl/source/window/layout.cxx   |   12 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 6b7245f51274424a6c634424161e8766f8827033
Author: Stephan Bergmann 
AuthorDate: Wed Apr 3 23:58:18 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 4 07:06: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 

diff --git a/connectivity/source/manager/mdrivermanager.cxx 
b/connectivity/source/manager/mdrivermanager.cxx
index 5c5b4f60a017..ed09cc3c816e 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 9e47d6d8f347..c4729a1e1abb 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -964,12 +964,12 @@ static array_type assembleGrid(const VclGrid )
 {
 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  = 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;
@@ -1101,7 +1101,7 @@ static void calcMaxs(const array_type , 
std::vector ,
 {
 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"
 #elif defined _MSC_VER
@@ -1109,7 +1109,7 @@ static void calcMaxs(const array_type , 
std::vector ,
 #pragma warning(disable : 4459)
 #endif
 const GridEntry  = A[x][y];
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14
 #pragma GCC diagnostic pop
 #elif defined _MSC_VER
 #pragma warning(pop)
@@ -1144,12 +1144,12 @@ static void calcMaxs(const array_type , 
std::vector ,
 {
 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  = 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 = 

core.git: linguistic/source

2024-04-03 Thread Stephan Bergmann (via logerrit)
 linguistic/source/gciterator.cxx |   90 ++-
 linguistic/source/gciterator.hxx |   16 +++---
 2 files changed, 50 insertions(+), 56 deletions(-)

New commits:
commit b23019c566f2cbf50dfbec71d258b3e1a9ead312
Author: Stephan Bergmann 
AuthorDate: Wed Apr 3 23:32:51 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 4 07:06:00 2024 +0200

Revert "osl::Mutex->std::mutex in GrammarCheckingIterator"

This reverts commit 829fa53fe877d0f0fc33d634fa7fbfbed23b7676, which started 
all
sorts of `make check` tests to hang for me due to a recursive locking 
attempt in

> #5  std::mutex::lock (this=0x7f6af81e62c0) at 
~/gcc/inst/include/c++/14.0.1/bits/std_mutex.h:113
> #6  std::unique_lock::lock (this=) at 
~/gcc/inst/include/c++/14.0.1/bits/unique_lock.h:147
> #7  std::unique_lock::unique_lock (this=, 
__m=...) at ~/gcc/inst/include/c++/14.0.1/bits/unique_lock.h:73
> #8  GrammarCheckingIterator::NextDocId (this=0x7f6af81e6260) at 
linguistic/source/gciterator.cxx:317
> #9  GrammarCheckingIterator::GetOrCreateDocId 
(this=this@entry=0x7f6af81e6260, xComponent=uno::Reference to (SwXTextDocument 
*) 0x7f6af8430ec8) at linguistic/source/gciterator.cxx:339
> #10 0x7f6b3b9e9da9 in GrammarCheckingIterator::startProofreading 
(this=0x7f6af81e6260, xDoc=, xIteratorProvider=) 
at linguistic/source/gciterator.cxx:773
> #11 0x7f6b16441ec3 in SwDoc::StartGrammarChecking (this=, bSkipStart=bSkipStart@entry=false) at sw/source/core/doc/docnew.cxx:180
> #12 0x7f6b164c4eae in sw::DocumentTimerManager::DoIdleJobs 
(this=0x7f6afad005a0) at sw/source/core/doc/DocumentTimerManager.cxx:169
> #13 0x7f6b3e83a68b in Scheduler::CallbackTaskScheduling () at 
vcl/source/app/scheduler.cxx:509
> #14 0x7f6b3eb1725f in SalTimer::CallCallback (this=) 
at vcl/inc/saltimer.hxx:54
> #15 SvpSalInstance::CheckTimeout (this=this@entry=0xffebe0, 
bExecuteTimers=bExecuteTimers@entry=true) at vcl/headless/svpinst.cxx:157
> #16 0x7f6b3eb1761d in SvpSalInstance::ImplYield 
(this=this@entry=0xffebe0, bWait=bWait@entry=true, 
bHandleAllCurrentEvents=bHandleAllCurrentEvents@entry=false) at 
vcl/headless/svpinst.cxx:395
> #17 0x7f6b3eb17cd5 in SvpSalInstance::DoYield (this=0xffebe0, 
bWait=, bHandleAllCurrentEvents=) at 
vcl/headless/svpinst.cxx:467
> #18 0x7f6b3e86aa44 in ImplYield (i_bWait=true, i_bAllEvents=false) at 
vcl/source/app/svapp.cxx:394
> #19 0x7f6b3e86b13b in Application::Execute () at 
vcl/source/app/svapp.cxx:369
> #20 0x7f6b3c8e715f in desktop::Desktop::Main (this=0x7ffe5e22fcb0) at 
desktop/source/app/app.cxx:1615
> #21 0x7f6b3e87e6fb in ImplSVMain () at vcl/source/app/svmain.cxx:229
> #22 0x7f6b3e87e9c5 in SVMain () at vcl/source/app/svmain.cxx:261
> #23 0x7f6b3c91de37 in soffice_main () at 
desktop/source/app/sofficemain.cxx:93
> #24 0x0040078b in sal_main () at desktop/source/app/main.c:51
> #25 main (argc=argc@entry=8, argv=argv@entry=0x7ffe5e22feb8) at 
desktop/source/app/main.c:49

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

diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index bf37df637f4b..ad85bab95953 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -273,11 +273,19 @@ css::uno::Any SAL_CALL 
LngXStringKeyMap::getValueByIndex(::sal_Int32 nIndex)
 }
 
 
+osl::Mutex& GrammarCheckingIterator::MyMutex()
+{
+static osl::Mutex SINGLETON;
+return SINGLETON;
+}
+
 GrammarCheckingIterator::GrammarCheckingIterator() :
 m_bEnd( false ),
 m_bGCServicesChecked( false ),
 m_nDocIdCounter( 0 ),
-m_thread(nullptr)
+m_thread(nullptr),
+m_aEventListeners( MyMutex() ),
+m_aNotifyListeners( MyMutex() )
 {
 }
 
@@ -291,7 +299,7 @@ void GrammarCheckingIterator::TerminateThread()
 {
 oslThread t;
 {
-std::unique_lock aGuard( m_aMutex );
+::osl::Guard< ::osl::Mutex > aGuard( MyMutex() );
 t = m_thread;
 m_thread = nullptr;
 m_bEnd = true;
@@ -314,14 +322,13 @@ bool GrammarCheckingIterator::joinThreads()
 
 sal_Int32 GrammarCheckingIterator::NextDocId()
 {
-std::unique_lock aGuard( m_aMutex );
+::osl::Guard< ::osl::Mutex > aGuard( MyMutex() );
 m_nDocIdCounter += 1;
 return m_nDocIdCounter;
 }
 
 
 OUString GrammarCheckingIterator::GetOrCreateDocId(
-std::unique_lock& /*rGuard*/,
 const uno::Reference< lang::XComponent >  )
 {
 // internal method; will always be called with locked mutex
@@ -347,7 +354,6 @@ OUString GrammarCheckingIterator::GetOrCreateDocId(
 
 
 void GrammarCheckingIterator::AddEntry(
-std::unique_lock& /*rGuard*/,
 const uno::Reference< text::XFlatParagraphIterator >& xFlatParaIterator,
 const 

core.git: external/lxml

2024-04-03 Thread Stephan Bergmann (via logerrit)
 external/lxml/UnpackedTarball_lxml.mk   |1 
 external/lxml/Wincompatible-pointer-types.patch |   65 
 2 files changed, 66 insertions(+)

New commits:
commit f09b9b2785732319fd3199337b3528de3a561393
Author: Stephan Bergmann 
AuthorDate: Wed Apr 3 20:19:17 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Apr 3 21:36:29 2024 +0200

external/lxml: Silence -Wincompatible-pointer-types

...as seen with recent GCC 14 trunk,

> gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -g 
-O0 -Wall -I/home/sberg/lo/core/workdir/UnpackedTarball/zlib 
-I/home/sberg/lo/core/workdir/UnpackedTarball/python3 
-I/home/sberg/lo/core/workdir/UnpackedTarball/python3/Include -fPIC 
-DCYTHON_CLINE_IN_TRACEBACK=0 
-I/home/sberg/lo/core/workdir/UnpackedTarball/libxml2/include 
-I/home/sberg/lo/core/workdir/UnpackedTarball/libxslt -Isrc -Isrc/lxml/includes 
-I/home/sberg/lo/core/workdir/UnpackedTarball/python3/Include 
-I/home/sberg/lo/core/workdir/UnpackedTarball/python3 -c src/lxml/etree.c -o 
build/temp.linux-x86_64-3.8-pydebug/src/lxml/etree.o -w
> src/lxml/etree.c: In function ‘__pyx_pf_4lxml_5etree_11TreeBuilder_4data’:
> src/lxml/etree.c:137698:66: error: passing argument 1 of 
‘__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData’ from incompatible pointer 
type [-Wincompatible-pointer-types]
> 137698 |   __pyx_t_1 = 
__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData(((struct 
__pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_data); if 
(unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 832, __pyx_L1_error)
>| 
~^~~
>|  
|
>|  
struct __pyx_obj_4lxml_5etree__SaxParserTarget *
> src/lxml/etree.c:137074:105: note: expected ‘struct 
__pyx_obj_4lxml_5etree_TreeBuilder *’ but argument is of type ‘struct 
__pyx_obj_4lxml_5etree__SaxParserTarget *’
> 137074 | static int 
__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData(struct 
__pyx_obj_4lxml_5etree_TreeBuilder *__pyx_v_self, PyObject *__pyx_v_data) {
>|  
~~~^~~~

etc.

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

diff --git a/external/lxml/UnpackedTarball_lxml.mk 
b/external/lxml/UnpackedTarball_lxml.mk
index 4248b978c06a..58905943c7ee 100644
--- a/external/lxml/UnpackedTarball_lxml.mk
+++ b/external/lxml/UnpackedTarball_lxml.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,lxml, \

external/lxml/0001-Make-regexp-string-raw-to-correct-its-escape-sequenc.patch.1 
\
external/lxml/replace-setuptools-with-distutils.patch.1 \
external/lxml/Wincompatible-function-pointer-types.patch \
+   external/lxml/Wincompatible-pointer-types.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/lxml/Wincompatible-pointer-types.patch 
b/external/lxml/Wincompatible-pointer-types.patch
new file mode 100644
index ..68d017c4e5fb
--- /dev/null
+++ b/external/lxml/Wincompatible-pointer-types.patch
@@ -0,0 +1,65 @@
+--- src/lxml/etree.c
 src/lxml/etree.c
+@@ -137695,7 +137695,7 @@
+  * 
+  * def start(self, tag, attrs, nsmap=None):
+  */
+-  __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData(((struct 
__pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_data); if 
(unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 832, __pyx_L1_error)
++  __pyx_t_1 = 
__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData((__pyx_v_self), 
__pyx_v_data); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 832, 
__pyx_L1_error)
+ 
+   /* "src/lxml/saxparser.pxi":826
+  * return self._last
+@@ -137856,7 +137856,7 @@
+  * def end(self, tag):
+  */
+   __Pyx_XDECREF(__pyx_r);
+-  __pyx_t_3 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart(((struct 
__pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_tag, 
__pyx_v_attrs, __pyx_v_nsmap); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 841, 
__pyx_L1_error)
++  __pyx_t_3 = 
__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart((__pyx_v_self), __pyx_v_tag, 
__pyx_v_attrs, __pyx_v_nsmap); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 841, 
__pyx_L1_error)
+   __Pyx_GOTREF(__pyx_t_3);
+   __pyx_r = __pyx_t_3;
+   __pyx_t_3 = 0;
+@@ -137927,7 +137927,7 @@
+  * assert self._last.tag == tag,\
+  * f"end tag mismatch (expected {self._last.tag}, got {tag})"
+  */
+-  __pyx_t_1 = __pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd(((struct 
__pyx_obj_4lxml_5etree__SaxParserTarget *)__pyx_v_self), __pyx_v_tag); if 

core.git: download.lst external/rhino scripting/Jar_ScriptProviderForJavaScript.mk scripting/java

2024-04-02 Thread Stephan Bergmann (via logerrit)
 download.lst   
   |4 
 external/rhino/ExternalPackage_rhino.mk
   |2 
 external/rhino/ExternalProject_rhino.mk
   |   36 
 external/rhino/OfficeScriptInfo.java   
   |  118 -
 external/rhino/UnpackedTarball_rhino.mk
   |   11 
 external/rhino/filelist.txt
   |  330 +++
 external/rhino/rhino-classpath.patch.1 
   |   13 
 external/rhino/rhino1_5R5-find_swing.patch 
   |   16 
 external/rhino/rhino1_5R5-updateToolTip.patch  
   |   23 
 external/rhino/rhino1_5R5.patch
   | 1067 --
 scripting/Jar_ScriptProviderForJavaScript.mk   
   |6 
 
scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
   |  319 --
 
scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
 |   59 
 scripting/java/com/sun/star/script/framework/provider/javascript/template.js   
   |   54 
 14 files changed, 363 insertions(+), 1695 deletions(-)

New commits:
commit 58c4457a902c846229dc3383cc31bbc8f4b3aed9
Author: Stephan Bergmann 
AuthorDate: Fri Mar 22 15:53:49 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Apr 2 18:56:13 2024 +0200

Update to latest Rhino 1.7.14

...at the expense of losing, at least for now, the script editor for it 
(which
had been hacked into the old upstream sources in a hard-to-maintain way).

rhino-1.7.14.zip is taken from

.
Building it would now use Gradle, but instead just hack together an 
invocation
of javac and jar in external/rhino/ExternalProject_rhino.mk that effectively
generates the same jar as the upstream-built jar available at

.

All the various patches are no longer necessary:
* external/rhino/rhino1_5R5.patch and external/rhino/OfficeScriptInfo.java 
were
  mostly for the hacked-in script editor, which has been abandoned at least 
for
  now (see above).
* external/rhino/rhino1_5R5-find_swing.patch (originally from
  0a7f9346503a557f583bced269655fa1996550af "ause109: #i106296# make 
build.xml
  aware of TARFILE_LOCATION") appears to be obsolete.
* external/rhino/rhino1_5R5-updateToolTip.patch is covered by
  

  "Fix bug 414869: Rhino debugger fails to launch due to updates in mac os x
  leopard".
* external/rhino/rhino-classpath.patch.1 from
  bb58293296f843654045d7b0eba6899d11533a4a "rhino: unbreak build on Fedora 
34"
  was only relevant when building with Ant.

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

diff --git a/download.lst b/download.lst
index f0ab55c21f1c..af0e9f113ac4 100644
--- a/download.lst
+++ b/download.lst
@@ -586,8 +586,8 @@ REVENGE_TARBALL := 
librevenge-0.0.$(REVENGE_VERSION_MICRO).tar.bz2
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-RHINO_SHA256SUM := 
1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753
-RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+RHINO_SHA256SUM := 
bf4d2d0c5ff8889fd494486db09291cb7965f0bf2f93ef005d3b08070a5a4f5c
+RHINO_TARBALL := rhino-1.7.14.zip
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/rhino/ExternalPackage_rhino.mk 
b/external/rhino/ExternalPackage_rhino.mk
index 0ee1d60e309d..faac15c6978e 100644
--- a/external/rhino/ExternalPackage_rhino.mk
+++ b/external/rhino/ExternalPackage_rhino.mk
@@ -11,6 +11,6 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,rhino,rhino))
 
 $(eval $(call gb_ExternalPackage_use_external_project,rhino,rhino))
 
-$(eval $(call 
gb_ExternalPackage_add_file,rhino,$(LIBO_SHARE_JAVA_FOLDER)/js.jar,build/rhino1_5R5/js.jar))
+$(eval $(call 
gb_ExternalPackage_add_file,rhino,$(LIBO_SHARE_JAVA_FOLDER)/js.jar,build/js.jar))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/rhino/ExternalProject_rhino.mk 
b/external/rhino/ExternalProject_rhino.mk
index 6ef30ca34f24..3df0aaa4e2d9 100644
--- a/external/rhino/ExternalProject_rhino.mk
+++ 

core.git: vcl/inc

2024-04-01 Thread Stephan Bergmann (via logerrit)
 vcl/inc/impgraph.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0ef2073ac560fcfab102d5363c1cc017694d6abc
Author: Stephan Bergmann 
AuthorDate: Mon Apr 1 21:16:14 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Apr 2 07:28:13 2024 +0200

Fix UBSan RTTI needs

...vcl_graphic_test now failed with

> DynamicLibraryManagerException: "Failed to load dynamic library: 
workdir/LinkTarget/CppunitTest/libtest_vcl_graphic_test.so
> workdir/LinkTarget/CppunitTest/libtest_vcl_graphic_test.so: undefined 
symbol: _ZTI10ImpGraphic"

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

diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index 23d482aded23..fd6446e1972a 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -57,7 +57,7 @@ enum class GraphicContentType : sal_Int32
 Vector
 };
 
-class ImpGraphic final  : public vcl::graphic::MemoryManaged
+class SAL_DLLPUBLIC_RTTI ImpGraphic final  : public vcl::graphic::MemoryManaged
 {
 friend class Graphic;
 friend class GraphicID;


core.git: Branch 'feature/allo_contract45533' - sc/qa sw/qa

2024-03-29 Thread Stephan Bergmann (via logerrit)
 sc/qa/uitest/inputLine/tdf67346.py  |   50 ---
 sw/qa/uitest/writer_tests7/tdf150443.py |   46 --
 sw/qa/uitest/writer_tests7/tdf90401.py  |  139 
 3 files changed, 235 deletions(-)

New commits:
commit 3c2c10f085eef193d9a5417576d61bb76cea0585
Author: Stephan Bergmann 
AuthorDate: Tue Mar 12 15:14:52 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Sat Mar 30 00:38:32 2024 +0100

Remove known-problematic tests

For unclear reasons:

1  UITest_writer_tests7 kept hanging with python.bin at

> Traceback (most recent call first):
>   
>   File "/home/libo/src/core/uitest/uitest/test.py", line 144, in 
execute_dialog_through_command
> time.sleep(DEFAULT_SLEEP)
>   
>   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/contextlib.py", line 113, 
in __enter__
> return next(self.gen)
>   File "/home/libo/src/core/uitest/uitest/test.py", line 148, in 
execute_modeless_dialog_through_command
> with self.execute_dialog_through_command(command, printNames, 
close_button, "ModelessDialogVisible") as xDialog:
>   
>   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/contextlib.py", line 113, 
in __enter__
> return next(self.gen)
>   File "/home/libo/src/core/sw/qa/uitest/writer_tests7/tdf90401.py", line 
131, in test_tdf142902_remove_personal_info_in_DOCX
> with 
self.ui_test.execute_modeless_dialog_through_command('.uno:AcceptTrackedChanges',
 close_button="close") as xTrackDlg:
>   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/case.py", line 
633, in _callTestMethod
> method()
>   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/case.py", line 
1700, in run
>   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/case.py", line 
736, in __call__
> return self.run(*args, **kwds)
>   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/suite.py", line 
378, in run
>   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/suite.py", line 
84, in __call__
> return self.run(*args, **kwds)
>   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/runner.py", line 
432, in run
>   File "/home/libo/src/core/uitest/test_main.py", line 138, in 
> result = unittest.TextTestRunner(stream=sys.stdout, 
verbosity=2).run(test_suite)

and soffice.bin idling in the main thread.

2  With (1) out of the way, UITest_writer_tests7 kept failing with

> ==
> ERROR: test_tdf150443 (tdf150443.tdf150443)
> --
> Traceback (most recent call last):
>   File "/home/libo/src/core/uitest/uitest/test.py", line 134, in 
execute_dialog_through_command
> yield xDialog
>   File "/home/libo/src/core/uitest/uitest/test.py", line 149, in 
execute_modeless_dialog_through_command
> yield xDialog
>   File "/home/libo/src/core/sw/qa/uitest/writer_tests7/tdf150443.py", 
line 33, in test_tdf150443
> changesList = xTrackDlg.getChild("writerchanges")
> uno.com.sun.star.uno.RuntimeException: Could not find child with id: 
writerchanges children were   writer_edit PageBreak PageBreak   
 ScrollBars vertical horizontal   ScrollBars vertical horizontal  TabBar  
TabBar TabBarContents  menubutton measure button button button button button 
button button button   FixedImageControl image   Deck titlebar grip addonimage 
label toolbar scrolledwindow contents Panel titlebar addonimage expander   
toolbar contents SidebarStylesPanel grid1 fontstyletoolbox  applystyle 
style Panel titlebar addonimage expander   toolbar contents SidebarTextPanel 
grid1 font  fontnamecombobox fontheight  fontsizecombobox fonteffects 
ToolbarPopover container box3 defaultattr resetattr fontadjust box1 
colorbar_writer ToolbarPopover container colorbar_others ToolbarPopover 
container colorbar_background ToolbarPopover container spacingbar 
ToolbarPopover container box2 position Panel titlebar addonimage expander   
toolbar contents P
 araPropertyPanel grid1 box1 horizontalalignment writedirection 
verticalalignment numberbullet ToolbarPopover container ToolbarPopover 
container ToolbarPopover container backgroundcolor ToolbarPopover container 
separator1 box3 spacinglabel paraspacing aboveparaspacingbox 
aboveparaspacingimg  aboveparaspacing  belowparaspacingbox belowparaspacingimg  
belowparaspacing  linespacing ToolbarPopover container indentfieldbox 
indentlabel indent beforetextindentbox beforetextindentimg  beforetextindent  
aftertextindentbox aftertextindentimg  aftertextindent  firstlineindentbox 
firstlineindentimg  firstlineindent  Panel titlebar addonimage expander   
toolbar contents TableEditPanel 

core.git: 2 commits - cui/source xmlsecurity/source

2024-03-28 Thread Stephan Bergmann (via logerrit)
 cui/source/factory/dlgfact.cxx|1 +
 xmlsecurity/source/xmlsec/xmlsec_init.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit bddb0d87e809c96ee810de0e553f02bbe158907d
Author: Stephan Bergmann 
AuthorDate: Thu Mar 28 14:52:36 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 28 20:46:43 2024 +0100

Missing include

...presumably since 50897e3fe001aeae5a6091ede155088461c798f3 "Drop 
transitional
header xmlsecurity/xmlsec-wrapper.h",

> xmlsecurity/source/xmlsec/xmlsec_init.cxx:29:9: error: use of undeclared 
identifier 'xmlSecInit'
>29 | if( xmlSecInit() < 0 ) {
>   | ^
> xmlsecurity/source/xmlsec/xmlsec_init.cxx:55:9: error: use of undeclared 
identifier 'xmlSecShutdown'
>55 | xmlSecShutdown() ;
>   | ^

etc.

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

diff --git a/xmlsecurity/source/xmlsec/xmlsec_init.cxx 
b/xmlsecurity/source/xmlsec/xmlsec_init.cxx
index 472ece4c1180..df09f5700aa0 100644
--- a/xmlsecurity/source/xmlsec/xmlsec_init.cxx
+++ b/xmlsecurity/source/xmlsec/xmlsec_init.cxx
@@ -13,6 +13,7 @@
 
 #include 
 
+#include 
 #include 
 #ifdef XMLSEC_CRYPTO_MSCRYPTO
 #include 
commit 0ce23697cf9ab8e590b41bf5eced515d5f0eb9d9
Author: Stephan Bergmann 
AuthorDate: Thu Mar 28 15:13:04 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 28 20:46:30 2024 +0100

-Werror,-Wunused-parameter

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 2a71808ae59d..9c422c4f71a6 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1540,6 +1540,7 @@ 
AbstractDialogFactory_Impl::CreateWhatsNewDialog(weld::Window* pParent, const bo
 std::make_shared(pParent, bWelcome));
 #else
 (void) pParent;
+(void) bWelcome;
 return nullptr;
 #endif
 }


core.git: offapi/com

2024-03-26 Thread Stephan Bergmann (via logerrit)
 offapi/com/sun/star/security/XDocumentDigitalSignatures.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f2ac3dff7858c1ef49474c1e703ddc0e4127b0cf
Author: Stephan Bergmann 
AuthorDate: Tue Mar 26 10:15:20 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Mar 26 15:56:23 2024 +0100

Consolidate on @since LibreOffice MAJOR.MINOR tags

...so even if 6a049e417b029f3733fcee05f99a3e8875aefdb8 "tdf#160184 ask user 
if
they want to trust an untrusted certificate" gets backported to
libreoffice-24-2 towards LO 24.2.3, better keep @since tags consistent and 
only
officially announce it for LO 24.8

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

diff --git a/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl 
b/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl
index a32f77970996..dc1a5f160bde 100644
--- a/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl
+++ b/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl
@@ -215,7 +215,7 @@ interface XDocumentDigitalSignatures : 
com::sun::star::uno::XInterface
 
 /** queries the user if the want to trust an untrusted certificate.
 
-@since LibreOffice 24.2.3
+@since LibreOffice 24.8
 */
 boolean trustUntrustedCertificate([in] 
::com::sun::star::security::XCertificate xCertificate);
 };


core.git: sal/osl

2024-03-26 Thread Stephan Bergmann (via logerrit)
 sal/osl/unx/system.hxx |   21 -
 1 file changed, 21 deletions(-)

New commits:
commit 1590e2c359fd3b506b8721d99a0054a0bd4dd200
Author: Stephan Bergmann 
AuthorDate: Tue Mar 26 09:37:43 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Mar 26 14:24:06 2024 +0100

No need to define ETIME

(which is an obsolescent XSI-STREAMS Posix extension).  It's only use is in 
the
big switch in UnixErrnoString in sal/osl/unx/uunxapi.cxx, so if any platform
should actually lack it, we should rather #ifdef its use there than 
introduce it
here.

(This started to cause

> sal/osl/unx/system.hxx:190:12: error: macro 'ETIME' has been marked as 
deprecated: ETIME is deprecated in ISO C++ [-Werror,-Wdeprecated-pragma]
>   190 | #   ifndef ETIME
>   |^
> ~/llvm/inst/bin/../include/c++/v1/cerrno:51:67: note: macro marked 
'deprecated' here
>51 | #  pragma clang deprecated(ETIME, "ETIME is deprecated in ISO 
C++")
>   |   
^

with recent LLVM 19 trunk on macOS now.)

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

diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx
index 5f5a16aa3671..1337913f7abb 100644
--- a/sal/osl/unx/system.hxx
+++ b/sal/osl/unx/system.hxx
@@ -47,10 +47,6 @@
 #   define  NO_PTHREAD_PRIORITY
 #   define  PTHREAD_SIGACTION   pthread_sigaction
 
-#   ifndef ETIME
-#   define ETIME ETIMEDOUT
-#   endif
-
 #endif
 
 #ifdef HAIKU
@@ -71,9 +67,6 @@
 #   define  NO_PTHREAD_RTL
 #   define  PTHREAD_SIGACTION   pthread_sigaction
 
-#   ifndef ETIME
-#   define ETIME ETIMEDOUT
-#   endif
 #   define SIGIOT SIGABRT
 #   define SOCK_RDM 0
 //  hack: Haiku defines SOL_SOCKET as -1, but this makes GCC complain about
@@ -104,9 +97,6 @@
 #endif
 
 #ifdef FREEBSD
-#   ifndef ETIME
-#   define ETIME ETIMEDOUT
-#   endif
 #   include 
 #   include 
 #   include 
@@ -128,7 +118,6 @@
 #endif
 
 #ifdef OPENBSD
-#   define  ETIME ETIMEDOUT
 #   include 
 #   include 
 #   include 
@@ -152,7 +141,6 @@
 #endif
 
 #if defined(DRAGONFLY) || defined(NETBSD)
-#   define  ETIME ETIMEDOUT
 #   include 
 #   include 
 #   include 
@@ -187,9 +175,6 @@
 #define TimeValue CFTimeValue  // Do not conflict with TimeValue in 
sal/inc/osl/time.h
 #include 
 #undef TimeValue
-#   ifndef ETIME
-#   define  ETIME ETIMEDOUT
-#   endif
 #   include 
 #   include 
 #   include 
@@ -208,9 +193,6 @@ int macxp_resolveAlias(char *path, int buflen);
 #endif
 
 #ifdef IOS
-#   ifndef ETIME
-#   define  ETIME ETIMEDOUT
-#   endif
 #   include 
 #   include 
 #   include 
@@ -225,9 +207,6 @@ int macxp_resolveAlias(char *path, int buflen);
 #endif
 
 #ifdef EMSCRIPTEN
-#   ifndef ETIME
-#   define  ETIME ETIMEDOUT
-#   endif
 #   include 
 #   include 
 #   include 


core.git: sal/osl

2024-03-26 Thread Stephan Bergmann (via logerrit)
 sal/osl/unx/uunxapi.cxx |   44 
 1 file changed, 44 insertions(+)

New commits:
commit 66be0576a6202354bd5dce289eb823256cc0a324
Author: Stephan Bergmann 
AuthorDate: Tue Mar 26 09:52:24 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Mar 26 13:56:20 2024 +0100

Silence -Wdeprecated-pragma

...as seen with recent LLVM 19 trunk on macOS now,

> In file included from sal/osl/unx/uunxapi.mm:1:
> sal/osl/unx/uunxapi.cxx:612:14: error: macro 'ENOSTR' has been marked as 
deprecated: ENOSTR is deprecated in ISO C++ [-Werror,-Wdeprecated-pragma]
>   612 | case ENOSTR:
>   |  ^
> ~/llvm/inst/bin/../include/c++/v1/cerrno:48:69: note: macro marked 
'deprecated' here
>48 | #  pragma clang deprecated(ENOSTR, "ENOSTR is deprecated in ISO 
C++")
>   |   
  ^

etc.  (And -Wdeprecated-pragma was only added towards Clang 14 with


"Support macro deprecation #pragma clang deprecated", so wrap it in
__has_warning.)

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

diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 033b1a435a77..37db3c987315 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -608,14 +608,58 @@ std::string UnixErrnoString(int nErrno)
 #ifdef EBFONT
 case EBFONT:
 return "EBFONT";
+#endif
+#if defined __clang__
+#if __has_warning("-Wdeprecated-pragma")
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-pragma"
+#endif
 #endif
 case ENOSTR:
+#if defined __clang__
+#if __has_warning("-Wdeprecated-pragma")
+#pragma clang diagnostic push
+#endif
+#endif
 return "ENOSTR";
+#if defined __clang__
+#if __has_warning("-Wdeprecated-pragma")
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-pragma"
+#endif
+#endif
 case ENODATA:
+#if defined __clang__
+#if __has_warning("-Wdeprecated-pragma")
+#pragma clang diagnostic push
+#endif
+#endif
 return "ENODATA";
+#if defined __clang__
+#if __has_warning("-Wdeprecated-pragma")
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-pragma"
+#endif
+#endif
 case ETIME:
+#if defined __clang__
+#if __has_warning("-Wdeprecated-pragma")
+#pragma clang diagnostic push
+#endif
+#endif
 return "ETIME";
+#if defined __clang__
+#if __has_warning("-Wdeprecated-pragma")
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-pragma"
+#endif
+#endif
 case ENOSR:
+#if defined __clang__
+#if __has_warning("-Wdeprecated-pragma")
+#pragma clang diagnostic push
+#endif
+#endif
 return "ENOSR";
 #ifdef ENONET
 case ENONET:


core.git: vcl/inc vcl/unx

2024-03-25 Thread Stephan Bergmann (via logerrit)
 vcl/inc/unx/i18n_cb.hxx |2 +-
 vcl/unx/generic/app/i18n_cb.cxx |4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 24aed4f9a5f6351d9153c96e3d1d1aa68028c0d0
Author: Stephan Bergmann 
AuthorDate: Mon Mar 25 18:54:05 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 25 23:34:33 2024 +0100

Avoid -Werror,-Wcast-function-type-mismatch, remove unused int return

> vcl/unx/generic/app/i18n_ic.cxx:225:51: error: cast from 'int (*)(XIC, 
XPointer, XPointer)' (aka 'int (*)(_XIC *, char *, char *)') to 'XIMProc' (aka 
'void (*)(_XIM *, char *, char *)') converts to incompatible function type 
[-Werror,-Wcast-function-type-mismatch]
>   225 | maPreeditStartCallback.callback = 
reinterpret_cast(PreeditStartCallback);
>   |   
^~~

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

diff --git a/vcl/inc/unx/i18n_cb.hxx b/vcl/inc/unx/i18n_cb.hxx
index 4b498f387820..497875236c5d 100644
--- a/vcl/inc/unx/i18n_cb.hxx
+++ b/vcl/inc/unx/i18n_cb.hxx
@@ -28,7 +28,7 @@ extern "C" {
 
 // xim callbacks
 void PreeditDoneCallback ( XIC ic, XPointer client_data, XPointer call_data);
-int  PreeditStartCallback( XIC ic, XPointer client_data, XPointer call_data);
+void PreeditStartCallback( XIC ic, XPointer client_data, XPointer call_data);
 void PreeditDrawCallback ( XIC ic, XPointer client_data,
XIMPreeditDrawCallbackStruct *call_data );
 void PreeditCaretCallback( XIC ic, XPointer client_data,
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index c17c01a4d225..d4efcf34fd55 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -34,7 +34,7 @@
 
 // i. preedit start callback
 
-int
+void
 PreeditStartCallback ( XIC, XPointer client_data, XPointer )
 {
 preedit_data_t* pPreeditData = 
reinterpret_cast(client_data);
@@ -43,8 +43,6 @@ PreeditStartCallback ( XIC, XPointer client_data, XPointer )
 pPreeditData->eState = PreeditStatus::Active;
 pPreeditData->aText.nLength= 0;
 }
-
-return -1;
 }
 
 // ii. preedit done callback


core.git: Branch 'distro/cib/libreoffice-6-4' - sal/Library_sal.mk sal/osl

2024-03-25 Thread Stephan Bergmann (via logerrit)
 sal/Library_sal.mk  |1 +
 sal/osl/all/log.cxx |7 +++
 2 files changed, 8 insertions(+)

New commits:
commit 9fb2fa9bddef863c1e444861f939d4d7956dcc4b
Author: Stephan Bergmann 
AuthorDate: Fri Mar 22 17:10:51 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 25 15:45:37 2024 +0100

Best effort to create directories of SAL_LOG_FILE

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165272
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 1339c42c4aea269e5265277647361ae91882d8a5)
Conflicts:
sal/Library_sal.mk
sal/osl/all/log.cxx

Change-Id: Ia86ac0e022579d155e92de3b853d57860b5b97e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165192
Tested-by: allotropia jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index e84ed0aaf1b5..53b35dc8342b 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -59,6 +59,7 @@ $(eval $(call gb_Library_add_libs,sal,\
$(if $(filter LINUX,$(OS)), \
-ldl \
-lrt \
+   -lstdc++fs \
) \
$(if $(filter SOLARIS,$(OS)), \
-lnsl \
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 84f88f259daa..3377d615a6ab 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -19,9 +19,13 @@
 
 #include 
 #include 
+#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
+#include 
 #include 
+#include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -201,6 +205,9 @@ std::ofstream * getLogFile() {
 
 if (logFile)
 {
+std::experimental::filesystem::create_directories(
+std::experimental::filesystem::path(logFile).remove_filename(),
+o3tl::temporary(std::error_code()));
 // stays until process exits
 static std::ofstream file(logFile, std::ios::app | std::ios::out);
 pResult = 


core.git: sal/osl

2024-03-25 Thread Stephan Bergmann (via logerrit)
 sal/osl/all/log.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 1339c42c4aea269e5265277647361ae91882d8a5
Author: Stephan Bergmann 
AuthorDate: Fri Mar 22 17:10:51 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 25 12:42:05 2024 +0100

Best effort to create directories of SAL_LOG_FILE

Change-Id: Ia86ac0e022579d155e92de3b853d57860b5b97e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165272
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 3f92e9a62ec9..dd91d4ea2944 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -17,8 +17,10 @@
 
 #include 
 #include 
+#include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -200,6 +202,9 @@ std::ofstream * getLogFile() {
 
 if (logFile)
 {
+std::filesystem::create_directories(
+std::filesystem::path(logFile).remove_filename(),
+o3tl::temporary(std::error_code()));
 // stays until process exits
 static std::ofstream file(logFile, std::ios::app | std::ios::out);
 pResult = 


core.git: sal/osl

2024-03-25 Thread Stephan Bergmann (via logerrit)
 sal/osl/unx/signal.cxx |   43 +++
 1 file changed, 23 insertions(+), 20 deletions(-)

New commits:
commit 85a2bb9f52a0d834b02681344ce56e0b091e1abd
Author: Stephan Bergmann 
AuthorDate: Sun Mar 24 18:17:28 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 25 07:57:17 2024 +0100

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 

diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 0e05b40a656b..463d0512d85a 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -50,14 +50,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 */
@@ -205,13 +208,13 @@ bool onInitSignal()
 if (sigaction(rSignal.Signal, , ) == 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;
 }
 }
@@ -221,13 +224,13 @@ bool onInitSignal()
 if (sigaction(rSignal.Signal, , ) == 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;
 }
 }
@@ -263,11 +266,11 @@ bool onDeInitSignal()
 && (bSetILLHandler || Signals[i].Signal != SIGILL)))
 {
 if (Signals[i].siginfo) {
-act.sa_sigaction = reinterpret_cast(
-Signals[i].Handler);
+act.sa_sigaction =
+Signals[i].Handler2;
 act.sa_flags = SA_SIGINFO;
 } else {
-act.sa_handler = Signals[i].Handler;
+act.sa_handler = Signals[i].Handler1;
 act.sa_flags = 0;
 }
 
@@ -306,9 +309,9 @@ void callSystemHandler(int signal, siginfo_t * info, void * 
context)
 if (i >= NoSignals)
 return;
 
-if ((Signals[i].Handler == SIG_DFL) ||
-(Signals[i].Handler == SIG_IGN) ||
- (Signals[i].Handler == SIG_ERR))
+if ((Signals[i].Handler1 == SIG_DFL) ||
+(Signals[i].Handler1 == SIG_IGN) ||
+ (Signals[i].Handler1 == SIG_ERR))
 {
 switch (Signals[i].Action)
 {
@@ -335,10 +338,10 @@ void callSystemHandler(int signal, siginfo_t * info, void 
* context)
 }
 }
 else if (Signals[i].siginfo) {
-(*reinterpret_cast(Signals[i].Handler))(
+(*Signals[i].Handler2)(
 signal, info, context);
 } else {
-(*Signals[i].Handler)(signal);
+(*Signals[i].Handler1)(signal);
 }
 }
 


core.git: connectivity/source

2024-03-24 Thread Stephan Bergmann (via logerrit)
 connectivity/source/drivers/evoab2/EApi.h|2 ++
 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx |2 +-
 connectivity/source/drivers/evoab2/NResultSet.cxx|2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 1344e6261a1d856c71eca1e0cc29215a586bf335
Author: Stephan Bergmann 
AuthorDate: Sun Mar 24 18:16:10 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Mar 24 23:14:32 2024 +0100

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

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

diff --git a/connectivity/source/drivers/evoab2/EApi.h 
b/connectivity/source/drivers/evoab2/EApi.h
index 9a2138eb2a26..a33bf9721de6 100644
--- a/connectivity/source/drivers/evoab2/EApi.h
+++ b/connectivity/source/drivers/evoab2/EApi.h
@@ -157,4 +157,6 @@ bool isSourceBackend(ESource *pSource, const char 
*backendname);
 
 G_END_DECLS
 
+inline void object_unref(gpointer data, gpointer) { g_object_unref(data); }
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx 
b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index 96a0904efc0b..2f12a6f37bb1 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -1139,7 +1139,7 @@ Reference< XResultSet > SAL_CALL 
OEvoabDatabaseMetaData::getTables(
 aRows.push_back(aRow);
 }
 
-g_list_foreach (pSources, reinterpret_cast(g_object_unref), 
nullptr);
+g_list_foreach (pSources, object_unref, nullptr);
 g_list_free (pSources);
 
 pResult->setRows(std::move(aRows));
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx 
b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 043be2553f86..78dbbbc53b2f 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -402,7 +402,7 @@ public:
 break;
 }
 }
-g_list_foreach (pSources, reinterpret_cast(g_object_unref), 
nullptr);
+g_list_foreach (pSources, object_unref, nullptr);
 g_list_free (pSources);
 if (!id)
 return nullptr;


core.git: vcl/unx

2024-03-24 Thread Stephan Bergmann (via logerrit)
 vcl/unx/gtk3/a11y/atkaction.cxx   |3 ++-
 vcl/unx/gtk3/a11y/atkcomponent.cxx|3 ++-
 vcl/unx/gtk3/a11y/atkeditabletext.cxx |3 ++-
 vcl/unx/gtk3/a11y/atkfactory.cxx  |   10 ++
 vcl/unx/gtk3/a11y/atkhypertext.cxx|   10 ++
 vcl/unx/gtk3/a11y/atkimage.cxx|3 ++-
 vcl/unx/gtk3/a11y/atkselection.cxx|3 ++-
 vcl/unx/gtk3/a11y/atktable.cxx|3 ++-
 vcl/unx/gtk3/a11y/atktablecell.cxx|3 ++-
 vcl/unx/gtk3/a11y/atktext.cxx |3 ++-
 vcl/unx/gtk3/a11y/atkvalue.cxx|3 ++-
 vcl/unx/gtk3/a11y/atkwrapper.cxx  |   25 +
 vcl/unx/gtk3/a11y/atkwrapper.hxx  |   20 ++--
 vcl/unx/gtk3/gtkframe.cxx |   17 +++--
 vcl/unx/gtk3/gtkinst.cxx  |5 +++--
 vcl/unx/gtk4/a11y.cxx |   13 +++--
 vcl/unx/gtk4/gtkaccessibletext.cxx|3 ++-
 vcl/unx/gtk4/gtkaccessibletext.hxx|2 +-
 18 files changed, 77 insertions(+), 55 deletions(-)

New commits:
commit 0c29c417ef3f0b749042e5a461abae9c36cf655b
Author: Stephan Bergmann 
AuthorDate: Sun Mar 24 18:19:19 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Mar 24 23:14:06 2024 +0100

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

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

diff --git a/vcl/unx/gtk3/a11y/atkaction.cxx b/vcl/unx/gtk3/a11y/atkaction.cxx
index 0a39d3bdf98e..09db51556936 100644
--- a/vcl/unx/gtk3/a11y/atkaction.cxx
+++ b/vcl/unx/gtk3/a11y/atkaction.cxx
@@ -253,8 +253,9 @@ action_wrapper_set_description (AtkAction *, gint, const 
gchar *)
 } // extern "C"
 
 void
-actionIfaceInit (AtkActionIface *iface)
+actionIfaceInit (gpointer iface_, gpointer)
 {
+  auto const iface = static_cast(iface_);
   g_return_if_fail (iface != nullptr);
 
   iface->do_action = action_wrapper_do_action;
diff --git a/vcl/unx/gtk3/a11y/atkcomponent.cxx 
b/vcl/unx/gtk3/a11y/atkcomponent.cxx
index 154f0117f1bc..9b5bb2f6edfb 100644
--- a/vcl/unx/gtk3/a11y/atkcomponent.cxx
+++ b/vcl/unx/gtk3/a11y/atkcomponent.cxx
@@ -409,8 +409,9 @@ component_wrapper_remove_focus_handler (AtkComponent  
*component,
 } // extern "C"
 
 void
-componentIfaceInit (AtkComponentIface *iface)
+componentIfaceInit (gpointer iface_, gpointer)
 {
+  auto const iface = static_cast(iface_);
   g_return_if_fail (iface != nullptr);
 
   iface->add_focus_handler = component_wrapper_add_focus_handler;
diff --git a/vcl/unx/gtk3/a11y/atkeditabletext.cxx 
b/vcl/unx/gtk3/a11y/atkeditabletext.cxx
index f240c32324c6..51c015e7ce16 100644
--- a/vcl/unx/gtk3/a11y/atkeditabletext.cxx
+++ b/vcl/unx/gtk3/a11y/atkeditabletext.cxx
@@ -177,8 +177,9 @@ editable_text_wrapper_copy_text( AtkEditableText  *text,
 } // extern "C"
 
 void
-editableTextIfaceInit (AtkEditableTextIface *iface)
+editableTextIfaceInit (gpointer iface_, gpointer)
 {
+  auto const iface = static_cast(iface_);
   g_return_if_fail (iface != nullptr);
 
   iface->set_text_contents = editable_text_wrapper_set_text_contents;
diff --git a/vcl/unx/gtk3/a11y/atkfactory.cxx b/vcl/unx/gtk3/a11y/atkfactory.cxx
index 2fc407b7bc06..bb19eb8cea8d 100644
--- a/vcl/unx/gtk3/a11y/atkfactory.cxx
+++ b/vcl/unx/gtk3/a11y/atkfactory.cxx
@@ -42,8 +42,9 @@ noop_wrapper_ref_state_set( AtkObject * )
 }
 
 static void
-atk_noop_object_wrapper_class_init(AtkNoOpObjectClass *klass)
+atk_noop_object_wrapper_class_init(gpointer klass_, gpointer)
 {
+auto const klass = static_cast(klass_);
 AtkObjectClass *atk_class = ATK_OBJECT_CLASS( klass );
 atk_class->ref_state_set = noop_wrapper_ref_state_set;
 }
@@ -60,7 +61,7 @@ atk_noop_object_wrapper_get_type()
 sizeof (AtkNoOpObjectClass),
 nullptr,
 nullptr,
-
reinterpret_cast(atk_noop_object_wrapper_class_init),
+atk_noop_object_wrapper_class_init,
 nullptr,
 nullptr,
 sizeof (AtkObjectWrapper),
@@ -154,8 +155,9 @@ AtkObject* ooo_fixed_get_accessible(GtkWidget *obj)
 }
 
 static void
-wrapper_factory_class_init( AtkObjectFactoryClass *klass )
+wrapper_factory_class_init( gpointer klass_, gpointer )
 {
+  auto const klass = static_cast(klass_);
   klass->create_accessible   = wrapper_factory_create_accessible;
   klass->get_accessible_type = wrapper_factory_get_accessible_type;
 }
@@ -169,7 +171,7 @@ wrapper_factory_get_type()
 static const GTypeInfo tinfo =
 {
   sizeof (AtkObjectFactoryClass),
-  nullptr, nullptr, 
reinterpret_cast(wrapper_factory_class_init),
+  nullptr, nullptr, wrapper_factory_class_init,
   nullptr, nullptr, sizeof (AtkObjectFactory), 0, nullptr, nullptr
 };
 
diff --git a/vcl/unx/gtk3/a11y/atkhypertext.cxx 
b/vcl/unx/gtk3/a11y/atkhypertext.cxx
index 83f6817fc9e2..c7f9b84b5550 100644
--- a/vcl/unx/gtk3/a11y/atkhypertext.cxx
+++ 

core.git: pyuno/source

2024-03-24 Thread Stephan Bergmann (via logerrit)
 pyuno/source/module/pyuno.cxx|   11 +++
 pyuno/source/module/pyuno_module.cxx |   11 +++
 pyuno/source/module/pyuno_struct.cxx |   11 +++
 3 files changed, 33 insertions(+)

New commits:
commit dae7304df68493afcf6e9c9e490d65ea20d8211f
Author: Stephan Bergmann 
AuthorDate: Sun Mar 24 18:16:59 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Mar 24 23:13:48 2024 +0100

Silence Clang 19 trunk -Werror,-Wcast-function-type-mismatch

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

diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index f21cbb63d2f4..52e8b003fb18 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -1531,7 +1531,18 @@ static PyObject* PyUNO_cmp( PyObject *self, PyObject 
*that, int op )
 
 static PyMethodDef PyUNOMethods[] =
 {
+#if defined __clang__
+#if __has_warning("-Wcast-function-type-mismatch")
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
+#endif
+#endif
 {"__dir__",reinterpret_cast(PyUNO_dir),METH_NOARGS,  
nullptr},
+#if defined __clang__
+#if __has_warning("-Wcast-function-type-mismatch")
+#pragma clang diagnostic pop
+#endif
+#endif
 {nullptr, nullptr,0,   
 nullptr}
 };
 
diff --git a/pyuno/source/module/pyuno_module.cxx 
b/pyuno/source/module/pyuno_module.cxx
index 793aac834b1b..fc0e9939506e 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -849,7 +849,18 @@ struct PyMethodDef PyUNOModule_methods [] =
 {"private_initTestEnvironment", initTestEnvironment, METH_VARARGS, 
nullptr},
 {"private_deinitTestEnvironment", deinitTestEnvironment, METH_VARARGS, 
nullptr},
 {"getComponentContext", getComponentContext, METH_VARARGS, nullptr},
+#if defined __clang__
+#pragma clang diagnostic push
+#if __has_warning("-Wcast-function-type-mismatch")
+#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
+#endif
+#endif
 {"_createUnoStructHelper", 
reinterpret_cast(createUnoStructHelper), METH_VARARGS | 
METH_KEYWORDS, nullptr},
+#if defined __clang__
+#if __has_warning("-Wcast-function-type-mismatch")
+#pragma clang diagnostic pop
+#endif
+#endif
 {"getTypeByName", getTypeByName, METH_VARARGS, nullptr},
 {"getConstantByName", getConstantByName, METH_VARARGS, nullptr},
 {"getClass", getClass, METH_VARARGS, nullptr},
diff --git a/pyuno/source/module/pyuno_struct.cxx 
b/pyuno/source/module/pyuno_struct.cxx
index 364f2776011a..6f4dd47a4b35 100644
--- a/pyuno/source/module/pyuno_struct.cxx
+++ b/pyuno/source/module/pyuno_struct.cxx
@@ -283,7 +283,18 @@ static PyObject* PyUNOStruct_cmp( PyObject *self, PyObject 
*that, int op )
 
 static PyMethodDef PyUNOStructMethods[] =
 {
+#if defined __clang__
+#if __has_warning("-Wcast-function-type-mismatch")
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
+#endif
+#endif
 {"__dir__",reinterpret_cast(PyUNOStruct_dir),
METH_NOARGS,  nullptr},
+#if defined __clang__
+#if __has_warning("-Wcast-function-type-mismatch")
+#pragma clang diagnostic pop
+#endif
+#endif
 {nullptr, nullptr,  0, 
   nullptr}
 };
 


core.git: bridges/inc bridges/source

2024-03-22 Thread Stephan Bergmann (via logerrit)
 bridges/inc/msvc/except.hxx|2 +-
 bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx |3 ---
 bridges/source/cpp_uno/msvc_shared/except.cxx  |2 ++
 3 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit be2f27b011d43cb3a5cb1aa352cc445083948103
Author: Stephan Bergmann 
AuthorDate: Thu Mar 21 14:06:03 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 22 09:57:19 2024 +0100

Make msvc_raiseException explicitly [[noreturn]]

The comments at


"framework: MenuBarManager: fix WNT crash if queryDispatch() throws" suggest
that it was observed returning normally, and running into the

> // is here for dummy
> return typelib_TypeClass_VOID;

in cpp2uno_call.

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

diff --git a/bridges/inc/msvc/except.hxx b/bridges/inc/msvc/except.hxx
index f1403a43af88..29fe007a435f 100644
--- a/bridges/inc/msvc/except.hxx
+++ b/bridges/inc/msvc/except.hxx
@@ -33,7 +33,7 @@ typedef struct _uno_Any uno_Any;
 typedef struct _uno_Mapping uno_Mapping;
 
 int msvc_filterCppException(EXCEPTION_POINTERS*, uno_Any*, uno_Mapping*);
-void msvc_raiseException(uno_Any*, uno_Mapping*);
+[[noreturn]] void msvc_raiseException(uno_Any*, uno_Mapping*);
 
 constexpr DWORD MSVC_EH_MAGIC_PARAM = 0x19930520;
 // The NT Exception code that msvcrt uses ('msc' | 0xE000)
diff --git a/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx 
b/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx
index 15aa14d9b90b..d2bbf5ab22b4 100644
--- a/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx
@@ -163,9 +163,6 @@ cpp2uno_call(bridges::cpp_uno::shared::CppInterfaceProxy* 
pThis,
 TYPELIB_DANGER_RELEASE(pReturnTD);
 
 msvc_raiseException(, pThis->getBridge()->getUno2Cpp()); // 
has to destruct the any
-
-// is here for dummy
-return typelib_TypeClass_VOID;
 }
 else // no exception occurred...
 {
diff --git a/bridges/source/cpp_uno/msvc_shared/except.cxx 
b/bridges/source/cpp_uno/msvc_shared/except.cxx
index b68dd41d6bdc..b6c6715e0336 100644
--- a/bridges/source/cpp_uno/msvc_shared/except.cxx
+++ b/bridges/source/cpp_uno/msvc_shared/except.cxx
@@ -21,6 +21,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -196,6 +197,7 @@ void msvc_raiseException(uno_Any* pUnoExc, uno_Mapping* 
pUno2Cpp)
 
 // last point to release anything not affected by stack unwinding
 RaiseException(MSVC_EH_MAGIC_CODE, EXCEPTION_NONCONTINUABLE, 
MSVC_EH_PARAMETERS, arFilterArgs);
+std::abort();
 }
 
 // This function does the same check as __CxxDetectRethrow from msvcrt (see its


core.git: 3 commits - solenv/gbuild

2024-03-22 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/gbuild.help.txt |3 +--
 solenv/gbuild/gbuild.mk   |   35 ++-
 2 files changed, 15 insertions(+), 23 deletions(-)

New commits:
commit b42429f68cb83fcfc5de102b0922b05ecd6c528e
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 22:53:27 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 22 08:42:25 2024 +0100

Determine OSL_DEBUG_LEVEL directly from dbglevel

...and reorder the code a bit, so that the dbglevel-releated code is 
separated
from the gb_ENABLE_SYMBOLS_FOR-related code

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

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 42a2617b92c1..a36b2b758479 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -84,31 +84,30 @@ ifneq ($(strip $(TIMELOG)$(timelog)),)
 gb_TIMELOG := 1
 endif
 
+ifeq ($(strip $(dbglevel)),)
+ifeq ($(debug),)
+dbglevel := 0
+else
+dbglevel := 1
+endif
+endif
+
 gb_ENABLE_SYMBOLS_FOR := $(ENABLE_SYMBOLS_FOR)
 
 # enable_symbols (presumably from the command line)
 ifneq ($(strip $(enable_symbols)),)
 gb_ENABLE_SYMBOLS_FOR := $(enable_symbols)
 endif
-
-# note: ENABLE_BREAKPAD turns on symbols
-ifneq ($(strip $(ENABLE_BREAKPAD)),)
-gb_ENABLE_SYMBOLS_FOR := all
-endif
-
-gb_DEBUGLEVEL := 0
-ifneq ($(strip $(debug)),)
-gb_DEBUGLEVEL := 1
 ifeq ($(origin debug),command line)
 gb_ENABLE_SYMBOLS_FOR := all
 endif
-endif
-
-ifneq ($(strip $(dbglevel)),)
-gb_DEBUGLEVEL := $(strip $(dbglevel))
 ifeq ($(origin dbglevel),command line)
 gb_ENABLE_SYMBOLS_FOR := all
 endif
+
+# note: ENABLE_BREAKPAD turns on symbols
+ifneq ($(strip $(ENABLE_BREAKPAD)),)
+gb_ENABLE_SYMBOLS_FOR := all
 endif
 
 # handle special cases
@@ -206,7 +205,7 @@ gb_CPUDEFS += -D$(CPUNAME)
 
 gb_GLOBALDEFS := \
-D_REENTRANT \
-   -DOSL_DEBUG_LEVEL=$(gb_DEBUGLEVEL) \
+   -DOSL_DEBUG_LEVEL=$(dbglevel) \
$(gb_OSDEFS) \
$(gb_COMPILERDEFS) \
$(gb_CPUDEFS) \
commit 8e10fd30cf7ef5774c54dc2dce0f8e00b279b106
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 22:34:39 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 22 08:42:18 2024 +0100

$(ENABLE_DBGUTIL) implies $(debug) (aka $(ENABLE_DEBUG))

...so no need to check the former in addition to the latter (which is done 
a few
lines up)

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

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index d842e0af0b86..42a2617b92c1 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -103,9 +103,6 @@ ifeq ($(origin debug),command line)
 gb_ENABLE_SYMBOLS_FOR := all
 endif
 endif
-ifeq ($(ENABLE_DBGUTIL),TRUE)
-gb_DEBUGLEVEL := 1
-endif
 
 ifneq ($(strip $(dbglevel)),)
 gb_DEBUGLEVEL := $(strip $(dbglevel))
commit 21d51ae1a41dca6198a3d8563873cbeccb960a26
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 22:25:48 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 22 08:42:10 2024 +0100

Drop upper-case ENABLE_SYMBOLS, consolidate on lower-case enable_symbols

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

diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index 1ced8090a458..647bd74afea1 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -111,8 +111,7 @@ INTERACTIVE VARIABLES:
valgrind or a debugger:
BUILDTOOLTRACE='$(DEVENV) /debugexe' PARALLELISM=1 make
debug   If not empty, build as with --enable-debug.
-   ENABLE_SYMBOLS / enable_symbols
-   If not empty, build as with --enable-symbols.
+   enable_symbols  If not empty, build as with --enable-symbols.
dbglevelIf not empty, force the debug level to the specified 
value. The
debug level is passed to the source code through 
OSL_DEBUG_LEVEL
macro.
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 5b76a58bdada..d842e0af0b86 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -86,10 +86,7 @@ endif
 
 gb_ENABLE_SYMBOLS_FOR := $(ENABLE_SYMBOLS_FOR)
 
-# ENABLE_SYMBOLS (presumably from the command line)
-ifneq ($(strip $(ENABLE_SYMBOLS)),)
-gb_ENABLE_SYMBOLS_FOR := $(ENABLE_SYMBOLS)
-endif
+# enable_symbols (presumably from the command line)
 ifneq ($(strip $(enable_symbols)),)
 gb_ENABLE_SYMBOLS_FOR := $(enable_symbols)
 endif


core.git: 2 commits - solenv/gbuild

2024-03-22 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/gbuild.help.txt   |2 +-
 solenv/gbuild/gbuild.mk |   17 ++---
 solenv/gbuild/platform/com_GCC_defs.mk  |4 ++--
 solenv/gbuild/platform/com_MSC_class.mk |2 +-
 4 files changed, 6 insertions(+), 19 deletions(-)

New commits:
commit 42a76c7bf5a6c5cc60487f4bdc7bf0a7bab3c47a
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 22:13:22 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 22 08:42:03 2024 +0100

Drop upper-case DEBUG, consolidate on lower-case debug

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

diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index fb12142d4aff..1ced8090a458 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -110,7 +110,7 @@ INTERACTIVE VARIABLES:
BUILDTOOLTRACE  Run all commands that invoke built tools in strace,
valgrind or a debugger:
BUILDTOOLTRACE='$(DEVENV) /debugexe' PARALLELISM=1 make
-   DEBUG / debug   If not empty, build as with --enable-debug.
+   debug   If not empty, build as with --enable-debug.
ENABLE_SYMBOLS / enable_symbols
If not empty, build as with --enable-symbols.
dbglevelIf not empty, force the debug level to the specified 
value. The
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index f91663e217d1..5b76a58bdada 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -100,13 +100,6 @@ gb_ENABLE_SYMBOLS_FOR := all
 endif
 
 gb_DEBUGLEVEL := 0
-ifneq ($(strip $(DEBUG)),)
-gb_DEBUGLEVEL := 1
-# make DEBUG=true should force -g
-ifeq ($(origin DEBUG),command line)
-gb_ENABLE_SYMBOLS_FOR := all
-endif
-endif
 ifneq ($(strip $(debug)),)
 gb_DEBUGLEVEL := 1
 ifeq ($(origin debug),command line)
commit 77b09314b45c178bb8b93e887efb99162c070ab3
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 21:16:12 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 22 08:41:55 2024 +0100

Drop redundant gb_ENABLE_DBGUTIL

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

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 9b3b1d519b05..f91663e217d1 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -84,12 +84,6 @@ ifneq ($(strip $(TIMELOG)$(timelog)),)
 gb_TIMELOG := 1
 endif
 
-ifneq ($(ENABLE_DBGUTIL),)
-gb_ENABLE_DBGUTIL := $(true)
-else
-gb_ENABLE_DBGUTIL := $(false)
-endif
-
 gb_ENABLE_SYMBOLS_FOR := $(ENABLE_SYMBOLS_FOR)
 
 # ENABLE_SYMBOLS (presumably from the command line)
@@ -119,7 +113,7 @@ ifeq ($(origin debug),command line)
 gb_ENABLE_SYMBOLS_FOR := all
 endif
 endif
-ifeq ($(gb_ENABLE_DBGUTIL),$(true))
+ifeq ($(ENABLE_DBGUTIL),TRUE)
 gb_DEBUGLEVEL := 1
 endif
 
@@ -230,7 +224,7 @@ gb_GLOBALDEFS := \
$(gb_COMPILERDEFS) \
$(gb_CPUDEFS) \
 
-ifeq ($(gb_ENABLE_DBGUTIL),$(true))
+ifeq ($(ENABLE_DBGUTIL),TRUE)
 gb_GLOBALDEFS += -DDBG_UTIL
 
 ifneq ($(COM)-$(MSVC_USE_DEBUG_RUNTIME),MSC-)
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index 57338bc7f170..e8bf170bd454 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -49,7 +49,7 @@ gb_COMPILERDEFS := \
$(if $(filter EMSCRIPTEN,$(OS)),-U_FORTIFY_SOURCE) \
 
 # enable debug STL
-ifeq ($(gb_ENABLE_DBGUTIL),$(true))
+ifeq ($(ENABLE_DBGUTIL),TRUE)
 ifneq ($(HAVE_LIBSTDCPP),)
 gb_COMPILERDEFS_STDLIB_DEBUG = -D_GLIBCXX_DEBUG
 else
@@ -202,7 +202,7 @@ endif
 gb_LinkTarget_EXCEPTIONFLAGS := \
-fexceptions
 
-ifeq ($(gb_ENABLE_DBGUTIL),$(false))
+ifeq ($(ENABLE_DBGUTIL),)
 # Clang doesn't have this option
 ifeq ($(HAVE_GCC_FNO_ENFORCE_EH_SPECS),TRUE)
 gb_LinkTarget_EXCEPTIONFLAGS += \
diff --git a/solenv/gbuild/platform/com_MSC_class.mk 
b/solenv/gbuild/platform/com_MSC_class.mk
index 6c3182b54aa4..eccc64e1b2f1 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -330,7 +330,7 @@ gb_Windows_PE_TARGETTYPEFLAGS := \
-manifest
 
 # link.exe in -LIB mode doesn't understand -debug, use it only for EXEs and 
DLLs
-ifeq ($(gb_ENABLE_DBGUTIL),$(true))
+ifeq ($(ENABLE_DBGUTIL),TRUE)
 # fastlink is faster but pdb files reference .obj files
 # but don't do that for setup_native DLLs: this produces make error 139 in 
some configurations
 gb_Windows_PE_TARGETTYPEFLAGS_DEBUGINFO = $(if $(filter 
-U_DLL,$(1)),-debug,-debug:fastlink)


core.git: solenv/gbuild

2024-03-21 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/gbuild.help.txt |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 70c3e8d89983320e4815d92dd232a2840432f620
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 13:31:28 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 21 22:01:42 2024 +0100

Fix text layout in gbuild.help.txt

...left inconsistent by recent 76a986da868c52e9bd1cc6d219ed8f9441afd32b 
"Drop
upper-case DBGLEVEL, consolidate on lower-case dbglevel"

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

diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index fc857b734a4d..fb12142d4aff 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -113,8 +113,7 @@ INTERACTIVE VARIABLES:
DEBUG / debug   If not empty, build as with --enable-debug.
ENABLE_SYMBOLS / enable_symbols
If not empty, build as with --enable-symbols.
-   dbglevel
-   If not empty, force the debug level to the specified 
value. The
+   dbglevelIf not empty, force the debug level to the specified 
value. The
debug level is passed to the source code through 
OSL_DEBUG_LEVEL
macro.
0 = no debug (as with --disable-debug)


core.git: configure.ac

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

New commits:
commit 14bf98b9bb3765b935316bd3a972f8ef7bb4d21e
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 22:19:08 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 21 16:57:37 2024 +0100

Update the Android "enough memory for linking" check

...which had been introduced with 149792414e767c7526123f0e2abb7c4dc9491fa0
"android: add a check for the installed memory in the machine", presumably 
at a
time when there were ENABLE_SYMBOLS and ENABLE_DEBUGINFO_FOR variables, 
both of
which appear to no longer exist.  So use the existing ENABLE_SYMBOLS_FOR
instead.

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

diff --git a/configure.ac b/configure.ac
index e03fa2363f03..507fef7e9d34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5027,7 +5027,7 @@ else
 fi
 AC_SUBST(ENABLE_SYMBOLS_FOR)
 
-if test -n "$with_android_ndk" -a \( -n "$ENABLE_SYMBOLS" -o -n 
"$ENABLE_DEBUG" -o -n "$ENABLE_DBGUTIL" \) -a "$ENABLE_DEBUGINFO_FOR" = "all"; 
then
+if test -n "$with_android_ndk" -a \( -n "$ENABLE_DEBUG" -o -n 
"$ENABLE_DBGUTIL" \) -a "$ENABLE_SYMBOLS_FOR" = "all"; then
 # Building on Android with full symbols: without enough memory the linker 
never finishes currently.
 AC_MSG_CHECKING([whether enough memory is available for linking])
 mem_size=$(grep -o 'MemTotal: *.\+ kB' /proc/meminfo | sed 's/MemTotal: 
*\(.\+\) kB//')


core.git: apple_remote/source desktop/source editeng/source extensions/source hwpfilter/source i18nlangtag/source include/default.rc oox/source sd/source setup_native/source sfx2/source shell/inc sole

2024-03-21 Thread Stephan Bergmann (via logerrit)
 apple_remote/source/AppleRemote.m|
2 
 apple_remote/source/GlobalKeyboardDevice.m   |
2 
 apple_remote/source/RemoteControl.m  |   
16 +-
 apple_remote/source/RemoteControlContainer.m |   
10 -
 apple_remote/source/RemoteMainController.m   |   
14 +-
 desktop/source/app/check_ext_deps.cxx|
4 
 editeng/source/editeng/editview.cxx  |
2 
 editeng/source/editeng/impedit4.cxx  |
4 
 extensions/source/update/feed/updatefeed.cxx |
2 
 hwpfilter/source/formula.cxx |   
58 +-
 hwpfilter/source/mapping.h   |
2 
 i18nlangtag/source/isolang/inunx.cxx |
2 
 include/default.rc   |
2 
 oox/source/drawingml/customshapeproperties.cxx   |
4 
 oox/source/drawingml/customshapes/generate.sh|
2 
 oox/source/ole/axcontrol.cxx |
2 
 sd/source/core/CustomAnimationPreset.cxx |
6 -
 sd/source/filter/eppt/pptx-epptooxml.cxx |
2 
 sd/source/ui/framework/module/ShellStackGuard.cxx|
2 
 setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx  |
2 
 setup_native/source/win32/customactions/shellextensions/checkpatches.cxx |
2 
 setup_native/source/win32/customactions/tools/checkversion.cxx   |
2 
 setup_native/source/win32/customactions/tools/seterror.cxx   |
2 
 sfx2/source/sidebar/DeckTitleBar.cxx |
2 
 sfx2/source/sidebar/Panel.cxx|
2 
 sfx2/source/sidebar/SidebarController.cxx|
2 
 sfx2/source/sidebar/SidebarToolBox.cxx   |
2 
 sfx2/source/sidebar/TabBar.cxx   |
2 
 shell/inc/utilities.hxx  |
2 
 solenv/gbuild/gbuild.mk  |
7 -
 soltools/mkdepend/def.h  |
2 
 soltools/mkdepend/main.c |
4 
 svl/source/items/stylepool.cxx   |
8 -
 vcl/osx/salinst.cxx  |
2 
 vcl/osx/vclnsapp.mm  |
4 
 vcl/unx/generic/fontmanager/fontsubst.cxx|
4 
 vcl/unx/generic/gdi/salgdi.cxx   |
2 
 37 files changed, 92 insertions(+), 99 deletions(-)

New commits:
commit 9adcf67c9b164d019eebe45279bcaa91b0ce471a
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 14:23:40 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 21 16:30:59 2024 +0100

Drop C/C++ DEBUG macro

...(that was defined iff OSL_DEBUG_LEVEL >= 2) and replace its uses with
OSL_DEBUG_LEVEL directly

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

diff --git a/apple_remote/source/AppleRemote.m 
b/apple_remote/source/AppleRemote.m
index fe50af4cc1be..ac062f28a4d5 100644
--- a/apple_remote/source/AppleRemote.m
+++ b/apple_remote/source/AppleRemote.m
@@ -48,7 +48,7 @@ static const char* AppleRemoteDeviceName = 
"AppleIRController";
 - (void) setCookieMappingInDictionary: (NSMutableDictionary*) 
_cookieToButtonMapping   {
 
 // TODO : avoid such magics
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
 NSLog( @"Apple Remote: setting 10.6 cookies" );
 #endif
 // 10.6.x Snow Leopard
diff --git a/apple_remote/source/GlobalKeyboardDevice.m 
b/apple_remote/source/GlobalKeyboardDevice.m
index cbd78f5b011c..a44f30f1ba55 100644
--- a/apple_remote/source/GlobalKeyboardDevice.m
+++ b/apple_remote/source/GlobalKeyboardDevice.m
@@ -111,7 +111,7 @@ static OSStatus hotKeyEventHandler(EventHandlerCallRef, 
EventRef, void*);
 defaultsKey = @"playhold";
 break;
 default:
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
 NSLog( @"Apple Remote: Unknown global keyboard defaults key for 
button identifier %d", remoteButtonIdentifier);
 #endif
 break;
diff --git a/apple_remote/source/RemoteControl.m 
b/apple_remote/source/RemoteControl.m
index 2d4021a910b1..e0dccb344331 100644
--- a/apple_remote/source/RemoteControl.m
+++ 

core.git: solenv/gbuild

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

New commits:
commit 03ab46c8a189b751ed1acffd0b575fae584c1d00
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 20:59:34 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 21 16:30:16 2024 +0100

Use ENABLE_DEBUG as a better indicator for "debug build"

...than gb_DEBUGLEVEL as had been chosen by
448008d64c643d5a1aa2dc5479efcd709a50 "only enable windows incremental
linking for debug builds"

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

diff --git a/solenv/gbuild/platform/com_MSC_class.mk 
b/solenv/gbuild/platform/com_MSC_class.mk
index 3ebbbabd49f9..6c3182b54aa4 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -323,7 +323,7 @@ endef
 gb_Windows_PE_TARGETTYPEFLAGS := \
-release \
-opt:noref \
-   $(if $(filter 0,$(gb_DEBUGLEVEL)), -incremental:no) \
+   $(if $(ENABLE_DEBUG),, -incremental:no) \
$(if $(filter NO,$(LIBRARY_X64)), -safeseh) \
-nxcompat \
-dynamicbase \


core.git: slideshow/Library_OGLTrans.mk slideshow/Library_slideshow.mk slideshow/source

2024-03-21 Thread Stephan Bergmann (via logerrit)
 slideshow/Library_OGLTrans.mk  |6 --
 slideshow/Library_slideshow.mk |6 --
 slideshow/source/engine/smilfunctionparser.cxx |   19 ---
 3 files changed, 31 deletions(-)

New commits:
commit 5f2bc59ee9acfb24fc8e5bcc05012f130a360a82
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 22:01:44 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 21 12:28:32 2024 +0100

Drop remaining boost/shared_pointer debug functionality

...most of which had already been removed with
4e354737908b89713297ebf5216eb44f3d9ae990 "remove boost/shared_ptr foo".
4c657f5a1a340ec9afe795d911625991f6a9cf7a "Properly #if these debug hooks" 
had
noted that slideshow/source/engine/smilfunctionparser.cxx "still indirectly
includes boost/scoped_ptr.hpp via. boost/spirit", but lets assume that 
nobody
actually relied on this functionality (and however it would actually work in
practice).

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

diff --git a/slideshow/Library_OGLTrans.mk b/slideshow/Library_OGLTrans.mk
index 85051483df66..4887e3dfb78c 100644
--- a/slideshow/Library_OGLTrans.mk
+++ b/slideshow/Library_OGLTrans.mk
@@ -9,12 +9,6 @@
 
 $(eval $(call gb_Library_Library,OGLTrans))
 
-ifneq ($(strip $(debug)$(DEBUG)),)
-$(eval $(call gb_Library_add_defs,OGLTrans,\
--DBOOST_SP_ENABLE_DEBUG_HOOKS \
-))
-endif
-
 $(eval $(call gb_Library_add_defs,OGLTrans,\
 -DGLM_FORCE_RADIANS \
 ))
diff --git a/slideshow/Library_slideshow.mk b/slideshow/Library_slideshow.mk
index 3b9f3fb3f095..3bea78134569 100644
--- a/slideshow/Library_slideshow.mk
+++ b/slideshow/Library_slideshow.mk
@@ -14,12 +14,6 @@ $(eval $(call gb_Library_set_include,slideshow,\
 -I$(SRCDIR)/slideshow/source/inc \
 ))
 
-ifneq ($(strip $(debug)$(DEBUG)),)
-$(eval $(call gb_Library_add_defs,slideshow,\
--DBOOST_SP_ENABLE_DEBUG_HOOKS \
-))
-endif
-
 $(eval $(call 
gb_Library_set_precompiled_header,slideshow,slideshow/inc/pch/precompiled_slideshow))
 
 $(eval $(call gb_Library_use_externals,slideshow,\
diff --git a/slideshow/source/engine/smilfunctionparser.cxx 
b/slideshow/source/engine/smilfunctionparser.cxx
index 1859b7e1688b..6482be4a2316 100644
--- a/slideshow/source/engine/smilfunctionparser.cxx
+++ b/slideshow/source/engine/smilfunctionparser.cxx
@@ -607,23 +607,4 @@ namespace slideshow::internal
 }
 }
 
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
-
-// debug hooks
-
-namespace boost
-{
-
-void sp_scalar_constructor_hook(void *)
-{
-}
-
-void sp_scalar_destructor_hook(void *)
-{
-}
-
-}
-
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: solenv/gbuild

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

New commits:
commit f9da95ca43dc10cda99d985a6365aec2ede3be4f
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 17:57:49 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 21 11:35:00 2024 +0100

Assume this hack is actually needed for --enable-optimized

...and not for whatever dbglevel is set.  (The latest claim that this hack 
is
still needed at all is in the 2020-12-14 commit message
e0a90aa3239621958bddbb30f98163e8c1ef857f "The workaround for MSVC C4702 is 
still
needed".)

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

diff --git a/solenv/gbuild/platform/com_MSC_defs.mk 
b/solenv/gbuild/platform/com_MSC_defs.mk
index fa6a2d45bd58..2f1b653bef47 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -175,7 +175,7 @@ ifneq ($(COM_IS_CLANG),TRUE)
 # https://lists.freedesktop.org/archives/libreoffice/2018-July/080532.html
 # https://lists.freedesktop.org/archives/libreoffice/2018-August/080776.html
 gb_CXXFLAGS += \
-   $(if $(filter 0,$(gb_DEBUGLEVEL)),-wd4702) \
+   $(if $(ENABLE_OPTIMIZED),-wd4702) \
 
 endif
 


core.git: jvmfwk/CustomTarget_jreproperties.mk qadevOOo/Jar_OOoRunner.mk solenv/gbuild

2024-03-21 Thread Stephan Bergmann (via logerrit)
 jvmfwk/CustomTarget_jreproperties.mk |2 +-
 qadevOOo/Jar_OOoRunner.mk|3 ---
 solenv/gbuild/JavaClassSet.mk|8 ++--
 3 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 71ee4d75d34a25c56d1faf2f89ab57bf79a26e0f
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 16:52:15 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 21 09:41:57 2024 +0100

Tie javac -g option to --enable-symbols instead of gb_DEBUGLEVEL

...which appears to be a better fit.  Now, gb_JavaClassSet_JAVACDEBUG is
unconditionally defined as -g, but conditionally only used if
gb_target_symbols_enabled is true for the given target (where the target is
spelled "Jar/..." resp. "CustomTarget_jvmfwk/jreproperties" for the
--enable-sybmols=... mini-language in configure.ac).  Also, the odd special 
case
to "force debug information for OOoRunner" has just been dropped.

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

diff --git a/jvmfwk/CustomTarget_jreproperties.mk 
b/jvmfwk/CustomTarget_jreproperties.mk
index da509dbff5ac..0d6399a19369 100644
--- a/jvmfwk/CustomTarget_jreproperties.mk
+++ b/jvmfwk/CustomTarget_jreproperties.mk
@@ -17,7 +17,7 @@ $(call 
gb_CustomTarget_get_workdir,jvmfwk/jreproperties)/JREProperties.class : \
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JCS,1)
$(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),JCS)
$(call gb_Helper_abbreviate_dirs, \
-   cd $(dir $@) && $(call gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) 
 $(gb_JavaClassSet_JAVACDEBUG) -d $(dir $@) $^)
+   cd $(dir $@) && $(call gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) 
 $(if $(call 
gb_target_symbols_enabled,CustomTarget_jvmfwk/jreproperties),$(gb_JavaClassSet_JAVACDEBUG))
 -d $(dir $@) $^)
$(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),JCS)
 
 # vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index e0514bc74b30..a5e71210948d 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -8,9 +8,6 @@
 #
 #
 
-#force debug information for OOoRunner
-gb_JavaClassSet_JAVACDEBUG:= -g
-
 $(eval $(call gb_Jar_Jar,OOoRunner))
 
 $(eval $(call gb_Jar_add_manifest_classpath,OOoRunner,\
diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index 8acf120dd615..8b769624c12e 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -23,15 +23,11 @@ gb_JavaClassSet_JAVACCOMMAND = $(ICECREAM_RUN) 
$(JAVACOMPILER) $(JAVACFLAGS) \
 -Xlint:-options \
 -Xlint:unchecked
 
-gb_JavaClassSet_JAVACDEBUG :=
-
 # Enforces correct dependency order for possibly generated stuff:
 # generated sources, jars/classdirs etc.
 gb_JavaClassSet_get_preparation_target = $(WORKDIR)/JavaClassSet/$(1).prepared
 
-ifneq ($(gb_DEBUGLEVEL),0)
 gb_JavaClassSet_JAVACDEBUG := -g
-endif
 
 # $(PACKAGEDIRS) inherited from Jar -- assumption is the last part of the path
 # is top-level java package directory
@@ -46,7 +42,7 @@ $(call gb_Helper_abbreviate_dirs,\
RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),\
$(filter-out $(JARDEPS) $(T_JAVA9FILES),$(4))) && \
$(if $(3),$(call 
gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) \
-   $(gb_JavaClassSet_JAVACDEBUG) \
+   $(if $(call 
gb_target_symbols_enabled,$(2)),$(gb_JavaClassSet_JAVACDEBUG)) \
-classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call 
gb_JavaClassSet_get_classdir,$(2))" \
-d $(call gb_JavaClassSet_get_classdir,$(2)) \
@$$RESPONSEFILE &&) \
@@ -55,7 +51,7 @@ $(call gb_Helper_abbreviate_dirs,\
RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),\
$(T_JAVA9FILES)) && \
$(if $(3),$(call gb_JavaClassSet_JAVACCOMMAND,9) \
-   $(gb_JavaClassSet_JAVACDEBUG) \
+   $(if $(call 
gb_target_symbols_enabled,$(2)),$(gb_JavaClassSet_JAVACDEBUG)) \
-classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call 
gb_JavaClassSet_get_classdir,$(2))" \
--module-path "$(T_CP)$(gb_CLASSPATHSEP)$(call 
gb_JavaClassSet_get_classdir,$(2))" \
$(if $(T_MODULENAME),--patch-module 
$(T_MODULENAME)="$(subst $(WHITESPACE),$(gb_CLASSPATHSEP),$(strip $(dir 
$(PACKAGEDIRS") \


core.git: sal/Executable_cppunittester.mk

2024-03-21 Thread Stephan Bergmann (via logerrit)
 sal/Executable_cppunittester.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 05252f87e0d5f999be17c020d16217785fa2419f
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 21:37:43 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 21 08:05:03 2024 +0100

Use consistent conditions in code and makefile

24b06b9c6bdb777dff385b0fbfc81d55d3d013a1 "log access violation on windows
tinderboxen" introduced C++ code into sal/cppunittester/cppunittester.cxx 
that
is conditional on "#if defined(_DEBUG)" (which is defined iff
$(MSVC_USE_DEBUG_RUNTIME) is TRUE, see the setting of -D_DEBUG in
solenv/gbuild/gbuild.mk), and it introduced this corresponding makefile code
which should thus use the same condition.

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

diff --git a/sal/Executable_cppunittester.mk b/sal/Executable_cppunittester.mk
index 959b3cd8be47..6c52197b22ce 100644
--- a/sal/Executable_cppunittester.mk
+++ b/sal/Executable_cppunittester.mk
@@ -28,7 +28,7 @@ $(eval $(call 
gb_Executable_add_exception_objects,cppunittester,\
sal/cppunittester/cppunittester \
 ))
 
-ifneq ($(strip $(debug)$(DEBUG)),)
+ifneq ($(MSVC_USE_DEBUG_RUNTIME),)
 $(eval $(call gb_Executable_use_system_win32_libs,cppunittester,\
dbghelp \
 ))


core.git: sc/Library_sc.mk

2024-03-21 Thread Stephan Bergmann (via logerrit)
 sc/Library_sc.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a803d6862c0fe0fdda8e0f615de5f76cb3adbb75
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 21:12:29 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 21 08:04:33 2024 +0100

$(gb_ENABLE_DBGUTIL) is never empty

...as it is always either $(true) or $(false).  This had been introduced 
with
503ed2f8e3fdbb4d7583b67b0bafcaccc896a5ae "extract calc data dump method 
into own
file", but better directly use ENABLE_DBGUTIL.

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

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 91ffcced298b..273eaab04435 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -715,7 +715,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 ))
 endif
 
-ifneq (,$(gb_ENABLE_DBGUTIL))
+ifneq (,$(ENABLE_DBGUTIL))
 $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/ui/view/gridwin_dbgutil \
 ))


core.git: solenv/gbuild

2024-03-21 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/gbuild.help.txt |2 +-
 solenv/gbuild/gbuild.mk   |6 --
 2 files changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 76a986da868c52e9bd1cc6d219ed8f9441afd32b
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 13:31:28 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 21 08:03:08 2024 +0100

Drop upper-case DBGLEVEL, consolidate on lower-case dbglevel

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

diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index c677541309f5..fc857b734a4d 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -113,7 +113,7 @@ INTERACTIVE VARIABLES:
DEBUG / debug   If not empty, build as with --enable-debug.
ENABLE_SYMBOLS / enable_symbols
If not empty, build as with --enable-symbols.
-   DBGLEVEL / dbglevel
+   dbglevel
If not empty, force the debug level to the specified 
value. The
debug level is passed to the source code through 
OSL_DEBUG_LEVEL
macro.
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index f14e9f1a1ed4..eb80cfa368f5 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -123,12 +123,6 @@ ifeq ($(gb_ENABLE_DBGUTIL),$(true))
 gb_DEBUGLEVEL := 1
 endif
 
-ifneq ($(strip $(DBGLEVEL)),)
-gb_DEBUGLEVEL := $(strip $(DBGLEVEL))
-ifeq ($(origin DBGLEVEL),command line)
-gb_ENABLE_SYMBOLS_FOR := all
-endif
-endif
 ifneq ($(strip $(dbglevel)),)
 gb_DEBUGLEVEL := $(strip $(dbglevel))
 ifeq ($(origin dbglevel),command line)


core.git: configure.ac

2024-03-20 Thread Stephan Bergmann (via logerrit)
 configure.ac |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 31b18d5a5f652dc1bb82ec2828e5f3a951590301
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 15:02:02 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 20 21:51:47 2024 +0100

Allow extra options in JAVACOMPILER env var

...similar to how we support this for other vars like CC and CXX.  (I 
currently
need this to add -J-Xint to JAVACOMPILER in an attempt to work around the 
issue
described in  where 
macOS
now sends uncatchable SIGKILL instead of SIGSEGV to the JVM process in 
response
to a Java null pointer deref.)

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

diff --git a/configure.ac b/configure.ac
index 81d9ec93ac19..e03fa2363f03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14165,7 +14165,7 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" 
-a "$cross_compiling" != "
 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
 fi
 printf 'import org.junit.Before;' > conftest.java
-if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
+if $JAVACOMPILER -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
 AC_MSG_RESULT([$OOO_JUNIT_JAR])
 else
 AC_MSG_ERROR(
@@ -14179,7 +14179,7 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" 
-a "$cross_compiling" != "
 
 AC_MSG_CHECKING([for included Hamcrest])
 printf 'import org.hamcrest.BaseDescription;' > conftest.java
-if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
+if $JAVACOMPILER -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
 AC_MSG_RESULT([Included in $OOO_JUNIT_JAR])
 else
 AC_MSG_RESULT([Not included])
@@ -14200,7 +14200,7 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" 
-a "$cross_compiling" != "
 if test "$_os" = "WINNT"; then
 HAMCREST_JAR=`cygpath -m "$HAMCREST_JAR"`
 fi
-if "$JAVACOMPILER" -classpath "$HAMCREST_JAR" conftest.java >&5 2>&5; 
then
+if $JAVACOMPILER -classpath "$HAMCREST_JAR" conftest.java >&5 2>&5; 
then
 AC_MSG_RESULT([$HAMCREST_JAR])
 else
 AC_MSG_ERROR([junit does not contain hamcrest; please use a junit 
jar that includes hamcrest, install a hamcrest jar in the default location 
(/usr/share/java),


core.git: static/CustomTarget_emscripten_fs_image.mk

2024-03-20 Thread Stephan Bergmann (via logerrit)
 static/CustomTarget_emscripten_fs_image.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e68a15941926965575cedcacbe0d30388bef
Author: Stephan Bergmann 
AuthorDate: Wed Mar 20 10:19:12 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 20 13:01:20 2024 +0100

Fix `cd static && make` for emscripten build

...which failed with

> error: instdir/program/types/offapi.rdb does not exist

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

diff --git a/static/CustomTarget_emscripten_fs_image.mk 
b/static/CustomTarget_emscripten_fs_image.mk
index fdae208b5e88..89b0c628b4c8 100644
--- a/static/CustomTarget_emscripten_fs_image.mk
+++ b/static/CustomTarget_emscripten_fs_image.mk
@@ -1524,6 +1524,7 @@ $(emscripten_fs_image_WORKDIR)/soffice.data.filelist: \
 # relative to $(BUILDDIR), so we won't run out of cmdline space that fast...
 $(emscripten_fs_image_WORKDIR)/soffice.data.js.metadata: 
$(emscripten_fs_image_WORKDIR)/soffice.data.filelist
$(call gb_Output_announce,$(subst 
$(BUILDDIR)/,,$(emscripten_fs_image_WORKDIR)/soffice.data),$(true),GEN,2)
+   cd $(BUILDDIR) && \
$(EMSDK_FILE_PACKAGER) $(emscripten_fs_image_WORKDIR)/soffice.data 
--preload $(shell cat $^) 
--js-output=$(emscripten_fs_image_WORKDIR)/soffice.data.js --separate-metadata \
|| rm -f $(emscripten_fs_image_WORKDIR)/soffice.data.js 
$(emscripten_fs_image_WORKDIR)/soffice.data 
$(emscripten_fs_image_WORKDIR)/soffice.data.js.metadata
 


core.git: solenv/qa

2024-03-20 Thread Stephan Bergmann (via logerrit)
 solenv/qa/python/gbuildtojson.py |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0020fc1167b3760d0631001689a44427b72b816e
Author: Stephan Bergmann 
AuthorDate: Tue Mar 19 15:03:37 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 20 08:07:29 2024 +0100

Fix PythonTest_solenv_python for Linux --enable-mergelibs=more

...where it recently started to fail for me with

> ==
> ERROR: test_gbuildtojson (gbuildtojson.CheckGbuildToJsonModules)
> --
> Traceback (most recent call last):
>   File "solenv/qa/python/gbuildtojson.py", line 147, in test_gbuildtojson
> jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 
'Library'))
> FileNotFoundError: [Errno 2] No such file or directory: 
'/tmp/gbuildffqxqxbf/GbuildToJson/Library'

presumably because none of the modules iterated over there happen to put any
files into the GbuildToJson/Library directory (and, by doing so, would 
create
that directory)

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

diff --git a/solenv/qa/python/gbuildtojson.py b/solenv/qa/python/gbuildtojson.py
index a6ba733d06b6..d8434acc5216 100644
--- a/solenv/qa/python/gbuildtojson.py
+++ b/solenv/qa/python/gbuildtojson.py
@@ -144,7 +144,10 @@ class CheckGbuildToJsonModules(unittest.TestCase):
 bashscript.close()
 subprocess.check_call([self.bash, bashscriptname.replace('\', 
'/')])
 os.remove(bashscriptname)
-jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 
'Library'))
+try:
+jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 
'Library'))
+except FileNotFoundError:
+jsonfiles = []
 gbuildlibs = []
 for jsonfilename in jsonfiles:
 with open(os.path.join(self.tempwork, 'GbuildToJson', 'Library', 
jsonfilename), 'r') as f:


  1   2   3   4   5   6   7   8   9   10   >