summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/viewfrm.cxx')
-rw-r--r--sfx2/source/view/viewfrm.cxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 6dccb522c14b..80d66831f0bb 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1300,7 +1300,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
sal_Int32 iLast = sLastVersion.getToken(0,'.').toInt32() * 10 + sLastVersion.getToken(1,'.').toInt32();
if ((iCurrent > iLast) && !Application::IsHeadlessModeEnabled() && !bIsUITest)
{
- VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("whatsnew", SfxResId(STR_WHATSNEW_TEXT), InfoBarType::Info);
+ VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("whatsnew", "", SfxResId(STR_WHATSNEW_TEXT), InfobarType::INFO);
if (pInfoBar)
{
VclPtrInstance<PushButton> xWhatsNewButton(&GetWindow());
@@ -1342,7 +1342,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
bUpdateLastTimeGetInvolvedShown = true;
- VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("getinvolved", SfxResId(STR_GET_INVOLVED_TEXT), InfoBarType::Info);
+ VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("getinvolved", "", SfxResId(STR_GET_INVOLVED_TEXT), InfobarType::INFO);
VclPtrInstance<PushButton> xGetInvolvedButton(&GetWindow());
xGetInvolvedButton->SetText(SfxResId(STR_GET_INVOLVED_BUTTON));
@@ -1369,7 +1369,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
bUpdateLastTimeDonateShown = true;
- VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("donate", SfxResId(STR_DONATE_TEXT), InfoBarType::Info);
+ VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("donate", "", SfxResId(STR_DONATE_TEXT), InfobarType::INFO);
VclPtrInstance<PushButton> xDonateButton(&GetWindow());
xDonateButton->SetText(SfxResId(STR_DONATE_BUTTON));
@@ -1396,7 +1396,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
bool bSignPDF = IsSignPDF(m_xObjSh);
- auto pInfoBar = AppendInfoBar("readonly", SfxResId(bSignPDF ? STR_READONLY_PDF : STR_READONLY_DOCUMENT), InfoBarType::Info);
+ auto pInfoBar = AppendInfoBar("readonly", "", SfxResId(bSignPDF ? STR_READONLY_PDF : STR_READONLY_DOCUMENT), InfobarType::INFO);
if (pInfoBar)
{
if (bSignPDF)
@@ -3283,22 +3283,23 @@ void SfxViewFrame::SetViewFrame( SfxViewFrame* pFrame )
}
VclPtr<SfxInfoBarWindow> SfxViewFrame::AppendInfoBar(const OUString& sId,
- const OUString& sMessage,
- InfoBarType aInfoBarType)
+ const OUString& sPrimaryMessage,
+ const OUString& sSecondaryMessage,
+ InfobarType aInfobarType, bool bShowCloseButton)
{
SfxChildWindow* pChild = GetChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
if (!pChild)
return nullptr;
SfxInfoBarContainerWindow* pInfoBarContainer = static_cast<SfxInfoBarContainerWindow*>(pChild->GetWindow());
- auto pInfoBar = pInfoBarContainer->appendInfoBar(sId, sMessage, aInfoBarType, WB_LEFT | WB_VCENTER);
+ auto pInfoBar = pInfoBarContainer->appendInfoBar(sId, sPrimaryMessage, sSecondaryMessage,
+ aInfobarType, WB_LEFT | WB_VCENTER, bShowCloseButton);
ShowChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
return pInfoBar;
}
-void SfxViewFrame::UpdateInfoBar( const OUString& sId,
- const OUString& sMessage,
- InfoBarType eType )
+void SfxViewFrame::UpdateInfoBar(const OUString& sId, const OUString& sPrimaryMessage,
+ const OUString& sSecondaryMessage, InfobarType eType)
{
const sal_uInt16 nId = SfxInfoBarContainerChild::GetChildWindowId();
@@ -3313,7 +3314,7 @@ void SfxViewFrame::UpdateInfoBar( const OUString& sId,
auto pInfoBar = pInfoBarContainer->getInfoBar(sId);
if (pInfoBar)
- pInfoBar->Update(sMessage, eType);
+ pInfoBar->Update(sPrimaryMessage, sSecondaryMessage, eType);
}
}