summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPallavi Jadhav <pallavi.jadhav@synerzip.com>2014-06-27 14:52:34 +0530
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-07-02 21:51:20 +0000
commit0459e43ae63191ce9846bbcc7fe797fd949e3878 (patch)
tree20f381277b62c8b444d4346f2f3fffd112bb7e91
parentfcb08724793611ea5e84ff2b848a1907bbfec60a (diff)
fdo#79838 : DOCX : File crashes on open
Issue : DOCX containing nested form fields FORMCHECKBOX inside FORMTEXT crashes at open. Implementation : - Handled case for FORMTEXT. - Added issue file isnide sw/qa/core/data/ooxml/pass/ NOTE : This is a due to regression. Issue file opened successfully on LO-3.5 and LO-4.1. Code changes that caused regression is : https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=a52ee51269a47e52d68405caf8507e1abaa6fd8f Change-Id: I59dbe7bb2d58c1bcb0ddd144cf7891cbec5cdb24 Reviewed-on: https://gerrit.libreoffice.org/9932 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
-rw-r--r--sw/qa/core/data/ooxml/pass/fdo79838.docxbin0 -> 32166 bytes
-rw-r--r--sw/source/core/text/itrform2.cxx7
2 files changed, 7 insertions, 0 deletions
diff --git a/sw/qa/core/data/ooxml/pass/fdo79838.docx b/sw/qa/core/data/ooxml/pass/fdo79838.docx
new file mode 100644
index 000000000000..eef1e59978d6
--- /dev/null
+++ b/sw/qa/core/data/ooxml/pass/fdo79838.docx
Binary files differ
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 8bf8437304d8..8e03566b14ac 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -894,6 +894,13 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
{
pPor = new SwFieldFormDropDownPortion(sw::mark::ExpandFieldmark(pBM));
}
+ /* we need to check for ODF_FORMTEXT for scenario having FormFields inside FORMTEXT.
+ * Otherwise file will crash on open.
+ */
+ else if (pBM->GetFieldname( ) == ODF_FORMTEXT)
+ {
+ pPor = new SwFieldMarkPortion();
+ }
else
{
assert( false ); // unknown type...