sw/qa/core/data/ooxml/pass/fdo79838.docx |binary
 sw/source/core/text/itrform2.cxx         |    7 +++++++
 2 files changed, 7 insertions(+)

New commits:
commit 0459e43ae63191ce9846bbcc7fe797fd949e3878
Author: Pallavi Jadhav <pallavi.jad...@synerzip.com>
Date:   Fri Jun 27 14:52:34 2014 +0530

    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 <nthieb...@gmail.com>
    Reviewed-by: Norbert Thiebaud <nthieb...@gmail.com>

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 0000000..eef1e59
Binary files /dev/null and b/sw/qa/core/data/ooxml/pass/fdo79838.docx differ
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 8bf8437..8e03566 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...
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to