summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-09-26 15:35:09 +0200
committerMichael Stahl <mstahl@redhat.com>2014-09-26 16:38:34 +0200
commitea2d767d4475ac3399fdfa59a4d0e2fbc38d1aa9 (patch)
treea0c57c0208e00a56bc498bdda7f7ae5db35ec746 /sw
parent325ce86b56131f1e874e8cb2c5948fed719afe07 (diff)
tools: change INetURLObject::getData to return std::unique_ptr
Life-cycle becomes a lot more obvious this way. Change-Id: I1ca99607f609a2223011c40447ad1cd9ca5ccaa5
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/htmlgrin.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 0d834fe85fea..83db8243380b 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -698,12 +698,11 @@ IMAGE_SETEVENT:
INetURLObject aGraphicURL( sGrfNm );
if( aGraphicURL.GetProtocol() == INET_PROT_DATA )
{
- SvMemoryStream* pStream = aGraphicURL.getData();
+ std::unique_ptr<SvMemoryStream> const pStream(aGraphicURL.getData());
if (pStream)
{
if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, "", *pStream))
sGrfNm = "";
- delete pStream;
}
}
// sBaseURL is empty if the source is clipboard