no need to allocate these on the heap
Change-Id: Ie7b8a5ee280da5dfcb15d217a4daccaf485cfbe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -3712,10 +3712,10 @@ void HwpReader::makeFormula(TxtBox * hbox)
|
||||
}
|
||||
mybuf[l] = '\0';
|
||||
|
||||
std::unique_ptr<Formula> form( new Formula(mybuf) );
|
||||
form->setDocumentHandler(m_rxDocumentHandler);
|
||||
form->setAttributeListImpl(mxList.get());
|
||||
form->parse();
|
||||
Formula form( mybuf );
|
||||
form.setDocumentHandler(m_rxDocumentHandler);
|
||||
form.setAttributeListImpl(mxList.get());
|
||||
form.parse();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -93,10 +93,10 @@ static bool Decompress(SvStream* pCompressed, SvStream*& pOutDecompressed)
|
||||
pCompressed->ReadBytes(buffer, 16);
|
||||
aDecompressed->WriteBytes(buffer, 16);
|
||||
|
||||
std::unique_ptr<LwpSvStream> aLwpStream(new LwpSvStream(pCompressed));
|
||||
LwpSvStream aLwpStream(pCompressed);
|
||||
std::unique_ptr<OpenStormBento::LtcBenContainer> pBentoContainer;
|
||||
{
|
||||
sal_uLong ulRet = BenOpenContainer(aLwpStream.get(), &pBentoContainer);
|
||||
sal_uLong ulRet = BenOpenContainer(&aLwpStream, &pBentoContainer);
|
||||
if (ulRet != BenErr_OK)
|
||||
return false;
|
||||
}
|
||||
@@ -195,8 +195,8 @@ int ReadWordproFile(SvStream& rStream,
|
||||
|
||||
aLwpSvStream.reset(pRawLwpSvStream);
|
||||
|
||||
std::unique_ptr<IXFStream> pStrm(new XFSaxStream(xHandler));
|
||||
Lwp9Reader reader(aLwpSvStream.get(), pStrm.get());
|
||||
XFSaxStream aStrm(xHandler);
|
||||
Lwp9Reader reader(aLwpSvStream.get(), &aStrm);
|
||||
//Reset all static objects,because this function may be called many times.
|
||||
XFGlobalReset();
|
||||
const bool bOk = reader.Read();
|
||||
|
@@ -229,16 +229,16 @@ void LwpIndexManager::ReadObjIndex( LwpSvStream *pStrm )
|
||||
|
||||
LwpObjectHeader ObjHdr;
|
||||
ObjHdr.Read(*pStrm);
|
||||
std::unique_ptr<LwpObjectStream> pObjStrm( new LwpObjectStream(pStrm, ObjHdr.IsCompressed(),
|
||||
static_cast<sal_uInt16>(ObjHdr.GetSize()) ) );
|
||||
LwpObjectStream aObjStrm(pStrm, ObjHdr.IsCompressed(),
|
||||
static_cast<sal_uInt16>(ObjHdr.GetSize()) );
|
||||
|
||||
if( sal_uInt32(VO_OBJINDEX) == ObjHdr.GetTag() )
|
||||
{
|
||||
ReadObjIndexData( pObjStrm.get() );
|
||||
ReadObjIndexData( &aObjStrm );
|
||||
}
|
||||
else if( sal_uInt32(VO_LEAFOBJINDEX) == ObjHdr.GetTag() )
|
||||
{
|
||||
ReadLeafData( pObjStrm.get() );
|
||||
ReadLeafData( &aObjStrm );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,10 +249,10 @@ void LwpIndexManager::ReadLeafIndex( LwpSvStream *pStrm )
|
||||
{
|
||||
LwpObjectHeader ObjHdr;
|
||||
ObjHdr.Read(*pStrm);
|
||||
std::unique_ptr<LwpObjectStream> pObjStrm( new LwpObjectStream(pStrm, ObjHdr.IsCompressed(),
|
||||
static_cast<sal_uInt16>(ObjHdr.GetSize()) ) );
|
||||
LwpObjectStream aObjStrm( pStrm, ObjHdr.IsCompressed(),
|
||||
static_cast<sal_uInt16>(ObjHdr.GetSize()) );
|
||||
|
||||
ReadLeafData(pObjStrm.get());
|
||||
ReadLeafData(&aObjStrm);
|
||||
}
|
||||
/**
|
||||
* @descr Read data in VO_LEAFOBJINDEX
|
||||
|
@@ -136,9 +136,9 @@ void LwpPara::Read()
|
||||
{
|
||||
if (Notify)
|
||||
{
|
||||
std::unique_ptr<LwpForked3NotifyList> pNotifyList( new LwpForked3NotifyList );
|
||||
pNotifyList->GetExtraList().Read(m_pObjStrm.get());
|
||||
pNotifyList->Read(m_pObjStrm.get());
|
||||
LwpForked3NotifyList aNotifyList;
|
||||
aNotifyList.GetExtraList().Read(m_pObjStrm.get());
|
||||
aNotifyList.Read(m_pObjStrm.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user