diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-18 15:14:31 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-18 15:51:16 +0200 |
commit | f6b681a1360d953ec7a9f2f4f843c0d76d478c2a (patch) | |
tree | 0a79b7d29081cf342643e3492bd3fd42ee52f23c /sw/qa | |
parent | aa1d3d5eeaa795f6b913bbcd55bd31dc6802a4fe (diff) |
DOCX export: don't forget to close SDT elements inside the TextBoxes of shapes
A usual problem with SDT is that in case it should end after the last
paragrah of a container, there is no "next" paragraph that could have
the relevant "EndSdtBefore" property. This is usually handled by closing
the SDT tag before the container is closed.
The problem here was that DocxAttributeOutput::WriteSdtBlock() did not
notify DocxSdrExport about opening the SDT, as it thought there is no
draw export in progress. This is because in case of "shape with a
TextBox", the common writeDMLAndVMLDrawing() method is not called,
instead the separate writeDMLTextFrame() and writeVMLTextFrame() methods
are invoked.
Fix the problem by adjusting these methods to writeDMLAndVMLDrawing(),
so that they also set m_bDMLAndVMLDrawingOpen to true during the TextBox
export.
Change-Id: Ie08b0b955cd2d6a645970da3d485e447abfd6495
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/core/exportdata/ooxml/fail/.gitignore | 0 | ||||
-rw-r--r-- | sw/qa/core/exportdata/ooxml/indeterminate/.gitignore | 0 | ||||
-rw-r--r-- | sw/qa/core/exportdata/ooxml/pass/sdt-in-shape-with-textbox.docx | bin | 0 -> 17960 bytes | |||
-rw-r--r-- | sw/qa/core/filters-test.cxx | 9 |
4 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/core/exportdata/ooxml/fail/.gitignore b/sw/qa/core/exportdata/ooxml/fail/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sw/qa/core/exportdata/ooxml/fail/.gitignore diff --git a/sw/qa/core/exportdata/ooxml/indeterminate/.gitignore b/sw/qa/core/exportdata/ooxml/indeterminate/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sw/qa/core/exportdata/ooxml/indeterminate/.gitignore diff --git a/sw/qa/core/exportdata/ooxml/pass/sdt-in-shape-with-textbox.docx b/sw/qa/core/exportdata/ooxml/pass/sdt-in-shape-with-textbox.docx Binary files differnew file mode 100644 index 000000000000..be033f156643 --- /dev/null +++ b/sw/qa/core/exportdata/ooxml/pass/sdt-in-shape-with-textbox.docx diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx index 2a80f3efb242..8c128c35a84f 100644 --- a/sw/qa/core/filters-test.cxx +++ b/sw/qa/core/filters-test.cxx @@ -188,6 +188,15 @@ void SwFiltersTest::testCVEs() 0, 0, /*bExport=*/true); + + testDir("MS Word 2007 XML", + getURLFromSrc("/sw/qa/core/exportdata/ooxml/"), + OUString(), + SFX_FILTER_STARONEFILTER, + 0, + 0, + /*bExport=*/true); + } void SwFiltersTest::setUp() |