diff options
-rw-r--r-- | sc/qa/uitest/calc_tests8/navigator.py | 27 | ||||
-rw-r--r-- | sc/source/ui/navipi/navipi.cxx | 1 |
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: |