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
e824a49a
Kaydet (Commit)
e824a49a
authored
Agu 24, 2017
tarafından
Jan-Marek Glogowski
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't run the OLEObjCache timer for an empty cache
Change-Id: I210f6bdec14491bea6d15bca133011059091f21b
üst
9ac2aad4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
svdetc.hxx
include/svx/svdetc.hxx
+0
-1
timer.hxx
include/vcl/timer.hxx
+7
-1
svdetc.cxx
svx/source/svdraw/svdetc.cxx
+9
-14
No files found.
include/svx/svdetc.hxx
Dosyayı görüntüle @
e824a49a
...
...
@@ -179,7 +179,6 @@ class OLEObjCache
size_t
nSize
;
AutoTimer
*
pTimer
;
void
UnloadOnDemand
();
static
bool
UnloadObj
(
SdrOle2Obj
*
pObj
);
DECL_LINK
(
UnloadCheckHdl
,
Timer
*
,
void
);
...
...
include/vcl/timer.hxx
Dosyayı görüntüle @
e824a49a
...
...
@@ -59,11 +59,17 @@ public:
void
SetTimeout
(
sal_uInt64
nTimeoutMs
);
sal_uInt64
GetTimeout
()
const
{
return
mnTimeout
;
}
/**
* Activates the timer task
*
* If the timer is already active, it's reset!
* Check with Task::IsActive() to prevent reset.
*/
virtual
void
Start
()
override
;
};
/// An auto-timer is a multi-shot timer re-emitting itself at
/// interval until destroyed.
/// interval until destroyed
or stopped
.
class
VCL_DLLPUBLIC
AutoTimer
:
public
Timer
{
public
:
...
...
svx/source/svdraw/svdetc.cxx
Dosyayı görüntüle @
e824a49a
...
...
@@ -112,8 +112,6 @@ OLEObjCache::OLEObjCache()
pTimer
=
new
AutoTimer
(
"svx OLEObjCache pTimer UnloadCheck"
);
pTimer
->
SetInvokeHandler
(
LINK
(
this
,
OLEObjCache
,
UnloadCheckHdl
)
);
pTimer
->
SetTimeout
(
20000
);
pTimer
->
Invoke
();
pTimer
->
Start
();
}
OLEObjCache
::~
OLEObjCache
()
...
...
@@ -122,7 +120,7 @@ OLEObjCache::~OLEObjCache()
delete
pTimer
;
}
void
OLEObjCache
::
UnloadOnDemand
(
)
IMPL_LINK_NOARG
(
OLEObjCache
,
UnloadCheckHdl
,
Timer
*
,
void
)
{
if
(
nSize
>=
maObjs
.
size
())
return
;
...
...
@@ -190,11 +188,12 @@ void OLEObjCache::InsertObj(SdrOle2Obj* pObj)
// insert object into first position
maObjs
.
insert
(
maObjs
.
begin
(),
pObj
);
if
(
!
bFound
)
{
// a new object was inserted, recalculate the cache
UnloadOnDemand
();
}
// if a new object was inserted, recalculate the cache
if
(
!
bFound
)
pTimer
->
Invoke
();
if
(
!
bFound
||
!
pTimer
->
IsActive
())
pTimer
->
Start
();
}
void
OLEObjCache
::
RemoveObj
(
SdrOle2Obj
*
pObj
)
...
...
@@ -202,6 +201,8 @@ void OLEObjCache::RemoveObj(SdrOle2Obj* pObj)
std
::
vector
<
SdrOle2Obj
*>::
iterator
it
=
std
::
find
(
maObjs
.
begin
(),
maObjs
.
end
(),
pObj
);
if
(
it
!=
maObjs
.
end
())
maObjs
.
erase
(
it
);
if
(
maObjs
.
empty
())
pTimer
->
Stop
();
}
size_t
OLEObjCache
::
size
()
const
...
...
@@ -243,12 +244,6 @@ bool OLEObjCache::UnloadObj(SdrOle2Obj* pObj)
return
bUnloaded
;
}
IMPL_LINK_NOARG
(
OLEObjCache
,
UnloadCheckHdl
,
Timer
*
,
void
)
{
UnloadOnDemand
();
}
bool
GetDraftFillColor
(
const
SfxItemSet
&
rSet
,
Color
&
rCol
)
{
drawing
::
FillStyle
eFill
=
static_cast
<
const
XFillStyleItem
&>
(
rSet
.
Get
(
XATTR_FILLSTYLE
)).
GetValue
();
...
...
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