Kaydet (Commit) 053b1417 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

tdf#123968 Test that imported field is editable

Change-Id: I2dbcc6fa8ee9c469cfc038a2622962b8939ec174
Reviewed-on: https://gerrit.libreoffice.org/70921
Tested-by: Jenkins
Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
üst 4657335f
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <view.hxx> #include <view.hxx>
#include <edtwin.hxx> #include <edtwin.hxx>
#include <olmenu.hxx> #include <olmenu.hxx>
#include <hintids.hxx>
typedef std::map<OUString, css::uno::Sequence< css::table::BorderLine> > AllBordersMap; typedef std::map<OUString, css::uno::Sequence< css::table::BorderLine> > AllBordersMap;
typedef std::pair<OUString, css::uno::Sequence< css::table::BorderLine> > StringSequencePair; typedef std::pair<OUString, css::uno::Sequence< css::table::BorderLine> > StringSequencePair;
...@@ -930,6 +931,22 @@ DECLARE_ODFIMPORT_TEST(testTdf113289, "tdf113289.odt") ...@@ -930,6 +931,22 @@ DECLARE_ODFIMPORT_TEST(testTdf113289, "tdf113289.odt")
getProperty<sal_Int8>(aPageStyle, "FootnoteLineStyle")); getProperty<sal_Int8>(aPageStyle, "FootnoteLineStyle"));
} }
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(); CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment