Kaydet (Commit) 7f9fde24 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Move SfxFrame::IsAutoLoadLocked_Impl to frame.cxx

Change-Id: I7b5d4a5eeeefa6191cebeada363553c8d6d6d29c
üst dc113e8a
...@@ -1044,26 +1044,6 @@ void SfxObjectShell::PrepareReload( ) ...@@ -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 sal_Bool SfxObjectShell::IsAutoLoadLocked() const
/* Returns whether an Autoload is allowed to be executed. Before the /* Returns whether an Autoload is allowed to be executed. Before the
......
...@@ -329,6 +329,22 @@ SfxDispatcher* SfxFrame::GetDispatcher_Impl() const ...@@ -329,6 +329,22 @@ SfxDispatcher* SfxFrame::GetDispatcher_Impl() const
return GetParentFrame()->GetDispatcher_Impl(); 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 SfxObjectShell* SfxFrame::GetCurrentDocument() const
{ {
return pImp->pCurrentViewFrame ? return pImp->pCurrentViewFrame ?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment