core.git: Branch 'distro/collabora/co-24.04' - oox/source

2024-03-18 Thread Stephan Bergmann (via logerrit)
 oox/source/crypto/CryptTools.cxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit bd688c1a2af068795a465bff9cd732dcbb924ce1
Author: Stephan Bergmann 
AuthorDate: Thu Jan 18 13:16:56 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 18 14:35:33 2024 +0100

-Werror,-Wdeprecated-declarations (Emscripten)

> oox/source/crypto/CryptTools.cxx:57:40: error: 'HMAC_CTX_free' is 
deprecated [-Werror,-Wdeprecated-declarations]
> void operator()(HMAC_CTX* p) { HMAC_CTX_free(p); }
>^
> workdir/UnpackedTarball/openssl/include/openssl/hmac.h:35:1: note: 
'HMAC_CTX_free' has been explicitly marked deprecated here
> OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx);
> ^
> workdir/UnpackedTarball/openssl/include/openssl/macros.h:182:49: note: 
expanded from macro 'OSSL_DEPRECATEDIN_3_0'
> #   define OSSL_DEPRECATEDIN_3_0OSSL_DEPRECATED(3.0)
> ^
> workdir/UnpackedTarball/openssl/include/openssl/macros.h:62:52: note: 
expanded from macro 'OSSL_DEPRECATED'
> # define OSSL_DEPRECATED(since) __attribute__((deprecated))
>^
> oox/source/crypto/CryptTools.cxx:112:29: error: 'HMAC_CTX_new' is 
deprecated [-Werror,-Wdeprecated-declarations]
> mpHmacContext.reset(HMAC_CTX_new());
> ^
> workdir/UnpackedTarball/openssl/include/openssl/hmac.h:33:1: note: 
'HMAC_CTX_new' has been explicitly marked deprecated here
> OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void);
> ^
> workdir/UnpackedTarball/openssl/include/openssl/macros.h:182:49: note: 
expanded from macro 'OSSL_DEPRECATEDIN_3_0'
> #   define OSSL_DEPRECATEDIN_3_0OSSL_DEPRECATED(3.0)
> ^
> workdir/UnpackedTarball/openssl/include/openssl/macros.h:62:52: note: 
expanded from macro 'OSSL_DEPRECATED'
> # define OSSL_DEPRECATED(since) __attribute__((deprecated))
>^
> oox/source/crypto/CryptTools.cxx:125:9: error: 'HMAC_Init_ex' is 
deprecated [-Werror,-Wdeprecated-declarations]
> HMAC_Init_ex(mpHmacContext.get(), rKey.data(), rKey.size(), 
aEvpMd, nullptr);
> ^
> workdir/UnpackedTarball/openssl/include/openssl/hmac.h:43:1: note: 
'HMAC_Init_ex' has been explicitly marked deprecated here
> OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, 
int len,
> ^
> workdir/UnpackedTarball/openssl/include/openssl/macros.h:182:49: note: 
expanded from macro 'OSSL_DEPRECATEDIN_3_0'
> #   define OSSL_DEPRECATEDIN_3_0OSSL_DEPRECATED(3.0)
> ^
> workdir/UnpackedTarball/openssl/include/openssl/macros.h:62:52: note: 
expanded from macro 'OSSL_DEPRECATED'
> # define OSSL_DEPRECATED(since) __attribute__((deprecated))
>^
> oox/source/crypto/CryptTools.cxx:499:12: error: 'HMAC_Update' is 
deprecated [-Werror,-Wdeprecated-declarations]
> return HMAC_Update(mpImpl->mpHmacContext.get(), rInput.data(), 
nActualInputLength) != 0;
>^
> workdir/UnpackedTarball/openssl/include/openssl/hmac.h:45:1: note: 
'HMAC_Update' has been explicitly marked deprecated here
> OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char 
*data,
> ^
> workdir/UnpackedTarball/openssl/include/openssl/macros.h:182:49: note: 
expanded from macro 'OSSL_DEPRECATEDIN_3_0'
> #   define OSSL_DEPRECATEDIN_3_0OSSL_DEPRECATED(3.0)
> ^
> workdir/UnpackedTarball/openssl/include/openssl/macros.h:62:52: note: 
expanded from macro 'OSSL_DEPRECATED'
> # define OSSL_DEPRECATED(since) __attribute__((deprecated))
>^
> oox/source/crypto/CryptTools.cxx:512:12: error: 'HMAC_Final' is 
deprecated [-Werror,-Wdeprecated-declarations]
> (void) HMAC_Final(mpImpl->mpHmacContext.get(), aHash.data(), 
);
>^
> workdir/UnpackedTarball/openssl/include/openssl/hmac.h:47:1: note: 
'HMAC_Final' has been explicitly marked deprecated here
> OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
> ^
> workdir/UnpackedTarball/openssl/include/openssl/macros.h:182:49: note: 
expanded from macro 'OSSL_DEPRECATEDIN_3_0'
> #   define OSSL_DEPRECATEDIN_3_0OSSL_DEPRECATED(3.0)
> ^
&

core.git: README.md

2024-03-16 Thread Stephan Bergmann (via logerrit)
 README.md |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0a4f0ae2cfba246cb6a2708b9db5dab8fc71e6a9
Author: Stephan Bergmann 
AuthorDate: Sat Mar 16 09:24:12 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Mar 16 11:53:25 2024 +0100

Building with Clang needs at least libstdc++ 10

Not sure how 02f48a32400f81413329d81203c417521882cab6 "Adjust for new linux
baseline" had decided to declare "Clang 12 with libstdc++ 8.5" sufficient 
for
building on Linux.  But I just experienced that building recent master on 
Ubuntu
20.04 with its libstdc++ 9.4.0, against a (lode-built) Clang 12.0.1, failed 
with

> codemaker/source/commonjava/commonjava.cxx:45:21: error: no matching 
literal operator for call to 'operator""_ostr' with arguments of types 'const 
char *' and 'unsigned long', and no matching literal operator template
> { "void"_ostr, "java/lang/Void"_ostr },
> ^

etc., apparently because the use of std::copy_n in constexpr 
O[U]StringLiteral
ctors is not yet constexpr there.  And

<https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B20_library_features>
indeed lists "P0202R3" (i.e.,
<https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0202r3.html> "Add
Constexpr Modifiers to Functions in  and  Headers") as 
only
available since "GCC libstdc++": "10".

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

diff --git a/README.md b/README.md
index f529e48d4714..441ce61e9686 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ run and compile LibreOffice, also used by the TDF builds:
 * Build: 12 (13 for aarch64) + Xcode 14
 * Linux:
 * Runtime: RHEL 8 or CentOS 8 and comparable
-* Build: either GCC 12; or Clang 12 with libstdc++ 8.5
+* Build: either GCC 12; or Clang 12 with libstdc++ 10
 * iOS (only for LibreOfficeKit):
 * Runtime: 11.4 (only support for newer i devices == 64 bit)
 * Build: Xcode 9.3 and iPhone SDK 11.4


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

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

New commits:
commit 798d530daec69d6f81ad4ee10709c2c91d16dab3
Author: Stephan Bergmann 
AuthorDate: Tue Mar 12 14:15:32 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 13 17:28:43 2024 +0100

Support environment variable expansion in logging.ini

The syntax is a stripped-down subset of what is available for variable
expansion in bootstrap ini-files:  It only supports "${name}", to be 
replaced
with the contents of an environment variable of that name (which itself is 
not
expanded further).  If no such environment variable exists, it is replaced 
with
the empty string.  If the name contains a NUL character, or if there is a 
syntax
error (i.e., missing opening or closing curly brace), the corresponding 
text is
left unchanged.

Also, backslash quoting is supported to allow for verbatim, uninterpreted
"${name}" content.  But logging.ini is typically used to specify 
Windows-style

  LogFilePath=C:\log.txt

pathnames containing backslashes, so restrict backslash quoting to just "\$"
(replaced with "$") and "\" (replaced with "\"), and leave all other
backslashes alone.

(It is not possible to reuse the bootstrap macro expansion code here, as 
that
would cause recursive dependencies.  Therefore, this only implements this
stripped-down subset.)

Change-Id: I8c949a1637a7f14e0672a9cc1c79014edfa336bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164759
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit ef28f693351411c0d1651196b99e501acba7e7d5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164743
Tested-by: allotropia jenkins 

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 39ea42d7e130..84f88f259daa 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -116,7 +116,43 @@ char const* setEnvFromLoggingIniFile(const char* env, 
const char* key)
 aKey = sLine.substr(0, n);
 if (aKey != sWantedKey)
 continue;
-_putenv_s(env, sLine.substr(n+1, sLine.length()).c_str());
+std::string value(sLine, n+1, sLine.length());
+for (std::size_t i = 0;;) {
+i = value.find_first_of("\$", i);
+if (i == std::string::npos) {
+break;
+}
+if (value[i] == '\') {
+if (i == value.size() - 1 || (value[i + 1] != '\' && 
value[i + 1] != '$')) {
+++i;
+continue;
+}
+value.erase(i, 1);
+++i;
+} else {
+if (i == value.size() - 1 || value[i + 1] != '{') {
+++i;
+continue;
+}
+std::size_t i2 = value.find('}', i + 2);
+if (i2 == std::string::npos) {
+break;
+}
+std::string name(value, i + 2, i2 - (i + 2));
+if (name.find('
+i = i2 + 1;
+continue;
+}
+char const * p = std::getenv(name.c_str());
+if (p == nullptr) {
+value.erase(i, i2 + 1 - i);
+} else {
+value.replace(i, i2 + 1 - i, p);
+i += std::strlen(p);
+}
+}
+}
+_putenv_s(env, value.c_str());
 sResult = std::getenv(env);
 break;
 }


core.git: sal/osl

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

New commits:
commit ef28f693351411c0d1651196b99e501acba7e7d5
Author: Stephan Bergmann 
AuthorDate: Tue Mar 12 14:15:32 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 13 14:06:13 2024 +0100

Support environment variable expansion in logging.ini

The syntax is a stripped-down subset of what is available for variable
expansion in bootstrap ini-files:  It only supports "${name}", to be 
replaced
with the contents of an environment variable of that name (which itself is 
not
expanded further).  If no such environment variable exists, it is replaced 
with
the empty string.  If the name contains a NUL character, or if there is a 
syntax
error (i.e., missing opening or closing curly brace), the corresponding 
text is
left unchanged.

Also, backslash quoting is supported to allow for verbatim, uninterpreted
"${name}" content.  But logging.ini is typically used to specify 
Windows-style

  LogFilePath=C:\log.txt

pathnames containing backslashes, so restrict backslash quoting to just "\$"
(replaced with "$") and "\" (replaced with "\"), and leave all other
backslashes alone.

(It is not possible to reuse the bootstrap macro expansion code here, as 
that
would cause recursive dependencies.  Therefore, this only implements this
stripped-down subset.)

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

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index a8b86e3e7e79..3f92e9a62ec9 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -113,7 +113,43 @@ char const* setEnvFromLoggingIniFile(const char* env, 
const char* key)
 std::string_view aKey(sLine.data(), n);
 if (aKey != sWantedKey)
 continue;
-_putenv_s(env, sLine.substr(n+1, sLine.length()).c_str());
+std::string value(sLine, n+1, sLine.length());
+for (std::size_t i = 0;;) {
+i = value.find_first_of("\$", i);
+if (i == std::string::npos) {
+break;
+}
+if (value[i] == '\') {
+if (i == value.size() - 1 || (value[i + 1] != '\' && 
value[i + 1] != '$')) {
+++i;
+continue;
+}
+value.erase(i, 1);
+++i;
+} else {
+if (i == value.size() - 1 || value[i + 1] != '{') {
+++i;
+continue;
+}
+std::size_t i2 = value.find('}', i + 2);
+if (i2 == std::string::npos) {
+break;
+}
+std::string name(value, i + 2, i2 - (i + 2));
+if (name.find('
+i = i2 + 1;
+continue;
+}
+char const * p = std::getenv(name.c_str());
+if (p == nullptr) {
+value.erase(i, i2 + 1 - i);
+} else {
+value.replace(i, i2 + 1 - i, p);
+i += std::strlen(p);
+}
+}
+}
+_putenv_s(env, value.c_str());
 sResult = std::getenv(env);
 break;
 }


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

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

New commits:
commit 7547d290df422629235674a54181274363359f51
Author: Stephan Bergmann 
AuthorDate: Tue Mar 12 15:14:52 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 13 09:07:01 2024 +0100

Remove known-problematic tests

For unclear reasons:

1  UITest_writer_tests7 kept hanging with python.bin at

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

and soffice.bin idling in the main thread.

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

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

Re: openSuse package fails for i586 with undefined reference to `GpgME::Data::seek(long, int)'

2024-03-12 Thread Stephan Bergmann

On 3/11/24 23:02, Christoph Grüninger wrote:

undefined reference to `GpgME::Data::seek(long, int)'


At least with LO's internal external/gpgmepp, this is defined as


off_t seek(off_t offset, int whence);


in workdir/UnpackedTarball/gpgmepp/lang/cpp/src/data.h, so it probably 
is an inconsistency of 
 
in how that library and LO itself are built.




Re: ESC meeting minutes: 2024-03-07

2024-03-11 Thread Stephan Bergmann

On 3/11/24 15:46, Thorsten Behrens wrote:

Almost. There's code running over a gerrit commit json export,
extracting 'features' from every commit
(https://github.com/baolef/libreoffice-ci/blob/data/dataset/mining.py). That's
actually looking at much more than just the files touched (though we
did exclude committer/author names, for obvious reasons). Those
feature vectors are then used to train a machine learning model,
combined with the historical CI results of those said commits.


And the


bash ~/libreoffice-ci/scripts/test.sh $WORKSPACE $GERRIT_PATCHSET_REVISION


in the Build Steps of 
 is running 
, I 
assume?


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

2024-03-11 Thread Stephan Bergmann (via logerrit)
 static/source/unoembindhelpers/PrimaryBindings.cxx |   26 +---
 unotest/source/embindtest/embindtest.js|   44 ++---
 2 files changed, 42 insertions(+), 28 deletions(-)

New commits:
commit 2995a0e0785911322c9d57e98b925073ff6cb6bd
Author: Stephan Bergmann 
AuthorDate: Mon Mar 11 10:13:18 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 11 13:36:24 2024 +0100

Embind construction of UNO Any sequence/struct/exception/interface

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 0aadc85f6086..c8d4717aa347 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -282,7 +282,17 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 case TypeClass_TYPE:
 return css::uno::Any(rObject.as());
 case TypeClass_SEQUENCE:
-return {}; //TODO
+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;
@@ -294,12 +304,6 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 
emscripten::internal::fromGenericWireType(result)),
 rUnoType);
 }
