summaryrefslogtreecommitdiff
path: root/svx/source/gallery2
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r--svx/source/gallery2/GalleryControl.cxx31
-rw-r--r--svx/source/gallery2/galbrws1.cxx34
-rw-r--r--svx/source/gallery2/galbrws1.hxx7
-rw-r--r--svx/source/gallery2/galbrws2.cxx140
-rw-r--r--svx/source/gallery2/galctrl.cxx8
-rw-r--r--svx/source/gallery2/galobj.cxx4
-rw-r--r--svx/source/gallery2/galtheme.cxx6
7 files changed, 117 insertions, 113 deletions
diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx
index 69474d0eb144..ff694bdd7a28 100644
--- a/svx/source/gallery2/GalleryControl.cxx
+++ b/svx/source/gallery2/GalleryControl.cxx
@@ -40,16 +40,18 @@ GalleryControl::GalleryControl (
vcl::Window* pParentWindow)
: Window(pParentWindow, WB_SIZEABLE|WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE),
mpGallery (Gallery::GetGalleryInstance()),
- mpSplitter(new GallerySplitter(
+ mpSplitter(VclPtr<GallerySplitter>::Create(
+
this,
WB_HSCROLL,
::boost::bind(&GalleryControl::InitSettings, this))),
- mpBrowser1(new GalleryBrowser1(
+ mpBrowser1(VclPtr<GalleryBrowser1>::Create(
+
this,
mpGallery,
::boost::bind(&GalleryControl::GalleryKeyInput,this,_1,_2),
::boost::bind(&GalleryControl::ThemeSelectionHasChanged, this))),
- mpBrowser2(new GalleryBrowser2(this, mpGallery)),
+ mpBrowser2(VclPtr<GalleryBrowser2>::Create(this, mpGallery)),
maLastSize(GetOutputSizePixel()),
mbIsInitialResize(true)
{
@@ -67,6 +69,15 @@ GalleryControl::GalleryControl (
GalleryControl::~GalleryControl()
{
+ disposeOnce();
+}
+
+void GalleryControl::dispose()
+{
+ mpSplitter.disposeAndClear();
+ mpBrowser1.disposeAndClear();
+ mpBrowser2.disposeAndClear();
+ vcl::Window::dispose();
}
void GalleryControl::InitSettings()
@@ -181,19 +192,19 @@ bool GalleryControl::GalleryKeyInput( const KeyEvent& rKEvt, vcl::Window* )
if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
mpBrowser2->GetViewWindow()->GrabFocus();
else if( mpBrowser2->GetViewWindow()->HasFocus() )
- mpBrowser2->maViewBox.GrabFocus();
- else if( mpBrowser2->maViewBox.HasFocus() )
- mpBrowser1->maNewTheme.GrabFocus();
+ mpBrowser2->maViewBox->GrabFocus();
+ else if( mpBrowser2->maViewBox->HasFocus() )
+ mpBrowser1->maNewTheme->GrabFocus();
else
mpBrowser1->mpThemes->GrabFocus();
}
else
{
if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
- mpBrowser1->maNewTheme.GrabFocus();
- else if( mpBrowser1->maNewTheme.HasFocus() )
- mpBrowser2->maViewBox.GrabFocus();
- else if( mpBrowser2->maViewBox.HasFocus() )
+ mpBrowser1->maNewTheme->GrabFocus();
+ else if( mpBrowser1->maNewTheme->HasFocus() )
+ mpBrowser2->maViewBox->GrabFocus();
+ else if( mpBrowser2->maViewBox->HasFocus() )
mpBrowser2->GetViewWindow()->GrabFocus();
else
mpBrowser1->mpThemes->GrabFocus();
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 7d33453facd8..48cbfc6338cd 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -51,10 +51,6 @@ GalleryButton::GalleryButton( GalleryBrowser1* pParent, WinBits nWinBits ) :
{
}
-GalleryButton::~GalleryButton()
-{
-}
-
void GalleryButton::KeyInput( const KeyEvent& rKEvt )
{
if( !static_cast< GalleryBrowser1* >( GetParent() )->KeyInput( rKEvt, this ) )
@@ -69,10 +65,6 @@ GalleryThemeListBox::GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWin
InitSettings();
}
-GalleryThemeListBox::~GalleryThemeListBox()
-{
-}
-
void GalleryThemeListBox::InitSettings()
{
SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
@@ -119,8 +111,8 @@ GalleryBrowser1::GalleryBrowser1(
const ::boost::function<void()>& rThemeSlectionHandler)
:
Control ( pParent, WB_TABSTOP ),
- maNewTheme ( this, WB_3DLOOK ),
- mpThemes ( new GalleryThemeListBox( this, WB_TABSTOP | WB_3DLOOK | WB_BORDER | WB_HSCROLL | WB_VSCROLL | WB_AUTOHSCROLL | WB_SORT ) ),
+ maNewTheme ( VclPtr<GalleryButton>::Create(this, WB_3DLOOK) ),
+ mpThemes ( VclPtr<GalleryThemeListBox>::Create( this, WB_TABSTOP | WB_3DLOOK | WB_BORDER | WB_HSCROLL | WB_VSCROLL | WB_AUTOHSCROLL | WB_SORT ) ),
mpGallery ( pGallery ),
mpExchangeData ( new ExchangeData ),
mpThemePropsDlgItemSet( NULL ),
@@ -132,13 +124,13 @@ GalleryBrowser1::GalleryBrowser1(
{
StartListening( *mpGallery );
- maNewTheme.SetHelpId( HID_GALLERY_NEWTHEME );
- maNewTheme.SetText( GAL_RESSTR(RID_SVXSTR_GALLERY_CREATETHEME));
- maNewTheme.SetClickHdl( LINK( this, GalleryBrowser1, ClickNewThemeHdl ) );
+ maNewTheme->SetHelpId( HID_GALLERY_NEWTHEME );
+ maNewTheme->SetText( GAL_RESSTR(RID_SVXSTR_GALLERY_CREATETHEME));
+ maNewTheme->SetClickHdl( LINK( this, GalleryBrowser1, ClickNewThemeHdl ) );
// disable creation of new themes if a writable directory is not available
if( mpGallery->GetUserURL().GetProtocol() == INetProtocol::NotValid )
- maNewTheme.Disable();
+ maNewTheme->Disable();
mpThemes->SetHelpId( HID_GALLERY_THEMELIST );
mpThemes->SetSelectHdl( LINK( this, GalleryBrowser1, SelectThemeHdl ) );
@@ -148,17 +140,23 @@ GalleryBrowser1::GalleryBrowser1(
ImplInsertThemeEntry( mpGallery->GetThemeInfo( i ) );
ImplAdjustControls();
- maNewTheme.Show( true );
+ maNewTheme->Show( true );
mpThemes->Show( true );
}
GalleryBrowser1::~GalleryBrowser1()
{
+ disposeOnce();
+}
+
+void GalleryBrowser1::dispose()
+{
EndListening( *mpGallery );
- delete mpThemes;
- mpThemes = NULL;
+ mpThemes.disposeAndClear();
delete mpExchangeData;
mpExchangeData = NULL;
+ maNewTheme.disposeAndClear();
+ Control::dispose();
}
sal_uIntPtr GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEntry )
@@ -190,7 +188,7 @@ void GalleryBrowser1::ImplAdjustControls()
const long nNewThemeHeight = LogicToPixel( Size( 0, 14 ), MAP_APPFONT ).Height();
const long nStartY = nNewThemeHeight + 4;
- maNewTheme.SetPosSizePixel( Point(),
+ maNewTheme->SetPosSizePixel( Point(),
Size( aOutSize.Width(), nNewThemeHeight ) );
mpThemes->SetPosSizePixel( Point( 0, nStartY ),
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index 33fd25eb3b35..562b2fab7110 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -41,7 +41,6 @@ private:
public:
GalleryButton( GalleryBrowser1* pParent, WinBits nWinBits );
- virtual ~GalleryButton();
};
// - GalleryThemeListBox -
@@ -58,7 +57,6 @@ protected:
public:
GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWinBits );
- virtual ~GalleryThemeListBox();
};
// - GalleryBrowser1 -
@@ -82,8 +80,8 @@ class GalleryBrowser1 : public Control, SfxListener
private:
- GalleryButton maNewTheme;
- GalleryThemeListBox* mpThemes;
+ VclPtr<GalleryButton> maNewTheme;
+ VclPtr<GalleryThemeListBox> mpThemes;
Gallery* mpGallery;
ExchangeData* mpExchangeData;
SfxItemSet* mpThemePropsDlgItemSet;
@@ -127,6 +125,7 @@ public:
const ::boost::function<sal_Bool(const KeyEvent&,Window*)>& rKeyInputHandler,
const ::boost::function<void()>& rThemeSlectionHandler);
virtual ~GalleryBrowser1();
+ virtual void dispose() SAL_OVERRIDE;
void SelectTheme( const OUString& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); }
void SelectTheme( sal_uIntPtr nThemePos ) { mpThemes->SelectEntryPos( (sal_uInt16) nThemePos ); SelectThemeHdl( NULL ); }
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 71bf2ec14aa9..4fadfb888cce 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -110,10 +110,10 @@ class GalleryThemePopup : public ::cppu::WeakImplHelper1< css::frame::XStatusLis
private:
const GalleryTheme* mpTheme;
sal_uIntPtr mnObjectPos;
- bool mbPreview;
+ bool mbPreview;
PopupMenu maPopupMenu;
PopupMenu maBackgroundPopup;
- GalleryBrowser2* mpBrowser;
+ VclPtr<GalleryBrowser2> mpBrowser;
typedef std::map< int, CommandInfo > CommandInfoMap;
CommandInfoMap m_aCommandInfo;
@@ -403,10 +403,6 @@ GalleryToolBox::GalleryToolBox( GalleryBrowser2* pParent ) :
{
}
-GalleryToolBox::~GalleryToolBox()
-{
-}
-
void GalleryToolBox::KeyInput( const KeyEvent& rKEvt )
{
if( !static_cast< GalleryBrowser2* >( GetParent() )->KeyInput( rKEvt, this ) )
@@ -418,12 +414,12 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
Control ( pParent, WB_TABSTOP ),
mpGallery ( pGallery ),
mpCurTheme ( NULL ),
- mpIconView ( new GalleryIconView( this, NULL ) ),
- mpListView ( new GalleryListView( this, NULL ) ),
- mpPreview ( new GalleryPreview(this) ),
- maViewBox ( this ),
- maSeparator ( this, WB_VERT ),
- maInfoBar ( this, WB_LEFT | WB_VCENTER ),
+ mpIconView ( VclPtr<GalleryIconView>::Create( this, nullptr ) ),
+ mpListView ( VclPtr<GalleryListView>::Create( this, nullptr ) ),
+ mpPreview ( VclPtr<GalleryPreview>::Create(this) ),
+ maViewBox ( VclPtr<GalleryToolBox>::Create(this) ),
+ maSeparator ( VclPtr<FixedLine>::Create(this, WB_VERT) ),
+ maInfoBar ( VclPtr<FixedText>::Create(this, WB_LEFT | WB_VCENTER) ),
mnCurActionPos ( 0xffffffff ),
meMode ( GALLERYBROWSERMODE_NONE ),
meLastMode ( GALLERYBROWSERMODE_NONE )
@@ -438,29 +434,29 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
Image aDummyImage;
const Link aSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) );
- vcl::Font aInfoFont( maInfoBar.GetControlFont() );
+ vcl::Font aInfoFont( maInfoBar->GetControlFont() );
maMiscOptions.AddListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) );
- maViewBox.InsertItem( TBX_ID_ICON, aDummyImage );
- maViewBox.SetItemBits( TBX_ID_ICON, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
- maViewBox.SetHelpId( TBX_ID_ICON, HID_GALLERY_ICONVIEW );
- maViewBox.SetQuickHelpText( TBX_ID_ICON, GAL_RESSTR(RID_SVXSTR_GALLERY_ICONVIEW) );
+ maViewBox->InsertItem( TBX_ID_ICON, aDummyImage );
+ maViewBox->SetItemBits( TBX_ID_ICON, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
+ maViewBox->SetHelpId( TBX_ID_ICON, HID_GALLERY_ICONVIEW );
+ maViewBox->SetQuickHelpText( TBX_ID_ICON, GAL_RESSTR(RID_SVXSTR_GALLERY_ICONVIEW) );
- maViewBox.InsertItem( TBX_ID_LIST, aDummyImage );
- maViewBox.SetItemBits( TBX_ID_LIST, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
- maViewBox.SetHelpId( TBX_ID_LIST, HID_GALLERY_LISTVIEW );
- maViewBox.SetQuickHelpText( TBX_ID_LIST, GAL_RESSTR(RID_SVXSTR_GALLERY_LISTVIEW) );
+ maViewBox->InsertItem( TBX_ID_LIST, aDummyImage );
+ maViewBox->SetItemBits( TBX_ID_LIST, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
+ maViewBox->SetHelpId( TBX_ID_LIST, HID_GALLERY_LISTVIEW );
+ maViewBox->SetQuickHelpText( TBX_ID_LIST, GAL_RESSTR(RID_SVXSTR_GALLERY_LISTVIEW) );
MiscHdl( NULL );
- maViewBox.SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) );
- maViewBox.Show();
+ maViewBox->SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) );
+ maViewBox->Show();
mpIconView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS));
mpListView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS));
- maInfoBar.Show();
- maSeparator.Show();
+ maInfoBar->Show();
+ maSeparator->Show();
mpIconView->SetSelectHdl( aSelectHdl );
mpListView->SetSelectHdl( aSelectHdl );
@@ -469,40 +465,48 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
SetMode( ( GALLERYBROWSERMODE_PREVIEW != GalleryBrowser2::meInitMode ) ? GalleryBrowser2::meInitMode : GALLERYBROWSERMODE_ICON );
- if(maInfoBar.GetText().isEmpty())
+ if(maInfoBar->GetText().isEmpty())
mpIconView->SetAccessibleRelationLabeledBy(mpIconView);
else
- mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar);
+ mpIconView->SetAccessibleRelationLabeledBy(maInfoBar.get());
mpIconView->SetAccessibleRelationMemberOf(mpIconView);
}
GalleryBrowser2::~GalleryBrowser2()
{
+ disposeOnce();
+}
+
+void GalleryBrowser2::dispose()
+{
maMiscOptions.RemoveListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) );
- delete mpPreview;
- delete mpListView;
- delete mpIconView;
+ mpPreview.disposeAndClear();
+ mpListView.disposeAndClear();
+ mpIconView.disposeAndClear();
if( mpCurTheme )
mpGallery->ReleaseTheme( mpCurTheme, *this );
-
+ maSeparator.disposeAndClear();
+ maInfoBar.disposeAndClear();
+ maViewBox.disposeAndClear();
+ Control::dispose();
}
void GalleryBrowser2::InitSettings()
{
- vcl::Font aInfoFont( maInfoBar.GetControlFont() );
+ vcl::Font aInfoFont( maInfoBar->GetControlFont() );
aInfoFont.SetWeight( WEIGHT_BOLD );
aInfoFont.SetColor( GALLERY_FG_COLOR );
- maInfoBar.SetControlFont( aInfoFont );
+ maInfoBar->SetControlFont( aInfoFont );
- maInfoBar.SetBackground( Wallpaper( GALLERY_DLG_COLOR ) );
- maInfoBar.SetControlBackground( GALLERY_DLG_COLOR );
+ maInfoBar->SetBackground( Wallpaper( GALLERY_DLG_COLOR ) );
+ maInfoBar->SetControlBackground( GALLERY_DLG_COLOR );
- maSeparator.SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
- maSeparator.SetControlBackground( GALLERY_BG_COLOR );
- maSeparator.SetControlForeground( GALLERY_FG_COLOR );
+ maSeparator->SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
+ maSeparator->SetControlBackground( GALLERY_BG_COLOR );
+ maSeparator->SetControlForeground( GALLERY_FG_COLOR );
}
void GalleryBrowser2::DataChanged( const DataChangedEvent& rDCEvt )
@@ -522,14 +526,14 @@ void GalleryBrowser2::Resize()
mpPreview->Hide();
const Size aOutSize( GetOutputSizePixel() );
- const Size aBoxSize( maViewBox.GetOutputSizePixel() );
+ const Size aBoxSize( maViewBox->GetOutputSizePixel() );
const long nOffset = 2, nSepWidth = 2;
const long nInfoBarX = aBoxSize.Width() + ( nOffset * 3 ) + nSepWidth;
const Point aPt( 0, aBoxSize.Height() + 3 );
const Size aSz( aOutSize.Width(), aOutSize.Height() - aPt.Y() );
- maSeparator.SetPosSizePixel( Point( aBoxSize.Width() + nOffset, 0 ), Size( nSepWidth, aBoxSize.Height() ) );
- maInfoBar.SetPosSizePixel( Point( nInfoBarX, 0 ), Size( aOutSize.Width() - nInfoBarX, aBoxSize.Height() ) );
+ maSeparator->SetPosSizePixel( Point( aBoxSize.Width() + nOffset, 0 ), Size( nSepWidth, aBoxSize.Height() ) );
+ maInfoBar->SetPosSizePixel( Point( nInfoBarX, 0 ), Size( aOutSize.Width() - nInfoBarX, aBoxSize.Height() ) );
mpIconView->SetPosSizePixel( aPt, aSz );
mpListView->SetPosSizePixel( aPt, aSz );
@@ -661,7 +665,7 @@ bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow )
if (pParentControl != NULL)
bRet = pParentControl->GalleryKeyInput(rKEvt, pWindow);
- if( !bRet && !maViewBox.HasFocus() && nItemId && mpCurTheme )
+ if( !bRet && !maViewBox->HasFocus() && nItemId && mpCurTheme )
{
sal_uInt16 nExecuteId = 0;
INetURLObject aURL;
@@ -736,18 +740,18 @@ bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow )
void GalleryBrowser2::SelectTheme( const OUString& rThemeName )
{
- delete mpIconView, mpIconView = NULL;
- delete mpListView, mpListView = NULL;
- delete mpPreview, mpPreview = NULL;
+ mpIconView.disposeAndClear();
+ mpListView.disposeAndClear();
+ mpPreview.disposeAndClear();
if( mpCurTheme )
mpGallery->ReleaseTheme( mpCurTheme, *this );
mpCurTheme = mpGallery->AcquireTheme( rThemeName, *this );
- mpIconView = new GalleryIconView( this, mpCurTheme );
- mpListView = new GalleryListView( this, mpCurTheme );
- mpPreview = new GalleryPreview( this, WB_TABSTOP | WB_BORDER, mpCurTheme );
+ mpIconView = VclPtr<GalleryIconView>::Create( this, mpCurTheme );
+ mpListView = VclPtr<GalleryListView>::Create( this, mpCurTheme );
+ mpPreview = VclPtr<GalleryPreview>::Create( this, WB_TABSTOP | WB_BORDER, mpCurTheme );
mpIconView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS));
mpListView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS));
@@ -764,14 +768,14 @@ void GalleryBrowser2::SelectTheme( const OUString& rThemeName )
Resize();
ImplUpdateViews( 1 );
- maViewBox.EnableItem( TBX_ID_ICON, true );
- maViewBox.EnableItem( TBX_ID_LIST, true );
- maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, true );
+ maViewBox->EnableItem( TBX_ID_ICON, true );
+ maViewBox->EnableItem( TBX_ID_LIST, true );
+ maViewBox->CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, true );
- if(maInfoBar.GetText().isEmpty())
+ if(maInfoBar->GetText().isEmpty())
mpIconView->SetAccessibleRelationLabeledBy(mpIconView);
else
- mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar);
+ mpIconView->SetAccessibleRelationLabeledBy(maInfoBar.get());
mpIconView->SetAccessibleRelationMemberOf(mpIconView);
}
@@ -793,11 +797,11 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
mpIconView->Show();
- maViewBox.EnableItem( TBX_ID_ICON, true );
- maViewBox.EnableItem( TBX_ID_LIST, true );
+ maViewBox->EnableItem( TBX_ID_ICON, true );
+ maViewBox->EnableItem( TBX_ID_LIST, true );
- maViewBox.CheckItem( TBX_ID_ICON, true );
- maViewBox.CheckItem( TBX_ID_LIST, false );
+ maViewBox->CheckItem( TBX_ID_ICON, true );
+ maViewBox->CheckItem( TBX_ID_LIST, false );
}
break;
@@ -811,11 +815,11 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
mpListView->Show();
- maViewBox.EnableItem( TBX_ID_ICON, true );
- maViewBox.EnableItem( TBX_ID_LIST, true );
+ maViewBox->EnableItem( TBX_ID_ICON, true );
+ maViewBox->EnableItem( TBX_ID_LIST, true );
- maViewBox.CheckItem( TBX_ID_ICON, false );
- maViewBox.CheckItem( TBX_ID_LIST, true );
+ maViewBox->CheckItem( TBX_ID_ICON, false );
+ maViewBox->CheckItem( TBX_ID_LIST, true );
}
break;
@@ -841,8 +845,8 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
if( mpCurTheme && mpCurTheme->GetObjectKind( nPos ) == SGA_OBJ_SOUND )
GalleryPreview::PreviewMedia( mpCurTheme->GetObjectURL( nPos ) );
- maViewBox.EnableItem( TBX_ID_ICON, false );
- maViewBox.EnableItem( TBX_ID_LIST, false );
+ maViewBox->EnableItem( TBX_ID_ICON, false );
+ maViewBox->EnableItem( TBX_ID_LIST, false );
}
}
break;
@@ -957,7 +961,7 @@ void GalleryBrowser2::ImplUpdateViews( sal_uInt16 nSelectionId )
void GalleryBrowser2::ImplUpdateInfoBar()
{
if( mpCurTheme )
- maInfoBar.SetText( mpCurTheme->GetName() );
+ maInfoBar->SetText( mpCurTheme->GetName() );
}
sal_uIntPtr GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelPos )
@@ -1337,7 +1341,7 @@ IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox )
IMPL_LINK_NOARG(GalleryBrowser2, MiscHdl)
{
- maViewBox.SetOutStyle( maMiscOptions.GetToolboxStyle() );
+ maViewBox->SetOutStyle( maMiscOptions.GetToolboxStyle() );
BitmapEx aIconBmpEx = BitmapEx( Image( GAL_RES( RID_SVXIMG_GALLERY_VIEW_ICON ) ).GetBitmapEx() );
BitmapEx aListBmpEx = BitmapEx( Image( GAL_RES( RID_SVXIMG_GALLERY_VIEW_LIST ) ).GetBitmapEx() );
@@ -1350,9 +1354,9 @@ IMPL_LINK_NOARG(GalleryBrowser2, MiscHdl)
aListBmpEx.Scale( aLargeSize );
}
- maViewBox.SetItemImage(TBX_ID_ICON, Image(aIconBmpEx));
- maViewBox.SetItemImage(TBX_ID_LIST, Image(aListBmpEx));
- maViewBox.SetSizePixel( maViewBox.CalcWindowSizePixel() );
+ maViewBox->SetItemImage(TBX_ID_ICON, Image(aIconBmpEx));
+ maViewBox->SetItemImage(TBX_ID_LIST, Image(aListBmpEx));
+ maViewBox->SetSizePixel( maViewBox->CalcWindowSizePixel() );
Resize();
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index f2ead34d10fd..3b21ddf2f796 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -288,10 +288,6 @@ GalleryIconView::GalleryIconView( GalleryBrowser2* pParent, GalleryTheme* pTheme
SetItemHeight( S_THUMB + 6 );
}
-GalleryIconView::~GalleryIconView()
-{
-}
-
void GalleryIconView::InitSettings()
{
SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
@@ -431,10 +427,6 @@ GalleryListView::GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme
InsertDataColumn( GALLERY_BRWBOX_TITLE, GAL_RESSTR(RID_SVXSTR_GALLERY_TITLE), 256 );
}
-GalleryListView::~GalleryListView()
-{
-}
-
void GalleryListView::InitSettings()
{
SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 35a35efbd16a..873bbdab54c8 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -484,8 +484,8 @@ bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel )
if(aObjRect.GetWidth() && aObjRect.GetHeight())
{
- VirtualDevice aVDev;
- FmFormView aView(const_cast< FmFormModel* >(&rModel), &aVDev);
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
+ FmFormView aView(const_cast< FmFormModel* >(&rModel), pVDev);
aView.ShowSdrPage(const_cast< FmFormPage* >(pPage));
aView.MarkAllObj();
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index b3e2c39d477a..263af9ffeebb 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -808,9 +808,9 @@ bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, bool bProgre
bRet = true;
else
{
- VirtualDevice aVDev;
- aVDev.SetMapMode( MapMode( MAP_100TH_MM ) );
- FmFormView aView( aModel.GetModel(), &aVDev );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
+ pVDev->SetMapMode( MapMode( MAP_100TH_MM ) );
+ FmFormView aView( aModel.GetModel(), pVDev );
aView.hideMarkHandles();
aView.ShowSdrPage(aView.GetModel()->GetPage(0));