summaryrefslogtreecommitdiff
path: root/sw/qa/extras/uiwriter/uiwriter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter.cxx')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 668aa435c801..9f5a8fcbada9 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -34,6 +34,7 @@
#include <test/mtfxmldump.hxx>
#include <unocrsr.hxx>
#include <unocrsrhelper.hxx>
+#include <unotbl.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdview.hxx>
@@ -106,6 +107,7 @@ public:
void testTdf90883TableBoxGetCoordinates();
void testEmbeddedDataSource();
void testUnoCursorPointer();
+ void testTextTableCellNames();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -152,6 +154,7 @@ public:
CPPUNIT_TEST(testTdf90883TableBoxGetCoordinates);
CPPUNIT_TEST(testEmbeddedDataSource);
CPPUNIT_TEST(testUnoCursorPointer);
+ CPPUNIT_TEST(testTextTableCellNames);
CPPUNIT_TEST_SUITE_END();
private:
@@ -1285,6 +1288,19 @@ void SwUiWriterTest::testUnoCursorPointer()
CPPUNIT_ASSERT(!static_cast<bool>(pCursor));
}
+void SwUiWriterTest::testTextTableCellNames()
+{
+ sal_Int32 nCol, nRow2;
+ SwXTextTable::GetCellPosition( OUString("z1"), nCol, nRow2);
+ CPPUNIT_ASSERT(nCol == 51);
+ SwXTextTable::GetCellPosition( OUString("AA1"), nCol, nRow2);
+ CPPUNIT_ASSERT(nCol == 52);
+ SwXTextTable::GetCellPosition( OUString("AB1"), nCol, nRow2);
+ CPPUNIT_ASSERT(nCol == 53);
+ SwXTextTable::GetCellPosition( OUString("BB1"), nCol, nRow2);
+ CPPUNIT_ASSERT(nCol == 105);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();