summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2023-12-12 15:51:42 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2023-12-22 09:59:04 +0100
commit0097f8595791f4bbf499ebd423f4f80ec8e38dbe (patch)
treef5e0258fc80830904cbf56cb9f9ff100ab91b493 /sc
parent36b7ae36715cbf47b451e41e47aebe28cf594bd8 (diff)
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.behrens@allotropia.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/uitest/calc_tests8/navigator.py27
-rw-r--r--sc/source/ui/navipi/navipi.cxx1
2 files changed, 28 insertions, 0 deletions
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: