sc/source/ui/navipi/content.cxx | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-)
New commits: commit ff8addee9c2c43c6ec064395e909665932e10899 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Apr 23 17:15:57 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Apr 24 20:18:30 2021 +0200 Related: tdf#130326: GetDrawNames doesn't do anything when !bisInNavigatoeDlg so return early instead of looping to do nothing though that was introduced by commit b41332475783c31136673fb44cf4c411bb0148f8 Author: Steve Yin <stev...@apache.org> Date: Mon Dec 2 15:54:29 2013 +0000 Integrate branch of IAccessible2 so maybe its existance is dubious Change-Id: Ibb8fe1409a8e66d37d51d9a1b99ce135f36b9522 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114565 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 03002a29272c..2d68a98a7aa6 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -869,6 +869,9 @@ constexpr int MAX_TREE_NODES = 1000; void ScContentTree::GetDrawNames( ScContentId nType ) { + if (!bisInNavigatoeDlg) + return; + if ( nRootType != ScContentId::ROOT && nRootType != nType ) // hidden ? return; @@ -901,25 +904,21 @@ void ScContentTree::GetDrawNames( ScContentId nType ) OUString aName = ScDrawLayer::GetVisibleName( pObject ); if (!aName.isEmpty()) { - if( bisInNavigatoeDlg ) + weld::TreeIter* pParent = m_aRootNodes[nType].get(); + if (pParent) { - weld::TreeIter* pParent = m_aRootNodes[nType].get(); - if (pParent) + m_xTreeView->insert(pParent, -1, &aName, nullptr, nullptr, nullptr, false, m_xScratchIter.get()); + m_xTreeView->set_sensitive(*m_xScratchIter, true); + treeNodeCount++; + if (treeNodeCount > MAX_TREE_NODES) { - m_xTreeView->insert(pParent, -1, &aName, nullptr, nullptr, nullptr, false, m_xScratchIter.get()); - m_xTreeView->set_sensitive(*m_xScratchIter, true); - treeNodeCount++; - if (treeNodeCount > MAX_TREE_NODES) - { - SAL_WARN("sc", "too many tree nodes, ignoring the rest"); - return; - } - }//end if parent - else - SAL_WARN("sc", "InsertContent without parent"); - } + SAL_WARN("sc", "too many tree nodes, ignoring the rest"); + return; + } + }//end if parent + else + SAL_WARN("sc", "InsertContent without parent"); } - } pObject = aIter.Next(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits