summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-17 16:33:13 +0200
committerNoel Grandin <noel@peralex.com>2015-04-17 16:33:13 +0200
commit5df70781f3001d2f5be0343fc9daf04ab5c56719 (patch)
tree2eef02fb2ca619fce2fa0a30bf2239eba13d9329 /svx/source/tbxctrls
parent5cf00154ca1e5013ceba59103ad706a3492ea70b (diff)
svx: convert new to ::Create.
Change-Id: I52f589dabdedb538a4a5d0eadfa42b0d10de9b80
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r--svx/source/tbxctrls/SvxColorChildWindow.cxx3
-rw-r--r--svx/source/tbxctrls/bulletsnumbering.cxx8
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx2
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx16
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.hxx8
-rw-r--r--svx/source/tbxctrls/fillctrl.cxx4
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx14
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx6
-rw-r--r--svx/source/tbxctrls/layctrl.cxx18
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx8
-rw-r--r--svx/source/tbxctrls/linectrl.cxx10
-rw-r--r--svx/source/tbxctrls/subtoolboxcontrol.cxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx25
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx3
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx6
-rw-r--r--svx/source/tbxctrls/tbxalign.cxx2
16 files changed, 69 insertions, 66 deletions
diff --git a/svx/source/tbxctrls/SvxColorChildWindow.cxx b/svx/source/tbxctrls/SvxColorChildWindow.cxx
index a541eb2bdf83..a4ad23f3fedc 100644
--- a/svx/source/tbxctrls/SvxColorChildWindow.cxx
+++ b/svx/source/tbxctrls/SvxColorChildWindow.cxx
@@ -33,8 +33,9 @@ SvxColorChildWindow::SvxColorChildWindow( vcl::Window* _pParent,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
{
- SvxColorDockingWindow* pWin = new SvxColorDockingWindow( pBindings, this,
+ VclPtr<SvxColorDockingWindow> pWin = VclPtr<SvxColorDockingWindow>::Create( pBindings, this,
_pParent );
+
pWindow = pWin;
eChildAlignment = SfxChildAlignment::BOTTOM;
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx
index e11ed8438a6a..68ab4fe1c114 100644
--- a/svx/source/tbxctrls/bulletsnumbering.cxx
+++ b/svx/source/tbxctrls/bulletsnumbering.cxx
@@ -60,7 +60,7 @@ class NumberingToolBoxControl : public svt::PopupWindowController
public:
NumberingToolBoxControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
- virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
+ virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
bool IsInImpressDraw();
// XStatusListener
@@ -89,7 +89,7 @@ NumberingPopup::NumberingPopup( NumberingToolBoxControl& rController,
mrController( rController )
{
WinBits nBits = WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NO_DIRECTSELECT;
- mpValueSet = new SvxNumValueSet( this, nBits );
+ mpValueSet = VclPtr<SvxNumValueSet>::Create( this, nBits );
mpValueSet->init( mbBulletItem ? NUM_PAGETYPE_BULLET : NUM_PAGETYPE_SINGLENUM );
if ( !mbBulletItem )
@@ -204,9 +204,9 @@ NumberingToolBoxControl::NumberingToolBoxControl( const css::uno::Reference< css
{
}
-vcl::Window* NumberingToolBoxControl::createPopupWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> NumberingToolBoxControl::createPopupWindow( vcl::Window* pParent )
{
- return new NumberingPopup( *this, m_xFrame, pParent, mbBulletItem );
+ return VclPtr<NumberingPopup>::Create( *this, m_xFrame, pParent, mbBulletItem );
}
bool NumberingToolBoxControl::IsInImpressDraw()
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 103aa77a9505..c3a3402c4037 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -186,7 +186,7 @@ SvxColorDockingWindow::SvxColorDockingWindow
SfxDockingWindow( _pBindings, pCW, _pParent, WB_MOVEABLE|WB_CLOSEABLE|WB_SIZEABLE|WB_DOCKABLE ),
pColorList (),
- aColorSet ( new SvxColorValueSet_docking(this) ),
+ aColorSet ( VclPtr<SvxColorValueSet_docking>::Create(this) ),
nLeftSlot ( SID_ATTR_FILL_COLOR ),
nRightSlot ( SID_ATTR_LINE_COLOR ),
nCols ( 20 ),
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 141725466bdd..b9d988ae37b1 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -244,9 +244,9 @@ ExtrusionDirectionControl::ExtrusionDirectionControl(
-vcl::Window* ExtrusionDirectionControl::createPopupWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> ExtrusionDirectionControl::createPopupWindow( vcl::Window* pParent )
{
- return new ExtrusionDirectionWindow( *this, m_xFrame, pParent );
+ return VclPtr<ExtrusionDirectionWindow>::Create( *this, m_xFrame, pParent );
}
// XInitialization
@@ -490,9 +490,9 @@ ExtrusionDepthController::ExtrusionDepthController(
-vcl::Window* ExtrusionDepthController::createPopupWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> ExtrusionDepthController::createPopupWindow( vcl::Window* pParent )
{
- return new ExtrusionDepthWindow( *this, m_xFrame, pParent );
+ return VclPtr<ExtrusionDepthWindow>::Create( *this, m_xFrame, pParent );
}
// XInitialization
@@ -757,9 +757,9 @@ ExtrusionLightingControl::ExtrusionLightingControl(
-vcl::Window* ExtrusionLightingControl::createPopupWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> ExtrusionLightingControl::createPopupWindow( vcl::Window* pParent )
{
- return new ExtrusionLightingWindow( *this, m_xFrame, pParent );
+ return VclPtr<ExtrusionLightingWindow>::Create( *this, m_xFrame, pParent );
}
// XInitialization
@@ -903,9 +903,9 @@ ExtrusionSurfaceControl::ExtrusionSurfaceControl(
-vcl::Window* ExtrusionSurfaceControl::createPopupWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> ExtrusionSurfaceControl::createPopupWindow( vcl::Window* pParent )
{
- return new ExtrusionSurfaceWindow( *this, m_xFrame, pParent );
+ return VclPtr<ExtrusionSurfaceWindow>::Create( *this, m_xFrame, pParent );
}
// XInitialization
diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx
index 210d64d63267..d94de5301b87 100644
--- a/svx/source/tbxctrls/extrusioncontrols.hxx
+++ b/svx/source/tbxctrls/extrusioncontrols.hxx
@@ -73,7 +73,7 @@ class ExtrusionDirectionControl : public svt::PopupWindowController
public:
ExtrusionDirectionControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
- virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
+ virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
// XInitialization
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
@@ -120,7 +120,7 @@ class ExtrusionDepthController : public svt::PopupWindowController
public:
ExtrusionDepthController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
- virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
+ virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
// XInitialization
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
@@ -177,7 +177,7 @@ class ExtrusionLightingControl : public svt::PopupWindowController
public:
ExtrusionLightingControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
- virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
+ virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
// XInitialization
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
@@ -221,7 +221,7 @@ class ExtrusionSurfaceControl : public svt::PopupWindowController
public:
ExtrusionSurfaceControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
- virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
+ virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
// XInitialization
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index 54c960442ac9..4386b780ae4e 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -535,8 +535,8 @@ VclPtr<vcl::Window> SvxFillToolBoxControl::CreateItemWindow(vcl::Window *pParent
FillControl::FillControl(vcl::Window* pParent,WinBits nStyle)
: Window(pParent,nStyle | WB_DIALOGCONTROL),
- mpLbFillType(new SvxFillTypeBox(this)),
- mpLbFillAttr(new SvxFillAttrBox(this)),
+ mpLbFillType(VclPtr<SvxFillTypeBox>::Create(this)),
+ mpLbFillAttr(VclPtr<SvxFillAttrBox>::Create(this)),
maLogicalFillSize(40,80),
maLogicalAttrSize(50,80),
mnLastFillTypeControlSelectEntryPos(mpLbFillType->GetSelectEntryPos()),
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 2dfc0ad0806e..2cd3fa3ed24e 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -283,7 +283,7 @@ SfxPopupWindowType FontWorkShapeTypeControl::GetPopupWindowType() const
-SfxPopupWindow* FontWorkShapeTypeControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> FontWorkShapeTypeControl::CreatePopupWindow()
{
OUString aSubTbxResName( "private:resource/toolbar/fontworkshapetype" );
createAndPositionSubToolBar( aSubTbxResName );
@@ -396,7 +396,7 @@ class FontworkAlignmentControl : public svt::PopupWindowController
public:
FontworkAlignmentControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
- virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
+ virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
// XInitialization
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
@@ -419,9 +419,9 @@ FontworkAlignmentControl::FontworkAlignmentControl( const Reference< XComponentC
-vcl::Window* FontworkAlignmentControl::createPopupWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> FontworkAlignmentControl::createPopupWindow( vcl::Window* pParent )
{
- return new FontworkAlignmentWindow( *this, m_xFrame, pParent );
+ return VclPtr<FontworkAlignmentWindow>::Create( *this, m_xFrame, pParent );
}
// XInitialization
@@ -636,7 +636,7 @@ class FontworkCharacterSpacingControl : public svt::PopupWindowController
public:
FontworkCharacterSpacingControl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
- virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
+ virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
// XInitialization
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
@@ -657,9 +657,9 @@ FontworkCharacterSpacingControl::FontworkCharacterSpacingControl( const Referenc
-vcl::Window* FontworkCharacterSpacingControl::createPopupWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> FontworkCharacterSpacingControl::createPopupWindow( vcl::Window* pParent )
{
- return new FontworkCharacterSpacingWindow( *this, m_xFrame, pParent );
+ return VclPtr<FontworkCharacterSpacingWindow>::Create( *this, m_xFrame, pParent );
}
// XInitialization
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index c73aedd75038..26aebdeabf31 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -259,8 +259,8 @@ ImplGrafControl::ImplGrafControl(
const OUString& rCmd,
const Reference< XFrame >& rFrame
) : Control( pParent, WB_TABSTOP )
- , maImage( new FixedImage(this) )
- , maField( new ImplGrafMetricField(this, rCmd, rFrame) )
+ , maImage( VclPtr<FixedImage>::Create(this) )
+ , maField( VclPtr<ImplGrafMetricField>::Create(this, rCmd, rFrame) )
{
ResId aResId( ImplGetRID( rCmd ), DIALOG_MGR() ) ;
Image aImage( aResId );
@@ -446,7 +446,7 @@ SfxPopupWindowType SvxGrafFilterToolBoxControl::GetPopupWindowType() const
return SfxPopupWindowType::ONCLICK;
}
-SfxPopupWindow* SvxGrafFilterToolBoxControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxGrafFilterToolBoxControl::CreatePopupWindow()
{
OUString aSubTbxResName( "private:resource/toolbar/graffilterbar" );
createAndPositionSubToolBar( aSubTbxResName );
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 7bb1cd2532cc..a5ec5ebd8159 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -110,7 +110,7 @@ IMPL_LINK_NOARG(TableWindow, SelectHdl)
TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUString& rText,
ToolBox& rParentTbx, const Reference< XFrame >& rFrame )
: SfxPopupWindow( nSlotId, rFrame, WinBits( WB_STDPOPUP ) )
- , aTableButton( new PushButton(this) )
+ , aTableButton( VclPtr<PushButton>::Create(this) )
, nCol( 0 )
, nLine( 0 )
, bInitialKeyInput(false)
@@ -168,7 +168,7 @@ void TableWindow::dispose()
VclPtr<SfxPopupWindow> TableWindow::Clone() const
{
- return new TableWindow( GetId(), maCommand, GetText(), rTbx, mxFrame );
+ return VclPtr<TableWindow>::Create( GetId(), maCommand, GetText(), rTbx, mxFrame );
}
@@ -474,7 +474,7 @@ ColumnsWindow::ColumnsWindow( sal_uInt16 nId, const OUString& rCmd, const OUStri
VclPtr<SfxPopupWindow> ColumnsWindow::Clone() const
{
- return new ColumnsWindow( GetId(), maCommand, GetText(), rTbx, mxFrame );
+ return VclPtr<ColumnsWindow>::Create( GetId(), maCommand, GetText(), rTbx, mxFrame );
}
@@ -728,12 +728,12 @@ SfxPopupWindowType SvxTableToolBoxControl::GetPopupWindowType() const
-SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxTableToolBoxControl::CreatePopupWindow()
{
if ( bEnabled )
{
ToolBox& rTbx = GetToolBox();
- TableWindow* pWin = new TableWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), rTbx, m_xFrame );
+ VclPtr<TableWindow> pWin = VclPtr<TableWindow>::Create( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), rTbx, m_xFrame );
pWin->StartPopupMode( &rTbx, FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_NOKEYCLOSE );
SetPopupWindow( pWin );
return pWin;
@@ -746,7 +746,7 @@ SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindow()
SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindowCascading()
{
if ( bEnabled )
- return new TableWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
+ return VclPtr<TableWindow>::Create( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
return 0;
}
@@ -793,12 +793,12 @@ SfxPopupWindowType SvxColumnsToolBoxControl::GetPopupWindowType() const
-SfxPopupWindow* SvxColumnsToolBoxControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxColumnsToolBoxControl::CreatePopupWindow()
{
ColumnsWindow* pWin = 0;
if(bEnabled)
{
- pWin = new ColumnsWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
+ pWin = VclPtr<ColumnsWindow>::Create( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
pWin->StartPopupMode( &GetToolBox(),
FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_NOKEYCLOSE );
SetPopupWindow( pWin );
@@ -813,7 +813,7 @@ SfxPopupWindow* SvxColumnsToolBoxControl::CreatePopupWindowCascading()
ColumnsWindow* pWin = 0;
if(bEnabled)
{
- pWin = new ColumnsWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
+ pWin = VclPtr<ColumnsWindow>::Create( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
}
return pWin;
}
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index 1269b46bb2b8..a517946bff0e 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -111,7 +111,7 @@ void SvxPopupWindowListBox::dispose()
VclPtr<SfxPopupWindow> SvxPopupWindowListBox::Clone() const
{
- return new SvxPopupWindowListBox( GetId(), maCommandURL, nTbxId, rToolBox );
+ return VclPtr<SvxPopupWindowListBox>::Create( GetId(), maCommandURL, nTbxId, rToolBox );
}
void SvxPopupWindowListBox::PopupModeEnd()
@@ -155,7 +155,7 @@ SvxListBoxControl::SvxListBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBo
SvxListBoxControl::~SvxListBoxControl()
{}
-SfxPopupWindow* SvxListBoxControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxListBoxControl::CreatePopupWindow()
{
OSL_FAIL( "not implemented" );
return 0;
@@ -281,7 +281,7 @@ void SvxUndoRedoControl::StateChanged(
}
}
-SfxPopupWindow* SvxUndoRedoControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxUndoRedoControl::CreatePopupWindow()
{
DBG_ASSERT(( SID_UNDO == GetSlotId() || SID_REDO == GetSlotId() ), "mismatching ids" );
@@ -292,7 +292,7 @@ SfxPopupWindow* SvxUndoRedoControl::CreatePopupWindow()
ToolBox& rBox = GetToolBox();
- pPopupWin = new SvxPopupWindowListBox( GetSlotId(), m_aCommandURL, GetId(), rBox );
+ pPopupWin = VclPtr<SvxPopupWindowListBox>::Create( GetSlotId(), m_aCommandURL, GetId(), rBox );
pPopupWin->SetPopupModeEndHdl( LINK( this, SvxUndoRedoControl,
PopupModeEndHdl ) );
ListBox &rListBox = pPopupWin->GetListBox();
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index c7e4e1760bd4..82be0ad0e714 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -256,7 +256,7 @@ SvxLineEndWindow::SvxLineEndWindow(
SfxPopupWindow( nSlotId,
rFrame,
WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
- aLineEndSet ( new ValueSet(this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT )) ),
+ aLineEndSet ( VclPtr<ValueSet>::Create(this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT )) ),
nCols ( 2 ),
nLines ( 12 ),
nLineEndWidth ( 400 ),
@@ -277,7 +277,7 @@ SvxLineEndWindow::SvxLineEndWindow(
rFrame,
pParentWindow,
WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
- aLineEndSet ( new ValueSet(this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) )),
+ aLineEndSet ( VclPtr<ValueSet>::Create(this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) )),
nCols ( 2 ),
nLines ( 12 ),
nLineEndWidth ( 400 ),
@@ -322,7 +322,7 @@ void SvxLineEndWindow::implInit()
VclPtr<SfxPopupWindow> SvxLineEndWindow::Clone() const
{
- return new SvxLineEndWindow( GetId(), mxFrame, GetText() );
+ return VclPtr<SvxLineEndWindow>::Create( GetId(), mxFrame, GetText() );
}
@@ -629,10 +629,10 @@ SfxPopupWindowType SvxLineEndToolBoxControl::GetPopupWindowType() const
-SfxPopupWindow* SvxLineEndToolBoxControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxLineEndToolBoxControl::CreatePopupWindow()
{
SvxLineEndWindow* pLineEndWin =
- new SvxLineEndWindow( GetId(), m_xFrame, &GetToolBox(), SVX_RESSTR( RID_SVXSTR_LINEEND ) );
+ VclPtr<SvxLineEndWindow>::Create( GetId(), m_xFrame, &GetToolBox(), SVX_RESSTR( RID_SVXSTR_LINEEND ) );
pLineEndWin->StartPopupMode( &GetToolBox(),
FLOATWIN_POPUPMODE_GRABFOCUS |
FLOATWIN_POPUPMODE_ALLOWTEAROFF |
diff --git a/svx/source/tbxctrls/subtoolboxcontrol.cxx b/svx/source/tbxctrls/subtoolboxcontrol.cxx
index c04c79b0de14..606debaaa292 100644
--- a/svx/source/tbxctrls/subtoolboxcontrol.cxx
+++ b/svx/source/tbxctrls/subtoolboxcontrol.cxx
@@ -37,7 +37,7 @@ SvxSubToolBoxControl::~SvxSubToolBoxControl()
{
}
-SfxPopupWindow* SvxSubToolBoxControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxSubToolBoxControl::CreatePopupWindow()
{
const sal_Char* pResource = 0;
switch( GetSlotId() )
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 770eaefc9f31..0e94807a483e 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -721,7 +721,7 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
{
if(m_pButtons[nId] == nullptr)
{
- m_pButtons[nId] = new MenuButton(static_cast<vcl::Window*>(pDevice), WB_FLATBUTTON | WB_NOPOINTERFOCUS);
+ m_pButtons[nId] = VclPtr<MenuButton>::Create(static_cast<vcl::Window*>(pDevice), WB_FLATBUTTON | WB_NOPOINTERFOCUS);
m_pButtons[nId]->SetSizePixel(Size(20, aRect.GetSize().Height()));
m_pButtons[nId]->SetPopupMenu(&m_aMenu);
}
@@ -1264,7 +1264,7 @@ void SvxColorWindow_Impl::KeyInput( const KeyEvent& rKEvt )
VclPtr<SfxPopupWindow> SvxColorWindow_Impl::Clone() const
{
- return new SvxColorWindow_Impl( maCommand, mrPaletteManager, mrBorderColorStatus, theSlotId, GetFrame(), GetText(), GetParent() );
+ return VclPtr<SvxColorWindow_Impl>::Create( maCommand, mrPaletteManager, mrBorderColorStatus, theSlotId, GetFrame(), GetText(), GetParent() );
}
IMPL_LINK(SvxColorWindow_Impl, SelectHdl, SvxColorValueSet*, pColorSet)
@@ -1474,7 +1474,7 @@ Color BorderColorStatus::GetColor()
SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow ) :
SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
- aFrameSet ( new SvxFrmValueSet_Impl(this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT )) ),
+ aFrameSet ( VclPtr<SvxFrmValueSet_Impl>::Create(this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT )) ),
bParagraphMode(false)
{
BindListener();
@@ -1537,7 +1537,7 @@ void SvxFrameWindow_Impl::dispose()
VclPtr<SfxPopupWindow> SvxFrameWindow_Impl::Clone() const
{
//! HACK: How do I get the Paragraph mode?
- return new SvxFrameWindow_Impl( GetId(), GetFrame(), GetParent() );
+ return VclPtr<SvxFrameWindow_Impl>::Create( GetId(), GetFrame(), GetParent() );
}
vcl::Window* SvxFrameWindow_Impl::GetPreferredKeyInputWindow()
@@ -1752,7 +1752,7 @@ static Color lcl_mediumColor( Color aMain, Color /*aDefault*/ )
SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow ) :
SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION | WB_AUTOSIZE ) ),
- m_aLineStyleLb( new LineListBox(this) )
+ m_aLineStyleLb( VclPtr<LineListBox>::Create(this) )
{
try
{
@@ -1807,7 +1807,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame
VclPtr<SfxPopupWindow> SvxLineWindow_Impl::Clone() const
{
- return new SvxLineWindow_Impl( GetId(), GetFrame(), GetParent() );
+ return VclPtr<SvxLineWindow_Impl>::Create( GetId(), GetFrame(), GetParent() );
}
IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl)
@@ -2528,10 +2528,11 @@ SfxPopupWindowType SvxColorToolBoxControl::GetPopupWindowType() const
return SfxPopupWindowType::ONTIMEOUT;
}
-SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxColorToolBoxControl::CreatePopupWindow()
{
SvxColorWindow_Impl* pColorWin =
- new SvxColorWindow_Impl(
+ VclPtr<SvxColorWindow_Impl>::Create(
+
m_aCommandURL,
mPaletteManager,
maBorderColorStatus,
@@ -2706,9 +2707,9 @@ SfxPopupWindowType SvxFrameToolBoxControl::GetPopupWindowType() const
return SfxPopupWindowType::ONCLICK;
}
-SfxPopupWindow* SvxFrameToolBoxControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxFrameToolBoxControl::CreatePopupWindow()
{
- SvxFrameWindow_Impl* pFrameWin = new SvxFrameWindow_Impl(
+ VclPtr<SvxFrameWindow_Impl> pFrameWin = VclPtr<SvxFrameWindow_Impl>::Create(
GetSlotId(), m_xFrame, &GetToolBox() );
pFrameWin->StartPopupMode( &GetToolBox(),
@@ -2748,9 +2749,9 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const
return SfxPopupWindowType::ONCLICK;
}
-SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxFrameLineStyleToolBoxControl::CreatePopupWindow()
{
- SvxLineWindow_Impl* pLineWin = new SvxLineWindow_Impl( GetSlotId(), m_xFrame, &GetToolBox() );
+ VclPtr<SvxLineWindow_Impl> pLineWin = VclPtr<SvxLineWindow_Impl>::Create( GetSlotId(), m_xFrame, &GetToolBox() );
pLineWin->StartPopupMode( &GetToolBox(),
FLOATWIN_POPUPMODE_GRABFOCUS |
FLOATWIN_POPUPMODE_ALLOWTEAROFF |
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index 27611b06831f..21b2e98fc30e 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -409,7 +409,8 @@ uno::Reference< awt::XWindow > SAL_CALL FontHeightToolBoxControl::createItemWind
if ( pParent )
{
SolarMutexGuard aSolarMutexGuard;
- m_pBox = new SvxFontSizeBox_Impl(
+ m_pBox = VclPtr<SvxFontSizeBox_Impl>::Create(
+
pParent,
uno::Reference< frame::XDispatchProvider >( m_xFrame, uno::UNO_QUERY ),
m_xFrame,
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index d10d5b53326f..a5f8b17e8352 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -457,7 +457,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL FindTextToolbarController::cre
if ( pParent )
{
ToolBox* pToolbar = static_cast<ToolBox*>(pParent);
- m_pFindTextFieldControl = new FindTextFieldControl( pToolbar, WinBits( WB_DROPDOWN | WB_VSCROLL), m_xFrame, m_xContext );
+ m_pFindTextFieldControl = VclPtr<FindTextFieldControl>::Create( pToolbar, WinBits( WB_DROPDOWN | WB_VSCROLL), m_xFrame, m_xContext );
Size aSize(250, m_pFindTextFieldControl->GetTextHeight() + 200);
m_pFindTextFieldControl->SetSizePixel( aSize );
@@ -680,7 +680,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL MatchCaseToolboxController::cr
if ( pParent )
{
ToolBox* pToolbar = static_cast<ToolBox*>(pParent);
- m_pMatchCaseControl = new CheckBox( pToolbar, 0 );
+ m_pMatchCaseControl = VclPtr<CheckBox>::Create( pToolbar, 0 );
m_pMatchCaseControl->SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_MATCHCASE ) );
Size aSize( m_pMatchCaseControl->GetOptimalSize() );
m_pMatchCaseControl->SetSizePixel( aSize );
@@ -948,7 +948,7 @@ void SAL_CALL SearchLabelToolboxController::statusChanged( const css::frame::Fea
css::uno::Reference< css::awt::XWindow > SAL_CALL SearchLabelToolboxController::createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) throw ( css::uno::RuntimeException, std::exception )
{
- vcl::Window *pSL= new FixedText(VCLUnoHelper::GetWindow( Parent ));
+ VclPtr<vcl::Window> pSL = VclPtr<FixedText>::Create(VCLUnoHelper::GetWindow( Parent ));
pSL->SetSizePixel(Size(250, 25));
return VCLUnoHelper::GetInterface(pSL);
}
diff --git a/svx/source/tbxctrls/tbxalign.cxx b/svx/source/tbxctrls/tbxalign.cxx
index 41571ee9699a..a4fdb266a15f 100644
--- a/svx/source/tbxctrls/tbxalign.cxx
+++ b/svx/source/tbxctrls/tbxalign.cxx
@@ -61,7 +61,7 @@ SfxPopupWindowType SvxTbxCtlAlign::GetPopupWindowType() const
* rItemRect sind die Screen-Koordinaten
*/
-SfxPopupWindow* SvxTbxCtlAlign::CreatePopupWindow()
+VclPtr<SfxPopupWindow> SvxTbxCtlAlign::CreatePopupWindow()
{
SolarMutexGuard aGuard;
if ( GetSlotId() == SID_OBJECT_ALIGN )