Kaydet (Commit) 4a33504d authored tarafından Michael Meeks's avatar Michael Meeks

formula & canvas: convert new to ::Create to get initial ref-counting right.

Change-Id: I96e2e59c2f880632cf719f3346e345a5d03cc858
üst d24f93dc
...@@ -666,7 +666,8 @@ namespace dxcanvas ...@@ -666,7 +666,8 @@ namespace dxcanvas
maVertexCache.reserve(1024); maVertexCache.reserve(1024);
mpWindow.reset( mpWindow.reset(
new SystemChildWindow( VclPtr<SystemChildWindow>::Create(
const_cast<vcl::Window *>(&rWindow), 0) ); const_cast<vcl::Window *>(&rWindow), 0) );
// system child window must not receive mouse events // system child window must not receive mouse events
......
...@@ -25,7 +25,7 @@ namespace vclcanvas ...@@ -25,7 +25,7 @@ namespace vclcanvas
{ {
BackBuffer::BackBuffer( const OutputDevice& rRefDevice, BackBuffer::BackBuffer( const OutputDevice& rRefDevice,
bool bMonochromeBuffer ) : bool bMonochromeBuffer ) :
maVDev( new VirtualDevice( rRefDevice, maVDev( VclPtr<VirtualDevice>::Create( rRefDevice,
sal_uInt16(bMonochromeBuffer) ) ) sal_uInt16(bMonochromeBuffer) ) )
{ {
if( !bMonochromeBuffer ) if( !bMonochromeBuffer )
......
...@@ -112,8 +112,8 @@ namespace vclcanvas ...@@ -112,8 +112,8 @@ namespace vclcanvas
// VDev not yet created, do it now. Create an alpha-VDev, // VDev not yet created, do it now. Create an alpha-VDev,
// if bitmap has transparency. // if bitmap has transparency.
mpVDev = maBitmap->IsTransparent() ? mpVDev = maBitmap->IsTransparent() ?
new VirtualDevice( mrRefDevice, 0, 0 ) : VclPtr<VirtualDevice>::Create( mrRefDevice, 0, 0 ) :
new VirtualDevice( mrRefDevice ); VclPtr<VirtualDevice>::Create( mrRefDevice );
OSL_ENSURE( mpVDev, OSL_ENSURE( mpVDev,
"BitmapBackBuffer::createVDev(): Unable to create VirtualDevice" ); "BitmapBackBuffer::createVDev(): Unable to create VirtualDevice" );
......
...@@ -286,7 +286,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent ...@@ -286,7 +286,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
pParent->get(m_pRefBtn, "RB_REF"); pParent->get(m_pRefBtn, "RB_REF");
m_pRefBtn->SetReferences(_pDlg, m_pEdRef); m_pRefBtn->SetReferences(_pDlg, m_pEdRef);
pParaWin = new ParaWin(m_pParaWinBox, _pDlg); pParaWin = VclPtr<ParaWin>::Create(m_pParaWinBox, _pDlg);
pParaWin->Show(); pParaWin->Show();
m_pParaWinBox->Hide(); m_pParaWinBox->Hide();
m_pFtEditName->Hide(); m_pFtEditName->Hide();
...@@ -306,8 +306,8 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent ...@@ -306,8 +306,8 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
pParaWin->SetArgModifiedHdl(LINK( this, FormulaDlg_Impl, ModifyHdl ) ); pParaWin->SetArgModifiedHdl(LINK( this, FormulaDlg_Impl, ModifyHdl ) );
pParaWin->SetFxHdl(LINK( this, FormulaDlg_Impl, FxHdl ) ); pParaWin->SetFxHdl(LINK( this, FormulaDlg_Impl, FxHdl ) );
pFuncPage= new FuncPage( m_pTabCtrl,_pFunctionMgr); pFuncPage= VclPtr<FuncPage>::Create( m_pTabCtrl,_pFunctionMgr);
pStructPage= new StructPage( m_pTabCtrl); pStructPage= VclPtr<StructPage>::Create( m_pTabCtrl);
pFuncPage->Hide(); pFuncPage->Hide();
pStructPage->Hide(); pStructPage->Hide();
m_pTabCtrl->SetTabPage( TP_FUNCTION, pFuncPage); m_pTabCtrl->SetTabPage( TP_FUNCTION, pFuncPage);
......
...@@ -353,7 +353,7 @@ EditBox::EditBox( vcl::Window* pParent, WinBits nBits ) ...@@ -353,7 +353,7 @@ EditBox::EditBox( vcl::Window* pParent, WinBits nBits )
WinBits nStyle=GetStyle(); WinBits nStyle=GetStyle();
SetStyle( nStyle| WB_DIALOGCONTROL); SetStyle( nStyle| WB_DIALOGCONTROL);
pMEdit=new MultiLineEdit(this,WB_LEFT | WB_VSCROLL | (nStyle & WB_TABSTOP) | pMEdit=VclPtr<MultiLineEdit>::Create(this,WB_LEFT | WB_VSCROLL | (nStyle & WB_TABSTOP) |
WB_NOBORDER | WB_NOHIDESELECTION | WB_IGNORETAB); WB_NOBORDER | WB_NOHIDESELECTION | WB_IGNORETAB);
pMEdit->Show(); pMEdit->Show();
aOldSel=pMEdit->GetSelection(); aOldSel=pMEdit->GetSelection();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment