diff options
author | Sven Jacobi <sj@openoffice.org> | 2001-11-27 09:18:45 +0000 |
---|---|---|
committer | Sven Jacobi <sj@openoffice.org> | 2001-11-27 09:18:45 +0000 |
commit | 01d0a3ae9472539e2371c1935f172d998fe65d5e (patch) | |
tree | 261a1b54c1ea3a2ca888d9c563588c3a7781b695 /svx/source/svdraw/svdmodel.cxx | |
parent | 65564851382866c938f79847dd08a50c9c831c84 (diff) |
#95129# set FontHeight pool default without changing static SdrEngineDefault
Diffstat (limited to 'svx/source/svdraw/svdmodel.cxx')
-rw-r--r-- | svx/source/svdraw/svdmodel.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 11c05ee1061a..774c0438cac9 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdmodel.cxx,v $ * - * $Revision: 1.40 $ + * $Revision: 1.41 $ * - * last change: $Author: er $ $Date: 2001-11-23 19:25:50 $ + * last change: $Author: sj $ $Date: 2001-11-27 10:18:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -311,7 +311,6 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, SvPersist* pPers, pPersist=pPers; pDrawOutliner=NULL; pHitTestOutliner=NULL; - nDefTextHgt=SdrEngineDefaults::GetFontHeight(); pRefOutDev=NULL; nProgressAkt=0; nProgressMax=0; @@ -375,7 +374,8 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, SvPersist* pPers, #endif bExtColorTable=bUseExtColorTable; - if (pPool==NULL) { + if ( pPool == NULL ) + { pItemPool=new SdrItemPool(SDRATTR_START, SDRATTR_END, bLoadRefCounts); // Der Outliner hat keinen eigenen Pool, deshalb den der EditEngine SfxItemPool* pOutlPool=EditEngine::CreatePool( bLoadRefCounts ); @@ -385,8 +385,15 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, SvPersist* pPers, bMyPool=TRUE; } pItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit); - SetTextDefaults(); +// SJ: #95129# using static SdrEngineDefaults only if default SvxFontHeight item is not available + const SfxPoolItem* pPoolItem = pItemPool->GetPoolDefaultItem( ITEMID_FONTHEIGHT ); + if ( pPoolItem ) + nDefTextHgt = ((SvxFontHeightItem*)pPoolItem)->GetHeight(); + else + nDefTextHgt = SdrEngineDefaults::GetFontHeight(); + + SetTextDefaults(); pLayerAdmin=new SdrLayerAdmin; pLayerAdmin->SetModel(this); ImpSetUIUnit(); |