summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-13 11:05:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-14 10:59:26 +0200
commitafb0dfc41ebb0a6a96ae31c122c7f97743dc7486 (patch)
tree8f2715ca59fde9fcee015ec69a4e77fe97eaac58 /sw
parent96ef1973d0309cc8a6aa9482f2fe35804f49c414 (diff)
loplugin:useuniqueptr in SwSubFont::DoOnCapitals
Change-Id: Ib5a02c71fa66f46a8e1072c5c0a263e1eb977692 Reviewed-on: https://gerrit.libreoffice.org/60454 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/txtnode/fntcap.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 14a38f7846e7..12be40860253 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -537,8 +537,8 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
aFont.SetProportion( (aFont.GetPropr() * smallCapsPercentage ) / 100 );
nFontCacheId2 = nullptr;
nIndex2 = 0;
- SwFntAccess *pSmallFontAccess = new SwFntAccess( nFontCacheId2, nIndex2, &aFont,
- rDo.GetInf().GetShell() );
+ std::unique_ptr<SwFntAccess> pSmallFontAccess( new SwFntAccess( nFontCacheId2, nIndex2, &aFont,
+ rDo.GetInf().GetShell() ));
SwFntObj *pSmallFont = pSmallFontAccess->Get();
rDo.Init( pBigFont, pSmallFont );
@@ -749,7 +749,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
pLastFont = pOldLast;
pLastFont->SetDevFont( rDo.GetInf().GetShell(), rDo.GetOut() );
- delete pSmallFontAccess;
+ pSmallFontAccess.reset();
rDo.GetInf().SetText(oldText);
rDo.GetInf().SetKanaDiff( nKana );
}
5'>Extend loplugin:external to warn about enumsStephan Bergmann 2019-10-31tdf#125688 speed up load of change-tracking ODSNoel Grandin 2019-02-08o3tl::make_unique -> std::make_unique in tools..xmloffGabor Kelemen 2019-01-22tdf#42949 Fix IWYU warnings in include/xmloff/*Gabor Kelemen 2018-08-22new loplugin:conststringfieldNoel Grandin 2018-01-15More loplugin:cstylecast: xmloffStephan Bergmann 2018-01-12More loplugin:cstylecast: xmloffStephan Bergmann 2017-10-23loplugin:includeform: xmloffStephan Bergmann 2017-09-22ofz: don't leak in face of exceptionsCaolán McNamara 2017-03-30remove type decorations on char literalsJochen Nitschke 2017-03-13templatize SvXMLEnumMapEntryNoel Grandin