Kaydet (Commit) 315e585f authored tarafından Noel Grandin's avatar Noel Grandin

inline GfxLink::SwapIn

only called from one site

Change-Id: I2f8cb927df2f4f389c5d1bee19845aed5535663b
Reviewed-on: https://gerrit.libreoffice.org/61437
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst bb2ff075
......@@ -67,8 +67,8 @@ private:
GfxLinkType meType;
sal_uInt32 mnUserId;
std::shared_ptr<sal_uInt8> mpSwapInData;
std::shared_ptr<SwapOutData> mpSwapOutData;
mutable std::shared_ptr<sal_uInt8> mpSwapInData;
mutable std::shared_ptr<SwapOutData> mpSwapOutData;
sal_uInt32 mnSwapInDataSize;
MapMode maPrefMapMode;
......@@ -108,7 +108,6 @@ public:
bool ExportNative( SvStream& rOStream ) const;
void SwapOut();
void SwapIn();
bool IsSwappedOut() const { return( bool(mpSwapOutData) ); }
bool IsEMF() const; // WMF & EMF stored under the same type (NativeWmf)
......
......@@ -79,8 +79,14 @@ bool GfxLink::IsNative() const
const sal_uInt8* GfxLink::GetData() const
{
if( IsSwappedOut() )
const_cast<GfxLink*>(this)->SwapIn();
{
auto pData = GetSwapInData();
if (pData)
{
mpSwapInData = pData;
mpSwapOutData.reset();
}
}
return mpSwapInData.get();
}
......@@ -167,19 +173,6 @@ void GfxLink::SwapOut()
}
}
void GfxLink::SwapIn()
{
if( IsSwappedOut() )
{
auto pData = GetSwapInData();
if (pData)
{
mpSwapInData = pData;
mpSwapOutData.reset();
}
}
}
bool GfxLink::ExportNative( SvStream& rOStream ) const
{
if( GetDataSize() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment