diff options
author | Laurent Godard <lgodard.libre@laposte.net> | 2013-10-24 16:16:36 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-10-24 14:22:45 +0000 |
commit | 55d4d0a749ae1430f65bb0a127c1b2b9251044d2 (patch) | |
tree | 5666909c33487f45040af5643f66efb932597ea4 /sc/qa/complex | |
parent | 8e1bafcc37742073edacf53508057034a0e534ca (diff) |
avoid localization issue
use the sheet name to build the expected strings
Change-Id: I5f079975921338b9449186cc33a0acde180679d5
Reviewed-on: https://gerrit.libreoffice.org/6419
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/qa/complex')
-rw-r--r-- | sc/qa/complex/cellRanges/CheckXCellRangesQuery.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java b/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java index d7aac7ef0141..5039c2d7e4ba 100644 --- a/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java +++ b/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java @@ -47,6 +47,8 @@ import org.junit.Test; import org.openoffice.test.OfficeConnection; import static org.junit.Assert.*; +import com.sun.star.container.XNamed; + /** * Check the XCellRangesQuery interface on the SheetCell service. test was * created for bug i20044. @@ -55,6 +57,7 @@ public class CheckXCellRangesQuery /* extends ComplexTestCase */ { XSpreadsheetDocument m_xSheetDoc = null; XCellRangesQuery m_xCell = null; XSpreadsheet m_xSpreadSheet = null; + String sSheetName = ""; /** * Get all test methods. @@ -92,6 +95,10 @@ public class CheckXCellRangesQuery /* extends ComplexTestCase */ { m_xSpreadSheet = (XSpreadsheet) AnyConverter.toObject( new Type(XSpreadsheet.class),oIndexSheets.getByIndex(0)); + // get the first sheet name + XNamed m_xNamed = (XNamed) AnyConverter.toObject(new Type(XNamed.class),m_xSpreadSheet); + sSheetName = m_xNamed.getName(); + // get the cell System.out.println("Getting a cell from sheet") ; oObj = m_xSpreadSheet.getCellByPosition(2, 3); @@ -167,9 +174,9 @@ public class CheckXCellRangesQuery /* extends ComplexTestCase */ { @Test public void checkEmptyCell() { System.out.println("Checking an empty cell..."); // compare an empty cell with a cell with a value - assertTrue("\tQuery column differences did not return the correct value.", _queryColumnDifferences("Sheet1.C4")); + assertTrue("\tQuery column differences did not return the correct value.", _queryColumnDifferences(sSheetName+".C4")); // compare an empty cell with a cell with a value - assertTrue("\tQuery column differences did not return the correct value.", _queryRowDifferences("Sheet1.C4")); + assertTrue("\tQuery column differences did not return the correct value.", _queryRowDifferences(sSheetName+".C4")); // try to get this cell // assertTrue("\tQuery empty cells did not return the correct value.", _queryEmptyCells("Sheet1.C4")); System.out.println("...done"); @@ -195,9 +202,9 @@ public class CheckXCellRangesQuery /* extends ComplexTestCase */ { } // compare an cell with value 5 with a cell with value 15 - assertTrue("\tQuery column differences did not return the correct value.", _queryColumnDifferences("Sheet1.C4")); + assertTrue("\tQuery column differences did not return the correct value.", _queryColumnDifferences(sSheetName + ".C4")); // compare an cell with value 5 with a cell with value 15 - assertTrue("\tQuery column differences did not return the correct value.", _queryRowDifferences("Sheet1.C4")); + assertTrue("\tQuery column differences did not return the correct value.", _queryRowDifferences(sSheetName+".C4")); // try to get nothing assertTrue("\tQuery empty cells did not return the correct value.", _queryEmptyCells("")); System.out.println("...done"); |