sc/source/ui/xmlsource/xmlsourcedlg.cxx | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-)
New commits: commit 24a2e032ed0d5f1dcddf583424dfe9ab4c214ebf Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Fri Nov 30 00:04:48 2012 -0500 Highlight the reference entry after ensuring that it's mappable. Change-Id: I9b245c56c58b2db741e7c69c5ad480179db25ee8 diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index c60cc1d..fed942e 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(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits