diff options
author | Pallavi Jadhav <pallavi.jadhav@synerzip.com> | 2014-05-22 13:31:48 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-05-23 01:33:13 -0500 |
commit | 70f49dc6927f3321e764174bd8050acaff63be32 (patch) | |
tree | 6edf90b17d076da3571fd55916237bb83bafe3c2 /sw/source/filter/ww8/docxsdrexport.hxx | |
parent | 40facc4ea878fb674214af697cc738cdf6573150 (diff) |
fdo#78882: DOCX: File gets corrupt after Roundtrip
Issue :
- Document contains a Section break(Next Page) with a drawing.
- Section break is manullay adjusted before the drawing.
Hence in original document.xml it wsectPr comes as
a part of w:pPr of paragraph.
- But in RT in document.xml, section break is written
by adding a dummy paragraph.
- This is because <w:drawing> also contains a paragraph
and hence when encounters section property LO creates
a dummy paragraph and writes it in between runs.
- This was causing the corruption.
Implementation :
- Added a member varaible m_bDMLAndVMLDrawingOpen.
- It is set to true when it writes drawing.
- It's value is checked in DocxAttributeOutput::EndParagraph()
If m_bDMLAndVMLDrawingOpen is true Do Not make
m_bParagraphOpened to false, as one more paragraph is still
open.
- This will postpone the writing od Section property and will
be written inside w:pPr and no dummy paragraph will get
created.
- Added Export Unit test case.
Change-Id: Ifa26fcaf8f02e62d020339670c8ba58ba92d9f40
Reviewed-on: https://gerrit.libreoffice.org/9430
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8/docxsdrexport.hxx')
-rw-r--r-- | sw/source/filter/ww8/docxsdrexport.hxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxsdrexport.hxx b/sw/source/filter/ww8/docxsdrexport.hxx index d88a204de7c4..8760a6b1cb4e 100644 --- a/sw/source/filter/ww8/docxsdrexport.hxx +++ b/sw/source/filter/ww8/docxsdrexport.hxx @@ -65,6 +65,7 @@ public: bool getFrameBtLr(); bool IsDrawingOpen(); + bool IsDMLAndVMLDrawingOpen(); bool IsParagraphHasDrawing(); void setParagraphHasDrawing(bool bParagraphHasDrawing); sax_fastparser::FastAttributeList*& getFlyFillAttrList(); |