sw/source/filter/ww8/ww8par5.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 41518d1e4b81ee86d94084ded9ed6029957293ca
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Thu Oct 10 17:23:52 2019 +0200
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Oct 11 11:37:47 2019 +0200

    sw: WW8: fix crashtesting asserts on fdo45983-1.doc export to ODT
    
    The problem is that a redline is created that contains the
    CH_TXT_ATR_FIELDSTART but not the corresponding CH_TXT_ATR_FIELDEND:
    
    (rr) p aRegion
    $39 = SwPaM = {
      point = SwPosition (node 443, offset 185),
      mark = SwPosition (node 442, offset 0)
    }
    (rr) p aRegion.GetText()
    $40 = "\aDie Studierendenvertiefen ihre Fertigkeit bei einfachen 
Handverletzungen, einen Befund zu stellen, Therapieziele zu formulieren, einen 
ergotherapeutischen Behandlungsplan zu erstellen und durchzuführen"
    
    This is because commit d195a3e5f4ec5c616ae83f99d48f5d4eefe5f22e only
    adapted one place in SwWW8ImplReader::End_Field() where a fieldmark is
    inserted, but there's a second one ...
    
    Change-Id: Ib931c6b0d55f42e4f6bc170216f495f1f6e931e1
    Reviewed-on: https://gerrit.libreoffice.org/80622
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit 954c158acb87eb0385c51fdfff38fff84f154051)
    Reviewed-on: https://gerrit.libreoffice.org/80642
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 914ada2dc3be..ba45f50b8600 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -543,6 +543,9 @@ sal_uInt16 SwWW8ImplReader::End_Field()
                         aFieldPam, m_aFieldStack.back().GetBookmarkName(), 
ODF_FORMTEXT );
             OSL_ENSURE(pFieldmark!=nullptr, "hmmm; why was the bookmark not 
created?");
             if (pFieldmark!=nullptr) {
+                // adapt redline positions to inserted field mark start
+                // dummy char (assume not necessary for end dummy char)
+                m_xRedlineStack->MoveAttrs(*aFieldPam.Start());
                 const IFieldmark::parameter_map_t& rParametersToAdd = 
m_aFieldStack.back().getParameters();
                 pFieldmark->GetParameters()->insert(rParametersToAdd.begin(), 
rParametersToAdd.end());
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to