sc/source/ui/inc/content.hxx | 1 - sc/source/ui/navipi/content.cxx | 32 -------------------------------- 2 files changed, 33 deletions(-)
New commits: commit d8fa0ca2a3befeb961f8555321af6f6cbf14c03d Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Oct 6 15:36:30 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Oct 6 18:23:35 2023 +0200 ScContentTree::LoadFile can't be called ScContentTree::LoadFile is only called if !aHiddenTitle.isEmpty() but the only thing that set aHiddenTitle is ScContentTree::LoadFile Change-Id: I91943a5d4762b5725995479bb1f0dc8e3fa0d7b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157649 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index 9cd7e977319d..9f7f6aada3b8 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -146,7 +146,6 @@ public: bool ActiveDocChanged(); void ResetManualDoc(); void SetManualDoc(const OUString& rName); - void LoadFile(const OUString& rUrl); void SelectDoc(const OUString& rName); void SelectEntryByName(const ScContentId nRoot, std::u16string_view rName); diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index dfdcc29ffcc1..96bd64a75924 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -1346,33 +1346,6 @@ IMPL_LINK(ScContentTree, DragBeginHdl, bool&, rUnsetDragIcon, bool) return bDisallow; } -void ScContentTree::LoadFile( const OUString& rUrl ) -{ - OUString aDocName = rUrl; - sal_Int32 nPos = aDocName.indexOf('#'); - if ( nPos != -1 ) - aDocName = aDocName.copy(0, nPos); // only the name without #... - - OUString aURL = aDocName; - OUString aFilter, aOptions; - ScDocumentLoader aLoader( aURL, aFilter, aOptions ); - if ( aLoader.IsError() ) - return; - - bHiddenDoc = true; - aHiddenName = aDocName; - aHiddenTitle = aLoader.GetTitle(); - pHiddenDocument = aLoader.GetDocument(); - - Refresh(); // get content from loaded document - - pHiddenDocument = nullptr; - - pParentWindow->GetDocNames( &aHiddenTitle ); // fill list - - // document is closed again by ScDocumentLoader in dtor -} - void ScContentTree::SetRootType( ScContentId nNew ) { if ( nNew != nRootType ) @@ -1505,11 +1478,6 @@ void ScContentTree::SelectDoc(const OUString& rName) // rName like shown in bHiddenDoc = false; SetManualDoc(aRealName); } - else if (!aHiddenTitle.isEmpty()) // hidden selected - { - if (!bHiddenDoc) - LoadFile(aHiddenName); - } else { OSL_FAIL("SelectDoc: not found");