sfx2/source/control/thumbnailview.cxx              |    2 ++
 static/source/unoembindhelpers/PrimaryBindings.cxx |   13 +++++--------
 2 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 95daad8e5bd5da5a669cbdbee5daefe57cb368a6
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Thu Jan 18 16:59:56 2024 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Thu Jan 18 19:52:20 2024 +0100

    Embind nicely supports std::u16string for OUString
    
    Change-Id: I2477bc67b3c62d302917e63b6286ffb4a78dafd7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162259
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx 
b/static/source/unoembindhelpers/PrimaryBindings.cxx
index e9a0c496310b..1d280649f744 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -39,13 +39,10 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
     enum_<UnoReference_Query>("UnoReference_Query").value("UNO_QUERY", 
UNO_QUERY);
 
     class_<OUString>("OUString")
-        .constructor(
-            +[](const std::string& rString) -> OUString {
-                return OUString::fromUtf8(std::string_view{ rString.c_str() });
-            },
-            allow_raw_pointers())
-        .function("toString", +[](const OUString& rSelf) -> std::string {
-            return std::string{ rSelf.toUtf8() };
+        .constructor(+[](const std::u16string& rString) -> OUString { return 
OUString(rString); },
+                     allow_raw_pointers())
+        .function("toString", +[](const OUString& rSelf) -> std::u16string {
+            return std::u16string(rSelf.getStr(), rSelf.getLength());
         });
 
     // Types used for Any construction
@@ -94,7 +91,7 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
                 case TypeClass_DOUBLE:
                     return Any{ rObject.as<double>() };
                 case TypeClass_STRING:
-                    return Any{ OUString::fromUtf8(std::string_view{ 
rObject.as<std::string>() }) };
+                    return Any{ OUString(rObject.as<std::u16string>()) };
                 case TypeClass_TYPE:
                 case TypeClass_ANY:
                 case TypeClass_ENUM:
commit dd0b9cf1fb491791102a817af9c5726c7d0c3679
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Thu Jan 18 13:18:21 2024 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Thu Jan 18 19:52:10 2024 +0100

    -Werror,-Wunused-variable (Emscripten)
    
    Change-Id: I990482890a3b6a8c799e49ba104d997ed74fdbe2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162250
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 1ae47016935e..d9044304e30b 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -411,7 +411,9 @@ void ThumbnailView::CalculateItemPositions(bool 
bScrollBarUsed)
     // If want also draw parts of items in the last line,
     // then we add one more line if parts of this line are visible
 
+#if !ENABLE_WASM_STRIP_RECENT
     bool bPinnedItems = true;
+#endif
     size_t nCurCount = 0;
     for ( size_t i = 0; i < nItemCount; i++ )
     {

Reply via email to