diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-22 13:07:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-23 06:46:22 +0200 |
commit | a17b19726d723b16dacb49db7a8efd5fee9cb4cf (patch) | |
tree | 42a90e999e557031994b820b058c69cac514c36f /vcl | |
parent | b71e02dd5bfaaa490dc7f56eddf10c17681108b5 (diff) |
loplugin:unusedmethods
Change-Id: I3bde62d674f5beaa6d19dcd22e6be15dfefe4205
Reviewed-on: https://gerrit.libreoffice.org/76118
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/gfxlink.cxx | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index 3bb236ca4a34..f76a0dd9ee16 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -79,15 +79,6 @@ bool GfxLink::IsNative() const const sal_uInt8* GfxLink::GetData() const { - if( IsSwappedOut() ) - { - auto pData = GetSwapInData(); - if (pData) - { - mpSwapInData = pData; - mpSwapOutData.reset(); - } - } return mpSwapInData.get(); } @@ -224,45 +215,9 @@ SvStream& ReadGfxLink( SvStream& rIStream, GfxLink& rGfxLink) return rIStream; } -GfxLink::SwapOutData::SwapOutData(const OUString &aURL) : maURL(aURL) -{ -} - -GfxLink::SwapOutData::~SwapOutData() -{ - if( maURL.getLength() > 0 ) - osl_removeFile( maURL.pData ); -} - std::shared_ptr<sal_uInt8> GfxLink::GetSwapInData() const { - if( !IsSwappedOut() ) - return mpSwapInData; - - std::shared_ptr<sal_uInt8> pData; - - SvFileStream aFileStream(mpSwapOutData->maURL, StreamMode::STD_READ); - pData = o3tl::make_shared_array<sal_uInt8>(mnSwapInDataSize); - aFileStream.ReadBytes(pData.get(), mnSwapInDataSize); - bool bError = false; - auto const e = aFileStream.GetError(); - if (e != ERRCODE_NONE) { - SAL_WARN("vcl", "reading <" << mpSwapOutData->maURL << "> failed with " << e); - bError = true; - } - if (!bError) { - sal_uInt64 const nActReadSize = aFileStream.Tell(); - if (nActReadSize != mnSwapInDataSize) { - SAL_WARN( - "vcl", - "reading <" << mpSwapOutData->maURL << "> produced " << nActReadSize - << " instead of " << mnSwapInDataSize << " bytes"); - bError = true; - } - } - if (bError) - pData.reset(); - return pData; + return mpSwapInData; } bool GfxLink::IsEMF() const |