summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/inc/content.hxx2
-rw-r--r--sc/source/ui/navipi/content.cxx55
-rw-r--r--sc/source/ui/navipi/navipi.cxx5
-rw-r--r--sw/source/uibase/utlui/content.cxx4
4 files changed, 4 insertions, 62 deletions
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 1c0d2c27c4d5..f91636802901 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -55,7 +55,6 @@ class ScContentTree
ScDocument* pHiddenDocument; // temporary
bool bisInNavigatoeDlg;
bool m_bFreeze;
- OUString sKeyString;
ImplSVEvent* m_nAsyncMouseReleaseId;
o3tl::enumarray<ScContentId, sal_uInt16> pPosList; // for the sequence
@@ -124,7 +123,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){ bisInNavigatoeDlg=isInNavigateDlg;};
void set_selection_mode(SelectionMode eMode)
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 9ec35128176b..692894ec8270 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -451,7 +451,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 ( bisInNavigatoeDlg )
{
if(aCode.GetCode() == KEY_SPACE )
@@ -469,7 +470,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)
@@ -503,7 +503,6 @@ IMPL_LINK(ScContentTree, KeyInputHdl, const KeyEvent&, rKEvt, bool)
}
if (!bHasMakredObject && pScTabViewShell)
pScTabViewShell->SetDrawShell(false);
- ObjectFresh(nType, xEntry.get());
}
break;
}
@@ -663,56 +662,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 eb998e878e75..f9f196d3717b 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -536,11 +536,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;
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 87f526a17996..220a2be35534 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3528,8 +3528,8 @@ IMPL_LINK(SwContentTree, KeyInputHdl, const KeyEvent&, rEvent, bool)
}
}
}
- //Make KEY_SPACE has same function as DoubleClick ,
- //and realize multi-selection .
+ //Make KEY_SPACE has same function as DoubleClick, and realize
+ //multi-selection.
else if (aCode.GetCode() == KEY_SPACE && 0 == aCode.GetModifier())
{
std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());