From af90b8089405d6f042207f5639e750f08798ae92 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 8 Sep 2020 09:30:35 +0100 Subject: weld infobars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit note: "pushed" status listener case dropped. Doesn't seem to be an expectation for it to something in infobars, and there doesn't seem to be a working case anyway. Change-Id: I7869cc05de9918f0dd70e28b0087205db6c9506c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101945 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- .../clang/constantparam.numbers.results | 4 - include/sfx2/infobar.hxx | 57 ++-- include/sfx2/objsh.hxx | 4 +- include/sfx2/sfxbasecontroller.hxx | 4 +- include/sfx2/viewfrm.hxx | 12 +- include/vcl/weldutils.hxx | 29 ++ sc/source/ui/docshell/docsh4.cxx | 10 +- sc/source/ui/inc/docsh.hxx | 2 +- sfx2/UIConfig_sfx.mk | 2 + sfx2/source/dialog/infobar.cxx | 380 +++++++++++---------- sfx2/source/doc/objserv.cxx | 10 +- sfx2/source/view/sfxbasecontroller.cxx | 17 +- sfx2/source/view/viewfrm.cxx | 56 ++- sfx2/uiconfig/ui/extrabutton.ui | 24 ++ sfx2/uiconfig/ui/infobar.ui | 187 ++++++++++ solenv/sanitizers/ui/sfx.suppr | 1 + vcl/source/app/weldutils.cxx | 58 ++++ 17 files changed, 584 insertions(+), 273 deletions(-) create mode 100644 sfx2/uiconfig/ui/extrabutton.ui create mode 100644 sfx2/uiconfig/ui/infobar.ui diff --git a/compilerplugins/clang/constantparam.numbers.results b/compilerplugins/clang/constantparam.numbers.results index 0a808e5f2924..add43943e088 100644 --- a/compilerplugins/clang/constantparam.numbers.results +++ b/compilerplugins/clang/constantparam.numbers.results @@ -806,10 +806,6 @@ include/sfx2/frame.hxx:192 void SfxUnoFrameItem::SfxUnoFrameItem(unsigned short,const class com::sun::star::uno::Reference &) unsigned short nWhich 6516 -include/sfx2/infobar.hxx:111 - class VclPtr SfxInfoBarContainerWindow::appendInfoBar(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,enum InfobarType,long,_Bool) - long nMessageStyle - 278528 include/sfx2/linkmgr.hxx:63 _Bool sfx2::LinkManager::InsertLink(class sfx2::SvBaseLink *,enum sfx2::SvBaseLinkObjectType,enum SfxLinkUpdateMode,const class rtl::OUString *) enum SfxLinkUpdateMode nUpdateType diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx index 40a1b1ff9fbf..a03c833b957d 100644 --- a/include/sfx2/infobar.hxx +++ b/include/sfx2/infobar.hxx @@ -15,11 +15,7 @@ #include #include - -class FixedImage; -class FixedText; -class Button; -class PushButton; +#include // These must match the values in offapi/com/sun/star/frame/InfobarType.idl enum class InfobarType @@ -57,44 +53,59 @@ public: void Update(); }; +class ExtraButton; + /** Class representing a single InfoBar to be added in a SfxInfoBarContainerWindow. */ -class SFX2_DLLPUBLIC SfxInfoBarWindow final : public vcl::Window +class SFX2_DLLPUBLIC SfxInfoBarWindow final : public InterimItemWindow { private: OUString m_sId; InfobarType m_eType; - VclPtr m_pImage; - VclPtr m_pPrimaryMessage; - VclPtr m_pSecondaryMessage; - VclPtr