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

Michael Stahl mstahl at redhat.com
Mon Jan 22 18:58:19 UTC 2018


 sw/source/filter/html/htmlctxt.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 0b1f8cb4a7eca3ab5b55c1866ef2761398d1ae95
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jan 22 19:54:03 2018 +0100

    sw: add an assert wrt. recent bug in SwHTMLParser::SplitAttrTab()
    
    Change-Id: I1fa64beb4724675c2e23bd5d4f0766f6d4cf7873

diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index f166177fcabb..2ba75527b43b 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -131,6 +131,9 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
         m_aParaAttrs.clear();
 
     const SwNodeIndex* pOldEndPara = &m_pPam->GetPoint()->nNode;
+#ifndef NDEBUG
+    auto const nOld(pOldEndPara->GetIndex());
+#endif
     sal_Int32 nOldEndCnt = m_pPam->GetPoint()->nContent.GetIndex();
 
     const SwNodeIndex& rNewSttPara = rNewPos.nNode;
@@ -215,6 +218,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
     if( bMoveBack )
         m_pPam->Move( fnMoveForward );
 
+    assert(m_pPam->GetPoint()->nNode.GetIndex() == nOld);
 }
 
 void SwHTMLParser::SaveDocContext( HTMLAttrContext *pCntxt,


More information about the Libreoffice-commits mailing list