From b5c616d10bff3213840d4893d13b4493de71fa56 Mon Sep 17 00:00:00 2001 From: Vasily Melenchuk Date: Wed, 24 Nov 2021 14:50:12 +0300 Subject: tdf#104823: support for sdt plain text fields This is a squashed commit containing set of changes: * Create a input field from sdt text block. * Advanced support for reading field data from data bindings which can point to custom xml or properties xml. For this XOOXMLDocumentPropertiesImporter idl interface was extrended with extra getterrs to get properties as xml dom elements. * Support for exporting of this feature back to docx. For this some extra parameters for sdt block are kept in newly introduced grabbag for input fields. If field does not contain grabbag it being exported as before (FILLIN or whatsoever), otherwise sdt block is counstructed based on data from grabbag. * Basic support for updating custom xml values back into custom xmls with usage of xslt transformations. To achieve this extra parameters were introduced to XXSLTTransformer: now it is able to support in-memory transformation stylesheets. Some unittests were corrected: since sdt plain text edit area is a field located inside paragraph in outout corresponding sdt is also located inside paragraph (instead of Word's approach with paragraph inside sdt). Seems this is not critical. Change-Id: I1a73ef300db3619804f7adf18579bea708764c14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127015 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport7.cxx') diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index f3077fa1fd2d..a16de671a6ba 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -686,7 +686,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtAndShapeOverlapping) loadAndSave("ShapeOverlappingWithSdt.docx"); xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/mc:AlternateContent"); - assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt[1]/w:sdtContent[1]/w:r[1]/w:t[1]"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt[1]/w:sdtContent[1]/w:r[1]"); } CPPUNIT_TEST_FIXTURE(Test, testLockedCanvas) -- cgit v1.2.3