diff options
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index b8518a497f17..8f7dccdeb8ee 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2715,6 +2715,8 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId ) else { SwTableNode *pTableNd = pNd->FindTableNode(); + if (!pTableNd) + throw std::runtime_error("missing table"); if( pTableNd->GetTable().GetHTMLTableLayout() ) { // if there is already a HTMTableLayout, this table is already finished // and we have to look for the right table in the environment diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index bd4b8edb7878..1ddf9f741270 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -5533,7 +5533,14 @@ bool TestImportHTML(SvStream &rStream) SwPaM aPaM( aIdx ); aPaM.GetPoint()->nContent.Assign(aIdx.GetNode().GetContentNode(), 0); pD->SetInReading(true); - bool bRet = xReader->Read(*pD, OUString(), aPaM, OUString()) == ERRCODE_NONE; + bool bRet = false; + try + { + bRet = xReader->Read(*pD, OUString(), aPaM, OUString()) == ERRCODE_NONE; + } + catch (const std::runtime_error&) + { + } pD->SetInReading(false); return bRet; |