core.git: Branch 'distro/mimo/mimo-6-2' - 2 commits - configure.ac

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

New commits:
commit 26452c5c22e564323a819566e72ee444034a7b33
Author: Stephan Bergmann 
AuthorDate: Wed Apr 24 09:05:09 2019 +0200
Commit: Aron Budea 
CommitDate: Fri May 31 17:10:40 2024 +0200

Allow to pass JAVA_SOURCE/TARGET_VER into configure

...for those who pretend they know what they are doing (e.g., to experiment 
with
building against Java 12 which no longer supports Java 1.6 source/target, 
even
though that results in a build that is not baseline compatible).

Change-Id: I6e8617bc5b90212473652bdfac40bb48e9623a08
Reviewed-on: https://gerrit.libreoffice.org/71218
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit d365f36331874f94bbd9832fbd19ace90fafefec)

diff --git a/configure.ac b/configure.ac
index 71022b841c46..7c9c698c843b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7010,8 +7010,8 @@ dnl Checks for javac
 dnl ===
 if test "$ENABLE_JAVA" != ""; then
 javacompiler="javac"
-JAVA_SOURCE_VER="1.6"
-JAVA_TARGET_VER="1.6"
+: ${JAVA_SOURCE_VER=1.6}
+: ${JAVA_TARGET_VER=1.6}
 if test -z "$with_jdk_home"; then
 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
 else
commit 389d5165bd86119f81f43684d3bd4958d072a396
Author: Samuel Mehrbrodt 
AuthorDate: Tue Feb 5 09:37:46 2019 +0100
Commit: Aron Budea 
CommitDate: Fri May 31 17:10:29 2024 +0200

Always set java bytecode / source target to 1.6 / 6

as our new baseline (as discussed in ESC call 2019-02-07)

Change-Id: I8a22fab6a1f9a713cb55b4c5d8173c3bbcd28587
Reviewed-on: https://gerrit.libreoffice.org/67387
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 204c5d1746c0afc145f9b54b68c4a099f9f0e2bf)

diff --git a/configure.ac b/configure.ac
index 05ecb1bae5e3..71022b841c46 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6933,7 +6933,6 @@ if test "$ENABLE_JAVA" != ""; then
 fi
 fi
 
-HAVE_JAVA9=
 dnl ===
 dnl Checks for JDK.
 dnl ===
@@ -6985,9 +6984,6 @@ you must use the "--with-jdk-home" configure option 
explicitly])
 if test "$_jdk_ver" -gt 10600; then
 JAVA_CLASSPATH_NOT_SET=TRUE
 fi
-if test "$_jdk_ver" -ge 10900; then
-HAVE_JAVA9=TRUE
-fi
 
 AC_MSG_RESULT([checked (JDK $_jdk)])
 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
@@ -7009,24 +7005,13 @@ else
 export JAVA_HOME
 fi
 
-dnl ===
-dnl Set target Java bytecode version
-dnl ===
-if test "$ENABLE_JAVA" != ""; then
-if test "$HAVE_JAVA9" = "TRUE"; then
-_java_target_ver="1.6"
-else
-_java_target_ver="1.5"
-fi
-JAVA_SOURCE_VER="$_java_target_ver"
-JAVA_TARGET_VER="$_java_target_ver"
-fi
-
 dnl ===
 dnl Checks for javac
 dnl ===
 if test "$ENABLE_JAVA" != ""; then
 javacompiler="javac"
+JAVA_SOURCE_VER="1.6"
+JAVA_TARGET_VER="1.6"
 if test -z "$with_jdk_home"; then
 AC_PATH_PROG(JAVACOMPILER, $javacompiler)
 else


core.git: external/onlineupdate

2024-05-31 Thread Stephan Bergmann (via logerrit)
 external/onlineupdate/lo.patch |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit c00014019e6d33bfb4729c563062db1645c48e9d
Author: Stephan Bergmann 
AuthorDate: Fri May 31 10:35:06 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 31 15:05:20 2024 +0200

tdf#161292: Fix create-partial-info for newly added files

084c64982ef6187292fd73e6deaa4448e0b6f3de "Create MAR updates from msi rather
than from archive" had patched make_add_instruction (in
workdir/UnpackedTarball/onlineupdate/tools/update-packagin/common.sh) to
unconditionally use add-if (with the file itself as test file) rather than 
plain
add (because we can't reuse Mozilla's extension logic there to determine
optional installation parts), and it noted in its commit message that 
"addition
of files will cause a MAR update to miss them".

Which turned out to be a problem with

<https://update-mar.libreoffice.org/24.2.2.2/LibreOffice_24.2.2.2_Windows_X86_64_d56cc158d8a96260b836f100ef4b4ef25d6f1a01_from_bf759d854b5ab45b6ef0bfd22e51c6dc4fb8b882_partial.mar>,
updating from 24.2.2.1 with instdir/program/python-core-3.8.18/ to 24.2.2.2 
with
instdir/program/python-core-3.8.19/:  All the files in python-core-3.8.19 
were
recorded as add-if testing on themselves, so were never added.

So a better approach is, for newly added files to make them add (so they get
added unconditionally, even if they are part of some optional component that
happens to not be installed; this hopefully won't cause further issues) 
instead
of add-if.  (Existing files that are added instead of patched still use 
add-if,
though.)  This does not address the create-update-info target for full mar
updates (which is not used currently?), just the create-partial-info target.

(The existing calls to make_add_instruction in the upstream Mozilla code 
already
have a seemingly rotten mix of two-argument calls and calls with three 
arguments
where the third argument is ignored, and would check for a fourth "forced"
argument but which is never passed in.  So avoid extending that mess 
further,
and just replace this never-use-add-if call to make_add_instruction directly
with that function's (accordingly tweaked) body.)

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

diff --git a/external/onlineupdate/lo.patch b/external/onlineupdate/lo.patch
index 35dfb2f80fb8..571cea560d3c 100644
--- a/external/onlineupdate/lo.patch
+++ b/external/onlineupdate/lo.patch
@@ -372,7 +372,13 @@
fi
  fi
else
-@@ -270,7 +270,7 @@
+@@ -266,11 +266,12 @@
+   if check_for_add_if_not_update "$f"; then
+ make_add_if_not_instruction "$f" "$updatemanifestv3"
+   else
+-make_add_instruction "$f" "$updatemanifestv3"
++verbose_notice " add \"$f\""
++echo "add \"$f\"" >> "$updatemanifestv3"
fi
  
  


core.git: compilerplugins/clang

2024-05-31 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/plugin.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit de4708fcafbdd99ee0c585f980edcc3bb230c105
Author: Stephan Bergmann 
AuthorDate: Thu May 30 09:27:29 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 31 12:27:51 2024 +0200

Avoid --enable-compiler-plugins=debug loplugin:overrideparam TODO warning

> cui/source/factory/dlgfact.hxx:531:116: fatal error: TODO: Unexpected 
'IdenticalDefaultArgumentsResult::Maybe' [loplugin:overrideparam]
>   531 | const OUString& 
rName, const OUString& rDesc, const OUString& rTitle = u""_ustr) override;
>   |   
 ^~~~
> include/svx/svxdlg.hxx:380:116: note: TODO: second argument is here 
[loplugin:overrideparam]
>   380 | const OUString& 
rName, const OUString& rDesc, const OUString& rTitle = u""_ustr ) = 0;
>   |   
 ^~~~
> MaterializeTemporaryExpr 0x1732504d0 'const OUString':'const class 
rtl::OUString' lvalue
> `-ImplicitCastExpr 0x1732504b8 'const OUString':'const class 
rtl::OUString' 
>   `-CXXBindTemporaryExpr 0x173250498 'OUString':'class rtl::OUString' 
(CXXTemporary 0x173250498)
> `-UserDefinedLiteral 0x173250468 'OUString':'class rtl::OUString'
>   `-ImplicitCastExpr 0x173250450 'OUString (*)(void)' 

> `-DeclRefExpr 0x173250430 'OUString (void)' lvalue Function 
0x14a24f188 'operator""_ustr' 'OUString (void)'
> MaterializeTemporaryExpr 0x14a250658 'const OUString':'const class 
rtl::OUString' lvalue
> `-ImplicitCastExpr 0x14a250640 'const OUString':'const class 
rtl::OUString' 
>   `-CXXBindTemporaryExpr 0x14a250620 'OUString':'class rtl::OUString' 
(CXXTemporary 0x14a250620)
> `-UserDefinedLiteral 0x14a2505f0 'OUString':'class rtl::OUString'
>   `-ImplicitCastExpr 0x14a2505d8 'OUString (*)(void)' 

> `-DeclRefExpr 0x14a24f298 'OUString (void)' lvalue Function 
0x14a24f188 'operator""_ustr' 'OUString (void)'

(Unfortunately, there appears to be no way to get at the actual string 
literal
content here to check it for equality, so keep returning Maybe for now.)

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

diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index 8d8207d30437..f47fc01bd074 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -611,6 +611,20 @@ Plugin::IdenticalDefaultArgumentsResult 
Plugin::checkIdenticalDefaultArguments(
 : IdenticalDefaultArgumentsResult::No;
 }
 }
