[Libreoffice-commits] core.git: Branch 'feature/cib_contract138c' - 2 commits - configure.ac officecfg/registry sfx2/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 22 10:29:15 UTC 2020
configure.ac | 2 +-
officecfg/registry/schema/org/openoffice/Setup.xcs | 11 +++++++++++
sfx2/source/dialog/infobar.cxx | 19 ++++++++++++++++++-
3 files changed, 30 insertions(+), 2 deletions(-)
New commits:
commit f6c12ddb2cbe343d30d2d2c853de309685783b25
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Apr 22 12:27:43 2020 +0200
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Apr 22 12:27:43 2020 +0200
Release 6.2.9.6
Change-Id: I18b6c61d643a5c4c72e5d7b671da432e4cfa4778
diff --git a/configure.ac b/configure.ac
index e9c6a8b04fa8..b5ff5b40713b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
# several non-alphanumeric characters, those are split off and used only for the
# ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
-AC_INIT([LibreOffice],[6.2.9.6],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.2.9.7],[],[],[http://documentfoundation.org/])
AC_PREREQ([2.59])
commit 5fd583e39c05d9558ee9a2de2b6c0881077b839f
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue Apr 21 16:26:12 2020 +0200
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Apr 22 11:59:22 2020 +0200
Add config option to disable infobars by ID
Change-Id: I13f0456435b59aafe929a46498de5a8847f138e2
diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs
index c9f8a309a204..6f83460ff78d 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -301,6 +301,17 @@
</info>
<value>0</value>
</prop>
+ <prop oor:name="DisabledInfobars" oor:type="oor:string-list" oor:nillable="false">
+ <info>
+ <desc>List of Infobar identifiers which should be disabled (No infobar with this ID will be added)
+ Example IDs:
+ Readonly infobar: 'readonly'
+ Donate Infobar: 'donate'
+ Get involved Infobar: 'getinvolved'
+ </desc>
+ </info>
+ <value/>
+ </prop>
</group>
<group oor:name="Office">
<!--The default must be written by the setup.-->
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 349d09cf405f..0f5dc9199325 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -13,21 +13,27 @@
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
+#include <sal/log.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/infobar.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
+#include <officecfg/Setup.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
using namespace std;
using namespace drawinglayer::geometry;
using namespace drawinglayer::processor2d;
using namespace drawinglayer::primitive2d;
using namespace drawinglayer::attribute;
using namespace basegfx;
+using namespace css::frame;
+using namespace css::uno;
namespace
{
@@ -343,8 +349,19 @@ VclPtr<SfxInfoBarWindow> SfxInfoBarContainerWindow::appendInfoBar(const OUString
InfoBarType ibType,
WinBits nMessageStyle)
{
- Size aSize = GetSizePixel();
+ const Sequence<OUString> aDisabledInfobars(officecfg::Setup::Product::DisabledInfobars::get());
+ for (const auto& aDisabledInfobar : aDisabledInfobars)
+ {
+ if (aDisabledInfobar == sId)
+ {
+ SAL_INFO("sfx", "Not adding '" << sId
+ << "' Infobar since it has been disabled via config "
+ "setting 'DisabledInfobars'");
+ return nullptr;
+ }
+ }
+ Size aSize = GetSizePixel();
auto pInfoBar = VclPtr<SfxInfoBarWindow>::Create(this, sId, sMessage, ibType, nMessageStyle);
basegfx::BColor aBackgroundColor;
More information about the Libreoffice-commits
mailing list