desktop/source/lib/init.cxx                |   27 ++++++++++++++++++++++++++-
 vcl/source/graphic/BinaryDataContainer.cxx |    1 -
 2 files changed, 26 insertions(+), 2 deletions(-)

New commits:
commit a43a9dd8205f089c92737cb5519ed2a96a8d8ff2
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Aug 17 15:57:28 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 18 09:58:08 2023 +0200

    logs full of "OConfigurationNode::hasByName: object is invalid"
    
    warn:legacy.osl:3509:3314:unotools/source/config/confignode.cxx:408: 
OConfigurationNode::hasByName: object is invalid!
    warn:legacy.osl:3509:3314:unotools/source/config/confignode.cxx:409: 
OConfigurationNode::hasByName: object is invalid!
    warn:legacy.osl:3509:3314:comphelper/source/misc/types.cxx:90: 
comphelper::getBOOL : invalid argument !
    
    in cool, open a document, switch from light to dark with sidebar open,
    click on a paragraph and then on another with different properties, e.g.
    normal vs heading and each change of a sidebar context triggers the
    warning over and over again.
    
    The config has no mention of notebookbar_online.ui but we set
    notebookbar_online.ui as the default to use for a notebookbar
    so replace mentions in the config of notebookbar.ui with
    notebookbar_online.ui for consistency when we do that and we
    can drop the constant log spam.
    
    Change-Id: I41860f5422d4426d8e3786b38c967e52bc803ae3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155804
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6d5295222f74..86a32708e59b 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -82,6 +82,7 @@
 #include <comphelper/propertyvalue.hxx>
 #include <comphelper/scopeguard.hxx>
 #include <comphelper/threadpool.hxx>
+#include <comphelper/types.hxx>
 #include <comphelper/servicehelper.hxx>
 #include <comphelper/sequenceashashmap.hxx>
 
@@ -202,6 +203,7 @@
 #include <officecfg/Office/Common.hxx>
 #include <officecfg/Office/Impress.hxx>
 #include <officecfg/Office/Linguistic.hxx>
+#include <officecfg/Office/UI/ToolbarMode.hxx>
 #include <unotools/optionsdlg.hxx>
 #include <svl/ctloptions.hxx>
 #include <svtools/accessibilityoptions.hxx>
@@ -7427,7 +7429,23 @@ static void activateNotebookbar(std::u16string_view rApp)
 
     if (aAppNode.isValid())
     {
-        aAppNode.setNodeValue("Active", 
Any(OUString("notebookbar_online.ui")));
+        OUString sNoteBookbarName("notebookbar_online.ui");
+        aAppNode.setNodeValue("Active", Any(sNoteBookbarName));
+
+        const utl::OConfigurationNode aImplsNode = aAppNode.openNode("Modes");
+        const Sequence<OUString> aModeNodeNames( aImplsNode.getNodeNames() );
+
+        for (const auto& rModeNodeName : aModeNodeNames)
+        {
+            const utl::OConfigurationNode 
aImplNode(aImplsNode.openNode(rModeNodeName));
+            if (!aImplNode.isValid())
+                continue;
+
+            OUString aCommandArg = 
comphelper::getString(aImplNode.getNodeValue("CommandArg"));
+            if (aCommandArg == "notebookbar.ui")
+                aImplNode.setNodeValue("CommandArg", Any(sNoteBookbarName));
+        }
+
         aAppNode.commit();
     }
 }
@@ -7866,6 +7884,13 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 
     if (bNotebookbar)
     {
+        std::shared_ptr<comphelper::ConfigurationChanges> 
batch(comphelper::ConfigurationChanges::create());
+        
officecfg::Office::UI::ToolbarMode::ActiveWriter::set("notebookbar_online.ui", 
batch);
+        
officecfg::Office::UI::ToolbarMode::ActiveCalc::set("notebookbar_online.ui", 
batch);
+        
officecfg::Office::UI::ToolbarMode::ActiveImpress::set("notebookbar_online.ui", 
batch);
+        
officecfg::Office::UI::ToolbarMode::ActiveDraw::set("notebookbar_online.ui", 
batch);
+        batch->commit();
+
         activateNotebookbar(u"Writer");
         activateNotebookbar(u"Calc");
         activateNotebookbar(u"Impress");
commit 60d91bed3fdfb0a3d89c51831b27d2187bd24c40
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Aug 16 16:31:54 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 18 09:58:00 2023 +0200

    SAL_DEBUG "is never meant to remain in the code"
    
    Change-Id: I8c0e513d36c087e9ea8019325cdb3122bec744be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155743
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/source/graphic/BinaryDataContainer.cxx 
b/vcl/source/graphic/BinaryDataContainer.cxx
index 83cacb491ac2..c9e75bc4ef77 100644
--- a/vcl/source/graphic/BinaryDataContainer.cxx
+++ b/vcl/source/graphic/BinaryDataContainer.cxx
@@ -45,7 +45,6 @@ struct BinaryDataContainer::Impl
         // Horrifying data loss ...
         SAL_WARN_IF(pStream->GetError(), "vcl",
                     "Inconsistent system - failed to swap image back in");
-        SAL_DEBUG("Swap in: " << pStream->GetError());
     }
 
     void swapOut()

Reply via email to