Kaydet (Commit) 2a00e1f9 authored tarafından Katarina Behrens's avatar Katarina Behrens

tdf#118777: Disable signature line slot if non-text object

both in sw and sc

Change-Id: I54f7ec336026013d09ac6262779e7fcbd17c2084
Reviewed-on: https://gerrit.libreoffice.org/57949
Tested-by: Jenkins
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst 7e24a32d
......@@ -500,6 +500,7 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
bool bTabProt = GetViewData().GetDocument()->IsTabProtected(GetViewData().GetTabNo());
ScDocShell* pDocShell = GetViewData().GetDocShell();
bool bShared = pDocShell && pDocShell->IsDocShared();
SdrView* pSdrView = GetSdrView();
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
......@@ -530,7 +531,7 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
break;
case SID_INSERT_SIGNATURELINE:
if ( bTabProt || bShared )
if ( bTabProt || bShared || (pSdrView && pSdrView->GetMarkedObjectCount() != 0))
rSet.DisableItem( nWhich );
break;
case SID_EDIT_SIGNATURELINE:
......
......@@ -97,12 +97,18 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_INSERT_GRAPHIC:
case SID_INSERT_SIGNATURELINE:
if( m_pWrtShell->CursorInsideInputField() )
{
rSet.DisableItem(nWhich);
}
break;
case SID_INSERT_SIGNATURELINE:
if( !( m_nSelectionType & SelectionType::Text ||
m_nSelectionType & SelectionType::NumberList ) )
{
rSet.DisableItem(nWhich);
}
break;
case SID_EDIT_SIGNATURELINE:
case SID_SIGN_SIGNATURELINE:
if (!isSignatureLineSelected())
......
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