Kaydet (Commit) 484fe43b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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/52045Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 04bfd8bf
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment