summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-02-17 15:22:28 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-02-17 16:47:36 +0100
commit946e12ac87237a1885fd3996a5549f56cc7de3a3 (patch)
tree2b7aa217f2262209623f8bcc0226430e2081be93
parent9da5675de3ca8a047bf45fd601522a6337efb78e (diff)
sfx2 infobar: allow setting the message style
Change-Id: I73151a78d1b396179776847d6fbb2da1dd8755e8
-rw-r--r--include/sfx2/infobar.hxx6
-rw-r--r--include/sfx2/viewfrm.hxx3
-rw-r--r--sfx2/source/dialog/infobar.cxx10
-rw-r--r--sfx2/source/view/viewfrm.cxx5
4 files changed, 15 insertions, 9 deletions
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index 8d0fcbce97fc..1e5a31ea87d9 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -54,7 +54,8 @@ class SfxInfoBarWindow : public vcl::Window
const OUString& sMessage,
const basegfx::BColor* pBackgroundColor,
const basegfx::BColor* pForegroundColor,
- const basegfx::BColor* pMessageColor );
+ const basegfx::BColor* pMessageColor,
+ WinBits nMessageStyle );
virtual ~SfxInfoBarWindow( );
virtual void dispose() override;
@@ -87,7 +88,8 @@ class SfxInfoBarContainerWindow : public vcl::Window
const OUString& sMessage,
const basegfx::BColor* pBackgroundColor,
const basegfx::BColor* pForegroundColor,
- const basegfx::BColor* pMessageColor);
+ const basegfx::BColor* pMessageColor,
+ WinBits nMessageStyle);
SfxInfoBarWindow* getInfoBar(const OUString& sId);
void removeInfoBar(SfxInfoBarWindow* pInfoBar);
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 0c11c0c1f8f1..9094293fb446 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -184,7 +184,8 @@ public:
const OUString& sMessage,
const basegfx::BColor* pBackgroundColor = nullptr,
const basegfx::BColor* pForegroundColor = nullptr,
- const basegfx::BColor* pMessageColor = nullptr);
+ const basegfx::BColor* pMessageColor = nullptr,
+ WinBits nMessageStyle = 0);
void RemoveInfoBar(const OUString& sId);
SAL_DLLPRIVATE void SetDowning_Impl();
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index b108d3bb1444..e48aaaab8201 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -132,10 +132,11 @@ SfxInfoBarWindow::SfxInfoBarWindow(vcl::Window* pParent, const OUString& sId,
const OUString& sMessage,
const basegfx::BColor* pBackgroundColor,
const basegfx::BColor* pForegroundColor,
- const basegfx::BColor* pMessageColor ) :
+ const basegfx::BColor* pMessageColor,
+ WinBits nMessageStyle ) :
Window(pParent, 0),
m_sId(sId),
- m_pMessage(VclPtr<FixedText>::Create(this, 0)),
+ m_pMessage(VclPtr<FixedText>::Create(this, nMessageStyle)),
m_pCloseBtn(VclPtr<SfxCloseButton>::Create(this)),
m_aActionBtns()
{
@@ -284,11 +285,12 @@ SfxInfoBarWindow* SfxInfoBarContainerWindow::appendInfoBar(const OUString& sId,
const OUString& sMessage,
const basegfx::BColor* pBackgroundColor,
const basegfx::BColor* pForegroundColor,
- const basegfx::BColor* pMessageColor)
+ const basegfx::BColor* pMessageColor,
+ WinBits nMessageStyle)
{
Size aSize = GetSizePixel();
- VclPtrInstance<SfxInfoBarWindow> pInfoBar(this, sId, sMessage, pBackgroundColor, pForegroundColor, pMessageColor);
+ VclPtrInstance<SfxInfoBarWindow> pInfoBar(this, sId, sMessage, pBackgroundColor, pForegroundColor, pMessageColor, nMessageStyle);
pInfoBar->SetPosPixel(Point(0, aSize.getHeight()));
pInfoBar->Show();
m_pInfoBars.push_back(pInfoBar);
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 65b8b0cc9fd1..46a718c8eefa 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3195,7 +3195,8 @@ SfxInfoBarWindow* SfxViewFrame::AppendInfoBar( const OUString& sId,
const OUString& sMessage,
const basegfx::BColor* pBackgroundColor,
const basegfx::BColor* pForegroundColor,
- const basegfx::BColor* pMessageColor )
+ const basegfx::BColor* pMessageColor,
+ WinBits nMessageStyle )
{
const sal_uInt16 nId = SfxInfoBarContainerChild::GetChildWindowId();
@@ -3207,7 +3208,7 @@ SfxInfoBarWindow* SfxViewFrame::AppendInfoBar( const OUString& sId,
if (pChild)
{
SfxInfoBarContainerWindow* pInfoBarContainer = static_cast<SfxInfoBarContainerWindow*>(pChild->GetWindow());
- SfxInfoBarWindow* pInfoBar = pInfoBarContainer->appendInfoBar(sId, sMessage, pBackgroundColor, pForegroundColor, pMessageColor);
+ SfxInfoBarWindow* pInfoBar = pInfoBarContainer->appendInfoBar(sId, sMessage, pBackgroundColor, pForegroundColor, pMessageColor, nMessageStyle);
ShowChildWindow(nId);
return pInfoBar;
}