diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-03-25 20:47:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-03-26 16:18:42 +0000 |
commit | 5baf96e29f16fa26b31c0222ceb9f9c8dccd091a (patch) | |
tree | 6543f4261a947186ddeb6e57635aae30d64723eb /svx/source/unodraw/unopage.cxx | |
parent | b04d9bd0161790528f3fbd752b89cd1e1ed52770 (diff) |
Make this singleton demand loaded in order to control its lifecycle
i.e. as a global its getting dtored after the uno infrastructure has been
shutdown
Diffstat (limited to 'svx/source/unodraw/unopage.cxx')
-rwxr-xr-x | svx/source/unodraw/unopage.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index ab100043a552..2131881456d6 100755 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -821,7 +821,8 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3 } if( pRet == NULL ) { - pRet = new SvxOle2Shape( pObj, aSvxMapProvider.GetMap(SVXMAP_OLE2), aSvxMapProvider.GetPropertySet(SVXMAP_OLE2, SdrObject::GetGlobalDrawObjectItemPool()) ); + SvxUnoPropertyMapProvider& rSvxMapProvider = getSvxMapProvider(); + pRet = new SvxOle2Shape( pObj, rSvxMapProvider.GetMap(SVXMAP_OLE2), rSvxMapProvider.GetPropertySet(SVXMAP_OLE2, SdrObject::GetGlobalDrawObjectItemPool()) ); } } break; @@ -835,7 +836,10 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3 pRet = new SvxShapePolyPolygon( pObj , PolygonKind_PATHPLIN ); break; case OBJ_PAGE: - pRet = new SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_PAGE), aSvxMapProvider.GetPropertySet(SVXMAP_PAGE, SdrObject::GetGlobalDrawObjectItemPool()) ); + { + SvxUnoPropertyMapProvider& rSvxMapProvider = getSvxMapProvider(); + pRet = new SvxShape( pObj, rSvxMapProvider.GetMap(SVXMAP_PAGE), rSvxMapProvider.GetPropertySet(SVXMAP_PAGE, SdrObject::GetGlobalDrawObjectItemPool()) ); + } break; case OBJ_MEASURE: pRet = new SvxShapeDimensioning( pObj ); |