summaryrefslogtreecommitdiff
path: root/svtools/source/table
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/table
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/table')
-rw-r--r--svtools/source/table/gridtablerenderer.cxx8
-rw-r--r--svtools/source/table/tablecontrol.cxx6
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx31
-rw-r--r--svtools/source/table/tablecontrol_impl.hxx9
-rw-r--r--svtools/source/table/tabledatawindow.cxx6
-rw-r--r--svtools/source/table/tabledatawindow.hxx1
6 files changed, 37 insertions, 24 deletions
diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx
index e350a2237c12..d4b98433de3b 100644
--- a/svtools/source/table/gridtablerenderer.cxx
+++ b/svtools/source/table/gridtablerenderer.cxx
@@ -86,17 +86,17 @@ namespace svt { namespace table
Point const aBitmapPos( 0, 0 );
Size const aBitmapSize( nSortIndicatorWidth, nSortIndicatorHeight );
- VirtualDevice aDevice( i_device, 0, 0 );
- aDevice.SetOutputSizePixel( aBitmapSize );
+ ScopedVclPtrInstance< VirtualDevice > aDevice( i_device, 0, 0 );
+ aDevice->SetOutputSizePixel( aBitmapSize );
- DecorationView aDecoView( &aDevice );
+ DecorationView aDecoView( aDevice.get() );
aDecoView.DrawSymbol(
Rectangle( aBitmapPos, aBitmapSize ),
i_sortAscending ? SymbolType::SPIN_UP : SymbolType::SPIN_DOWN,
i_style.GetActiveColor()
);
- rBitmap = aDevice.GetBitmapEx( aBitmapPos, aBitmapSize );
+ rBitmap = aDevice->GetBitmapEx( aBitmapPos, aBitmapSize );
m_lastHeaderHeight = i_headerHeight;
m_lastArrowColor = i_style.GetActiveColor();
}
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 7ed486a90b48..5c887c36d83d 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -64,11 +64,17 @@ namespace svt { namespace table
TableControl::~TableControl()
{
+ disposeOnce();
+ }
+
+ void TableControl::dispose()
+ {
CallEventListeners( VCLEVENT_OBJECT_DYING );
m_pImpl->setModel( PTableModel() );
m_pImpl->disposeAccessible();
m_pImpl.reset();
+ Control::dispose();
}
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 2d2bf0166586..1565914154b6 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -242,7 +242,7 @@ namespace svt { namespace table
,m_nLeftColumn ( 0 )
,m_nTopRow ( 0 )
,m_nCursorHidden ( 1 )
- ,m_pDataWindow ( new TableDataWindow( *this ) )
+ ,m_pDataWindow ( VclPtr<TableDataWindow>::Create( *this ) )
,m_pVScroll ( NULL )
,m_pHScroll ( NULL )
,m_pScrollCorner ( NULL )
@@ -261,10 +261,10 @@ namespace svt { namespace table
TableControl_Impl::~TableControl_Impl()
{
-
- DELETEZ( m_pVScroll );
- DELETEZ( m_pHScroll );
- DELETEZ( m_pScrollCorner );
+ m_pVScroll.disposeAndClear();
+ m_pHScroll.disposeAndClear();
+ m_pScrollCorner.disposeAndClear();
+ m_pDataWindow.disposeAndClear();
DELETEZ( m_pTableFunctionSet );
DELETEZ( m_pSelEngine );
}
@@ -632,24 +632,25 @@ namespace svt { namespace table
}
- bool lcl_updateScrollbar( vcl::Window& _rParent, ScrollBar*& _rpBar,
+ bool lcl_updateScrollbar( vcl::Window& _rParent, VclPtr<ScrollBar>& _rpBar,
bool const i_needBar, long _nVisibleUnits,
long _nPosition, long _nLineSize, long _nRange,
bool _bHorizontal, const Link& _rScrollHandler )
{
// do we currently have the scrollbar?
- bool bHaveBar = _rpBar != NULL;
+ bool bHaveBar = _rpBar != nullptr;
// do we need to correct the scrollbar visibility?
if ( bHaveBar && !i_needBar )
{
if ( _rpBar->IsTracking() )
_rpBar->EndTracking();
- DELETEZ( _rpBar );
+ _rpBar.disposeAndClear();
}
else if ( !bHaveBar && i_needBar )
{
- _rpBar = new ScrollBar(
+ _rpBar = VclPtr<ScrollBar>::Create(
+
&_rParent,
WB_DRAG | ( _bHorizontal ? WB_HSCROLL : WB_VSCROLL )
);
@@ -1162,15 +1163,15 @@ namespace svt { namespace table
}
// the corner window connecting the two scrollbars in the lower right corner
- bool bHaveScrollCorner = NULL != m_pScrollCorner;
- bool bNeedScrollCorner = ( NULL != m_pHScroll ) && ( NULL != m_pVScroll );
+ bool bHaveScrollCorner = nullptr != m_pScrollCorner;
+ bool bNeedScrollCorner = ( nullptr != m_pHScroll ) && ( nullptr != m_pVScroll );
if ( bHaveScrollCorner && !bNeedScrollCorner )
{
- DELETEZ( m_pScrollCorner );
+ m_pScrollCorner.disposeAndClear();
}
else if ( !bHaveScrollCorner && bNeedScrollCorner )
{
- m_pScrollCorner = new ScrollBarBox( &m_rAntiImpl );
+ m_pScrollCorner = VclPtr<ScrollBarBox>::Create( &m_rAntiImpl );
m_pScrollCorner->SetSizePixel( Size( nScrollbarMetrics, nScrollbarMetrics ) );
m_pScrollCorner->SetPosPixel( Point( i_dataCellPlayground.Right() + 1, i_dataCellPlayground.Bottom() + 1 ) );
m_pScrollCorner->Show();
@@ -2111,7 +2112,7 @@ namespace svt { namespace table
}
// update the position at the vertical scrollbar
- if ( m_pVScroll != NULL )
+ if ( m_pVScroll != nullptr )
m_pVScroll->SetThumbPos( m_nTopRow );
}
@@ -2189,7 +2190,7 @@ namespace svt { namespace table
}
// update the position at the horizontal scrollbar
- if ( m_pHScroll != NULL )
+ if ( m_pHScroll != nullptr )
m_pHScroll->SetThumbPos( m_nLeftColumn );
}
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 5fef6fdd4062..4a587c8e3af8 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -122,13 +122,12 @@ namespace svt { namespace table
The window's upper left corner is at position (0,0), relative to the
table control, which is the direct parent of the data window.
*/
- ::boost::scoped_ptr< TableDataWindow >
- m_pDataWindow;
+ VclPtr<TableDataWindow> m_pDataWindow;
/// the vertical scrollbar, if any
- ScrollBar* m_pVScroll;
+ VclPtr<ScrollBar> m_pVScroll;
/// the horizontal scrollbar, if any
- ScrollBar* m_pHScroll;
- ScrollBarBox* m_pScrollCorner;
+ VclPtr<ScrollBar> m_pHScroll;
+ VclPtr<ScrollBarBox> m_pScrollCorner;
//selection engine - for determining selection range, e.g. single, multiple
SelectionEngine* m_pSelEngine;
//vector which contains the selected rows
diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx
index cddaf452732c..2b819033d610 100644
--- a/svtools/source/table/tabledatawindow.cxx
+++ b/svtools/source/table/tabledatawindow.cxx
@@ -51,7 +51,13 @@ namespace svt { namespace table
TableDataWindow::~TableDataWindow()
{
+ disposeOnce();
+ }
+
+ void TableDataWindow::dispose()
+ {
impl_hideTipWindow();
+ Window::dispose();
}
void TableDataWindow::Paint( const Rectangle& rUpdateRect )
diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx
index 13e1f1fcb0a7..d5ce17192b11 100644
--- a/svtools/source/table/tabledatawindow.hxx
+++ b/svtools/source/table/tabledatawindow.hxx
@@ -49,6 +49,7 @@ namespace svt { namespace table
public:
TableDataWindow( TableControl_Impl& _rTableControl );
virtual ~TableDataWindow();
+ virtual void dispose() SAL_OVERRIDE;
inline void SetSelectHdl( const Link& rLink ) { m_aSelectHdl = rLink; }
inline const Link& GetSelectHdl() const { return m_aSelectHdl; }