+if (auto const lit1 = dyn_cast(
+argument1->IgnoreImplicit()->IgnoreParens()))
+{
+if (auto const lit2 = dyn_cast(
+argument2->IgnoreImplicit()->IgnoreParens()))
+{
+return lit1->getLiteralOperatorKind() == 
clang::UserDefinedLiteral::LOK_Template
+&& lit2->getLiteralOperatorKind() == 
clang::UserDefinedLiteral::LOK_Template
+&& lit1->getCalleeDecl()->getCanonicalDecl()
+   == lit2->getCalleeDecl()->getCanonicalDecl()
+? IdenticalDefaultArgumentsResult::Maybe //TODO: obtain 
content to compare
+: IdenticalDefaultArgumentsResult::No;
+}
+}
 // catch params with defaults like "= OUString()"
 for (Expr const * e1 = desugared1, * e2 = desugared2;;) {
 auto const ce1 = dyn_cast(skipImplicit(e1));


core.git: vcl/source

2024-05-31 Thread Stephan Bergmann (via logerrit)
 vcl/source/image/ImplImage.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f188026e9163aec6317160059c4b0e98290a4de2
Author: Stephan Bergmann 
AuthorDate: Thu May 30 09:26:08 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 31 09:52:27 2024 +0200

loplugin:indentation (macOS)

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

diff --git a/vcl/source/image/ImplImage.cxx b/vcl/source/image/ImplImage.cxx
index f4b1cbba21a4..89b8cc2b5989 100644
--- a/vcl/source/image/ImplImage.cxx
+++ b/vcl/source/image/ImplImage.cxx
@@ -66,11 +66,11 @@ bool ImplImage::loadStockAtScale(SalGraphics* pGraphics, 
BitmapEx )
 if (aIconTheme.endsWith("_svg"))
 {
 #endif
-if (pGraphics && pGraphics->ShouldDownscaleIconsAtSurface()) // 
scale at the surface
-{
-nScalePercentage = fScale * 100.0;
-eScalingFlags = ImageLoadFlags::IgnoreScalingFactor;
-}
+if (pGraphics && pGraphics->ShouldDownscaleIconsAtSurface()) // 
scale at the surface
+{
+nScalePercentage = fScale * 100.0;
+eScalingFlags = ImageLoadFlags::IgnoreScalingFactor;
+}
 #ifdef MACOSX
 }
 #endif


core.git: vcl/osx

2024-05-31 Thread Stephan Bergmann (via logerrit)
 vcl/osx/a11ywrapper.mm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9e1ada2c6b85e9c6413084840939ca835ec84964
Author: Stephan Bergmann 
AuthorDate: Thu May 30 09:26:57 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 31 08:01:03 2024 +0200

loplugin:fakebool

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

diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index cdfb8979f9ac..292fb6dcc6d1 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -749,7 +749,7 @@ static std::ostream <<(std::ostream , NSObject 
*obj) {
 if ( isPopupMenuOpen ) {
 return NO;
 }
-BOOL ignored = false;
+bool ignored = false;
 try {
 sal_Int16 nRole = [ self accessibleContext ] -> getAccessibleRole();
 switch ( nRole ) {


core.git: vcl/osx

2024-05-31 Thread Stephan Bergmann (via logerrit)
 vcl/osx/a11ywrapper.mm |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b8b7a0936d5860e56239d60b0b5073d983df32f7
Author: Stephan Bergmann 
AuthorDate: Thu May 30 09:26:42 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 31 08:00:46 2024 +0200

loplugin:rangedforcopy

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

diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index 3793b3232d7d..cdfb8979f9ac 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -341,7 +341,7 @@ static std::ostream <<(std::ostream , NSObject 
*obj) {
 Reference < XAccessibleRelationSet > rxAccessibleRelationSet = [ self 
accessibleContext ] -> getAccessibleRelationSet();
 AccessibleRelation const relationMemberOf = rxAccessibleRelationSet -> 
getRelationByType ( AccessibleRelationType::MEMBER_OF );
 if ( relationMemberOf.RelationType == 
AccessibleRelationType::MEMBER_OF && relationMemberOf.TargetSet.hasElements() ) 
{
-for (Reference  rMateAccessible : 
relationMemberOf.TargetSet ) {
+for (Reference  const & rMateAccessible : 
relationMemberOf.TargetSet ) {
 if ( rMateAccessible.is() ) {
 Reference< XAccessibleContext > rMateAccessibleContext( 
rMateAccessible -> getAccessibleContext() );
 if ( rMateAccessibleContext.is() ) {
@@ -1140,7 +1140,7 @@ static Reference < XAccessibleContext > hitTestRunner ( 
css::awt::Point point,
 if ( relationSet.is() && relationSet -> containsRelation ( 
AccessibleRelationType::SUB_WINDOW_OF )) {
 // we have a valid relation to the parent element
 AccessibleRelation const relation = relationSet -> 
getRelationByType ( AccessibleRelationType::SUB_WINDOW_OF );
-for (Reference rxAccessible : 
relation.TargetSet) {
+for (Reference const & rxAccessible : 
relation.TargetSet) {
 if ( rxAccessible.is() && rxAccessible -> 
getAccessibleContext().is() ) {
 // hit test for children of parent
 hitChild = hitTestRunner ( hitPoint, rxAccessible 
-> getAccessibleContext() );


core.git: bridges/source

2024-05-31 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx |2 --
 bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx |7 +++
 2 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit faa421fbbef7761b29f639e1ebfaef940e99f604
Author: Stephan Bergmann 
AuthorDate: Thu May 30 14:24:36 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 31 08:00:24 2024 +0200

Clean up using directives

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

diff --git a/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx
index fd7fa817588a..dc02fda3946e 100644
--- a/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_wasm/cpp2uno.cxx
@@ -10,8 +10,6 @@
 #include 
 #include 
 
-using namespace ::com::sun::star::uno;
-
 using bridges::cpp_uno::shared::VtableFactory;
 
 struct VtableFactory::Slot
diff --git a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
index fcc978ab672e..7f83e2312c35 100644
--- a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
@@ -37,8 +37,6 @@
 
 #include "abi.hxx"
 
-using namespace ::com::sun::star::uno;
-
 namespace
 {
 enum class StructKind
@@ -361,7 +359,8 @@ void unoInterfaceProxyDispatch(uno_Interface* pUnoI, const 
typelib_TypeDescripti
 case 0: // queryInterface() opt
 {
 typelib_TypeDescription* pTD = 0;
-TYPELIB_DANGER_GET(, 
reinterpret_cast(pArgs[0])->getTypeLibType());
+TYPELIB_DANGER_GET(
+, 
reinterpret_cast(pArgs[0])->getTypeLibType());
 if (pTD)
 {
 uno_Interface* pInterface = 0;
@@ -399,7 +398,7 @@ void unoInterfaceProxyDispatch(uno_Interface* pUnoI, const 
typelib_TypeDescripti
 "illegal member type description!",
 
::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface>());
 
-Type const& rExcType = cppu::UnoType::get();
+css::uno::Type const& rExcType = 
cppu::UnoType::get();
 // binary identical null reference
 ::uno_type_any_construct(*ppException, , 
rExcType.getTypeLibType(), 0);
 }


core.git: desktop/source

2024-05-30 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/updater.cxx |   34 +-
 desktop/source/app/updater.hxx |2 --
 2 files changed, 9 insertions(+), 27 deletions(-)

New commits:
commit 253bd05e95ae5093e61a4685a9d28f31edc6f585
Author: Stephan Bergmann 
AuthorDate: Thu May 30 13:36:49 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 31 07:59:17 2024 +0200

Consolidate on a single Updater::log overload

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

diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index 12bb4969a68c..676cc54f148e 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -29,7 +29,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -553,7 +555,7 @@ size_t WriteCallbackFile(void *ptr, size_t size,
 
 std::string download_content(const OString& rURL, bool bFile, OUString& rHash)
 {
-Updater::log("Download: " + rURL);
+Updater::log("Download: " + OStringToOUString(rURL, 
osl_getThreadTextEncoding()));
 std::unique_ptr> curl(
 curl_easy_init(), [](CURL * p) { curl_easy_cleanup(p); });
 
@@ -729,7 +731,7 @@ void update_checker()
 OUString aDownloadCheckURL = aDownloadCheckBaseURL + "update/check/1/" + 
aProductName +
 "/" + aBuildID + "/" + aBuildTarget + "/" + aChannel;
 OString aURL = OUStringToOString(aDownloadCheckURL, RTL_TEXTENCODING_UTF8);
-Updater::log("Update check: " + aURL);
+Updater::log("Update check: " + OStringToOUString(aURL, 
osl_getThreadTextEncoding()));
 
 try
 {
@@ -779,27 +781,27 @@ void update_checker()
 catch (const invalid_update_info&)
 {
 SAL_WARN("desktop.updater", "invalid update information");
-Updater::log(OString("warning: invalid update info"));
+Updater::log("warning: invalid update info");
 }
 catch (const error_updater& e)
 {
 SAL_WARN("desktop.updater", "error during the update check: " << 
e.what());
-Updater::log(OString("warning: error by the updater") + e.what());
+Updater::log("warning: error by the updater" + 
o3tl::runtimeToOUString(e.what()));
 }
 catch (const invalid_size& e)
 {
 SAL_WARN("desktop.updater", e.what());
-Updater::log(OString("warning: invalid size"));
+Updater::log("warning: invalid size");
 }
 catch (const invalid_hash& e)
 {
 SAL_WARN("desktop.updater", e.what());
-Updater::log(OString("warning: invalid hash"));
+Updater::log("warning: invalid hash");
 }
 catch (...)
 {
 SAL_WARN("desktop.updater", "unknown error during the update check");
-Updater::log(OString("warning: unknown exception"));
+Updater::log("warning: unknown exception");
 }
 }
 
@@ -849,24 +851,6 @@ void Updater::log(const OUString& rMessage)
 aLog.WriteLine(OUStringToOString(rMessage, RTL_TEXTENCODING_UTF8));
 }
 
-void Updater::log(const OString& rMessage)
-{
-SAL_INFO("desktop.updater", rMessage);
-OUString aUpdateLog = getUpdateInfoLog();
-SvFileStream aLog(aUpdateLog, StreamMode::STD_READWRITE);
-aLog.Seek(aLog.Tell() + aLog.remainingSize()); // make sure we are at the 
end
-aLog.WriteLine(rMessage);
-}
-
-void Updater::log(const char* pMessage)
-{
-SAL_INFO("desktop.updater", pMessage);
-OUString aUpdateLog = getUpdateInfoLog();
-SvFileStream aLog(aUpdateLog, StreamMode::STD_READWRITE);
-aLog.Seek(aLog.Tell() + aLog.remainingSize()); // make sure we are at the 
end
-aLog.WriteOString(pMessage);
-}
-
 OUString Updater::getBuildID()
 {
 OUString aBuildID("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("version") ":buildid}");
diff --git a/desktop/source/app/updater.hxx b/desktop/source/app/updater.hxx
index 7f1ea920fbe9..2ab4d4ea8eae 100644
--- a/desktop/source/app/updater.hxx
+++ b/desktop/source/app/updater.hxx
@@ -28,8 +28,6 @@ public:
 static OUString getUpdateChannel();
 
 static void log(const OUString& rMessage);
-static void log(const OString& rMessage);
-static void log(const char* pMessage);
 
 static void removeUpdateFiles();
 };


core.git: Branch 'distro/mimo/mimo-6-2' - 2 commits - external/libassuan

2024-05-30 Thread Stephan Bergmann (via logerrit)
 external/libassuan/ExternalProject_libassuan.mk |1 
 external/libassuan/UnpackedTarball_libassuan.mk |1 
 external/libassuan/w32-stdc.patch   |   74 
 3 files changed, 76 insertions(+)

New commits:
commit 3b32b91edebc76e4417b086acb6a0486a7fe80c0
Author: Stephan Bergmann 
AuthorDate: Fri Apr 22 21:52:50 2022 +0200
Commit: Aron Budea 
CommitDate: Fri May 31 07:51:52 2024 +0200

external/libassuan: Fix fallout of defining __STDC__ on Windows

...since 1bb0e177124d5d6661b72df6c7d848fb23639652 "Fix autoconf>=2.70
gcc-wrapper breakage", which had the side effect of preventing various
deprecated function declarations in system headers (e.g., isascii in 
addition to
__isascii).  This went unnoticed so far due to the traditionally lax 
handling of
missing function declarations in C, and only now started to cause

> conversion.c(94,9): error: call to undeclared function 'isascii'; ISO C99 
and later do not support implicit function declarations 
[-Wimplicit-function-declaration]
>   if ((isascii (*istr) && isprint (*istr)) || (*istr >= 0x80))
>^

etc. with clang-cl 15 trunk after

<https://github.com/llvm/llvm-project/commit/7d644e1215b376ec5e915df9ea2eeb56e2d94626>
"[C11/C2x] Change the behavior of the implicit function declaration 
warning".

Where undeclared functions have been used in Windows-only code, they have 
been
replaced with their __STDC__-declared counterparts, and for occurrences in
shared code Windows-only macro definitions have been introduced (as would 
have
done in the system headers too, if __STDC__ was not defined) to not clutter 
the
shared code with #ifdefs.

Also, for getpid (resp. _getpid), the #include  was apparently
missing from the upstream code, even without our __STDC__ hack in
external/libassuan/ExternalProject_libassuan.mk (but never caused errors 
until
now, either).

Change-Id: I7442394d0c6e633bca1f6c7331d7ee51651179a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/19
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 8279d89d6e037def78f50c72fab2116ca56bef52)
(cherry picked from commit 1f683fe50fe0e850a7a978228a71c84356b38cf6)
(cherry picked from commit 5d969ce25538238066aaa3879746aae95959d03d)
(cherry picked from commit 1b01f9e1d7ae5d3b12f7b3ed6bbe7b7445a0caae)

diff --git a/external/libassuan/UnpackedTarball_libassuan.mk 
b/external/libassuan/UnpackedTarball_libassuan.mk
index 295b87d49677..3604fa36a395 100644
--- a/external/libassuan/UnpackedTarball_libassuan.mk
+++ b/external/libassuan/UnpackedTarball_libassuan.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libassuan, \
 $(if $(filter MSC,$(COM)),external/libassuan/w32-build-fixes.patch.1) \
 external/libassuan/w32-build-fixes-2.patch \
 $(if $(filter LINUX,$(OS)),external/libassuan/rpath.patch) \
+external/libassuan/w32-stdc.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libassuan/w32-stdc.patch 
b/external/libassuan/w32-stdc.patch
new file mode 100644
index ..def3dea833af
--- /dev/null
+++ b/external/libassuan/w32-stdc.patch
@@ -0,0 +1,74 @@
+--- src/assuan-handler.c
 src/assuan-handler.c
+@@ -938,7 +938,7 @@
+ #if defined(HAVE_W32CE_SYSTEM)
+ fdarray[n++] = (void*)fileno (ctx->outbound.data.fp);
+ #elif defined(HAVE_W32_SYSTEM)
+-fdarray[n++] = (void*)_get_osfhandle (fileno (ctx->outbound.data.fp));
++fdarray[n++] = (void*)_get_osfhandle (_fileno 
(ctx->outbound.data.fp));
+ #else
+ fdarray[n++] = fileno (ctx->outbound.data.fp);
+ #endif
+--- src/assuan-logging.c
 src/assuan-logging.c
+@@ -30,10 +30,15 @@
+ # ifdef HAVE_WINSOCK2_H
+ #  include 
+ # endif
++# include 
++# define getpid _getpid
+ # include 
+ #endif /*HAVE_W32_SYSTEM*/
+ #include 
+ #include 
++#if defined HAVE_W32_SYSTEM
++#define isascii __isascii
++#endif
+ 
+ #include "assuan-defs.h"
+ 
+--- src/assuan-pipe-connect.c
 src/assuan-pipe-connect.c
+@@ -47,6 +47,8 @@
+ # ifdef HAVE_WINSOCK2_H
+ #  include 
+ # endif
++# include 
++# define getpid _getpid
+ # include 
+ #endif
+ 
+--- src/assuan-socket.c
 src/assuan-socket.c
+@@ -27,6 +27,8 @@
+ #include 
+ #ifdef HAVE_W32_SYSTEM
+ # define WIN32_LEAN_AND_MEAN
++# include 
++# define getpid _getpid
+ # include 
+ # include 
+ #ifndef HAVE_W32CE_SYSTEM
+--- src/conversion.c
 src/conversion.c
+@@ -27,6 +27,9 @@
+ #include 
+ #include 
+ #include 
++#if defined HAVE_W32_SYSTEM
++#define isascii __isascii
++#endif
+ 
+ #include "assuan-defs.h"
+ #include "debug.h"
+--- src/system-w32.c
 src/system-w32.c
+@@ -453,7 +453,7 @@
+ 
+   /* Dup stderr to /dev/null unless it is in the list of FDs to be
+  passed to the child. */
+-  fd = assuan_fd_fr

core.git: Branch 'distro/mimo/mimo-6-4' - 2 commits - external/libassuan

2024-05-30 Thread Stephan Bergmann (via logerrit)
 external/libassuan/ExternalProject_libassuan.mk |1 
 external/libassuan/UnpackedTarball_libassuan.mk |1 
 external/libassuan/w32-stdc.patch   |   74 
 3 files changed, 76 insertions(+)

New commits:
commit 1b01f9e1d7ae5d3b12f7b3ed6bbe7b7445a0caae
Author: Stephan Bergmann 
AuthorDate: Fri Apr 22 21:52:50 2022 +0200
Commit: Aron Budea 
CommitDate: Thu May 30 23:19:21 2024 +0200

external/libassuan: Fix fallout of defining __STDC__ on Windows

...since 1bb0e177124d5d6661b72df6c7d848fb23639652 "Fix autoconf>=2.70
gcc-wrapper breakage", which had the side effect of preventing various
deprecated function declarations in system headers (e.g., isascii in 
addition to
__isascii).  This went unnoticed so far due to the traditionally lax 
handling of
missing function declarations in C, and only now started to cause

> conversion.c(94,9): error: call to undeclared function 'isascii'; ISO C99 
and later do not support implicit function declarations 
[-Wimplicit-function-declaration]
>   if ((isascii (*istr) && isprint (*istr)) || (*istr >= 0x80))
>^

etc. with clang-cl 15 trunk after

<https://github.com/llvm/llvm-project/commit/7d644e1215b376ec5e915df9ea2eeb56e2d94626>
"[C11/C2x] Change the behavior of the implicit function declaration 
warning".

Where undeclared functions have been used in Windows-only code, they have 
been
replaced with their __STDC__-declared counterparts, and for occurrences in
shared code Windows-only macro definitions have been introduced (as would 
have
done in the system headers too, if __STDC__ was not defined) to not clutter 
the
shared code with #ifdefs.

Also, for getpid (resp. _getpid), the #include  was apparently
missing from the upstream code, even without our __STDC__ hack in
external/libassuan/ExternalProject_libassuan.mk (but never caused errors 
until
now, either).

Change-Id: I7442394d0c6e633bca1f6c7331d7ee51651179a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/19
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 8279d89d6e037def78f50c72fab2116ca56bef52)
(cherry picked from commit 1f683fe50fe0e850a7a978228a71c84356b38cf6)
(cherry picked from commit 5d969ce25538238066aaa3879746aae95959d03d)

diff --git a/external/libassuan/UnpackedTarball_libassuan.mk 
b/external/libassuan/UnpackedTarball_libassuan.mk
index 295b87d49677..3604fa36a395 100644
--- a/external/libassuan/UnpackedTarball_libassuan.mk
+++ b/external/libassuan/UnpackedTarball_libassuan.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libassuan, \
 $(if $(filter MSC,$(COM)),external/libassuan/w32-build-fixes.patch.1) \
 external/libassuan/w32-build-fixes-2.patch \
 $(if $(filter LINUX,$(OS)),external/libassuan/rpath.patch) \
+external/libassuan/w32-stdc.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libassuan/w32-stdc.patch 
b/external/libassuan/w32-stdc.patch
new file mode 100644
index ..def3dea833af
--- /dev/null
+++ b/external/libassuan/w32-stdc.patch
@@ -0,0 +1,74 @@
+--- src/assuan-handler.c
 src/assuan-handler.c
+@@ -938,7 +938,7 @@
+ #if defined(HAVE_W32CE_SYSTEM)
+ fdarray[n++] = (void*)fileno (ctx->outbound.data.fp);
+ #elif defined(HAVE_W32_SYSTEM)
+-fdarray[n++] = (void*)_get_osfhandle (fileno (ctx->outbound.data.fp));
++fdarray[n++] = (void*)_get_osfhandle (_fileno 
(ctx->outbound.data.fp));
+ #else
+ fdarray[n++] = fileno (ctx->outbound.data.fp);
+ #endif
+--- src/assuan-logging.c
 src/assuan-logging.c
+@@ -30,10 +30,15 @@
+ # ifdef HAVE_WINSOCK2_H
+ #  include 
+ # endif
++# include 
++# define getpid _getpid
+ # include 
+ #endif /*HAVE_W32_SYSTEM*/
+ #include 
+ #include 
++#if defined HAVE_W32_SYSTEM
++#define isascii __isascii
++#endif
+ 
+ #include "assuan-defs.h"
+ 
+--- src/assuan-pipe-connect.c
 src/assuan-pipe-connect.c
+@@ -47,6 +47,8 @@
+ # ifdef HAVE_WINSOCK2_H
+ #  include 
+ # endif
++# include 
++# define getpid _getpid
+ # include 
+ #endif
+ 
+--- src/assuan-socket.c
 src/assuan-socket.c
+@@ -27,6 +27,8 @@
+ #include 
+ #ifdef HAVE_W32_SYSTEM
+ # define WIN32_LEAN_AND_MEAN
++# include 
++# define getpid _getpid
+ # include 
+ # include 
+ #ifndef HAVE_W32CE_SYSTEM
+--- src/conversion.c
 src/conversion.c
+@@ -27,6 +27,9 @@
+ #include 
+ #include 
+ #include 
++#if defined HAVE_W32_SYSTEM
++#define isascii __isascii
++#endif
+ 
+ #include "assuan-defs.h"
+ #include "debug.h"
+--- src/system-w32.c
 src/system-w32.c
+@@ -453,7 +453,7 @@
+ 
+   /* Dup stderr to /dev/null unless it is in the list of FDs to be
+  passed to the child. */
+-  fd = assuan_fd_from_posix_fd (fileno (stderr));
++  fd = assuan_fd_from_posix_fd (_fileno (stderr));
+ 

core.git: Branch 'distro/mimo/mimo-7-0' - 2 commits - external/libassuan

2024-05-30 Thread Stephan Bergmann (via logerrit)
 external/libassuan/ExternalProject_libassuan.mk |1 
 external/libassuan/UnpackedTarball_libassuan.mk |1 
 external/libassuan/w32-stdc.patch   |   74 
 3 files changed, 76 insertions(+)

New commits:
commit 5d969ce25538238066aaa3879746aae95959d03d
Author: Stephan Bergmann 
AuthorDate: Fri Apr 22 21:52:50 2022 +0200
Commit: Aron Budea 
CommitDate: Thu May 30 21:39:13 2024 +0200

external/libassuan: Fix fallout of defining __STDC__ on Windows

...since 1bb0e177124d5d6661b72df6c7d848fb23639652 "Fix autoconf>=2.70
gcc-wrapper breakage", which had the side effect of preventing various
deprecated function declarations in system headers (e.g., isascii in 
addition to
__isascii).  This went unnoticed so far due to the traditionally lax 
handling of
missing function declarations in C, and only now started to cause

> conversion.c(94,9): error: call to undeclared function 'isascii'; ISO C99 
and later do not support implicit function declarations 
[-Wimplicit-function-declaration]
>   if ((isascii (*istr) && isprint (*istr)) || (*istr >= 0x80))
>^

etc. with clang-cl 15 trunk after

<https://github.com/llvm/llvm-project/commit/7d644e1215b376ec5e915df9ea2eeb56e2d94626>
"[C11/C2x] Change the behavior of the implicit function declaration 
warning".

Where undeclared functions have been used in Windows-only code, they have 
been
replaced with their __STDC__-declared counterparts, and for occurrences in
shared code Windows-only macro definitions have been introduced (as would 
have
done in the system headers too, if __STDC__ was not defined) to not clutter 
the
shared code with #ifdefs.

Also, for getpid (resp. _getpid), the #include  was apparently
missing from the upstream code, even without our __STDC__ hack in
external/libassuan/ExternalProject_libassuan.mk (but never caused errors 
until
now, either).

Change-Id: I7442394d0c6e633bca1f6c7331d7ee51651179a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/19
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 8279d89d6e037def78f50c72fab2116ca56bef52)
(cherry picked from commit 1f683fe50fe0e850a7a978228a71c84356b38cf6)

diff --git a/external/libassuan/UnpackedTarball_libassuan.mk 
b/external/libassuan/UnpackedTarball_libassuan.mk
index 295b87d49677..3604fa36a395 100644
--- a/external/libassuan/UnpackedTarball_libassuan.mk
+++ b/external/libassuan/UnpackedTarball_libassuan.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libassuan, \
 $(if $(filter MSC,$(COM)),external/libassuan/w32-build-fixes.patch.1) \
 external/libassuan/w32-build-fixes-2.patch \
 $(if $(filter LINUX,$(OS)),external/libassuan/rpath.patch) \
+external/libassuan/w32-stdc.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libassuan/w32-stdc.patch 
b/external/libassuan/w32-stdc.patch
new file mode 100644
index ..def3dea833af
--- /dev/null
+++ b/external/libassuan/w32-stdc.patch
@@ -0,0 +1,74 @@
+--- src/assuan-handler.c
 src/assuan-handler.c
+@@ -938,7 +938,7 @@
+ #if defined(HAVE_W32CE_SYSTEM)
+ fdarray[n++] = (void*)fileno (ctx->outbound.data.fp);
+ #elif defined(HAVE_W32_SYSTEM)
+-fdarray[n++] = (void*)_get_osfhandle (fileno (ctx->outbound.data.fp));
++fdarray[n++] = (void*)_get_osfhandle (_fileno 
(ctx->outbound.data.fp));
+ #else
+ fdarray[n++] = fileno (ctx->outbound.data.fp);
+ #endif
+--- src/assuan-logging.c
 src/assuan-logging.c
+@@ -30,10 +30,15 @@
+ # ifdef HAVE_WINSOCK2_H
+ #  include 
+ # endif
++# include 
++# define getpid _getpid
+ # include 
+ #endif /*HAVE_W32_SYSTEM*/
+ #include 
+ #include 
++#if defined HAVE_W32_SYSTEM
++#define isascii __isascii
++#endif
+ 
+ #include "assuan-defs.h"
+ 
+--- src/assuan-pipe-connect.c
 src/assuan-pipe-connect.c
+@@ -47,6 +47,8 @@
+ # ifdef HAVE_WINSOCK2_H
+ #  include 
+ # endif
++# include 
++# define getpid _getpid
+ # include 
+ #endif
+ 
+--- src/assuan-socket.c
 src/assuan-socket.c
+@@ -27,6 +27,8 @@
+ #include 
+ #ifdef HAVE_W32_SYSTEM
+ # define WIN32_LEAN_AND_MEAN
++# include 
++# define getpid _getpid
+ # include 
+ # include 
+ #ifndef HAVE_W32CE_SYSTEM
+--- src/conversion.c
 src/conversion.c
+@@ -27,6 +27,9 @@
+ #include 
+ #include 
+ #include 
++#if defined HAVE_W32_SYSTEM
++#define isascii __isascii
++#endif
+ 
+ #include "assuan-defs.h"
+ #include "debug.h"
+--- src/system-w32.c
 src/system-w32.c
+@@ -453,7 +453,7 @@
+ 
+   /* Dup stderr to /dev/null unless it is in the list of FDs to be
+  passed to the child. */
+-  fd = assuan_fd_from_posix_fd (fileno (stderr));
++  fd = assuan_fd_from_posix_fd (_fileno (stderr));
+   fdp = fd_child_list;
+   if (fdp)
+ {
commit abe1e391f2a5f190984d8b

core.git: external/libetonyek

2024-05-30 Thread Stephan Bergmann (via logerrit)
 external/libetonyek/UnpackedTarball_libetonyek.mk |1 +
 external/libetonyek/include.patch |   10 ++
 2 files changed, 11 insertions(+)

New commits:
commit 1962ec376759ef0043eb3c342fd113aa315d6bdc
Author: Stephan Bergmann 
AuthorDate: Thu May 30 09:25:00 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 30 17:37:43 2024 +0200

external/libetonyek: Missing include (std::front_inserter)

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

diff --git a/external/libetonyek/UnpackedTarball_libetonyek.mk 
b/external/libetonyek/UnpackedTarball_libetonyek.mk
index 80b3f5c318af..788cf7607710 100644
--- a/external/libetonyek/UnpackedTarball_libetonyek.mk
+++ b/external/libetonyek/UnpackedTarball_libetonyek.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\
external/libetonyek/0002-fix-build-with-MSVC.patch.1 \
external/libetonyek/0001-allow-0-size-message.patch.1 \
external/libetonyek/enumarith.patch \
+   external/libetonyek/include.patch \
 ))
 
 ifneq ($(OS),MACOSX)
diff --git a/external/libetonyek/include.patch 
b/external/libetonyek/include.patch
new file mode 100644
index ..4052d8093e0f
--- /dev/null
+++ b/external/libetonyek/include.patch
@@ -0,0 +1,10 @@
+--- src/lib/IWORKShape.cpp
 src/lib/IWORKShape.cpp
+@@ -12,6 +12,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include 
+ #include 


core.git: Branch 'libreoffice-24-2' - sal/textenc

2024-05-30 Thread Stephan Bergmann (via logerrit)
 sal/textenc/tcvtutf8.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 00914176b1cd056b99f66182ffb00c0f1a123d8c
Author: Stephan Bergmann 
AuthorDate: Wed May 29 10:01:13 2024 +0200
Commit: Caolán McNamara 
CommitDate: Thu May 30 09:56:18 2024 +0200

Properly fix use of uninitialized value

Following up on 66322c5f4a5465c74fa3ceefaa2f76e86a277c16 "Silence warning 
C4701:
potentially uninitialized local variable" (which had apparently wrongly 
assumed
that that MSVC warning was a false positive) and
b1a6bd87b803f760f5bf0e2b7bc519b3b2fbfa4e "ofz: Use-of-uninitialized-value in
ImplConvertUtf8ToUnicode", which had demonstrated that this was indeed a 
true
positive, as per the comment at

<https://gerrit.libreoffice.org/c/core/+/168079/2#message-8b941c986658cb41641c0a317937bd0d3574e0b9>
"ofz: Use-of-uninitialized-value in ImplConvertUtf8ToUnicode", and which 
could
also be observed with a local patch of

> diff --git a/sal/textenc/tcvtutf8.cxx b/sal/textenc/tcvtutf8.cxx
> index 05290cc204fd..319acd41c627 100644
> --- a/sal/textenc/tcvtutf8.cxx
> +++ b/sal/textenc/tcvtutf8.cxx
> @@ -56,7 +56,7 @@ void ImplResetUtf8ToUnicodeContext(void * pContext)
>  {
>  if (pContext != nullptr)
>  {
> -static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nBytes = 
int();
> +static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nBytes = 
1234;
>  static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nShift = -1;
>  static_cast< ImplUtf8ToUnicodeContext * >(pContext)->bCheckBom = 
true;
>  }
> @@ -74,7 +74,7 @@ sal_Size ImplConvertUtf8ToUnicode(
>  {
>  bool bJavaUtf8 = pData != nullptr;
>  sal_uInt32 nUtf32 = 0;
> -int nBytes = int();
> +int nBytes = 1234;
>  int nShift = -1;
>  bool bCheckBom = true;
>  sal_uInt32 nInfo = 0;
> @@ -208,6 +208,7 @@ sal_Size ImplConvertUtf8ToUnicode(
>  continue;
>
>  bad_input:
> +assert(nBytes != 1234);
>  switch 
(sal::detail::textenc::handleBadInputTextToUnicodeConversion(
>  false, nBytes != 1, 0, nFlags, , 
pDestBufEnd,
>  ))

and seeing CppunitTest_sal_rtl CPPUNIT_TEST_NAME=Test::testInvalidUtf8 fail 
by
hitting that assert.

So initialize nBytes to 1 to make that bad_input scenario call
handleBadInputTextToUnicodeConversion with a bMultiByte=false argument.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168181
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 73eed7cfe08624227214378c50e2f09c9a868ee3)
Conflicts:
sal/textenc/tcvtutf8.cxx

Change-Id: Ib8a326d497071f4249169e9d4f5871f06cfccbdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168185
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sal/textenc/tcvtutf8.cxx b/sal/textenc/tcvtutf8.cxx
index 456d77e2f51c..2d73a96a3c50 100644
--- a/sal/textenc/tcvtutf8.cxx
+++ b/sal/textenc/tcvtutf8.cxx
@@ -56,6 +56,7 @@ void ImplResetUtf8ToUnicodeContext(void * pContext)
 {
 if (pContext != nullptr)
 {
+static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nBytes = 1;
 static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nShift = -1;
 static_cast< ImplUtf8ToUnicodeContext * >(pContext)->bCheckBom = true;
 }
@@ -73,7 +74,7 @@ sal_Size ImplConvertUtf8ToUnicode(
 {
 bool bJavaUtf8 = pData != nullptr;
 sal_uInt32 nUtf32 = 0;
-int nBytes = int();
+int nBytes = 1;
 int nShift = -1;
 bool bCheckBom = true;
 sal_uInt32 nInfo = 0;


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

2024-05-30 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx |   18 +-
 offapi/org/libreoffice/embindtest/XTest.idl  |1 +
 unotest/source/embindtest/embindtest.cxx |6 ++
 unotest/source/embindtest/embindtest.js  |8 
 4 files changed, 32 insertions(+), 1 deletion(-)

New commits:
commit e303b3bba8caaefd3a7897a773deb69643967047
Author: Stephan Bergmann 
AuthorDate: Wed May 29 17:36:55 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 30 09:35:06 2024 +0200

Implement attribute handling

Change-Id: Ic30d2de582f952555ec672984da78a07a9319443
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168224
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 4b4cdb2bbadb..fcc978ab672e 100644
--- a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
@@ -18,7 +18,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -324,7 +326,21 @@ void unoInterfaceProxyDispatch(uno_Interface* pUnoI, const 
typelib_TypeDescripti
 {
 case typelib_TypeClass_INTERFACE_ATTRIBUTE:
 {
-std::abort();
+auto const atd
+= reinterpret_cast(pMemberDescr);
+VtableSlot slot(getVtableSlot(atd));
+if (pReturn == nullptr)
+{
+slot.index += 1;
+call(pThis, slot, cppu::UnoType::get().getTypeLibType(), 
1,
+ ::temporary(
+ typelib_MethodParameter{ nullptr, 
atd->pAttributeTypeRef, true, false }),
+ pReturn, pArgs, ppException);
+}
+else
+{
+call(pThis, slot, atd->pAttributeTypeRef, 0, nullptr, pReturn, 
pArgs, ppException);
+}
 break;
 }
 case typelib_TypeClass_INTERFACE_METHOD:
diff --git a/offapi/org/libreoffice/embindtest/XTest.idl 
b/offapi/org/libreoffice/embindtest/XTest.idl
index ac8549d05397..1f09c388e30a 100644
--- a/offapi/org/libreoffice/embindtest/XTest.idl
+++ b/offapi/org/libreoffice/embindtest/XTest.idl
@@ -129,6 +129,7 @@ interface XTest {
 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);
+[attribute] string StringAttribute;
 };
 
 }; }; };
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 7b65ed3ed776..929db82e8900 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -594,6 +594,12 @@ class Test : public 
cppu::WeakImplHelper
 css::uno::Reference(object, 
css::uno::UNO_QUERY_THROW)
 ->trigger(u"queried executor"_ustr);
 }
+
+OUString SAL_CALL getStringAttribute() override { return stringAttribute_; 
}
+
+void SAL_CALL setStringAttribute(OUString const& value) override { 
stringAttribute_ = value; }
+
+OUString stringAttribute_;
 };
 }
 
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index a98f828d9eba..c1670689cf2b 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -1113,6 +1113,14 @@ Module.addOnPostRun(function() {
 outparamindex.delete();
 outparam.delete();
 }
+{
+let a = new Module.uno_Any(Module.uno_Type.String(), 'hä');
+invoke.setValue('StringAttribute', a);
+a.delete();
+const ret = invoke.getValue('StringAttribute');
+console.assert(ret.get() === 'hä');
+ret.delete();
+}
 });
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


core.git: bridges/Library_cpp_uno.mk bridges/source

2024-05-29 Thread Stephan Bergmann (via logerrit)
 bridges/Library_cpp_uno.mk  |3 +--
 bridges/source/cpp_uno/gcc3_wasm/except.cxx |   22 --
 2 files changed, 1 insertion(+), 24 deletions(-)

New commits:
commit 981542c1d218ae7ecf3043160aed152f8ab1
Author: Stephan Bergmann 
AuthorDate: Tue May 28 22:10:54 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 29 12:59:29 2024 +0200

Clean up gcc3_wasm bridge_noopt_objects

There appears to be no good reason that cpp2uno.cxx and uno2cpp.cxx are 
noopt
(presumably that was just cargo-culted from another platform?), and 
except.cxx
appears to be completely unused anyway.

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

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 462fd538e104..5d6e7c489802 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -83,8 +83,7 @@ bridge_exception_objects := cpp2uno uno2cpp
 bridge_noopt_objects := except
 else ifeq ($(OS),EMSCRIPTEN)
 bridges_SELECTED_BRIDGE := gcc3_wasm
-bridge_exception_objects := abi
-bridge_noopt_objects := cpp2uno except uno2cpp
+bridge_exception_objects := abi cpp2uno uno2cpp
 $(eval $(call gb_Library_add_generated_asmobjects,$(CPPU_ENV)_uno, \
 CustomTarget/bridges/gcc3_wasm/callvirtualfunction-impls \
 ))
diff --git a/bridges/source/cpp_uno/gcc3_wasm/except.cxx 
b/bridges/source/cpp_uno/gcc3_wasm/except.cxx
deleted file mode 100644
index 36778c65a11a..
--- a/bridges/source/cpp_uno/gcc3_wasm/except.cxx
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- */
-
-#include 
-
-#include 
-#include 
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-void raiseException(uno_Any*, uno_Mapping*) { std::abort(); }
-
-void fillUnoException(uno_Any*, uno_Mapping*) { std::abort(); }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: sal/textenc

2024-05-29 Thread Stephan Bergmann (via logerrit)
 sal/textenc/tcvtutf8.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 73eed7cfe08624227214378c50e2f09c9a868ee3
Author: Stephan Bergmann 
AuthorDate: Wed May 29 10:01:13 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 29 12:08:43 2024 +0200

Properly fix use of uninitialized value

Following up on 66322c5f4a5465c74fa3ceefaa2f76e86a277c16 "Silence warning 
C4701:
potentially uninitialized local variable" (which had apparently wrongly 
assumed
that that MSVC warning was a false positive) and
b1a6bd87b803f760f5bf0e2b7bc519b3b2fbfa4e "ofz: Use-of-uninitialized-value in
ImplConvertUtf8ToUnicode", which had demonstrated that this was indeed a 
true
positive, as per the comment at

<https://gerrit.libreoffice.org/c/core/+/168079/2#message-8b941c986658cb41641c0a317937bd0d3574e0b9>
"ofz: Use-of-uninitialized-value in ImplConvertUtf8ToUnicode", and which 
could
also be observed with a local patch of

> diff --git a/sal/textenc/tcvtutf8.cxx b/sal/textenc/tcvtutf8.cxx
> index 05290cc204fd..319acd41c627 100644
> --- a/sal/textenc/tcvtutf8.cxx
> +++ b/sal/textenc/tcvtutf8.cxx
> @@ -56,7 +56,7 @@ void ImplResetUtf8ToUnicodeContext(void * pContext)
>  {
>  if (pContext != nullptr)
>  {
> -static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nBytes = 
int();
> +static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nBytes = 
1234;
>  static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nShift = -1;
>  static_cast< ImplUtf8ToUnicodeContext * >(pContext)->bCheckBom = 
true;
>  }
> @@ -74,7 +74,7 @@ sal_Size ImplConvertUtf8ToUnicode(
>  {
>  bool bJavaUtf8 = pData != nullptr;
>  sal_uInt32 nUtf32 = 0;
> -int nBytes = int();
> +int nBytes = 1234;
>  int nShift = -1;
>  bool bCheckBom = true;
>  sal_uInt32 nInfo = 0;
> @@ -208,6 +208,7 @@ sal_Size ImplConvertUtf8ToUnicode(
>  continue;
>
>  bad_input:
> +assert(nBytes != 1234);
>  switch 
(sal::detail::textenc::handleBadInputTextToUnicodeConversion(
>  false, nBytes != 1, 0, nFlags, , 
pDestBufEnd,
>  ))

and seeing CppunitTest_sal_rtl CPPUNIT_TEST_NAME=Test::testInvalidUtf8 fail 
by
hitting that assert.

So initialize nBytes to 1 to make that bad_input scenario call
handleBadInputTextToUnicodeConversion with a bMultiByte=false argument.

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

diff --git a/sal/textenc/tcvtutf8.cxx b/sal/textenc/tcvtutf8.cxx
index 05290cc204fd..2d73a96a3c50 100644
--- a/sal/textenc/tcvtutf8.cxx
+++ b/sal/textenc/tcvtutf8.cxx
@@ -56,7 +56,7 @@ void ImplResetUtf8ToUnicodeContext(void * pContext)
 {
 if (pContext != nullptr)
 {
-static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nBytes = int();
+static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nBytes = 1;
 static_cast< ImplUtf8ToUnicodeContext * >(pContext)->nShift = -1;
 static_cast< ImplUtf8ToUnicodeContext * >(pContext)->bCheckBom = true;
 }
@@ -74,7 +74,7 @@ sal_Size ImplConvertUtf8ToUnicode(
 {
 bool bJavaUtf8 = pData != nullptr;
 sal_uInt32 nUtf32 = 0;
-int nBytes = int();
+int nBytes = 1;
 int nShift = -1;
 bool bCheckBom = true;
 sal_uInt32 nInfo = 0;


core.git: sw/qa sw/source

2024-05-29 Thread Stephan Bergmann (via logerrit)
 sw/qa/extras/uiwriter/uiwriter6.cxx |   63 
 sw/source/core/layout/flylay.cxx|   38 ++---
 2 files changed, 5 insertions(+), 96 deletions(-)

New commits:
commit db94d1079a83eae9ac0c8d92f4547698d016daf8
Author: Stephan Bergmann 
AuthorDate: Mon May 27 10:57:41 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 29 10:38:41 2024 +0200

Revert "tdf#161261 sw: fix lost size of image resized in fixed-height cell"

This reverts commit 4da6f52f5fd164082fd42fc58fc7d31da567c924 plus follow-up
24f65bf5940adb0aa3590443752110119e2bea5e "Fix typo".  It caused
CppunitTest_sw_uiwriter6 to fail with

> /sw/source/core/layout/flylay.cxx:1426:51: runtime error: downcast of 
address 0x606000c4b620 which does not point to an object of type 'const 
SwDrawContact'
> 0x606000c4b620: note: object is of type 'SwFlyDrawContact'
>  00 00 00 00  50 3d 2f b8 99 7f 00 00  c0 3d 2f b8 99 7f 00 00  00 00 00 
00 00 00 00 00  d0 64 50 00
>   ^~~
>   vptr for 'SwFlyDrawContact'
> #0 0x7f99ae257936 in CalcClipRect(SdrObject const*, SwRect&, bool) 
/sw/source/core/layout/flylay.cxx:1426:51
> #1 0x7f99ad5b2607 in SwDrawView::TakeDragLimit(SdrDragMode, 
tools::Rectangle&) const /sw/source/core/draw/dview.cxx:694:13
> #2 0x7f99c317c1a0 in SdrDragView::BegDragObj(Point const&, 
OutputDevice*, SdrHdl*, short, SdrDragMethod*) 
/svx/source/svdraw/svddrgv.cxx:199:21
> #3 0x7f99c18eef25 in E3dView::BegDragObj(Point const&, OutputDevice*, 
SdrHdl*, short, SdrDragMethod*) /svx/source/engine3d/view3d.cxx:1243:21
> #4 0x7f99adcfa821 in SwFEShell::BeginDrag(Point const*, bool) 
/sw/source/core/frmedt/feshview.cxx:741:20
> #5 0x7f99b3ea5ffd in SwWrtShell::BeginFrameDrag(Point const*, bool) 
/sw/source/uibase/wrtsh/select.cxx:761:20
> #6 0x7f99b27a8238 in SwWrtShell::Drag(Point const*, bool) 
/sw/source/uibase/inc/wrtsh.hxx:124:56
> #7 0x7f99b2742135 in SwEditWin::MouseMove(MouseEvent const&) 
/sw/source/uibase/docvw/edtwin.cxx:4489:25
> #8 0x7f99dcdc6f64 in testTdf161261::TestBody() 
/sw/qa/extras/uiwriter/uiwriter6.cxx:1613:14

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

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

diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx 
b/sw/qa/extras/uiwriter/uiwriter6.cxx
index 6322120748da..fb3ecb357bcd 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -36,7 +36,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -1560,68 +1559,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160836)
 CPPUNIT_ASSERT_EQUAL(tools::Long(1980), pCellA1->getFrameArea().Height());
 }
 
-CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161261)
-{
-createSwDoc("tdf160842.fodt");
-SwDoc* pDoc = getSwDoc();
-CPPUNIT_ASSERT(pDoc);
-SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
-CPPUNIT_ASSERT(pWrtShell);
-// the cursor is not in the table
-CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable());
-
-SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
-auto pPage = dynamic_cast(pLayout->Lower());
-CPPUNIT_ASSERT(pPage);
-const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs();
-CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size());
-auto pPageFly = dynamic_cast(rPageObjs[0]);
-CPPUNIT_ASSERT(pPageFly);
-auto pTable = dynamic_cast(pPageFly->GetLower());
-CPPUNIT_ASSERT(pTable);
-auto pRow1 = pTable->GetLower();
-CPPUNIT_ASSERT(pRow1->IsRowFrame());
-auto pCellA1 = pRow1->GetLower();
-CPPUNIT_ASSERT(pCellA1);
-const SwRect& rCellA1Rect = pCellA1->getFrameArea();
-auto nRowHeight = rCellA1Rect.Height();
-
-// select image by clicking on it at the center of the upper cell
-Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, 
rCellA1Rect.Top() + nRowHeight / 2);
-vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin();
-Point aFrom = rEditWin.LogicToPixel(ptFrom);
-MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK, 
MOUSE_LEFT);
-rEditWin.MouseButtonDown(aClickEvent);
-rEditWin.MouseButtonUp(aClickEvent);
-
-// Then make sure that the image is selected:
-SelectionType eType = pWrtShell->GetSelectionType();
-CPPUNIT_ASSERT_EQUAL(SelectionType::Graphic, eType);
-
-uno::Reference xShape = getShape(2);
-CPPUNIT_ASSERT(xShape.is());
-
-// zoom image by drag & drop using right bottom handle of the image
-const SwRect& rSelRect = pWrtShell->GetAn

core.git: bridges/Library_cpp_uno.mk bridges/source unotest/source

2024-05-29 Thread Stephan Bergmann (via logerrit)
 bridges/Library_cpp_uno.mk   |1 
 bridges/source/cpp_uno/gcc3_wasm/abi.cxx |   84 +++
 bridges/source/cpp_uno/gcc3_wasm/abi.hxx |   74 +++
 bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx |   37 +--
 unotest/source/embindtest/embindtest.js  |   19 ++
 5 files changed, 208 insertions(+), 7 deletions(-)

New commits:
commit 7175431a4b2154113c2c3c28f7ae8a8f14a84c7a
Author: Stephan Bergmann 
AuthorDate: Tue May 28 15:32:50 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 29 10:35:01 2024 +0200

Implement exception catching

(Without 22ce8ed05be37d676739a578b05cc5217109fd87 "Emscripten: Unconditional
--enable-wasm-exceptions", this would have failed to link due to missing
__cxa_current_exception_type and __cxa_get_globals.)

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

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index c42778f359c1..462fd538e104 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -83,6 +83,7 @@ bridge_exception_objects := cpp2uno uno2cpp
 bridge_noopt_objects := except
 else ifeq ($(OS),EMSCRIPTEN)
 bridges_SELECTED_BRIDGE := gcc3_wasm
+bridge_exception_objects := abi
 bridge_noopt_objects := cpp2uno except uno2cpp
 $(eval $(call gb_Library_add_generated_asmobjects,$(CPPU_ENV)_uno, \
 CustomTarget/bridges/gcc3_wasm/callvirtualfunction-impls \
diff --git a/bridges/source/cpp_uno/gcc3_wasm/abi.cxx 
b/bridges/source/cpp_uno/gcc3_wasm/abi.cxx
new file mode 100644
index ..5d21cd1d8522
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_wasm/abi.cxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "abi.hxx"
+
+namespace
+{
+OUString toUnoName(char const* name)
+{
+assert(name != nullptr);
+OUStringBuffer b;
+bool scoped = *name == 'N';
+if (scoped)
+{
+++name;
+}
+for (;;)
+{
+assert(*name >= '0' && *name <= '9');
+std::size_t n = *name++ - '0';
+while (*name >= '0' && *name <= '9')
+{
+n = 10 * n + (*name++ - '0');
+}
+b.appendAscii(name, n);
+name += n;
+if (!scoped)
+{
+assert(*name == 0);
+break;
+}
+if (*name == 'E')
+{
+assert(name[1] == 0);
+break;
+}
+b.append('.');
+}
+return b.makeStringAndClear();
+}
+}
+
+void abi_wasm::mapException(__cxxabiv1::__cxa_exception* exception, 
std::type_info const* type,
+uno_Any* any, uno_Mapping* mapping)
+{
+assert(exception != nullptr);
+assert(type != nullptr);
+OUString unoName(toUnoName(type->name()));
+typelib_TypeDescription* td = nullptr;
+typelib_typedescription_getByName(, unoName.pData);
+if (td == nullptr)
+{
+css::uno::RuntimeException e("exception type not found: " + unoName);
+uno_type_any_constructAndConvert(
+any, , 
cppu::UnoType::get().getTypeLibType(), mapping);
+}
+else
+{
+uno_any_constructAndConvert(any, exception->adjustedPtr, td, mapping);
+typelib_typedescription_release(td);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/bridges/source/cpp_uno/gcc3_wasm/abi.hxx 
b/bridges/source/cpp_uno/gcc3_wasm/abi.hxx
new file mode 100644
index ..67dbd06c0390
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_wasm/abi.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+#if !HAVE_CXXABI_H_CXA_EXCEPTION
+// <https://github.com/emscripten-core/emscripten/>, 
system/lib/libcxxabi/src/cxa_exception.h:
+namespace __cxxabiv1
+{
+struct __cxa_exception
+{
+std::size_t referenceCount;
+std::type_info* exceptionType;
+// In wasm, destructors retu

core.git: config_host.mk.in configure.ac solenv/gbuild static/README.wasm.md unotest/source

2024-05-29 Thread Stephan Bergmann (via logerrit)
 config_host.mk.in  |1 
 configure.ac   |   37 +++--
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |   15 --
 static/README.wasm.md  |   21 --
 unotest/source/embindtest/embindtest.js|   18 ++--
 5 files changed, 11 insertions(+), 81 deletions(-)

New commits:
commit 22ce8ed05be37d676739a578b05cc5217109fd87
Author: Stephan Bergmann 
AuthorDate: Tue May 28 15:16:32 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 29 08:01:38 2024 +0200

Emscripten: Unconditional --enable-wasm-exceptions

(...which will be beneficial, in turn, to implement exception handling in 
the
work-in-progress bridges/source/cpp_uno/gcc3_wasm UNO bridge).

As per

<https://developer.mozilla.org/en-US/docs/WebAssembly#browser_compatibility>,
Wasm exceptions appear to be supported by most if not all relevant engines 
by
now.

* Lets see whether the "Note that to really use WASM exceptions everywhere" 
for
external libraries in solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk does 
have
any practical consequences (but ignoring it for now).

* This change depends on the preceding 
77129fbb74bcefde4551d494f029169e7c6026e3
"Emscripten: Add hack to prepare for --enable-wasm-exceptions" to work 
around
the issue that was mentioned in static/README.wasm.md.

* In unotest/source/embindtest/embindtest.js, getExceptionMessage started to
work now, no longer exhibiting the RuntimeError that had been documented 
there
for non-Wasm-based exceptions.

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

diff --git a/config_host.mk.in b/config_host.mk.in
index 92ae275b43d5..334d9fd53f16 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -230,7 +230,6 @@ export ENABLE_SKIA=@ENABLE_SKIA@
 export ENABLE_SKIA_DEBUG=@ENABLE_SKIA_DEBUG@
 export ENABLE_SYMBOLS_FOR=@ENABLE_SYMBOLS_FOR@
 export ENABLE_VALGRIND=@ENABLE_VALGRIND@
-export ENABLE_WASM_EXCEPTIONS=@ENABLE_WASM_EXCEPTIONS@
 export ENABLE_WASM_STRIP_ACCESSIBILITY=@ENABLE_WASM_STRIP_CALC@
 export ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_WRITER=@ENABLE_WASM_STRIP_WRITER@
diff --git a/configure.ac b/configure.ac
index 22c95079f2d8..900f8227c01f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1431,9 +1431,9 @@ dnl 
===
 dnl Sanity checks for Emscripten SDK setup
 dnl ===
 
-EMSCRIPTEN_MIN_MAJOR=2
-EMSCRIPTEN_MIN_MINOR=0
-EMSCRIPTEN_MIN_TINY=32
+EMSCRIPTEN_MIN_MAJOR=3
+EMSCRIPTEN_MIN_MINOR=1
+EMSCRIPTEN_MIN_TINY=3
 
EMSCRIPTEN_MIN_VERSION="${EMSCRIPTEN_MIN_MAJOR}.${EMSCRIPTEN_MIN_MINOR}.${EMSCRIPTEN_MIN_TINY}"
 
 if test "$_os" = "Emscripten"; then
@@ -2148,13 +2148,6 @@ AC_ARG_WITH(main-module,
 Default value is 'writer'.]),
 ,)
 
-AC_ARG_ENABLE(wasm-exceptions,
-AS_HELP_STRING([--enable-wasm-exceptions],
-[Build with native WASM exceptions (AKA -fwasm-exceptions),
-matter of fact, this is currently not finished by any implementation)
-(see https://webassembly.org/roadmap/ for the current state]),
-,)
-
 AC_ARG_ENABLE(xmlhelp,
 AS_HELP_STRING([--disable-xmlhelp],
 [Disable XML help support]),
@@ -3249,23 +3242,6 @@ if test "$enable_wasm_strip" = "yes"; then
 AC_DEFINE(ENABLE_WASM_STRIP_SCEXPORTS)
 fi
 
-EMSCRIPTEN_NEH_MAJOR=3
-EMSCRIPTEN_NEH_MINOR=1
-EMSCRIPTEN_NEH_TINY=3
-EMSCRIPTEN_NEH_VERSION="${EMSCRIPTEN_NEH_MAJOR}.${EMSCRIPTEN_NEH_MINOR}.${EMSCRIPTEN_NEH_TINY}"
-
-if test "$enable_wasm_exceptions" = yes; then
-AC_MSG_CHECKING([if Emscripten version is at least $EMSCRIPTEN_NEH_VERSION 
for SjLj + native EH])
-check_semantic_version_three_prefixed EMSCRIPTEN NEH
-if test $? -ne 0; then
-AC_MSG_ERROR([no, found $EMSCRIPTEN_VERSION])
-else
-AC_MSG_RESULT([yes ($EMSCRIPTEN_VERSION)])
-fi
-ENABLE_WASM_EXCEPTIONS=TRUE
-fi
-AC_SUBST(ENABLE_WASM_EXCEPTIONS)
-
 # Whether to build "avmedia" functionality or not.
 
 if test "$enable_avmedia" = yes; then
@@ -6407,7 +6383,7 @@ if test -z "$enable_pch"; then
 enable_pch=no
 fi
 fi
-if test "$enable_pch" != no -a "$_os" = Emscripten -a 
"$ENABLE_WASM_EXCEPTIONS" = TRUE; then
+if test "$enable_pch" != no -a "$_os" = Emscripten; then
 AC_MSG_ERROR([PCH currently isn't supported for Emscripten with native EH 
(nEH) because of missing Sj/Lj support with nEH in clang.])
 fi
 if test "$enable_pch" != "no" -a "$_os"

core.git: unotest/source

2024-05-28 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.js |8 
 1 file changed, 8 insertions(+)

New commits:
commit 6b6f18ed52e25df12347057f276712bd95d20fec
Author: Stephan Bergmann 
AuthorDate: Tue May 28 13:26:37 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue May 28 21:52:42 2024 +0200

Emscripten: Document failing getExceptionMessage

(and add a console.assert(false) to verify that an exception actually gets
thrown)

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

diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index f6cc71bbc906..87d3d2fc281c 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -633,11 +633,19 @@ Module.addOnPostRun(function() {
 
console.assert(test.isDouble(uno.org.libreoffice.embindtest.Constants.Double));
 try {
 test.throwRuntimeException();
+console.assert(false);
 } catch (e) {
 incrementExceptionRefcount(e);
 //TODO, needed when building with JS-based -fexceptions, see
 // <https://github.com/emscripten-core/emscripten/issues/17115> 
"[EH] Fix inconsistency
 // of refcounting in Emscripten EH vs. Wasm EH"
+//TODO: The recommended way to obtain the exception's type and message 
would reportedly
+// (<https://emscripten.org/docs/porting/exceptions.html#
+// handling-c-exceptions-from-javascript>) be
+//   const [type, message] = getExceptionMessage(e);
+// but that causes a "RuntimeError: memory access out of bounds" from 
within
+// getExceptionMessage -> getExceptionMessageCommon -> 
__get_exception_message at least with
+// emsdk 3.1.46:
 console.assert(e.name === 'com::sun::star::uno::RuntimeException');
 console.assert(e.message === undefined); //TODO
 //TODO: console.assert(e.Message.startsWith('test'));


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

2024-05-28 Thread Stephan Bergmann (via logerrit)
 desktop/source/app/sofficemain.cxx |6 ++
 static/README.wasm.md  |6 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 77129fbb74bcefde4551d494f029169e7c6026e3
Author: Stephan Bergmann 
AuthorDate: Wed May 15 15:24:48 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue May 28 15:14:12 2024 +0200

Emscripten: Add hack to prepare for --enable-wasm-exceptions

(...which will be beneficial, in turn, to implement exception handling in 
the
work-in-progress bridges/source/cpp_uno/gcc3_wasm UNO bridge).

Once setting --enable-wasm-exceptions, plus the corresponding
-sSUPPORT_LONGJMP=wasm in qt5, I indeed started to see the "RuntimeError: 
null
function or function signature mismatch" that was already mentioned in
static/README.wasm.md.  I could track it down to the early destruction of 
the
aDesktop local variable in soffice_main, as I now explain there.  However, 
it
beats me why that variable gets destroyed early.  The 
desktop::Desktop::~Desktop
dtor claims to be called from within main -> soffice_main ->
desktop::Desktop::~Desktop, but at a time when the call to main -> 
soffice_main
-> SVMain has not yet returned.  There also does not appear to be any C++
exception handling stack unwinding going on.  (It could be related somehow 
to
-sSUPPORT_LONGJMP=wasm, I don't know.)  And everything appears to just work 
fine
after turning that aDesktop local variable into a (leaked) heap instance
instead, so go with that hack for now...

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

diff --git a/desktop/source/app/sofficemain.cxx 
b/desktop/source/app/sofficemain.cxx
index 73ac6e24cfe4..33881784d45c 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -63,7 +63,13 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
 #endif
 tools::extendApplicationEnvironment();
 
+#if defined EMSCRIPTEN
+//TODO, see "Experimental (AKA currently broken) WASM exception + SjLj 
build" in
+// static/README.wasm.md:
+new desktop::Desktop();
+#else
 desktop::Desktop aDesktop;
+#endif
 // This string is used during initialization of the Gtk+ VCL module
 Application::SetAppName( u"soffice"_ustr );
 
diff --git a/static/README.wasm.md b/static/README.wasm.md
index 5397e2124d16..97be5a14123b 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -122,7 +122,11 @@ You can build LO with WASM exceptions, which should be 
"much" faster then the JS
 based Emscripten EH handling. For setjmp / longjmp (SjLj) used by the PNG and 
JPEG
 libraries error handling, this needs Emscripten 3.1.3+. That builds, but 
execution
 still fails early with a signature mismatch call to Task::UpdateMinPeriod in 
LO's
-job scheduler code. Unfortunately the build also needs a Qt build with
+job scheduler code (concretely: the call to 
`pSchedulerData->mpTask->UpdateMinPeriod` in
+`Scheduler::CallbackTaskScheduling` in vcl/source/app/scheduler.cxx being a 
pure virtual call on a
+destroyed `desktop::Desktop::m_firstRunTimer` instance, because 
`desktop::Desktop aDesktop` in
+`soffice_main` in desktop/source/app/sofficemain.cxx gets destroyed early, for 
unclear reasons).
+Unfortunately the build also needs a Qt build with
 "-s SUPPORT_LONGJMP=wasm", which is incompatible with the JS EH + SjLj.
 
 The LO configure flag is simply an additional --enable-wasm-exceptions. Qt5 can


core.git: bin/check-elf-dynamic-objects

2024-05-27 Thread Stephan Bergmann (via logerrit)
 bin/check-elf-dynamic-objects |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit bd91407294358745553c9c364728c8fc83a85f2f
Author: Stephan Bergmann 
AuthorDate: Mon May 27 12:46:38 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 27 22:53:11 2024 +0200

Adapt CustomTarget_postprocess/check_dynamic_objects

...to 441d8ed9be0e7f831b455a69b8688dcb79a8bc00 "tdf#145735 avmedia qt: Use
QtMultimedia for Qt 6 media playback", which caused

> instdir/program/libavmediaqt6.so has suspicious NEEDED: libQt6Core.so.6
> instdir/program/libavmediaqt6.so has suspicious NEEDED: libQt6Gui.so.6
> instdir/program/libavmediaqt6.so has suspicious NEEDED: libQt6Widgets.so.6
> instdir/program/libavmediaqt6.so has suspicious NEEDED: libQt6Network.so.6
> instdir/program/libavmediaqt6.so has suspicious NEEDED: 
libQt6Multimedia.so.6
> instdir/program/libvclplug_qt6lo.so has suspicious NEEDED: 
libQt6Multimedia.so.6
> instdir/program/libvclplug_qt6lo.so has suspicious NEEDED: 
libQt6MultimediaWidgets.so.6
> instdir/program/libavmediaqt6.so has suspicious NEEDED: 
libQt6MultimediaWidgets.so.6
> instdir/program/libavmediaqt6.so has suspicious NEEDED: libxcb.so.1

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

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index e963864a2fc4..bdf551b12cb5 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -98,7 +98,7 @@ gstreamerallowlist="libgsttag-1.0.so.0 libgstaudio-1.0.so.0 
libgstpbutils-1.0.so
 gtk3allowlist="libgtk-3.so.0 libgdk-3.so.0 libcairo-gobject.so.2 
libpangocairo-1.0.so.0 libfribidi.so.0 libatk-1.0.so.0 libcairo.so.2 
libpangoft2-1.0.so.0 libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 
libgdk_pixbuf-2.0.so.0 libharfbuzz.so.0 ${gioallowlist}"
 gtk4allowlist="libgtk-4.so.1 libcairo-gobject.so.2 libpangocairo-1.0.so.0 
libatk-1.0.so.0 libcairo.so.2 libpango-1.0.so.0 libgdk_pixbuf-2.0.so.0 
libharfbuzz.so.0 libgraphene-1.0.so.0 ${gioallowlist}"
 qt5allowlist="libQt5Core.so.5 libQt5Gui.so.5 libQt5Network.so.5 
libQt5Widgets.so.5 libQt5X11Extras.so.5 libcairo.so.2 libxcb.so.1 
libxcb-icccm.so.4 ${gobjectallowlist}"
-qt6allowlist="libQt6Core.so.6 libQt6Gui.so.6 libQt6Network.so.6 
libQt6Widgets.so.6 libxcb.so.1"
+qt6allowlist="libQt6Core.so.6 libQt6Gui.so.6 libQt6Multimedia.so.6 
libQt6MultimediaWidgets.so.6 libQt6Network.so.6 libQt6Widgets.so.6 libxcb.so.1"
 kf5allowlist="libKF5ConfigCore.so.5 libKF5CoreAddons.so.5 libKF5I18n.so.5 
libKF5KIOCore.so.5 libKF5KIOFileWidgets.so.5 libKF5KIOWidgets.so.5 
libKF5WindowSystem.so.5"
 avahiallowlist="libavahi-common.so.3 libavahi-client.so.3 ${gdbusallowlist}"
 kerberosallowlist="libgssapi_krb5.so.2 libcom_err.so.2 libkrb5.so.3"
@@ -133,6 +133,9 @@ local file="$1"
 */libavmediagtk.so)
 allowlist="${allowlist} ${gtk4allowlist}"
 ;;
+*/libavmediaqt6.so)
+allowlist="${allowlist} ${qt6allowlist}"
+;;
 */libvclplug_kf5lo.so|*/libkf5be1lo.so)
 if [ "$ENABLE_KF5" = TRUE ]; then
 allowlist="${allowlist} ${qt5allowlist} ${kf5allowlist}"


core.git: compilerplugins/clang

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

New commits:
commit 73064240850c78e93ee6c534a388aba617e4c234
Author: Stephan Bergmann 
AuthorDate: Mon May 27 07:37:32 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 27 09:40:00 2024 +0200

False loplugin:staticmethods with LLVM 19 trunk

> In file included from libreofficekit/source/gtk/lokdocview.cxx:26:
> In file included from include/vcl/event.hxx:28:
> In file included from include/vcl/outdev.hxx:30:
> In file included from include/vcl/bitmap.hxx:31:
> In file included from include/vcl/region.hxx:26:
> In file included from include/basegfx/polygon/b2dpolypolygon.hxx:27:
> In file included from include/basegfx/range/b2drange.hxx:27:
> In file included from include/basegfx/point/b2dpoint.hxx:27:
> include/basegfx/tuple/Size2D.hxx:30:10: error: this member function can 
be declared static [loplugin:staticmethods]
>30 | TYPE getWidth() const { return Tuple2D::getX(); }
>   | ~^~
> include/basegfx/tuple/Size2D.hxx:32:10: error: this member function can 
be declared static [loplugin:staticmethods]
>32 | TYPE getHeight() const { return Tuple2D::getY(); }
>   | ~^~~
> include/basegfx/tuple/Size2D.hxx:34:10: error: this member function can 
be declared static [loplugin:staticmethods]
>34 | void setWidth(TYPE const& rWidth) { 
Tuple2D::setX(rWidth); }
>   | 
~^
> include/basegfx/tuple/Size2D.hxx:36:10: error: this member function can 
be declared static [loplugin:staticmethods]
>36 | void setHeight(TYPE const& rHeight) { 
Tuple2D::setY(rHeight); }
>   | 
~^~~~

...but no idea why exactly that started to hit me just now

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

diff --git a/compilerplugins/clang/staticmethods.cxx 
b/compilerplugins/clang/staticmethods.cxx
index ebe91520a7d5..214c26cdd449 100644
--- a/compilerplugins/clang/staticmethods.cxx
+++ b/compilerplugins/clang/staticmethods.cxx
@@ -33,9 +33,10 @@ public:
 bool TraverseCXXMethodDecl(const CXXMethodDecl * decl);
 
 bool VisitCXXThisExpr(const CXXThisExpr *) { bVisitedThis = true; return 
true; }
-// these two indicate that we hit something that makes our analysis 
unreliable
+// these three indicate that we hit something that makes our analysis 
unreliable
 bool VisitUnresolvedMemberExpr(const UnresolvedMemberExpr *) { 
bVisitedThis = true; return true; }
 bool VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *) 
{ bVisitedThis = true; return true; }
+bool VisitDependentScopeDeclRefExpr(const DependentScopeDeclRefExpr *) { 
bVisitedThis = true; return true; }
 private:
 StringRef getFilename(SourceLocation loc);
 };


Re: ESC meeting minutes: 2024-05-09

2024-05-09 Thread Stephan Bergmann

On 5/9/24 16:53, Miklos Vajna wrote:
     + MAR-based updater will be enabled by default on Windows, but not 
Linux (Hossein)

   + rpm/deb update is handled by distro packages
   + for the ones taking binaries from TDF
   + TDF to provide rpm/deb repos?
   + the files are hosted already
   + just the repo defs are missing
   + suggesting to provide these repos
   + proposal is to povide repos and ignore MAR on Linux for now
   + interested in doing the scripting work? (Miklos)
     + the important part is the description / dependencies (Hossein)
     + willing to help
   + linux downloads are 2% of TDF downloads (Cloph)
     + so not a huge amount, but not objecting
     + only the the ones which are covered by rpm/deb binaries
   + what is the lag between Ubuntu-provided packages / TDF 
releases? (Olivier)

     + the package from Ubuntu follows TDF quickly
     + similar with Debian, thanks to Rene (Cloph)
   + with actively supported versions
     + see LibreOffice 7.3.7 for Ubuntu 22.04 
https://packages.ubuntu.com/jammy/libreoffice (Hossein)


And, just to mention it again, for Linux there's also always the Flatpak 
version on Flathub, 
.  I'm still 
providing builds there on a somewhat voluntary basis, usually as soon as 
a new version of LO gets released.


Re: ESC meeting minutes: 2024-05-09

2024-05-09 Thread Stephan Bergmann

On 5/9/24 16:53, Miklos Vajna wrote:
     + MAR-based updater will be enabled by default on Windows, but not 
Linux (Hossein)

   + rpm/deb update is handled by distro packages
   + for the ones taking binaries from TDF
   + TDF to provide rpm/deb repos?
   + the files are hosted already
   + just the repo defs are missing
   + suggesting to provide these repos
   + proposal is to povide repos and ignore MAR on Linux for now
   + interested in doing the scripting work? (Miklos)
     + the important part is the description / dependencies (Hossein)
     + willing to help
   + linux downloads are 2% of TDF downloads (Cloph)
     + so not a huge amount, but not objecting
     + only the the ones which are covered by rpm/deb binaries
   + what is the lag between Ubuntu-provided packages / TDF 
releases? (Olivier)

     + the package from Ubuntu follows TDF quickly
     + similar with Debian, thanks to Rene (Cloph)
   + with actively supported versions
     + see LibreOffice 7.3.7 for Ubuntu 22.04 
https://packages.ubuntu.com/jammy/libreoffice (Hossein)


And, just to mention it again, for Linux there's also always the Flatpak 
version on Flathub, 
.  I'm still 
providing builds there on a somewhat voluntary basis, usually as soon as 
a new version of LO gets released.


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(),
+   

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),EMSCRIP

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
 # CxxClrObject   

Re: Create a config extension to change a string-list value

2024-05-07 Thread Stephan Bergmann

On 5/6/24 23:19, Juan C. Sanz wrote:
There is a document in the wiki 
 explaining how to create a configuration extensions.


In this document it is said that the valid property values are string, 
boolean, int, short, long, double, binary.


Also in the Chapter 15 - Configuration Management 
 of the Developers Guide that the same types are supported.


But if you search for some config values in Expert configuration, the 
type may be different of the supported types, for example you con see 
string-list (or depend on version []string).


The defining document for the configuration XML format is 
, and also see the 
officecfg/registry/*.dtd files in the LO core repo.


I use something like this, but changing oor:type="xs:string-list" for 
every of the valid types, and with or without  label:


oor:name="Common" oor:package="org.openoffice.Office" 
xmlns:oor="http://openoffice.org/2001/registry; 
xmlns:xs="http://www.w3.org/2001/XMLSchema;>oor:name="Security">oor:name="SecureURL" oor:type="xs:string-list" 
oor:finalized="false">"$(work)/BD"


Three notes:

* The type is called oor:string-list, not xs:string-list.

* Your string list has one element with literal value "$(work)/BD".  You 
probably don't want surrounding quotes as part of the element's value.


* Whether or not something like $(work) is expanded in some way does not 
depend on the configuration machinery itself, but on the code that 
consumes that specific property.  I have no idea whether that value 
actually means what you would expect it to me.


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,%.w

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 p

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
- 

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 +4

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
<https://lists.freedesktop.org/archives/libreoffice/2024-April/091882.html> 
"Re:
Uploading external tarballs to <https://dev-www.libreoffice.org/src>?")

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


Re: Uploading external tarballs to ?

2024-04-26 Thread Stephan Bergmann

On 4/25/24 23:02, Stephan Bergmann wrote:
(Shortly after I had submitted 
<https://git.libreoffice.org/extern/+/9b752c6eee74b5f540b263819b461f19befe0766%5E%21> "src/boost_1_85_0.tar.xz", a local test build of <https://gerrit.libreoffice.org/c/core/+/166656> "Upgrade external/boost to latest Boost 1.85.0" scarily failed with


cd /home/sberg/lo0/tar/tmp && echo fetching boost_1_85_0.tar.xz && 
bash -c '/usr/bin/curl -L -O 
https://dev-www.libreoffice.org/src/boost_1_85_0.tar.xz 2>&1 | tee -a 
/home/sberg/lo0/tar/fetch.log && [ $PIPESTATUS -eq 0 ]' && SUM=`shasum 
-a 256 boost_1_85_0.tar.xz | sed "s/ .*//"` && if test "$SUM" != 
"4e23218ff5036d57afd20f7cdab2e94cdbf6ba9c509d656ace643a81c40a985a"; 
then echo ERROR: expected checksum for boost_1_85_0.tar.xz is 
4e23218ff5036d57afd20f7cdab2e94cdbf6ba9c509d656ace643a81c40a985a 2>&1 
| tee -a /home/sberg/lo0/tar/fetch.log; false; fi && mv 
boost_1_85_0.tar.xz ../ fetching boost_1_85_0.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed
100   153  100   153    0 0   1131  0 --:--:-- --:--:-- 
--:--:--  1141
ERROR: expected checksum for boost_1_85_0.tar.xz is 
4e23218ff5036d57afd20f7cdab2e94cdbf6ba9c509d656ace643a81c40a985a
make: *** [/home/sberg/lo1/core/Makefile.fetch:102: 
/home/sberg/lo1/core/workdir/download] Error 1


while a second attempt a little later succeeded.)


so <https://gerrit.libreoffice.org/c/core/+/166692> "Fail early when 
external tarball can't be fetched" to make such failure output less 
misleading


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

<https://dev-www.libreoffice.org/src/boost_1_85_0.tar.xz> 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. 
<https://www.boost.org/users/history/version_1_85_0.html>
> 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
  
<https://github.com/boostorg/property_tree/commit/e7c4005098749d878375be9ea8778b420ee89b86>
  "Use BOOST_UNREACHABLE_RETURN at the end of function" (the referenced
  <https://svn.boost.org/trac/boost/ticket/11501> appears to no longer be
  reachable, though).

* The boost/math parts of external/boost/Wundef.patch.0 are obsoleted by
  
<https://github.com/boostorg/math/commit/30cb6fc1fe871046c2880c8c39b0cea5b91a7f2c>
  "Fix -Wundef warnings".

* external/boost/boost-emscripten-noshm.patch.0 is obsoleeted by
  
<https://github.com/boostorg/interprocess/commit/94ead3e59d197e0d8d908b7e8918673bed51fa34>
  "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
--

Re: Uploading external tarballs to ?

2024-04-25 Thread Stephan Bergmann

On 4/25/24 03:22, Guilhem Moulin wrote:

See https://git.libreoffice.org/extern#introduction .


"The new file will then shortly be available at 
https://dev-www.libreoffice.org/src/my-new-file.tar.gz once the 
changeset is submitted by a committer."


Is there a reason why there is apparently that temporal gap between 
submitting the change in Gerrit and the file becoming available for 
download?


(Shortly after I had submitted 
 
"src/boost_1_85_0.tar.xz", a local test build of 
 "Upgrade external/boost 
to latest Boost 1.85.0" scarily failed with


cd /home/sberg/lo0/tar/tmp && echo fetching boost_1_85_0.tar.xz && bash -c '/usr/bin/curl -L -O https://dev-www.libreoffice.org/src/boost_1_85_0.tar.xz 2>&1 | tee -a /home/sberg/lo0/tar/fetch.log && [ $PIPESTATUS -eq 0 ]' && SUM=`shasum -a 256 boost_1_85_0.tar.xz | sed "s/ .*//"` && if test "$SUM" != "4e23218ff5036d57afd20f7cdab2e94cdbf6ba9c509d656ace643a81c40a985a"; then echo ERROR: expected checksum for boost_1_85_0.tar.xz is 4e23218ff5036d57afd20f7cdab2e94cdbf6ba9c509d656ace643a81c40a985a 2>&1 | tee -a /home/sberg/lo0/tar/fetch.log; false; fi && mv boost_1_85_0.tar.xz ../ 
fetching boost_1_85_0.tar.xz

  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100   153  100   1530 0   1131  0 --:--:-- --:--:-- --:--:--  1141
ERROR: expected checksum for boost_1_85_0.tar.xz is 
4e23218ff5036d57afd20f7cdab2e94cdbf6ba9c509d656ace643a81c40a985a
make: *** [/home/sberg/lo1/core/Makefile.fetch:102: 
/home/sberg/lo1/core/workdir/download] Error 1


while a second attempt a little later succeeded.)



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
 


Uploading external tarballs to ?

2024-04-24 Thread Stephan Bergmann
Is there a new mechanism in place to do so?  The relevant directory 
appears to only be root-writable now?


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

<https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#return-values>:
"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]

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.un

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:

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:
-ret

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

<https://emscripten.org/docs/porting/exceptions.html#handling-c-exceptions-from-javascript>
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
+// <https://github.com/emscripten-core/emscripten/issues/17115> 
"[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, 

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);
 


ESC meeting minutes: 2024-04-11

2024-04-11 Thread Stephan Bergmann

* Present:
+ Jonathan, Olivier, Cloph, Stephan, Eike, Hossein, Michael W., 
Regina,

  Michael S., Ilmari, Xisco

* Completed Action Items:

* Pending Action Items:
+ Update api.libreoffice.org from 7.4 (Cloph)

* Release Engineering update (Cloph)
+ 7.6: 7.6.7 RC1 next week
+ 24.2: 24.2.3 RC1 this week, branch later today

* Documentation (Olivier)
+ New Help (no news)
+ Helpcontent2
+ Updates and fixes (ohallot)
+ Guides
+ Calc guide available as web pages: books.libreoffice.org

+ Bugzilla Documentation statistics
269(269) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created  7(-1)   52(0)  89(1) 224(-5)
 commented 19(4)96(-6)238(-4)848(-45)
  resolved  2(1)22(2)  38(0) 114(-3)
+ top 10 contributors:
  Olivier Hallot made 36 changes in 1 month, and 259 changes in 
1 year

  Pierre F made 30 changes in 1 month, and 30 changes in 1 year
  Dione Maddern made 20 changes in 1 month, and 31 changes in 1 
year
  Adolfo Jayme Barrientos made 20 changes in 1 month, and 24 
changes in 1 year
  Kaganski, Mike made 15 changes in 1 month, and 68 changes in 
1 year
  Vernon, Stuart Foote made 10 changes in 1 month, and 85 
changes in 1 year

  Nabet, Julien made 9 changes in 1 month, and 53 changes in 1 year
  Ilmari Lauhakangas made 8 changes in 1 month, and 88 changes 
in 1 year

  Heiko Tietze made 7 changes in 1 month, and 88 changes in 1 year
  MeBugzilla made 7 changes in 1 month, and 7 changes in 1 year

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

+ Updates:
BZ changes   1 week1 month3 months   12 months
 added  8(4)  18(0)  21(1)   29(-1)
 commented 30(-20)   208(-57)   505(-31)   1981(-48)
   removed  0(-1)  1(0)   1(0)   12(-1)
  resolved  6(-2) 26(-2) 82(2)  316(3)
+ top 10 contributors:
  Stéphane Guillou made 90 changes in 1 month, and 667 changes 
in 1 year
  Heiko Tietze made 85 changes in 1 month, and 1150 changes in 
1 year
  Vernon, Stuart Foote made 62 changes in 1 month, and 281 
changes in 1 year

  Ady made 20 changes in 1 month, and 146 changes in 1 year
  Justin Luth made 18 changes in 1 month, and 140 changes in 1 year
  Patrick Luby made 17 changes in 1 month, and 24 changes in 1 year
  Ilmari Lauhakangas made 16 changes in 1 month, and 164 
changes in 1 year
  Devansh Varshney made 16 changes in 1 month, and 20 changes 
in 1 year
  Fortin Tam, Jean-François made 10 changes in 1 month, and 24 
changes in 1 year
  Weghorn, Michael made 8 changes in 1 month, and 20 changes in 
1 year


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

* Crash Reporting (Xisco)
+ 7.6.5.27183(+1052)
+ 7.6.6.3467(+0)
+ 24.2.0.314690(+832)
+ 24.2.1.29690(+1538)
+ 24.2.2.21663(+1205)

- New in 24.2.1.2

- 
https://crashreport.libreoffice.org/stats/signature/static%20bool%20%60anonymous%20namespace'::IsAllHiddenRow(const%20class%20SwRowFrame%20&%20const,%20const%20class%20SwTabFrame%20&%20const)


- Since f472defff73d495f564a0d8a84f24bc3739c9603 "sw: layout: 
prevent bad page break in table with 0-height rows"


- Michael S. ?

- should be fixed by https://gerrit.libreoffice.org/c/core/+/164788


* Mentoring (Hossein)
 + Reviewed submissions from the newcomers
 + Multiple calls for Windows build problems
 + New draft blog post
   + Porting Java tests to C++
  committer...   1 week  1 month 3 months12 months
  open  77(1)   142(-13)159(-16) 159(-16)
   reviews 304(-152)   1540(-50)   3974(-96)   12510(-4)
merged 194(-56)1015(-72)   3361(-72)   12495(23)
 abandoned  16(10)   51(-1) 170(0)   666(3)
   own commits 140(-37) 682(-50)   2211(-39)9276(-16)
review commits  57(-18) 314(-8) 927(-29)3065(5)
contributor...   1 week  1 month  3 months 12 months
  open  32(-28)  99(-3)  101(-5)   101(-5)
   reviews 688(-142)   2784(-108)   7946(-118)   29772(-48)
merged  21(-46) 155(2)   363(-5)  1797(-39)
 abandoned  17(12)   37(14)  290(3)689(5)
   own commits  31(-27) 181(0)   463(6)   1120(11)
review commits   0(0) 0(0) 0(0)  

ESC meeting minutes: 2024-04-11

2024-04-11 Thread Stephan Bergmann

* Present:
+ Jonathan, Olivier, Cloph, Stephan, Eike, Hossein, Michael W., 
Regina,

  Michael S., Ilmari, Xisco

* Completed Action Items:

* Pending Action Items:
+ Update api.libreoffice.org from 7.4 (Cloph)

* Release Engineering update (Cloph)
+ 7.6: 7.6.7 RC1 next week
+ 24.2: 24.2.3 RC1 this week, branch later today

* Documentation (Olivier)
+ New Help (no news)
+ Helpcontent2
+ Updates and fixes (ohallot)
+ Guides
+ Calc guide available as web pages: books.libreoffice.org

+ Bugzilla Documentation statistics
269(269) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created  7(-1)   52(0)  89(1) 224(-5)
 commented 19(4)96(-6)238(-4)848(-45)
  resolved  2(1)22(2)  38(0) 114(-3)
+ top 10 contributors:
  Olivier Hallot made 36 changes in 1 month, and 259 changes in 
1 year

  Pierre F made 30 changes in 1 month, and 30 changes in 1 year
  Dione Maddern made 20 changes in 1 month, and 31 changes in 1 
year
  Adolfo Jayme Barrientos made 20 changes in 1 month, and 24 
changes in 1 year
  Kaganski, Mike made 15 changes in 1 month, and 68 changes in 
1 year
  Vernon, Stuart Foote made 10 changes in 1 month, and 85 
changes in 1 year

  Nabet, Julien made 9 changes in 1 month, and 53 changes in 1 year
  Ilmari Lauhakangas made 8 changes in 1 month, and 88 changes 
in 1 year

  Heiko Tietze made 7 changes in 1 month, and 88 changes in 1 year
  MeBugzilla made 7 changes in 1 month, and 7 changes in 1 year

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

+ Updates:
BZ changes   1 week1 month3 months   12 months
 added  8(4)  18(0)  21(1)   29(-1)
 commented 30(-20)   208(-57)   505(-31)   1981(-48)
   removed  0(-1)  1(0)   1(0)   12(-1)
  resolved  6(-2) 26(-2) 82(2)  316(3)
+ top 10 contributors:
  Stéphane Guillou made 90 changes in 1 month, and 667 changes 
in 1 year
  Heiko Tietze made 85 changes in 1 month, and 1150 changes in 
1 year
  Vernon, Stuart Foote made 62 changes in 1 month, and 281 
changes in 1 year

  Ady made 20 changes in 1 month, and 146 changes in 1 year
  Justin Luth made 18 changes in 1 month, and 140 changes in 1 year
  Patrick Luby made 17 changes in 1 month, and 24 changes in 1 year
  Ilmari Lauhakangas made 16 changes in 1 month, and 164 
changes in 1 year
  Devansh Varshney made 16 changes in 1 month, and 20 changes 
in 1 year
  Fortin Tam, Jean-François made 10 changes in 1 month, and 24 
changes in 1 year
  Weghorn, Michael made 8 changes in 1 month, and 20 changes in 
1 year


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

* Crash Reporting (Xisco)
+ 7.6.5.27183(+1052)
+ 7.6.6.3467(+0)
+ 24.2.0.314690(+832)
+ 24.2.1.29690(+1538)
+ 24.2.2.21663(+1205)

- New in 24.2.1.2

- 
https://crashreport.libreoffice.org/stats/signature/static%20bool%20%60anonymous%20namespace'::IsAllHiddenRow(const%20class%20SwRowFrame%20&%20const,%20const%20class%20SwTabFrame%20&%20const)


- Since f472defff73d495f564a0d8a84f24bc3739c9603 "sw: layout: 
prevent bad page break in table with 0-height rows"


- Michael S. ?

- should be fixed by https://gerrit.libreoffice.org/c/core/+/164788


* Mentoring (Hossein)
 + Reviewed submissions from the newcomers
 + Multiple calls for Windows build problems
 + New draft blog post
   + Porting Java tests to C++
  committer...   1 week  1 month 3 months12 months
  open  77(1)   142(-13)159(-16) 159(-16)
   reviews 304(-152)   1540(-50)   3974(-96)   12510(-4)
merged 194(-56)1015(-72)   3361(-72)   12495(23)
 abandoned  16(10)   51(-1) 170(0)   666(3)
   own commits 140(-37) 682(-50)   2211(-39)9276(-16)
review commits  57(-18) 314(-8) 927(-29)3065(5)
contributor...   1 week  1 month  3 months 12 months
  open  32(-28)  99(-3)  101(-5)   101(-5)
   reviews 688(-142)   2784(-108)   7946(-118)   29772(-48)
merged  21(-46) 155(2)   363(-5)  1797(-39)
 abandoned  17(12)   37(14)  290(3)689(5)
   own commits  31(-27) 181(0)   463(6)   1120(11)
review commits   0(0) 0(0) 0(0)  

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


<https://github.com/flathub/org.libreoffice.LibreOffice/commit/29463ebd29eb10ba7891c87bd699047e5e13deb7>
"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,
> i

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

<https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip>.
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

<https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.jar>.

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
  
<https://github.com/mozilla/rhino/commit/ab20a73b16f68daf715c7ac4808c119bb15d698c>
  "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
---

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


<https://github.com/flathub/org.libreoffice.LibreOffice/commit/29463ebd29eb10ba7891c87bd699047e5e13deb7>
"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(cl

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

<https://dev-www.libreoffice.org/src/boost_1_84_0.tar.xz> 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. 
<https://www.boost.org/users/history/version_1_84_0.html>
> 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
  
<https://github.com/boostorg/phoenix/commit/665047aac26ad4d96b266d87504b3a88ad21b37e>
  "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/

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/

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: va

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__ &a

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&

  1   2   3   4   5   6   7   8   9   10   >