summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/viewfrm.cxx')
-rwxr-xr-xsfx2/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 4fa88c354f99..1ff5b5b04adf 100755
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1245,7 +1245,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);
VclPtrInstance<PushButton> xWhatsNewButton(&GetWindow());
xWhatsNewButton->SetText(SfxResId(STR_WHATSNEW_BUTTON));
xWhatsNewButton->SetSizePixel(xWhatsNewButton->GetOptimalSize());
@@ -1284,7 +1284,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));
@@ -1311,7 +1311,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));
@@ -1338,7 +1338,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)
@@ -3231,22 +3231,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();
@@ -3261,7 +3262,7 @@ void SfxViewFrame::UpdateInfoBar( const OUString& sId,
auto pInfoBar = pInfoBarContainer->getInfoBar(sId);
if (pInfoBar)
- pInfoBar->Update(sMessage, eType);
+ pInfoBar->Update(sPrimaryMessage, sSecondaryMessage, eType);
}
}