diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-12-05 15:56:06 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-12-11 11:30:33 +0100 |
commit | 261cd2301d0cb581de2238913bd99e2041ad6eda (patch) | |
tree | 751e1bbe84d351f24887e5c8a1a6ac599a98b4ce | |
parent | b26f29a976838247175576f17fb4a3087e1bb922 (diff) |
clang-format for infobar files
Change-Id: Iba097ebe214a6904caf01bfb880b34fdccf673ea
Reviewed-on: https://gerrit.libreoffice.org/84570
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r-- | include/sfx2/infobar.hxx | 127 | ||||
-rw-r--r-- | sfx2/source/dialog/infobar.cxx | 193 | ||||
-rw-r--r-- | solenv/clang-format/blacklist | 2 |
3 files changed, 156 insertions, 166 deletions
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx index 80f4c0a0506c..f725a27044f2 100644 --- a/include/sfx2/infobar.hxx +++ b/include/sfx2/infobar.hxx @@ -11,15 +11,16 @@ #include <vector> +#include <basegfx/color/bcolor.hxx> #include <vcl/button.hxx> #include <vcl/fixed.hxx> -#include <basegfx/color/bcolor.hxx> -#include <sfx2/dllapi.h> #include <sfx2/childwin.hxx> +#include <sfx2/dllapi.h> // These must match the values in offapi/com/sun/star/frame/InfobarType.idl -enum class InfobarType { +enum class InfobarType +{ INFO = 0, SUCCESS = 1, WARNING = 2, @@ -28,7 +29,7 @@ enum class InfobarType { class InfobarData { - public: +public: OUString msId; OUString msPrimaryMessage; OUString msSecondaryMessage; @@ -40,88 +41,80 @@ class InfobarData */ class SFX2_DLLPUBLIC SfxInfoBarContainerChild final : public SfxChildWindow { - private: - SfxBindings* const m_pBindings; +private: + SfxBindings* const m_pBindings; - public: - SfxInfoBarContainerChild( vcl::Window* pParent, - sal_uInt16 nId, - SfxBindings* pBindings, - SfxChildWinInfo* pInfo ); - virtual ~SfxInfoBarContainerChild() override; +public: + SfxInfoBarContainerChild(vcl::Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, + SfxChildWinInfo* pInfo); + virtual ~SfxInfoBarContainerChild() override; - SFX_DECL_CHILDWINDOW_WITHID( SfxInfoBarContainerChild ); + SFX_DECL_CHILDWINDOW_WITHID(SfxInfoBarContainerChild); - void Update( ); + void Update(); }; /** Class representing a single InfoBar to be added in a SfxInfoBarContainerWindow. */ class SFX2_DLLPUBLIC SfxInfoBarWindow final : public vcl::Window { - private: - OUString const m_sId; - InfobarType m_eType; - VclPtr<FixedImage> m_pImage; - VclPtr<FixedText> m_pPrimaryMessage; - VclPtr<FixedText> m_pSecondaryMessage; - VclPtr<Button> m_pCloseBtn; - std::vector< VclPtr<PushButton> > m_aActionBtns; - - void SetForeAndBackgroundColors( InfobarType eType ); - - public: - SfxInfoBarWindow( vcl::Window* parent, const OUString& sId, - const OUString& sPrimaryMessage, - const OUString& sSecondaryMessage, - InfobarType InfobarType, - bool bShowCloseButton, WinBits nMessageStyle); - virtual ~SfxInfoBarWindow( ) override; - virtual void dispose() override; - - const OUString& getId() const { return m_sId; } - virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; - virtual void Resize( ) override; - void Update(const OUString& sPrimaryMessage, const OUString& sSecondaryMessage, - InfobarType eType); - basegfx::BColor m_aBackgroundColor; - basegfx::BColor m_aForegroundColor; - - /** Add button to Infobar. +private: + OUString const m_sId; + InfobarType m_eType; + VclPtr<FixedImage> m_pImage; + VclPtr<FixedText> m_pPrimaryMessage; + VclPtr<FixedText> m_pSecondaryMessage; + VclPtr<Button> m_pCloseBtn; + std::vector<VclPtr<PushButton>> m_aActionBtns; + + void SetForeAndBackgroundColors(InfobarType eType); + +public: + SfxInfoBarWindow(vcl::Window* parent, const OUString& sId, const OUString& sPrimaryMessage, + const OUString& sSecondaryMessage, InfobarType InfobarType, + bool bShowCloseButton, WinBits nMessageStyle); + virtual ~SfxInfoBarWindow() override; + virtual void dispose() override; + + const OUString& getId() const { return m_sId; } + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; + virtual void Resize() override; + void Update(const OUString& sPrimaryMessage, const OUString& sSecondaryMessage, + InfobarType eType); + basegfx::BColor m_aBackgroundColor; + basegfx::BColor m_aForegroundColor; + + /** Add button to Infobar. * Infobar takes ownership of the button so the button is * destroyed when the infobar gets destroyed. */ - void addButton(PushButton* pButton); + void addButton(PushButton* pButton); - private: - DECL_LINK( CloseHandler, Button*, void ); +private: + DECL_LINK(CloseHandler, Button*, void); }; class SfxInfoBarContainerWindow final : public vcl::Window { - private: - SfxInfoBarContainerChild* m_pChildWin; - std::vector< VclPtr<SfxInfoBarWindow> > m_pInfoBars; - - public: - SfxInfoBarContainerWindow(SfxInfoBarContainerChild* pChildWin); - virtual ~SfxInfoBarContainerWindow( ) override; - virtual void dispose() override; - - VclPtr<SfxInfoBarWindow> appendInfoBar(const OUString& sId, - const OUString& sPrimaryMessage, - const OUString& sSecondaryMessage, - InfobarType ibType, - WinBits nMessageStyle, - bool bShowCloseButton); - VclPtr<SfxInfoBarWindow> getInfoBar(const OUString& sId); - bool hasInfoBarWithID(const OUString& sId); - void removeInfoBar(VclPtr<SfxInfoBarWindow> const & pInfoBar); - - virtual void Resize() override; +private: + SfxInfoBarContainerChild* m_pChildWin; + std::vector<VclPtr<SfxInfoBarWindow>> m_pInfoBars; + +public: + SfxInfoBarContainerWindow(SfxInfoBarContainerChild* pChildWin); + virtual ~SfxInfoBarContainerWindow() override; + virtual void dispose() override; + + VclPtr<SfxInfoBarWindow> appendInfoBar(const OUString& sId, const OUString& sPrimaryMessage, + const OUString& sSecondaryMessage, InfobarType ibType, + WinBits nMessageStyle, bool bShowCloseButton); + VclPtr<SfxInfoBarWindow> getInfoBar(const OUString& sId); + bool hasInfoBarWithID(const OUString& sId); + void removeInfoBar(VclPtr<SfxInfoBarWindow> const& pInfoBar); + + virtual void Resize() override; }; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index 3479fe72ad7d..37169c75fa40 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -7,12 +7,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <memory> #include <basegfx/polygon/b2dpolygon.hxx> #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> #include <drawinglayer/processor2d/baseprocessor2d.hxx> #include <drawinglayer/processor2d/processorfromoutputdevice.hxx> +#include <memory> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/infobar.hxx> @@ -21,9 +21,9 @@ #include <sfx2/sfxsids.hrc> #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> -#include <vcl/svapp.hxx> -#include <vcl/settings.hxx> #include <vcl/decoview.hxx> +#include <vcl/settings.hxx> +#include <vcl/svapp.hxx> using namespace std; using namespace drawinglayer::geometry; @@ -35,31 +35,31 @@ using namespace css::frame; namespace { - const long INFO_BAR_BASE_HEIGHT = 40; -void GetInfoBarColors(InfobarType ibType, BColor& rBackgroundColor, BColor& rForegroundColor, BColor& rMessageColor) +void GetInfoBarColors(InfobarType ibType, BColor& rBackgroundColor, BColor& rForegroundColor, + BColor& rMessageColor) { rMessageColor = basegfx::BColor(0.0, 0.0, 0.0); switch (ibType) { - case InfobarType::INFO: // blue; #004785/0,71,133; #BDE5F8/189,229,248 - rBackgroundColor = basegfx::BColor(0.741, 0.898, 0.973); - rForegroundColor = basegfx::BColor(0.0, 0.278, 0.522); - break; - case InfobarType::SUCCESS: // green; #32550C/50,85,12; #DFF2BF/223,242,191 - rBackgroundColor = basegfx::BColor(0.874,0.949,0.749); - rForegroundColor = basegfx::BColor(0.196,0.333,0.047); - break; - case InfobarType::WARNING: // orange; #704300/112,67,0; #FEEFB3/254,239,179 - rBackgroundColor = basegfx::BColor(0.996,0.937,0.702); - rForegroundColor = basegfx::BColor(0.439,0.263,0.0); - break; - case InfobarType::DANGER: // red; #7A0006/122,0,6; #FFBABA/255,186,186 - rBackgroundColor = basegfx::BColor(1.0,0.729,0.729); - rForegroundColor = basegfx::BColor(0.478,0.0,0.024); - break; + case InfobarType::INFO: // blue; #004785/0,71,133; #BDE5F8/189,229,248 + rBackgroundColor = basegfx::BColor(0.741, 0.898, 0.973); + rForegroundColor = basegfx::BColor(0.0, 0.278, 0.522); + break; + case InfobarType::SUCCESS: // green; #32550C/50,85,12; #DFF2BF/223,242,191 + rBackgroundColor = basegfx::BColor(0.874, 0.949, 0.749); + rForegroundColor = basegfx::BColor(0.196, 0.333, 0.047); + break; + case InfobarType::WARNING: // orange; #704300/112,67,0; #FEEFB3/254,239,179 + rBackgroundColor = basegfx::BColor(0.996, 0.937, 0.702); + rForegroundColor = basegfx::BColor(0.439, 0.263, 0.0); + break; + case InfobarType::DANGER: // red; #7A0006/122,0,6; #FFBABA/255,186,186 + rBackgroundColor = basegfx::BColor(1.0, 0.729, 0.729); + rForegroundColor = basegfx::BColor(0.478, 0.0, 0.024); + break; } //remove this? @@ -69,27 +69,25 @@ void GetInfoBarColors(InfobarType ibType, BColor& rBackgroundColor, BColor& rFo rBackgroundColor = rSettings.GetLightColor().getBColor(); rForegroundColor = rSettings.GetDialogTextColor().getBColor(); } - } OUString GetInfoBarIconName(InfobarType ibType) { - OUString aRet; switch (ibType) { - case InfobarType::INFO: - aRet = "vcl/res/infobox.svg"; - break; - case InfobarType::SUCCESS: - aRet = "vcl/res/successbox.svg"; - break; - case InfobarType::WARNING: - aRet = "vcl/res/warningbox.svg"; - break; - case InfobarType::DANGER: - aRet = "vcl/res/errorbox.svg"; - break; + case InfobarType::INFO: + aRet = "vcl/res/infobox.svg"; + break; + case InfobarType::SUCCESS: + aRet = "vcl/res/successbox.svg"; + break; + case InfobarType::WARNING: + aRet = "vcl/res/warningbox.svg"; + break; + case InfobarType::DANGER: + aRet = "vcl/res/errorbox.svg"; + break; } return aRet; @@ -101,13 +99,16 @@ class SfxCloseButton : public PushButton basegfx::BColor m_aForegroundColor; public: - explicit SfxCloseButton(vcl::Window* pParent) : PushButton(pParent, 0) + explicit SfxCloseButton(vcl::Window* pParent) + : PushButton(pParent, 0) { basegfx::BColor aMessageColor; - GetInfoBarColors(InfobarType::WARNING, m_aBackgroundColor, m_aForegroundColor, aMessageColor); + GetInfoBarColors(InfobarType::WARNING, m_aBackgroundColor, m_aForegroundColor, + aMessageColor); } - virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, + const ::tools::Rectangle& rRect) override; void setBackgroundColor(const basegfx::BColor& rColor); void setForegroundColor(const basegfx::BColor& rColor); @@ -121,7 +122,7 @@ void SfxCloseButton::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re const ViewInformation2D aNewViewInfos; const unique_ptr<BaseProcessor2D> pProcessor( - createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); + createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); const ::tools::Rectangle aRect(aBtnPos, PixelToLogic(GetSizePixel())); @@ -139,8 +140,8 @@ void SfxCloseButton::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re if (IsMouseOver() || HasFocus()) aBackgroundColor.ApplyTintOrShade(-2000); - PolyPolygonColorPrimitive2D* pBack = - new PolyPolygonColorPrimitive2D(B2DPolyPolygon(aPolygon), aBackgroundColor.getBColor()); + PolyPolygonColorPrimitive2D* pBack + = new PolyPolygonColorPrimitive2D(B2DPolyPolygon(aPolygon), aBackgroundColor.getBColor()); aSeq[0] = pBack; LineAttribute aLineAttribute(m_aForegroundColor, 2.0); @@ -158,8 +159,8 @@ void SfxCloseButton::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re aLine2.append(B2DPoint(aRect.Left(), aRect.Bottom())); aCross.append(aLine2); - PolyPolygonStrokePrimitive2D* pCross = - new PolyPolygonStrokePrimitive2D(aCross, aLineAttribute, StrokeAttribute()); + PolyPolygonStrokePrimitive2D* pCross + = new PolyPolygonStrokePrimitive2D(aCross, aLineAttribute, StrokeAttribute()); aSeq[1] = pCross; @@ -179,19 +180,18 @@ void SfxCloseButton::setForegroundColor(const basegfx::BColor& rColor) } // anonymous namespace SfxInfoBarWindow::SfxInfoBarWindow(vcl::Window* pParent, const OUString& sId, - const OUString& sPrimaryMessage, - const OUString& sSecondaryMessage, - InfobarType ibType, - bool bShowCloseButton, - WinBits nMessageStyle = WB_LEFT|WB_VCENTER) : - Window(pParent, WB_DIALOGCONTROL), - m_sId(sId), - m_eType(ibType), - m_pImage(VclPtr<FixedImage>::Create(this, nMessageStyle)), - m_pPrimaryMessage(VclPtr<FixedText>::Create(this, nMessageStyle | WB_WORDBREAK)), - m_pSecondaryMessage(VclPtr<FixedText>::Create(this, nMessageStyle | WB_WORDBREAK)), - m_pCloseBtn(VclPtr<SfxCloseButton>::Create(this)), - m_aActionBtns() + const OUString& sPrimaryMessage, + const OUString& sSecondaryMessage, InfobarType ibType, + bool bShowCloseButton, + WinBits nMessageStyle = WB_LEFT | WB_VCENTER) + : Window(pParent, WB_DIALOGCONTROL) + , m_sId(sId) + , m_eType(ibType) + , m_pImage(VclPtr<FixedImage>::Create(this, nMessageStyle)) + , m_pPrimaryMessage(VclPtr<FixedText>::Create(this, nMessageStyle | WB_WORDBREAK)) + , m_pSecondaryMessage(VclPtr<FixedText>::Create(this, nMessageStyle | WB_WORDBREAK)) + , m_pCloseBtn(VclPtr<SfxCloseButton>::Create(this)) + , m_aActionBtns() { m_pCloseBtn->SetStyle(WB_DEFBUTTON | WB_TABSTOP); SetForeAndBackgroundColors(m_eType); @@ -226,22 +226,20 @@ SfxInfoBarWindow::SfxInfoBarWindow(vcl::Window* pParent, const OUString& sId, Resize(); } -void SfxInfoBarWindow::addButton(PushButton* pButton) { +void SfxInfoBarWindow::addButton(PushButton* pButton) +{ pButton->SetParent(this); pButton->Show(); m_aActionBtns.emplace_back(pButton); Resize(); } -SfxInfoBarWindow::~SfxInfoBarWindow() -{ - disposeOnce(); -} +SfxInfoBarWindow::~SfxInfoBarWindow() { disposeOnce(); } void SfxInfoBarWindow::SetForeAndBackgroundColors(InfobarType eType) { basegfx::BColor aMessageColor; - GetInfoBarColors(eType,m_aBackgroundColor,m_aForegroundColor,aMessageColor); + GetInfoBarColors(eType, m_aBackgroundColor, m_aForegroundColor, aMessageColor); static_cast<SfxCloseButton*>(m_pCloseBtn.get())->setBackgroundColor(m_aBackgroundColor); static_cast<SfxCloseButton*>(m_pCloseBtn.get())->setForegroundColor(m_aForegroundColor); @@ -251,22 +249,23 @@ void SfxInfoBarWindow::SetForeAndBackgroundColors(InfobarType eType) void SfxInfoBarWindow::dispose() { - for ( auto& rxBtn : m_aActionBtns ) + for (auto& rxBtn : m_aActionBtns) rxBtn.disposeAndClear(); m_pImage.disposeAndClear(); m_pPrimaryMessage.disposeAndClear(); m_pSecondaryMessage.disposeAndClear(); m_pCloseBtn.disposeAndClear(); - m_aActionBtns.clear( ); + m_aActionBtns.clear(); vcl::Window::dispose(); } -void SfxInfoBarWindow::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rPaintRect) +void SfxInfoBarWindow::Paint(vcl::RenderContext& rRenderContext, + const ::tools::Rectangle& rPaintRect) { const ViewInformation2D aNewViewInfos; const unique_ptr<BaseProcessor2D> pProcessor( - createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); + createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); const ::tools::Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel())); @@ -280,8 +279,8 @@ void SfxInfoBarWindow::Paint(vcl::RenderContext& rRenderContext, const ::tools:: aPolygon.append(B2DPoint(aRect.Left(), aRect.Bottom())); aPolygon.setClosed(true); - PolyPolygonColorPrimitive2D* pBack = - new PolyPolygonColorPrimitive2D(B2DPolyPolygon(aPolygon), m_aBackgroundColor); + PolyPolygonColorPrimitive2D* pBack + = new PolyPolygonColorPrimitive2D(B2DPolyPolygon(aPolygon), m_aBackgroundColor); aSeq[0] = pBack; LineAttribute aLineAttribute(m_aForegroundColor, 1.0); @@ -291,8 +290,8 @@ void SfxInfoBarWindow::Paint(vcl::RenderContext& rRenderContext, const ::tools:: aPolygonBottom.append(B2DPoint(aRect.Left(), aRect.Bottom())); aPolygonBottom.append(B2DPoint(aRect.Right(), aRect.Bottom())); - PolygonStrokePrimitive2D* pLineBottom = - new PolygonStrokePrimitive2D (aPolygonBottom, aLineAttribute); + PolygonStrokePrimitive2D* pLineBottom + = new PolygonStrokePrimitive2D(aPolygonBottom, aLineAttribute); aSeq[1] = pLineBottom; @@ -306,7 +305,8 @@ void SfxInfoBarWindow::Resize() float fScaleFactor = GetDPIScaleFactor(); long nWidth = GetSizePixel().getWidth(); - m_pCloseBtn->SetPosSizePixel(Point(nWidth - 25 * fScaleFactor, 15 * fScaleFactor), Size(10 * fScaleFactor, 10 * fScaleFactor)); + m_pCloseBtn->SetPosSizePixel(Point(nWidth - 25 * fScaleFactor, 15 * fScaleFactor), + Size(10 * fScaleFactor, 10 * fScaleFactor)); // Reparent the buttons and place them on the right of the bar long nX = m_pCloseBtn->GetPosPixel().getX() - 15 * fScaleFactor; @@ -316,7 +316,8 @@ void SfxInfoBarWindow::Resize() { long nButtonWidth = actionBtn->GetSizePixel().getWidth(); nX -= nButtonWidth; - actionBtn->SetPosSizePixel(Point(nX, 5 * fScaleFactor), Size(nButtonWidth, 30 * fScaleFactor)); + actionBtn->SetPosSizePixel(Point(nX, 5 * fScaleFactor), + Size(nButtonWidth, 30 * fScaleFactor)); nX -= nButtonGap; } @@ -344,10 +345,12 @@ void SfxInfoBarWindow::Resize() m_pSecondaryMessage->SetPosSizePixel(aSecondaryMessagePosition, aSecondaryTextSize); m_pImage->SetPosSizePixel(Point(4, 4), Size(32 * fScaleFactor, 32 * fScaleFactor)); - SetPosSizePixel(GetPosPixel(), Size(nWidth, INFO_BAR_BASE_HEIGHT * fScaleFactor + aExtraHeight * fScaleFactor)); + SetPosSizePixel(GetPosPixel(), Size(nWidth, INFO_BAR_BASE_HEIGHT * fScaleFactor + + aExtraHeight * fScaleFactor)); } -void SfxInfoBarWindow::Update( const OUString& sPrimaryMessage, const OUString& sSecondaryMessage, InfobarType eType ) +void SfxInfoBarWindow::Update(const OUString& sPrimaryMessage, const OUString& sSecondaryMessage, + InfobarType eType) { if (m_eType != eType) { @@ -356,8 +359,8 @@ void SfxInfoBarWindow::Update( const OUString& sPrimaryMessage, const OUString& m_pImage->SetImage(Image(StockImage::Yes, GetInfoBarIconName(eType))); } - m_pPrimaryMessage->SetText( sPrimaryMessage ); - m_pSecondaryMessage->SetText( sSecondaryMessage ); + m_pPrimaryMessage->SetText(sPrimaryMessage); + m_pSecondaryMessage->SetText(sSecondaryMessage); Resize(); Invalidate(); } @@ -367,23 +370,20 @@ IMPL_LINK_NOARG(SfxInfoBarWindow, CloseHandler, Button*, void) static_cast<SfxInfoBarContainerWindow*>(GetParent())->removeInfoBar(this); } -SfxInfoBarContainerWindow::SfxInfoBarContainerWindow(SfxInfoBarContainerChild* pChildWin ) : - Window(pChildWin->GetParent(), WB_DIALOGCONTROL), - m_pChildWin(pChildWin), - m_pInfoBars() +SfxInfoBarContainerWindow::SfxInfoBarContainerWindow(SfxInfoBarContainerChild* pChildWin) + : Window(pChildWin->GetParent(), WB_DIALOGCONTROL) + , m_pChildWin(pChildWin) + , m_pInfoBars() { } -SfxInfoBarContainerWindow::~SfxInfoBarContainerWindow() -{ - disposeOnce(); -} +SfxInfoBarContainerWindow::~SfxInfoBarContainerWindow() { disposeOnce(); } void SfxInfoBarContainerWindow::dispose() { - for (auto & infoBar : m_pInfoBars) + for (auto& infoBar : m_pInfoBars) infoBar.disposeAndClear(); - m_pInfoBars.clear( ); + m_pInfoBars.clear(); Window::dispose(); } @@ -398,7 +398,7 @@ SfxInfoBarContainerWindow::appendInfoBar(const OUString& sId, const OUString& sP basegfx::BColor aBackgroundColor; basegfx::BColor aForegroundColor; basegfx::BColor aMessageColor; - GetInfoBarColors(ibType,aBackgroundColor,aForegroundColor,aMessageColor); + GetInfoBarColors(ibType, aBackgroundColor, aForegroundColor, aMessageColor); pInfoBar->m_aBackgroundColor = aBackgroundColor; pInfoBar->m_aForegroundColor = aForegroundColor; m_pInfoBars.push_back(pInfoBar); @@ -417,12 +417,12 @@ VclPtr<SfxInfoBarWindow> SfxInfoBarContainerWindow::getInfoBar(const OUString& s return nullptr; } -bool SfxInfoBarContainerWindow::hasInfoBarWithID( const OUString &sId ) +bool SfxInfoBarContainerWindow::hasInfoBarWithID(const OUString& sId) { - return ( getInfoBar( sId ) != nullptr ); + return (getInfoBar(sId) != nullptr); } -void SfxInfoBarContainerWindow::removeInfoBar(VclPtr<SfxInfoBarWindow> const & pInfoBar) +void SfxInfoBarContainerWindow::removeInfoBar(VclPtr<SfxInfoBarWindow> const& pInfoBar) { // Remove auto it = std::find(m_pInfoBars.begin(), m_pInfoBars.end(), pInfoBar); @@ -460,20 +460,19 @@ void SfxInfoBarContainerWindow::Resize() SFX_IMPL_POS_CHILDWINDOW_WITHID(SfxInfoBarContainerChild, SID_INFOBAR, SFX_OBJECTBAR_OBJECT); -SfxInfoBarContainerChild::SfxInfoBarContainerChild( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* ) : - SfxChildWindow(_pParent, nId), - m_pBindings(pBindings) +SfxInfoBarContainerChild::SfxInfoBarContainerChild(vcl::Window* _pParent, sal_uInt16 nId, + SfxBindings* pBindings, SfxChildWinInfo*) + : SfxChildWindow(_pParent, nId) + , m_pBindings(pBindings) { - SetWindow( VclPtr<SfxInfoBarContainerWindow>::Create(this) ); + SetWindow(VclPtr<SfxInfoBarContainerWindow>::Create(this)); GetWindow()->SetPosSizePixel(Point(0, 0), Size(_pParent->GetSizePixel().getWidth(), 0)); GetWindow()->Show(); SetAlignment(SfxChildAlignment::LOWESTTOP); } -SfxInfoBarContainerChild::~SfxInfoBarContainerChild() -{ -} +SfxInfoBarContainerChild::~SfxInfoBarContainerChild() {} SfxChildWinInfo SfxInfoBarContainerChild::GetInfo() const { diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index e3e20aac6a2d..ce55fe1c54ff 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -6680,7 +6680,6 @@ include/sfx2/frmhtmlw.hxx include/sfx2/groupid.hxx include/sfx2/hintpost.hxx include/sfx2/htmlmode.hxx -include/sfx2/infobar.hxx include/sfx2/inputdlg.hxx include/sfx2/ipclient.hxx include/sfx2/linkmgr.hxx @@ -12687,7 +12686,6 @@ sfx2/source/dialog/filedlghelper.cxx sfx2/source/dialog/filedlgimpl.hxx sfx2/source/dialog/filtergrouping.cxx sfx2/source/dialog/filtergrouping.hxx -sfx2/source/dialog/infobar.cxx sfx2/source/dialog/inputdlg.cxx sfx2/source/dialog/mailmodel.cxx sfx2/source/dialog/mgetempl.cxx |