summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/gfxlink.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-16 08:54:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-03-16 08:54:43 +0000
commit6cba562d96a29a72d88f094f5258a1f9979df9b6 (patch)
tree2c0f8bda7c02658402c8901c2bcf3aa18b6d7e93 /vcl/source/gdi/gfxlink.cxx
parent78b195c484f8b10eb356a6f9079942e709fd8cda (diff)
reinstate utl::TempFile change
This reverts commit 5411d99c0a7345e9c68ad55debcb20eecdc0b36a.
Diffstat (limited to 'vcl/source/gdi/gfxlink.cxx')
-rw-r--r--vcl/source/gdi/gfxlink.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index abe94b0db289..60d6493e2c71 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -141,15 +141,15 @@ void GfxLink::SwapOut()
OUString aURL = aTempFile.GetURL();
- if( !aURL.isEmpty() )
+ if (!aURL.isEmpty())
{
std::shared_ptr<GfxLink::SwapOutData> pSwapOut = std::make_shared<SwapOutData>(aURL); // aURL is removed in the destructor
- std::unique_ptr<SvStream> xOStm(::utl::UcbStreamHelper::CreateStream( aURL, StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE ));
- if( xOStm )
+ SvStream* pOStm = aTempFile.GetStream(StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE);
+ if (pOStm)
{
- xOStm->WriteBytes( mpSwapInData.get(), mnSwapInDataSize );
- bool bError = ( ERRCODE_NONE != xOStm->GetError() );
- xOStm.reset();
+ pOStm->WriteBytes(mpSwapInData.get(), mnSwapInDataSize);
+ bool bError = (ERRCODE_NONE != pOStm->GetError());
+ aTempFile.CloseStream();
if( !bError )
{