From b3062ae65fc7069442cb5fc23dd68c2e8344e999 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Wed, 27 Aug 2014 18:34:02 +0200 Subject: fdo#44081 don't remove 'edit' pop-up menu entry from form in design mode Change-Id: I009b0e1a155c298bd7f461547125df4ba76805d9 Reviewed-on: https://gerrit.libreoffice.org/11230 Reviewed-by: Lionel Elie Mamane Tested-by: Lionel Elie Mamane --- sfx2/source/view/viewfrm.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 1e70bd693330..2bf098933649 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -866,8 +866,15 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet ) { case SID_EDITDOC: { - if ( !pSh || !pSh->HasName() || !( pSh->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) - || pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) + const SfxViewShell *pVSh; + const SfxShell *pFSh; + if ( !pSh || + !pSh->HasName() || + !( pSh->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) || + ( pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && + ( !(pVSh = pSh->GetViewShell()) || + !(pFSh = pVSh->GetFormShell()) || + !pFSh->IsDesignMode()))) rSet.DisableItem( SID_EDITDOC ); else { -- cgit