summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-03 10:38:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-04 08:36:21 +0200
commit13eb18a3874fe2bfdba4b93e8035494fd83563bf (patch)
tree7d5970bee2e70ce67e64b6a5128d34b6f2741835 /sc/source/ui/view
parenta618f06d1f6c480d46eb0630f82e25963c654a35 (diff)
loplugin:useuniqueptr in ScOutputData
Change-Id: Ic3b8802262910502cc2f7b638e41e0e865c03f6c Reviewed-on: https://gerrit.libreoffice.org/56908 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/output.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 842f42212778..e6549bdd3427 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -220,9 +220,6 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
ScOutputData::~ScOutputData()
{
- delete pValueColor;
- delete pTextColor;
- delete pFormulaColor;
}
void ScOutputData::SetSpellCheckContext( const sc::SpellCheckContext* pCxt )
@@ -295,9 +292,9 @@ void ScOutputData::SetSyntaxMode( bool bNewMode )
if ( !pValueColor )
{
const svtools::ColorConfig& rColorCfg = SC_MOD()->GetColorConfig();
- pValueColor = new Color( rColorCfg.GetColorValue( svtools::CALCVALUE ).nColor );
- pTextColor = new Color( rColorCfg.GetColorValue( svtools::CALCTEXT ).nColor );
- pFormulaColor = new Color( rColorCfg.GetColorValue( svtools::CALCFORMULA ).nColor );
+ pValueColor.reset( new Color( rColorCfg.GetColorValue( svtools::CALCVALUE ).nColor ) );
+ pTextColor.reset( new Color( rColorCfg.GetColorValue( svtools::CALCTEXT ).nColor ) );
+ pFormulaColor.reset( new Color( rColorCfg.GetColorValue( svtools::CALCFORMULA ).nColor ) );
}
}