Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
58e2a9ef
Kaydet (Commit)
58e2a9ef
authored
Kas 20, 2015
tarafından
László Németh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tdf#95614 fix freezing with linked images
Change-Id: Id9c718fda8f15d804e07ad87ff4ca930c2ea70cf
üst
8f7025b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
fileobj.cxx
sfx2/source/appl/fileobj.cxx
+25
-0
fileobj.hxx
sfx2/source/appl/fileobj.hxx
+5
-0
No files found.
sfx2/source/appl/fileobj.cxx
Dosyayı görüntüle @
58e2a9ef
...
@@ -46,6 +46,8 @@
...
@@ -46,6 +46,8 @@
#define FILETYPE_GRF 2
#define FILETYPE_GRF 2
#define FILETYPE_OBJECT 3
#define FILETYPE_OBJECT 3
FnHashSet
SvFileObject
::
m_aAsyncLoadsInProgress
;
SvFileObject
::
SvFileObject
()
SvFileObject
::
SvFileObject
()
:
nPostUserEventId
(
nullptr
)
:
nPostUserEventId
(
nullptr
)
,
mxDelMed
()
,
mxDelMed
()
...
@@ -79,6 +81,26 @@ bool SvFileObject::GetData( css::uno::Any & rData,
...
@@ -79,6 +81,26 @@ bool SvFileObject::GetData( css::uno::Any & rData,
const
OUString
&
rMimeType
,
const
OUString
&
rMimeType
,
bool
bGetSynchron
)
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
);
SotClipboardFormatId
nFmt
=
SotExchange
::
RegisterFormatMimeType
(
rMimeType
);
switch
(
nType
)
switch
(
nType
)
{
{
...
@@ -262,6 +284,8 @@ bool SvFileObject::LoadFile_Impl()
...
@@ -262,6 +284,8 @@ bool SvFileObject::LoadFile_Impl()
if
(
!
bSynchron
)
if
(
!
bSynchron
)
{
{
m_aAsyncLoadsInProgress
.
insert
(
sFileNm
+
sReferer
);
bAsyncLoadsInProgress
=
true
;
bLoadAgain
=
bDataReady
=
bInNewData
=
false
;
bLoadAgain
=
bDataReady
=
bInNewData
=
false
;
bWaitForData
=
true
;
bWaitForData
=
true
;
...
@@ -495,6 +519,7 @@ IMPL_LINK_NOARG_TYPED( SvFileObject, DelMedium_Impl, void*, void )
...
@@ -495,6 +519,7 @@ IMPL_LINK_NOARG_TYPED( SvFileObject, DelMedium_Impl, void*, void )
{
{
nPostUserEventId
=
nullptr
;
nPostUserEventId
=
nullptr
;
mxDelMed
.
Clear
();
mxDelMed
.
Clear
();
m_aAsyncLoadsInProgress
.
erase
(
sFileNm
+
sReferer
);
}
}
IMPL_LINK_TYPED
(
SvFileObject
,
DialogClosedHdl
,
sfx2
::
FileDialogHelper
*
,
_pFileDlg
,
void
)
IMPL_LINK_TYPED
(
SvFileObject
,
DialogClosedHdl
,
sfx2
::
FileDialogHelper
*
,
_pFileDlg
,
void
)
...
...
sfx2/source/appl/fileobj.hxx
Dosyayı görüntüle @
58e2a9ef
...
@@ -22,10 +22,13 @@
...
@@ -22,10 +22,13 @@
#include <sfx2/linksrc.hxx>
#include <sfx2/linksrc.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/linkmgr.hxx>
#include <unordered_set>
class
Graphic
;
class
Graphic
;
namespace
sfx2
{
class
FileDialogHelper
;
}
namespace
sfx2
{
class
FileDialogHelper
;
}
typedef
std
::
unordered_set
<
OUString
,
OUStringHash
,
::
std
::
equal_to
<
OUString
>
>
FnHashSet
;
class
SvFileObject
:
public
sfx2
::
SvLinkSource
class
SvFileObject
:
public
sfx2
::
SvLinkSource
{
{
OUString
sFileNm
;
OUString
sFileNm
;
...
@@ -36,6 +39,7 @@ class SvFileObject : public sfx2::SvLinkSource
...
@@ -36,6 +39,7 @@ class SvFileObject : public sfx2::SvLinkSource
ImplSVEvent
*
nPostUserEventId
;
ImplSVEvent
*
nPostUserEventId
;
tools
::
SvRef
<
SfxMedium
>
mxDelMed
;
tools
::
SvRef
<
SfxMedium
>
mxDelMed
;
VclPtr
<
vcl
::
Window
>
pOldParent
;
VclPtr
<
vcl
::
Window
>
pOldParent
;
static
FnHashSet
m_aAsyncLoadsInProgress
;
sal_uInt8
nType
;
sal_uInt8
nType
;
...
@@ -49,6 +53,7 @@ class SvFileObject : public sfx2::SvLinkSource
...
@@ -49,6 +53,7 @@ class SvFileObject : public sfx2::SvLinkSource
bool
bClearMedium
:
1
;
bool
bClearMedium
:
1
;
bool
bStateChangeCalled
:
1
;
bool
bStateChangeCalled
:
1
;
bool
bInCallDownload
:
1
;
bool
bInCallDownload
:
1
;
bool
bAsyncLoadsInProgress
:
1
;
bool
GetGraphic_Impl
(
Graphic
&
,
SvStream
*
pStream
=
nullptr
);
bool
GetGraphic_Impl
(
Graphic
&
,
SvStream
*
pStream
=
nullptr
);
bool
LoadFile_Impl
();
bool
LoadFile_Impl
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment