diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-11-30 00:04:48 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-11-30 00:04:48 -0500 |
commit | 24a2e032ed0d5f1dcddf583424dfe9ab4c214ebf (patch) | |
tree | 45e36906d217b89d2a502bab523b66de4b91caa9 | |
parent | af659d4ca2769669fe1066514f6d6279f1b8b8cb (diff) |
Highlight the reference entry after ensuring that it's mappable.
Change-Id: I9b245c56c58b2db741e7c69c5ad480179db25ee8
-rw-r--r-- | sc/source/ui/xmlsource/xmlsourcedlg.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index c60cc1d65a47..fed942e865ae 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -304,17 +304,6 @@ void ScXMLSourceDlg::TreeItemSelected() } mpCurRefEntry = getReferenceEntry(maLbTree, pEntry); - if (mpCurRefEntry != pEntry) - { - // Highlight the reference entry if it differs from the current entry. - SvViewDataEntry* pView = maLbTree.GetViewDataEntry(mpCurRefEntry); - if (pView) - { - pView->SetHighlighted(true); - maLbTree.PaintEntry(mpCurRefEntry); - maHighlightedEntries.push_back(mpCurRefEntry); - } - } ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*mpCurRefEntry); OSL_ASSERT(pUserData); @@ -404,6 +393,16 @@ void ScXMLSourceDlg::RepeatElementSelected(SvTreeListEntry& rEntry) return; } + SvViewDataEntry* p = maLbTree.GetViewDataEntry(&rEntry); + if (!p->IsHighlighted()) + { + // Highlight the entry if not highlighted already. This can happen + // when the current entry is a child entry of a repeat element entry. + p->SetHighlighted(true); + maLbTree.PaintEntry(&rEntry); + maHighlightedEntries.push_back(&rEntry); + } + SelectAllChildEntries(rEntry); SetRangeLinkable(); } |