diff options
-rw-r--r-- | sw/qa/uitest/data/tdf143244.odt | bin | 0 -> 9831 bytes | |||
-rw-r--r-- | sw/qa/uitest/writer_tests7/tdf143244.py | 44 | ||||
-rw-r--r-- | sw/source/core/doc/tblrwcl.cxx | 2 |
3 files changed, 45 insertions, 1 deletions
diff --git a/sw/qa/uitest/data/tdf143244.odt b/sw/qa/uitest/data/tdf143244.odt Binary files differnew file mode 100644 index 000000000000..0fd3ff915a8a --- /dev/null +++ b/sw/qa/uitest/data/tdf143244.odt diff --git a/sw/qa/uitest/writer_tests7/tdf143244.py b/sw/qa/uitest/writer_tests7/tdf143244.py new file mode 100644 index 000000000000..a47074396334 --- /dev/null +++ b/sw/qa/uitest/writer_tests7/tdf143244.py @@ -0,0 +1,44 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +from uitest.framework import UITestCase +from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import select_pos + +# Bug 143244 - Redo of adding table rows breaks table style after cut/paste action + + +class tdf143244(UITestCase): + def test_tdf143244(self): + with self.ui_test.load_file(get_url_for_data_file("tdf143244.odt")) as writer_doc: + self.xUITest.executeCommand(".uno:SelectAll") + self.xUITest.executeCommand(".uno:Cut") + self.xUITest.executeCommand(".uno:Paste") + self.xUITest.executeCommand(".uno:GoUp") + xWriterDoc = self.xUITest.getTopFocusWindow() + xWriterEdit = xWriterDoc.getChild("writer_edit") + for i in range(0,6): + xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"})) + for i in range(0,4): + self.xUITest.executeCommand(".uno:Undo") + for i in range(0,4): + self.xUITest.executeCommand(".uno:Redo") + for i in range (0,3): + self.xUITest.executeCommand(".uno:GoUp") + with self.ui_test.execute_dialog_through_command(".uno:TableDialog") as xDialog: + xTabs = xDialog.getChild("tabcontrol") + select_pos(xTabs, "4") #tab Background + btncolor = xDialog.getChild("btncolor") + btncolor.executeAction("CLICK", tuple()) + hex_custom = xDialog.getChild("hex_custom") + if i == 0: + self.assertEqual(get_state_as_dict(hex_custom)["Text"], "bee3d3") + if i == 1: + self.assertEqual(get_state_as_dict(hex_custom)["Text"], "ffffff") + if i == 2: + self.assertEqual(get_state_as_dict(hex_custom)["Text"], "dddddd") +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 6d8d86ce8f12..48ac3ea7fbc5 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -607,7 +607,7 @@ bool SwTable::InsertRow_( SwDoc* pDoc, const SwSelBoxes& rBoxes, pPCD->AddRowCols( *this, rBoxes, nCnt, bBehind ); pDoc->UpdateCharts( GetFrameFormat()->GetName() ); - pDoc->GetDocShell()->GetFEShell()->UpdateTableStyleFormatting(); + pDoc->GetDocShell()->GetFEShell()->UpdateTableStyleFormatting(pTableNd); return true; } |