diff options
Diffstat (limited to 'svtools/source/control')
-rw-r--r-- | svtools/source/control/calendar.cxx | 12 | ||||
-rw-r--r-- | svtools/source/control/filectrl.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/roadmap.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/ruler.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/scrwin.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/tabbar.cxx | 12 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 6 |
8 files changed, 25 insertions, 25 deletions
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 50ebc4e71bf6..89566f37844f 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -2244,7 +2244,7 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( bool bEnable ) { if ( !mpTodayBtn ) { - mpTodayBtn = new PushButton( this, WB_NOPOINTERFOCUS ); + mpTodayBtn = VclPtr<PushButton>::Create( this, WB_NOPOINTERFOCUS ); OUString aTodayText(SVT_RESSTR(STR_SVT_CALENDAR_TODAY)); mpTodayBtn->SetText( aTodayText ); Size aSize; @@ -2272,7 +2272,7 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( bool bEnable ) { if ( !mpNoneBtn ) { - mpNoneBtn = new PushButton( this, WB_NOPOINTERFOCUS ); + mpNoneBtn = VclPtr<PushButton>::Create( this, WB_NOPOINTERFOCUS ); OUString aNoneText(SVT_RESSTR(STR_SVT_CALENDAR_NONE)); mpNoneBtn->SetText( aNoneText ); Size aSize; @@ -2339,7 +2339,7 @@ void ImplCFieldFloatWin::ArrangeButtons() { if ( !mpFixedLine ) { - mpFixedLine = new FixedLine( this ); + mpFixedLine = VclPtr<FixedLine>::Create( this ); mpFixedLine->Show(); } long nLineWidth = aOutSize.Width()-(CALFIELD_BORDERLINE_X*2); @@ -2517,9 +2517,9 @@ bool CalendarField::ShowDropDown( bool bShow ) -Calendar* CalendarField::CreateCalendar( vcl::Window* pParent ) +VclPtr<Calendar> CalendarField::CreateCalendar( vcl::Window* pParent ) { - return new Calendar( pParent, mnCalendarStyle | WB_TABSTOP ); + return VclPtr<Calendar>::Create( pParent, mnCalendarStyle | WB_TABSTOP ); } @@ -2528,7 +2528,7 @@ Calendar* CalendarField::GetCalendar() { if ( !mpFloatWin ) { - mpFloatWin = new ImplCFieldFloatWin( this ); + mpFloatWin = VclPtr<ImplCFieldFloatWin>::Create( this ); mpFloatWin->SetPopupModeEndHdl( LINK( this, CalendarField, ImplPopupModeEndHdl ) ); mpCalendar = CreateCalendar( mpFloatWin ); mpCalendar->SetPosPixel( Point() ); diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 164ab86b1aa4..fce8ff083795 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -36,8 +36,8 @@ using namespace ::com::sun::star::ui; FileControl::FileControl( vcl::Window* pParent, WinBits nStyle, FileControlMode nFlags ) : Window( pParent, nStyle|WB_DIALOGCONTROL ), - maEdit( new Edit(this, (nStyle&(~WB_BORDER))|WB_NOTABSTOP) ), - maButton( new PushButton( this, (nStyle&(~WB_BORDER))|WB_NOLIGHTBORDER|WB_NOPOINTERFOCUS|WB_NOTABSTOP ) ), + maEdit( VclPtr<Edit>::Create(this, (nStyle&(~WB_BORDER))|WB_NOTABSTOP) ), + maButton( VclPtr<PushButton>::Create( this, (nStyle&(~WB_BORDER))|WB_NOLIGHTBORDER|WB_NOPOINTERFOCUS|WB_NOTABSTOP ) ), maButtonText( SVT_RESSTR(STR_FILECTRL_BUTTONTEXT) ), mnFlags( nFlags ), mnInternalFlags( FILECTRL_ORIGINALBUTTONTEXT ) diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index f062a123e586..3d15ae367178 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -681,10 +681,10 @@ namespace svt RoadmapItem::RoadmapItem( ORoadmap& _rParent, const Size& _rItemPlayground ) :m_aItemPlayground( _rItemPlayground ) { - mpID = new IDLabel( &_rParent, WB_WORDBREAK ); + mpID = VclPtr<IDLabel>::Create( &_rParent, WB_WORDBREAK ); mpID->SetTextColor( mpID->GetSettings().GetStyleSettings().GetFieldTextColor( ) ); mpID->Show(); - mpDescription = new HyperLabel( &_rParent, WB_NOTABSTOP | WB_WORDBREAK ); + mpDescription = VclPtr<HyperLabel>::Create( &_rParent, WB_NOTABSTOP | WB_WORDBREAK ); mpDescription->Show(); } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 5e45e596f831..78e75a7eb202 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -290,7 +290,7 @@ void Ruler::ImplInit( WinBits nWinBits ) Ruler::Ruler( vcl::Window* pParent, WinBits nWinStyle ) : Window( pParent, nWinStyle & WB_3DLOOK ), - maVirDev( new VirtualDevice(*this) ), + maVirDev( VclPtr<VirtualDevice>::Create(*this) ), maMapMode( MAP_100TH_MM ), mpSaveData(new ImplRulerData), mpData(NULL), diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index 7c5739adf08e..b29f4b0c9e41 100644 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -43,9 +43,9 @@ void ScrollableWindow::ImpInitialize( ScrollableWindowFlags nFlags ) ScrollableWindow::ScrollableWindow( vcl::Window* pParent, WinBits nBits, ScrollableWindowFlags nFlags ) : Window( pParent, WinBits(nBits|WB_CLIPCHILDREN) ), - aVScroll( new ScrollBar(this, WinBits(WB_VSCROLL | WB_DRAG)) ), - aHScroll( new ScrollBar(this, WinBits(WB_HSCROLL | WB_DRAG)) ), - aCornerWin( new ScrollBarBox(this) ) + aVScroll( VclPtr<ScrollBar>::Create(this, WinBits(WB_VSCROLL | WB_DRAG)) ), + aHScroll( VclPtr<ScrollBar>::Create(this, WinBits(WB_HSCROLL | WB_DRAG)) ), + aCornerWin( VclPtr<ScrollBarBox>::Create(this) ) { ImpInitialize( nFlags ); } diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 4a65042a34d5..10cb8c3b8467 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -655,7 +655,7 @@ void TabBar::ImplInitControls() { if (!mpImpl->mpSizer) { - mpImpl->mpSizer.reset(new ImplTabSizer( this, mnWinStyle & (WB_DRAG | WB_3DLOOK))); + mpImpl->mpSizer.reset(VclPtr<ImplTabSizer>::Create( this, mnWinStyle & (WB_DRAG | WB_3DLOOK))); } mpImpl->mpSizer->Show(); } @@ -668,7 +668,7 @@ void TabBar::ImplInitControls() { if (!mpImpl->mpPrevButton) { - mpImpl->mpPrevButton.reset(new ImplTabButton(this, WB_REPEAT)); + mpImpl->mpPrevButton.reset(VclPtr<ImplTabButton>::Create(this, WB_REPEAT)); mpImpl->mpPrevButton->SetClickHdl(aLink); } mpImpl->mpPrevButton->SetSymbol(mbMirrored ? SymbolType::NEXT : SymbolType::PREV); @@ -676,7 +676,7 @@ void TabBar::ImplInitControls() if (!mpImpl->mpNextButton) { - mpImpl->mpNextButton.reset(new ImplTabButton(this, WB_REPEAT)); + mpImpl->mpNextButton.reset(VclPtr<ImplTabButton>::Create(this, WB_REPEAT)); mpImpl->mpNextButton->SetClickHdl(aLink); } mpImpl->mpNextButton->SetSymbol(mbMirrored ? SymbolType::PREV : SymbolType::NEXT); @@ -692,7 +692,7 @@ void TabBar::ImplInitControls() { if (!mpImpl->mpFirstButton) { - mpImpl->mpFirstButton.reset(new ImplTabButton(this)); + mpImpl->mpFirstButton.reset(VclPtr<ImplTabButton>::Create(this)); mpImpl->mpFirstButton->SetClickHdl(aLink); } mpImpl->mpFirstButton->SetSymbol(mbMirrored ? SymbolType::LAST : SymbolType::FIRST); @@ -700,7 +700,7 @@ void TabBar::ImplInitControls() if (!mpImpl->mpLastButton) { - mpImpl->mpLastButton.reset(new ImplTabButton(this)); + mpImpl->mpLastButton.reset(VclPtr<ImplTabButton>::Create(this)); mpImpl->mpLastButton->SetClickHdl(aLink); } mpImpl->mpLastButton->SetSymbol(mbMirrored ? SymbolType::FIRST : SymbolType::LAST); @@ -2179,7 +2179,7 @@ bool TabBar::StartEditMode( sal_uInt16 nPageId ) ImplFormat(); Update(); - mpImpl->mpEdit.reset(new TabBarEdit(this, WB_CENTER)); + mpImpl->mpEdit.reset(VclPtr<TabBarEdit>::Create(this, WB_CENTER)); Rectangle aRect = GetPageRect( mnEditId ); long nX = aRect.Left(); long nWidth = aRect.GetWidth(); diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index ab3fc1f065f9..af6805cb22e9 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -821,9 +821,9 @@ void ToolbarMenu::appendSeparator() /** creates an empty ValueSet that is initialized and can be inserted with appendEntry. */ -ValueSet* ToolbarMenu::createEmptyValueSetControl() +VclPtr<ValueSet> ToolbarMenu::createEmptyValueSetControl() { - ValueSet* pSet = new ValueSet( this, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT ); + VclPtr<ValueSet> pSet = VclPtr<ValueSet>::Create( this, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT ); pSet->EnableFullItemMode( false ); pSet->SetColor( GetControlBackground() ); pSet->SetHighlightHdl( LINK( this, ToolbarMenu, HighlightHdl ) ); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 844585bcbded..ca07369dc0c3 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -96,7 +96,7 @@ void ValueSet::ImplInit() ValueSet::ValueSet( vcl::Window* pParent, WinBits nWinStyle, bool bDisableTransientChildren ) : Control( pParent, nWinStyle ), - maVirDev( new VirtualDevice(*this) ), + maVirDev( VclPtr<VirtualDevice>::Create(*this) ), maColor( COL_TRANSPARENT ) { ImplInit(); @@ -116,7 +116,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeValueSet(vcl::Window * ValueSet::ValueSet( vcl::Window* pParent, const ResId& rResId, bool bDisableTransientChildren ) : Control( pParent, rResId ), - maVirDev( new VirtualDevice(*this) ), + maVirDev( VclPtr<VirtualDevice>::Create(*this) ), maColor( COL_TRANSPARENT ) { ImplInit(); @@ -206,7 +206,7 @@ void ValueSet::ImplInitScrollBar() { if ( !mxScrollBar.get() ) { - mxScrollBar.reset(new ScrollBar( this, WB_VSCROLL | WB_DRAG )); + mxScrollBar.reset(VclPtr<ScrollBar>::Create( this, WB_VSCROLL | WB_DRAG )); mxScrollBar->SetScrollHdl( LINK( this, ValueSet, ImplScrollHdl ) ); } else |