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

Change-Id: I96e2e59c2f880632cf719f3346e345a5d03cc858
This commit is contained in:
Michael Meeks
2015-04-16 21:48:48 +01:00
parent d24f93dcf0
commit 4a33504d31
5 changed files with 9 additions and 8 deletions

View File

@@ -666,7 +666,8 @@ namespace dxcanvas
maVertexCache.reserve(1024);
mpWindow.reset(
new SystemChildWindow(
VclPtr<SystemChildWindow>::Create(
const_cast<vcl::Window *>(&rWindow), 0) );
// system child window must not receive mouse events

View File

@@ -25,7 +25,7 @@ namespace vclcanvas
{
BackBuffer::BackBuffer( const OutputDevice& rRefDevice,
bool bMonochromeBuffer ) :
maVDev( new VirtualDevice( rRefDevice,
maVDev( VclPtr<VirtualDevice>::Create( rRefDevice,
sal_uInt16(bMonochromeBuffer) ) )
{
if( !bMonochromeBuffer )

View File

@@ -112,8 +112,8 @@ namespace vclcanvas
// VDev not yet created, do it now. Create an alpha-VDev,
// if bitmap has transparency.
mpVDev = maBitmap->IsTransparent() ?
new VirtualDevice( mrRefDevice, 0, 0 ) :
new VirtualDevice( mrRefDevice );
VclPtr<VirtualDevice>::Create( mrRefDevice, 0, 0 ) :
VclPtr<VirtualDevice>::Create( mrRefDevice );
OSL_ENSURE( mpVDev,
"BitmapBackBuffer::createVDev(): Unable to create VirtualDevice" );

View File

@@ -286,7 +286,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
pParent->get(m_pRefBtn, "RB_REF");
m_pRefBtn->SetReferences(_pDlg, m_pEdRef);
pParaWin = new ParaWin(m_pParaWinBox, _pDlg);
pParaWin = VclPtr<ParaWin>::Create(m_pParaWinBox, _pDlg);
pParaWin->Show();
m_pParaWinBox->Hide();
m_pFtEditName->Hide();
@@ -306,8 +306,8 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
pParaWin->SetArgModifiedHdl(LINK( this, FormulaDlg_Impl, ModifyHdl ) );
pParaWin->SetFxHdl(LINK( this, FormulaDlg_Impl, FxHdl ) );
pFuncPage= new FuncPage( m_pTabCtrl,_pFunctionMgr);
pStructPage= new StructPage( m_pTabCtrl);
pFuncPage= VclPtr<FuncPage>::Create( m_pTabCtrl,_pFunctionMgr);
pStructPage= VclPtr<StructPage>::Create( m_pTabCtrl);
pFuncPage->Hide();
pStructPage->Hide();
m_pTabCtrl->SetTabPage( TP_FUNCTION, pFuncPage);

View File

@@ -353,7 +353,7 @@ EditBox::EditBox( vcl::Window* pParent, WinBits nBits )
WinBits nStyle=GetStyle();
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);
pMEdit->Show();
aOldSel=pMEdit->GetSelection();