summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-15 15:36:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-03-15 15:37:40 +0000
commit5411d99c0a7345e9c68ad55debcb20eecdc0b36a (patch)
treeae910b7a3c260a033e7a1df9bb6767698704dfcb /vcl/source/gdi
parent2b1f0380bee7b5ec50ad90cf24be0b87a3e78c2e (diff)
rollback utl::TempFile change
Diffstat (limited to 'vcl/source/gdi')
-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 60d6493e2c71..abe94b0db289 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
- SvStream* pOStm = aTempFile.GetStream(StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE);
- if (pOStm)
+ std::unique_ptr<SvStream> xOStm(::utl::UcbStreamHelper::CreateStream( aURL, StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE ));
+ if( xOStm )
{
- pOStm->WriteBytes(mpSwapInData.get(), mnSwapInDataSize);
- bool bError = (ERRCODE_NONE != pOStm->GetError());
- aTempFile.CloseStream();
+ xOStm->WriteBytes( mpSwapInData.get(), mnSwapInDataSize );
+ bool bError = ( ERRCODE_NONE != xOStm->GetError() );
+ xOStm.reset();
if( !bError )
{