summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/valueset.cxx12
-rw-r--r--svtools/source/table/tablecontrol_impl.hxx3
-rw-r--r--svtools/source/toolpanel/drawerlayouter.cxx14
-rw-r--r--svtools/source/toolpanel/tablayouter.cxx2
4 files changed, 13 insertions, 18 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 67b2464f08c0..2d0cb078df28 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -135,6 +135,7 @@ void ValueSet::dispose()
xComponent->dispose();
ImplDeleteItems();
+ mpScrollBar.disposeAndClear();
Control::dispose();
}
@@ -350,18 +351,15 @@ void ValueSet::Format()
long nOff;
long nNoneHeight;
long nNoneSpace;
- std::unique_ptr<ScrollBar> xDeletedScrollBar;
+ VclPtr<ScrollBar> xDeletedScrollBar;
// consider the scrolling
if ( nStyle & WB_VSCROLL )
ImplInitScrollBar();
else
{
- if ( mxScrollBar.get() )
- {
- // delete ScrollBar not until later, to prevent recursive calls
- xDeletedScrollBar.swap(mxScrollBar);
- }
+ xDeletedScrollBar = mxScrollBar;
+ mxScrollBar.clear();
}
// calculate item offset
@@ -674,6 +672,8 @@ void ValueSet::Format()
// waiting for the next since the formatting is finished
mbFormat = false;
+
+ xDeletedScrollBar.disposeAndClear();
}
void ValueSet::ImplDrawItemText(const OUString& rText)
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 530823a44e1c..4a587c8e3af8 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -122,8 +122,7 @@ 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
VclPtr<ScrollBar> m_pVScroll;
/// the horizontal scrollbar, if any
diff --git a/svtools/source/toolpanel/drawerlayouter.cxx b/svtools/source/toolpanel/drawerlayouter.cxx
index b2e692c1bd55..9d3d5e163e1e 100644
--- a/svtools/source/toolpanel/drawerlayouter.cxx
+++ b/svtools/source/toolpanel/drawerlayouter.cxx
@@ -132,7 +132,7 @@ namespace svt
{
ENSURE_OR_RETURN( i_nChildIndex < m_aDrawers.size(), "illegal index", NULL );
- const PToolPanelDrawer pDrawer( m_aDrawers[ i_nChildIndex ] );
+ ToolPanelDrawer *pDrawer( m_aDrawers[ i_nChildIndex ] );
Reference< XAccessible > xItemAccessible = pDrawer->GetAccessible( false );
if ( !xItemAccessible.is() )
@@ -151,7 +151,7 @@ namespace svt
{
OSL_PRECOND( i_nPosition <= m_aDrawers.size(), "DrawerDeckLayouter::PanelInserted: inconsistency!" );
- PToolPanelDrawer pDrawer( new ToolPanelDrawer( m_rParentWindow, i_pPanel->GetDisplayName() ) );
+ ToolPanelDrawer *pDrawer( new ToolPanelDrawer( m_rParentWindow, i_pPanel->GetDisplayName() ) );
pDrawer->SetHelpId( i_pPanel->GetHelpID() );
// proper Z-Order
if ( i_nPosition == 0 )
@@ -160,8 +160,8 @@ namespace svt
}
else
{
- const PToolPanelDrawer pFirstDrawer( m_aDrawers[ i_nPosition - 1 ] );
- pDrawer->SetZOrder( pFirstDrawer.get(), WINDOW_ZORDER_BEHIND );
+ ToolPanelDrawer* pFirstDrawer( m_aDrawers[ i_nPosition - 1 ] );
+ pDrawer->SetZOrder( pFirstDrawer, WINDOW_ZORDER_BEHIND );
}
pDrawer->Show();
@@ -213,10 +213,7 @@ namespace svt
size_t DrawerDeckLayouter::impl_getPanelPositionFromWindow( const vcl::Window* i_pDrawerWindow ) const
{
- for ( ::std::vector< PToolPanelDrawer >::const_iterator drawerPos = m_aDrawers.begin();
- drawerPos != m_aDrawers.end();
- ++drawerPos
- )
+ for ( auto drawerPos = m_aDrawers.begin(); drawerPos != m_aDrawers.end(); ++drawerPos )
{
if ( drawerPos->get() == i_pDrawerWindow )
return drawerPos - m_aDrawers.begin();
@@ -229,7 +226,6 @@ namespace svt
{
OSL_PRECOND( i_nPosition < m_aDrawers.size(), "DrawerDeckLayouter::impl_removeDrawer: invalid panel position!" );
m_aDrawers[ i_nPosition ]->RemoveEventListener( LINK( this, DrawerDeckLayouter, OnWindowEvent ) );
- OSL_ENSURE( m_aDrawers[ i_nPosition ].unique(), "DrawerDeckLayouter::impl_removeDrawer: somebody else is still holding a reference!" );
m_aDrawers.erase( m_aDrawers.begin() + i_nPosition );
}
diff --git a/svtools/source/toolpanel/tablayouter.cxx b/svtools/source/toolpanel/tablayouter.cxx
index 39a0874d824a..b2e6f242e934 100644
--- a/svtools/source/toolpanel/tablayouter.cxx
+++ b/svtools/source/toolpanel/tablayouter.cxx
@@ -41,7 +41,7 @@ namespace svt
{
TabAlignment eAlignment;
IToolPanelDeck& rPanels;
- ::std::unique_ptr< PanelTabBar > pTabBar;
+ VclPtr< PanelTabBar > pTabBar;
AccessibleFactoryAccess aAccessibleFactory;
TabDeckLayouter_Data( vcl::Window& i_rParent, IToolPanelDeck& i_rPanels,