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

tidy up this deref before check code

Change-Id: Icd9ff99616c452bd16ffc3dc8ab0981d75a386a2
üst 2fc4952b
...@@ -716,14 +716,17 @@ void SfxCommonTemplateDialog_Impl::ReadResource() ...@@ -716,14 +716,17 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
pCurObjShell = pViewFrame->GetObjectShell(); pCurObjShell = pViewFrame->GetObjectShell();
pModule = pCurObjShell ? pCurObjShell->GetModule() : NULL; pModule = pCurObjShell ? pCurObjShell->GetModule() : NULL;
ResMgr* pMgr = pModule ? pModule->GetResMgr() : NULL; ResMgr* pMgr = pModule ? pModule->GetResMgr() : NULL;
ResId aFamId( DLG_STYLE_DESIGNER, *pMgr ); if (pMgr)
aFamId.SetRT(RSC_SFX_STYLE_FAMILIES); {
m_pStyleFamiliesId = new ResId( aFamId.GetId(), *pMgr ); ResId aFamId( DLG_STYLE_DESIGNER, *pMgr );
m_pStyleFamiliesId->SetRT(RSC_SFX_STYLE_FAMILIES); aFamId.SetRT(RSC_SFX_STYLE_FAMILIES);
if( !pMgr || !pMgr->IsAvailable( aFamId ) ) m_pStyleFamiliesId = new ResId( aFamId.GetId(), *pMgr );
m_pStyleFamiliesId->SetRT(RSC_SFX_STYLE_FAMILIES);
if (pMgr->IsAvailable(aFamId))
pStyleFamilies = new SfxStyleFamilies( aFamId );
}
if (!pStyleFamilies)
pStyleFamilies = new SfxStyleFamilies; pStyleFamilies = new SfxStyleFamilies;
else
pStyleFamilies = new SfxStyleFamilies( aFamId );
nActFilter = pCurObjShell ? static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pCurObjShell ) ) : SFXSTYLEBIT_ALL; nActFilter = pCurObjShell ? static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pCurObjShell ) ) : SFXSTYLEBIT_ALL;
if ( pCurObjShell && SFXSTYLEBIT_ALL == nActFilter ) if ( pCurObjShell && SFXSTYLEBIT_ALL == nActFilter )
......
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