Kaydet (Commit) 7f44b106 authored tarafından Caolán McNamara's avatar Caolán McNamara

simpler to use a vector

Change-Id: I6acd4b042bc29dcf52d36061e897a9bae5c8cc8b
Reviewed-on: https://gerrit.libreoffice.org/62188
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst f482d8db
......@@ -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));
......
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