sc/qa/uitest/calc_tests8/navigator.py | 27 +++++++++++++++++++++++++++ sc/source/ui/navipi/navipi.cxx | 1 + 2 files changed, 28 insertions(+)
New commits: commit 0097f8595791f4bbf499ebd423f4f80ec8e38dbe Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Tue Dec 12 15:51:42 2023 +0100 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Fri Dec 22 09:59:04 2023 +0100 tdf#158652 notify navigator on insert/edit/delete comment links changes of the drawing engine to comments as it was done before with pictures, shapes and OLE objects ui unit test included Change-Id: I4fde3a82b80e73758fb3da94ed2553453d09e9ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160624 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/sc/qa/uitest/calc_tests8/navigator.py b/sc/qa/uitest/calc_tests8/navigator.py index ec8fa2ae9a2e..9c1769dcf49d 100644 --- a/sc/qa/uitest/calc_tests8/navigator.py +++ b/sc/qa/uitest/calc_tests8/navigator.py @@ -10,6 +10,7 @@ from uitest.framework import UITestCase from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file +from uitest.uihelper.calc import enter_text_to_cell class navigator(UITestCase): @@ -181,4 +182,30 @@ class navigator(UITestCase): self.xUITest.executeCommand(".uno:Sidebar") + + def test_tdf158652(self): + with self.ui_test.create_doc_in_start_center("calc"): + xCalcDoc = self.xUITest.getTopFocusWindow() + xGridWin = xCalcDoc.getChild("grid_window") + + self.xUITest.executeCommand(".uno:Sidebar") + + xGridWin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "ScNavigatorPanel"})) + + xCalcDoc = self.xUITest.getTopFocusWindow() + xNavigatorPanel = xCalcDoc.getChild("NavigatorPanel") + xContentBox = xNavigatorPanel.getChild('contentbox') + enter_text_to_cell(xGridWin, "A1", "1") + + commentText = mkPropertyValues({"Text":"CommentText"}) + self.xUITest.executeCommandWithParameters(".uno:InsertAnnotation", commentText) + xComments = xContentBox.getChild("6") + self.assertEqual(len(xComments.getChildren()), 1) + + self.xUITest.executeCommand(".uno:DeleteNote") + xComments = xContentBox.getChild("6") + self.assertEqual(len(xComments.getChildren()), 0) + + self.xUITest.executeCommand(".uno:Sidebar") + # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 5fc6fee82122..ae95220eeffb 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -540,6 +540,7 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint ) m_xLbEntries->Refresh( ScContentId::GRAPHIC ); m_xLbEntries->Refresh( ScContentId::OLEOBJECT ); m_xLbEntries->Refresh( ScContentId::DRAWING ); + m_xLbEntries->Refresh( ScContentId::NOTE ); break; case SfxHintId::ScAreaLinksChanged: