diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 20 | ||||
-rw-r--r-- | sfx2/source/view/frame.cxx | 16 |
2 files changed, 16 insertions, 20 deletions
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index f1db22ed7c4b..590f53c145a8 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1044,26 +1044,6 @@ void SfxObjectShell::PrepareReload( ) { } -// Can be moved to frame.cxx, when 358+36x-State have been merged - -sal_Bool SfxFrame::IsAutoLoadLocked_Impl() const -{ - // Its own Docucument is locked? - const SfxObjectShell* pObjSh = GetCurrentDocument(); - if ( !pObjSh || !pObjSh->IsAutoLoadLocked() ) - return sal_False; - - // Its children are locked? - for ( sal_uInt16 n = GetChildFrameCount(); n--; ) - if ( !GetChildFrame(n)->IsAutoLoadLocked_Impl() ) - return sal_False; - - // otherwise allow AutoLoad - return sal_True; -} - -//------------------------------------------------------------------------- - sal_Bool SfxObjectShell::IsAutoLoadLocked() const /* Returns whether an Autoload is allowed to be executed. Before the diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index e1999d506ed7..f64b7b6b4614 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -329,6 +329,22 @@ SfxDispatcher* SfxFrame::GetDispatcher_Impl() const return GetParentFrame()->GetDispatcher_Impl(); } +sal_Bool SfxFrame::IsAutoLoadLocked_Impl() const +{ + // Its own Docucument is locked? + const SfxObjectShell* pObjSh = GetCurrentDocument(); + if ( !pObjSh || !pObjSh->IsAutoLoadLocked() ) + return sal_False; + + // Its children are locked? + for ( sal_uInt16 n = GetChildFrameCount(); n--; ) + if ( !GetChildFrame(n)->IsAutoLoadLocked_Impl() ) + return sal_False; + + // otherwise allow AutoLoad + return sal_True; +} + SfxObjectShell* SfxFrame::GetCurrentDocument() const { return pImp->pCurrentViewFrame ? |