diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-20 20:56:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-21 21:14:48 +0100 |
commit | 430a56228ad50dde9399af30d638411380f93258 (patch) | |
tree | 165d50014c833b7a29fa65bead9398390e356031 /lotuswordpro/source/filter/lwpgrfobj.cxx | |
parent | use correct types (diff) | |
download | core-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.cxx | 11 |
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; } |