summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/qa/unit/data/csv/tdf152053.csv3
-rw-r--r--sc/qa/unit/subsequent_filters_test2.cxx15
2 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/unit/data/csv/tdf152053.csv b/sc/qa/unit/data/csv/tdf152053.csv
new file mode 100644
index 000000000000..3872dc60560d
--- /dev/null
+++ b/sc/qa/unit/data/csv/tdf152053.csv
@@ -0,0 +1,3 @@
+Date
+2020-12-29
+2020-12-29
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx
index 0118b5b627cc..9cd12d5a72d6 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -168,6 +168,7 @@ public:
void testAutoheight2Rows();
void testXLSDefColWidth();
void testTdf148423();
+ void testTdf152053();
void testPreviewMissingObjLink();
void testShapeRotationImport();
void testShapeDisplacementOnRotationImport();
@@ -286,6 +287,7 @@ public:
CPPUNIT_TEST(testAutoheight2Rows);
CPPUNIT_TEST(testXLSDefColWidth);
CPPUNIT_TEST(testTdf148423);
+ CPPUNIT_TEST(testTdf152053);
CPPUNIT_TEST(testPreviewMissingObjLink);
CPPUNIT_TEST(testShapeRotationImport);
CPPUNIT_TEST(testShapeDisplacementOnRotationImport);
@@ -2331,6 +2333,19 @@ void ScFiltersTest2::testTdf148423()
CPPUNIT_ASSERT_EQUAL(32880, nWidth);
}
+void ScFiltersTest2::testTdf152053()
+{
+ createScDoc("csv/tdf152053.csv");
+ ScDocument* pDoc = getScDoc();
+
+ int nWidth = pDoc->GetColWidth(0, 0, false);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 1162
+ // - Actual : 715
+ CPPUNIT_ASSERT_EQUAL(1162, nWidth);
+}
+
void ScFiltersTest2::testPreviewMissingObjLink()
{
createScDoc("ods/keep-preview-missing-obj-link.ods");