sw/source/filter/docx/swdocxreader.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 484fe43b5e9f3696d26b8c0452aab6fd14e10772 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Mar 29 08:11:24 2018 +0200 Propagate BeginPutDoc failure out of SwDOCXReader::MakeEntries (BeginPutDoc can fail if the document is a read-only file) Change-Id: I2ee6f421e73459daf75adce67dedb47b23931d7c Reviewed-on: https://gerrit.libreoffice.org/52045 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sw/source/filter/docx/swdocxreader.cxx b/sw/source/filter/docx/swdocxreader.cxx index 604afd23bcfa..ca641d8844e6 100644 --- a/sw/source/filter/docx/swdocxreader.cxx +++ b/sw/source/filter/docx/swdocxreader.cxx @@ -161,6 +161,7 @@ bool SwDOCXReader::MakeEntries( SwDoc *pD, SwTextBlocks &rBlocks ) (RES_POOLCOLL_STANDARD, false); sal_uInt16 nGlosEntry = 0; SwContentNode* pCNd = nullptr; + bRet = true; do { // Get name - first paragraph OUString aLNm; @@ -237,12 +238,15 @@ bool SwDOCXReader::MakeEntries( SwDoc *pD, SwTextBlocks &rBlocks ) pD->getIDocumentContentOperations().CopyRange( aPam, aPos, /*bCopyAll=*/false, /*bCheckPos=*/true ); rBlocks.PutDoc(); } + else + { + bRet = false; + } } aStart = aStart.GetNode().EndOfSectionIndex() + 1; ++nGlosEntry; } while( aStart < aDocEnd && aStart.GetNode().IsStartNode() ); - bRet = true; } rBlocks.SetBaseURL( aOldURL ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits