https://bugs.documentfoundation.org/show_bug.cgi?id=172878

BogdanB <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Regression By|                            |Miklos Vajna
           Keywords|bibisectRequest             |bibisected
                 CC|                            |[email protected]

--- Comment #4 from BogdanB <[email protected]> ---

author  Miklos Vajna <[email protected]>    2022-09-19 10:01:36 +0200
committer       Miklos Vajna <[email protected]>    2022-09-19 11:31:05
+0200
commit  de90c192cb8f1f03a4028493d8bfe9a127a76b2a (patch)
tree    3bc07cac0f62f8d58a3301d1e1cb073926e03b05
parent  b20a64ce05ebf3720dd2d10ccd384020803c2ff2 (diff)
sw content controls, plain text: enable DOCX filter with data binding
- writerfilter/ had explicit code to not map plain text SDT to Writer content
  controls if it has data bindings specified, lift this limitation and set the
  value of content control from data binding, like Word does and Writer did it
  for input fields since b5c616d10bff3213840d4893d13b4493de71fa56 (tdf#104823:
  support for sdt plain text fields, 2021-11-24)

- call DocxExport::AddSdtData() on the export side to do the opposite on export

- give up on the idea to export content controls to DOCX by finding the text
  attribute in SwWW8AttrIter::OutAttrWithRange(): this needs buffering in both
  directions (need to start the SDT before the start of the run, need to end it
  after the end of the run), and solving this using marks and merges at a
  fast-serializer level looks like hacks on top of hacks. To be more specific,
  CppunitTest_sw_ooxmlexport7's testSdtAndShapeOverlapping seems to be very
hard
  to fix with this design

- instead, give not only the start position but also the length of the run to
  DocxAttributeOutput::EndRun(), which has random access to the doc model and
can
  look up if there is a content control start or end that needs writing at the
  current position of the XML output, without any buffering, which also
  means less code

- adapt CppunitTest_sw_ooxmlfieldexport's testSdtBeforeField, which didn't like
  the empty run at the start of content controls, which seems to be harmless
  otherwise

- fix CppunitTest_sw_ooxmlfieldexport CPPUNIT_TEST_NAME=testSdtDateDuplicate by
  disabling the "set content control value from data binding" logic for date
  pickers because that logic in writerfilter/ sets the value as-is and it has
to
  consider the requested date format before this can be enabled

As a side effect, this gives PDF export for plain text SDTs, even if they have
data binding set. CppunitTest_sw_ooxmlfieldexport's testTdf104823 is now
updated to ensure that we import such SDTs as Writer content controls.

Change-Id: I749a845b5a25454c51066b8ded892682f523b6b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140134
Reviewed-by: Miklos Vajna <[email protected]>
Tested-by: Jenkins

Miklos, can you please take a look?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to