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

Caolán McNamara caolanm at redhat.com
Sat Jan 20 19:49:40 UTC 2018


 sw/qa/core/data/html/pass/ofz5353-1.html |    1 +
 sw/source/filter/html/htmlctxt.cxx       |   14 ++++++++++++++
 2 files changed, 15 insertions(+)

New commits:
commit fc38cb55cc6bc2af12ed4f12d2e7fb1494c3376b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 19 17:37:18 2018 +0000

    ofz#5253 restore some sort of valid state on missing Restore
    
    Change-Id: Ic12e1567f5a3370d1580d8c471ee38d3069568ce
    Reviewed-on: https://gerrit.libreoffice.org/48217
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/core/data/html/pass/ofz5353-1.html b/sw/qa/core/data/html/pass/ofz5353-1.html
new file mode 100644
index 000000000000..25cff17de584
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz5353-1.html
@@ -0,0 +1 @@
+  <table><td></tr> <big>  <td>ÿ<table> <td></td><S STYLE= float:left;width:3  ><a STYLE="float:left; width:3 "> 
\ No newline at end of file
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index 93e8c5f57f0c..95750dfae142 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -384,6 +384,20 @@ void SwHTMLParser::ClearContext( HTMLAttrContext *pContext )
     OSL_ENSURE( !pContext->HasSaveDocContext(),
             "Frame can no longer be exited" );
 
+    // like RestoreDocContext reset enough of this to not catastropically
+    // fail if we still have a SaveDocContext here
+    if (HTMLAttrContext_SaveDoc *pSave = pContext->GetSaveDocContext())
+    {
+        if (SIZE_MAX != pSave->GetContextStMin())
+        {
+            m_nContextStMin = pSave->GetContextStMin();
+            if (SIZE_MAX != pSave->GetContextStAttrMin())
+                m_nContextStAttrMin = pSave->GetContextStAttrMin();
+        }
+
+        pContext->ClearSaveDocContext();
+    }
+
     // Restart PRE/LISTING/XMP environments
     if( pContext->IsFinishPREListingXMP() )
         FinishPREListingXMP();


More information about the Libreoffice-commits mailing list