diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2014-08-27 18:34:02 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2014-09-04 07:45:44 -0500 |
commit | 9633a6592c9be5675a8636baed10fd3d1e0f70eb (patch) | |
tree | 7c40331efd47263059048bdd5975a28a8262a636 /sfx2 | |
parent | d431986bd49081581e86444af124d1d2ce90a407 (diff) |
fdo#44081 don't remove 'edit' pop-up menu entry from form in design mode
Conflicts:
sw/source/core/uibase/app/docsh.cxx
Change-Id: I009b0e1a155c298bd7f461547125df4ba76805d9
Reviewed-on: https://gerrit.libreoffice.org/11232
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 33e7d4c6d10a..9cb15a0f1444 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -859,8 +859,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 { |