diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-22 15:53:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-22 21:54:54 +0200 |
commit | 7f44b106cf8876fdd56d4afdb656f652bffceaee (patch) | |
tree | 7a95dbe169fac72fea1ed6d56aabe3445fabf141 /lotuswordpro | |
parent | f482d8dbf856a9167db52144f343824fbac19310 (diff) |
simpler to use a vector
Change-Id: I6acd4b042bc29dcf52d36061e897a9bae5c8cc8b
Reviewed-on: https://gerrit.libreoffice.org/62188
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwptblformula.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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)); |