summaryrefslogtreecommitdiffstats
path: root/lotuswordpro/source/filter/lwpgrfobj.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-20 20:56:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-21 21:14:48 +0100
commit430a56228ad50dde9399af30d638411380f93258 (patch)
tree165d50014c833b7a29fa65bead9398390e356031 /lotuswordpro/source/filter/lwpgrfobj.cxx
parentuse correct types (diff)
downloadcore-430a56228ad50dde9399af30d638411380f93258.tar.gz
core-430a56228ad50dde9399af30d638411380f93258.zip
just return SvMemoryStream*
Change-Id: I5c577984055e01f49c4e04685dc4df6672c8fc87 Reviewed-on: https://gerrit.libreoffice.org/48255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro/source/filter/lwpgrfobj.cxx')
-rw-r--r--lotuswordpro/source/filter/lwpgrfobj.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 5bcc918187d2..5731b34acdff 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -305,15 +305,13 @@ void LwpGraphicObject::CreateDrawObjects()
if (ulRet != OpenStormBento::BenErr_OK)
return;
- SvStream* pDrawObjStream = nullptr;
-
// get graphic object's bento object name
LwpObjectID& rMyID = GetObjectID();
std::string aGrfObjName;
GetBentoNamebyID(rMyID, aGrfObjName);
// get bento stream by the name
- pBentoContainer->CreateGraphicStream(pDrawObjStream, aGrfObjName.c_str());
+ SvStream* pDrawObjStream = pBentoContainer->CreateGraphicStream(aGrfObjName.c_str());
if (pDrawObjStream)
{
LwpSdwFileLoader fileLoader(pDrawObjStream, this);
@@ -357,17 +355,13 @@ sal_uInt32 LwpGraphicObject::GetRawGrafData(sal_uInt8*& pGrafData)
return 0;
}
- SvStream* pGrafStream = nullptr;
-
// get graphic object's bento object name
LwpObjectID& rMyID = GetObjectID();
std::string aGrfObjName;
GetBentoNamebyID(rMyID, aGrfObjName);
// get bento stream by the name
- pBentoContainer->CreateGraphicStream(pGrafStream, aGrfObjName.c_str());
- SvMemoryStream* pMemGrafStream = static_cast<SvMemoryStream*>(pGrafStream);
-
+ SvMemoryStream* pMemGrafStream = pBentoContainer->CreateGraphicStream(aGrfObjName.c_str());
if (pMemGrafStream)
{
// read image data
@@ -376,7 +370,6 @@ sal_uInt32 LwpGraphicObject::GetRawGrafData(sal_uInt8*& pGrafData)
pMemGrafStream->ReadBytes(pGrafData, nDataLen);
delete pMemGrafStream;
- pMemGrafStream = nullptr;
return nDataLen;
}