sw/qa/extras/odfimport/data/tdf123968.odt |binary sw/qa/extras/odfimport/odfimport.cxx | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+)
New commits: commit b7fbe9ab555525b16d2a6a2fb1e2cf8d198234b4 Author: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> AuthorDate: Thu Apr 18 11:07:48 2019 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Tue Apr 23 13:42:39 2019 +0200 tdf#123968 Test that imported field is editable Reviewed-on: https://gerrit.libreoffice.org/70921 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> (cherry picked from commit 053b1417137b0cdec4e4fed7ae0c57cf67ff2698) Change-Id: I2dbcc6fa8ee9c469cfc038a2622962b8939ec174 Reviewed-on: https://gerrit.libreoffice.org/71112 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/sw/qa/extras/odfimport/data/tdf123968.odt b/sw/qa/extras/odfimport/data/tdf123968.odt new file mode 100644 index 000000000000..1c081619ea30 Binary files /dev/null and b/sw/qa/extras/odfimport/data/tdf123968.odt differ diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 9ee4f206f5a5..9800607e371a 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -30,6 +30,7 @@ #include <edtwin.hxx> #include <olmenu.hxx> #include <cmdid.h> +#include <hintids.hxx> typedef std::map<OUString, css::uno::Sequence< css::table::BorderLine> > AllBordersMap; typedef std::pair<OUString, css::uno::Sequence< css::table::BorderLine> > StringSequencePair; @@ -926,5 +927,22 @@ DECLARE_ODFIMPORT_TEST(testTdf123829, "tdf123829.odt") pDoc->getIDocumentSettingAccess().get(DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA)); } +DECLARE_ODFIMPORT_TEST(testTdf123968, "tdf123968.odt") +{ + // The test doc is special in that it starts with a table and it also has a header. + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); + + pWrtShell->SelAll(); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode()); + + // The field is now editable like any text, thus the field content "New value" shows up for the cursor. + CPPUNIT_ASSERT_EQUAL(OUString("inputfield: " + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + + "New value" + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND)), + rStart.GetText()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits