summaryrefslogtreecommitdiff
path: root/svtools/source/toolpanel/toolpaneldrawer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/toolpanel/toolpaneldrawer.cxx')
-rw-r--r--svtools/source/toolpanel/toolpaneldrawer.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx
index d74545593d1c..60b9d06cd2c0 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.cxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.cxx
@@ -56,11 +56,6 @@ namespace svt
}
- DrawerVisualization::~DrawerVisualization()
- {
- }
-
-
void DrawerVisualization::Paint( const Rectangle& i_rBoundingBox )
{
Window::Paint( i_rBoundingBox );
@@ -73,8 +68,8 @@ namespace svt
ToolPanelDrawer::ToolPanelDrawer( vcl::Window& i_rParent, const OUString& i_rTitle )
:Window( &i_rParent, WB_TABSTOP )
- ,m_pPaintDevice( new VirtualDevice( *this ) )
- ,m_aVisualization( *this )
+ ,m_pPaintDevice( VclPtr<VirtualDevice>::Create( *this ) )
+ ,m_aVisualization( VclPtr<DrawerVisualization>::Create(*this) )
,m_bFocused( false )
,m_bExpanded( false )
{
@@ -88,15 +83,20 @@ namespace svt
SetAccessibleName( i_rTitle );
SetAccessibleDescription( i_rTitle );
- m_aVisualization.SetAccessibleName( i_rTitle );
- m_aVisualization.SetAccessibleDescription( i_rTitle );
+ m_aVisualization->SetAccessibleName( i_rTitle );
+ m_aVisualization->SetAccessibleDescription( i_rTitle );
}
-
ToolPanelDrawer::~ToolPanelDrawer()
{
+ disposeOnce();
}
+ void ToolPanelDrawer::dispose()
+ {
+ m_aVisualization.disposeAndClear();
+ vcl::Window::dispose();
+ }
long ToolPanelDrawer::GetPreferredHeightPixel() const
{
@@ -123,7 +123,7 @@ namespace svt
aFocusBox.Left() += 2;
impl_paintFocusIndicator( aFocusBox );
- m_aVisualization.DrawOutDev(
+ m_aVisualization->DrawOutDev(
Point(), GetOutputSizePixel(),
Point(), GetOutputSizePixel(),
*m_pPaintDevice
@@ -239,7 +239,7 @@ namespace svt
void ToolPanelDrawer::Resize()
{
Window::Resize();
- m_aVisualization.SetPosSizePixel( Point(), GetOutputSizePixel() );
+ m_aVisualization->SetPosSizePixel( Point(), GetOutputSizePixel() );
}
@@ -261,7 +261,7 @@ namespace svt
if ( !( i_rEvent.GetFlags() & AllSettingsFlags::STYLE ) )
break;
SetSettings( Application::GetSettings() );
- m_pPaintDevice.reset( new VirtualDevice( *this ) );
+ m_pPaintDevice.reset( VclPtr<VirtualDevice>::Create( *this ) );
// fall through.