Kaydet (Commit) 90f4e15a authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1038441 Uncaught exception

Change-Id: I4257734fbff8e54c9f69bc9ec7fbc63fb6c4fa17
üst e31ce570
...@@ -53,14 +53,22 @@ void ScDrawDefaultsObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) ...@@ -53,14 +53,22 @@ void ScDrawDefaultsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
SfxItemPool* ScDrawDefaultsObj::getModelPool( sal_Bool bReadOnly ) throw() SfxItemPool* ScDrawDefaultsObj::getModelPool( sal_Bool bReadOnly ) throw()
{ {
SfxItemPool* pRet = NULL; SfxItemPool* pRet = NULL;
if ( pDocShell )
try
{
if ( pDocShell )
{
ScDrawLayer* pModel = bReadOnly ?
pDocShell->GetDocument()->GetDrawLayer() :
pDocShell->MakeDrawLayer();
if ( pModel )
pRet = &pModel->GetItemPool();
}
}
catch (...)
{ {
ScDrawLayer* pModel = bReadOnly ?
pDocShell->GetDocument()->GetDrawLayer() :
pDocShell->MakeDrawLayer();
if ( pModel )
pRet = &pModel->GetItemPool();
} }
if ( !pRet ) if ( !pRet )
pRet = SvxUnoDrawPool::getModelPool( bReadOnly ); // uses default pool pRet = SvxUnoDrawPool::getModelPool( bReadOnly ); // uses default pool
......
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