summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2014-08-27 18:34:02 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2014-09-02 11:16:04 -0500
commitb3062ae65fc7069442cb5fc23dd68c2e8344e999 (patch)
treee3708580a152a9285b6bc1cde2ed810430b3f7da /sfx2/source
parent33927ae1208766d6fdb40fdc700afbe10ca91647 (diff)
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 <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/view/viewfrm.cxx11
1 files changed, 9 insertions, 2 deletions
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
{