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
2e92df04
Kaydet (Commit)
2e92df04
authored
Tem 09, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Scope reduction.
Change-Id: Ibc9314320c7b22f676978bb8b8157844a12c9bf8
üst
af4aaa22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
34 deletions
+34
-34
svdetc.cxx
svx/source/svdraw/svdetc.cxx
+34
-34
No files found.
svx/source/svdraw/svdetc.cxx
Dosyayı görüntüle @
2e92df04
...
@@ -115,51 +115,51 @@ OLEObjCache::~OLEObjCache()
...
@@ -115,51 +115,51 @@ OLEObjCache::~OLEObjCache()
void
OLEObjCache
::
UnloadOnDemand
()
void
OLEObjCache
::
UnloadOnDemand
()
{
{
if
(
nSize
<
maObjs
.
size
())
if
(
nSize
>=
maObjs
.
size
())
return
;
// more objects than configured cache size try to remove objects
// of course not the freshly inserted one at nIndex=0
size_t
nCount2
=
maObjs
.
size
();
size_t
nIndex
=
nCount2
-
1
;
while
(
nIndex
&&
nCount2
>
nSize
)
{
{
// more objects than configured cache size try to remove objects
SdrOle2Obj
*
pUnloadObj
=
maObjs
[
nIndex
--
];
// of course not the freshly inserted one at nIndex=0
if
(
!
pUnloadObj
)
size_t
nCount2
=
maObjs
.
size
()
;
continue
;
size_t
nIndex
=
nCount2
-
1
;
while
(
nIndex
&&
nCount2
>
nSize
)
try
{
{
SdrOle2Obj
*
pUnloadObj
=
maObjs
[
nIndex
--
];
// it is important to get object without reinitialization to avoid reentrance
if
(
pUnloadObj
)
uno
::
Reference
<
embed
::
XEmbeddedObject
>
xUnloadObj
=
pUnloadObj
->
GetObjRef_NoInit
();
{
try
{
// it is important to get object without reinitialization to avoid reentrance
uno
::
Reference
<
embed
::
XEmbeddedObject
>
xUnloadObj
=
pUnloadObj
->
GetObjRef_NoInit
();
bool
bUnload
=
SdrOle2Obj
::
CanUnloadRunningObj
(
xUnloadObj
,
pUnloadObj
->
GetAspect
()
);
bool
bUnload
=
SdrOle2Obj
::
CanUnloadRunningObj
(
xUnloadObj
,
pUnloadObj
->
GetAspect
()
);
// check whether the object can be unloaded before looking for the parent objects
// check whether the object can be unloaded before looking for the parent objects
if
(
xUnloadObj
.
is
()
&&
bUnload
)
if
(
xUnloadObj
.
is
()
&&
bUnload
)
{
uno
::
Reference
<
frame
::
XModel
>
xUnloadModel
(
xUnloadObj
->
getComponent
(),
uno
::
UNO_QUERY
);
if
(
xUnloadModel
.
is
()
)
{
for
(
size_t
nCheckInd
=
0
;
nCheckInd
<
maObjs
.
size
();
nCheckInd
++
)
{
{
uno
::
Reference
<
frame
::
XModel
>
xUnloadModel
(
xUnloadObj
->
getComponent
(),
uno
::
UNO_QUERY
)
;
SdrOle2Obj
*
pCacheObj
=
maObjs
[
nCheckInd
]
;
if
(
xUnloadModel
.
is
()
)
if
(
pCacheObj
&&
pCacheObj
!=
pUnloadObj
)
{
{
for
(
size_t
nCheckInd
=
0
;
nCheckInd
<
maObjs
.
size
();
nCheckInd
++
)
uno
::
Reference
<
frame
::
XModel
>
xParentModel
=
pCacheObj
->
GetParentXModel
();
{
if
(
xUnloadModel
==
xParentModel
)
SdrOle2Obj
*
pCacheObj
=
maObjs
[
nCheckInd
];
bUnload
=
false
;
// the object has running embedded objects
if
(
pCacheObj
&&
pCacheObj
!=
pUnloadObj
)
{
uno
::
Reference
<
frame
::
XModel
>
xParentModel
=
pCacheObj
->
GetParentXModel
();
if
(
xUnloadModel
==
xParentModel
)
bUnload
=
false
;
// the object has running embedded objects
}
}
}
}
}
}
if
(
bUnload
&&
UnloadObj
(
pUnloadObj
)
)
// object was successfully unloaded
nCount2
--
;
}
}
catch
(
uno
::
Exception
&
)
{}
}
}
if
(
bUnload
&&
UnloadObj
(
pUnloadObj
)
)
// object was successfully unloaded
nCount2
--
;
}
}
catch
(
uno
::
Exception
&
)
{}
}
}
}
}
...
...
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