[Libreoffice-commits] core.git: lotuswordpro/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 22 19:55:18 UTC 2018
lotuswordpro/source/filter/lwptblformula.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 7f44b106cf8876fdd56d4afdb656f652bffceaee
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 22 15:53:11 2018 +0100
Commit: Caolán McNamara <caolanm at 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 <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at 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));
More information about the Libreoffice-commits
mailing list