diff options
Diffstat (limited to 'lotuswordpro/source/filter/lwpobjid.cxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpobjid.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lotuswordpro/source/filter/lwpobjid.cxx b/lotuswordpro/source/filter/lwpobjid.cxx index 5fef7fbeaf14..9a2ea6715db8 100644 --- a/lotuswordpro/source/filter/lwpobjid.cxx +++ b/lotuswordpro/source/filter/lwpobjid.cxx @@ -192,7 +192,7 @@ sal_uInt32 LwpObjectID::DiskSize() const /** * @descr get object from object factory per the object id */ -LwpObject* LwpObjectID::obj(VO_TYPE tag) const +rtl::Reference<LwpObject> LwpObjectID::obj(VO_TYPE tag) const { LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance(); LwpObjectFactory* pObjMgr = pGlobal->GetLwpObjFactory(); @@ -200,12 +200,12 @@ LwpObject* LwpObjectID::obj(VO_TYPE tag) const { return NULL; } - LwpObject* pObj = pObjMgr->QueryObject(*this); - if( tag!=VO_INVALID && (pObj) ) + rtl::Reference<LwpObject> pObj = pObjMgr->QueryObject(*this); + if( tag!=VO_INVALID && (pObj.is()) ) { if(static_cast<sal_uInt32>(tag) != pObj->GetTag()) { - pObj=NULL; + pObj.clear(); } } return(pObj); |