Early bailout
Change-Id: I34cb0f151b35fe775008d449bf7efb72ae81f29d
This commit is contained in:
parent
e3f3ce96d0
commit
7224b69bd5
1 changed files with 8 additions and 6 deletions
|
@ -875,13 +875,15 @@ void ScRefHandler::SwitchToDocument()
|
|||
|
||||
bool ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be 0
|
||||
{
|
||||
// default: allow only same document (overridden in function dialog)
|
||||
OUString aCmpName;
|
||||
if ( pDocSh )
|
||||
aCmpName = pDocSh->GetTitle();
|
||||
|
||||
// if aDocName isn't initialized, allow
|
||||
return ( m_aDocName.isEmpty() || m_aDocName == aCmpName );
|
||||
if ( m_aDocName.isEmpty() )
|
||||
return true;
|
||||
|
||||
if ( !pDocSh )
|
||||
return false;
|
||||
|
||||
// default: allow only same document (overridden in function dialog)
|
||||
return m_aDocName==pDocSh->GetTitle();
|
||||
}
|
||||
|
||||
bool ScRefHandler::IsRefInputMode() const
|
||||
|
|
Loading…
Reference in a new issue