summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-17 13:51:33 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-17 19:58:30 +0100
commit85b01322b6384ae13818c22659b99bfcc94e06fe (patch)
treed69cf3ae28f24e7b4075771dd61ca879fe72d0aa /sc/source/ui/dbgui
parentd8ebd9044177e1269c8c81c4c0e3ff53d875247a (diff)
Fix SfxTabPage creation to use VclPtr.
Change-Id: Ia0e8b666daec7b5eaba119c758b9ca1ec8276128
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx13
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx18
-rw-r--r--sc/source/ui/dbgui/validate.cxx16
3 files changed, 23 insertions, 24 deletions
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 30ce19c1ab29..6622eae7cea9 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -142,10 +142,10 @@ void ScTabPageSortFields::Init()
}
}
-SfxTabPage* ScTabPageSortFields::Create( vcl::Window* pParent,
- const SfxItemSet* rArgSet )
+VclPtr<SfxTabPage> ScTabPageSortFields::Create( vcl::Window* pParent,
+ const SfxItemSet* rArgSet )
{
- return ( new ScTabPageSortFields( pParent, *rArgSet ) );
+ return VclPtr<ScTabPageSortFields>::Create( pParent, *rArgSet );
}
void ScTabPageSortFields::Reset( const SfxItemSet* /* rArgSet */ )
@@ -635,11 +635,10 @@ void ScTabPageSortOptions::Init()
m_pLbLanguage->InsertLanguage( LANGUAGE_SYSTEM );
}
-SfxTabPage* ScTabPageSortOptions::Create(
- vcl::Window* pParent,
- const SfxItemSet* rArgSet )
+VclPtr<SfxTabPage> ScTabPageSortOptions::Create( vcl::Window* pParent,
+ const SfxItemSet* rArgSet )
{
- return ( new ScTabPageSortOptions( pParent, *rArgSet ) );
+ return VclPtr<ScTabPageSortOptions>::Create( pParent, *rArgSet );
}
void ScTabPageSortOptions::Reset( const SfxItemSet* /* rArgSet */ )
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index cc8c5608a82f..e3d0af4f502e 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -385,17 +385,17 @@ IMPL_LINK( ScTpSubTotalGroup, CheckHdl, void *, pLb )
// Derived Group TabPages:
-SfxTabPage* ScTpSubTotalGroup1::Create( vcl::Window* pParent,
+VclPtr<SfxTabPage> ScTpSubTotalGroup1::Create( vcl::Window* pParent,
const SfxItemSet* rArgSet )
- { return ( new ScTpSubTotalGroup1( pParent, *rArgSet ) ); }
+ { return VclPtr<SfxTabPage>( new ScTpSubTotalGroup1( pParent, *rArgSet ), SAL_NO_ACQUIRE ); }
-SfxTabPage* ScTpSubTotalGroup2::Create( vcl::Window* pParent,
+VclPtr<SfxTabPage> ScTpSubTotalGroup2::Create( vcl::Window* pParent,
const SfxItemSet* rArgSet )
- { return ( new ScTpSubTotalGroup2( pParent, *rArgSet ) ); }
+ { return VclPtr<SfxTabPage>( new ScTpSubTotalGroup2( pParent, *rArgSet ), SAL_NO_ACQUIRE ); }
-SfxTabPage* ScTpSubTotalGroup3::Create( vcl::Window* pParent,
+VclPtr<SfxTabPage> ScTpSubTotalGroup3::Create( vcl::Window* pParent,
const SfxItemSet* rArgSet )
- { return ( new ScTpSubTotalGroup3( pParent, *rArgSet ) ); }
+ { return VclPtr<SfxTabPage>( new ScTpSubTotalGroup3( pParent, *rArgSet ), SAL_NO_ACQUIRE ); }
ScTpSubTotalGroup1::ScTpSubTotalGroup1( vcl::Window* pParent, const SfxItemSet& rArgSet ) :
ScTpSubTotalGroup( pParent, rArgSet )
@@ -484,10 +484,10 @@ void ScTpSubTotalOptions::Init()
FillUserSortListBox();
}
-SfxTabPage* ScTpSubTotalOptions::Create( vcl::Window* pParent,
- const SfxItemSet* rArgSet )
+VclPtr<SfxTabPage> ScTpSubTotalOptions::Create( vcl::Window* pParent,
+ const SfxItemSet* rArgSet )
{
- return ( new ScTpSubTotalOptions( pParent, *rArgSet ) );
+ return VclPtr<SfxTabPage>( new ScTpSubTotalOptions( pParent, *rArgSet ), SAL_NO_ACQUIRE );
}
void ScTpSubTotalOptions::Reset( const SfxItemSet* /* rArgSet */ )
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 7336e07edc79..4a8d99249cf5 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -404,9 +404,9 @@ void ScTPValidationValue::Init()
CheckHdl( NULL );
}
-SfxTabPage* ScTPValidationValue::Create( vcl::Window* pParent, const SfxItemSet* rArgSet )
+VclPtr<SfxTabPage> ScTPValidationValue::Create( vcl::Window* pParent, const SfxItemSet* rArgSet )
{
- return( new ScTPValidationValue( pParent, *rArgSet ) );
+ return VclPtr<SfxTabPage>(new ScTPValidationValue( pParent, *rArgSet ), SAL_NO_ACQUIRE);
}
void ScTPValidationValue::Reset( const SfxItemSet* rArgSet )
@@ -703,10 +703,10 @@ void ScTPValidationHelp::Init()
pTsbHelp->EnableTriState( false );
}
-SfxTabPage* ScTPValidationHelp::Create( vcl::Window* pParent,
- const SfxItemSet* rArgSet )
+VclPtr<SfxTabPage> ScTPValidationHelp::Create( vcl::Window* pParent,
+ const SfxItemSet* rArgSet )
{
- return ( new ScTPValidationHelp( pParent, *rArgSet ) );
+ return VclPtr<ScTPValidationHelp>::Create( pParent, *rArgSet );
}
void ScTPValidationHelp::Reset( const SfxItemSet* rArgSet )
@@ -785,10 +785,10 @@ void ScTPValidationError::Init()
SelectActionHdl( NULL );
}
-SfxTabPage* ScTPValidationError::Create( vcl::Window* pParent,
- const SfxItemSet* rArgSet )
+VclPtr<SfxTabPage> ScTPValidationError::Create( vcl::Window* pParent,
+ const SfxItemSet* rArgSet )
{
- return ( new ScTPValidationError( pParent, *rArgSet ) );
+ return VclPtr<ScTPValidationError>::Create( pParent, *rArgSet );
}
void ScTPValidationError::Reset( const SfxItemSet* rArgSet )