formula & canvas: convert new to ::Create to get initial ref-counting right.
Change-Id: I96e2e59c2f880632cf719f3346e345a5d03cc858
This commit is contained in:
@@ -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
|
||||
|
@@ -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 )
|
||||
|
@@ -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" );
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user