summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-02 13:24:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-02 18:23:30 +0200
commit3d9bf9eea5803184da8e5e11477b6eb2f55aff3f (patch)
treec662b361ba04e597e8dd3649370e01ffd1ffbceb /lotuswordpro
parent3a9436ef7786a6b96bf73328795029a047abe827 (diff)
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>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpfilter.cxx8
-rw-r--r--lotuswordpro/source/filter/lwpidxmgr.cxx14
-rw-r--r--lotuswordpro/source/filter/lwppara.cxx6
3 files changed, 14 insertions, 14 deletions
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx
index ebffb74c0f4e..e8ba358ae8c7 100644
--- a/lotuswordpro/source/filter/lwpfilter.cxx
+++ b/lotuswordpro/source/filter/lwpfilter.cxx
@@ -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();
diff --git a/lotuswordpro/source/filter/lwpidxmgr.cxx b/lotuswordpro/source/filter/lwpidxmgr.cxx
index 26042fc96840..f999ec79a23b 100644
--- a/lotuswordpro/source/filter/lwpidxmgr.cxx
+++ b/lotuswordpro/source/filter/lwpidxmgr.cxx
@@ -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
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 4d6829cccf8a..a98e4df84707 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -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());
}
}
}