Disabled slot with Put leaks entry (StateFormatPaintbrush/sw)
Same as https://cgit.freedesktop.org/libreoffice/core/commit/?id=21dde7a09e2cfe7b48d2fec1edc7a94fa94af5c3 Change-Id: I670c01eb5e5e747ceb77995ad855ee448faa054f Reviewed-on: https://gerrit.libreoffice.org/44931 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
parent
eb55a2cf1a
commit
21f8b386e0
1 changed files with 6 additions and 4 deletions
|
@ -168,12 +168,14 @@ void SwView::StateFormatPaintbrush(SfxItemSet &rSet)
|
|||
return;
|
||||
|
||||
bool bHasContent = m_pFormatClipboard && m_pFormatClipboard->HasContent();
|
||||
rSet.Put(SfxBoolItem(SID_FORMATPAINTBRUSH, bHasContent));
|
||||
if(!bHasContent)
|
||||
if( !bHasContent &&
|
||||
!SwFormatClipboard::CanCopyThisType( GetWrtShell().GetSelectionType())
|
||||
)
|
||||
{
|
||||
if( !SwFormatClipboard::CanCopyThisType( GetWrtShell().GetSelectionType() ) )
|
||||
rSet.DisableItem( SID_FORMATPAINTBRUSH );
|
||||
rSet.DisableItem( SID_FORMATPAINTBRUSH );
|
||||
}
|
||||
else
|
||||
rSet.Put(SfxBoolItem(SID_FORMATPAINTBRUSH, bHasContent));
|
||||
}
|
||||
|
||||
void SwView::UpdateWordCount(SfxShell* pShell, sal_uInt16 nSlot)
|
||||
|
|
Loading…
Reference in a new issue