summaryrefslogtreecommitdiff
path: root/svtools/source/contnr/imivctl1.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-28 11:41:31 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-28 15:08:48 +0100
commite8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch)
treeb322529f4a54a6427862cb20cb4cf87fb6a5d065 /svtools/source/contnr/imivctl1.cxx
parent2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff)
parent0cde74f788a054fa2b65107a030dd463b8d11c7a (diff)
Merge remote-tracking branch 'origin/feature/vclptr'
Resolve several thousand lines of conflicts. Conflicts: accessibility/source/extended/accessiblelistbox.cxx accessibility/source/standard/vclxaccessiblecombobox.cxx accessibility/source/standard/vclxaccessibledropdowncombobox.cxx accessibility/source/standard/vclxaccessibledropdownlistbox.cxx accessibility/source/standard/vclxaccessiblelistbox.cxx accessibility/source/standard/vclxaccessibletextfield.cxx basctl/source/basicide/basidesh.cxx cui/source/inc/chardlg.hxx cui/source/tabpages/tpbitmap.cxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx extensions/source/propctrlr/propertyeditor.hxx extensions/source/scanner/sanedlg.cxx filter/source/pdf/impdialog.cxx include/sfx2/mgetempl.hxx include/sfx2/sidebar/SidebarToolBox.hxx include/sfx2/viewsh.hxx include/svtools/brwbox.hxx include/svtools/filectrl.hxx include/svtools/scrwin.hxx include/svx/dlgctrl.hxx include/svx/sidebar/Popup.hxx include/svx/sidebar/PopupContainer.hxx include/svx/sidebar/PopupControl.hxx include/svx/sidebar/SidebarDialControl.hxx include/svx/sidebar/ValueSetWithTextControl.hxx sc/source/ui/condformat/condformatdlgentry.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/sidebar/CellBorderStyleControl.hxx sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/Ruler.hxx sd/source/ui/inc/SlideSorter.hxx sd/source/ui/inc/ViewTabBar.hxx sd/source/ui/inc/Window.hxx sd/source/ui/inc/morphdlg.hxx sd/source/ui/inc/sdpreslt.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/NavigatorWrapper.hxx sd/source/ui/sidebar/PanelBase.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentMasterPagesSelector.hxx sd/source/ui/slideshow/showwindow.hxx sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drviewsa.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/opengrf.cxx sfx2/source/control/thumbnailviewacc.hxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/doc/docinsert.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/inc/alienwarn.hxx sfx2/source/sidebar/Deck.cxx sfx2/source/sidebar/Deck.hxx sfx2/source/sidebar/DeckTitleBar.cxx sfx2/source/sidebar/DeckTitleBar.hxx sfx2/source/sidebar/MenuButton.cxx sfx2/source/sidebar/MenuButton.hxx sfx2/source/sidebar/Panel.cxx sfx2/source/sidebar/Panel.hxx sfx2/source/sidebar/PanelTitleBar.hxx sfx2/source/sidebar/SidebarDockingWindow.hxx sfx2/source/sidebar/SidebarToolBox.cxx sfx2/source/sidebar/TabBar.hxx sfx2/source/sidebar/TabItem.cxx sfx2/source/sidebar/TabItem.hxx sfx2/source/sidebar/TitleBar.hxx sfx2/source/toolbox/imgmgr.cxx starmath/inc/edit.hxx starmath/inc/smmod.hxx starmath/qa/cppunit/test_starmath.cxx starmath/source/edit.cxx starmath/source/smmod.cxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/datwin.hxx svtools/source/contnr/fileview.cxx svtools/source/contnr/simptabl.cxx svtools/source/control/filectrl.cxx svtools/source/control/valueimp.hxx svx/inc/GalleryControl.hxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/swframeexample.cxx svx/source/fmcomp/fmgridif.cxx svx/source/gallery2/GalleryControl.cxx svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/area/AreaPropertyPanel.hxx svx/source/sidebar/area/AreaTransparencyGradientControl.hxx svx/source/sidebar/graphic/GraphicPropertyPanel.hxx svx/source/sidebar/insert/InsertPropertyPanel.cxx svx/source/sidebar/insert/InsertPropertyPanel.hxx svx/source/sidebar/line/LinePropertyPanel.hxx svx/source/sidebar/line/LineWidthControl.cxx svx/source/sidebar/line/LineWidthControl.hxx svx/source/sidebar/line/LineWidthValueSet.hxx svx/source/sidebar/paragraph/ParaPropertyPanel.hxx svx/source/sidebar/possize/SidebarDialControl.cxx svx/source/sidebar/text/TextCharacterSpacingPopup.hxx svx/source/sidebar/text/TextPropertyPanel.hxx svx/source/sidebar/tools/PopupContainer.cxx svx/source/sidebar/tools/PopupControl.cxx svx/source/sidebar/tools/ValueSetWithTextControl.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdibrow.cxx svx/source/tbxctrls/colrctrl.cxx svx/source/tbxctrls/tbcontrl.cxx sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/index/cnttab.cxx sw/source/uibase/inc/drpcps.hxx sw/source/uibase/sidebar/PageColumnControl.hxx sw/source/uibase/sidebar/PageMarginControl.hxx sw/source/uibase/sidebar/PageOrientationControl.hxx sw/source/uibase/sidebar/PagePropertyPanel.hxx sw/source/uibase/sidebar/PageSizeControl.hxx sw/source/uibase/uiview/view2.cxx sw/source/uibase/utlui/navipi.cxx vcl/inc/svdata.hxx vcl/source/control/combobox.cxx vcl/source/control/lstbox.cxx vcl/source/window/dockwin.cxx vcl/source/window/winproc.cxx Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
Diffstat (limited to 'svtools/source/contnr/imivctl1.cxx')
-rw-r--r--svtools/source/contnr/imivctl1.cxx173
1 files changed, 92 insertions, 81 deletions
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index ce0e0f1bb285..f978dcd2fbbe 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -77,7 +77,8 @@ public:
const OUString& rData,
const Link& rNotifyEditEnd );
- virtual ~IcnViewEdit_Impl();
+ virtual ~IcnViewEdit_Impl();
+ virtual void dispose() SAL_OVERRIDE;
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
bool EditingCanceled() const { return bCanceled; }
@@ -90,9 +91,9 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
WinBits nWinStyle
) :
aEntries( this ),
- aVerSBar( pCurView, WB_DRAG | WB_VSCROLL ),
- aHorSBar( pCurView, WB_DRAG | WB_HSCROLL ),
- aScrBarBox( pCurView ),
+ aVerSBar( VclPtr<ScrollBar>::Create(pCurView, WB_DRAG | WB_VSCROLL) ),
+ aHorSBar( VclPtr<ScrollBar>::Create(pCurView, WB_DRAG | WB_HSCROLL) ),
+ aScrBarBox( VclPtr<ScrollBarBox>::Create(pCurView) ),
aImageSize( 32, 32 ),
pColumns( 0 )
{
@@ -127,14 +128,14 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
pImpCursor = new IcnCursor_Impl( this );
pGridMap = new IcnGridMap_Impl( this );
- aVerSBar.SetScrollHdl( LINK( this, SvxIconChoiceCtrl_Impl, ScrollUpDownHdl ) );
- aHorSBar.SetScrollHdl( LINK( this, SvxIconChoiceCtrl_Impl, ScrollLeftRightHdl ) );
+ aVerSBar->SetScrollHdl( LINK( this, SvxIconChoiceCtrl_Impl, ScrollUpDownHdl ) );
+ aHorSBar->SetScrollHdl( LINK( this, SvxIconChoiceCtrl_Impl, ScrollLeftRightHdl ) );
Link aEndScrollHdl( LINK( this, SvxIconChoiceCtrl_Impl, EndScrollHdl ) );
- aVerSBar.SetEndScrollHdl( aEndScrollHdl );
- aHorSBar.SetEndScrollHdl( aEndScrollHdl );
+ aVerSBar->SetEndScrollHdl( aEndScrollHdl );
+ aHorSBar->SetEndScrollHdl( aEndScrollHdl );
- nHorSBarHeight = aHorSBar.GetSizePixel().Height();
- nVerSBarWidth = aVerSBar.GetSizePixel().Width();
+ nHorSBarHeight = aHorSBar->GetSizePixel().Height();
+ nVerSBarWidth = aVerSBar->GetSizePixel().Width();
aEditIdle.SetPriority( SchedulerPriority::LOWEST );
aEditIdle.SetIdleHdl(LINK(this,SvxIconChoiceCtrl_Impl,EditTimeoutHdl));
@@ -156,19 +157,22 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl()
{
pCurEditedEntry = 0;
- DELETEZ(pEdit);
+ pEdit.disposeAndClear();
Clear();
StopEditTimer();
CancelUserEvents();
delete pZOrderList;
delete pImpCursor;
delete pGridMap;
- delete pDDDev;
- delete pDDBufDev;
- delete pDDTempDev;
- delete pEntryPaintDev;
+ pDDDev.disposeAndClear();
+ pDDBufDev.disposeAndClear();
+ pDDTempDev.disposeAndClear();
+ pEntryPaintDev.disposeAndClear();
ClearSelectedRectList();
ClearColumnList();
+ aVerSBar.disposeAndClear();
+ aHorSBar.disposeAndClear();
+ aScrBarBox.disposeAndClear();
}
void SvxIconChoiceCtrl_Impl::Clear( bool bInCtor )
@@ -257,10 +261,10 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, EndScrollHdl)
void SvxIconChoiceCtrl_Impl::FontModified()
{
StopEditTimer();
- DELETEZ(pDDDev);
- DELETEZ(pDDBufDev);
- DELETEZ(pDDTempDev);
- DELETEZ(pEntryPaintDev);
+ pDDDev.disposeAndClear();
+ pDDBufDev.disposeAndClear();
+ pDDTempDev.disposeAndClear();
+ pEntryPaintDev.disposeAndClear();
SetDefaultTextSize();
ShowCursor( false );
ShowCursor( true );
@@ -499,11 +503,11 @@ void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const Rectangle& rRect )
Range aRange;
aVirtOutputSize.Width() += nWidthOffs;
aRange.Max() = aVirtOutputSize.Width();
- aHorSBar.SetRange( aRange );
+ aHorSBar->SetRange( aRange );
aVirtOutputSize.Height() += nHeightOffs;
aRange.Max() = aVirtOutputSize.Height();
- aVerSBar.SetRange( aRange );
+ aVerSBar->SetRange( aRange );
pImpCursor->Clear();
pGridMap->OutputSizeChanged();
@@ -749,9 +753,9 @@ void SvxIconChoiceCtrl_Impl::RepaintEntries( SvxIconViewFlags nEntryFlagsMask )
void SvxIconChoiceCtrl_Impl::InitScrollBarBox()
{
- aScrBarBox.SetSizePixel( Size(nVerSBarWidth-1, nHorSBarHeight-1) );
+ aScrBarBox->SetSizePixel( Size(nVerSBarWidth-1, nHorSBarHeight-1) );
Size aSize( pView->GetOutputSizePixel() );
- aScrBarBox.SetPosPixel( Point(aSize.Width()-nVerSBarWidth+1, aSize.Height()-nHorSBarHeight+1));
+ aScrBarBox->SetPosPixel( Point(aSize.Width()-nVerSBarWidth+1, aSize.Height()-nHorSBarHeight+1));
}
bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
@@ -1251,8 +1255,8 @@ void SvxIconChoiceCtrl_Impl::PositionScrollBars( long nRealWidth, long nRealHeig
Point aPos( 0, nRealHeight );
aPos.Y() -= nHorSBarHeight;
- if( aHorSBar.GetPosPixel() != aPos )
- aHorSBar.SetPosPixel( aPos );
+ if( aHorSBar->GetPosPixel() != aPos )
+ aHorSBar->SetPosPixel( aPos );
// vertical scrollbar
aPos.X() = nRealWidth; aPos.Y() = 0;
@@ -1260,8 +1264,8 @@ void SvxIconChoiceCtrl_Impl::PositionScrollBars( long nRealWidth, long nRealHeig
aPos.X()++;
aPos.Y()--;
- if( aVerSBar.GetPosPixel() != aPos )
- aVerSBar.SetPosPixel( aPos );
+ if( aVerSBar->GetPosPixel() != aPos )
+ aVerSBar->SetPosPixel( aPos );
}
void SvxIconChoiceCtrl_Impl::AdjustScrollBars( bool )
@@ -1340,27 +1344,27 @@ void SvxIconChoiceCtrl_Impl::AdjustScrollBars( bool )
}
// size vertical scrollbar
- long nThumb = aVerSBar.GetThumbPos();
+ long nThumb = aVerSBar->GetThumbPos();
Size aSize( nVerSBarWidth, nRealHeight );
aSize.Height() += 2;
- if( aSize != aVerSBar.GetSizePixel() )
- aVerSBar.SetSizePixel( aSize );
- aVerSBar.SetVisibleSize( nVisibleHeight );
- aVerSBar.SetPageSize( GetScrollBarPageSize( nVisibleHeight ));
+ if( aSize != aVerSBar->GetSizePixel() )
+ aVerSBar->SetSizePixel( aSize );
+ aVerSBar->SetVisibleSize( nVisibleHeight );
+ aVerSBar->SetPageSize( GetScrollBarPageSize( nVisibleHeight ));
if( nResult & 0x0001 )
{
- aVerSBar.SetThumbPos( nThumb );
- aVerSBar.Show();
+ aVerSBar->SetThumbPos( nThumb );
+ aVerSBar->Show();
}
else
{
- aVerSBar.SetThumbPos( 0 );
- aVerSBar.Hide();
+ aVerSBar->SetThumbPos( 0 );
+ aVerSBar->Hide();
}
// size horizontal scrollbar
- nThumb = aHorSBar.GetThumbPos();
+ nThumb = aHorSBar->GetThumbPos();
aSize.Width() = nRealWidth;
aSize.Height() = nHorSBarHeight;
aSize.Width()++;
@@ -1369,19 +1373,19 @@ void SvxIconChoiceCtrl_Impl::AdjustScrollBars( bool )
aSize.Width()++;
nRealWidth++;
}
- if( aSize != aHorSBar.GetSizePixel() )
- aHorSBar.SetSizePixel( aSize );
- aHorSBar.SetVisibleSize( nVisibleWidth );
- aHorSBar.SetPageSize( GetScrollBarPageSize(nVisibleWidth ));
+ if( aSize != aHorSBar->GetSizePixel() )
+ aHorSBar->SetSizePixel( aSize );
+ aHorSBar->SetVisibleSize( nVisibleWidth );
+ aHorSBar->SetPageSize( GetScrollBarPageSize(nVisibleWidth ));
if( nResult & 0x0002 )
{
- aHorSBar.SetThumbPos( nThumb );
- aHorSBar.Show();
+ aHorSBar->SetThumbPos( nThumb );
+ aHorSBar->Show();
}
else
{
- aHorSBar.SetThumbPos( 0 );
- aHorSBar.Hide();
+ aHorSBar->SetThumbPos( 0 );
+ aHorSBar->Hide();
}
aOutputSize.Width() = nRealWidth;
@@ -1390,9 +1394,9 @@ void SvxIconChoiceCtrl_Impl::AdjustScrollBars( bool )
aOutputSize.Height() = nRealHeight;
if( (nResult & (0x0001|0x0002)) == (0x0001|0x0002) )
- aScrBarBox.Show();
+ aScrBarBox->Show();
else
- aScrBarBox.Hide();
+ aScrBarBox->Hide();
}
void SvxIconChoiceCtrl_Impl::Resize()
@@ -1420,7 +1424,7 @@ void SvxIconChoiceCtrl_Impl::Resize()
bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
{
- if( !pZOrderList || !aHorSBar.IsVisible() )
+ if( !pZOrderList || !aHorSBar->IsVisible() )
return false;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
@@ -1438,18 +1442,18 @@ bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
if( nRight > nMostRight )
nMostRight = nRight;
}
- aHorSBar.Hide();
+ aHorSBar->Hide();
aOutputSize.Height() += nHorSBarHeight;
aVirtOutputSize.Width() = nMostRight;
- aHorSBar.SetThumbPos( 0 );
+ aHorSBar->SetThumbPos( 0 );
Range aRange;
aRange.Max() = nMostRight - 1;
- aHorSBar.SetRange( aRange );
- if( aVerSBar.IsVisible() )
+ aHorSBar->SetRange( aRange );
+ if( aVerSBar->IsVisible() )
{
- Size aSize( aVerSBar.GetSizePixel());
+ Size aSize( aVerSBar->GetSizePixel());
aSize.Height() += nHorSBarHeight;
- aVerSBar.SetSizePixel( aSize );
+ aVerSBar->SetSizePixel( aSize );
}
return true;
}
@@ -1458,7 +1462,7 @@ bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
bool SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
{
- if( !pZOrderList || !aVerSBar.IsVisible() )
+ if( !pZOrderList || !aVerSBar->IsVisible() )
return false;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
@@ -1476,18 +1480,18 @@ bool SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
if( nBottom > nDeepest )
nDeepest = nBottom;
}
- aVerSBar.Hide();
+ aVerSBar->Hide();
aOutputSize.Width() += nVerSBarWidth;
aVirtOutputSize.Height() = nDeepest;
- aVerSBar.SetThumbPos( 0 );
+ aVerSBar->SetThumbPos( 0 );
Range aRange;
aRange.Max() = nDeepest - 1;
- aVerSBar.SetRange( aRange );
- if( aHorSBar.IsVisible() )
+ aVerSBar->SetRange( aRange );
+ if( aHorSBar->IsVisible() )
{
- Size aSize( aHorSBar.GetSizePixel());
+ Size aSize( aHorSBar->GetSizePixel());
aSize.Width() += nVerSBarWidth;
- aHorSBar.SetSizePixel( aSize );
+ aHorSBar->SetSizePixel( aSize );
}
return true;
}
@@ -1501,10 +1505,10 @@ void SvxIconChoiceCtrl_Impl::CheckScrollBars()
CheckVerScrollBar();
if( CheckHorScrollBar() )
CheckVerScrollBar();
- if( aVerSBar.IsVisible() && aHorSBar.IsVisible() )
- aScrBarBox.Show();
+ if( aVerSBar->IsVisible() && aHorSBar->IsVisible() )
+ aScrBarBox->Show();
else
- aScrBarBox.Hide();
+ aScrBarBox->Hide();
}
@@ -1680,7 +1684,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntryVirtOutDev( SvxIconChoiceCtrlEntry* pEntr
{
if( !pEntryPaintDev )
{
- pEntryPaintDev = new VirtualDevice( *pView );
+ pEntryPaintDev = VclPtr<VirtualDevice>::Create( *pView );
pEntryPaintDev->SetFont( pView->GetFont() );
pEntryPaintDev->SetLineColor();
//pEntryPaintDev->SetBackground( pView->GetBackground() );
@@ -1779,7 +1783,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
}
bool bResetClipRegion = false;
- if( !pView->IsClipRegion() && (aVerSBar.IsVisible() || aHorSBar.IsVisible()) )
+ if( !pView->IsClipRegion() && (aVerSBar->IsVisible() || aHorSBar->IsVisible()) )
{
Rectangle aOutputArea( GetOutputRect() );
if( aOutputArea.IsOver(aTextRect) || aOutputArea.IsOver(aBmpRect) )
@@ -2080,8 +2084,8 @@ long SvxIconChoiceCtrl_Impl::CalcBoundingHeight( SvxIconChoiceCtrlEntry* pEntry
if( nHeight > nMaxBoundHeight )
{
const_cast<SvxIconChoiceCtrl_Impl*>(this)->nMaxBoundHeight = nHeight;
- const_cast<SvxIconChoiceCtrl_Impl*>(this)->aHorSBar.SetLineSize( GetScrollBarLineSize() );
- const_cast<SvxIconChoiceCtrl_Impl*>(this)->aVerSBar.SetLineSize( GetScrollBarLineSize() );
+ const_cast<SvxIconChoiceCtrl_Impl*>(this)->aHorSBar->SetLineSize( GetScrollBarLineSize() );
+ const_cast<SvxIconChoiceCtrl_Impl*>(this)->aVerSBar->SetLineSize( GetScrollBarLineSize() );
}
return nHeight;
}
@@ -2421,16 +2425,16 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, bool bScrBar,
else
pView->Invalidate(INVALIDATE_NOCHILDREN);
- if( aHorSBar.IsVisible() || aVerSBar.IsVisible() )
+ if( aHorSBar->IsVisible() || aVerSBar->IsVisible() )
{
if( !bScrBar )
{
aOrigin *= -1;
// correct thumbs
- if(aHorSBar.IsVisible() && aHorSBar.GetThumbPos() != aOrigin.X())
- aHorSBar.SetThumbPos( aOrigin.X() );
- if(aVerSBar.IsVisible() && aVerSBar.GetThumbPos() != aOrigin.Y())
- aVerSBar.SetThumbPos( aOrigin.Y() );
+ if(aHorSBar->IsVisible() && aHorSBar->GetThumbPos() != aOrigin.X())
+ aHorSBar->SetThumbPos( aOrigin.X() );
+ if(aVerSBar->IsVisible() && aVerSBar->GetThumbPos() != aOrigin.Y())
+ aVerSBar->SetThumbPos( aOrigin.Y() );
}
}
@@ -3123,7 +3127,7 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
return;
StopEntryEditing( true );
- DELETEZ(pEdit);
+ pEdit.disposeAndClear();
SetNoSelection();
pCurEditedEntry = pEntry;
@@ -3134,7 +3138,8 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
aPos = pView->GetPixelPos( aPos );
aRect.SetPos( aPos );
pView->HideFocus();
- pEdit = new IcnViewEdit_Impl(
+ pEdit = VclPtr<IcnViewEdit_Impl>::Create(
+
pView,
aRect.TopLeft(),
aRect.GetSize(),
@@ -3275,11 +3280,17 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo
IcnViewEdit_Impl::~IcnViewEdit_Impl()
{
+ disposeOnce();
+}
+
+void IcnViewEdit_Impl::dispose()
+{
if( !bAlreadyInCallback )
{
Application::RemoveAccel( &aAccReturn );
Application::RemoveAccel( &aAccEscape );
}
+ MultiLineEdit::dispose();
}
void IcnViewEdit_Impl::CallCallBackHdl_Impl()
@@ -3392,16 +3403,16 @@ void SvxIconChoiceCtrl_Impl::InitSettings()
if( nScrBarSize != nHorSBarHeight || nScrBarSize != nVerSBarWidth )
{
nHorSBarHeight = nScrBarSize;
- Size aSize( aHorSBar.GetSizePixel() );
+ Size aSize( aHorSBar->GetSizePixel() );
aSize.Height() = nScrBarSize;
- aHorSBar.Hide();
- aHorSBar.SetSizePixel( aSize );
+ aHorSBar->Hide();
+ aHorSBar->SetSizePixel( aSize );
nVerSBarWidth = nScrBarSize;
- aSize = aVerSBar.GetSizePixel();
+ aSize = aVerSBar->GetSizePixel();
aSize.Width() = nScrBarSize;
- aVerSBar.Hide();
- aVerSBar.SetSizePixel( aSize );
+ aVerSBar->Hide();
+ aVerSBar->SetSizePixel( aSize );
Size aOSize( pView->Control::GetOutputSizePixel() );
PositionScrollBars( aOSize.Width(), aOSize.Height() );