summaryrefslogtreecommitdiff
path: root/sc/source/ui/optdlg
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-03 12:02:36 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-06-06 20:26:54 +0000
commit3f72218069f6f78a3ba21c40f00240d78cbe65c7 (patch)
treebd0781953ae45d3dcbfa3994641e755f2c5c0f73 /sc/source/ui/optdlg
parent87ac0b1e75a880a68ecb748bd4b34ae5a3d2ae98 (diff)
Apply new VclPtr clang plugin to catch potential problems.
Omit the plugin, and sw's FrameControlsManager for now. Change-Id: Ifb98a2e6e03a9d099efc1668305b96bd9142ca5f Reviewed-on: https://gerrit.libreoffice.org/16117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc/source/ui/optdlg')
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx6
-rw-r--r--sc/source/ui/optdlg/tpcompatibility.cxx2
-rw-r--r--sc/source/ui/optdlg/tpdefaults.cxx2
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx2
-rw-r--r--sc/source/ui/optdlg/tpprint.cxx2
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx8
-rw-r--r--sc/source/ui/optdlg/tpview.cxx4
7 files changed, 13 insertions, 13 deletions
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index 74cbf8878709..a3fad625889e 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -103,7 +103,7 @@ void ScTpCalcOptions::Init()
VclPtr<SfxTabPage> ScTpCalcOptions::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
- return VclPtr<SfxTabPage>( new ScTpCalcOptions ( pParent, *rAttrSet ), SAL_NO_ACQUIRE );
+ return VclPtr<ScTpCalcOptions>::Create( pParent, *rAttrSet );
}
void ScTpCalcOptions::Reset( const SfxItemSet* /* rCoreAttrs */ )
@@ -192,9 +192,9 @@ SfxTabPage::sfxpg ScTpCalcOptions::DeactivatePage( SfxItemSet* pSetP )
if ( nReturn == KEEP_PAGE )
{
- MessageDialog( this,
+ ScopedVclPtr<MessageDialog>::Create( this,
ScGlobal::GetRscString( STR_INVALID_EPS )
- ).Execute();
+ )->Execute();
m_pEdEps->GrabFocus();
}
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx
index ca828292c7db..3c83b980b7aa 100644
--- a/sc/source/ui/optdlg/tpcompatibility.cxx
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -34,7 +34,7 @@ void ScTpCompatOptions::dispose()
VclPtr<SfxTabPage> ScTpCompatOptions::Create(vcl::Window *pParent, const SfxItemSet *rCoreAttrs)
{
- return VclPtr<SfxTabPage>(new ScTpCompatOptions(pParent, *rCoreAttrs), SAL_NO_ACQUIRE);
+ return VclPtr<ScTpCompatOptions>::Create(pParent, *rCoreAttrs);
}
bool ScTpCompatOptions::FillItemSet(SfxItemSet *rCoreAttrs)
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index 79b8475a5145..a2929f77eb3a 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -42,7 +42,7 @@ void ScTpDefaultsOptions::dispose()
VclPtr<SfxTabPage> ScTpDefaultsOptions::Create(vcl::Window *pParent, const SfxItemSet *rCoreAttrs)
{
- return VclPtr<SfxTabPage>(new ScTpDefaultsOptions(pParent, *rCoreAttrs), SAL_NO_ACQUIRE);
+ return VclPtr<ScTpDefaultsOptions>::Create(pParent, *rCoreAttrs);
}
bool ScTpDefaultsOptions::FillItemSet(SfxItemSet *rCoreSet)
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 3e7feb1ff2f8..2e4643e5d055 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -239,7 +239,7 @@ IMPL_LINK( ScTpFormulaOptions, SepEditOnFocusHdl, Edit*, pEdit )
VclPtr<SfxTabPage> ScTpFormulaOptions::Create(vcl::Window* pParent, const SfxItemSet* rCoreSet)
{
- return VclPtr<SfxTabPage>(new ScTpFormulaOptions(pParent, *rCoreSet), SAL_NO_ACQUIRE);
+ return VclPtr<ScTpFormulaOptions>::Create(pParent, *rCoreSet);
}
bool ScTpFormulaOptions::FillItemSet(SfxItemSet* rCoreSet)
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index e38c830431d0..6ee0b8945925 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -54,7 +54,7 @@ void ScTpPrintOptions::dispose()
VclPtr<SfxTabPage> ScTpPrintOptions::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
- return VclPtr<SfxTabPage>(new ScTpPrintOptions( pParent, *rAttrSet ), SAL_NO_ACQUIRE);
+ return VclPtr<ScTpPrintOptions>::Create( pParent, *rAttrSet );
}
SfxTabPage::sfxpg ScTpPrintOptions::DeactivatePage( SfxItemSet* pSetP )
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index d1fab49c63cb..3f0e9e8daf68 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -155,7 +155,7 @@ void ScTpUserLists::Init()
VclPtr<SfxTabPage> ScTpUserLists::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
- return VclPtr<SfxTabPage>( new ScTpUserLists( pParent, *rAttrSet ), SAL_NO_ACQUIRE );
+ return VclPtr<ScTpUserLists>::Create( pParent, *rAttrSet );
}
void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs )
@@ -361,7 +361,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
if ( (nStartCol != nEndCol) && (nStartRow != nEndRow) )
{
- nCellDir = ScColOrRowDlg( this, aStrCopyList, aStrCopyFrom ).Execute();
+ nCellDir = ScopedVclPtr<ScColOrRowDlg>::Create( this, aStrCopyList, aStrCopyFrom )->Execute();
}
else if ( nStartCol != nEndCol )
nCellDir = SCRET_ROWS;
@@ -701,9 +701,9 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
}
else
{
- MessageDialog(this,
+ ScopedVclPtr<MessageDialog>::Create(this,
ScGlobal::GetRscString( STR_INVALID_TABREF )
- ).Execute();
+ )->Execute();
mpEdCopyFrom->GrabFocus();
mpEdCopyFrom->SetSelection( Selection( 0, SELECTION_MAX ) );
}
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index f1a475fcb60c..c1ba49adc89d 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -128,7 +128,7 @@ void ScTpContentOptions::dispose()
VclPtr<SfxTabPage> ScTpContentOptions::Create( vcl::Window* pParent,
const SfxItemSet* rCoreSet )
{
- return VclPtr<SfxTabPage>( new ScTpContentOptions (pParent, *rCoreSet), SAL_NO_ACQUIRE );
+ return VclPtr<ScTpContentOptions>::Create(pParent, *rCoreSet);
}
bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet )
@@ -460,7 +460,7 @@ void ScTpLayoutOptions::dispose()
VclPtr<SfxTabPage> ScTpLayoutOptions::Create( vcl::Window* pParent,
const SfxItemSet* rCoreSet )
{
- VclPtr<ScTpLayoutOptions> pNew( new ScTpLayoutOptions( pParent, *rCoreSet), SAL_NO_ACQUIRE );
+ VclPtrInstance<ScTpLayoutOptions> pNew( pParent, *rCoreSet );
ScDocShell* pDocSh = PTR_CAST(ScDocShell,SfxObjectShell::Current());
if(pDocSh!=NULL)