[Libreoffice-commits] core.git: sfx2/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 21 01:27:11 PST 2015
sfx2/source/view/sfxbasecontroller.cxx | 9 ++++++---
sfx2/source/view/viewfrm.cxx | 10 ++++++----
2 files changed, 12 insertions(+), 7 deletions(-)
New commits:
commit 4be8eae04eaeaa943cdcfe7443813d47bf995123
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 21 09:25:19 2015 +0000
Resolves: fdo#88594 crash on F1 with local help
regression from
commit 1049511c0c5d881df4ba8042744d63d37878296f
Date: Tue Jan 13 21:43:27 2015 +0900
infobar: add buttons one by one with addButton
Change-Id: Icf758a9671191836bbe5bc7ca7d978574cb74479
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 5ea8ebe..021aea4 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1448,10 +1448,13 @@ void SfxBaseController::ShowInfoBars( )
{
// Get the Frame and show the InfoBar if not checked out
SfxViewFrame* pViewFrame = m_pData->m_pViewShell->GetFrame();
- PushButton* pBtn = new PushButton( &pViewFrame->GetWindow(), SfxResId( BT_CHECKOUT ) );
- pBtn->SetClickHdl( LINK( this, SfxBaseController, CheckOutHandler ) );
SfxInfoBarWindow* pInfoBar = pViewFrame->AppendInfoBar( "checkout", SfxResId( STR_NONCHECKEDOUT_DOCUMENT ) );
- pInfoBar->addButton(pBtn);
+ if (pInfoBar)
+ {
+ PushButton* pBtn = new PushButton( &pViewFrame->GetWindow(), SfxResId( BT_CHECKOUT ) );
+ pBtn->SetClickHdl( LINK( this, SfxBaseController, CheckOutHandler ) );
+ pInfoBar->addButton(pBtn);
+ }
}
}
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 5ba7ef1..77a15b5 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1380,10 +1380,12 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
else
{
SfxInfoBarWindow* pInfoBar = AppendInfoBar("readonly", SfxResId(STR_READONLY_DOCUMENT));
-
- PushButton* pBtn = new PushButton( &GetWindow(), SfxResId(BT_READONLY_EDIT));
- pBtn->SetClickHdl(LINK(this, SfxViewFrame, SwitchReadOnlyHandler));
- pInfoBar->addButton(pBtn);
+ if (pInfoBar)
+ {
+ PushButton* pBtn = new PushButton( &GetWindow(), SfxResId(BT_READONLY_EDIT));
+ pBtn->SetClickHdl(LINK(this, SfxViewFrame, SwitchReadOnlyHandler));
+ pInfoBar->addButton(pBtn);
+ }
}
break;
More information about the Libreoffice-commits
mailing list