summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-07-25 09:13:03 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-07-25 09:51:22 +0200
commit9700c1b2170ad04453a361ed5647937833ac3c18 (patch)
treeb193db3dd41a6da1e940d8b4067802a1185716ba /oox
parentf17aec9f573f87e4a8fa5ccdf504897d745bb0a6 (diff)
sw content controls, plain text: add DOCX import
- the core of this is the writerfilter/ change to call PopSdt() for SdtControlType::plainText, which maps inline plain text SDTs to Writer content controls, not to input fields - disable the grab-bag in this case, otherwise we would run duplicated <w:sdt> elements on export - fix CppunitTest_sw_ooxmlexport7's testSdtAndShapeOverlapping by postponing the SDT start in DocxAttributeOutput::WriteContentControlStart() in case a shape is anchored at the same position as the SDT start: if the shape should start inside the content control, then it should be anchored after the dummy character - reduce the debug output in VMLExport::Commit(), which could write control characters to the terminal on test failure, potentially breaking it (requiring a 'reset' to recover) - fix CppunitTest_sw_ooxmlexport5's testSdt2Run: now we merge two runs inside a plain text content control into a single one, and there is no problem with that, so adapt the test instead - fix CppunitTest_sw_ooxmlexport17's testTdf148361: plain text inline SDT is now a content control, not a field - fix CppunitTest_sw_ooxmlfieldexport's testfdo82492: explicitly assert that there is 1 text run inside the SDT and there is a shape after it (outside). Also extend DocxAttributeOutput::EndContentControl(), so it ends the content control at the correct, earlier position in case it's followed by an as-char shape - fix CppunitTest_sw_ooxmlfieldexport's testfdo82123: again assert that the SDT has 1 run with text, and there is a drawing after the SDT - fix CppunitTest_sw_ooxmlfieldexport's testTdf104823: this revealed that some more complex logic is needed to support data bindings, so exclude text-with-databinding from the scope of this commit and continue to map those to input fields for now - fix CppunitTest_sw_ooxmlfieldexport's testFdo81945: this had a similar problem as as-char shapes, but this time a new SDT is starting right after a previous SDT. Adapt DocxAttributeOutput::EndContentControl() accordingly, though perhaps this should be generalized later, so we always close SDTs in the previous run, unless this is the last run, or something similar Change-Id: Ifaf581be884a683de6c8b932008a03ba43734b75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137399 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/vmlexport.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 47a196908a4d..1bfc59ee13db 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1008,12 +1008,9 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
default:
#if OSL_DEBUG_LEVEL > 0
const size_t opt_nProp_size(opt.nProp.size());
- const sal_uInt8 opt_nProp_empty(0);
SAL_WARN( "oox.vml", "TODO VMLExport::Commit(), unimplemented id: " << nId
<< ", value: " << opt.nPropValue
- << ", data: [" << opt_nProp_size << ", "
- << (0 == opt_nProp_size ? &opt_nProp_empty : opt.nProp.data())
- << "]");
+ << ", data: [" << opt_nProp_size << "]");
if ( opt.nProp.size() )
{
const sal_uInt8 *pIt = opt.nProp.data();