diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-10 12:51:04 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-10 14:13:57 -0400 |
commit | cef8eb1f7e906c5717c12967d63f164dced9e8a5 (patch) | |
tree | 20b15d71a4152f7ef55df7c278653b0e7d028a7f /svx | |
parent | d8780381020da9214ba7e71d7c6c3de78642c668 (diff) |
Use initializer properly and remove Init().
Change-Id: Ic343ff4ddd51a933ba97971d5a1197f5a25ef772
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 61 |
1 files changed, 26 insertions, 35 deletions
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 51c9a473be62..23f8616a3839 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -734,29 +734,35 @@ sdr::contact::ViewContact* SdrOle2Obj::CreateObjectSpecificViewContact() TYPEINIT1(SdrOle2Obj,SdrRectObj); -SdrOle2Obj::SdrOle2Obj(bool bFrame_) : m_bTypeAsked(false) -,m_bChart(false) -{ - bInDestruction = false; - mbSuppressSetVisAreaSize = false; - Init(); - bFrame=bFrame_; -} - - -SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const Rectangle& rNewRect, bool bFrame_) - : SdrRectObj(rNewRect) - , xObjRef( rNewObjRef ) - , m_bTypeAsked(false) - , m_bChart(false) -{ - bInDestruction = false; - mbSuppressSetVisAreaSize = false; - Init(); +SdrOle2Obj::SdrOle2Obj( bool bFrame_ ) : + mpImpl(new SdrOle2ObjImpl), + pGraphic(NULL), + bFrame(bFrame_), + bInDestruction(false), + mbSuppressSetVisAreaSize(false), + m_bTypeAsked(false), + m_bChart(false), + pModifyListener(NULL) +{ + xObjRef.Lock(true); +} + +SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const Rectangle& rNewRect, bool bFrame_ ) : + SdrRectObj(rNewRect), + mpImpl(new SdrOle2ObjImpl), + xObjRef(rNewObjRef), + pGraphic(NULL), + bFrame(bFrame_), + bInDestruction(false), + mbSuppressSetVisAreaSize(false), + m_bTypeAsked(false), + m_bChart(false), + pModifyListener(NULL) +{ + xObjRef.Lock(true); mpImpl->aPersistName = rNewObjName; - bFrame=bFrame_; if ( xObjRef.is() && (xObjRef->getStatus( GetAspect() ) & embed::EmbedMisc::EMBED_NEVERRESIZE ) ) SetResizeProtect(true); @@ -765,21 +771,6 @@ SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUStrin SetClosedObj(!ImplIsMathObj( xObjRef.GetObject() )); } - - -void SdrOle2Obj::Init() -{ - mpImpl = new SdrOle2ObjImpl; - pModifyListener = NULL; - pGraphic=NULL; - mpImpl->pGraphicObject=NULL; - mpImpl->pLightClient = 0; - - xObjRef.Lock( true ); -} - - - OUString SdrOle2Obj::GetStyleString() { OUString strStyle; |