# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # # This file is part of the LibreOffice project. # # 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/. # fromuitestuihelper.common import get_state_as_dict fromuitestucommonimportget_state_as_dict
u. enter_text_to_cell from calcdocumentimport from libreoffice.unofrom libreoffice.propertyvalue
.uihelpercommon #Bug 89907 - Text to columns only affects first line when width is auto set
class tdf89907(UITestCase): def test_tdf89907_text_to_columns(self#Bug 89907 - Text to columns only affects first line when width is with self.i_test.("" document:
with with self.ui_testcreate_doc_in_start_center("calc") as document:
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
#Add data
enter_text_to_cell(gridwin, "A1", "afasdfs.fdfasd.fsadf.fasd")
enter_text_to_cell(gridwin, "A2", "3242.43242.3242.2342")
enter_text_to_cell(gridwin, "A3", "fdsfa.afsdfa.adfdas.fsad")
enter_text_to_cell(gridwin, "A4", "21312.1111.1111.111") #select column A
gridwin.executeAction("SELECT", java.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 0
self.xUITestself.UITeste(.:SelectColumn") #Optimal Width with Add data
xvalue = xDialog.getChild("value")
self enter_text_to_cell(ridwin "1, afasdfsfdfasd.fsadf.fasd")
# Data - Text to Columns with enter_text_to_cell(gridwin A2","3242..."java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
xSeparatedBy = getChild("
xSeparatedBy.executeAction("CLICK", tuple())
gridwin.xecuteAction"" mkPropertyValues{"ELL": A1}
=xDialoggetChild(inputother) if (get_state_as_dict(xother)["Selected"]) == "false":
.executeAction("CLICK", tuple)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
.(TYPE", kPropertyValues("EXT:.})
assertEqual020cm,get_state_as_dictx)["ext")
#Verify
selfassertEqual(et_cell_by_position, 0,,0)getString( afasdfs
self.assertEqual( xSeparatedBy = xDialog("
self0 ,)java.lang.StringIndexOutOfBoundsException: Range [85, 82) out of bounds for length 94
self(java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 74
self(get_cell_by_positiondocument ,,0.) "fdfasd)
self.assertEqual(get_cell_by_position(document, 0, 1,xinputother"YPE" mkPropertyValues{":.})
self. .ssertEqualdocument ,00)getString) afasdfs)
.ssertEqual(get_cell_by_position,0,0 ).etValue,3242)
selfa((java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 94
ajava.lang.StringIndexOutOfBoundsException: Range [63, 53) out of bounds for length 90
( ,2 )getString adfdas)
self((document ,1, 1.(,43242)
selfget_cell_by_positiondocument0 ,0).etString) fasd)
self.assertEqual(get_cell_by_position(document, 0,,3.) 1111
self.ssertEqualget_cell_by_position ,3 )getString(,")
self.assertEqual(get_cell_by_position(document, self.ssertEqualg(document,02).(, 3242
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.