[Libreoffice-commits] core.git: sw/qa sw/source

Dinesh Patil dinesh.patil at synerzip.com
Thu May 22 06:47:22 PDT 2014


 sw/qa/extras/ooxmlexport/data/fdo79008.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx    |   10 ++++++++++
 sw/source/filter/ww8/wrtw8esh.cxx           |    2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit ed3fd76b65b2a281effea55b8a55101a8b740aec
Author: Dinesh Patil <dinesh.patil at synerzip.com>
Date:   Wed May 21 19:32:54 2014 +0530

    fdo#79008 Crash: File getting crash while saving in LO
    
    File is getting crashed while saving in LO, as it tries
    to access the value of vector after erasing that value.
    Code changed to access the vector value first and
    then erase that value from vector.
    
    Change-Id: I29369b7582fdbd7363d0e6fdae091a30c79a747d
    Reviewed-on: https://gerrit.libreoffice.org/9433
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/qa/extras/ooxmlexport/data/fdo79008.docx b/sw/qa/extras/ooxmlexport/data/fdo79008.docx
new file mode 100644
index 0000000..2b17587
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo79008.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index b4a002c..562541d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3124,6 +3124,16 @@ DECLARE_OOXMLEXPORT_TEST(testfdo76589 , "fdo76589.docx")
     assertXPath ( pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText","val","%1" );
 }
 
+DECLARE_OOXMLEXPORT_TEST(testfdo79008, "fdo79008.docx")
+{
+    /* File getting crash while saving in LO.
+     * Checking if document.xml file is getting created after fix
+     */
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+    if (!pXmlDoc)
+        return;
+}
+
 DECLARE_OOXMLEXPORT_TEST(testAuthorPropertySdt, "author-property.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 0e0b141..858a721 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1134,8 +1134,8 @@ void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart)
            std::find( aChrTxtAtrArr.begin(), aChrTxtAtrArr.end(), &rAttr );
         if ( it != aChrTxtAtrArr.end() )
         {
-            aChrTxtAtrArr.erase( it );
             aChrSetArr.erase( aChrSetArr.begin() + (it - aChrTxtAtrArr.begin()) );
+            aChrTxtAtrArr.erase( it );
         }
     }
 }


More information about the Libreoffice-commits mailing list