Kaydet (Commit) 2e92df04 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Scope reduction.

Change-Id: Ibc9314320c7b22f676978bb8b8157844a12c9bf8
üst af4aaa22
......@@ -115,8 +115,9 @@ OLEObjCache::~OLEObjCache()
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();
......@@ -124,8 +125,9 @@ void OLEObjCache::UnloadOnDemand()
while( nIndex && nCount2 > nSize )
{
SdrOle2Obj* pUnloadObj = maObjs[nIndex--];
if ( pUnloadObj )
{
if (!pUnloadObj)
continue;
try
{
// it is important to get object without reinitialization to avoid reentrance
......@@ -159,8 +161,6 @@ void OLEObjCache::UnloadOnDemand()
catch( uno::Exception& )
{}
}
}
}
}
void OLEObjCache::InsertObj(SdrOle2Obj* pObj)
......
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