diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/inc/content.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 55 | ||||
-rw-r--r-- | sc/source/ui/navipi/navipi.cxx | 5 |
3 files changed, 2 insertions, 60 deletions
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index 9156a72f14dc..88a2b9ac3dc3 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -54,7 +54,6 @@ class ScContentTree ScDocument* pHiddenDocument; // temporary bool bIsInNavigatorDlg; bool m_bFreeze; - OUString sKeyString; ImplSVEvent* m_nAsyncMouseReleaseId; o3tl::enumarray<ScContentId, sal_uInt16> pPosList; // for the sequence @@ -123,7 +122,6 @@ public: ScContentTree(std::unique_ptr<weld::TreeView> xTreeView, ScNavigatorDlg* pNavigatorDlg); ~ScContentTree(); - void ObjectFresh(ScContentId nType, const weld::TreeIter* pEntry = nullptr); void SetNavigatorDlgFlag(bool isInNavigateDlg){ bIsInNavigatorDlg=isInNavigateDlg;}; void hide() diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 53b4e413de50..c870e156c163 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -455,7 +455,8 @@ IMPL_LINK(ScContentTree, KeyInputHdl, const KeyEvent&, rKEvt, bool) break; } } - //Make KEY_SPACE has same function as DoubleClick + //Make KEY_SPACE has same function as DoubleClick, and realize + //multi-selection. if ( bIsInNavigatorDlg ) { if(aCode.GetCode() == KEY_SPACE ) @@ -473,7 +474,6 @@ IMPL_LINK(ScContentTree, KeyInputHdl, const KeyEvent&, rKEvt, bool) if ( bHiddenDoc ) return true; //! later... OUString aText(m_xTreeView->get_text(*xEntry)); - sKeyString = aText; if (!aManualDoc.isEmpty()) pParentWindow->SetCurrentDoc( aManualDoc ); switch (nType) @@ -507,7 +507,6 @@ IMPL_LINK(ScContentTree, KeyInputHdl, const KeyEvent&, rKEvt, bool) } if (!bHasMakredObject && pScTabViewShell) pScTabViewShell->SetDrawShell(false); - ObjectFresh(nType, xEntry.get()); } break; } @@ -667,56 +666,6 @@ ScDocument* ScContentTree::GetSourceDocument() return nullptr; } -//Move along and draw "*" sign . -void ScContentTree::ObjectFresh(ScContentId nType, const weld::TreeIter* pEntry) -{ - if (bHiddenDoc && !pHiddenDocument) - return; // other document displayed - - if (!(nType == ScContentId::GRAPHIC || nType == ScContentId::OLEOBJECT || nType == ScContentId::DRAWING)) - return; - - auto nOldChildren = m_aRootNodes[nType] ? m_xTreeView->iter_n_children(*m_aRootNodes[nType]) : 0; - auto nOldPos = m_xTreeView->vadjustment_get_value(); - - freeze(); - ClearType( nType ); - GetDrawNames( nType/*, nId*/ ); - thaw(); - - auto nNewChildren = m_aRootNodes[nType] ? m_xTreeView->iter_n_children(*m_aRootNodes[nType]) : 0; - bool bRestorePos = nOldChildren == nNewChildren; - - if (!pEntry) - ApplyNavigatorSettings(bRestorePos, nOldPos); - if (!pEntry) - return; - - weld::TreeIter* pParent = m_aRootNodes[nType].get(); - std::unique_ptr<weld::TreeIter> xOldEntry; - std::unique_ptr<weld::TreeIter> xBeginEntry(m_xTreeView->make_iterator(pParent)); - bool bBeginEntry = false; - if( pParent ) - bBeginEntry = m_xTreeView->iter_children(*xBeginEntry); - while (bBeginEntry) - { - OUString aTempText(m_xTreeView->get_text(*xBeginEntry)); - if (aTempText == sKeyString) - { - xOldEntry = m_xTreeView->make_iterator(xBeginEntry.get()); - break; - } - bBeginEntry = m_xTreeView->iter_next(*xBeginEntry); - } - if (xOldEntry) - { - m_xTreeView->expand_row(*pParent); - m_xTreeView->select(*xOldEntry); - m_xTreeView->set_cursor(*xOldEntry); - StoreNavigatorSettings(); - } -} - void ScContentTree::Refresh( ScContentId nType ) { if ( bHiddenDoc && !pHiddenDocument ) diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index ef8b85482c90..68fdf7eafb32 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -541,11 +541,6 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint ) case SfxHintId::ScAnyDataChanged: aContentIdle.Start(); // Do not search notes immediately break; - case SfxHintId::ScKillEditView: - m_xLbEntries->ObjectFresh( ScContentId::OLEOBJECT ); - m_xLbEntries->ObjectFresh( ScContentId::DRAWING ); - m_xLbEntries->ObjectFresh( ScContentId::GRAPHIC ); - break; case SfxHintId::ScSelectionChanged: UpdateSelection(); break; |