Kaydet (Commit) 4be8eae0 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#88594 crash on F1 with local help

regression from

commit 1049511c
Date:   Tue Jan 13 21:43:27 2015 +0900
    infobar: add buttons one by one with addButton

Change-Id: Icf758a9671191836bbe5bc7ca7d978574cb74479
üst 7fe28b2c
...@@ -1448,10 +1448,13 @@ void SfxBaseController::ShowInfoBars( ) ...@@ -1448,10 +1448,13 @@ void SfxBaseController::ShowInfoBars( )
{ {
// Get the Frame and show the InfoBar if not checked out // Get the Frame and show the InfoBar if not checked out
SfxViewFrame* pViewFrame = m_pData->m_pViewShell->GetFrame(); 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 ) ); 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);
}
} }
} }
} }
......
...@@ -1380,10 +1380,12 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) ...@@ -1380,10 +1380,12 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
else else
{ {
SfxInfoBarWindow* pInfoBar = AppendInfoBar("readonly", SfxResId(STR_READONLY_DOCUMENT)); SfxInfoBarWindow* pInfoBar = AppendInfoBar("readonly", SfxResId(STR_READONLY_DOCUMENT));
if (pInfoBar)
PushButton* pBtn = new PushButton( &GetWindow(), SfxResId(BT_READONLY_EDIT)); {
pBtn->SetClickHdl(LINK(this, SfxViewFrame, SwitchReadOnlyHandler)); PushButton* pBtn = new PushButton( &GetWindow(), SfxResId(BT_READONLY_EDIT));
pInfoBar->addButton(pBtn); pBtn->SetClickHdl(LINK(this, SfxViewFrame, SwitchReadOnlyHandler));
pInfoBar->addButton(pBtn);
}
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment