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.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 1fff27fff064..774bfbab8092 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -372,6 +372,7 @@ public:
void testTdf128860();
void testTdf133589();
void testInconsistentBookmark();
+ void testInsertLongDateFormat();
#if HAVE_FEATURE_PDFIUM
void testInsertPdf();
#endif
@@ -588,6 +589,7 @@ public:
CPPUNIT_TEST(testTdf133524);
CPPUNIT_TEST(testTdf128860);
CPPUNIT_TEST(testTdf133589);
+ CPPUNIT_TEST(testInsertLongDateFormat);
#if HAVE_FEATURE_PDFIUM
CPPUNIT_TEST(testInsertPdf);
#endif
@@ -7308,6 +7310,18 @@ void SwUiWriterTest::testTdf133589()
CPPUNIT_ASSERT_EQUAL(sReplaced, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
}
+void SwUiWriterTest::testInsertLongDateFormat()
+{
+ // only for Hungarian, yet
+ createDoc("tdf133524.fodt");
+ dispatchCommand(mxComponent, ".uno:InsertDateField", {});
+ // Make sure that the document starts with a field now, and its expanded string value contains space
+ const uno::Reference< text::XTextRange > xField = getRun(getParagraph(1), 1);
+ CPPUNIT_ASSERT_EQUAL(OUString("TextField"), getProperty<OUString>(xField, "TextPortionType"));
+ // the date format was "YYYY-MM-DD", but now "YYYY. MMM DD."
+ CPPUNIT_ASSERT(xField->getString().indexOf(" ") > -1);
+}
+
#if HAVE_FEATURE_PDFIUM
void SwUiWriterTest::testInsertPdf()
{