1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 from uitest
.framework
import UITestCase
10 from uitest
.uihelper
.common
import get_url_for_data_file
11 from libreoffice
.calc
.document
import get_cell_by_position
12 from libreoffice
.uno
.propertyvalue
import mkPropertyValues
14 #Bug 85403 - no broadcast after text to columns to convert text to numbers
16 class tdf85403(UITestCase
):
17 def test_tdf85403_text_to_columns(self
):
18 with self
.ui_test
.load_file(get_url_for_data_file("tdf85403.ods")) as calc_doc
:
19 xCalcDoc
= self
.xUITest
.getTopFocusWindow()
20 gridwin
= xCalcDoc
.getChild("grid_window")
22 #'123 in A1, SUM(A1) in B1, result is 0 as expected,
23 #now select A1 and use data->text to columns->ok and B1 is not updated,
24 #putting a new SUM(A1) in C1 will show 123
25 gridwin
.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
26 # Data - Text to Columns
27 with self
.ui_test
.execute_dialog_through_command(".uno:TextToColumns"):
31 self
.assertEqual(get_cell_by_position(calc_doc
, 0, 1, 0).getValue(), 123)
33 # vim: set shiftwidth=4 softtabstop=4 expandtab: