summaryrefslogtreecommitdiff
path: root/sc/source/ui/optdlg
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-19 12:08:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-20 08:59:44 +0200
commit8c63897b833df95b2e03b72f62fb180bdcf680ba (patch)
tree07a809e6cde4cb9ab389e51c54c940b423329c20 /sc/source/ui/optdlg
parenta0f0863dc7d251f6112d59c34e8851ee41ba47d8 (diff)
loplugin:useuniqueptr in ScTpContentOptions
Change-Id: If19da8d2d7ffe1d245e67466fa55166b76774013 Reviewed-on: https://gerrit.libreoffice.org/57752 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/optdlg')
-rw-r--r--sc/source/ui/optdlg/tpview.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 94d6f9b07a0e..0fca706f38e2 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -40,8 +40,7 @@
ScTpContentOptions::ScTpContentOptions( vcl::Window* pParent,
const SfxItemSet& rArgSet ) :
- SfxTabPage(pParent, "TpViewPage", "modules/scalc/ui/tpviewpage.ui", &rArgSet),
- pLocalOptions(nullptr)
+ SfxTabPage(pParent, "TpViewPage", "modules/scalc/ui/tpviewpage.ui", &rArgSet)
{
get(pGridLB,"grid");
get(pColorFT,"color_label");
@@ -103,7 +102,7 @@ ScTpContentOptions::~ScTpContentOptions()
void ScTpContentOptions::dispose()
{
- delete pLocalOptions;
+ pLocalOptions.reset();
pGridLB.clear();
pColorFT.clear();
pColorLB.clear();
@@ -184,10 +183,10 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet )
{
const SfxPoolItem* pItem;
if(SfxItemState::SET == rCoreSet->GetItemState(SID_SCVIEWOPTIONS, false , &pItem))
- pLocalOptions = new ScViewOptions(
- static_cast<const ScTpViewItem*>(pItem)->GetViewOptions() );
+ pLocalOptions.reset( new ScViewOptions(
+ static_cast<const ScTpViewItem*>(pItem)->GetViewOptions() ) );
else
- pLocalOptions = new ScViewOptions;
+ pLocalOptions.reset( new ScViewOptions );
pFormulaCB ->Check(pLocalOptions->GetOption(VOPT_FORMULAS));
pNilCB ->Check(pLocalOptions->GetOption(VOPT_NULLVALS));
pAnnotCB ->Check(pLocalOptions->GetOption(VOPT_NOTES));