summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/templdlg.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index aa9bac7cf633..72c5a18a1c73 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -716,14 +716,17 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
pCurObjShell = pViewFrame->GetObjectShell();
pModule = pCurObjShell ? pCurObjShell->GetModule() : NULL;
ResMgr* pMgr = pModule ? pModule->GetResMgr() : NULL;
- ResId aFamId( DLG_STYLE_DESIGNER, *pMgr );
- aFamId.SetRT(RSC_SFX_STYLE_FAMILIES);
- m_pStyleFamiliesId = new ResId( aFamId.GetId(), *pMgr );
- m_pStyleFamiliesId->SetRT(RSC_SFX_STYLE_FAMILIES);
- if( !pMgr || !pMgr->IsAvailable( aFamId ) )
+ if (pMgr)
+ {
+ ResId aFamId( DLG_STYLE_DESIGNER, *pMgr );
+ aFamId.SetRT(RSC_SFX_STYLE_FAMILIES);
+ 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;
- else
- pStyleFamilies = new SfxStyleFamilies( aFamId );
nActFilter = pCurObjShell ? static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pCurObjShell ) ) : SFXSTYLEBIT_ALL;
if ( pCurObjShell && SFXSTYLEBIT_ALL == nActFilter )