sc/source/ui/view/tabvwshb.cxx | 3 ++- sw/source/uibase/uiview/viewstat.cxx | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-)
New commits: commit 2a00e1f98d4cca448c1394e2504cc7539cb9ac1d Author: Katarina Behrens <katarina.behr...@cib.de> AuthorDate: Tue Jul 24 19:03:23 2018 +0200 Commit: Katarina Behrens <katarina.behr...@cib.de> CommitDate: Wed Jul 25 17:35:32 2018 +0200 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: Katarina Behrens <katarina.behr...@cib.de> diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 5fc41502f1ea..9fa70ff0ed0f 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -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: diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index 73661dca0b1b..04e344d0b10e 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -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()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits