Kaydet (Commit) e8169a82 authored tarafından Michael Stahl's avatar Michael Stahl

Revert "tdf#95614 fix freezing with linked images"

This reverts commit 58e2a9ef.

It breaks CppunitTest_sw_globalfilter.

Change-Id: I0eb787d698276b86bf4d77a5300ea98cce0fdea5
üst b3ce63e5
......@@ -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 )
......
......@@ -22,13 +22,10 @@
#include <sfx2/linksrc.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/linkmgr.hxx>
#include <unordered_set>
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<SfxMedium> mxDelMed;
VclPtr<vcl::Window> 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();
......
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