sfx2/source/doc/objmisc.cxx | 20 -------------------- sfx2/source/view/frame.cxx | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 20 deletions(-)
New commits: commit 7f9fde2490610825c77dd1026e4b48c28d496036 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 18 11:17:31 2013 +0100 Move SfxFrame::IsAutoLoadLocked_Impl to frame.cxx Change-Id: I7b5d4a5eeeefa6191cebeada363553c8d6d6d29c diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index f1db22e..590f53c 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 e1999d5..f64b7b6 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 ? _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits