diff options
Diffstat (limited to 'sc/source/ui/view/tabvwsh4.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh4.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index afbe40780c3f..ec912c115848 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * @@ -141,11 +141,6 @@ void ScTabViewShell::Activate(bool bMDI) SfxViewShell* pSh = SfxViewShell::GetFirst( true, checkSfxViewShell<ScTabViewShell> ); while ( pSh!=nullptr && pOldHdl!=nullptr) { - // Hmm, what if pSh is a shell for a different document? But as this code - // does not seem to be LibreOfficeKit-specific, probably that doesn't - // happen, because having multiple documents open simultaneously has of - // course not been a problem at all in traditional desktop LibreOffice. - // (Unlike in a LibreOfficeKit-based process where it has been a problem.) if (static_cast<ScTabViewShell*>(pSh)->GetInputHandler() == pOldHdl) { pOldHdl->ResetDelayTimer(); @@ -1721,12 +1716,8 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame, // have we already one view ? if (pViewShell) { - // this view is not yet visible at this stage, so we look for not visible views, too, for this same document - SfxViewShell* pViewShell2 = pViewShell; - do - { - pViewShell2 = SfxViewShell::GetNext(*pViewShell2, /*only visible shells*/ false); - } while (pViewShell2 && pViewShell2->GetDocId() != pViewShell->GetDocId()); + // this view is not yet visible at this stage, so we look for not visible views, too + SfxViewShell* pViewShell2 = SfxViewShell::GetNext(*pViewShell, /*only visible shells*/ false); // if the second view is not this one, it means that there is // already more than one active view and so the formula mode // has already been disabled |