summaryrefslogtreecommitdiff
path: root/sfx2/source/view
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-11-18 11:17:31 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-11-18 11:17:47 +0100
commit7f9fde2490610825c77dd1026e4b48c28d496036 (patch)
tree5a72e5f59c6a5b60a69fcbcca08b735d4f43f072 /sfx2/source/view
parentdc113e8a86e9904df8f37a2980db39cbabcea78f (diff)
Move SfxFrame::IsAutoLoadLocked_Impl to frame.cxx
Change-Id: I7b5d4a5eeeefa6191cebeada363553c8d6d6d29c
Diffstat (limited to 'sfx2/source/view')
-rw-r--r--sfx2/source/view/frame.cxx16
1 files changed, 16 insertions, 0 deletions
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 ?