[Libreoffice-commits] core.git: sfx2/source
Stephan Bergmann
sbergman at redhat.com
Mon Nov 18 02:18:15 PST 2013
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 <sbergman at 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 ?
More information about the Libreoffice-commits
mailing list