-case TypeClass_STRUCT:
-return {}; //TODO
-case TypeClass_EXCEPTION:
-return {}; //TODO
-case TypeClass_INTERFACE:
-return {}; //TODO
 default:
 throw std::invalid_argument("bad type class");
 }
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 21c0e5cf098e..1b0cf8eb5fc6 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -258,9 +258,9 @@ Module.addOnPostRun(function() {
 console.assert(test.isAnySequence(v));
 v.delete();
 let s = new Module.uno_Sequence_string(["foo", "barr", "bazzz"]);
-//TODO: let a = new 
Module.uno_Any(Module.uno_Type.Sequence(Module.uno_Type.String()), s);
-//TODO: console.assert(test.isAnySequence(a));
-//TODO: a.delete();
+let a = new 
Module.uno_Any(Module.uno_Type.Sequence(Module.uno_Type.String()), s);
+console.assert(test.isAnySequence(a));
+a.delete();
 s.delete();
 }
 {
@@ -283,11 +283,11 @@ Module.addOnPostRun(function() {
 console.assert(v.get().m3 === 'hä');
 console.assert(test.isAnyStruct(v));
 v.delete();
-//TODO: let a = new Module.uno_Any(
-//TODO: 
Module.uno_Type.Struct('org.libreoffice.embindtest.Struct'),
-//TODO: {m1: -123456, m2: 100.5, m3: 'hä'});
-//TODO: console.assert(test.isAnyStruct(a));
-//TODO: a.delete();
+let a = new Module.uno_Any(
+Module.uno_Type.Struct('org.libreoffice.embindtest.Struct'),
+{m1: -123456, m2: 100.5, m3: 'hä'});
+console.assert(test.isAnyStruct(a));
+a.delete();
 }
 {
 let v = test.getAnyException();
@@ -299,11 +299,11 @@ Module.addOnPostRun(function() {
 console.assert(v.get().m3 === 'hä');
 console.assert(test.isAnyException(v));
 v.delete();
-//TODO: let a = new Module.uno_Any(
-//TODO: 
Module.uno_Type.Exception('org.libreoffice.embindtest.Exception'),
-//TODO: {Message: 'error', Context: null, m1: -123456, m2: 100.5, 
m3: 'hä'});
-//TODO: console.assert(test.isAnyException(a));
-//TODO: a.delete();
+let a = new Module.uno_Any(
+Module.uno_Type.Exception('org.libreoffice.embindtest.Exception'),
+{Message: 'error', Context: null, m1: -123456, m2: 100.5, m3: 
'hä'});
+console.assert(test.isAnyException(a));
+a.delete();
 }
 {
 let v = test.getAnyInterface();
@@ -311,10 +311,10 @@ Module.addOnPostRun(function() {
 console.assert(v.get().$equals(test.$query()));
 console.assert(te

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

2024-03-10 Thread Stephan Bergmann (via logerrit)
 bin/check-elf-dynamic-objects |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7a46de0d7761a52986ba092c34ea7e76c3871e6b
Author: Stephan Bergmann 
AuthorDate: Sat Mar 9 23:29:46 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Mar 10 10:14:59 2024 +0100

Adapt CustomTarget_postprocess/check_dynamic_objects to 
--enable-mergelibs=more

...which, after recent changes, failed now with

> [CHK] CustomTarget/postprocess/check_dynamic_objects/check.done
> instdir/program/libmergedlo.so has suspicious NEEDED: libgssapi_krb5.so.2
> instdir/program/libmergedlo.so has suspicious NEEDED: libcom_err.so.2
> instdir/program/libmergedlo.so has suspicious NEEDED: libkrb5.so.3

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

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index f636eadda1fa..eacf9fbc84cd 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -198,7 +198,7 @@ local file="$1"
 fi
 ;;
 */libmergedlo.so)
-allowlist="${allowlist} ${x11allowlist} ${openglallowlist} 
${gioallowlist} ${dconfallowlist} libcups.so.2 libcairo.so.2"
+allowlist="${allowlist} ${x11allowlist} ${openglallowlist} 
${gioallowlist} ${kerberosallowlist} ${dconfallowlist} libcups.so.2 
libcairo.so.2"
 ;;
 esac
 if test "${skip}" = 0 && readelf -d "${file}" &> /dev/null ; then


core.git: comphelper/source configmgr/source include/o3tl tools/source

2024-03-09 Thread Stephan Bergmann (via logerrit)
 comphelper/source/misc/string.cxx |2 +-
 configmgr/source/access.cxx   |3 ++-
 include/o3tl/string_view.hxx  |6 --
 tools/source/misc/json_writer.cxx |5 +++--
 4 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 3ba85b7786663da4f2de1a3c2fe7ee9a27657293
Author: Stephan Bergmann 
AuthorDate: Fri Mar 8 23:31:11 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Mar 9 19:19:04 2024 +0100

Support o3tl::iterateCodePoints with both sal_Int32 and std::size_t

...and clean up the most gross casting offenses

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

diff --git a/comphelper/source/misc/string.cxx 
b/comphelper/source/misc/string.cxx
index 1b9137e473c0..446e500e0250 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -266,7 +266,7 @@ sal_Int32 getTokenCount(std::u16string_view rIn, 
sal_Unicode cTok)
 sal_uInt32 decimalStringToNumber(std::u16string_view str)
 {
 sal_uInt32 result = 0;
-for( sal_Int32 i = 0; i < static_cast(str.size()); )
+for( std::size_t i = 0; i < str.size(); )
 {
 sal_uInt32 c = o3tl::iterateCodePoints(str, );
 sal_uInt32 value = 0;
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index c25cf73aaef0..44a47e74b331 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -111,7 +112,7 @@ namespace {
 // surrogates, even though they should not appear in well-formed UNO OUString
 // instances anyway), or is a slash (as it causes problems in path syntax):
 bool isValidName(std::u16string_view name, bool setMember) {
-for (sal_Int32 i = 0; i != static_cast(name.size());) {
+for (std::size_t i = 0; i != name.size();) {
 sal_uInt32 c = o3tl::iterateCodePoints(name, );
 if ((c < 0x20 && !(c == 0x09 || c == 0x0A || c == 0x0D))
 || rtl::isSurrogate(c) || c == 0xFFFE || c == 0x
diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx
index 1e5db5eb0227..0fe51fd98eda 100644
--- a/include/o3tl/string_view.hxx
+++ b/include/o3tl/string_view.hxx
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -509,8 +510,9 @@ inline double toDouble(std::string_view str)
 }
 
 // Like OUString::iterateCodePoints, but for std::string_view:
-inline sal_uInt32 iterateCodePoints(std::u16string_view string, sal_Int32* 
indexUtf16,
-sal_Int32 incrementCodePoints = 1)
+template 
+requires(std::is_same_v || std::is_same_v) 
sal_uInt32
+iterateCodePoints(std::u16string_view string, T* indexUtf16, sal_Int32 
incrementCodePoints = 1)
 {
 std::size_t n;
 char16_t cu;
diff --git a/tools/source/misc/json_writer.cxx 
b/tools/source/misc/json_writer.cxx
index 0ffc5cb903f9..b9f62d2b4b60 100644
--- a/tools/source/misc/json_writer.cxx
+++ b/tools/source/misc/json_writer.cxx
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -137,8 +138,8 @@ void JsonWriter::writeEscapedOUString(std::u16string_view 
rPropVal)
 ++mPos;
 
 // Convert from UTF-16 to UTF-8 and perform escaping
-sal_Int32 i = 0;
-while (i < static_cast(rPropVal.size()))
+std::size_t i = 0;
+while (i < rPropVal.size())
 {
 sal_uInt32 ch = o3tl::iterateCodePoints(rPropVal, );
 if (writeEscapedSequence(ch, mPos))


core.git: unotest/source

2024-03-09 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.js |   20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

New commits:
commit fbecf2d6b72ee2b5631bee4c0d6d0c5556aa9698
Author: Stephan Bergmann 
AuthorDate: Fri Mar 8 16:27:03 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Mar 9 15:47:08 2024 +0100

Enable (and fix) some TODO test code

...now that all the relevant Any getter functionality is available

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

diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 8568fa2acaa2..1c6cd5f2718e 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -461,12 +461,14 @@ Module.addOnPostRun(function() {
 let e1 = v.get(1);
 console.assert(e1.get() === undefined);
 e1.delete();
-//TODO: let e2 = v.get(2);
-//TODO: console.assert(e2.size() === 3);
-//TODO: console.assert(e2.get(0) == 
uno.org.libreoffice.embindtest.Enum.E_2);
-//TODO: console.assert(e2.get(1) == 
uno.org.libreoffice.embindtest.Enum.E3);
-//TODO: console.assert(e2.get(2) == 
uno.org.libreoffice.embindtest.Enum.E_10);
-//TODO: e2.delete();
+let e2 = v.get(2);
+let s = e2.get();
+console.assert(s.size() === 3);
+console.assert(s.get(0) === uno.org.libreoffice.embindtest.Enum.E_2);
+console.assert(s.get(1) === uno.org.libreoffice.embindtest.Enum.E3);
+console.assert(s.get(2) === uno.org.libreoffice.embindtest.Enum.E_10);
+s.delete();
+e2.delete();
 console.assert(test.isSequenceAny(v));
 v.delete();
 }
@@ -493,9 +495,9 @@ Module.addOnPostRun(function() {
 let v = test.getSequenceEnum();
 console.log(v);
 console.assert(v.size() === 3);
-console.assert(v.get(0) == uno.org.libreoffice.embindtest.Enum.E_2);
-console.assert(v.get(1) == uno.org.libreoffice.embindtest.Enum.E3);
-console.assert(v.get(2) == uno.org.libreoffice.embindtest.Enum.E_10);
+console.assert(v.get(0) === uno.org.libreoffice.embindtest.Enum.E_2);
+console.assert(v.get(1) === uno.org.libreoffice.embindtest.Enum.E3);
+console.assert(v.get(2) === uno.org.libreoffice.embindtest.Enum.E_10);
 console.assert(test.isSequenceEnum(v));
 v.delete();
 }


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

2024-03-08 Thread Stephan Bergmann (via logerrit)
 sal/osl/unx/file.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0b5a9065263bf8f82db497a1f2c51bf531a341fe
Author: Stephan Bergmann 
AuthorDate: Fri Mar 8 08:38:44 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 8 22:47:54 2024 +0100

Blind fix for Linux 32-bit builds

...which, according to
<https://lists.freedesktop.org/archives/libreoffice/2024-March/091666.html> 
"32
bit build failure (smb, narrowing)", started to fail with

> /<>/sal/osl/unx/file.cxx: In function ‘void 
osl_file_adjustLockFlags(const rtl::OString&, int*, sal_uInt32*)’:
> /<>/sal/osl/unx/file.cxx:71:26: error: narrowing conversion 
of ‘4283649346’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
> 71 | #define CIFS_SUPER_MAGIC 0xFF534D42
>|  ^~
> /<>/sal/osl/unx/file.cxx:795:14: note: in expansion of macro 
‘CIFS_SUPER_MAGIC’
>795 | case CIFS_SUPER_MAGIC:
>|  ^~~~

etc.  My Fedora 39 "Linux man-pages 6.05" statfs(2) man page explains about 
the
struct statfs f_type field of __fsword_t type:  "The __fsword_t type used 
for
various fields in the statfs structure definition is a glibc internal type, 
not
intended for public use.  This leaves the programmer in a bit of a conundrum
when trying to copy or compare these fields to local variables in a program.
Using unsigned int for such variables suffices on most systems."  But the
underlying __FSWORD_T_TYPE looks like it is actually defined as a signed 
type in
/usr/include/bits/typesizes.h.

Change-Id: Ida3ae84031c4e48b0d6e69d76b66b4e4facfa1ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164561
Tested-by: René Engelhard 
    Reviewed-by: René Engelhard 
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 0f5dfaebd61b9cabbe9762865563c2296ebb0112)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164504

diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 0ca8822016e1..ee7412dd1041 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -67,9 +67,9 @@
 #ifdef LINUX
 #include 
 // As documented by the kernel
-#define SMB_SUPER_MAGIC  0x517B
-#define CIFS_SUPER_MAGIC 0xFF534D42
-#define SMB2_SUPER_MAGIC 0xFE534D42
+#define SMB_SUPER_MAGIC  static_cast<__fsword_t>(0x517B)
+#define CIFS_SUPER_MAGIC static_cast<__fsword_t>(0xFF534D42)
+#define SMB2_SUPER_MAGIC static_cast<__fsword_t>(0xFE534D42)
 #endif
 
 namespace {


core.git: external/skia

2024-03-08 Thread Stephan Bergmann (via logerrit)
 external/skia/UnpackedTarball_skia.mk|1 +
 external/skia/sort-comparison-assumption.patch.0 |   16 
 2 files changed, 17 insertions(+)

New commits:
commit 01067e964a876e38e99a099f62fe514a211a5fca
Author: Stephan Bergmann 
AuthorDate: Fri Mar 8 12:57:51 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 8 22:47:30 2024 +0100

external/skia: Fix a std::sort comparison function's assertion assumptions

At least with a LLVM 19 libc++ in hardening debug mode (where it uses 
additional
invocations of the comparison function passed to std::sort, to verify that 
the
function actually implements a strict weak ordering), chart2_dialogs_test 
failed
with

> LO_TEST_LOCALE=en-US
> [_RUN_] Chart2DialogsTest::openAnyDialog
> 
workdir/UnpackedTarball/skia/src/sksl/transform/SkSLFindAndDeclareBuiltinVariables.cpp:112:
 fatal error: "assert(InterfaceBlockName(*a) != InterfaceBlockName(*b))"

apparently because the implementation of std::sort made additional
same-arguments calls of operator ()(x, x) that the Skia implementation of 
the
comparison function was not expecting to happen.  But the only relevant
guarantee that C++20 appears to make for std::sort is that its complexity is
O(N log N) comparisons, so any implementation could legitimately do such a
"useless" additional same-arguments call of operator ()(x, x) for each of 
the N
elements of the to-be-sorted range.

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

diff --git a/external/skia/UnpackedTarball_skia.mk 
b/external/skia/UnpackedTarball_skia.mk
index 2cdcf62872d3..9e603dcb28dd 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -41,6 +41,7 @@ skia_patches := \
 ubsan-missing-typeinfo.patch.1 \
 incomplete-type-SkImageGenerator.patch.1 \
 0001-AvoidCombiningExtrememelyLargeMeshes.patch.1 \
+sort-comparison-assumption.patch.0 \
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
 
diff --git a/external/skia/sort-comparison-assumption.patch.0 
b/external/skia/sort-comparison-assumption.patch.0
new file mode 100644
index ..b23ae0418123
--- /dev/null
+++ b/external/skia/sort-comparison-assumption.patch.0
@@ -0,0 +1,16 @@
+--- src/sksl/transform/SkSLFindAndDeclareBuiltinVariables.cpp
 src/sksl/transform/SkSLFindAndDeclareBuiltinVariables.cpp
+@@ -105,11 +105,11 @@
+   }
+   switch (a->kind()) {
+   case ProgramElement::Kind::kGlobalVar:
+-  SkASSERT(GlobalVarBuiltinName(*a) != 
GlobalVarBuiltinName(*b));
++  SkASSERT(GlobalVarBuiltinName(*a) != 
GlobalVarBuiltinName(*b) || a == b);
+   return GlobalVarBuiltinName(*a) < 
GlobalVarBuiltinName(*b);
+ 
+   case ProgramElement::Kind::kInterfaceBlock:
+-  SkASSERT(InterfaceBlockName(*a) != 
InterfaceBlockName(*b));
++  SkASSERT(InterfaceBlockName(*a) != 
InterfaceBlockName(*b) || a == b);
+   return InterfaceBlockName(*a) < 
InterfaceBlockName(*b);
+ 
+   default:


core.git: 2 commits - static/README.wasm.md static/source unotest/source

2024-03-08 Thread Stephan Bergmann (via logerrit)
 static/README.wasm.md  |3 -
 static/source/unoembindhelpers/PrimaryBindings.cxx |8 +--
 unotest/source/embindtest/embindtest.js|   53 +++--
 3 files changed, 34 insertions(+), 30 deletions(-)

New commits:
commit 20f1f529a29fdbc6a531a8c82f4aeff8ff3908bd
Author: Stephan Bergmann 
AuthorDate: Fri Mar 8 18:01:21 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 8 22:45:26 2024 +0100

Embind construction of UNO Any Type

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index a250e31aa144..8fb5ad39a6da 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -279,7 +279,7 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 case TypeClass_STRING:
 return Any{ OUString(rObject.as()) };
 case TypeClass_TYPE:
-return {}; //TODO
+return css::uno::Any(rObject.as());
 case TypeClass_SEQUENCE:
 return {}; //TODO
 case TypeClass_ENUM:
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index c5cb7db12169..8568fa2acaa2 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -242,9 +242,9 @@ Module.addOnPostRun(function() {
 console.assert(v.get().toString() === 'long');
 console.assert(test.isAnyType(v));
 v.delete();
-//TODO: let a = new Module.uno_Any(Module.uno_Type.Type(), 
Module.uno_Type.Long());
-//TODO: console.assert(test.isAnyType(a));
-//TODO: a.delete();
+let a = new Module.uno_Any(Module.uno_Type.Type(), 
Module.uno_Type.Long());
+console.assert(test.isAnyType(a));
+a.delete();
 }
 {
 let v = test.getAnySequence();
commit 80bb8c666f09264b0df7181d03ebad3b883de797
Author: Stephan Bergmann 
AuthorDate: Fri Mar 8 17:50:57 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 8 22:45:11 2024 +0100

Redesign Embind UNO Any construction

...taking a full UNO Type instead of just a UNO Type class (so that it will 
be
able to construct Any containing sequence, enum, struct, exception, and
interface, in later steps); moving the Type argument first (as that looks 
more
natural), and renaming from Any to uno_Any (in line with the other uno_Type,
uno_Sequence_..., etc.)

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

diff --git a/static/README.wasm.md b/static/README.wasm.md
index ef8a02f8261a..1abfd39de6c8 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -248,7 +248,8 @@ while (xParaEnumeration.hasMoreElements()) {
 xParagraph = new css.text.XTextRange(xParaEnumeration.nextElement(), 
Module.uno_Reference.FromAny);
 if (xParagraph.$is()) {
 xParaProps = new css.beans.XPropertySet(xParagraph.$query());
-let color = new Module.Any(Math.floor(Math.random() * 0xFF), 
css.uno.TypeClass.LONG);
+let color = new Module.uno_Any(
+Module.uno_Type.Long(), Math.floor(Math.random() * 0xFF));
 xParaProps.setPropertyValue("CharColor", color);
 color.delete();
 }
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index bfbf7d90b12d..a250e31aa144 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -248,9 +248,9 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 });
 
 // Any
-class_("Any")
-.constructor(+[](const val& rObject, const TypeClass& rUnoType) -> Any 
{
-switch (rUnoType)
+class_("uno_Any")
+.constructor(+[](const css::uno::Type& rUnoType, const val& rObject) 
-> Any {
+switch (rUnoType.getTypeClass())
 {
 case TypeClass_VOID:
 return {};
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index a825946fee34..c5cb7db12169 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -112,7 +112,7 @@ Module.addOnPostRun(function() {
 console.assert(v.get() === undefined);
 console.assert(test.isAnyVoid(v));
 v.delete();
-let a = new Module.Any(undefined, css.uno.TypeClass.VOID);
+let a = new Module.uno_Any(Module.uno_Type.Void(), undefined);
 

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

2024-03-08 Thread Stephan Bergmann (via logerrit)
 static/source/unoembindhelpers/PrimaryBindings.cxx |   55 ++---
 unotest/source/embindtest/embindtest.js|8 ++-
 2 files changed, 45 insertions(+), 18 deletions(-)

New commits:
commit ad7963f939c629657c1aca03765169ace14a5bbd
Author: Stephan Bergmann 
AuthorDate: Fri Mar 8 17:27:52 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 8 22:44:50 2024 +0100

Directly go via std::u16string

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 54ce34d0724c..bfbf7d90b12d 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -18,9 +18,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -142,18 +139,6 @@ EM_JS(void, jsRegisterString, (std::type_info const* raw),
 
 namespace
 {
-OString toUtf8(OUString const& string)
-{
-OString s;
-if (!string.convertToString(, RTL_TEXTENCODING_UTF8,
-RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
-| RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR))
-{
-throw css::uno::RuntimeException("cannot convert OUString to UTF-8");
-}
-return s;
-}
-
 void copyStruct(typelib_CompoundTypeDescription* desc, void const* source, 
void* dest)
 {
 if (desc->pBaseTypeDescription != nullptr)
@@ -258,8 +243,8 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 return 
css::uno::Type(css::uno::TypeClass_INTERFACE, OUString(name));
 })
 .function("toString", +[](css::uno::Type const& self) {
-auto const name = toUtf8(self.getTypeName());
-return std::string(name.getStr(), name.getLength());
+auto const name = self.getTypeName();
+return std::u16string(name.getStr(), name.getLength());
 });
 
 // Any
commit 747cfc7a021d8a4664462ddd6b0fad6c178da602
Author: Stephan Bergmann 
AuthorDate: Fri Mar 8 17:20:52 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 8 22:44:37 2024 +0100

Improve Embind'ing of UNO Type

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 985ebacc52b2..54ce34d0724c 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -221,6 +221,42 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 
 emscripten::class_("uno_Type")
 .smart_ptr("uno_Type$")
+.class_function("Void", +[]() { return cppu::UnoType::get(); })
+.class_function("Boolean", +[]() { return cppu::UnoType::get(); 
})
+.class_function("Byte", +[]() { return cppu::UnoType::get(); 
})
+.class_function("Short", +[]() { return 
cppu::UnoType::get(); })
+.class_function("UnsignedShort", +[]() { return 
cppu::UnoType::get(); })
+.class_function("Long", +[]() { return 
cppu::UnoType::get(); })
+.class_function("UnsignedLong", +[]() { return 
cppu::UnoType::get(); })
+.class_function("Hyper", +[]() { return 
cppu::UnoType::get(); })
+.class_function("UnsignedHyper", +[]() { return 
cppu::UnoType::get(); })
+.class_function("Float", +[]() { return cppu::UnoType::get(); })
+.class_function("Double", +[]() { return cppu::UnoType::get(); 
})
+.class_function("Char", +[]() { return 
cppu::UnoType::get(); })
+.class_function("String", +[]() { return 
cppu::UnoType::get(); })
+.class_function("Type", +[]() { return 
cppu::UnoType::get(); })
+.class_function("Any", +[]() { return 
cppu::UnoType::get(); })
+.class_function("Sequence",
++[](css::uno::Type const& type) {
+return css::uno::Type(css::uno::TypeClass_SEQUENCE,
+  "[]" + type.getTypeName());
+})
+.class_function("Enum",
++[](std::u16string const& name) {
+return css::uno::Type(css::uno::TypeClass_ENUM, 
OUString(name));
+})
+.class_function("Struct",
++[](std::u16string const& name) {
+

core.git: sal/osl

2024-03-08 Thread Stephan Bergmann (via logerrit)
 sal/osl/unx/file.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 434065478d35fe8e144aec916ac06438c0150270
Author: Stephan Bergmann 
AuthorDate: Fri Mar 8 12:47:23 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 8 16:29:38 2024 +0100

Avoid mentioning Glibc-internal type __fsword_t

...and clean up the use of macros here

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

diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 5c4069cae2de..b15fe963605f 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -67,9 +68,9 @@
 #ifdef LINUX
 #include 
 // As documented by the kernel
-#define SMB_SUPER_MAGIC  static_cast<__fsword_t>(0x517B)
-#define CIFS_SUPER_MAGIC static_cast<__fsword_t>(0xFF534D42)
-#define SMB2_SUPER_MAGIC static_cast<__fsword_t>(0xFE534D42)
+constexpr decltype(std::declval().f_type) SMB_SUPER_MAGIC = 
0x517B;
+constexpr decltype(std::declval().f_type) CIFS_SUPER_MAGIC = 
0xFF534D42;
+constexpr decltype(std::declval().f_type) SMB2_SUPER_MAGIC = 
0xFE534D42;
 #endif
 
 namespace {


Re: ESC meeting minutes: 2024-03-07

2024-03-08 Thread Stephan Bergmann

On 3/7/24 16:41, Miklos Vajna wrote:

* Jenkins / CI update (Cloph)

[...]
  + ML decided to mostly send all changes to the "build 
sequentially" queue (Cloph)

    + may need to re-train it; it's too pessimistic


Is there any documentation, or anybody able to explain at an adequate 
level, what is taken into consideration when making those decisions?


Wondering when I see Gerrit changes like 
 "Add Embind'ing of UNO 
Any getter for interfaces", which didn't touch any file that would 
actually be used by any of the 
 builds, nevertheless 
getting channeled through the sequential build.


core.git: sal/osl

2024-03-08 Thread Stephan Bergmann (via logerrit)
 sal/osl/unx/file.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 4036ac57530e44462455e6544d4fc0d598140346
Author: Stephan Bergmann 
AuthorDate: Fri Mar 8 08:38:44 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 8 12:37:17 2024 +0100

Blind fix for Linux 32-bit builds

...which, according to
<https://lists.freedesktop.org/archives/libreoffice/2024-March/091666.html> 
"32
bit build failure (smb, narrowing)", started to fail with

> /<>/sal/osl/unx/file.cxx: In function ‘void 
osl_file_adjustLockFlags(const rtl::OString&, int*, sal_uInt32*)’:
> /<>/sal/osl/unx/file.cxx:71:26: error: narrowing conversion 
of ‘4283649346’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
> 71 | #define CIFS_SUPER_MAGIC 0xFF534D42
>|  ^~
> /<>/sal/osl/unx/file.cxx:795:14: note: in expansion of macro 
‘CIFS_SUPER_MAGIC’
>795 | case CIFS_SUPER_MAGIC:
>|  ^~~~

etc.  My Fedora 39 "Linux man-pages 6.05" statfs(2) man page explains about 
the
struct statfs f_type field of __fsword_t type:  "The __fsword_t type used 
for
various fields in the statfs structure definition is a glibc internal type, 
not
intended for public use.  This leaves the programmer in a bit of a conundrum
when trying to copy or compare these fields to local variables in a program.
Using unsigned int for such variables suffices on most systems."  But the
underlying __FSWORD_T_TYPE looks like it is actually defined as a signed 
type in
/usr/include/bits/typesizes.h.

Change-Id: Ida3ae84031c4e48b0d6e69d76b66b4e4facfa1ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164561
Tested-by: René Engelhard 
    Reviewed-by: René Engelhard 
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 03d685a997e9..5c4069cae2de 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -67,9 +67,9 @@
 #ifdef LINUX
 #include 
 // As documented by the kernel
-#define SMB_SUPER_MAGIC  0x517B
-#define CIFS_SUPER_MAGIC 0xFF534D42
-#define SMB2_SUPER_MAGIC 0xFE534D42
+#define SMB_SUPER_MAGIC  static_cast<__fsword_t>(0x517B)
+#define CIFS_SUPER_MAGIC static_cast<__fsword_t>(0xFF534D42)
+#define SMB2_SUPER_MAGIC static_cast<__fsword_t>(0xFE534D42)
 #endif
 
 namespace {


Re: 32 bit build failure (smb, narrowing)

2024-03-07 Thread Stephan Bergmann

On 3/8/24 08:23, Rene Engelhard wrote:
see 
https://buildd.debian.org/status/fetch.php?pkg=libreoffice=i386=4%3A24.2.2~rc1-1=1709881487=1:


/<>/sal/osl/unx/file.cxx: In function ‘void 
osl_file_adjustLockFlags(const rtl::OString&, int*, sal_uInt32*)’:
/<>/sal/osl/unx/file.cxx:71:26: error: narrowing conversion 
of ‘4283649346’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]

    71 | #define CIFS_SUPER_MAGIC 0xFF534D42
   |  ^~
/<>/sal/osl/unx/file.cxx:795:14: note: in expansion of 
macro ‘CIFS_SUPER_MAGIC’

   795 | case CIFS_SUPER_MAGIC:
   |  ^~~~
/<>/sal/osl/unx/file.cxx:72:26: error: narrowing conversion 
of ‘4266872130’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]

    72 | #define SMB2_SUPER_MAGIC 0xFE534D42
   |  ^~
/<>/sal/osl/unx/file.cxx:796:14: note: in expansion of 
macro ‘SMB2_SUPER_MAGIC’

   796 | case SMB2_SUPER_MAGIC:
   |  ^~~~
make[2]: *** [/<>/solenv/gbuild/LinkTarget.mk:340: 
/<>/workdir/CxxObject/sal/osl/unx/file.o] Error 1


see  "Blind fix for 
Linux 32-bit builds"




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

2024-03-07 Thread Stephan Bergmann (via logerrit)
 static/source/embindmaker/embindmaker.cxx  |4 +++-
 static/source/unoembindhelpers/PrimaryBindings.cxx |   10 +-
 udkapi/org/libreoffice/embindtest/XTest.idl|2 ++
 unotest/source/embindtest/embindtest.cxx   |   14 ++
 unotest/source/embindtest/embindtest.js|   10 ++
 5 files changed, 38 insertions(+), 2 deletions(-)

New commits:
commit da49e5edb2fba9e99ed7d58952dc761b0804e7fc
Author: Stephan Bergmann 
AuthorDate: Thu Mar 7 17:10:25 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 7 23:13:31 2024 +0100

Add Embind'ing of UNO Any getter for interfaces

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

diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index f0f14b7e31aa..4241d10b1575 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -975,7 +975,9 @@ SAL_IMPLEMENT_MAIN()
 }
 dumpAttributes(cppOut, mgr, ifc, ifcEnt, {});
 dumpMethods(cppOut, mgr, ifc, ifcEnt, {});
-cppOut << ";
";
+cppOut << ";
"
+  "
::unoembindhelpers::registerUnoType<::com::sun::star::uno::Reference<"
+   << cppName(ifc) << ">>();
";
 dumpRegisterFunctionEpilog(cppOut, n);
 for (auto const& attr : ifcEnt->getDirectAttributes())
 {
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 2e5ecac00054..985ebacc52b2 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -334,7 +334,15 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 _emval_take_value(getTypeId(self.getValueType()), 
argv));
 }
 case css::uno::TypeClass_INTERFACE:
-return emscripten::val::undefined(); //TODO
+{
+auto const ifc = *static_cast(self.getValue());
+auto const copy = 
std::malloc(sizeof(css::uno::XInterface*));
+*static_cast(copy) = ifc;
+ifc->acquire();
+emscripten::internal::WireTypePack argv(std::move(copy));
+return emscripten::val::take_ownership(
+_emval_take_value(getTypeId(self.getValueType()), 
argv));
+}
 default:
 O3TL_UNREACHABLE;
 };
diff --git a/udkapi/org/libreoffice/embindtest/XTest.idl 
b/udkapi/org/libreoffice/embindtest/XTest.idl
index e5b5a4535982..45042663cf47 100644
--- a/udkapi/org/libreoffice/embindtest/XTest.idl
+++ b/udkapi/org/libreoffice/embindtest/XTest.idl
@@ -76,6 +76,8 @@ interface XTest {
 boolean isAnyStruct([in] any value);
 any getAnyException();
 boolean isAnyException([in] any value);
+any getAnyInterface();
+boolean isAnyInterface([in] any value);
 sequence getSequenceBoolean();
 boolean isSequenceBoolean([in] sequence value);
 sequence getSequenceByte();
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 1f8b916fbbf1..d437f3907e3a 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -10,6 +10,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -283,6 +284,19 @@ class Test : public 
cppu::WeakImplHelper
&& e.m3 == u"hä";
 }
 
+css::uno::Any SAL_CALL getAnyInterface() override
+{
+return 
css::uno::Any(css::uno::Reference(this));
+}
+
+sal_Bool SAL_CALL isAnyInterface(css::uno::Any const& value) override
+{
+return value.getValueType() == 
cppu::UnoType::get()
+   && 
*o3tl::forceAccess>(
+  value)
+  == static_cast(this);
+}
+
 css::uno::Sequence SAL_CALL getSequenceBoolean() override
 {
 return { true, true, false };
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index c661589683f6..e238af32c003 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -302,6 +302,16 @@ Module.addOnPostRun(function() {
 //TODO: console.assert(test.isAnyException(a));
 //TODO: a.delete();
 }
+{
+let v = test.getAnyInterface();
+console.log(v);
+console.assert(v.get().$equals(test.$query()));
+console.assert(test.isAnyInterface(v));
+v.delete();
+//TODO: let a = new Module.Any

core.git: static/source

2024-03-07 Thread Stephan Bergmann (via logerrit)
 static/source/embindmaker/embindmaker.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 2364e6d62d4a95e437981f80ad26ce1c46b8b29e
Author: Stephan Bergmann 
AuthorDate: Thu Mar 7 16:43:48 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 7 21:21:24 2024 +0100

Add $equals to Embind'ing of UNO interfaces

...so one can write foo.$equals(bar.$query) to check for UNO object equality

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

diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index a3558e5b4e04..f0f14b7e31aa 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -958,7 +958,12 @@ SAL_IMPLEMENT_MAIN()
<< cppName(ifc)
<< "> const & the_self) { return "
   
"::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface>(the_"
-  "self); })
";
+  "self); })
"
+  ".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; })
";
 if (bases.size() > 1)
 {
 std::set visitedBases;


core.git: static/source

2024-03-07 Thread Stephan Bergmann (via logerrit)
 static/source/unoembindhelpers/PrimaryBindings.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit ba70a8756361a0659a63a75a7c534d4442d69b23
Author: Stephan Bergmann 
AuthorDate: Thu Mar 7 15:09:00 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 7 18:38:34 2024 +0100

Fix Embind'ing of UNO Any getter for sequences

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 51048dc3edf4..2e5ecac00054 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -306,7 +306,11 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 return 
emscripten::val(*o3tl::forceAccess(self));
 case css::uno::TypeClass_SEQUENCE:
 {
-emscripten::internal::WireTypePack 
argv(const_cast(self.getValue()));
+auto const seq = *static_cast(self.getValue());
+auto const copy = std::malloc(sizeof(uno_Sequence*));
+*static_cast(copy) = seq;
+osl_atomic_increment(>nRefCount);
+emscripten::internal::WireTypePack argv(std::move(copy));
 return emscripten::val::take_ownership(
 _emval_take_value(getTypeId(self.getValueType()), 
argv));
 }


core.git: sw/source

2024-03-07 Thread Stephan Bergmann (via logerrit)
 sw/source/core/text/porlay.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f3c9adfbe50f3b74d5f6bbcf2f76132da1916751
Author: Stephan Bergmann 
AuthorDate: Thu Mar 7 08:27:06 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 7 10:38:50 2024 +0100

Fix UBSan build's RTTI needs

...after 0ed1cb5457a2106316f9d7fda10685360db4bc30 "make more symbols 
private in
writer" had caused CppunitTest_sw_core_text to fail with

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

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

diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index 6da1895d0161..fe8aeb861e50 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -75,7 +75,7 @@ public:
 
 /// Collection of SwLinePortion instances, representing one line of text.
 /// Typically owned by an SwParaPortion.
-class SwLineLayout : public SwTextPortion
+class SAL_DLLPUBLIC_RTTI SwLineLayout : public SwTextPortion
 {
 private:
 SwLineLayout *m_pNext;// The next Line


core.git: sw/source

2024-03-06 Thread Stephan Bergmann (via logerrit)
 sw/source/uibase/inc/edtwin.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d8d5b385aaca907f3c68ead16c7d133e43c92973
Author: Stephan Bergmann 
AuthorDate: Wed Mar 6 23:35:54 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 7 08:14:34 2024 +0100

Fix UBSan build's RTTI needs

...after 0ed1cb5457a2106316f9d7fda10685360db4bc30 "make more symbols 
private in
writer" had caused CppunitTest_sw_layoutwriter3 to fail with

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

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

diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index a40e6d03d322..5f054024d1d4 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -56,7 +56,7 @@ class SwTextFrame;
 To translate the pixel positions from the buffer OutputDevice to the real
 pixel positions, use the PixelToLogic methods of this class.
   */
-class SwEditWin final : public vcl::DocWindow,
+class SAL_DLLPUBLIC_RTTI SwEditWin final : public vcl::DocWindow,
 public DropTargetHelper, public DragSourceHelper
 {
 friend class SwEditWinUIObject;


core.git: sw/source

2024-03-06 Thread Stephan Bergmann (via logerrit)
 sw/source/uibase/inc/swdtflvr.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d3151a1a19f7deca76886a09442ed33b8750b0f7
Author: Stephan Bergmann 
AuthorDate: Wed Mar 6 22:18:52 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Mar 7 08:14:10 2024 +0100

Fix UBSan build's RTTI needs

...after 0ed1cb5457a2106316f9d7fda10685360db4bc30 "make more symbols 
private in
writer" had caused CppunitTest_sw_odfimport to fail with

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

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

diff --git a/sw/source/uibase/inc/swdtflvr.hxx 
b/sw/source/uibase/inc/swdtflvr.hxx
index ce42a13bd010..cde24ff4f5ad 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -75,7 +75,7 @@ enum class PasteTableType
 
 class SwTransferDdeLink;
 
-class SwTransferable final : public TransferableHelper
+class SAL_DLLPUBLIC_RTTI SwTransferable final : public TransferableHelper
 {
 friend class SwView_Impl;
 SfxObjectShellLock  m_aDocShellRef;


core.git: static/source

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

New commits:
commit 98c42f7e961e77d7f1c02d53862e4e78ecd07653
Author: Stephan Bergmann 
AuthorDate: Wed Mar 6 12:40:04 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 6 20:50:43 2024 +0100

Adapt to emsdk 3.1.46

...where it failed with

> In file included from 
static/source/unoembindhelpers/PrimaryBindings.cxx:13:
> In file included from 
~/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/bind.h:23:
> 
~/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/val.h:226:20: 
error: assigning to 'void *' from 'const void *' discards qualifiers
>   226 |   cursor->w[0].p = wt;
>   |^~
> ~/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/val.h:248:3: 
note: in instantiation of function template specialization 
'emscripten::internal::writeGenericWireType' requested here
>   248 |   writeGenericWireType(cursor, 
BindingType::toWireType(std::forward(first)));
>   |   ^
> ~/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/val.h:256:5: 
note: in instantiation of function template specialization 
'emscripten::internal::writeGenericWireTypes' requested here
>   256 | writeGenericWireTypes(cursor, std::forward(args)...);
>   | ^
> static/source/unoembindhelpers/PrimaryBindings.cxx:309:56: note: in 
instantiation of member function 'emscripten::internal::WireTypePack::WireTypePack' requested here
>   309 | emscripten::internal::WireTypePack 
argv(self.getValue());
>   |^

see the comment at

<https://github.com/emscripten-core/emscripten/commit/0f83fd40533248cce42464e1b9b586281202f247#r139443236>
"[Wasm64] Fix embind with addresses over 4gb (#20071)"

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 93ae89531a00..51048dc3edf4 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -306,7 +306,7 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 return 
emscripten::val(*o3tl::forceAccess(self));
 case css::uno::TypeClass_SEQUENCE:
 {
-emscripten::internal::WireTypePack argv(self.getValue());
+emscripten::internal::WireTypePack 
argv(const_cast(self.getValue()));
 return emscripten::val::take_ownership(
 _emval_take_value(getTypeId(self.getValueType()), 
argv));
 }


core.git: unotest/source

2024-03-06 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.cxx |2 +-
 unotest/source/embindtest/embindtest.js  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 119696c73eb7a2f4187efea503ebb88a19105819
Author: Stephan Bergmann 
AuthorDate: Wed Mar 6 14:55:37 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 6 20:50:01 2024 +0100

Adapt Exception test to emcc/Clang versions that support 
std::source_location

...so that the Exception's Message is something like "error at
unotest/source/embindtest/embindtest.cxx:271" instead of just plain "error"

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

diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 260c9883eb19..1f8b916fbbf1 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -279,7 +279,7 @@ class Test : public 
cppu::WeakImplHelper
 return false;
 }
 auto const& e = 
*o3tl::forceAccess(value);
-return e.Message == "error" && !e.Context.is() && e.m1 == -123456 && 
e.m2 == 100.5
+return e.Message.startsWith("error") && !e.Context.is() && e.m1 == 
-123456 && e.m2 == 100.5
&& e.m3 == u"hä";
 }
 
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 9b9911826219..c661589683f6 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -289,7 +289,7 @@ Module.addOnPostRun(function() {
 {
 let v = test.getAnyException();
 console.log(v);
-console.assert(v.get().Message === 'error');
+console.assert(v.get().Message.startsWith('error'));
 console.assert(v.get().Context === null);
 console.assert(v.get().m1 === -123456);
 console.assert(v.get().m2 === 100.5);


core.git: static/README.wasm.md

2024-03-06 Thread Stephan Bergmann (via logerrit)
 static/README.wasm.md |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 31729454450b0de4f3f3b96c9123de9736df9d6a
Author: Stephan Bergmann 
AuthorDate: Wed Mar 6 12:49:43 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 6 20:48:18 2024 +0100

Update documented emsdk version

...to what is known-working at allotropia.  (Also, emsdk --embedded option 
is
redundant since

<https://github.com/emscripten-core/emsdk/commit/3e9f04d467ba300b43fc40dab657c56f39751c96>
"Remove support for non-embedded mode".)

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

diff --git a/static/README.wasm.md b/static/README.wasm.md
index 91b418122bf2..ef8a02f8261a 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -26,7 +26,7 @@ INFO: latest browser won't work anymore with 0.0.0.0 and need 
127.0.0.1.
 
 ## Setup for the LO WASM build (with Qt)
 
-We're using Qt 5.15.2 with Emscripten 2.0.31. There are a bunch of Qt patches
+We're using Qt 5.15.2 with Emscripten 3.1.46. There are a bunch of Qt patches
 to fix the most grave bugs. Also newer Emscripten versions have various bugs
 with the FS image support.
 
@@ -37,8 +37,8 @@ with the FS image support.
 <https://emscripten.org/docs/getting_started/index.html>
 
 git clone https://github.com/emscripten-core/emsdk.git
-./emsdk install 2.0.31
-./emsdk activate --embedded 2.0.31
+./emsdk install 3.1.46
+./emsdk activate 3.1.46
 
 Example `bashrc` scriptlet:
 
@@ -404,7 +404,7 @@ For instance, this autogen.input works for me:
 
 For building LO core for use in COWASM, it is known to work to use
 Emscripten 3.1.30 (and not just 2.0.31 which is what the LO+Qt5 work
-has been using).
+has been using in the past).
 
 ### That's all
 


core.git: static/source udkapi/org udkapi/UnoApi_udkapi.mk unotest/source

2024-03-05 Thread Stephan Bergmann (via logerrit)
 static/source/embindmaker/embindmaker.cxx  |   61 ++---
 static/source/unoembindhelpers/PrimaryBindings.cxx |9 +--
 udkapi/UnoApi_udkapi.mk|1 
 udkapi/org/libreoffice/embindtest/Exception.idl|   20 ++
 udkapi/org/libreoffice/embindtest/XTest.idl|2 
 unotest/source/embindtest/embindtest.cxx   |   18 ++
 unotest/source/embindtest/embindtest.js|   16 +
 7 files changed, 116 insertions(+), 11 deletions(-)

New commits:
commit 567a10caef0f2ebc9390babda545b410b5aa36c6
Author: Stephan Bergmann 
AuthorDate: Tue Mar 5 16:37:01 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 6 00:02:36 2024 +0100

Add Embind'ing of UNO Any getter for exceptions

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

diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index a0ea41eddf97..a3558e5b4e04 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -141,8 +141,8 @@ OUString jsSingleton(OUString const& singleton) { return 
"uno_Function_" + jsNam
 
 void scan(rtl::Reference const& cursor, std::u16string_view 
prefix,
   Module* module, std::vector& enums, std::vector& 
structs,
-  std::vector& interfaces, std::vector& services,
-  std::vector& singletons)
+  std::vector& exceptions, std::vector& interfaces,
+  std::vector& services, std::vector& singletons)
 {
 assert(cursor.is());
 assert(module != nullptr);
@@ -165,8 +165,8 @@ void scan(rtl::Reference const& cursor, 
std::u16string_view p
 sub = std::make_shared();
 }
 
scan(static_cast(ent.get())->createCursor(),
- Concat2View(name + "."), sub.get(), enums, structs, 
interfaces, services,
- singletons);
+ Concat2View(name + "."), sub.get(), enums, structs, 
exceptions, interfaces,
+ services, singletons);
 break;
 }
 case unoidl::Entity::SORT_ENUM_TYPE:
@@ -177,6 +177,10 @@ void scan(rtl::Reference const& cursor, 
std::u16string_view p
 module->mappings.emplace_back(id, "instance.uno_Type_" + 
jsName(name));
 structs.emplace_back(name);
 break;
+case unoidl::Entity::SORT_EXCEPTION_TYPE:
+module->mappings.emplace_back(id, "instance.uno_Type_" + 
jsName(name));
+exceptions.emplace_back(name);
+break;
 case unoidl::Entity::SORT_INTERFACE_TYPE:
 module->mappings.emplace_back(id, "instance.uno_Type_" + 
jsName(name));
 interfaces.emplace_back(name);
@@ -449,6 +453,28 @@ void dumpStructMembers(std::ostream& out, 
rtl::Reference const& man
 }
 }
 
+void dumpExceptionMembers(std::ostream& out, rtl::Reference 
const& manager,
+  OUString const& name,
+  rtl::Reference 
exception)
+{
+auto const& base = exception->getDirectBase();
+if (!base.isEmpty())
+{
+auto const ent = manager->getManager()->findEntity(base);
+if (!ent.is() || ent->getSort() != unoidl::Entity::SORT_EXCEPTION_TYPE)
+{
+throw CannotDumpException("bad exception base \"" + base + "\"");
+}
+dumpExceptionMembers(out, manager, name,
+ 
static_cast(ent.get()));
+}
+for (auto const& mem : exception->getDirectMembers())
+{
+out << "
.field(\"" << mem.name << "\", &" << cppName(name) << "::" << mem.name
+<< ")";
+}
+}
+
 void dumpAttributes(std::ostream& out, rtl::Reference const& 
manager,
 OUString const& name, 
rtl::Reference const& entity,
 std::list const& baseTrail)
@@ -784,13 +810,14 @@ SAL_IMPLEMENT_MAIN()
 auto const module = std::make_shared();
 std::vector enums;
 std::vector structs;
+std::vector exceptions;
 std::vector interfaces;
 std::vector services;
 std::vector singletons;
 for (auto const& prov : mgr->getPrimaryProviders())
 {
-scan(prov->createRootCursor(), u"", module.get(), enums, structs, 
interfaces, services,
- singletons);
+scan(prov->createRootCursor(), u"", module.get(), enums, structs, 
excepti

core.git: offapi/com

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

New commits:
commit 792a2847c8d9b6618fa920aaee1a6289248fca87
Author: Stephan Bergmann 
AuthorDate: Tue Mar 5 15:52:43 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Mar 5 22:41:15 2024 +0100

Keep recently introduced UNOIDL entity unpublished for now

Change-Id: I635e08898bc2627dada89fed5a834a6145915ac9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164431
Reviewed-by: László Németh 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/ParagraphHyphenationKeepType.idl 
b/offapi/com/sun/star/text/ParagraphHyphenationKeepType.idl
index 42ad12077451..1a6dac4b2d89 100644
--- a/offapi/com/sun/star/text/ParagraphHyphenationKeepType.idl
+++ b/offapi/com/sun/star/text/ParagraphHyphenationKeepType.idl
@@ -30,7 +30,7 @@
 @since LibreOffice 24.8
  */
 
-published constants ParagraphHyphenationKeepType
+constants ParagraphHyphenationKeepType
 {
 /** No restriction applies. The word may be hyphenated at the end of any 
region.
  */


core.git: unotest/source

2024-03-05 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.js |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9357b8ea752431b854eff6471f3192659324c2cb
Author: Stephan Bergmann 
AuthorDate: Tue Mar 5 16:11:13 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Mar 5 22:40:13 2024 +0100

Fix typos in commented-out TODO code

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

diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index cc9e691a65d6..b10e98b9efa4 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -258,7 +258,7 @@ Module.addOnPostRun(function() {
 v.delete();
 let s = new Module.uno_Sequence_string(["foo", "barr", "bazzz"]);
 //TODO: let a = new Module.Any(s, css.uno.TypeClass.SEQUENCE);
-//TODO: console.assert(test.isAny(a));
+//TODO: console.assert(test.isAnySequence(a));
 //TODO: a.delete();
 s.delete();
 }
@@ -270,7 +270,7 @@ Module.addOnPostRun(function() {
 v.delete();
 //TODO: let a = new Module.Any(
 //TODO: uno.org.libreoffice.embindtest.Enum.E_2, 
css.uno.TypeClass.ENUM);
-//TODO: console.assert(test.isAny(a));
+//TODO: console.assert(test.isAnyEnum(a));
 //TODO: a.delete();
 }
 {
@@ -283,7 +283,7 @@ Module.addOnPostRun(function() {
 v.delete();
 //TODO: let a = new Module.Any(
 //TODO: {m1: -123456, m2: 100.5, m3: 'hä'}, 
css.uno.TypeClass.STRUCT);
-//TODO: console.assert(test.isAny(a));
+//TODO: console.assert(test.isAnyStruct(a));
 //TODO: a.delete();
 }
 {


core.git: sal/rtl

2024-03-05 Thread Stephan Bergmann (via logerrit)
 sal/rtl/cipher.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 74a31f1b262f9770409ee68e04433adb7e3ab10c
Author: Stephan Bergmann 
AuthorDate: Tue Mar 5 14:02:30 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Mar 5 17:52:23 2024 +0100

Missing include (for free)

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

diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx
index 98b566da61a8..5d842c88f5f5 100644
--- a/sal/rtl/cipher.cxx
+++ b/sal/rtl/cipher.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 
 #include 


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

2024-03-04 Thread Stephan Bergmann (via logerrit)
 include/static/unoembindhelpers/PrimaryBindings.hxx |1 
 static/source/embindmaker/embindmaker.cxx   |1 
 static/source/unoembindhelpers/PrimaryBindings.cxx  |   35 ++--
 unotest/source/embindtest/embindtest.js |   18 +-
 4 files changed, 44 insertions(+), 11 deletions(-)

New commits:
commit 893af92ae990909d477434d48d97dae0814e7e58
Author: Stephan Bergmann 
AuthorDate: Fri Mar 1 15:34:48 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 4 21:43:18 2024 +0100

Add Embind'ing of UNO Any getter for sequences

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

diff --git a/include/static/unoembindhelpers/PrimaryBindings.hxx 
b/include/static/unoembindhelpers/PrimaryBindings.hxx
index 13ddd05cce26..259c9c2944f8 100644
--- a/include/static/unoembindhelpers/PrimaryBindings.hxx
+++ b/include/static/unoembindhelpers/PrimaryBindings.hxx
@@ -125,6 +125,7 @@ template  void registerSequence(char const* 
name)
 checkSequenceAccess(self, index);
 self.getArray()[index] = value;
 });
+registerUnoType>();
 }
 }
 
diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index 36b1f56fd5a3..a0ea41eddf97 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -864,6 +864,7 @@ SAL_IMPLEMENT_MAIN()
<< jsName(str) << "\")";
 dumpStructMembers(cppOut, mgr, str, strEnt);
 cppOut << ";
";
+cppOut << "::unoembindhelpers::registerUnoType<" << 
cppName(str) << ">();
";
 dumpRegisterFunctionEpilog(cppOut, n);
 for (auto const& mem : strEnt->getDirectMembers())
 {
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 7cf99c523f0d..21fe4c1cd66f 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -26,7 +26,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
+#include 
 #include 
 #include 
 #include 
@@ -151,6 +154,21 @@ OString toUtf8(OUString const& string)
 return s;
 }
 
+void copyStruct(typelib_CompoundTypeDescription* desc, void const* source, 
void* dest)
+{
+if (desc->pBaseTypeDescription != nullptr)
+{
+copyStruct(desc->pBaseTypeDescription, source, dest);
+}
+for (sal_Int32 i = 0; i != desc->nMembers; ++i)
+{
+uno_type_copyData(
+static_cast(dest) + desc->pMemberOffsets[i],
+const_cast(static_cast(source) + 
desc->pMemberOffsets[i]),
+desc->ppTypeRefs[i], cpp_acquire);
+}
+}
+
 template  void registerInOutParam(char const* name)
 {
 
class_>(name).constructor().constructor().property(
@@ -287,7 +305,11 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 case css::uno::TypeClass_TYPE:
 return 
emscripten::val(*o3tl::forceAccess(self));
 case css::uno::TypeClass_SEQUENCE:
-return emscripten::val::undefined(); //TODO
+{
+emscripten::internal::WireTypePack argv(self.getValue());
+return emscripten::val::take_ownership(
+_emval_take_value(getTypeId(self.getValueType()), 
argv));
+}
 case css::uno::TypeClass_ENUM:
 {
 emscripten::internal::WireTypePack argv(
@@ -296,7 +318,16 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 _emval_take_value(getTypeId(self.getValueType()), 
argv));
 }
 case css::uno::TypeClass_STRUCT:
-return emscripten::val::undefined(); //TODO
+{
+css::uno::TypeDescription 
desc(self.getValueType().getTypeLibType());
+assert(desc.is());
+auto const td = 
reinterpret_cast(desc.get());
+auto const copy = std::malloc(td->aBase.aBase.nSize);
+copyStruct(>aBase, self.getValue(), copy);
+emscripten::internal::WireTypePack argv(std::move(copy));
+return emscripten::val::take_ownership(
+_emval_take_value(getTypeId(self.getValueType()), 
argv));
+}
 case css::uno::TypeClass_EXCEPTION:
 return emscripten::val::undefined(); //TODO
 case css::uno::TypeClass_INTERFACE:
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index d391f5bd15f5..cc9e691a65d6 100644
--- a/unotest/

core.git: 2 commits - include/static static/source udkapi/org unotest/source

2024-03-04 Thread Stephan Bergmann (via logerrit)
 include/static/unoembindhelpers/PrimaryBindings.hxx |   13 +
 static/source/embindmaker/embindmaker.cxx   |1 
 static/source/unoembindhelpers/PrimaryBindings.cxx  |  172 -
 udkapi/org/libreoffice/embindtest/XTest.idl |   36 +++
 unotest/source/embindtest/embindtest.cxx|  182 ++
 unotest/source/embindtest/embindtest.js |  201 
 6 files changed, 558 insertions(+), 47 deletions(-)

New commits:
commit 0bab5cda2123ecc7f3775d05ca5103bdef23bfe8
Author: Stephan Bergmann 
AuthorDate: Fri Mar 1 14:30:38 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 4 21:43:09 2024 +0100

Add Embing'ing of UNO Any getter for enums

...which taps into the internals of emscripten::val, which is based on
std::type_info identifiers, so we need an additional statically-built 
mapping
between UNO (enum, for now) types and std::type_info

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

diff --git a/include/static/unoembindhelpers/PrimaryBindings.hxx 
b/include/static/unoembindhelpers/PrimaryBindings.hxx
index 80b55d5278ac..13ddd05cce26 100644
--- a/include/static/unoembindhelpers/PrimaryBindings.hxx
+++ b/include/static/unoembindhelpers/PrimaryBindings.hxx
@@ -14,11 +14,14 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 template  struct 
emscripten::smart_ptr_trait>
@@ -33,6 +36,11 @@ template  struct 
emscripten::smart_ptr_trait>
 
 namespace unoembindhelpers
 {
+namespace detail
+{
+void registerUnoType(css::uno::Type const& type, std::type_info const* id);
+}
+
 enum class uno_Reference
 {
 FromAny
@@ -76,6 +84,11 @@ void checkSequenceAccess(css::uno::Sequence const& 
sequence, sal_Int32 index)
 }
 }
 
+template  void registerUnoType()
+{
+detail::registerUnoType(cppu::UnoType::get(), (T));
+}
+
 template  void registerSequence(char const* name)
 {
 emscripten::class_>(name)
diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index 89fdf834ea1d..36b1f56fd5a3 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -849,6 +849,7 @@ SAL_IMPLEMENT_MAIN()
<< mem.name << ")";
 }
 cppOut << ";
";
+cppOut << "::unoembindhelpers::registerUnoType<" << 
cppName(enm) << ">();
";
 dumpRegisterFunctionEpilog(cppOut, n);
 }
 std::set sequences;
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 5b76b549cb13..7cf99c523f0d 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace emscripten;
 using namespace css::uno;
@@ -166,6 +167,31 @@ Reference getCurrentModelFromViewSh()
 }
 return pSh->GetCurrentDocument();
 }
+
+struct LessType
+{
+bool operator()(css::uno::Type const& type1, css::uno::Type const& type2) 
const
+{
+return type1.getTypeLibType() < type2.getTypeLibType();
+}
+};
+
+std::map unoTypes;
+
+std::type_info const* getTypeId(css::uno::Type const& type)
+{
+auto const i = unoTypes.find(type);
+if (i == unoTypes.end())
+{
+throw std::runtime_error("unregistered UNO type");
+}
+return i->second;
+}
+}
+
+namespace unoembindhelpers::detail
+{
+void registerUnoType(css::uno::Type const& type, std::type_info const* id) { 
unoTypes[type] = id; }
 }
 
 EMSCRIPTEN_BINDINGS(PrimaryBindings)
@@ -263,7 +289,12 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 case css::uno::TypeClass_SEQUENCE:
 return emscripten::val::undefined(); //TODO
 case css::uno::TypeClass_ENUM:
-return emscripten::val::undefined(); //TODO
+{
+emscripten::internal::WireTypePack argv(
+std::move(*static_cast(self.getValue(;
+return emscripten::val::take_ownership(
+_emval_take_value(getTypeId(self.getValueType()), 
argv));
+}
 case css::uno::TypeClass_STRUCT:
 return emscripten::val::undefined(); //TODO
 case css::uno::TypeClass_EXCEPTION:
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index ab50c859e13e..d391f5bd15f5 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -265,7 +265,7 @@ Modu

core.git: include/vcl

2024-03-03 Thread Stephan Bergmann (via logerrit)
 include/vcl/opengl/OpenGLHelper.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 88c6e127b3b9d2c80bb3cf04e74c4152ddfe9674
Author: Stephan Bergmann 
AuthorDate: Sun Mar 3 19:32:16 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 4 07:30:34 2024 +0100

Fix --enable-mergelibs=more --enable-sal-log build

...after 621e16205363c1eea0be57017997396dee63df4b "add 
UNLESS_MERGELIBS_MORE and
use to reduce symbol visibility" caused

> vcl/source/opengl/x11/context.cxx:118: error: undefined reference to 
'OpenGLHelper::debugMsgStream(std::__cxx11::basic_ostringstream, std::allocator > const&)'
> vcl/source/opengl/x11/context.cxx:270: error: undefined reference to 
'OpenGLHelper::debugMsgStream(std::__cxx11::basic_ostringstream, std::allocator > const&)'
> vcl/source/opengl/x11/context.cxx:370: error: undefined reference to 
'OpenGLHelper::debugMsgStream(std::__cxx11::basic_ostringstream, std::allocator > const&)'
> vcl/source/opengl/x11/context.cxx:251: error: undefined reference to 
'OpenGLHelper::debugMsgStream(std::__cxx11::basic_ostringstream, std::allocator > const&)'
> collect2: error: ld returned 1 exit status
> make[1]: *** [vcl/Library_vclplug_gen.mk:20: 
instdir/program/libvclplug_genlo.so] Error 1

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

diff --git a/include/vcl/opengl/OpenGLHelper.hxx 
b/include/vcl/opengl/OpenGLHelper.hxx
index 715636147747..e213bfccf14e 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -100,7 +100,7 @@ public:
 __attribute__ ((format (printf, 2, 3)))
 #endif
 static void debugMsgPrint(const int nType, const char *pFormat, ...);
-static void debugMsgStream(std::ostringstream const );
+IF_MERGELIBS_MORE(VCL_DLLPUBLIC) static void 
debugMsgStream(std::ostringstream const );
 static void debugMsgStreamWarn(std::ostringstream const );
 
 /**


core.git: unotest/source

2024-03-02 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.cxx |4 ++--
 unotest/source/embindtest/embindtest.js  |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b0d9f3c417315eb704dc9ab906e9c24f59571942
Author: Stephan Bergmann 
AuthorDate: Fri Mar 1 10:29:59 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Mar 2 22:08:35 2024 +0100

Some minor embindtest clean up

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

diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 8b131cd9f376..07558a5ed1b7 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -29,7 +30,6 @@ namespace
 {
 class Test : public cppu::WeakImplHelper
 {
-public:
 sal_Bool SAL_CALL getBoolean() override { return true; }
 
 sal_Bool SAL_CALL isBoolean(sal_Bool value) override { return value; }
@@ -102,7 +102,7 @@ public:
 
 sal_Bool SAL_CALL isStruct(org::libreoffice::embindtest::Struct const& 
value) override
 {
-return value.m1 == -123456 && value.m2 == 100.5 && value.m3 == u"hä";
+return value == org::libreoffice::embindtest::Struct{ -123456, 100.5, 
u"hä"_ustr };
 }
 
 css::uno::Sequence SAL_CALL getSequenceBoolean() override
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 422c1c1a421f..6f88a9f543d0 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -98,7 +98,7 @@ Module.addOnPostRun(function() {
 }
 {
 let v = test.getStruct();
-console.log(v.m1 + ', ' + v.m2 + ', ' + v.m3);
+console.log(v);
 console.assert(v.m1 === -123456);
 console.assert(v.m2 === 100.5);
 console.assert(v.m3 === 'hä');


core.git: offapi/type_reference

2024-02-29 Thread Stephan Bergmann (via logerrit)
 offapi/type_reference/offapi.idl |   21 +
 1 file changed, 21 insertions(+)

New commits:
commit 806362b915ee89a4f907905a8ac8c1527ea99223
Author: Stephan Bergmann 
AuthorDate: Thu Feb 29 16:11:43 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 1 07:47:26 2024 +0100

Update the reference rdbs to libreoffice-24.2.0.3

.../master/instdir/sdk/bin/unoidl-read --published \
 .../libreoffice-24.2.0.3/instdir/program/types.rdb \
 >.../master/udkapi/type_reference/udkapi.idl

.../master/instdir/sdk/bin/unoidl-read --published \
 .../libreoffice-24.2.0.3/instdir/program/types.rdb \
 .../libreoffice-24.2.0.3/instdir/program/types/offapi.rdb \
 >.../master/offapi/type_reference/offapi.idl

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

diff --git a/offapi/type_reference/offapi.idl b/offapi/type_reference/offapi.idl
index fd13e3da3452..fd8f6e6469bf 100644
--- a/offapi/type_reference/offapi.idl
+++ b/offapi/type_reference/offapi.idl
@@ -516,6 +516,7 @@ module com {
  const short NUM7 = 263;
  const short NUM8 = 264;
  const short NUM9 = 265;
+ const short NUMBERSIGN = 191;
  const short NUMLOCK = 1313;
  const short O = 526;
  const short OPEN = 1296;
@@ -561,6 +562,8 @@ module com {
  const short V = 533;
  const short W = 534;
  const short X = 535;
+ const short XF86BACK = 166;
+ const short XF86FORWARD = 167;
  const short Y = 536;
  const short Z = 537;
 };
@@ -5238,6 +5241,7 @@ module com {
  [property] long EdgeNode1VertDist;
  [property] long EdgeNode2HorzDist;
  [property] long EdgeNode2VertDist;
+ [property, optional] boolean EdgeOOXMLCurve;
 };
 published service ConnectorShape {
  service ::com::sun::star::drawing::Shape;
@@ -7324,6 +7328,7 @@ module com {
  [property] short LeftMargin;
  [property] short RightMargin;
  [property, optional] short BaseLine;
+ [property, optional] boolean IsRightToLeft;
 };
 /** @deprecated */ published struct SymbolDescriptor {
  string sName;
@@ -10675,24 +10680,34 @@ module com {
  const long BOOLEAN = 16;
  const long CHAR = 1;
  const long CLOB = 2005;
+ const long DATALINK = 70;
  const long DATE = 91;
  const long DECIMAL = 3;
  const long DISTINCT = 2001;
  const long DOUBLE = 8;
  const long FLOAT = 6;
  const long INTEGER = 4;
+ const long LONGNVARCHAR = -16;
  const long LONGVARBINARY = -4;
  const long LONGVARCHAR = -1;
+ const long NCHAR = -15;
+ const long NCLOB = 2011;
  const long NUMERIC = 2;
+ const long NVARCHAR = -9;
  const long OBJECT = 2000;
  const long OTHER = ;
  const long REAL = 7;
  const long REF = 2006;
+ const long REF_CURSOR = 2012;
+ const long ROWID = -8;
  const long SMALLINT = 5;
  const long SQLNULL = 0;
+ const long SQLXML = 2009;
  const long STRUCT = 2002;
  const long TIME = 92;
  const long TIMESTAMP = 93;
+ const long TIMESTAMP_WITH_TIMEZONE = 2014;
+ const long TIME_WITH_TIMEZONE = 2013;
  const long TINYINT = -6;
  const long VARBINARY = -3;
  const long VARCHAR = 12;
@@ -12004,6 +12019,7 @@ module com {
 published constants NamedRangeFlag {
  const long COLUMN_HEADER = 4;
  const long FILTER_CRITERIA = 1;
+ const long HIDDEN = 16;
  const long PRINT_AREA = 2;
  const long ROW_HEADER = 8;
 };
@@ -13361,6 +13377,7 @@ module com {
  [property] short StartWith;
  [property, optional] ::com::sun::star::awt::XBitmap GraphicBitmap;
  [property, optional] string ListFormat;
+ [property, optional] boolean IsLegal;
 };
 published service NumberingRule {
  service ::com::sun::star::style::NumberingAlignment;
@@ -13882,6 +13899,7 @@ module com {
  [property, optional] string Tooltip;
  [property, optional] boolean Decorative;
  [property, optional] boolean IsSplitAllowed;
+ [property, optional] boolean WrapTextAtFlyStart;
 };
 published service BaseFrame {
  service ::com::sun::star::text::BaseFrameProperties;
@@ -14723,6 +14741,7 @@ module com {
  const short FOOTNOTE = 3;
  const short REFERENCE_MARK = 0;
  const short SEQUENCE_FIELD = 1;
+ const short STYLE = 5;
 };
 published service ReferenceMark {
  interface ::com::sun::star::text::XTextContent;
@@ -15541,6 +15560,7 @@ module com {
   [property] short ReferenceFieldPart;
   [property] short SequenceNumber;
   [property, optional] string ReferenceFieldLanguage;
+  [property, optional] short ReferenceFieldFlags;
  };
  published service GraphicObjectCount {
   service ::com::sun::star::text::TextField;
@@ -17262,6 +17282,7 @@ module com {
  [property] short SearchSimilar

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

2024-02-29 Thread Stephan Bergmann (via logerrit)
 static/source/unoembindhelpers/PrimaryBindings.cxx |   43 +
 udkapi/org/libreoffice/embindtest/XTest.idl|4 +
 unotest/source/embindtest/embindtest.cxx   |   24 +++
 unotest/source/embindtest/embindtest.js|   16 +++
 4 files changed, 87 insertions(+)

New commits:
commit 41feb036b44ffefca898f44ed95a2129d779da59
Author: Stephan Bergmann 
AuthorDate: Thu Feb 29 08:54:08 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 29 16:19:19 2024 +0100

Some minimal Embind support for UNO type

...which should be rare enough in practical use that it should be 
sufficient to
only have toString-functionality for instances mapped from C++ to JS, but no
constructor for new instances on the JS side.  (The natural choice for the
latter would be a mapping of the C++

> inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName 
);

constructor, but which requires a mapping for the css::uno::TypeClass UNOIDL
enum, which is only provided "later" through CustomTarget_static/unoembind, 
so
would at least conceptually be a bit dirty.)

This Embind mapping treats css::uno::Type as a smart pointer for the 
underlying
typelib_TypeDescriptionReference, to benefit from the fallback garbage
collection (in more recent Emscripten versions, at least) for smart 
pointers,
obviating the need to call .delete() on each instance mapped to JS.

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 186e3ee88057..50048a97ada6 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -12,17 +12,41 @@
 #include 
 #include 
 
+#include 
+#include 
 #include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
+#include 
 #include 
 
 using namespace emscripten;
 using namespace css::uno;
 
+template <> struct emscripten::smart_ptr_trait
+{
+using PointerType = css::uno::Type;
+using element_type = typelib_TypeDescriptionReference;
+static typelib_TypeDescriptionReference* get(css::uno::Type const& ptr)
+{
+return ptr.getTypeLibType();
+}
+static sharing_policy get_sharing_policy() { return 
sharing_policy::INTRUSIVE; }
+static css::uno::Type* share(typelib_TypeDescriptionReference* v)
+{
+return new css::uno::Type(v);
+}
+static css::uno::Type* construct_null() { return new css::uno::Type(); }
+};
+
 EM_JS(void, jsRegisterChar, (std::type_info const* raw),
 // clang-format off
 {
@@ -110,6 +134,18 @@ EM_JS(void, jsRegisterString, (std::type_info const* raw),
 
 namespace
 {
+OString toUtf8(OUString const& string)
+{
+OString s;
+if (!string.convertToString(, RTL_TEXTENCODING_UTF8,
+RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
+| RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR))
+{
+throw css::uno::RuntimeException("cannot convert OUString to UTF-8");
+}
+return s;
+}
+
 template  void registerInOutParam(char const* name)
 {
 
class_>(name).constructor().constructor().property(
@@ -135,6 +171,13 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 enum_("uno_Sequence")
 .value("FromSize", unoembindhelpers::uno_Sequence::FromSize);
 
+emscripten::class_("uno_Type")
+.smart_ptr("uno_Type$")
+.function("toString", +[](css::uno::Type const& self) {
+auto const name = toUtf8(self.getTypeName());
+return std::string(name.getStr(), name.getLength());
+});
+
 // Any
 class_("Any").constructor(+[](const val& rObject, const TypeClass& 
rUnoType) -> Any {
 switch (rUnoType)
diff --git a/udkapi/org/libreoffice/embindtest/XTest.idl 
b/udkapi/org/libreoffice/embindtest/XTest.idl
index f64a3857e863..2ddfb41f2ead 100644
--- a/udkapi/org/libreoffice/embindtest/XTest.idl
+++ b/udkapi/org/libreoffice/embindtest/XTest.idl
@@ -34,6 +34,8 @@ interface XTest {
 boolean isChar([in] char value);
 string getString();
 boolean isString([in] string value);
+type getType();
+boolean isType([in] type value);
 Enum getEnum();
 boolean isEnum([in] Enum value);
 Struct getStruct();
@@ -62,6 +64,8 @@ interface XTest {
 boolean isSequenceChar([in] sequence value);
 sequence getSequenceString();
 boolean isSequenceString([in] sequence value);
+sequence getSequenceType();
+boolean isSequenceType([in] sequence value);
 sequence > getSequenceSequenceString();
 boolean isSequenceSequen

core.git: static/README.wasm.md

2024-02-29 Thread Stephan Bergmann (via logerrit)
 static/README.wasm.md |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f1a47d476a6d993121a4b1c8ee405c20cd808820
Author: Stephan Bergmann 
AuthorDate: Thu Feb 29 11:35:46 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 29 13:25:54 2024 +0100

Improve sample code, missing delete()

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

diff --git a/static/README.wasm.md b/static/README.wasm.md
index f2abc8219ce8..91b418122bf2 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -248,7 +248,9 @@ 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.setPropertyValue("CharColor", new 
Module.Any(Math.floor(Math.random() * 0xFF), css.uno.TypeClass.LONG));
+let color = new Module.Any(Math.floor(Math.random() * 0xFF), 
css.uno.TypeClass.LONG);
+xParaProps.setPropertyValue("CharColor", color);
+color.delete();
 }
 }
 ```


core.git: Branch 'libreoffice-24-2' - solenv/bin

2024-02-29 Thread Stephan Bergmann (via logerrit)
 solenv/bin/assemble-flatpak-appdata.sh |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c458c1709e35b6ba9bc5c326e1d24ba71ae51a18
Author: Stephan Bergmann 
AuthorDate: Wed Feb 28 16:23:46 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 29 13:25:30 2024 +0100

Try to appease Flathub linter

...which caused a recent
<https://buildbot.flathub.org/#/builders/33/builds/12708> test build to fail
with

> {
> "errors": [
> "appstream-failed-validation"
> ],
> "warnings": [
> "appstream-screenshot-missing-caption"
> ],
> "appstream": [
> "E: org.libreoffice.LibreOffice.desktop:~: 
desktop-app-launchable-omitted"
> ],
> "message": "Please consult the documentation at 
https://docs.flathub.org/docs/for-app-authors/linter;
> }

Change-Id: I3655d3985c70780e5980bec2d4753120fb302f1a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164134
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit beccfbbb7e896266be3c6c1a9dddaf68fd33ae9e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164117
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/solenv/bin/assemble-flatpak-appdata.sh 
b/solenv/bin/assemble-flatpak-appdata.sh
index 4896cf3f20bc..84b5f5399299 100755
--- a/solenv/bin/assemble-flatpak-appdata.sh
+++ b/solenv/bin/assemble-flatpak-appdata.sh
@@ -41,6 +41,7 @@ cat <<\EOF >"${1?}"org.libreoffice.LibreOffice.appdata.xml
   you can easily share documents with users of other popular office suites
   without worrying about compatibility.
  
+ org.libreoffice.LibreOffice.desktop
  http://www.libreoffice.org/discover/libreoffice/
  https://bugs.documentfoundation.org/
  https://donate.libreoffice.org/


core.git: vcl/source

2024-02-29 Thread Stephan Bergmann (via logerrit)
 vcl/source/gdi/print.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit acce5d17ac7f5d8c92e5f75a5757ac449692e2fa
Author: Stephan Bergmann 
AuthorDate: Thu Feb 29 08:10:40 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 29 10:03:27 2024 +0100

Read of uninitialized Printer::mbResetPrintArea

...introduced in 364f0bb1cac0e12f5f926857f61c2f329a353ec7 "tdf#155218 sc: 
fix
regression page orientation in print dialog", causing UITest_calc_dialogs to
fail with

> /include/vcl/print.hxx:227:61: runtime error: load of value 190, which is 
not a valid value for type 'bool'
> #0 0x7f1337c5ec9e in Printer::IsPrintAreaReset() 
/include/vcl/print.hxx:227:61
> #1 0x7f1337bd64be in 
ScModelObj::getRendererCount(com::sun::star::uno::Any const&, 
com::sun::star::uno::Sequence const&) 
/sc/source/ui/unoobj/docuno.cxx:1856:41
> #2 0x7f13ca466d5f in SfxPrinterController::getPageCount() const 
/sfx2/source/view/viewprn.cxx:228:36
> #3 0x7f13a130580e in 
Printer::PreparePrintJob(std::shared_ptr, JobSetup 
const&) /vcl/source/gdi/print3.cxx:420:53
> #4 0x7f13a13027e3 in 
Printer::ImplPrintJob(std::shared_ptr const&, JobSetup 
const&) /vcl/source/gdi/print3.cxx:575:9
> #5 0x7f13a134cdc8 in (anonymous 
namespace)::PrintJobAsync::ExecJob(void*) /vcl/source/gdi/print3.cxx:318:5
> #6 0x7f13a1302b28 in (anonymous 
namespace)::PrintJobAsync::LinkStubExecJob(void*, void*) 
/vcl/source/gdi/print3.cxx:316:1
> #7 0x7f139f592d0d in Link::Call(void*) const 
/include/tools/link.hxx:111:45
> #8 0x7f139f579a00 in ImplHandleUserEvent(ImplSVEvent*) 
/vcl/source/window/winproc.cxx:2287:30
> #9 0x7f139f5646c0 in ImplWindowFrameProc(vcl::Window*, SalEvent, void 
const*) /vcl/source/window/winproc.cxx:2851:13
> #10 0x7f13a3273a82 in SalFrame::CallCallback(SalEvent, void const*) 
const /vcl/inc/salframe.hxx:310:29
> #11 0x7f13a3320ea1 in 
SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) 
/vcl/headless/svpinst.cxx:266:22
> #12 0x7f13a3321632 in non-virtual thunk to 
SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) 
/vcl/headless/svpinst.cxx
> #13 0x7f13a1b7e593 in 
SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const 
/vcl/source/app/salusereventlist.cxx:119:58
> #14 0x7f13a1b7dd25 in SalUserEventList::DispatchUserEvents(bool) 
/vcl/source/app/salusereventlist.cxx:120:13
> #15 0x7f13a3325345 in SvpSalInstance::ImplYield(bool, bool) 
/vcl/headless/svpinst.cxx:395:22
> #16 0x7f13a3327b4e in SvpSalInstance::DoYield(bool, bool) 
/vcl/headless/svpinst.cxx:471:21
> #17 0x7f13a2012c4a in ImplYield(bool, bool) 
/vcl/source/app/svapp.cxx:390:48
> #18 0x7f13a20112b8 in Application::Yield() 
/vcl/source/app/svapp.cxx:474:5
> #19 0x7f13a2010b57 in Application::Execute() 
/vcl/source/app/svapp.cxx:368:13
> #20 0x7f13e355d421 in desktop::Desktop::Main() 
/desktop/source/app/app.cxx:1614:13
> #21 0x7f13a20b6ae2 in ImplSVMain() /vcl/source/app/svmain.cxx:229:35
> #22 0x7f13a20bfd20 in SVMain() /vcl/source/app/svmain.cxx:261:12
> #23 0x7f13e376dc40 in soffice_main 
/desktop/source/app/sofficemain.cxx:94:12
> #24 0x4fda3c in sal_main /desktop/source/app/main.c:51:15

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

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

diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 3697e51c338d..42013175e131 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -450,6 +450,7 @@ void Printer::ImplInitData()
 mbNewJobSetup   = false;
 mbSinglePrintJobs   = false;
 mbUsePrintSetting   = false;
+mbResetPrintArea= false;
 mpInfoPrinter   = nullptr;
 mpPrinter   = nullptr;
 mpDisplayDev= nullptr;


core.git: solenv/bin

2024-02-29 Thread Stephan Bergmann (via logerrit)
 solenv/bin/assemble-flatpak-appdata.sh |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 792b4b676b28d1108114cd311e20f62633998673
Author: Stephan Bergmann 
AuthorDate: Wed Feb 28 16:23:46 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 29 10:02:36 2024 +0100

Try to appease Flathub linter

...which caused a recent
<https://buildbot.flathub.org/#/builders/33/builds/12708> test build to fail
with

> {
> "errors": [
> "appstream-failed-validation"
> ],
> "warnings": [
> "appstream-screenshot-missing-caption"
> ],
> "appstream": [
> "E: org.libreoffice.LibreOffice.desktop:~: 
desktop-app-launchable-omitted"
> ],
> "message": "Please consult the documentation at 
https://docs.flathub.org/docs/for-app-authors/linter;
> }

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

diff --git a/solenv/bin/assemble-flatpak-appdata.sh 
b/solenv/bin/assemble-flatpak-appdata.sh
index 4896cf3f20bc..84b5f5399299 100755
--- a/solenv/bin/assemble-flatpak-appdata.sh
+++ b/solenv/bin/assemble-flatpak-appdata.sh
@@ -41,6 +41,7 @@ cat <<\EOF >"${1?}"org.libreoffice.LibreOffice.appdata.xml
   you can easily share documents with users of other popular office suites
   without worrying about compatibility.
  
+ org.libreoffice.LibreOffice.desktop
  http://www.libreoffice.org/discover/libreoffice/
  https://bugs.documentfoundation.org/
  https://donate.libreoffice.org/


core.git: sfx2/source

2024-02-28 Thread Stephan Bergmann (via logerrit)
 sfx2/source/view/viewfrm.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c39b832e85ae9e172f51c77c40d74949afcc0ac3
Author: Stephan Bergmann 
AuthorDate: Wed Feb 28 16:33:59 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 29 07:54:30 2024 +0100

Avoid -Werror,-Wunused-but-set-variable for ENABLE_WASM_STRIP_PINGUSER

...after 607740654f2264e13469e4da1d020448217d7222 "Resolves tdf#131550 -
Suppress Donate/Involve infobar if another is visible"

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

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 31fd9471455c..20e56a6c4076 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1714,6 +1714,8 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint )
 officecfg::Setup::Product::LastTimeDonateShown::set(nNow, 
batch);
 batch->commit();
 }
+#else
+(void) bIsInfobarShown;
 #endif
 
 break;


core.git: udkapi/org udkapi/UnoApi_udkapi.mk unotest/source

2024-02-28 Thread Stephan Bergmann (via logerrit)
 udkapi/UnoApi_udkapi.mk |1 +
 udkapi/org/libreoffice/embindtest/Enum.idl  |   21 +
 udkapi/org/libreoffice/embindtest/XTest.idl |4 
 unotest/source/embindtest/embindtest.cxx|   26 ++
 unotest/source/embindtest/embindtest.js |   16 
 5 files changed, 68 insertions(+)

New commits:
commit 6cc09586f583e6509cf7bda052f365ddc3bca16e
Author: Stephan Bergmann 
AuthorDate: Wed Feb 28 15:50:35 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 29 07:54:11 2024 +0100

Test Embind'ing of UNO enums

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

diff --git a/udkapi/UnoApi_udkapi.mk b/udkapi/UnoApi_udkapi.mk
index 15164a798006..34117950d64e 100644
--- a/udkapi/UnoApi_udkapi.mk
+++ b/udkapi/UnoApi_udkapi.mk
@@ -523,6 +523,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,udkapi,com/sun/star/util,\
 ifeq ($(OS)-$(ENABLE_DBGUTIL),EMSCRIPTEN-TRUE)
 $(eval $(call gb_UnoApi_add_idlfiles,udkapi,org/libreoffice/embindtest, \
 Constants \
+Enum \
 Struct \
 XTest \
 ))
diff --git a/udkapi/org/libreoffice/embindtest/Enum.idl 
b/udkapi/org/libreoffice/embindtest/Enum.idl
new file mode 100644
index ..9056687aa0a6
--- /dev/null
+++ b/udkapi/org/libreoffice/embindtest/Enum.idl
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+module org { module libreoffice { module embindtest {
+
+enum Enum {
+E_10 = -10,
+E_2 = -2,
+E1 = 1,
+E3 = 3
+};
+
+}; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/udkapi/org/libreoffice/embindtest/XTest.idl 
b/udkapi/org/libreoffice/embindtest/XTest.idl
index 36aae5c7c394..f64a3857e863 100644
--- a/udkapi/org/libreoffice/embindtest/XTest.idl
+++ b/udkapi/org/libreoffice/embindtest/XTest.idl
@@ -34,6 +34,8 @@ interface XTest {
 boolean isChar([in] char value);
 string getString();
 boolean isString([in] string value);
+Enum getEnum();
+boolean isEnum([in] Enum value);
 Struct getStruct();
 boolean isStruct([in] Struct value);
 sequence getSequenceBoolean();
@@ -62,6 +64,8 @@ interface XTest {
 boolean isSequenceString([in] sequence value);
 sequence > getSequenceSequenceString();
 boolean isSequenceSequenceString([in] sequence > value);
+sequence getSequenceEnum();
+boolean isSequenceEnum([in] sequence value);
 sequence getSequenceStruct();
 boolean isSequenceStruct([in] sequence value);
 };
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 152afe551e5b..2a9cdfc4de3a 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -76,6 +76,16 @@ public:
 
 sal_Bool SAL_CALL isString(OUString const& value) override { return value 
== u"hä"; }
 
+org::libreoffice::embindtest::Enum SAL_CALL getEnum() override
+{
+return org::libreoffice::embindtest::Enum_E_2;
+}
+
+sal_Bool SAL_CALL isEnum(org::libreoffice::embindtest::Enum value) override
+{
+return value == org::libreoffice::embindtest::Enum_E_2;
+}
+
 org::libreoffice::embindtest::Struct SAL_CALL getStruct() override
 {
 return { -123456, 100.5, u"hä"_ustr };
@@ -217,6 +227,22 @@ public:
 { 
u"baz"_ustr } };
 }
 
+css::uno::Sequence SAL_CALL 
getSequenceEnum() override
+{
+return { org::libreoffice::embindtest::Enum_E_2, 
org::libreoffice::embindtest::Enum_E3,
+ org::libreoffice::embindtest::Enum_E_10 };
+}
+
+sal_Bool SAL_CALL
+isSequenceEnum(css::uno::Sequence 
const& value) override
+{
+return value
+   == css::uno::Sequence{
+  org::libreoffice::embindtest::Enum_E_2, 
org::libreoffice::embindtest::Enum_E3,
+  org::libreoffice::embindtest::Enum_E_10
+  };
+}
+
 css::uno::Sequence SAL_CALL 
getSequenceStruct() override
 {
 return { { -123456, -100.5, u"foo"_ustr },
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 4eb9e60832e6..1978c9cc4ec7 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -84,6 +84,12 @@ Module.addOnPostRun(function() {
 console.assert(v === 'hä');
 console.

core.git: static/source udkapi/org udkapi/UnoApi_udkapi.mk unotest/source

2024-02-28 Thread Stephan Bergmann (via logerrit)
 static/source/embindmaker/embindmaker.cxx   |   62 +---
 udkapi/UnoApi_udkapi.mk |1 
 udkapi/org/libreoffice/embindtest/Constants.idl |   27 ++
 unotest/source/embindtest/embindtest.js |   20 +++
 4 files changed, 104 insertions(+), 6 deletions(-)

New commits:
commit 6064939d40119877eb65d5f0ce80f65d9fac53da
Author: Stephan Bergmann 
AuthorDate: Wed Feb 28 14:57:35 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 29 07:53:54 2024 +0100

Embind support for constant groups

The constants are only reflected directly as JS values in the generated *.js
file.  Reflecting them via emscripten::constant in the generated *.cxx did 
not
work well:  Most importantly, emscripten::constant (and its underlying
_embind_register_constant) coerce all values to double, so UNO (unsigned) 
hyper
would not survive as JS BigInt, which would then cause e.g.

> 
console.assert(test.isHyper(uno.org.libreoffice.embindtest.Constants.Hyper));

passing such a (JS number, not BigInt) value into the
org.libreoffice.embindtest.XTest::isHyper method (which expects a UNO 
hyper) to
fail.  (Also, constants of UNO boolean type would be represented as numbers 
0/1
rather than as false/true.)

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

diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index 37175d100cdf..89fdf834ea1d 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -169,17 +170,66 @@ void scan(rtl::Reference const& 
cursor, std::u16string_view p
 break;
 }
 case unoidl::Entity::SORT_ENUM_TYPE:
-module->mappings.emplace_back(id, "uno_Type_" + jsName(name));
+module->mappings.emplace_back(id, "instance.uno_Type_" + 
jsName(name));
 enums.emplace_back(name);
 break;
 case unoidl::Entity::SORT_PLAIN_STRUCT_TYPE:
-module->mappings.emplace_back(id, "uno_Type_" + jsName(name));
+module->mappings.emplace_back(id, "instance.uno_Type_" + 
jsName(name));
 structs.emplace_back(name);
 break;
 case unoidl::Entity::SORT_INTERFACE_TYPE:
-module->mappings.emplace_back(id, "uno_Type_" + jsName(name));
+module->mappings.emplace_back(id, "instance.uno_Type_" + 
jsName(name));
 interfaces.emplace_back(name);
 break;
+case unoidl::Entity::SORT_CONSTANT_GROUP:
+{
+auto const& members
+= 
static_cast(ent.get())->getMembers();
+if (!members.empty())
+{
+auto sub = std::make_shared();
+for (auto const& member : members)
+{
+OUString value;
+switch (member.value.type)
+{
+case unoidl::ConstantValue::TYPE_BOOLEAN:
+value = member.value.booleanValue ? 
u"true"_ustr : u"false"_ustr;
+break;
+case unoidl::ConstantValue::TYPE_BYTE:
+value = 
OUString::number(member.value.byteValue);
+break;
+case unoidl::ConstantValue::TYPE_SHORT:
+value = 
OUString::number(member.value.shortValue);
+break;
+case unoidl::ConstantValue::TYPE_UNSIGNED_SHORT:
+value = 
OUString::number(member.value.unsignedShortValue);
+break;
+case unoidl::ConstantValue::TYPE_LONG:
+value = 
OUString::number(member.value.longValue);
+break;
+case unoidl::ConstantValue::TYPE_UNSIGNED_LONG:
+value = 
OUString::number(member.value.unsignedLongValue);
+break;
+case unoidl::ConstantValue::TYPE_HYPER:
+value = 
OUString::number(member.value.hyperValue) + "n";
+break;
+case unoidl::ConstantValue::TYPE_UNSIGNED_HYPER:
+value = 
OUString::number(member.va

core.git: unoidl/source

2024-02-28 Thread Stephan Bergmann (via logerrit)
 unoidl/source/sourcetreeprovider.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 741f88c9ec38becafba48477abbcfd500fcdc8e1
Author: Stephan Bergmann 
AuthorDate: Wed Feb 28 14:05:36 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 28 16:01:38 2024 +0100

Some improvements to the UNOIDL SourceTreeProvider

Trying to do

$ instdir/sdk/bin/unoidl-read udkapi

(i.e., parsing the udkapi/com/sun/star/**.idl tree and printing it out): 
first
failed with

> Bad input : 
source file defines more than one entity

because of its

> published interface XIntrospection;

forward declaration, so ignore such interface forward declarations; then 
failed
with

> Bad input : source file 
defines no entity

because "this file contains documentation of the modules", so ignore such
effectively empty files; then failed with

> Bad input : source file 
defines more than one entity

so instead do

$ mkdir TMP
$ cp -r udkapi/com TMP/
$ instdir/sdk/bin/unoidl-read TMP
$ rm -r TMP

which succeeded.

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

diff --git a/unoidl/source/sourcetreeprovider.cxx 
b/unoidl/source/sourcetreeprovider.cxx
index 629e50fbf8f3..852a5a9bb30d 100644
--- a/unoidl/source/sourcetreeprovider.cxx
+++ b/unoidl/source/sourcetreeprovider.cxx
@@ -195,8 +195,7 @@ rtl::Reference Cursor::getNext(OUString * name) {
 }
 auto ent = data.entities.end();
 for (auto j = data.entities.begin(); j != 
data.entities.end(); ++j) {
-if (j->second.kind == 
SourceProviderEntity::KIND_EXTERNAL
-|| j->second.kind == 
SourceProviderEntity::KIND_MODULE)
+if (j->second.kind != SourceProviderEntity::KIND_LOCAL)
 {
 continue;
 }
@@ -207,8 +206,10 @@ rtl::Reference Cursor::getNext(OUString * name) {
 ent = j;
 }
 if (ent == data.entities.end()) {
-throw FileFormatException(
-stat.getFileURL(), "source file defines no 
entity");
+SAL_INFO(
+"unoidl",
+"source file <" << stat.getFileURL() << "> defines 
no entity");
+continue;
 }
 //TODO: Check that the entity's name matches the suffix of 
stat.getFileURL():
 *name = ent->first.copy(ent->first.lastIndexOf('.') + 1);


core.git: unoidl/source

2024-02-28 Thread Stephan Bergmann (via logerrit)
 unoidl/source/unoidl-write.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1037edf4ec9bd2d17b2b39aab47a162b17335b96
Author: Stephan Bergmann 
AuthorDate: Wed Feb 28 14:29:02 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 28 15:47:03 2024 +0100

Fix copy/paste error

...that had caused unoidl-write to generate garbage values when writing
constants of type double to binary type libraries.  (But which had 
apparently
gone largely unnoticed until now, as the only actual use so far of such a
constant of type double that I could find is

> const doubleaConstDouble= 3.14e-10;

in the unused stoc/test/testcorefl.idl test file.)

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

diff --git a/unoidl/source/unoidl-write.cxx b/unoidl/source/unoidl-write.cxx
index 042b72c0471e..39a16f6c116c 100644
--- a/unoidl/source/unoidl-write.cxx
+++ b/unoidl/source/unoidl-write.cxx
@@ -188,7 +188,7 @@ void writeIso60599Binary32(osl::File & file, float value) {
 void writeIso60599Binary64(osl::File & file, double value) {
 union {
 unsigned char buf[8];
-float d; // assuming double is ISO 60599 binary64
+double d; // assuming double is ISO 60599 binary64
 } sa;
 sa.d = value;
 #if defined OSL_BIGENDIAN


core.git: svx/source

2024-02-27 Thread Stephan Bergmann (via logerrit)
 svx/source/sdr/contact/objectcontactofpageview.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ef6798919a514fc0043f4cd050ffb244696bbda3
Author: Stephan Bergmann 
AuthorDate: Tue Feb 27 10:27:25 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 28 08:47:33 2024 +0100

Avoid calling back into an SdrMarkView that is being destroyed

The recently added CppunitTest_sc_tiledrendering
CPPUNIT_TEST_NAME=testEditShapeText::TestBody had started to cause

> svx/source/svdraw/sdrpagewindow.cxx:471:56: runtime error: member call on 
address 0x51dc4480 which does not point to an object of type 'SdrMarkView'
> 0x51dc4480: note: object is of type 'SdrPaintView'
>  00 00 00 00  30 1f 13 bc ca 7f 00 00  00 00 00 00 00 00 00 00  00 00 00 
00 00 00 00 00  03 00 00 00
>   ^~~
>   vptr for 'SdrPaintView'
>  #0 in SdrPageWindow::InvalidatePageWindow(basegfx::B2DRange const&) at 
svx/source/svdraw/sdrpagewindow.cxx:471:56
>  #1 in 
sdr::contact::ObjectContactOfPageView::InvalidatePartOfView(basegfx::B2DRange 
const&) const at svx/source/sdr/contact/objectcontactofpageview.cxx:357:29
>  #2 in sdr::contact::ViewObjectContact::triggerLazyInvalidate() at 
svx/source/sdr/contact/viewobjectcontact.cxx:267:28
>  #3 in sdr::contact::ObjectContactOfPageView::Invoke() at 
svx/source/sdr/contact/objectcontactofpageview.cxx:105:29
>  #4 in sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() 
at svx/source/sdr/contact/objectcontactofpageview.cxx:74:13
>  #5 in sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() 
at svx/source/sdr/contact/objectcontactofpageview.cxx:72:9
>  #6 in SdrPageWindow::ResetObjectContact() at 
svx/source/svdraw/sdrpagewindow.cxx:520:9
>  #7 in SdrPageWindow::~SdrPageWindow() at 
svx/source/svdraw/sdrpagewindow.cxx:130:5
>  #8 in std::default_delete::operator()(SdrPageWindow*) 
const at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2
>  #9 in std::unique_ptr>::~unique_ptr() at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:398:4
>  #10 in void std::destroy_at>>(std::unique_ptr>*) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:88:15
>  #11 in void std::_Destroy>>(std::unique_ptr>*) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:149:7
>  #12 in void 
std::_Destroy_aux::__destroy>*>(std::unique_ptr>*, std::unique_ptr>*) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:163:6
>  #13 in void std::_Destroy>*>(std::unique_ptr>*, std::unique_ptr>*) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:195:7
>  #14 in void std::_Destroy>*, std::unique_ptr>>(std::unique_ptr>*, std::unique_ptr>*, 
std::allocator>>&) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/alloc_traits.h:941:7
>  #15 in std::__cxx1998::vector>, 
std::allocator>>>::~vector() at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_vector.h:732:2
>  #16 in std::__debug::vector>, 
std::allocator>>>::~vector() at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/debug/vector:245:25
>  #17 in SdrPageView::~SdrPageView() at svx/source/svdraw/svdpagv.cxx:122:1
>  #18 in std::default_delete::operator()(SdrPageView*) const 
at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2
>  #19 in std::__uniq_ptr_impl>::reset(SdrPageView*) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:205:4
>  #20 in std::unique_ptr>::reset(SdrPageView*) at 
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:503:7
>  #21 in SdrPaintView::ClearPageView() at 
svx/source/svdraw/svdpntv.cxx:356:20
>  #22 in SdrPaintView::~SdrPaintView() at 
svx/source/svdraw/svdpntv.cxx:189:5
>  #23 in SdrSnapView::~SdrSnapView() at svx/source/svdraw/svdsnpv.cxx:199:1
>  #24 in SdrMarkView::~SdrMarkView() at svx/source/svdraw/svdmrkv.cxx:197:1
>  #25 in SdrEditView::~SdrEditView() at svx/source/svdraw/svdedtv.cxx:126:1
>  #26 in SdrPolyEditView::~SdrPolyEditView() at 
svx/source/svdraw/svdpoev.cxx:58:1
>  #27 in SdrGlueEditView::~SdrGlueEditView() at 
svx/source/svdraw/svdglev.cxx:40:1
>  #28 in SdrObjEditView::~SdrObjEditView() at 
svx/source/svdraw/svdedxv.cxx:101

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

2024-02-27 Thread Stephan Bergmann (via logerrit)
 static/README.wasm.md |8 
 static/source/embindmaker/embindmaker.cxx |3 +--
 unotest/source/embindtest/embindtest.js   |5 ++---
 3 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 621322b6ac0bebab2f904b7fe8d040193a1f45ba
Author: Stephan Bergmann 
AuthorDate: Tue Feb 27 21:59:37 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 28 07:53:41 2024 +0100

Generate slightly more flexible JS init_unoembind_* functions

...that return the "hierarchical object", rather than setting it as a 
member of
the passed-in instance

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

diff --git a/static/README.wasm.md b/static/README.wasm.md
index e37242508b72..f2abc8219ce8 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -223,8 +223,8 @@ improvement! ;)
 Some usage examples through javascript of the current implementation:
 ```js
 // inserts a string at the start of the Writer document.
-init_unoembind_uno(Module);
-let css = Module.unoembind_uno.com.sun.star;
+let uno = init_unoembind_uno(Module);
+let css = uno.com.sun.star;
 xModel = Module.getCurrentModelFromViewSh();
 xTextDocument = new css.text.XTextDocument(xModel.$query());
 xText = xTextDocument.getText();
@@ -238,8 +238,8 @@ xModel.delete(); xTextDocument.delete(); xText.delete(); 
xSimpleText.delete(); x
 
 ```js
 // changes each paragraph of the Writer document to a random color.
-init_unoembind_uno(Module);
-let css = Module.unoembind_uno.com.sun.star;
+let uno = init_unoembind_uno(Module);
+let css = uno.com.sun.star;
 xModel = Module.getCurrentModelFromViewSh();
 xEnumAccess = new css.container.XEnumerationAccess(xText.$query());
 xParaEnumeration = xEnumAccess.createEnumeration();
diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index 335b7983503c..37175d100cdf 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -955,8 +955,7 @@ SAL_IMPLEMENT_MAIN()
 }
 jsOut << "function init_unoembind_" << name
   << "(instance) {
"
- "instance.unoembind_"
-  << name << " = {
";
+ "return {
";
 writeJsMap(jsOut, *module, "");
 jsOut << "};
"
  "};
";
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 3d3196cc4c39..146be3fa545a 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -9,9 +9,8 @@
 
 Module.addOnPostRun(function() {
 console.log('Running embindtest');
-init_unoembind_uno(Module);
-let test = new Module.unoembind_uno.org.libreoffice.embindtest.Test(
-Module.getUnoComponentContext());
+let uno = init_unoembind_uno(Module);
+let test = new 
uno.org.libreoffice.embindtest.Test(Module.getUnoComponentContext());
 console.assert(typeof test === 'object');
 {
 let v = test.getBoolean();


core.git: desktop/Library_sofficeapp.mk desktop/source static/CustomTarget_unoembind.mk static/source

2024-02-27 Thread Stephan Bergmann (via logerrit)
 desktop/Library_sofficeapp.mk |6 ++
 desktop/source/app/appinit.cxx|7 +++
 static/CustomTarget_unoembind.mk  |8 
 static/source/embindmaker/embindmaker.cxx |   30 ++
 4 files changed, 39 insertions(+), 12 deletions(-)

New commits:
commit c7664f12a99b6e08eb334d63646c3d2a6aa75e18
Author: Stephan Bergmann 
AuthorDate: Tue Feb 27 16:30:24 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 28 07:53:21 2024 +0100

Init Embind-ings manually, once UNO is set up

Upcoming code that changes the Embind'ing of UNO sequences will require
availability of the UNO type manager during that Embind init code, so only 
call
that after UNO has been bootstrapped (rather than as part of the 
initialization
of global static data, which is what EMSCRIPTEN_BINDINGS does).

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

diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 641efda7eda2..cc39ccd12f92 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -37,6 +37,12 @@ $(eval $(call gb_Library_use_custom_headers,sofficeapp,\
officecfg/registry \
 ))
 
+ifeq ($(OS),EMSCRIPTEN)
+$(eval $(call gb_Library_use_custom_headers,sofficeapp, \
+static/unoembind \
+))
+endif
+
 $(eval $(call gb_Library_use_api,sofficeapp,\
udkapi \
offapi \
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 51b466c6b980..1a0681f0d163 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -45,6 +45,10 @@
 #include 
 #include 
 
+#if defined EMSCRIPTEN
+#include 
+#endif
+
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
@@ -83,6 +87,9 @@ void Desktop::InitApplicationServiceManager()
 UNO_QUERY_THROW);
 #endif
 comphelper::setProcessServiceFactory(sm);
+#if defined EMSCRIPTEN
+init_unoembind_uno();
+#endif
 }
 
 void Desktop::RegisterServices()
diff --git a/static/CustomTarget_unoembind.mk b/static/CustomTarget_unoembind.mk
index 045e0fea511c..d1bc294e0b9f 100644
--- a/static/CustomTarget_unoembind.mk
+++ b/static/CustomTarget_unoembind.mk
@@ -15,14 +15,14 @@ $(eval $(call 
gb_CustomTarget_register_targets,static/unoembind, \
 ))
 
 $(call gb_CustomTarget_get_workdir,static/unoembind)/bindings_uno.cxx \
+$(call gb_CustomTarget_get_workdir,static/unoembind)/bindings_uno.hxx \
 $(call gb_CustomTarget_get_workdir,static/unoembind)/bindings_uno.js: \
 $(call gb_Executable_get_target_for_build,embindmaker) $(call 
gb_UnoApi_get_target,udkapi) \
-$(call gb_UnoApi_get_target,offapi) \
-$(if $(ENABLE_DBGUTIL),$(call gb_UnoApiTarget_get_target,embindtest))
+$(call gb_UnoApi_get_target,offapi)
$(call gb_Executable_get_command,embindmaker) uno \
 $(call gb_CustomTarget_get_workdir,static/unoembind)/bindings_uno.cxx \
+$(call gb_CustomTarget_get_workdir,static/unoembind)/bindings_uno.hxx \
 $(call gb_CustomTarget_get_workdir,static/unoembind)/bindings_uno.js \
-+$(call gb_UnoApi_get_target,udkapi) +$(call 
gb_UnoApi_get_target,offapi) \
-+$(if $(ENABLE_DBGUTIL),$(call gb_UnoApiTarget_get_target,embindtest))
++$(call gb_UnoApi_get_target,udkapi) +$(call 
gb_UnoApi_get_target,offapi)
 
 # vim: set noet sw=4 ts=4:
diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index bff11e99b16d..335b7983503c 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -46,13 +46,13 @@ void badUsage()
 {
 std::cerr
 << "Usage:

"
-   "  embindmaker

"
+   "  embindmaker 


"
"where each  is '+' (primary) or ':' (secondary), 
followed by: either a
"
"new- or legacy-format .rdb file, a single .idl file, or a root 
directory of an
"
".idl file tree.  For all primary registries, Embind code is 
written to
"
-   " and corresponding JavaScript scaffolding code is 
written to
"
-   ".  The  is used as part of some of the 
identifiers in those
"
-   "generated files.
";
+   "/ and corresponding JavaScript scaffolding 
code is
"
+   "written to .  The  is used as part of some of the 
identifiers
"
+   "in those generated files.
";
 std::exit(EXIT_FAILURE);
 }
 
@@ -708,16 +708,17 @@ SAL_IMPLEMENT_MAIN()
 try
 {
 auto const args = rtl_getAppCommandArgCount();
-if (args < 3)
+if (args < 4)
 {
 badUsage();
 }
 

core.git: solenv/gbuild

2024-02-27 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/UnoApiTarget.mk |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 4c20fb09d7fe6c2f4cdb672a6238c8ddb67aa437
Author: Stephan Bergmann 
AuthorDate: Tue Feb 27 21:09:03 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 28 07:52:29 2024 +0100

Revert "gbuild: WASM: try to fix "Missing generated source file 
*_embind.cxx""

This reverts commit e4717342e5bea23f590a42d565a09ace600e2ca5.  cppumaker no
longer generates *_embind.cxx files since
b2ade3e63e34556cad8157e25f8c75d29e79537d "Extract embindmaker from cppumaker
into its own tool ...that directly generates one large .cxx."

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

diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index e79247172851..ec32b5c5fea8 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -216,11 +216,6 @@ $(call 
gb_UnoApiHeadersTarget_get_real_comprehensive_dir,$(1))/%.hpp : \
| $(call 
gb_UnoApiHeadersTarget_get_real_comprehensive_target,$(1))
touch $$@
 
-$(call gb_UnoApiHeadersTarget_get_real_comprehensive_dir,$(1))/%_embind.cxx : \
-   $(call gb_Executable_get_target_for_build,cppumaker) \
-   | $(call 
gb_UnoApiHeadersTarget_get_real_comprehensive_target,$(1))
-   touch $$@
-
 endef
 
 # ensure that idl change triggers the dummy rule to rebuild the headers


core.git: sw/source

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

New commits:
commit c1b5607264e3bafeb35df80c16664f2bddf33c2b
Author: Stephan Bergmann 
AuthorDate: Tue Feb 27 11:29:52 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 27 17:42:53 2024 +0100

Fix UBSan build's RTTI needs

...after 3ba92b5f1eaf7d4447a0943ea260db515ca799dc "hide more symbols" had 
caused
CppunitTest_sw_uiwriter to fail with

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

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

diff --git a/sw/source/core/inc/UndoManager.hxx 
b/sw/source/core/inc/UndoManager.hxx
index 5d292ce995b7..0993cdf5c656 100644
--- a/sw/source/core/inc/UndoManager.hxx
+++ b/sw/source/core/inc/UndoManager.hxx
@@ -38,7 +38,7 @@ namespace sw {
  * It contains a stack of SwUndo actions, each of which represents one 
user-visible
  * undo / redo step.
  */
-class UndoManager final
+class SAL_DLLPUBLIC_RTTI UndoManager final
 : public IDocumentUndoRedo
 , public SdrUndoManager
 {


core.git: solenv/gbuild

2024-02-26 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/CppunitTest.mk |5 -
 1 file changed, 5 deletions(-)

New commits:
commit c29d1d968acd53bd957eedc0d93bfaa620fc862b
Author: Stephan Bergmann 
AuthorDate: Mon Feb 26 22:15:27 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 27 07:56:12 2024 +0100

Remove unused gb_CppunitTest_localized_run

...that appears to be unused ever since it got introduced in
d8a8ed04b14390d4469ea19b079778fa6f074bb2 "gbuild allow unitest to run once 
per
lang in WITH_LANG_LIST"

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

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 287ec84eb6c5..cfca2bbbf570 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -282,11 +282,6 @@ $(call gb_CppunitTest__use_vcl,$(1),$(false))
 
 endef
 
-define gb_CppunitTest_localized_run
-$(call gb_CppunitTest_get_target,$(1)) : gb_CppunitTest_localized := $(true)
-
-endef
-
 define gb_CppunitTest__use_api
 $(call gb_CppunitTest_get_target,$(1)) : $(call gb_UnoApi_get_target,$(2))
 $(call gb_CppunitTest_get_target,$(1)) : UNO_TYPES += $(call 
gb_UnoApi_get_target,$(2))


core.git: solenv/gbuild

2024-02-26 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/CppunitTest.mk |   19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

New commits:
commit bd3dc6fc18a6360929e3427abccc572950d0aa8e
Author: Stephan Bergmann 
AuthorDate: Mon Feb 26 20:58:08 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 26 22:25:27 2024 +0100

Fix --enable-coredumpctl in CppunitTest

...which 533e993f2d11814252c40d60bdab469de03b14db "Don't reuse --unit values
across (sequential, even) systemd-run invocations" had broken by moving the
setting of the LIBO_TEST_UNIT var to a place where the use of that env var 
would
no longer see it.

Fix it by making the individual LO_TEST_LOCALE=* tests of
gb_CppunitTest_localized more autonomous.  Each one now has an individual 
log
file and gets an individual gb_CppunitTest_postprocess treatment.

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

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index fc7351986b09..287ec84eb6c5 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -135,10 +135,10 @@ else
$(if $(gb_CppunitTest__interactive),, \
$(if $(value gb_CppunitTest_postprocess), \
rm -fr $@.core && mkdir $@.core && cd $@.core 
&&)) \
-   ( \
-   $(if $(gb_CppunitTest_localized),for l in $(WITH_LANG_LIST) ; 
do \
-   printf 'LO_TEST_LOCALE=%s
' "$$l" && ) \
+   $(if $(gb_CppunitTest_localized),for l in $(WITH_LANG_LIST) ; 
do) \
$(call gb_CppunitTest_coredumpctl_setup,$@,$(if 
$(gb_CppunitTest_localized),$$l)) \
+   ( \
+   $(if $(gb_CppunitTest_localized),printf 'LO_TEST_LOCALE=%s
' "$$l" && ) \
$(if $(gb_CppunitTest_localized),LO_TEST_LOCALE="$$l") \
$(if $(gb_CppunitTest__vcl_no_svp), \
$(filter-out 
SAL_USE_VCLPLUGIN=svp,$(gb_TEST_ENV_VARS)),$(gb_TEST_ENV_VARS)) \
@@ -157,14 +157,15 @@ else
$(gb_CppunitTest_CPPTESTCOMMAND) \
$(call gb_CppunitTest_get_linktarget_target,$*) \
$(call gb_CppunitTest__make_args) "-env:CPPUNITTESTTARGET=$@" \
-   $(if $(gb_CppunitTest_localized),|| exit $$?; done) \
) \
-   $(if $(gb_CppunitTest__interactive),, \
-   > $@.log 2>&1 \
-   || ($(if $(value gb_CppunitTest_postprocess), \
+   $(if $(gb_CppunitTest__interactive),$(if 
$(gb_CppunitTest_localized),|| exit $$?), \
+   > $@.$(if $(gb_CppunitTest_localized),$$l.)log 2>&1 \
+   || { $(if $(value gb_CppunitTest_postprocess), \
RET=$$?; \
-   $(call 
gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core,$$RET) >> 
$@.log 2>&1;) \
-   cat $@.log; $(gb_CppunitTest_UNITTESTFAILED) 
Cppunit $*)))
+   $(call 
gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core,$$RET) >> 
$@.$(if $(gb_CppunitTest_localized),$$l.)log 2>&1;) \
+   cat $@.$(if 
$(gb_CppunitTest_localized),$$l.)log; $(gb_CppunitTest_UNITTESTFAILED) Cppunit 
$*; \
+   $(if $(gb_CppunitTest_localized),exit $$RET;) } 
) \
+   $(if $(gb_CppunitTest_localized),; done))
$(call gb_Trace_EndRange,$*,CUT)
 endif
 


core.git: static/source

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

New commits:
commit dde9f306a2930922fa04eb294995f8f36c5a5592
Author: Stephan Bergmann 
AuthorDate: Mon Feb 26 13:21:34 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 26 14:24:23 2024 +0100

Fix copy/paste error

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index a8e1000afd6f..186e3ee88057 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -27,7 +27,7 @@ EM_JS(void, jsRegisterChar, (std::type_info const* raw),
 // clang-format off
 {
 Module.registerType(raw, {
-name: 'rtl::OUString',
+name: 'sal_Unicode',
 fromWireType(ptr) {
 let str = String.fromCharCode(Module.HEAPU16[ptr >> 1]);
 return str;


core.git: external/freetype

2024-02-25 Thread Stephan Bergmann (via logerrit)
 external/freetype/ubsan.patch |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 9a8f4fb40867889bb08e4c5e1a89f2dbbf27681a
Author: Stephan Bergmann 
AuthorDate: Sun Feb 25 21:50:07 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 26 08:06:12 2024 +0100

external/freetype: nullptr-with-offset

...as seen during CppunitTest_xmloff_style,

> workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1048:31: runtime 
error: applying zero offset to null pointer
>  #0 in tt_var_get_item_delta at 
workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1048:31
>  #1 in tt_hvadvance_adjust at 
workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1242:13
>  #2 in tt_vadvance_adjust at 
workdir/UnpackedTarball/freetype/src/truetype/ttgxvar.c:1278:12
>  #3 in tt_face_get_metrics at 
workdir/UnpackedTarball/freetype/src/sfnt/ttmtx.c:319:11
>  #4 in cff_slot_load at 
workdir/UnpackedTarball/freetype/src/cff/cffgload.c:660:11
>  #5 in cff_glyph_load at 
workdir/UnpackedTarball/freetype/src/cff/cffdrivr.c:192:13
>  #6 in FT_Load_Glyph at 
workdir/UnpackedTarball/freetype/src/base/ftobjs.c:1066:15
>  #7 in _cairo_ft_scaled_glyph_load_glyph at 
workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2455:13
>  #8 in _cairo_ft_scaled_glyph_init at 
workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2640:11
>  #9 in _cairo_scaled_glyph_lookup at 
workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:3035:6
>  #10 in _cairo_scaled_font_glyph_device_extents at 
workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:2250:15
>  #11 in _cairo_composite_rectangles_init_for_glyphs at 
workdir/UnpackedTarball/cairo/src/cairo-composite-rectangles.c:476:14
>  #12 in _cairo_compositor_glyphs at 
workdir/UnpackedTarball/cairo/src/cairo-compositor.c:280:14
>  #13 in _cairo_image_surface_glyphs at 
workdir/UnpackedTarball/cairo/src/cairo-image-surface.c:1030:12
>  #14 in _cairo_surface_show_text_glyphs at 
workdir/UnpackedTarball/cairo/src/cairo-surface.c:2920:15
>  #15 in _cairo_gstate_show_text_glyphs at 
workdir/UnpackedTarball/cairo/src/cairo-gstate.c:2077:15
>  #16 in _cairo_default_context_glyphs at 
workdir/UnpackedTarball/cairo/src/cairo-default-context.c:1334:12
>  #17 in cairo_show_glyphs at 
workdir/UnpackedTarball/cairo/src/cairo.c:3670:14
>  #18 in CairoTextRender::DrawTextLayout(GenericSalLayout const&, 
SalGraphics const&) at vcl/unx/generic/gdi/cairotextrender.cxx:477:9
>  #19 in SvpSalGraphics::DrawTextLayout(GenericSalLayout const&) at 
vcl/headless/svptext.cxx:72:23
>  #20 in GenericSalLayout::DrawText(SalGraphics&) const at 
vcl/source/gdi/CommonSalLayout.cxx:171:18
>  #21 in OutputDevice::ImplDrawTextDirect(SalLayout&, bool) at 
vcl/source/outdev/text.cxx:312:16
>  #22 in OutputDevice::ImplDrawText(SalLayout&) at 
vcl/source/outdev/text.cxx:463:9
>  #23 in OutputDevice::DrawTextArray(Point const&, rtl::OUString const&, 
KernArraySpan, std::span, int, 
int, SalLayoutFlags, SalLayoutGlyphs const*) at vcl/source/outdev/text.cxx:701:9
>  #24 in SwFntObj::DrawText(SwDrawTextInfo&) at 
sw/source/core/txtnode/fntcache.cxx:1490:31
>  #25 in SwSubFont::DrawText_(SwDrawTextInfo&, bool) at 
sw/source/core/txtnode/swfont.cxx:1144:24
>  #26 in SwFont::DrawText_(SwDrawTextInfo&) at 
sw/source/core/inc/swfont.hxx:324:29
>  #27 in SwTextPaintInfo::DrawText_(rtl::OUString const&, SwLinePortion 
const&, o3tl::strong_int, o3tl::strong_int, bool, bool, bool, bool) at 
sw/source/core/text/inftxt.cxx:730:21
>  #28 in SwTextPaintInfo::DrawText(SwLinePortion const&, 
o3tl::strong_int, bool) const at 
sw/source/core/text/inftxt.hxx:783:41
>  #29 in SwTextPortion::Paint(SwTextPaintInfo const&) const at 
sw/source/core/text/portxt.cxx:603:18
>  #30 in SwTextPainter::DrawTextLine(SwRect const&, SwSaveClip&, bool, 
std::optional&, std::optional&, bool) at 
sw/source/core/text/itrpaint.cxx:433:23
>  #31 in SwTextFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at 
sw/source/core/text/frmpaint.cxx:787:23
>  #32 in SwLayoutFrame::PaintSwFrame(OutputDevice&, SwRect const&) const 
at sw/source/core/layout/paintfrm.cxx:3804:21
>  #33 in SwFlyFrame::PaintSwFrame(OutputDevice&, SwRect const&) const at 
sw/source/core/layout/paintfrm.cxx:4507:20
>  #34 in 
SwVirtFlyDrawObj::wrap_DoPaintObject(drawinglayer::geometry::ViewInformation2D 
const&) const at sw/source/core/draw/dflyobj.cxx:541:18
>  #35 in drawinglayer::primitive2d::(anonymous 
namespace)::SwVirtFlyDrawObjPrimitive::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&,
 drawinglayer::geometry::ViewInformation2D const&) const at 
sw/sou

core.git: Repository.mk static/emscripten static/Module_static.mk static/Package_favicon.mk

2024-02-23 Thread Stephan Bergmann (via logerrit)
 Repository.mk |5 -
 static/Module_static.mk   |1 +
 static/Package_favicon.mk |   16 
 static/emscripten/favicon.ico |binary
 4 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit eb35b4293ebcd322cb13ffe19913841a8c99b3dd
Author: Stephan Bergmann 
AuthorDate: Fri Feb 23 14:07:04 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Feb 24 00:06:13 2024 +0100

Add a favicon to the Wasm build

...to avoid "GET http://localhost:6931/favicon.ico 404 (File not found:
instdir/program/favicon.ico)" errors in the browser console.  The checked-in
static/emscripten/favicon.ico is a copy of
<https://www.libreoffice.org/themes/libreofficenew/favicon.ico>.

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

diff --git a/Repository.mk b/Repository.mk
index 814ca2edb77b..c0d86f868971 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1033,7 +1033,10 @@ $(eval $(call 
gb_Helper_register_packages_for_install,ooo,\
) \
resource_fonts \
cui \
-   $(if $(filter EMSCRIPTEN,$(OS)),unoembind) \
+   $(if $(filter EMSCRIPTEN,$(OS)), \
+   favicon \
+   unoembind \
+   ) \
 ))
 
 $(eval $(call gb_Helper_register_packages_for_install,ooo_fonts,\
diff --git a/static/Module_static.mk b/static/Module_static.mk
index c91441a6b924..ff036fac3213 100644
--- a/static/Module_static.mk
+++ b/static/Module_static.mk
@@ -19,6 +19,7 @@ ifeq (EMSCRIPTEN,$(OS))
 $(eval $(call gb_Module_add_targets,static,\
 CustomTarget_emscripten_fs_image \
 CustomTarget_unoembind \
+Package_favicon \
 Package_unoembind \
 StaticLibrary_unoembind \
 $(if $(ENABLE_QT5), \
diff --git a/static/Package_favicon.mk b/static/Package_favicon.mk
new file mode 100644
index ..b0ce6f69f4db
--- /dev/null
+++ b/static/Package_favicon.mk
@@ -0,0 +1,16 @@
+# -*- 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_Package_Package,favicon,$(SRCDIR)/static/emscripten))
+
+$(eval $(call gb_Package_add_files,favicon,$(LIBO_BIN_FOLDER), \
+favicon.ico \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/static/emscripten/favicon.ico b/static/emscripten/favicon.ico
new file mode 100644
index ..b890a56a8b26
Binary files /dev/null and b/static/emscripten/favicon.ico differ


core.git: officecfg/Configuration_officecfg.mk postprocess/CustomTarget_registry.mk

2024-02-23 Thread Stephan Bergmann (via logerrit)
 officecfg/Configuration_officecfg.mk |   18 +++---
 postprocess/CustomTarget_registry.mk |   14 +++---
 2 files changed, 18 insertions(+), 14 deletions(-)

New commits:
commit 0d8d71ba986d6c3d4a460d980e2709b9051ba989
Author: Stephan Bergmann 
AuthorDate: Fri Feb 23 17:08:47 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 23 20:58:56 2024 +0100

Emscripten: Filter out some configuration

...that was present in instdir/share/registry/res/registry_en-US.xcd but for
which the underlying instdir/share/registry/*.xcd files are not included in
static/CustomTarget_emscripten_fs_image.mk, so causing

> warn:configmgr:42:1:configmgr/source/xcuparser.cxx:292: unknown component 
"org.openoffice.Office.PresentationMinimizer" in 
"file:///instdir/program/../share/registry/res/registry_en-US.xcd"

etc. in the browser console.  (This commit just hides those .xcu behind
ENABLE_WASM_STRIP_* for which localizations ended up in
instdir/share/registry/res/registry_en-US.xcd and caused the above 
warnings.  It
does not clean up the mess further.  Also note that the list of files to 
include
in static/CustomTarget_emscripten_fs_image.mk is largely hard-coded, so 
somewhat
guessing at the right ENABLE_WASM_STRIP_* to use here.)

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

diff --git a/officecfg/Configuration_officecfg.mk 
b/officecfg/Configuration_officecfg.mk
index aa4eec7b054c..57ac28bbed51 100644
--- a/officecfg/Configuration_officecfg.mk
+++ b/officecfg/Configuration_officecfg.mk
@@ -150,8 +150,9 @@ $(eval $(call 
gb_Configuration_add_localized_datas,registry,officecfg/registry/d
) \
org/openoffice/Office/Common.xcu \
org/openoffice/Office/DataAccess.xcu \
-   org/openoffice/Office/PresentationMinimizer.xcu \
-   org/openoffice/Office/PresenterScreen.xcu \
+   $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
+   org/openoffice/Office/PresentationMinimizer.xcu \
+   org/openoffice/Office/PresenterScreen.xcu) \
org/openoffice/Office/TableWizard.xcu \
org/openoffice/Office/UI.xcu \
org/openoffice/Office/Embedding.xcu \
@@ -178,14 +179,17 @@ $(eval $(call 
gb_Configuration_add_localized_datas,registry,officecfg/registry/d
org/openoffice/Office/UI/DbBrowserWindowState.xcu \
org/openoffice/Office/UI/DbTableDataWindowState.xcu \
org/openoffice/Office/UI/DrawImpressCommands.xcu \
-   org/openoffice/Office/UI/Effects.xcu \
+   $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
+   org/openoffice/Office/UI/Effects.xcu) \
org/openoffice/Office/UI/GenericCommands.xcu \
-   org/openoffice/Office/UI/MathCommands.xcu \
+   $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
+   org/openoffice/Office/UI/MathCommands.xcu) \
org/openoffice/Office/UI/BasicIDEWindowState.xcu \
org/openoffice/Office/UI/CalcWindowState.xcu \
-   org/openoffice/Office/UI/DrawWindowState.xcu \
-   org/openoffice/Office/UI/ImpressWindowState.xcu \
-   org/openoffice/Office/UI/MathWindowState.xcu \
+   $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
+   org/openoffice/Office/UI/DrawWindowState.xcu \
+   org/openoffice/Office/UI/ImpressWindowState.xcu \
+   org/openoffice/Office/UI/MathWindowState.xcu) \
$(call gb_Helper_optional,REPORTBUILDER, \
org/openoffice/Office/UI/ReportCommands.xcu \
) \
diff --git a/postprocess/CustomTarget_registry.mk 
b/postprocess/CustomTarget_registry.mk
index e7f5997984f8..8a503e39862a 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -67,8 +67,8 @@ postprocess_FILES_ctl := \
 postprocess_DEPS_draw := main
 postprocess_FILES_draw := \
$(postprocess_XCS)/Office/UI/DrawWindowState.xcs \
-   $(postprocess_XCU)/Office/UI/DrawWindowState.xcu \
$(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
+   $(postprocess_XCU)/Office/UI/DrawWindowState.xcu \
$(call gb_XcuFilterFiltersTarget_get_target,fcfg_draw_filters.xcu) \
$(call gb_XcuFilterTypesTarget_get_target,fcfg_draw_types.xcu)) \
$(postprocess_MOD)/org/openoffice/Office/Common-draw.xcu \
@@ -92,11 +92,11 @@ postprocess_FILES_impress := \
$(postprocess_XCS)/Office/PresenterScreen.xcs \
$(postprocess_XCS)/Office/UI/Effects.xcs \
$(postprocess_XCS)/Office/UI/ImpressWindowState.xcs \
-   $(postprocess_XCU)/Office/PresentationMinimizer.xcu \
-   $(postprocess_XCU)/Office/PresenterScreen.xcu \
-   $(postprocess_XCU)/Office/UI/Effects.xcu \
-   $(postprocess_XCU)/Office/UI/ImpressWindowState.xcu \
$(if $(ENABLE_WASM_STRIP_

core.git: filter/Configuration_filter.mk postprocess/CustomTarget_registry.mk

2024-02-23 Thread Stephan Bergmann (via logerrit)
 filter/Configuration_filter.mk   |6 ++
 postprocess/CustomTarget_registry.mk |   22 +-
 2 files changed, 19 insertions(+), 9 deletions(-)

New commits:
commit 07deeedadda3d5d6b37b281c8d93060c1229ac7e
Author: Stephan Bergmann 
AuthorDate: Fri Feb 23 15:32:12 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 23 20:58:40 2024 +0100

Emscripten: Filter out some filter configuration

...for which the underlying .xcd files are not included in
static/CustomTarget_emscripten_fs_image.mk, so causing

> warn:configmgr:42:1:configmgr/source/xcuparser.cxx:904: ignoring modify 
of unknown set member node "StarOffice XML (Base)" in 
"file:///instdir/program/../share/registry/res/fcfg_langpack_en-US.xcd"

etc. in the browser console.  (Though note that the list of files to 
include in
static/CustomTarget_emscripten_fs_image.mk is largely hard-coded, so 
somewhat
guessing at the right ENABLE_WASM_STRIP_* to use here.)

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

diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 29d503c0cc33..b2d3b09689f0 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -294,6 +294,7 @@ $(eval $(call 
filter_Configuration_add_others,fcfg_langpack,fcfg_base_others.xcu
contenthandlers/com_sun_star_comp_framework_oxt_handler \
 ))
 
+ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE)
 # fcfg_database
 $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_database_types.xcu,filter/source/config/fragments/types,\
StarBase \
@@ -306,6 +307,7 @@ $(eval $(call 
filter_Configuration_add_filters,fcfg_langpack,fcfg_database_filte
 $(eval $(call 
filter_Configuration_add_others,fcfg_langpack,fcfg_database_others.xcu,filter/source/config/fragments,\
frameloaders/org_openoffice_comp_dbflt_DBContentLoader2 \
 ))
+endif
 
 ifeq ($(ENABLE_REPORTBUILDER),TRUE)
 # fcfg_reportbuilder
@@ -562,6 +564,7 @@ $(eval $(call 
filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.x
MS_Multiplan \
 ))
 
+ifneq ($(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),TRUE)
 # fcfg_draw
 $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,filter/source/config/fragments/types,\
draw_ODG_FlatXML \
@@ -660,6 +663,7 @@ $(eval $(call 
filter_Configuration_add_filters,fcfg_langpack,fcfg_impress_filter
MWAW_Presentation \
PowerPoint3 \
 ))
+endif
 
 # fcfg_chart
 $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_chart_types.xcu,filter/source/config/fragments/types,\
@@ -676,6 +680,7 @@ $(eval $(call 
filter_Configuration_add_others,fcfg_langpack,fcfg_chart_others.xc
frameloaders/com_sun_star_comp_chart2_ChartFrameLoader \
 ))
 
+ifneq ($(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),TRUE)
 # fcfg_math
 $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_math_types.xcu,filter/source/config/fragments/types,\
math_MathML_XML_Math \
@@ -692,6 +697,7 @@ $(eval $(call 
filter_Configuration_add_filters,fcfg_langpack,fcfg_math_filters.x
math_pdf_Export \
math8 \
 ))
+endif
 
 # fcfg_drawgraphics
 $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_drawgraphics_types.xcu,filter/source/config/fragments/types,\
diff --git a/postprocess/CustomTarget_registry.mk 
b/postprocess/CustomTarget_registry.mk
index c2f823369262..e7f5997984f8 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -35,9 +35,10 @@ postprocess_XCDS := \
 
 postprocess_DEPS_base := main
 postprocess_FILES_base := \
-   $(call gb_XcuFilterFiltersTarget_get_target,fcfg_database_filters.xcu) \
-   $(call gb_XcuFilterOthersTarget_get_target,fcfg_database_others.xcu) \
-   $(call gb_XcuFilterTypesTarget_get_target,fcfg_database_types.xcu) \
+   $(if $(ENABLE_WASM_STRIP_DBACCESS),, \
+   $(call 
gb_XcuFilterFiltersTarget_get_target,fcfg_database_filters.xcu) \
+   $(call 
gb_XcuFilterOthersTarget_get_target,fcfg_database_others.xcu) \
+   $(call gb_XcuFilterTypesTarget_get_target,fcfg_database_types.xcu)) 
\
$(postprocess_MOD)/org/openoffice/Office/Common-base.xcu \
$(postprocess_MOD)/org/openoffice/Office/Embedding-base.xcu \
$(postprocess_MOD)/org/openoffice/Setup-base.xcu
@@ -67,8 +68,9 @@ postprocess_DEPS_draw := main
 postprocess_FILES_draw := \
$(postprocess_XCS)/Office/UI/DrawWindowState.xcs \
$(postprocess_XCU)/Office/UI/DrawWindowState.xcu \
-   $(call gb_XcuFilterFiltersTarget_get_target,fcfg_draw_filters.xcu) \
-   $(call gb_XcuFilterTypesTarget_get_target,fcfg_draw_types.xcu) \
+   $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
+   $(call gb_XcuFilterF

core.git: vcl/osx

2024-02-23 Thread Stephan Bergmann (via logerrit)
 vcl/osx/salnsmenu.mm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fda653f6e1e7a7e3c0db037cb2d0046a1790e641
Author: Stephan Bergmann 
AuthorDate: Fri Feb 23 15:49:06 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 23 17:34:02 2024 +0100

loplugin:fakebool

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

diff --git a/vcl/osx/salnsmenu.mm b/vcl/osx/salnsmenu.mm
index 31627a35ea87..516101f8f79d 100644
--- a/vcl/osx/salnsmenu.mm
+++ b/vcl/osx/salnsmenu.mm
@@ -321,7 +321,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 
 - (BOOL)performKeyEquivalent:(NSEvent*)pEvent
 {
-BOOL bRet = [super performKeyEquivalent: pEvent];
+bool bRet = [super performKeyEquivalent: pEvent];
 
 // tdf#126638 dispatch key shortcut events to modal windows
 // Some modal windows, such as the native Open and Save dialogs,


core.git: solenv/gbuild

2024-02-23 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/UnoApiTarget.mk  |9 -
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |2 --
 solenv/gbuild/platform/com_MSC_class.mk|8 
 solenv/gbuild/platform/iOS.mk  |8 
 solenv/gbuild/platform/macosx.mk   |8 
 solenv/gbuild/platform/solaris.mk  |8 
 solenv/gbuild/platform/unxgcc.mk   |8 
 7 files changed, 4 insertions(+), 47 deletions(-)

New commits:
commit f4aee67494aa4defbc4d23aebc41bf9571e29d3b
Author: Stephan Bergmann 
AuthorDate: Fri Feb 23 13:29:02 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 23 17:24:22 2024 +0100

Undo "move selection of UNO header variant to platform"

...from 86f4727920ae515987005e3c414f1d6056079be1, as all the platforms 
define
gb_UnoApiHeadersTarget_select_variant in effectively the same way, anyway.  
(And
whether or not any of this actually makes any sense the way it is currently
done.)

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

diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index 6eacbc66a0ab..e79247172851 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -90,9 +90,6 @@ endef
 
 # UnoApiHeadersTarget
 
-# defined by platform
-#  gb_UnoApiHeadersTarget_select_variant
-
 # Allow to redefine header variant.
 #
 # On iOS we use static linking because dynamic loading of own code
@@ -125,8 +122,10 @@ endef
 # technical reasons to get around silly limitations in the OS, sigh.
 #
 # gb_UnoApiHeadersTarget_select_variant api default-variant
-ifeq ($(origin gb_UnoApiHeadersTarget_select_variant),undefined)
-$(eval $(call gb_Output_error,gb_UnoApiHeadersTarget_select_variant must be 
defined by platform))
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+gb_UnoApiHeadersTarget_select_variant = $(if $(filter 
udkapi,$(1)),comprehensive,$(2))
+else
+gb_UnoApiHeadersTarget_select_variant = $(2)
 endif
 
 gb_UnoApiHeadersTarget_CPPUMAKERDEPS := $(call 
gb_Executable_get_runtime_dependencies,cppumaker)
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index ec762431097f..5d960db61087 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -7,8 +7,6 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-gb_UnoApiHeadersTarget_select_variant = $(if $(filter 
udkapi,$(1)),comprehensive,$(2))
-
 include $(GBUILDDIR)/platform/unxgcc.mk
 
 # don't sort; later can override previous settings!
diff --git a/solenv/gbuild/platform/com_MSC_class.mk 
b/solenv/gbuild/platform/com_MSC_class.mk
index 16cc4201b40e..3ebbbabd49f9 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -692,14 +692,6 @@ gb_Extension_LICENSEFILE_DEFAULT := $(INSTROOT)/license.txt
 
 gb_UnpackedTarget_TARFILE_LOCATION := $(shell cygpath -u $(TARFILE_LOCATION))
 
-# UnoApiHeadersTarget class
-
-ifeq ($(DISABLE_DYNLOADING),TRUE)
-gb_UnoApiHeadersTarget_select_variant = $(if $(filter 
udkapi,$(1)),comprehensive,$(2))
-else
-gb_UnoApiHeadersTarget_select_variant = $(2)
-endif
-
 # UIConfig class
 
 # use responsefile because cui has too many files for command line
diff --git a/solenv/gbuild/platform/iOS.mk b/solenv/gbuild/platform/iOS.mk
index 15f1ce4ef4ac..8a392c8505fe 100644
--- a/solenv/gbuild/platform/iOS.mk
+++ b/solenv/gbuild/platform/iOS.mk
@@ -241,14 +241,6 @@ gb_Extension_LICENSEFILE_DEFAULT := $(INSTROOT)/LICENSE
 
 gb_UnpackedTarget_TARFILE_LOCATION := $(TARFILE_LOCATION)
 
-# UnoApiHeadersTarget class
-
-ifeq ($(DISABLE_DYNLOADING),TRUE)
-gb_UnoApiHeadersTarget_select_variant = $(if $(filter 
udkapi,$(1)),comprehensive,$(2))
-else
-gb_UnoApiHeadersTarget_select_variant = $(2)
-endif
-
 # UIMenubarTarget class
 
 define gb_UIMenubarTarget__command
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index be25f6563cd0..83f9695c624c 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -345,14 +345,6 @@ gb_Extension_LICENSEFILE_DEFAULT := 
$(INSTROOT)/Resources/LICENSE
 
 gb_UnpackedTarget_TARFILE_LOCATION := $(TARFILE_LOCATION)
 
-# UnoApiHeadersTarget class
-
-ifeq ($(DISABLE_DYNLOADING),TRUE)
-gb_UnoApiHeadersTarget_select_variant = $(if $(filter 
udkapi,$(1)),comprehensive,$(2))
-else
-gb_UnoApiHeadersTarget_select_variant = $(2)
-endif
-
 # UIMenubarTarget class
 
 define gb_UIMenubarTarget__command
diff --git a/solenv/gbuild/platform/solaris.mk 
b/solenv/gbuild/platform/solaris.mk
index 9d18cd913a87..c3e7af09f054 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -326,14 +326,6 @@ gb_Extension_LICENSEFILE_DEFAULT := $(INSTROO

core.git: unotest/Library_embindtest.mk

2024-02-23 Thread Stephan Bergmann (via logerrit)
 unotest/Library_embindtest.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 80d3f33876a2ad4ce32d3c6183131984e8c6b5da
Author: Stephan Bergmann 
AuthorDate: Fri Feb 23 11:48:46 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 23 16:52:36 2024 +0100

Library_embindtest should use comprehensive InternalUnoApi_embindtest

...as the workdir/UnoApiTarget/embindtest.rdb type library would not be
available at runtime

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

diff --git a/unotest/Library_embindtest.mk b/unotest/Library_embindtest.mk
index 8c2d48bbfac9..6dc356ace4d5 100644
--- a/unotest/Library_embindtest.mk
+++ b/unotest/Library_embindtest.mk
@@ -19,7 +19,7 @@ $(eval $(call gb_Library_use_api,embindtest, \
 udkapi \
 ))
 
-$(eval $(call gb_Library_use_internal_api,embindtest, \
+$(eval $(call gb_Library_use_internal_comprehensive_api,embindtest, \
 embindtest \
 ))
 


core.git: cppu/source

2024-02-23 Thread Stephan Bergmann (via logerrit)
 cppu/source/uno/sequence.cxx |   16 
 1 file changed, 16 insertions(+)

New commits:
commit 822b221b3d32b3526e6cc61021ad250902342bbf
Author: Stephan Bergmann 
AuthorDate: Fri Feb 23 11:41:54 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 23 15:54:27 2024 +0100

Abort if type information is missing when creating sequences

When the typelib_TypeDescription is null, the following code would 
dereference a
null pointer anyway (but which doesn't necessarily cause an immediate crash 
on
some platforms like Wasm, so better be explicit).  (Also, leave those 
checks out
of functions like uno_type_sequence_realloc, which would have been preceded 
by a
call to one of the functions creating a sequence of the given type, and 
which
would thus already have detected failure to obtain the relevant type
information.)

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

diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx
index c467f2c38704..2d8b1da19f84 100644
--- a/cppu/source/uno/sequence.cxx
+++ b/cppu/source/uno/sequence.cxx
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include 
@@ -227,6 +228,9 @@ static bool idefaultConstructElements(
 {
 typelib_TypeDescription * pElementTypeDescr = nullptr;
 TYPELIB_DANGER_GET( , pElementType );
+if (pElementTypeDescr == nullptr) {
+std::abort();
+}
 sal_Int32 eEnum =
 reinterpret_cast(
  pElementTypeDescr)->nDefaultEnumValue;
@@ -245,6 +249,9 @@ static bool idefaultConstructElements(
 {
 typelib_TypeDescription * pElementTypeDescr = nullptr;
 TYPELIB_DANGER_GET( , pElementType );
+if (pElementTypeDescr == nullptr) {
+std::abort();
+}
 sal_Int32 nElementSize = pElementTypeDescr->nSize;
 
 if (nAlloc >= 0)
@@ -471,6 +478,9 @@ static bool icopyConstructFromElements(
 {
 typelib_TypeDescription * pElementTypeDescr = nullptr;
 TYPELIB_DANGER_GET( , pElementType );
+if (pElementTypeDescr == nullptr) {
+std::abort();
+}
 sal_Int32 nElementSize = pElementTypeDescr->nSize;
 
 pSeq = reallocSeq( pSeq, nElementSize, nAlloc );
@@ -522,6 +532,9 @@ static bool icopyConstructFromElements(
 {
 typelib_TypeDescription * pElementTypeDescr = nullptr;
 TYPELIB_DANGER_GET( , pElementType );
+if (pElementTypeDescr == nullptr) {
+std::abort();
+}
 typelib_TypeDescriptionReference * pSeqElementType =
 reinterpret_cast(pElementTypeDescr)->pType;
 uno_Sequence ** pDestElements = reinterpret_cast(pSeq->elements);
@@ -664,6 +677,9 @@ sal_Bool SAL_CALL uno_type_sequence_construct(
 {
 typelib_TypeDescription * pTypeDescr = nullptr;
 TYPELIB_DANGER_GET( , pType );
+if (pTypeDescr == nullptr) {
+std::abort();
+}
 
 typelib_TypeDescriptionReference * pElementType =
 reinterpret_cast(pTypeDescr)->pType;


core.git: unotest/source

2024-02-23 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.cxx |  149 +
 unotest/source/embindtest/embindtest.idl |   28 +
 unotest/source/embindtest/embindtest.js  |  155 +++
 3 files changed, 332 insertions(+)

New commits:
commit 24cd81bc29c440a537e12cbd163aea1b5d68e891
Author: Stephan Bergmann 
AuthorDate: Thu Feb 22 10:49:14 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 23 13:50:25 2024 +0100

unoembind sequence tests

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

diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index 9ab70656541d..152afe551e5b 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -85,6 +85,155 @@ public:
 {
 return value.m1 == -123456 && value.m2 == 100.5 && value.m3 == u"hä";
 }
+
+css::uno::Sequence SAL_CALL getSequenceBoolean() override
+{
+return { true, true, false };
+}
+
+sal_Bool SAL_CALL isSequenceBoolean(css::uno::Sequence const& 
value) override
+{
+return value == css::uno::Sequence{ true, true, false };
+}
+
+css::uno::Sequence SAL_CALL getSequenceByte() override { return 
{ -12, 1, 12 }; }
+
+sal_Bool SAL_CALL isSequenceByte(css::uno::Sequence const& 
value) override
+{
+return value == css::uno::Sequence{ -12, 1, 12 };
+}
+
+css::uno::Sequence SAL_CALL getSequenceShort() override
+{
+return { -1234, 1, 1234 };
+}
+
+sal_Bool SAL_CALL isSequenceShort(css::uno::Sequence const& 
value) override
+{
+return value == css::uno::Sequence{ -1234, 1, 1234 };
+}
+
+css::uno::Sequence SAL_CALL getSequenceUnsignedShort() override
+{
+return { 1, 10, 54321 };
+}
+
+sal_Bool SAL_CALL isSequenceUnsignedShort(css::uno::Sequence 
const& value) override
+{
+return value == css::uno::Sequence{ 1, 10, 54321 };
+}
+
+css::uno::Sequence SAL_CALL getSequenceLong() override
+{
+return { -123456, 1, 123456 };
+}
+
+sal_Bool SAL_CALL isSequenceLong(css::uno::Sequence const& 
value) override
+{
+return value == css::uno::Sequence{ -123456, 1, 123456 };
+}
+
+css::uno::Sequence SAL_CALL getSequenceUnsignedLong() override
+{
+return { 1, 10, 3456789012 };
+}
+
+sal_Bool SAL_CALL isSequenceUnsignedLong(css::uno::Sequence 
const& value) override
+{
+return value == css::uno::Sequence{ 1, 10, 3456789012 };
+}
+
+css::uno::Sequence SAL_CALL getSequenceHyper() override
+{
+return { -123456789, 1, 123456789 };
+}
+
+sal_Bool SAL_CALL isSequenceHyper(css::uno::Sequence const& 
value) override
+{
+return value == css::uno::Sequence{ -123456789, 1, 
123456789 };
+}
+
+css::uno::Sequence SAL_CALL getSequenceUnsignedHyper() override
+{
+return { 1, 10, 9876543210 };
+}
+
+sal_Bool SAL_CALL isSequenceUnsignedHyper(css::uno::Sequence 
const& value) override
+{
+return value == css::uno::Sequence{ 1, 10, 9876543210 };
+}
+
+css::uno::Sequence SAL_CALL getSequenceFloat() override
+{
+return { -10.25, 1.5, 10.75 };
+}
+
+sal_Bool SAL_CALL isSequenceFloat(css::uno::Sequence const& value) 
override
+{
+return value == css::uno::Sequence{ -10.25, 1.5, 10.75 };
+}
+
+css::uno::Sequence SAL_CALL getSequenceDouble() override
+{
+return { -100.5, 1.25, 100.75 };
+}
+
+sal_Bool SAL_CALL isSequenceDouble(css::uno::Sequence const& 
value) override
+{
+return value == css::uno::Sequence{ -100.5, 1.25, 100.75 };
+}
+
+css::uno::Sequence SAL_CALL getSequenceChar() override
+{
+return { 'a', 'B', u'Ö' };
+}
+
+sal_Bool SAL_CALL isSequenceChar(css::uno::Sequence const& 
value) override
+{
+return value == css::uno::Sequence{ 'a', 'B', u'Ö' };
+}
+
+css::uno::Sequence SAL_CALL getSequenceString() override
+{
+return { u"foo"_ustr, u"barr"_ustr, u"bazzz"_ustr };
+}
+
+sal_Bool SAL_CALL isSequenceString(css::uno::Sequence const& 
value) override
+{
+return value == css::uno::Sequence{ u"foo"_ustr, 
u"barr"_ustr, u"bazzz"_ustr };
+}
+
+css::uno::Sequence> SAL_CALL 
getSequenceSequenceString() override
+{
+return { {}, { u"foo"_ustr, u"barr"_ustr }, { u"baz"_ustr } };
+}
+
+sal_Bool SAL_CALL
+isSequenceSequenceString(css::uno::Sequence> 
const& value) override
+{
+return value
+   == css::uno::Sequence>{ {},
+  

core.git: include/static

2024-02-23 Thread Stephan Bergmann (via logerrit)
 include/static/unoembindhelpers/PrimaryBindings.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7d0f92545373941637879cbfb1f907f3f35604d6
Author: Stephan Bergmann 
AuthorDate: Fri Feb 23 11:47:59 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 23 13:33:04 2024 +0100

Propagate by-ref Sequence::operator[] return type through lambda

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

diff --git a/include/static/unoembindhelpers/PrimaryBindings.hxx 
b/include/static/unoembindhelpers/PrimaryBindings.hxx
index 4df301277cc9..80b55d5278ac 100644
--- a/include/static/unoembindhelpers/PrimaryBindings.hxx
+++ b/include/static/unoembindhelpers/PrimaryBindings.hxx
@@ -104,7 +104,7 @@ template  void registerSequence(char const* 
name)
   })
 .function("size", ::uno::Sequence::getLength)
 .function("get",
-  +[](css::uno::Sequence const& self, sal_Int32 index) {
+  +[](css::uno::Sequence const& self, sal_Int32 index) -> T 
const& {
   checkSequenceAccess(self, index);
   return self[index];
   })


core.git: 3 commits - desktop/inc static/source sw/source unotest/source

2024-02-22 Thread Stephan Bergmann (via logerrit)
 desktop/inc/lib/init.hxx   |2 -
 static/source/unoembindhelpers/PrimaryBindings.cxx |   34 +
 sw/source/uibase/docvw/AnnotationWin2.cxx  |2 -
 unotest/source/embindtest/embindtest.cxx   |4 ++
 unotest/source/embindtest/embindtest.idl   |2 +
 unotest/source/embindtest/embindtest.js|6 +++
 6 files changed, 48 insertions(+), 2 deletions(-)

New commits:
commit 2c3121adb9a53142a003ba668821e77e9555c629
Author: Stephan Bergmann 
AuthorDate: Thu Feb 22 10:36:24 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 22 15:45:51 2024 +0100

Embind: Add UNO char support

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

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 0a27162c3ef1..a8e1000afd6f 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -23,6 +23,39 @@
 using namespace emscripten;
 using namespace css::uno;
 
+EM_JS(void, jsRegisterChar, (std::type_info const* raw),
+// clang-format off
+{
+Module.registerType(raw, {
+name: 'rtl::OUString',
+fromWireType(ptr) {
+let str = String.fromCharCode(Module.HEAPU16[ptr >> 1]);
+return str;
+},
+toWireType(destructors, value) {
+if (typeof value != 'string' || value.length !== 1) {
+Module.throwBindingError(
+'Cannot pass anything but 1-element string to C++ 
char16_t');
+}
+let data = Module._malloc(2);
+Module.HEAPU16[data >> 1] = value.charCodeAt(0);
+if (destructors !== null) {
+destructors.push(Module._free, data);
+}
+return data;
+},
+argPackAdvance: 8,
+readValueFromPointer(pointer) {
+return this.fromWireType(Module.HEAPU32[((pointer)>>2)]);
+},
+destructorFunction(ptr) {
+Module._free(ptr);
+},
+});
+}
+// clang-format on
+);
+
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Winvalid-pp-token"
 EM_JS(void, jsRegisterString, (std::type_info const* raw),
@@ -167,6 +200,7 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
 function("rtl_uString_release",
  +[](std::uintptr_t ptr) { 
rtl_uString_release(reinterpret_cast(ptr)); });
 
+jsRegisterChar((char16_t));
 jsRegisterString((OUString));
 }
 #endif
diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index b1f819272931..9ab70656541d 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -68,6 +68,10 @@ public:
 
 sal_Bool SAL_CALL isDouble(double value) override { return value == 100.5; 
}
 
+sal_Unicode SAL_CALL getChar() override { return u'Ö'; }
+
+sal_Bool SAL_CALL isChar(sal_Unicode value) override { return value == 
u'Ö'; }
+
 OUString SAL_CALL getString() override { return u"hä"_ustr; }
 
 sal_Bool SAL_CALL isString(OUString const& value) override { return value 
== u"hä"; }
diff --git a/unotest/source/embindtest/embindtest.idl 
b/unotest/source/embindtest/embindtest.idl
index 913cde39e12b..09e5c4096c50 100644
--- a/unotest/source/embindtest/embindtest.idl
+++ b/unotest/source/embindtest/embindtest.idl
@@ -36,6 +36,8 @@ interface XTest {
 boolean isFloat([in] float value);
 double getDouble();
 boolean isDouble([in] double value);
+char getChar();
+boolean isChar([in] char value);
 string getString();
 boolean isString([in] string value);
 Struct getStruct();
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index 805dd16bfe99..9d0349ffe7f2 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -73,6 +73,12 @@ Module.addOnPostRun(function() {
 console.assert(v === 100.5);
 console.assert(test.isDouble(v));
 }
+{
+let v = test.getChar();
+console.log(v);
+console.assert(v === 'Ö');
+console.assert(test.isChar(v));
+}
 {
 let v = test.getString();
 console.log(v);
commit b3bca02d58f71d2413b673ff113a346e237ef92f
Author: Stephan Bergmann 
AuthorDate: Thu Feb 22 13:22:55 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 22 15:45:30 2024 +0100

Fix UBSan build's RTTI needs

...after 3ba92b5f1eaf7d4447a0943ea260db515ca799dc "hide more symbols" had 
caused
CppunitTest_desktop_lib to fail with

> DynamicLibraryManagerException: "Failed to load dynamic library: 
workdir/Li

core.git: unotest/source

2024-02-22 Thread Stephan Bergmann (via logerrit)
 unotest/source/embindtest/embindtest.cxx |   56 +++
 unotest/source/embindtest/embindtest.idl |   33 +
 unotest/source/embindtest/embindtest.js  |   74 +++
 3 files changed, 162 insertions(+), 1 deletion(-)

New commits:
commit 29b109dfc0f836e34b61b2fbbe69d2b0728dc7b8
Author: Stephan Bergmann 
AuthorDate: Thu Feb 22 10:25:32 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 22 12:57:35 2024 +0100

A first cut at embindtest

(UNO boolean should arguably map to JS Boolean, not Number)

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

diff --git a/unotest/source/embindtest/embindtest.cxx 
b/unotest/source/embindtest/embindtest.cxx
index bc8db7d5c9b4..b1f819272931 100644
--- a/unotest/source/embindtest/embindtest.cxx
+++ b/unotest/source/embindtest/embindtest.cxx
@@ -12,7 +12,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 namespace com::sun::star::uno
@@ -25,6 +27,60 @@ namespace
 {
 class Test : public cppu::WeakImplHelper
 {
+public:
+sal_Bool SAL_CALL getBoolean() override { return true; }
+
+sal_Bool SAL_CALL isBoolean(sal_Bool value) override { return value; }
+
+sal_Int8 SAL_CALL getByte() override { return -12; }
+
+sal_Bool SAL_CALL isByte(sal_Int8 value) override { return value == -12; }
+
+sal_Int16 SAL_CALL getShort() override { return -1234; }
+
+sal_Bool SAL_CALL isShort(sal_Int16 value) override { return value == 
-1234; }
+
+sal_uInt16 SAL_CALL getUnsignedShort() override { return 54321; }
+
+sal_Bool SAL_CALL isUnsignedShort(sal_uInt16 value) override { return 
value == 54321; }
+
+sal_Int32 SAL_CALL getLong() override { return -123456; }
+
+sal_Bool SAL_CALL isLong(sal_Int32 value) override { return value == 
-123456; }
+
+sal_uInt32 SAL_CALL getUnsignedLong() override { return 3456789012; }
+
+sal_Bool SAL_CALL isUnsignedLong(sal_uInt32 value) override { return value 
== 3456789012; }
+
+sal_Int64 SAL_CALL getHyper() override { return -123456789; }
+
+sal_Bool SAL_CALL isHyper(sal_Int64 value) override { return value == 
-123456789; }
+
+sal_uInt64 SAL_CALL getUnsignedHyper() override { return 9876543210; }
+
+sal_Bool SAL_CALL isUnsignedHyper(sal_uInt64 value) override { return 
value == 9876543210; }
+
+float SAL_CALL getFloat() override { return -10.25; }
+
+sal_Bool SAL_CALL isFloat(float value) override { return value == -10.25; }
+
+double SAL_CALL getDouble() override { return 100.5; }
+
+sal_Bool SAL_CALL isDouble(double value) override { return value == 100.5; 
}
+
+OUString SAL_CALL getString() override { return u"hä"_ustr; }
+
+sal_Bool SAL_CALL isString(OUString const& value) override { return value 
== u"hä"; }
+
+org::libreoffice::embindtest::Struct SAL_CALL getStruct() override
+{
+return { -123456, 100.5, u"hä"_ustr };
+}
+
+sal_Bool SAL_CALL isStruct(org::libreoffice::embindtest::Struct const& 
value) override
+{
+return value.m1 == -123456 && value.m2 == 100.5 && value.m3 == u"hä";
+}
 };
 }
 
diff --git a/unotest/source/embindtest/embindtest.idl 
b/unotest/source/embindtest/embindtest.idl
index 553fe6ac38d3..913cde39e12b 100644
--- a/unotest/source/embindtest/embindtest.idl
+++ b/unotest/source/embindtest/embindtest.idl
@@ -9,7 +9,38 @@
 
 module org { module libreoffice { module embindtest {
 
-interface XTest {};
+struct Struct {
+long m1;
+double m2;
+string m3;
+};
+
+interface XTest {
+boolean getBoolean();
+boolean isBoolean([in] boolean value);
+byte getByte();
+boolean isByte([in] byte value);
+short getShort();
+boolean isShort([in] short value);
+unsigned short getUnsignedShort();
+boolean isUnsignedShort([in] unsigned short value);
+long getLong();
+boolean isLong([in] long value);
+unsigned long getUnsignedLong();
+boolean isUnsignedLong([in] unsigned long value);
+hyper getHyper();
+boolean isHyper([in] hyper value);
+unsigned hyper getUnsignedHyper();
+boolean isUnsignedHyper([in] unsigned hyper value);
+float getFloat();
+boolean isFloat([in] float value);
+double getDouble();
+boolean isDouble([in] double value);
+string getString();
+boolean isString([in] string value);
+Struct getStruct();
+boolean isStruct([in] Struct value);
+};
 
 singleton Test: XTest;
 
diff --git a/unotest/source/embindtest/embindtest.js 
b/unotest/source/embindtest/embindtest.js
index ad5eeea29075..805dd16bfe99 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -13,6 +13,80 @@ Module.addOnPostRun(function() {
 let test = new Module.unoembind_uno.org.libreoffice.embindtest.Test

core.git: Branch 'distro/collabora/co-23.05' - sc/source svl/source sw/source

2024-02-22 Thread Stephan Bergmann (via logerrit)
 sc/source/core/tool/scmatrix.cxx |7 +++
 svl/source/misc/gridprinter.cxx  |7 +++
 sw/source/core/doc/doc.cxx   |   10 ++
 3 files changed, 24 insertions(+)

New commits:
commit 5d0e1414295d59605e17a1194bde43b46acd5d71
Author: Stephan Bergmann 
AuthorDate: Wed Aug 2 10:48:31 2023 +0200
Commit: Andras Timar 
CommitDate: Thu Feb 22 09:51:44 2024 +0100

Silence some bogus -Werror=array-bounds etc. with GCC 12 and -std=c++20

...as witnessed with patch set 1 of
<https://gerrit.libreoffice.org/c/core/+/155121/1> "Bump baseline to C++20",

> In file included from 
/opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/char_traits.h:46,
>  from 
/opt/rh/gcc-toolset-12/root/usr/include/c++/12/ios:40,
>  from 
/opt/rh/gcc-toolset-12/root/usr/include/c++/12/ostream:38,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/include/rtl/ustring.hxx:34,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/include/svl/gridprinter.hxx:13,
>  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/svl/source/misc/gridprinter.cxx:10:
> In function ‘constexpr decltype (::new(void*(0)) _Tp) 
std::construct_at(_Tp*, _Args&& ...) [with _Tp = long unsigned int; _Args = 
{const long unsigned int&}]’,
> inlined from ‘static constexpr void 
std::allocator_traits >::construct(allocator_type&, 
_Up*, _Args&& ...) [with _Up = long unsigned int; _Args = {const long unsigned 
int&}; _Tp = long unsigned int]’ at 
/opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/alloc_traits.h:518:21,
> inlined from ‘constexpr void std::vector<_Tp, 
_Alloc>::_M_realloc_insert(iterator, _Args&& ...) [with _Args = {const long 
unsigned int&}; _Tp = long unsigned int; _Alloc = std::allocator]’ at /opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/vector.tcc:462:28,
> inlined from ‘constexpr void std::vector<_Tp, 
_Alloc>::push_back(const value_type&) [with _Tp = long unsigned int; _Alloc = 
std::allocator]’ at 
/opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/stl_vector.h:1287:21,
> inlined from ‘mdds::mtv::soa::multi_type_vector::iterator 
mdds::mtv::soa::multi_type_vector::set_cell_to_empty_block(size_type, 
size_type, const T&) [with T = rtl::OUString; Traits = 
mdds::multi_type_matrix::mtv_trait]’ at 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/main_def.inl:2995:50,
> inlined from ‘mdds::mtv::soa::multi_type_vector::iterator 
mdds::mtv::soa::multi_type_vector::set_impl(size_type, size_type, const 
T&) [with T = rtl::OUString; Traits = 
mdds::multi_type_matrix::mtv_trait]’ at 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/main_def.inl:1240:72,
> inlined from ‘mdds::mtv::soa::multi_type_vector::iterator 
mdds::mtv::soa::multi_type_vector::set(size_type, const T&) [with T = 
rtl::OUString; Traits = 
mdds::multi_type_matrix::mtv_trait]’ at 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/main_def.inl:696:14,
> inlined from ‘void mdds::multi_type_matrix::set(size_type, 
size_type, const string_type&) [with Traits = svl::{anonymous}::matrix_traits]’ 
at 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/mdds/include/mdds/multi_type_matrix_def.inl:356:5,
> inlined from ‘void svl::GridPrinter::set(size_t, size_t, const 
rtl::OUString&)’ at 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/svl/source/misc/gridprinter.cxx:68:25:
> 
/opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/stl_construct.h:97:14: 
error: array subscript 0 is outside array bounds of ‘long unsigned int [0]’ 
[-Werror=array-bounds]
>97 | { return ::new((void*)__location) 
_Tp(std::forward<_Args>(__args)...); }
>   |  
^~~~

(<https://ci.libreoffice.org/job/gerrit_linux_gcc_release/148699/>), etc.

(The curly braces in sw/source/core/doc/doc.cxx had to be added to avoid an
ensuing bogus

> sw/source/core/doc/doc.cxx: In static member function ‘static void 
SwDoc::CalculatePagePairsForProspectPrinting(const SwRootFrame&, SwRenderData&, 
const SwPrintUIOptions&, sal_Int32)’:
> sw/source/core/doc/doc.cxx:1000:5: error: ‘else’ without a previous ‘if’
>  1000 | else
>   |     ^~~~

    )

Change-Id: I902f6d74d897b9bf281dc9c821aff

core.git: desktop/Executable_soffice_bin.mk Repository.mk solenv/gbuild static/CustomTarget_unoembind.mk static/StaticLibrary_unoembind.mk unotest/InternalUnoApi_embindtest.mk unotest/Library_embindte

2024-02-21 Thread Stephan Bergmann (via logerrit)
 Repository.mk  |1 
 desktop/Executable_soffice_bin.mk  |   13 
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |2 -
 static/CustomTarget_unoembind.mk   |6 ++-
 static/StaticLibrary_unoembind.mk  |6 +++
 unotest/InternalUnoApi_embindtest.mk   |   16 ++
 unotest/Library_embindtest.mk  |   26 +
 unotest/Module_unotest.mk  |7 
 unotest/source/embindtest/embindtest.component |   20 +
 unotest/source/embindtest/embindtest.cxx   |   38 +
 unotest/source/embindtest/embindtest.idl   |   18 +++
 unotest/source/embindtest/embindtest.js|   18 +++
 12 files changed, 168 insertions(+), 3 deletions(-)

New commits:
commit d0cb804f7a25274d725475418a97c293f55f30cf
Author: Stephan Bergmann 
AuthorDate: Wed Feb 21 15:10:38 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 22 08:15:30 2024 +0100

Framework for some UNOIDL to test the Embind UNO binding with

It is only built for --enable-dbgutil builds.  Load
instdir/program/qt_soffice.html in a browser and see "Running embindtest" 
in its
console.  For now, it only contains a Test singleton with an empty XTest
interface, which is meant to grow additional methods over time.

(The code needs to reside in the unotest rather than in the static module, 
or
else the wasm build would run into cyclic dependencies.)

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

diff --git a/Repository.mk b/Repository.mk
index 29e2b00e0d45..814ca2edb77b 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -408,6 +408,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
drawinglayercore \
drawinglayer \
editeng \
+   $(if $(filter EMSCRIPTEN,$(OS)),$(if $(ENABLE_DBGUTIL),embindtest)) \
$(if $(filter WNT,$(OS)),emser) \
evtatt \
$(call gb_Helper_optional,DBCONNECTIVITY, \
diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index ad391b3dbc19..34146dc5bfe9 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -64,6 +64,19 @@ $(eval $(call gb_Executable_add_ldflags,soffice_bin, \
 ))
 endif
 
+ifneq ($(ENABLE_DBGUTIL),)
+
+$(call gb_Executable_get_linktarget_target,soffice_bin): \
+$(call gb_CustomTarget_get_workdir,static/unoembind)/bindings_uno.js \
+$(SRCDIR)/unotest/source/embindtest/embindtest.js
+
+$(eval $(call gb_Executable_add_ldflags,soffice_bin, \
+--post-js $(call 
gb_CustomTarget_get_workdir,static/unoembind)/bindings_uno.js \
+--post-js $(SRCDIR)/unotest/source/embindtest/embindtest.js \
+))
+
+endif
+
 endif
 
 # vim: set ts=4 sw=4 et:
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 8a36e425ce7a..ec762431097f 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -27,7 +27,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","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","allocateUTF8","printErr","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
diff --git a/static/CustomTarget_unoembind.mk b/static/CustomTarget_unoembind.mk
index cccb36f1dce2..045e0fea511c 100644
--- a/static/CustomTarget_unoembind.mk
+++ b/sta

core.git: static/README.wasm.md

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

New commits:
commit a62436ff028c611542e86e8e87e92a844f5f4741
Author: Stephan Bergmann 
AuthorDate: Wed Feb 21 14:52:00 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 21 16:17:13 2024 +0100

Remove stray code from example

...that had erroneously been added with 
27ceca1996809c0f9390d1e9fb95dc7436ef1acf
"Rework the Embind mapping of UNO interfaces"

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

diff --git a/static/README.wasm.md b/static/README.wasm.md
index 44e9b223c5cf..e37242508b72 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -241,7 +241,6 @@ xModel.delete(); xTextDocument.delete(); xText.delete(); 
xSimpleText.delete(); x
 init_unoembind_uno(Module);
 let css = Module.unoembind_uno.com.sun.star;
 xModel = Module.getCurrentModelFromViewSh();
-init_unoembind_uno(Module);
 xEnumAccess = new css.container.XEnumerationAccess(xText.$query());
 xParaEnumeration = xEnumAccess.createEnumeration();
 


core.git: external/fontconfig

2024-02-21 Thread Stephan Bergmann (via logerrit)
 external/fontconfig/ExternalPackage_fontconfig.mk|2 +-
 external/fontconfig/libfontconfig-bundled-soname.patch.0 |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7459d4eef300dd46bcac6ce52767541e475a5e93
Author: Stephan Bergmann 
AuthorDate: Wed Feb 21 11:22:42 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 21 15:19:29 2024 +0100

external/fontconfig: Adapt library name

...to recent bbb0663813d0476b9a654207b7006315cb417c2e "Fontconfig: upgrade 
to
release 2.15.0"

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

diff --git a/external/fontconfig/ExternalPackage_fontconfig.mk 
b/external/fontconfig/ExternalPackage_fontconfig.mk
index b09931f5e807..688ae520bfe8 100644
--- a/external/fontconfig/ExternalPackage_fontconfig.mk
+++ b/external/fontconfig/ExternalPackage_fontconfig.mk
@@ -12,7 +12,7 @@ $(eval $(call 
gb_ExternalPackage_ExternalPackage,fontconfig,fontconfig))
 $(eval $(call gb_ExternalPackage_use_external_project,fontconfig,fontconfig))
 
 ifeq ($(DISABLE_DYNLOADING),)
-$(eval $(call 
gb_ExternalPackage_add_file,fontconfig,$(LIBO_LIB_FOLDER)/libfontconfig-lo.so.1.12.0,src/.libs/libfontconfig-lo.so.1.12.0))
+$(eval $(call 
gb_ExternalPackage_add_file,fontconfig,$(LIBO_LIB_FOLDER)/libfontconfig-lo.so.1.12.1,src/.libs/libfontconfig-lo.so.1.12.1))
 endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/fontconfig/libfontconfig-bundled-soname.patch.0 
b/external/fontconfig/libfontconfig-bundled-soname.patch.0
index 14da823315be..46222ca0d6b0 100644
--- a/external/fontconfig/libfontconfig-bundled-soname.patch.0
+++ b/external/fontconfig/libfontconfig-bundled-soname.patch.0
@@ -5,7 +5,7 @@
  lib_LTLIBRARIES = libfontconfig.la
  libfontconfig_la_LDFLAGS = \
 -  -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols)
-+  -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols) 
-release lo -Wl,-soname -Wl,libfontconfig-lo.so.1.12.0
++  -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols) 
-release lo -Wl,-soname -Wl,libfontconfig-lo.so.1.12.1
  
  libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) 
$(EXPAT_LIBS) $(LTLIBINTL)
  libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency)


core.git: include/ucbhelper

2024-02-21 Thread Stephan Bergmann (via logerrit)
 include/ucbhelper/propertyvalueset.hxx |2 +-
 include/ucbhelper/resultset.hxx|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1c387bbf2fdf265c33c8eefbb769fae82b412769
Author: Stephan Bergmann 
AuthorDate: Wed Feb 21 13:01:53 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 21 15:18:19 2024 +0100

Fix UBSan build's RTTI needs

...after 3ba92b5f1eaf7d4447a0943ea260db515ca799dc "hide more symbols" had 
caused
CppunitTest_ucb_webdav_core to fail with

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

etc.

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

diff --git a/include/ucbhelper/propertyvalueset.hxx 
b/include/ucbhelper/propertyvalueset.hxx
index 00a7ec00158b..6fa9930d39cb 100644
--- a/include/ucbhelper/propertyvalueset.hxx
+++ b/include/ucbhelper/propertyvalueset.hxx
@@ -54,7 +54,7 @@ class PropertyValues;
   * values to return can easily appended to a valueset object. That object can
   * directly be returned by the implementation of the command.
   */
-class PropertyValueSet final :
+class SAL_DLLPUBLIC_RTTI PropertyValueSet final :
 public cppu::WeakImplHelper<
 css::sdbc::XRow,
 css::sdbc::XColumnLocate>
diff --git a/include/ucbhelper/resultset.hxx b/include/ucbhelper/resultset.hxx
index 5e9bad0ce499..3884509e2045 100644
--- a/include/ucbhelper/resultset.hxx
+++ b/include/ucbhelper/resultset.hxx
@@ -56,7 +56,7 @@ struct ResultSet_Impl;
  *
  * @see ResultSetDataSupplier
  */
-class ResultSet final :
+class SAL_DLLPUBLIC_RTTI ResultSet final :
 public cppu::WeakImplHelper<
 css::lang::XServiceInfo,
 css::lang::XComponent,


core.git: vcl/inc

2024-02-21 Thread Stephan Bergmann (via logerrit)
 vcl/inc/canvasbitmap.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cfc4a2cfd15760b1fc536c95c3570d916727c31b
Author: Stephan Bergmann 
AuthorDate: Wed Feb 21 11:23:43 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 21 14:41:16 2024 +0100

Fix UBSan build's RTTI needs

...after 3ba92b5f1eaf7d4447a0943ea260db515ca799dc "hide more symbols" had 
caused
CppunitTest_vcl_text to fail with

> DynamicLibraryManagerException: "Failed to load dynamic library: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/LinkTarget/CppunitTest/libtest_vcl_text.so
> 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/LinkTarget/CppunitTest/libtest_vcl_text.so:
 undefined symbol: _ZTIN3vcl8unotools15VclCanvasBitmapE"
> Path (length: 252) is 
'/home/tdf/lode/opt/bin:/etc/alternatives/java_sdk_11/bin:/opt/rh/gcc-toolset-12/root/usr/bin:/home/tdf/.local/bin:/home/tdf/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/etc/alternatives/java_sdk_17/bin'

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

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

diff --git a/vcl/inc/canvasbitmap.hxx b/vcl/inc/canvasbitmap.hxx
index 16f283c038a2..d6ac581e0aff 100644
--- a/vcl/inc/canvasbitmap.hxx
+++ b/vcl/inc/canvasbitmap.hxx
@@ -30,7 +30,7 @@
 
 namespace vcl::unotools
 {
-class VclCanvasBitmap final :
+class SAL_DLLPUBLIC_RTTI VclCanvasBitmap final :
 public cppu::WeakImplHelper< css::rendering::XIntegerReadOnlyBitmap,
  css::rendering::XBitmapPalette,
  css::rendering::XIntegerBitmapColorSpace >


core.git: configure.ac

2024-02-17 Thread Stephan Bergmann (via logerrit)
 configure.ac |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 670de4eadcbb84394fd49c1c0c949dd35bd2303b
Author: Stephan Bergmann 
AuthorDate: Fri Feb 16 13:27:00 2024 +0100
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Sun Feb 18 01:45:59 2024 +0100

Latest VS 2022 Preview is 17.10.0 now

...while latest proper VS 2022 is 17.9.0

Change-Id: Idbd104d54dde1822957894d4f74b16e651a4c8b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163485
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/configure.ac b/configure.ac
index 61d6f5f3d5b6..276657f3cae1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4096,7 +4096,7 @@ map_vs_year_to_version()
 2022)
 vsversion=17;;
 2022preview)
-vsversion=17.9;;
+vsversion=17.10;;
 *)
 AC_MSG_ERROR([Assertion failure - invalid argument "$1" to 
map_vs_year_to_version()]);;
 esac
@@ -4216,7 +4216,7 @@ find_msvc()
 vcyear=2019
 vctoolset=v142
 ;;
-17.0 | 17.9)
+17.0 | 17.10)
 vcyear=2022
 vctoolset=v143
 ;;
@@ -4388,7 +4388,7 @@ if test "$_os" = "WINNT"; then
 # are always "better", we list them in reverse chronological order.
 
 case "$vcnumwithdot" in
-16.0 | 17.0 | 17.9)
+16.0 | 17.0 | 17.10)
 WINDOWS_SDK_ACCEPTABLE_VERSIONS="10.0 8.1A 8.1 8.0"
 ;;
 esac
@@ -6755,7 +6755,7 @@ find_msms()
 
 msmdir=
 case "$VCVER" in
-16.0 | 17.0 | 17.9)
+16.0 | 17.0 | 17.10)
 for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
 my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules/"
 echo "$as_me:$LINENO: looking for $my_msm_dir${my_msm_file}])" >&5
@@ -6791,7 +6791,7 @@ find_msvc_x64_dlls()
 
 msvcdllpath="$VC_PRODUCT_DIR/redist/x64/Microsoft.VC${VCVER}.CRT"
 case "$VCVER" in
-16.0 | 17.0 | 17.9)
+16.0 | 17.0 | 17.10)
 for crtver in 141 142 143; do
 for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
 echo "$as_me:$LINENO: testing 
$VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC$crtver.CRT" >&5


core.git: 2 commits - sc/source

2024-02-15 Thread Stephan Bergmann (via logerrit)
 sc/source/core/data/queryiter.cxx |5 +
 sc/source/core/inc/interpre.hxx   |3 +--
 sc/source/core/tool/interpr1.cxx  |1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 78b907e70359c11f5aba5568447056a130213ebd
Author: Stephan Bergmann 
AuthorDate: Thu Feb 15 14:49:10 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 15 19:44:28 2024 +0100

Move #include  to where it is actually used

f7039822c7ad3987326e1c20ea4a745c158f9682 "tdf#127293 Add Excel2021 function
XLOOKUP to Calc" had moved this #include around, with no documented 
rationale
and for no obvious reason.  Lets move it back.

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

diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index e577a5e2bf8a..ea30b57ae7ea 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -30,7 +30,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include "parclass.hxx"
 
 #include 
@@ -47,7 +47,6 @@ class ScFormulaCell;
 class ScDBRangeBase;
 struct ScQueryParam;
 struct ScDBQueryParamBase;
-struct ScQueryEntry;
 
 struct ScSingleRefData;
 struct ScComplexRefData;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 960516d787ea..3d3b967ffaa0 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -62,6 +62,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
commit 33505523731b930c9a1282bab293e59c9922317f
Author: Stephan Bergmann 
AuthorDate: Thu Feb 15 12:30:20 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 15 19:44:15 2024 +0100

Explicitly instantiate templates

...that are used in inline functions in sc/inc/queryiter.hxx, but where the
template definition is only available in sc/source/core/data/queryiter.cxx, 
and
which had caused at least Clang PCH builds to now fail with

> ld.lld: error: undefined symbol: bool 
ScQueryCellIteratorAccessSpecific<(ScQueryCellIteratorAccess)1>::IncPosImpl()
> >>> referenced by queryiter.hxx:111 (sc/inc/queryiter.hxx:111)
> >>>   
workdir/CxxObject/sc/inc/pch/precompiled_sc.o:(ScQueryCellIteratorAccessSpecific<(ScQueryCellIteratorAccess)1>::IncPos())
>
> ld.lld: error: undefined symbol: bool 
ScQueryCellIteratorAccessSpecific<(ScQueryCellIteratorAccess)1>::IncPosImpl()
> >>> referenced by queryiter.hxx:112 (sc/inc/queryiter.hxx:112)
> >>>   
workdir/CxxObject/sc/inc/pch/precompiled_sc.o:(ScQueryCellIteratorAccessSpecific<(ScQueryCellIteratorAccess)1>::IncPosFast())
> clang++: error: linker command failed with exit code 1 (use -v to see 
invocation)
> make[1]: *** [sc/Library_sc.mk:10: instdir/program/libsclo.so] Error 1

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

diff --git a/sc/source/core/data/queryiter.cxx 
b/sc/source/core/data/queryiter.cxx
index 43996b1693eb..56d4081e7255 100644
--- a/sc/source/core/data/queryiter.cxx
+++ b/sc/source/core/data/queryiter.cxx
@@ -1284,6 +1284,11 @@ bool ScQueryCellIteratorAccessSpecific< 
ScQueryCellIteratorAccess::SortedCache >
 }
 }
 
+template
+bool 
ScQueryCellIteratorAccessSpecific::IncPosImpl();
+template
+bool 
ScQueryCellIteratorAccessSpecific::IncPosImpl();
+
 // Helper that allows binary search of unsorted cells using ScSortedRangeCache.
 // Rows in the given range are kept in a sorted vector and that vector is 
binary-searched.
 class ScQueryCellIteratorAccessSpecific< 
ScQueryCellIteratorAccess::SortedCache >::SortedCacheIndexer


core.git: configure.ac

2024-02-15 Thread Stephan Bergmann (via logerrit)
 configure.ac |   36 +++-
 1 file changed, 35 insertions(+), 1 deletion(-)

New commits:
commit ffc1ab15ae358315516aab319778a254688afbd3
Author: Stephan Bergmann 
AuthorDate: Thu Feb 15 08:44:22 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 15 14:52:01 2024 +0100

Work around some Clang PCH consteval issue by disabling HAVE_CPP_CONSTEVAL

(see the links in the configure.ac check for details)

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

diff --git a/configure.ac b/configure.ac
index 48b325790b80..aca1d243ced5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14724,6 +14724,7 @@ dnl 
`cast(getOperand(1)->getType())->isOpaqueOrPointeeTypeMatches(g
 dnl && "Ptr must be a pointer to Val type!"' failed." (which should be fixed 
since Clang 17), or
 dnl 
<https://developercommunity.visualstudio.com/t/Bogus-error-C2440-with-consteval-constru/10579616>
 dnl "Bogus error C2440 with consteval constructor (/std:c++20)":
+have_cpp_consteval=
 AC_LANG_PUSH([C++])
 save_CXX=$CXX
 if test "$COM" = MSC && test "$COM_IS_CLANG" != TRUE; then
@@ -14783,12 +14784,45 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([
 ], [
 return (s.i == 1) ? 0 : 1;
 ])], [
-AC_DEFINE([HAVE_CPP_CONSTEVAL],[1])
+have_cpp_consteval=1
 AC_MSG_RESULT([yes])
 ], [AC_MSG_RESULT([no])], [AC_MSG_RESULT([assumed no (cross compiling)])])
 CXX=$save_CXX
 CXXFLAGS=$save_CXXFLAGS
 AC_LANG_POP([C++])
+if test -n "$have_cpp_consteval" && test "$COM_IS_CLANG" = TRUE && test -n 
"$BUILDING_PCH_WITH_OBJ"
+then
+AC_MSG_CHECKING([whether $CXX_BASE has working consteval in combination 
with PCH])
+dnl ...that does not suffer from 
<https://github.com/llvm/llvm-project/issues/81745> "undefined
+dnl reference to consteval constructor exported from module" (which also 
affects PCH, see
+dnl 
<https://lists.freedesktop.org/archives/libreoffice/2024-February/091564.html> 
"Our Clang
+dnl --enable-pch setup is known broken"):
+printf 'export module M;
export struct S1 { consteval S1(int) {} };' >conftest.cppm
+$CXX $CXXFLAGS $CXXFLAGS_CXX11 --precompile conftest.cppm
+rm conftest.cppm
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+save_LDFLAGS=$LDFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+LDFLAGS="$LDFLAGS -fmodule-file=M=conftest.pcm conftest.pcm"
+AC_LINK_IFELSE([AC_LANG_PROGRAM([
+import M;
+], [
+struct S2 { S1 s = 0; };
+S2 s;
+])], [
+AC_MSG_RESULT([yes])
+], [
+have_cpp_consteval=
+AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+LDFLAGS=$save_LDFLAGS
+AC_LANG_POP([C++])
+rm confetst.pcm
+fi
+if test -n "$have_cpp_consteval"; then
+AC_DEFINE([HAVE_CPP_CONSTEVAL],[1])
+fi
 
 AC_MSG_CHECKING([whether $CXX_BASE supports a working C++20 std::strong_order])
 dnl ...which is known to not be implemented in libc++ prior to


core.git: solenv/gbuild static/emscripten static/source

2024-02-15 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |1 
 static/emscripten/registeroustring.js  |   56 
 static/source/unoembindhelpers/PrimaryBindings.cxx |   58 +++--
 3 files changed, 55 insertions(+), 60 deletions(-)

New commits:
commit 52a22b6863c08b071361fa9c212b886e1e48500b
Author: Stephan Bergmann 
AuthorDate: Wed Feb 14 15:29:13 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 15 10:58:47 2024 +0100

Fold registeroustring.js into PrimaryBindings.cxx

Change-Id: I2e1aa828f194a104d354741518e8cb20015ac276
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163385
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 f3bb7d7c6c27..8a36e425ce7a 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -14,7 +14,6 @@ include $(GBUILDDIR)/platform/unxgcc.mk
 # don't sort; later can override previous settings!
 gb_EMSCRIPTEN_PRE_JS_FILES = \
 $(SRCDIR)/static/emscripten/environment.js \
-$(SRCDIR)/static/emscripten/registeroustring.js \
 $(call 
gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.link \
 
 gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
diff --git a/static/emscripten/registeroustring.js 
b/static/emscripten/registeroustring.js
deleted file mode 100644
index 0abd522ca98e..
--- a/static/emscripten/registeroustring.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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/.
- */
-
-if (!('preRun' in Module)) Module['preRun'] = [];
-Module.preRun.push(function() {
-// Wait until Embind is set up:
-Module.addOnPreMain(function() {
-Module.registerType(Module.getOUStringRawType(), {
-name: 'rtl::OUString',
-'fromWireType'(ptr) {
-let data = Module.HEAPU32[ptr >> 2];
-let length = Module.HEAPU32[(data >> 2) + 1];
-let buffer = data + 8;
-let str = '';
-for (let i = 0; i < length; ++i) {
-let c = Module.HEAPU16[(buffer >> 1) + i];
-str += String.fromCharCode(c);
-}
-Module.rtl_uString_release(data);
-Module._free(ptr);
-return str;
-},
-'toWireType'(destructors, value) {
-if (typeof value != 'string') {
-Module.throwBindingError('Cannot pass non-string to C++ 
OUString');
-}
-let data = Module._malloc(8 + (value.length + 1) * 2);
-Module.HEAPU32[data >> 2] = 1;
-Module.HEAPU32[(data >> 2) + 1] = value.length;
-let buffer = data + 8;
-for (let i = 0; i < value.length; ++i) {
-Module.HEAPU16[(buffer >> 1) + i] = value.charCodeAt(i);
-}
-Module.HEAPU16[(buffer >> 1) + value.length] = 0;
-let ptr = Module._malloc(4);
-Module.HEAPU32[ptr >> 2] = data;
-if (destructors !== null) {
-destructors.push(Module._free, ptr);
-}
-return ptr;
-},
-'argPackAdvance': 8,
-'readValueFromPointer'(pointer) {
-return this['fromWireType'](Module.HEAPU32[((pointer)>>2)]);
-},
-destructorFunction(ptr) {
-Module._free(ptr);
-},
-});
-});
-});
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index ee4998988c19..0a27162c3ef1 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -9,6 +9,7 @@
 #ifdef EMSCRIPTEN
 #include 
 
+#include 
 #include 
 
 #include 
@@ -22,6 +23,58 @@
 using namespace emscripten;
 using namespace css::uno;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winvalid-pp-token"
+EM_JS(void, jsRegisterString, (std::type_info const* raw),
+// clang-format off
+{
+Module.registerType(raw, {
+name: 'rtl::OUString',
+fromWireType(ptr) {
+let data = Module.HEAPU32[ptr >> 2];
+let length = Module.HEAPU32[(data >> 2) + 1];
+let buffer = data + 8;
+let str = '';
+for (let i = 0; i < length; ++i) {
+let c = Module.HEAPU16[(buffer >> 1) + i];
+str += String.fromCharCode(c);

Re: Our Clang --enable-pch setup is known broken

2024-02-14 Thread Stephan Bergmann

On 2/13/24 16:39, Stephan Bergmann wrote:
Maybe somebody has the inclination to dig into our artisanal approach 
and fix it (I assume that would involve fixing the underlying Clang 
machinery that we tap into there), or rework gbuild to use Clang's 
documented PCH approach.  Otherwise, I'd suggest to stick to the tried 
and tested approach of not trying to use PCH in the first place...


or <https://gerrit.libreoffice.org/c/core/+/163422> "Work around some 
Clang PCH consteval issue by disabling HAVE_CPP_CONSTEVAL" to the 
rescue, for now


core.git: Branch 'feature/cib_contract891c' - translations

2024-02-14 Thread Stephan Bergmann (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8015740d5ea58e88f16350b13fba176322702fae
Author: Stephan Bergmann 
AuthorDate: Wed Feb 14 14:23:34 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Wed Feb 14 14:23:34 2024 +0100

Update git submodules

* Update translations from branch 'feature/cib_contract891c'
  to 344c4f04c017df491bb59f62e2d622b293749590
  - German translation for STR_DANGEROUS_TO_OPEN

diff --git a/translations b/translations
index 90099e80a00e..344c4f04c017 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 90099e80a00e6780196777110a5614e0619db2cf
+Subproject commit 344c4f04c017df491bb59f62e2d622b293749590


translations.git: Changes to 'feature/cib_contract891c'

2024-02-14 Thread Stephan Bergmann (via logerrit)
New branch 'feature/cib_contract891c' available with the following commits:
commit 344c4f04c017df491bb59f62e2d622b293749590
Author: Stephan Bergmann 
Date:   Wed Feb 14 13:12:27 2024 +0100

German translation for STR_DANGEROUS_TO_OPEN



Our Clang --enable-pch setup is known broken

2024-02-13 Thread Stephan Bergmann
As recently discovered (see e.g. the comment at 
 
"ITEM: ItemPool Rework (I)"), our artisanal approach at implementing 
--enable-pch for Clang is apparently broken.


With a stripped-down


$ cat test.h
#pragma once
struct S1 { consteval S1(int) {} };



$ cat test-pch.h
#include "test.h"


$ cat test-pch.cc 
#include "test-pch.h"


$ cat test-main.cc 
#include "test.h"

int main() {
struct S2 { S1 s = 0; };
S2 s;
}


the documented (at 
) way 
of using PCH with



$ clang++ -std=c++20 -x c++-header test-pch.h -o test.pch
$ clang++ -std=c++20 -c test-main.cc -include-pch test.pch
$ clang++ test-main.o


works fine, whereas our gbuild machinery of effectively doing


$ clang++ -std=c++20 -x c++-header -Xclang -emit-pch -Xclang -fno-pch-timestamp 
-fpch-instantiate-templates -Xclang -building-pch-with-obj -fpch-debuginfo 
-fpch-codegen -c test-pch.h -o test.pch
$ clang++ -std=c++20 -c test-pch.cc -include-pch test.pch -Xclang 
-building-pch-with-obj -ffunction-sections -fdata-sections
$ clang++ -std=c++20 -c test-main.cc -include-pch test.pch
$ clang++ test-pch.o test-main.o
/usr/bin/ld: test-main.o: in function `main::S2::S2()':
test-main.cc:(.text+0x33): undefined reference to `S1::S1(int)'
clang++: error: linker command failed with exit code 1 (use -v to see 
invocation)


does not.

Maybe somebody has the inclination to dig into our artisanal approach 
and fix it (I assume that would involve fixing the underlying Clang 
machinery that we tap into there), or rework gbuild to use Clang's 
documented PCH approach.  Otherwise, I'd suggest to stick to the tried 
and tested approach of not trying to use PCH in the first place...


core.git: sal/rtl

2024-02-13 Thread Stephan Bergmann (via logerrit)
 sal/rtl/bootstrap.cxx |   33 -
 1 file changed, 16 insertions(+), 17 deletions(-)

New commits:
commit 7bea643b8b09e27852dbd68459289873e2989feb
Author: Stephan Bergmann 
AuthorDate: Tue Feb 13 08:18:27 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 13 12:56:00 2024 +0100

Fix mis-merge from 8b53fa726e0d496f18228b0ca9ce2f61196f6a57

"Introduce a fundamental.override.ini for bootstrap variables"

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

diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 485d582cc875..a0fa9f3c2000 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -219,19 +219,18 @@ static OUString getIniFileName(bool overriding) {
 fileName = OUString(inifile, strlen(inifile), RTL_TEXTENCODING_UTF8);
 resolvePathnameUrl();
 #elif defined ANDROID
-// Apps are self-contained on Android, too, can as well hardcode
-// it as "rc" in the "/assets" directory, i.e.  inside the app's
-// .apk (zip) archive as the /assets/rc file.
-fileName = overriding
-? 
OUString("vnd.sun.star.pathname:/assets/fundamental.override.ini")
-: OUString("vnd.sun.star.pathname:/assets/rc");
-fileName = OUString("vnd.sun.star.pathname:/assets/rc");
-resolvePathnameUrl();
+// Apps are self-contained on Android, too, can as well hardcode
+// it as "rc" in the "/assets" directory, i.e.  inside the app's
+// .apk (zip) archive as the /assets/rc file.
+fileName = overriding
+? OUString("vnd.sun.star.pathname:/assets/fundamental.override.ini")
+: OUString("vnd.sun.star.pathname:/assets/rc");
+resolvePathnameUrl();
 #elif defined(EMSCRIPTEN)
-fileName = overriding
-? 
OUString("vnd.sun.star.pathname:/instdir/program/fundamental.override.ini")
-: OUString("vnd.sun.star.pathname:/instdir/program/sofficerc");
-resolvePathnameUrl();
+fileName = overriding
+? 
OUString("vnd.sun.star.pathname:/instdir/program/fundamental.override.ini")
+: OUString("vnd.sun.star.pathname:/instdir/program/sofficerc");
+resolvePathnameUrl();
 #else
 if (!overriding && getFromCommandLineArgs("INIFILENAME", ))
 {
@@ -265,11 +264,11 @@ static OUString getIniFileName(bool overriding) {
 }
 
 #ifdef MACOSX
-// We keep only executables in the MacOS folder, and all
-// rc files in LIBO_ETC_FOLDER (typically "Resources").
-sal_Int32 off = fileName.lastIndexOf( "/MacOS/" );
-if (off != -1)
-fileName = fileName.replaceAt(off + 1, strlen("MacOS"), u"" 
LIBO_ETC_FOLDER);
+// We keep only executables in the MacOS folder, and all
+// rc files in LIBO_ETC_FOLDER (typically "Resources").
+sal_Int32 off = fileName.lastIndexOf( "/MacOS/" );
+if (off != -1)
+fileName = fileName.replaceAt(off + 1, strlen("MacOS"), u"" 
LIBO_ETC_FOLDER);
 #endif
 }
 #endif


core.git: desktop/win32 vcl/win

2024-02-12 Thread Stephan Bergmann (via logerrit)
 desktop/win32/source/loader.cxx |   33 +
 vcl/win/window/salframe.cxx |   39 ++-
 2 files changed, 71 insertions(+), 1 deletion(-)

New commits:
commit ebd3f0971b843527ed493a35b2303c8c15b94109
Author: Stephan Bergmann 
AuthorDate: Fri Jan 26 13:45:01 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 13 08:11:57 2024 +0100

Fall back to old bootstrap.ini [Win32] section, for backwards compatibility

Change-Id: I629b2a16bc889f16595cd1718d2ee4535f31aed7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162602
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit fe459b9595c851d00a861d595c8dd50b35c90be3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163255
Tested-by: Jenkins

diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx
index 998eb189effc..bbc97a462724 100644
--- a/desktop/win32/source/loader.cxx
+++ b/desktop/win32/source/loader.cxx
@@ -218,6 +218,8 @@ int officeloader_impl(bool bAllowConsole)
 // read limit values from fundamental.override.ini
 unsigned int nMaxMemoryInMB = 0;
 bool bExcludeChildProcesses = true;
+bool fallbackForMaxMemoryInMB = true;
+bool fallbackForExcludeChildProcesses = true;
 
 const WCHAR* szIniFile = L"\fundamental.override.ini";
 const size_t nDirLen = wcslen(szIniDirectory);
@@ -233,13 +235,44 @@ int officeloader_impl(bool bAllowConsole)
 std::ifstream aFile(szBootstrapIni);
 boost::property_tree::ini_parser::read_ini(aFile, pt);
 nMaxMemoryInMB = pt.get("Bootstrap.LimitMaximumMemoryInMB", 
nMaxMemoryInMB);
+fallbackForMaxMemoryInMB = 
!pt.get_child_optional("Bootstrap.LimitMaximumMemoryInMB");
 bExcludeChildProcesses = 
pt.get("Bootstrap.ExcludeChildProcessesFromLimit", bExcludeChildProcesses);
+fallbackForExcludeChildProcesses
+= 
!pt.get_child_optional("Bootstrap.ExcludeChildProcessesFromLimit");
 }
 catch (...)
 {
 nMaxMemoryInMB = 0;
 }
 }
+// For backwards compatibility, for now also try to read the values from 
bootstrap.ini if
+// fundamental.override.ini does not provide them:
+if (fallbackForMaxMemoryInMB || fallbackForExcludeChildProcesses) {
+const WCHAR* szFallbackIniFile = L"\bootstrap.ini";
+const size_t nFallbackDirLen = wcslen(szIniDirectory);
+if (wcslen(szFallbackIniFile) + nFallbackDirLen < MAX_PATH)
+{
+WCHAR szBootstrapIni[MAX_PATH];
+wcscpy(szBootstrapIni, szIniDirectory);
+wcscpy([nFallbackDirLen], szFallbackIniFile);
+
+try
+{
+boost::property_tree::ptree pt;
+std::ifstream aFile(szBootstrapIni);
+boost::property_tree::ini_parser::read_ini(aFile, pt);
+if (fallbackForMaxMemoryInMB) {
+nMaxMemoryInMB = pt.get("Win32.LimitMaximumMemoryInMB", 
nMaxMemoryInMB);
+}
+if (fallbackForExcludeChildProcesses) {
+bExcludeChildProcesses = 
pt.get("Win32.ExcludeChildProcessesFromLimit", bExcludeChildProcesses);
+}
+}
+catch (...)
+{
+}
+}
+}
 
 // create a Windows JobObject with a memory limit
 HANDLE hJobObject = nullptr;
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 121596eb5b8c..797b5a80fc14 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -32,6 +32,12 @@
 
 #include 
 
+#include 
+#include 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -1948,7 +1954,38 @@ static bool EnableAttachThreadInputHack()
 {
 OUString s("$EnableAttachThreadInputHack");
 rtl::Bootstrap::expandMacros(s);
-const bool bEnabled = s == "true";
+bool bEnabled;
+if (!s.isEmpty()) {
+bEnabled = s == "true";
+} else {
+// For backwards compatibility, for now also try to read the value 
from a [Win32] section of
+// bootstrap.ini if it is not set as a boostrap variable:
+bEnabled = false;
+OUString aBootstrapUri;
+if (osl_getProcessWorkingDir() == 
osl_Process_E_None) {
+aBootstrapUri += "/bootstrap.ini";
+
+OUString aSystemFileName;
+if (osl::FileBase::getSystemPathFromFileURL(aBootstrapUri, 
aSystemFileName)
+== osl::FileBase::E_None
+&& aSystemFileName.getLength() <= MAX_PATH)
+{
+// this uses the Boost ini parser, instead of tools::Config, 
as we already use it to
+// read other values from bootstrap.ini in 
desktop

core.git: desktop/win32

2024-02-12 Thread Stephan Bergmann (via logerrit)
 desktop/win32/source/loader.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c84e8a14e476a70989e66df142e7b2426df02617
Author: Stephan Bergmann 
AuthorDate: Tue Jan 16 14:55:03 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 12 20:37:52 2024 +0100

Search for load-time variables in fundamental.override.ini

...instead of arbitrarily cramming them into bootstrap.ini.  (And don't 
force
those ini-files to have an additional [Win32] section, when
include/rtl/bootstrap.h demands that "An ini-file is only allowed to have 
one
section, which must be named `[Bootstrap]` with the square brackets.")

Change-Id: I732bf9d771ea309eccd35b6db0f565a0c56a3c3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162188
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 50b14f26de63d22b9ad05ca51d9edc53e024e75e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163252
Tested-by: Jenkins

diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx
index b730d4119695..998eb189effc 100644
--- a/desktop/win32/source/loader.cxx
+++ b/desktop/win32/source/loader.cxx
@@ -215,11 +215,11 @@ int officeloader_impl(bool bAllowConsole)
 bool fSuccess = false;
 bool bFirst = true;
 
-// read limit values from bootstrap.ini
+// read limit values from fundamental.override.ini
 unsigned int nMaxMemoryInMB = 0;
 bool bExcludeChildProcesses = true;
 
-const WCHAR* szIniFile = L"\bootstrap.ini";
+const WCHAR* szIniFile = L"\fundamental.override.ini";
 const size_t nDirLen = wcslen(szIniDirectory);
 if (wcslen(szIniFile) + nDirLen < MAX_PATH)
 {
@@ -232,8 +232,8 @@ int officeloader_impl(bool bAllowConsole)
 boost::property_tree::ptree pt;
 std::ifstream aFile(szBootstrapIni);
 boost::property_tree::ini_parser::read_ini(aFile, pt);
-nMaxMemoryInMB = pt.get("Win32.LimitMaximumMemoryInMB", 
nMaxMemoryInMB);
-bExcludeChildProcesses = 
pt.get("Win32.ExcludeChildProcessesFromLimit", bExcludeChildProcesses);
+nMaxMemoryInMB = pt.get("Bootstrap.LimitMaximumMemoryInMB", 
nMaxMemoryInMB);
+bExcludeChildProcesses = 
pt.get("Bootstrap.ExcludeChildProcessesFromLimit", bExcludeChildProcesses);
 }
 catch (...)
 {


core.git: vcl/win

2024-02-12 Thread Stephan Bergmann (via logerrit)
 vcl/win/window/salframe.cxx |   39 ++-
 1 file changed, 6 insertions(+), 33 deletions(-)

New commits:
commit 6047341fd5933ba96a07a0fc7c4b8ae1fb0e73d5
Author: Stephan Bergmann 
AuthorDate: Tue Jan 16 14:59:16 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 12 20:29:08 2024 +0100

EnableAttachThreadInputHack can be a normal bootstrap variable

(For simplicity, only treat a value of exactly "true" as enabling it, not
whatever else the original Boost property_tree code might have considered as
equivalent to "true".)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162189
    Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit b5ed6906bd215f1338ae49e33d484350a26cb25f)
Conflicts:
vcl/win/window/salframe.cxx

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

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 313ae0ffcf2d..121596eb5b8c 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -32,12 +32,7 @@
 
 #include 
 
-#include 
-#include 
-#include 
-#include 
-#include 
-
+#include 
 #include 
 #include 
 #include 
@@ -1951,33 +1946,11 @@ void WinSalFrame::SetAlwaysOnTop( bool bOnTop )
 
 static bool EnableAttachThreadInputHack()
 {
-OUString aBootstrapUri;
-if (osl_getProcessWorkingDir() != osl_Process_E_None)
-return false;
-aBootstrapUri += "/bootstrap.ini";
-
-OUString aSystemFileName;
-if (osl::FileBase::getSystemPathFromFileURL(aBootstrapUri, 
aSystemFileName) != osl::FileBase::E_None)
-return false;
-if (aSystemFileName.getLength() > MAX_PATH)
-return false;
-
-// this uses the Boost ini parser, instead of tools::Config, as we already 
use it to read other
-// values from bootstrap.ini in desktop/win32/source/loader.cxx, because 
that watchdog process
-// can't access LO libs. This way the handling is consistent.
-try
-{
-boost::property_tree::ptree pt;
-std::ifstream aFile(o3tl::toW(aSystemFileName.getStr()));
-boost::property_tree::ini_parser::read_ini(aFile, pt);
-const bool bEnabled = pt.get("Win32.EnableAttachThreadInputHack", 
false);
-SAL_WARN_IF(bEnabled, "vcl", "AttachThreadInput hack is enabled. Watch 
out for deadlocks!");
-return bEnabled;
-}
-catch (...)
-{
-return false;
-}
+OUString s("$EnableAttachThreadInputHack");
+rtl::Bootstrap::expandMacros(s);
+const bool bEnabled = s == "true";
+SAL_WARN_IF(bEnabled, "vcl", "AttachThreadInput hack is enabled. Watch out 
for deadlocks!");
+return bEnabled;
 }
 
 static void ImplSalToTop( HWND hWnd, SalFrameToTop nFlags )


core.git: sal/rtl

2024-02-12 Thread Stephan Bergmann (via logerrit)
 sal/rtl/bootstrap.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a993b2823a106d15a50005567266acfe2f65e28f
Author: Stephan Bergmann 
AuthorDate: Fri Jan 26 12:43:37 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 12 19:43:06 2024 +0100

Log uses of fundamental.override.ini

Change-Id: I36fa44b063a439edf5411a89f76ec342b1388351
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162601
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 6d553405101090ef7a7ff5270e5ef32aa41bd9b3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163254
Tested-by: Jenkins

diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 27773e8a3b42..485d582cc875 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -479,7 +479,10 @@ bool Bootstrap_Impl::getValue(
 
 if (_override_base_ini != nullptr
 && _override_base_ini->getDirectValue(key, value, mode, requestStack))
+{
+SAL_INFO("sal.bootstrap", "getValue(" << key << ") from 
fundamental.override.ini");
 return true;
+}
 
 if (key == "_OS")
 {


core.git: include/rtl sal/rtl

2024-02-12 Thread Stephan Bergmann (via logerrit)
 include/rtl/bootstrap.h |   14 +++---
 sal/rtl/bootstrap.cxx   |  112 ++--
 2 files changed, 89 insertions(+), 37 deletions(-)

New commits:
commit 8b53fa726e0d496f18228b0ca9ce2f61196f6a57
Author: Stephan Bergmann 
AuthorDate: Tue Jan 16 14:41:21 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 12 19:02:13 2024 +0100

Introduce a fundamental.override.ini for bootstrap variables

...that is looked for next to the application and, when present, overrides 
all
the other ways of setting bootstrap variables.  LibreOffice itself does not
bring along such a fundamental.override.ini, but it can be convenient for an
administrator to place one in the installation (which can then not be 
modified
or overridden by end users).

(For convenience, the naming of this ini-file starts to deviate from the 
old and
rather pointless tradition of naming our ini-files *rc vs. *.ini on 
different
platforms.)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162187
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit f4d376e9a10a8c66f7f6ecfe6a1f4763c1927b52)
Conflicts:
sal/rtl/bootstrap.cxx

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

diff --git a/include/rtl/bootstrap.h b/include/rtl/bootstrap.h
index e532cd0e3dac..b4d85305987b 100644
--- a/include/rtl/bootstrap.h
+++ b/include/rtl/bootstrap.h
@@ -45,27 +45,29 @@ extern "C" {
the next level is tried. Every query starts at the first level again, so
that one setting may be taken from the 3rd and one from the 1st level.
 
-   1st level: explicitly set variables via rtl_bootstrap_set()
+   1st level: a fundamental.override.ini next to the application
 
-   2nd level: command line arguments. A `-env:SETTINGNAME=value` is given on
+   2nd level: explicitly set variables via rtl_bootstrap_set()
+
+   3rd level: command line arguments. A `-env:SETTINGNAME=value` is given on
command line. This allows giving an application a certain setting, even
if an ini-file exists (especially useful for e.g. daemons that want to
start an executable with dynamical changing settings).
 
-   3rd level: environment variables. The application tries to get the
+   4th level: environment variables. The application tries to get the
setting from the environment.
 
-   4th level: executable ini-file. Every application looks for an ini-file.
+   5th level: executable ini-file. Every application looks for an ini-file.
The filename defaults to `/absolute/path/to/executable[rc|.ini]`
without .bin or .exe suffix. The ini-filename can be
set by the special command line parameter
`-env:INIFILENAME=/absolute/path/to/inifile` at runtime or it may
be set at compile time by an API-call.
 
-   5th level: URE_BOOTSTRAP ini-file. If the bootstrap variable URE_BOOTSTRAP
+   6th level: URE_BOOTSTRAP ini-file. If the bootstrap variable URE_BOOTSTRAP
expands to the URL of an ini-file, that ini-file is searched.
 
-   6th level: default. An application can have some default settings decided
+   7th level: default. An application can have some default settings decided
at compile time, which allow the application to run even with no
deployment settings.
 
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index a3ada36a4439..27773e8a3b42 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -207,37 +207,44 @@ static void getExecutableDirectory_Impl(rtl_uString ** 
ppDirURL)
 rtl_uString_newFromStr_WithLength(ppDirURL,fileName.getStr(),nDirEnd);
 }
 
-static OUString & getIniFileName_Impl()
-{
-static OUString aStaticName = []() {
-OUString fileName;
+static OUString getIniFileName(bool overriding) {
+OUString fileName;
 
 #if defined IOS
-// On iOS hardcode the inifile as "rc" in the .app
-// directory. Apps are self-contained anyway, there is no
-// possibility to have several "applications" in the same
-// installation location with different inifiles.
-const char *inifile = [[@"vnd.sun.star.pathname:" 
stringByAppendingString: [[[NSBundle mainBundle] bundlePath] 
stringByAppendingPathComponent: @"rc"]] UTF8String];
-fileName = OUString(inifile, strlen(inifile), RTL_TEXTENCODING_UTF8);
-resolvePathnameUrl();
+// On iOS hardcode the inifile as "rc" in the .app
+// directory. Apps are self-contained anyway, there is no
+// possibility to have several "applications" in the same
+// installation location with different inifiles.
+const char *inifile = [[@"vnd.sun.star.pathname:" stringByAppendingString: 
[[[NSBundle mainBundle] bundlePath] stringByAppendingPathCompone

core.git: external/pdfium

2024-02-12 Thread Stephan Bergmann (via logerrit)
 external/pdfium/UnpackedTarball_pdfium.mk |2 ++
 external/pdfium/include.patch |   10 ++
 2 files changed, 12 insertions(+)

New commits:
commit 8a52cc8972efc428e67f323cd3d5646d9970ce22
Author: Stephan Bergmann 
AuthorDate: Mon Feb 12 10:08:47 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 12 15:31:38 2024 +0100

external/pdfium: Missing include (std::abs)

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

diff --git a/external/pdfium/UnpackedTarball_pdfium.mk 
b/external/pdfium/UnpackedTarball_pdfium.mk
index f8d95d2785c7..340036822e88 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -18,6 +18,8 @@ pdfium_patches += constexpr-template.patch
 
 pdfium_patches += system-abseil.diff
 
+pdfium_patches += include.patch
+
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,pdfium,$(PDFIUM_TARBALL)))
diff --git a/external/pdfium/include.patch b/external/pdfium/include.patch
new file mode 100644
index ..0ea8b14c0ed8
--- /dev/null
+++ b/external/pdfium/include.patch
@@ -0,0 +1,10 @@
+--- core/fxge/dib/blend.cpp
 core/fxge/dib/blend.cpp
+@@ -7,6 +7,7 @@
+ #include "core/fxge/dib/blend.h"
+ 
+ #include 
++#include 
+ 
+ #include "core/fxge/dib/fx_dib.h"
+ #include "third_party/base/check_op.h"


core.git: compilerplugins/clang

2024-02-11 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/includeform.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 2b93f4de13e67e91fb86376dc2633051444e85f0
Author: Stephan Bergmann 
AuthorDate: Sun Feb 11 15:27:06 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Feb 11 19:59:03 2024 +0100

Adapt to modified clang::PPCallbacks::InclusionDirective

...in LLVM 19 trunk

<https://github.com/llvm/llvm-project/commit/da95d926f6fce4ed9707c77908ad96624268f134>
"[clang][lex] Always pass suggested module to `InclusionDirective()` 
callback
(#81061)"

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

diff --git a/compilerplugins/clang/includeform.cxx 
b/compilerplugins/clang/includeform.cxx
index da955c20d3bb..173f9e28841b 100644
--- a/compilerplugins/clang/includeform.cxx
+++ b/compilerplugins/clang/includeform.cxx
@@ -36,7 +36,11 @@ private:
 #else
 FileEntry const * File,
 #endif
-StringRef SearchPath, StringRef, clang::Module const *, 
SrcMgr::CharacteristicKind) override
+StringRef SearchPath, StringRef, clang::Module const *,
+#if CLANG_VERSION >= 19
+bool,
+#endif
+SrcMgr::CharacteristicKind) override
 {
 if (ignoreLocation(HashLoc)) {
 return;


core.git: configure.ac

2024-02-11 Thread Stephan Bergmann (via logerrit)
 configure.ac |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4179056285395319d5fd5af77090359fc8b874a8
Author: Stephan Bergmann 
AuthorDate: Sun Feb 11 13:10:21 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Feb 11 15:26:04 2024 +0100

Fix quoting of [ ]

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

diff --git a/configure.ac b/configure.ac
index 721851c52d87..e6c35380e91d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14767,13 +14767,13 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([
 auto s5 = S5().f();
 
 struct S6 {
-consteval S6(char const ()[2]) {
-buf[0] = lit[0];
-buf[1] = lit[1];
+consteval S6(char const ()[[2]]) {
+buf[[0]] = lit[[0]];
+buf[[1]] = lit[[1]];
 }
 union {
 int x;
-char buf[2];
+char buf[[2]];
 };
 };
 void f6() { S6("a"); }


core.git: sal/inc sal/osl

2024-02-11 Thread Stephan Bergmann (via logerrit)
 sal/inc/oslrandom.h|2 +-
 sal/osl/unx/random.cxx |2 +-
 sal/osl/w32/random.cxx |   10 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit d248a7131ff495fb817cc4963298363b9e1b2008
Author: Stephan Bergmann 
AuthorDate: Sun Feb 11 11:12:57 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Feb 11 13:16:07 2024 +0100

osl_get_system_random_data should return bool

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

diff --git a/sal/inc/oslrandom.h b/sal/inc/oslrandom.h
index b65878433225..891277bba675 100644
--- a/sal/inc/oslrandom.h
+++ b/sal/inc/oslrandom.h
@@ -16,7 +16,7 @@
 extern "C" {
 #endif
 
-int osl_get_system_random_data(char* buffer, size_t desired_len);
+bool osl_get_system_random_data(char* buffer, size_t desired_len);
 
 #if defined __cplusplus
 }
diff --git a/sal/osl/unx/random.cxx b/sal/osl/unx/random.cxx
index e8379f8f0bf7..fbb2d7dedb90 100644
--- a/sal/osl/unx/random.cxx
+++ b/sal/osl/unx/random.cxx
@@ -14,7 +14,7 @@
 #include 
 #include 
 
-int osl_get_system_random_data(char* buffer, size_t desired_len)
+bool osl_get_system_random_data(char* buffer, size_t desired_len)
 {
 int fd;
 
diff --git a/sal/osl/w32/random.cxx b/sal/osl/w32/random.cxx
index a2c364da2ebb..27ee14fdd6d4 100644
--- a/sal/osl/w32/random.cxx
+++ b/sal/osl/w32/random.cxx
@@ -14,7 +14,7 @@
 
 #include 
 
-int osl_get_system_random_data(char* buffer, size_t desired_len)
+bool osl_get_system_random_data(char* buffer, size_t desired_len)
 {
 unsigned int val;
 
@@ -29,7 +29,7 @@ int osl_get_system_random_data(char* buffer, size_t 
desired_len)
 }
 if (rand_s())
 {
-return 0;
+return false;
 }
 memcpy(buffer, , len);
 buffer += len;
@@ -40,7 +40,7 @@ int osl_get_system_random_data(char* buffer, size_t 
desired_len)
 {
 if (rand_s(reinterpret_cast(buffer)))
 {
-return 0;
+return false;
 }
 else
 {
@@ -53,11 +53,11 @@ int osl_get_system_random_data(char* buffer, size_t 
desired_len)
 {
 if (rand_s())
 {
-return 0;
+return false;
 }
 memcpy(buffer, , desired_len);
 }
-return 1;
+return true;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


Re: build broken

2024-02-09 Thread Stephan Bergmann

On 2/9/24 12:29, Regis Perdreau wrote:

It works,


I'm not sure what exactly works.  You manually changed the generated 
config_host/config_global.h from



#define HAVE_CPP_STRONG_ORDER 1


to


#define HAVE_CPP_STRONG_ORDER 0


and then a following `make` worked?  That's bad, it would mean the 
relevant code in configure.ac from 
 
"double operator < is not a strict weak ordering due to NaN" does not 
work as intended for your setup.  However, to get it fixed (unless you 
can do so yourself), we'd need to, for a start, get answers to the 
questions I had earlier:



What platform are you building on?  What compiler and what version of
that compiler are you using (Clang, GCC, ...)?  What standard library
and what version of that standard library are you using (LLVM's libc++,
GNU's libstdc++, ...)?


Re: build broken

2024-02-09 Thread Stephan Bergmann

On 2/9/24 11:00, Regis Perdreau wrote:

time to time, the master libreoffice build is broken


What platform are you building on?  What compiler and what version of 
that compiler are you using (Clang, GCC, ...)?  What standard library 
and what version of that standard library are you using (LLVM's libc++, 
GNU's libstdc++, ...)?  I assume your config_host/config_global.h has a line



#define HAVE_CPP_STRONG_ORDER 1


with a "1" there and not a "0", right?

(And next time, it would be helpful if you could copy any build output 
into your email in a way that preserves line breaks; e.g. by using 
non-HTML plain-text email and each line of the build output quoted with 
"> " in front of it.)


core.git: bridges/source

2024-02-08 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx |4 
 bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx|1 +
 2 files changed, 5 insertions(+)

New commits:
commit b3fa6e6e65031f92d7f13b44f8422fe4aa07e2f9
Author: Stephan Bergmann 
AuthorDate: Thu Feb 8 19:38:45 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Feb 9 01:36:54 2024 +0100

Fix missing includes

...after f93ae0455c4d515be1ca663725a6e58d64a7e393 "Check bridges with IWYU"

Change-Id: I01ca7b015cb9f4fc1dbff099c52e8240e1517270
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163126
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index eb57c2ac92c5..14673ab7d5e2 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -35,6 +35,10 @@
 #include "call.hxx"
 #include "share.hxx"
 
+#if !ENABLE_RUNTIME_OPTIMIZATIONS
+#include "rtti.hxx"
+#endif
+
 using namespace ::com::sun::star::uno;
 
 // Perform the UNO call
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
index eeff17303990..adcf9da801d1 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
@@ -37,6 +37,7 @@
 #include 
 
 #include "rtti.hxx"
+#include "share.hxx"
 
 namespace {
 


core.git: include/o3tl

2024-02-08 Thread Stephan Bergmann (via logerrit)
 include/o3tl/compare.hxx |   26 +++---
 1 file changed, 23 insertions(+), 3 deletions(-)

New commits:
commit c1991a5fb229161b5f2ad3240afc5b2417abe5c9
Author: Stephan Bergmann 
AuthorDate: Thu Feb 8 09:53:04 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 8 22:43:49 2024 +0100

A better approximation of std::strong_order

(Unfortunately, the environments that don't have std::strong_order typically
also don't have std::bit_cast, so we need to approximate that, too.)

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

diff --git a/include/o3tl/compare.hxx b/include/o3tl/compare.hxx
index 27c6b31ac647..2b0db4e5be93 100644
--- a/include/o3tl/compare.hxx
+++ b/include/o3tl/compare.hxx
@@ -12,13 +12,17 @@
 #include 
 
 #include 
+#include 
+#include 
+#include 
+#include 
 
 #include 
 
 namespace o3tl
 {
-// A poor approximation of C++20  std::strong_order, falling back to 
operator <=> (so e.g.
-// not providing a strict weak ordering for floating-point types with NaN):
+// An approximation of C++20  std::strong_order that should work at 
least for IEC559 float
+// and double on platforms that have correspondingly-sized std::int32_t and 
std::int64_t:
 #if HAVE_CPP_STRONG_ORDER
 
 inline constexpr auto strong_order = std::strong_order;
@@ -27,9 +31,25 @@ inline constexpr auto strong_order = std::strong_order;
 
 namespace detail
 {
+template To bit_cast(From val) requires (sizeof 
(To) == sizeof (From)) {
+char buf alignas(To)[sizeof (From)];
+std::memcpy(buf, , sizeof (From));
+return *reinterpret_cast(buf);
+}
+
 struct strong_order
 {
-auto operator()(auto x, auto y) const { return x <=> y; }
+template  auto operator ()(T x, T y) const
+requires std::same_as && std::numeric_limits::is_iec559
+{
+return bit_cast(x) <=> bit_cast(y);
+}
+
+template  auto operator ()(T x, T y) const
+requires std::same_as && std::numeric_limits::is_iec559
+{
+return bit_cast(x) <=> bit_cast(y);
+}
 };
 }
 


core.git: include/static static/source

2024-02-08 Thread Stephan Bergmann (via logerrit)
 include/static/unoembindhelpers/PrimaryBindings.hxx |   23 +++-
 static/source/unoembindhelpers/PrimaryBindings.cxx  |3 +-
 2 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 72056edca078dd010368de15d03321a60c6d5cdd
Author: Stephan Bergmann 
AuthorDate: Wed Feb 7 14:47:54 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 8 09:30:22 2024 +0100

Embind: Allow UNO sequences to be constructed from JS arrays

...though

> let seq = new Module.uno_Sequence_string(["foo", "bar", "baz"]);
> // ...
> delete seq;

is still ugly.

And Embind only allows for overload resolution by number of parameters, not 
by
their type, so using the original sequence constructor had to be changed to

> let seq = new Module.uno_Sequence_string(3, Module.uno_Sequence.FromSize);
> seq.set(0, "foo");
> seq.set(1, "bar");
> seq.set(2, "baz");
> // ...
> delete seq;

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

diff --git a/include/static/unoembindhelpers/PrimaryBindings.hxx 
b/include/static/unoembindhelpers/PrimaryBindings.hxx
index 61efaf01153b..4df301277cc9 100644
--- a/include/static/unoembindhelpers/PrimaryBindings.hxx
+++ b/include/static/unoembindhelpers/PrimaryBindings.hxx
@@ -11,6 +11,8 @@
 
 #include 
 
+#include 
+#include 
 #include 
 
 #include 
@@ -36,6 +38,11 @@ enum class uno_Reference
 FromAny
 };
 
+enum class uno_Sequence
+{
+FromSize
+};
+
 template  struct UnoInOutParam
 {
 UnoInOutParam() {}
@@ -72,7 +79,21 @@ void checkSequenceAccess(css::uno::Sequence const& 
sequence, sal_Int32 index)
 template  void registerSequence(char const* name)
 {
 emscripten::class_>(name)
-.constructor(+[](sal_Int32 size) {
+.constructor(+[](emscripten::val const& members) {
+auto const len = members["length"].as();
+if (len > std::numeric_limits::max())
+{
+throw std::length_error("JavaScript array length too large for 
C++ UNO sequence");
+}
+css::uno::Sequence seq(len);
+auto const p = seq.getArray();
+for (std::uint32_t i = 0; i != len; ++i)
+{
+p[i] = members[i].as();
+}
+return seq;
+})
+.constructor(+[](sal_Int32 size, [[maybe_unused]] uno_Sequence) {
 checkSequenceSize(size);
 return css::uno::Sequence(size);
 })
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index fe3b6e29908f..ee4998988c19 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -46,9 +46,10 @@ Reference getCurrentModelFromViewSh()
 
 EMSCRIPTEN_BINDINGS(PrimaryBindings)
 {
-// Reference bits
 enum_("uno_Reference")
 .value("FromAny", unoembindhelpers::uno_Reference::FromAny);
+enum_("uno_Sequence")
+.value("FromSize", unoembindhelpers::uno_Sequence::FromSize);
 
 // Any
 class_("Any").constructor(+[](const val& rObject, const TypeClass& 
rUnoType) -> Any {


core.git: static/source

2024-02-07 Thread Stephan Bergmann (via logerrit)
 static/source/embindmaker/embindmaker.cxx |   86 +-
 1 file changed, 5 insertions(+), 81 deletions(-)

New commits:
commit 578d9be50413a4bdc809f8b5f58cc177458f8325
Author: Stephan Bergmann 
AuthorDate: Wed Feb 7 17:23:58 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 8 08:36:06 2024 +0100

Embind: Map UNO structs to emscripten::value_object

...so that it has a nicer integration into JS, at the expense of copying 
data
between C++ and JS

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

diff --git a/static/source/embindmaker/embindmaker.cxx 
b/static/source/embindmaker/embindmaker.cxx
index fb6ba0880508..bff11e99b16d 100644
--- a/static/source/embindmaker/embindmaker.cxx
+++ b/static/source/embindmaker/embindmaker.cxx
@@ -378,61 +378,6 @@ void dumpType(std::ostream& out, 
rtl::Reference const& manager,
 }
 }
 
-bool hasStructMembers(rtl::Reference const& manager,
-  rtl::Reference struc)
-{
-for (;;)
-{
-if (!struc->getDirectMembers().empty())
-{
-return true;
-}
-auto const& base = struc->getDirectBase();
-if (base.isEmpty())
-{
-return false;
-}
-auto const ent = manager->getManager()->findEntity(base);
-if (!ent.is() || ent->getSort() != 
unoidl::Entity::SORT_PLAIN_STRUCT_TYPE)
-{
-throw CannotDumpException("bad struct base \"" + base + "\"");
-}
-struc = static_cast(ent.get());
-}
-}
-
-void dumpStructMemberTypes(std::ostream& out, rtl::Reference 
const& manager,
-   rtl::Reference 
struc, bool& first)
-{
-auto const& base = struc->getDirectBase();
-if (!base.isEmpty())
-{
-auto const ent = manager->getManager()->findEntity(base);
-if (!ent.is() || ent->getSort() != 
unoidl::Entity::SORT_PLAIN_STRUCT_TYPE)
-{
-throw CannotDumpException("bad struct base \"" + base + "\"");
-}
-dumpStructMemberTypes(out, manager, 
static_cast(ent.get()),
-  first);
-}
-for (auto const& mem : struc->getDirectMembers())
-{
-if (first)
-{
-first = false;
-}
-else
-{
-out << ", ";
-}
-dumpType(out, manager, mem.type);
-if (passByReference(manager, mem.type))
-{
-out << " const &";
-}
-}
-}
-
 void dumpStructMembers(std::ostream& out, rtl::Reference const& 
manager,
OUString const& name, 
rtl::Reference struc)
 {
@@ -449,15 +394,8 @@ void dumpStructMembers(std::ostream& out, 
rtl::Reference const& man
 }
 for (auto const& mem : struc->getDirectMembers())
 {
-out << "
.property(\"" << mem.name << "\", +[](" << cppName(name)
-<< " const & the_self) { return the_self." << mem.name << "; }, 
+[](" << cppName(name)
-<< " & the_self, ";
-dumpType(out, manager, mem.type);
-if (passByReference(manager, mem.type))
-{
-out << " const &";
-}
-out << " the_value) { the_self." << mem.name << " = the_value; })";
+out << "
.field(\"" << mem.name << "\", &" << cppName(name) << "::" << mem.name
+<< ")";
 }
 }
 
@@ -870,23 +808,9 @@ SAL_IMPLEMENT_MAIN()
 assert(ent->getSort() == unoidl::Entity::SORT_PLAIN_STRUCT_TYPE);
 rtl::Reference const 
strEnt(static_cast(ent.get()));
 dumpRegisterFunctionProlog(cppOut, n);
-cppOut << "::emscripten::class_<" << cppName(str);
-auto const& base = strEnt->getDirectBase();
-if (!base.isEmpty())
-{
-cppOut << ", ::emscripten::base<" << cppName(base) << ">";
-}
-cppOut << ">(\"uno_Type_" << jsName(str)
-   << "\")
"
-  ".constructor()";
-if (hasStructMembers(mgr, strEnt))
-{
-cppOut << "
.constructor<";
-auto first = true;
-dumpStructMemberTypes(cppOut, mgr, strEnt, first);
-cppOut << ">()";
-dumpStructMembers(cppOut, mgr, str, strEnt);
-}
+cppOut << "::emscripten::value_object<" << cppName(str) << 
">(\"uno_Type_"
+   << jsName(str) << "\")";
+dumpStructMembers(cppOut, mgr, str, strEnt);
 cppOut << ";
";
 dumpRegisterFunctionEpilog(cppOut, n);
 for (auto const& mem : strEnt->getDirectMembers())


core.git: 2 commits - chart2/source compilerplugins/clang config_host/config_global.h.in configure.ac include/o3tl solenv/clang-format

2024-02-07 Thread Stephan Bergmann (via logerrit)
 chart2/source/tools/ExplicitCategoriesProvider.cxx |5 ++
 chart2/source/view/main/VDataSeries.cxx|3 +
 compilerplugins/clang/check.cxx|   10 +
 compilerplugins/clang/check.hxx|2 +
 compilerplugins/clang/nullptr.cxx  |9 
 compilerplugins/clang/test/nullptr.cxx |6 +++
 config_host/config_global.h.in |3 +
 configure.ac   |   23 +++
 include/o3tl/compare.hxx   |   41 +
 solenv/clang-format/excludelist|1 
 10 files changed, 100 insertions(+), 3 deletions(-)

New commits:
commit 648878703d26cf73d66d9ac9132b0aa7f551ba28
Author: Stephan Bergmann 
AuthorDate: Wed Feb 7 09:34:10 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 7 21:03:54 2024 +0100

double operator < is not a strict weak ordering due to NaN

...so recent LLVM 19 trunk libc++ in debug mode complained during
CppunitTest_chart2_export3 about

> 
~/llvm/inst/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h:59:
 assertion __comp(*(__first + __a), *(__first + __b)) failed: Your comparator 
is not a valid strict-weak ordering

at

> 5   libsystem_c.dylib   0x000183279a40 abort + 180
> 6   libc++.1.0.dylib0x000101045d98 
_ZNSt3__123__cxx_atomic_notify_oneEPVKv + 0
> 7   libchartcorelo.dylib0x0002f9e05990 
_ZNSt3__135__check_strict_weak_ordering_sortedB8de19IPdNS_6__lessIvvvT_S4_RT0_
 + 732
> 8   libchartcorelo.dylib0x0002f9e055ac 
_ZNSt3__111__sort_implB8de19INS_17_ClassicAlgPolicyENS_11__wrap_iterIPdEENS_6__lessIvvvT0_S7_RT1_
 + 172
> 9   libchartcorelo.dylib0x0002f9e054d4 
_ZNSt3__14sortB8de19INS_11__wrap_iterIPdEENS_6__lessIvvvT_S6_T0_ + 68
> 10  libchartcorelo.dylib0x0002f9e04f94 
_ZNSt3__14sortB8de19INS_11__wrap_iterIPdvT_S4_ + 64
> 11  libchartcorelo.dylib0x0002f9dfea10 
_ZN5chartL22lcl_fillDateCategoriesERKN3com3sun4star3uno9ReferenceINS2_6chart24data13XDataSequenceEEERNSt3__16vectorIdNSB_9allocatorIdbRNS_10ChartModelE
 + 1404
> 12  libchartcorelo.dylib0x0002f9dfe28c 
_ZN5chart26ExplicitCategoriesProvider4initEv + 280
> 13  libchartcorelo.dylib0x0002f9dff0b8 
_ZN5chart26ExplicitCategoriesProvider10isDateAxisEv + 28
> 14  libchartcorelo.dylib0x0002f9bcb738 
_ZN5chart14VSeriesPlotter9addSeriesENSt3__110unique_ptrINS_11VDataSeriesENS1_14default_deleteIS3_iii
 + 200
> 15  libchartcorelo.dylib0x0002f9b951e4 
_ZN5chart8BarChart9addSeriesENSt3__110unique_ptrINS_11VDataSeriesENS1_14default_deleteIS3_iii
 + 280

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

diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx 
b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index 59189aa1931f..7f6de91b6e82 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -32,6 +32,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -460,7 +461,9 @@ static bool lcl_fillDateCategories( const uno::Reference< 
data::XDataSequence >&
 rDateCategories.push_back( 
std::numeric_limits::quiet_NaN() );
 }
 }
-std::sort( rDateCategories.begin(), rDateCategories.end() );
+std::sort(
+rDateCategories.begin(), rDateCategories.end(),
+[](auto x, auto y) { return o3tl::strong_order(x, y) < 0; } );
 }
 
 return bAnyDataFound && bOnlyDatesFound;
commit 56e6d683dba66d4f2f80145064d2bda2ea4b27b1
Author: Stephan Bergmann 
AuthorDate: Wed Feb 7 09:39:27 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 7 21:03:46 2024 +0100

double operator < is not a strict weak ordering due to NaN

...so recent LLVM 19 trunk libc++ in debug mode complained during
CppunitTest_chart2_export2 about

> 
~/llvm/inst/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h:59:
 assertion __comp(*(__first + __a), *(__first + __b)) failed: Your comparator 
is not a valid strict-weak ordering

at

> 5   libsystem_c.dylib   0x000183279a40 abort + 180
> 6   libc++.1.0.dylib0x0001030f9d98 
_ZNSt3__123__cxx_atomic_notify_oneEPVKv + 0
> 7   libchartcorelo.dylib0x0002f817f0ec 
_ZNSt3__135__check_strict_weak_ordering_sortedB8de19INS_11__wrap_iterIPNS_6vectorIdNS_9allocator

core.git: configure.ac

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

New commits:
commit cf11a0dfca5470baea8429c41021527187a5c32d
Author: Stephan Bergmann 
AuthorDate: Wed Feb 7 08:33:35 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 7 16:39:55 2024 +0100

MSVC 2022 Preview: One HAVE_CPP_CONSTEVAL blocker down, one up

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

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

etc.

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

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


core.git: external/zxcvbn-c

2024-02-07 Thread Stephan Bergmann (via logerrit)
 external/zxcvbn-c/0001-There-is-no-std-basic_string-int.patch.1 |   72 
++
 external/zxcvbn-c/UnpackedTarball_zxcvbn-c.mk   |3 
 2 files changed, 75 insertions(+)

New commits:
commit d91ab7de467abea6c01c9dd8473f81ac1f29513c
Author: Stephan Bergmann 
AuthorDate: Tue Feb 6 13:27:59 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 7 12:09:06 2024 +0100

external/zxcvbn-c: There is no std::basic_string

...and at least LLVM 19 trunk libc++ complains about it now since
 "[libc++] Remove deprecated
char_traits base template (#72694)" with

> In file included from dict-generate.cpp:25:
> In file included from ~/llvm/inst/bin/../include/c++/v1/iostream:43:
> In file included from ~/llvm/inst/bin/../include/c++/v1/ios:223:
> In file included from ~/llvm/inst/bin/../include/c++/v1/__locale:24:
> ~/llvm/inst/bin/../include/c++/v1/string:746:43: error: implicit 
instantiation of undefined template 'std::char_traits'
>   746 |   static_assert((is_same<_CharT, typename 
traits_type::char_type>::value),
>   |   ^
> dict-generate.cpp:861:18: note: in instantiation of template class 
'std::basic_string' requested here
>   861 | StringOfInts Chld;
>   |  ^
> ~/llvm/inst/bin/../include/c++/v1/__fwd/string.h:23:29: note: template is 
declared here
>23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
>   | ^

etc., so use a std::vector instead

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

diff --git a/external/zxcvbn-c/0001-There-is-no-std-basic_string-int.patch.1 
b/external/zxcvbn-c/0001-There-is-no-std-basic_string-int.patch.1
new file mode 100644
index ..a1fe25bba08e
--- /dev/null
+++ b/external/zxcvbn-c/0001-There-is-no-std-basic_string-int.patch.1
@@ -0,0 +1,72 @@
+From 92c6ea875231876ca264187326ce2d615d5ad543 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann 
+Date: Tue, 6 Feb 2024 13:14:08 +0100
+Subject: There is no std::basic_string
+
+...and at least LLVM 19 trunk libc++ complains about it now since
+ "[libc++] Remove deprecated
+char_traits base template (#72694)" with
+
+> In file included from dict-generate.cpp:25:
+> In file included from ~/llvm/inst/bin/../include/c++/v1/iostream:43:
+> In file included from ~/llvm/inst/bin/../include/c++/v1/ios:223:
+> In file included from ~/llvm/inst/bin/../include/c++/v1/__locale:24:
+> ~/llvm/inst/bin/../include/c++/v1/string:746:43: error: implicit 
instantiation of undefined template 'std::char_traits'
+>   746 |   static_assert((is_same<_CharT, typename 
traits_type::char_type>::value),
+>   |   ^
+> dict-generate.cpp:861:18: note: in instantiation of template class 
'std::basic_string' requested here
+>   861 | StringOfInts Chld;
+>   |  ^
+> ~/llvm/inst/bin/../include/c++/v1/__fwd/string.h:23:29: note: template is 
declared here
+>23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
+>   | ^
+
+etc., so use a std::vector instead
+---
+ dict-generate.cpp | 12 ++--
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/dict-generate.cpp b/dict-generate.cpp
+index eebcca9..fcfaaea 100644
+--- a/dict-generate.cpp
 b/dict-generate.cpp
+@@ -22,6 +22,7 @@
+  *
+  
**/
+ 
++#include 
+ #include 
+ #include 
+ #include 
+@@ -387,7 +388,7 @@ typedef map EntryMap_t;
+ typedef list StringList_t;
+ typedef list NodeList_t;
+ typedef set StringIntSet_t;
+-typedef basic_string StringOfInts;
++typedef vector StringOfInts;
+ typedef vector UintVect;
+ typedef vector Uint64Vect;
+ typedef vector StrIntPtrVect_t;
+@@ -864,15 +865,14 @@ void CreateArrays(NodeSPtr Root, StringIntSet_t & 
StrSet, StringOfInts & ChildAd
+ for(Itc = Root->ChildBegin(); Itc != Root->ChildEnd(); ++Itc)
+ {
+ int i = Itc->second->GetAddr();
+-Chld += i;
++Chld.push_back(i);
+ }
+ // Find where in pointer array the child pointer string is
+-StringOfInts::size_type x = ChildAddrs.find(Chld);
+-if (x == StringOfInts::npos)
++StringOfInts::size_type x = search(ChildAddrs.begin(), ChildAddrs.end(), 
Chld.begin(), Chld.end()) - ChildAddrs.begin();
++if (x == ChildAddrs.size())
+ {
+ // Not found, add it
+-x = ChildAddrs.length();
+-ChildAddrs += Chld;
++ChildAddrs.insert(ChildAddrs.end(), Chld.begin(), Chld.end());
+ }
+ // Val will contain the final node data
+ uint64_t Val = Its->i;
+-- 
+2.43.0
+
diff --git a/e

  1   2   3   4   5   6   7   8   9   10   >