lotuswordpro/source/filter/lwptblformula.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 7f44b106cf8876fdd56d4afdb656f652bffceaee Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Oct 22 15:53:11 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Oct 22 21:54:54 2018 +0200 simpler to use a vector Change-Id: I6acd4b042bc29dcf52d36061e897a9bae5c8cc8b Reviewed-on: https://gerrit.libreoffice.org/62188 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx index f539d16cf47d..4a1e6ecd8978 100644 --- a/lotuswordpro/source/filter/lwptblformula.cxx +++ b/lotuswordpro/source/filter/lwptblformula.cxx @@ -99,12 +99,12 @@ void LwpFormulaInfo::ReadText() m_pObjStrm->QuickReadInt16(); //Disk Size sal_uInt16 nStrLen = m_pObjStrm->QuickReadInt16(); - std::unique_ptr<char[]> pBuf(new char[nStrLen+1]); - m_pObjStrm->QuickRead( pBuf.get(), nStrLen ); - *(pBuf.get()+nStrLen)='\0'; + std::vector<char> aBuf(nStrLen + 1); + m_pObjStrm->QuickRead(aBuf.data(), nStrLen); + aBuf[nStrLen]= '\0'; OUString aText; aText += "\""; - aText += OUString(pBuf.get(), nStrLen, osl_getThreadTextEncoding()); + aText += OUString(aBuf.data(), nStrLen, osl_getThreadTextEncoding()); aText += "\""; m_aStack.push_back(o3tl::make_unique<LwpFormulaText>(aText)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits