diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-01 10:40:56 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-01 10:42:12 +0200 |
commit | 024f334c48bc3d6cfac91ab7499f6b2863223c24 (patch) | |
tree | 32fcf0402aeeb593ab0165bf180a5681a19c0917 | |
parent | 15cea073e7ed4970e60967fe036fc492e2052203 (diff) |
Revert "fdo#44081 don't remove 'edit' pop-up menu entry from form in design mode"
This reverts commit 15cea073e7ed4970e60967fe036fc492e2052203. I
overlooked the fact during review that this introduces an svx <-> sfx2
circular dependency.
-rw-r--r-- | include/sfx2/shell.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/viewsh.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/tabvwsh.hxx | 3 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 12 | ||||
-rw-r--r-- | svx/source/form/fmview.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/view.hxx | 4 |
7 files changed, 9 insertions, 20 deletions
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx index 93593246e5fb..b79fd2da53ce 100644 --- a/include/sfx2/shell.hxx +++ b/include/sfx2/shell.hxx @@ -160,7 +160,7 @@ protected: */ SfxShell( SfxViewShell *pViewSh ); - void SetViewShell_Impl( SfxViewShell* pView ); + SAL_DLLPRIVATE void SetViewShell_Impl( SfxViewShell* pView ); SAL_DLLPRIVATE void Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId ); SAL_DLLPRIVATE SfxShellObject* GetShellObj_Impl() const; SAL_DLLPRIVATE void SetShellObj_Impl( SfxShellObject* pObj ); diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 0ed5838992e7..5cde8317aa2b 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -59,7 +59,6 @@ class SfxFrameItem; class Dialog; class Menu; class NotifyEvent; -class FmFormShell; #define SFX_PRINTER_PRINTER 1 // without JOB SETUP => Temporary #define SFX_PRINTER_JOBSETUP 2 @@ -208,9 +207,6 @@ public: void RemoveSubShell( SfxShell *pShell=NULL ); SfxShell* GetSubShell( sal_uInt16 ); - virtual FmFormShell* GetFormShell() { return 0; }; - virtual const FmFormShell* GetFormShell() const { return 0; }; - // Focus, KeyInput, Cursor void GotFocus() const; inline void LostFocus() const; diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index d1be5015b855..b20b82973be0 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -366,8 +366,7 @@ public: inline void SetScSbxObject( SbxObject* pOb ) { pScSbxObject = pOb; } - virtual const FmFormShell* GetFormShell() const SAL_OVERRIDE { return pFormShell; } - virtual FmFormShell* GetFormShell() SAL_OVERRIDE { return pFormShell; } + FmFormShell* GetFormShell() const { return pFormShell; } void InsertURL( const OUString& rName, const OUString& rURL, const OUString& rTarget, sal_uInt16 nMode ); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 5434fa6c1add..c01974d4ef5c 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -21,7 +21,6 @@ #include <stdio.h> -#include <svx/fmshell.hxx> #include <sfx2/infobar.hxx> #include <sfx2/viewfrm.hxx> #include <com/sun/star/document/MacroExecMode.hpp> @@ -867,15 +866,8 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet ) { case SID_EDITDOC: { - SfxViewShell *pVSh; - FmFormShell *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()))) + if ( !pSh || !pSh->HasName() || !( pSh->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) + || pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) rSet.DisableItem( SID_EDITDOC ); else { diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index b4e8a960975a..343c624c6f17 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -130,6 +130,9 @@ void FmFormView::Init() } } + if( pObjShell && pObjShell->IsReadOnly() ) + bInitDesignMode = false; + // dieses wird in der Shell vorgenommen // bDesignMode = !bInitDesignMode; // erzwingt, dass SetDesignMode ausgefuehrt wird SetDesignMode( bInitDesignMode ); diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 3da955070e6f..e3491cb26f76 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -1084,7 +1084,6 @@ SfxStyleSheetBasePool* SwDocShell::GetStyleSheetPool() void SwDocShell::SetView(SwView* pVw) { - SetViewShell_Impl(pVw); if ( 0 != (mpView = pVw) ) mpWrtShell = &mpView->GetWrtShell(); else diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx index 6e7db31b182f..fd09bf43ac0e 100644 --- a/sw/source/uibase/inc/view.hxx +++ b/sw/source/uibase/inc/view.hxx @@ -588,8 +588,8 @@ public: SfxShell *GetCurShell() { return m_pShell; } SwDocShell *GetDocShell(); inline const SwDocShell *GetDocShell() const; - inline virtual FmFormShell *GetFormShell() SAL_OVERRIDE { return m_pFormShell; } - inline virtual const FmFormShell *GetFormShell() const SAL_OVERRIDE { return m_pFormShell; } + inline FmFormShell *GetFormShell() { return m_pFormShell; } + inline const FmFormShell *GetFormShell() const { return m_pFormShell; } // so that in the SubShells' DTors m_pShell can be reset if applicable void ResetSubShell() { m_pShell = 0; } |