From e8169a821c40ee4b0c427f5c2e9b7fa6ab3b4536 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 20 Nov 2015 21:44:07 +0100 Subject: Revert "tdf#95614 fix freezing with linked images" This reverts commit 58e2a9efe554ff2ac09a902d13a18e954487b672. It breaks CppunitTest_sw_globalfilter. Change-Id: I0eb787d698276b86bf4d77a5300ea98cce0fdea5 --- sfx2/source/appl/fileobj.cxx | 25 ------------------------- sfx2/source/appl/fileobj.hxx | 5 ----- 2 files changed, 30 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 3b68b34e9ef4..e65276830c0a 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -46,8 +46,6 @@ #define FILETYPE_GRF 2 #define FILETYPE_OBJECT 3 -FnHashSet SvFileObject::m_aAsyncLoadsInProgress; - SvFileObject::SvFileObject() : nPostUserEventId(nullptr) , mxDelMed() @@ -81,26 +79,6 @@ bool SvFileObject::GetData( css::uno::Any & rData, const OUString & rMimeType, bool bGetSynchron ) { - - // avoid loading of the same graphics asynchronously in the same document - if ( !bAsyncLoadsInProgress ) - { - // asynchronous loading of the same graphic in progress? - if ( m_aAsyncLoadsInProgress.find(sFileNm + sReferer) != m_aAsyncLoadsInProgress.end() ) - { - // remove graphic id to sign overloading - m_aAsyncLoadsInProgress.erase(sFileNm + sReferer); - return true; - } - } - else - { - bAsyncLoadsInProgress = false; - // sign of overloading? - if ( m_aAsyncLoadsInProgress.find(sFileNm + sReferer) == m_aAsyncLoadsInProgress.end() ) - return true; - } - SotClipboardFormatId nFmt = SotExchange::RegisterFormatMimeType( rMimeType ); switch( nType ) { @@ -284,8 +262,6 @@ bool SvFileObject::LoadFile_Impl() if( !bSynchron ) { - m_aAsyncLoadsInProgress.insert(sFileNm + sReferer); - bAsyncLoadsInProgress = true; bLoadAgain = bDataReady = bInNewData = false; bWaitForData = true; @@ -519,7 +495,6 @@ IMPL_LINK_NOARG_TYPED( SvFileObject, DelMedium_Impl, void*, void ) { nPostUserEventId = nullptr; mxDelMed.Clear(); - m_aAsyncLoadsInProgress.erase(sFileNm + sReferer); } IMPL_LINK_TYPED( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx index b6f878c33178..a84126f06017 100644 --- a/sfx2/source/appl/fileobj.hxx +++ b/sfx2/source/appl/fileobj.hxx @@ -22,13 +22,10 @@ #include #include #include -#include class Graphic; namespace sfx2 { class FileDialogHelper; } -typedef std::unordered_set< OUString, OUStringHash, ::std::equal_to< OUString > > FnHashSet; - class SvFileObject : public sfx2::SvLinkSource { OUString sFileNm; @@ -39,7 +36,6 @@ class SvFileObject : public sfx2::SvLinkSource ImplSVEvent* nPostUserEventId; tools::SvRef mxDelMed; VclPtr pOldParent; - static FnHashSet m_aAsyncLoadsInProgress; sal_uInt8 nType; @@ -53,7 +49,6 @@ class SvFileObject : public sfx2::SvLinkSource bool bClearMedium : 1; bool bStateChangeCalled : 1; bool bInCallDownload : 1; - bool bAsyncLoadsInProgress : 1; bool GetGraphic_Impl( Graphic&, SvStream* pStream = nullptr ); bool LoadFile_Impl(); -- cgit