summaryrefslogtreecommitdiff
path: root/sd/source/ui/sidebar/NavigatorWrapper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/sidebar/NavigatorWrapper.cxx')
-rw-r--r--sd/source/ui/sidebar/NavigatorWrapper.cxx25
1 files changed, 16 insertions, 9 deletions
diff --git a/sd/source/ui/sidebar/NavigatorWrapper.cxx b/sd/source/ui/sidebar/NavigatorWrapper.cxx
index 6df0a2e01aa6..376d22b9152a 100644
--- a/sd/source/ui/sidebar/NavigatorWrapper.cxx
+++ b/sd/source/ui/sidebar/NavigatorWrapper.cxx
@@ -33,27 +33,34 @@ NavigatorWrapper::NavigatorWrapper (
SfxBindings* pBindings)
: Control(pParent, 0),
mrViewShellBase(rViewShellBase),
- maNavigator(
+ maNavigator(VclPtr<SdNavigatorWin>::Create(
this,
- NULL,
+ (::sd::NavigatorChildWindow*)NULL,
SdResId(FLT_NAVIGATOR),
pBindings,
- ::boost::bind(&NavigatorWrapper::UpdateNavigator, this))
+ ::boost::bind(&NavigatorWrapper::UpdateNavigator, this)))
{
- maNavigator.SetPosSizePixel(
+ maNavigator->SetPosSizePixel(
Point(0,0),
GetSizePixel());
- maNavigator.SetBackground(sfx2::sidebar::Theme::GetWallpaper(sfx2::sidebar::Theme::Paint_PanelBackground));
- maNavigator.Show();
+ maNavigator->SetBackground(sfx2::sidebar::Theme::GetWallpaper(sfx2::sidebar::Theme::Paint_PanelBackground));
+ maNavigator->Show();
}
NavigatorWrapper::~NavigatorWrapper()
{
+ disposeOnce();
+}
+
+void NavigatorWrapper::dispose()
+{
+ maNavigator.disposeAndClear();
+ Control::dispose();
}
void NavigatorWrapper::Resize()
{
- maNavigator.SetSizePixel(GetSizePixel());
+ maNavigator->SetSizePixel(GetSizePixel());
}
css::ui::LayoutSize NavigatorWrapper::GetHeightForWidth (const sal_Int32 nWidth)
@@ -65,12 +72,12 @@ css::ui::LayoutSize NavigatorWrapper::GetHeightForWidth (const sal_Int32 nWidth)
void NavigatorWrapper::UpdateNavigator()
{
- maNavigator.InitTreeLB(mrViewShellBase.GetDocument());
+ maNavigator->InitTreeLB(mrViewShellBase.GetDocument());
}
void NavigatorWrapper::GetFocus()
{
- maNavigator.GrabFocus();
+ maNavigator->GrabFocus();
}
} } // end of namespace sd::sidebar