summaryrefslogtreecommitdiffstats
path: root/lotuswordpro/source/filter/lwpstory.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-03 11:36:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-03 12:38:46 +0200
commit86e54f2d757fe300ba634cdcbf0ee8a589dbc2ae (patch)
tree691ebc93098a0421dcf7f93fc07df3a06b6a879c /lotuswordpro/source/filter/lwpstory.cxx
parentofz#7244 Integer overflow (diff)
downloadcore-86e54f2d757fe300ba634cdcbf0ee8a589dbc2ae.tar.gz
core-86e54f2d757fe300ba634cdcbf0ee8a589dbc2ae.zip
loplugin:useuniqueptr in XFStyleContainer
Change-Id: I0a9765ab4107a534f211e3531f7948516f1a0c02 Reviewed-on: https://gerrit.libreoffice.org/52297 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lotuswordpro/source/filter/lwpstory.cxx')
-rw-r--r--lotuswordpro/source/filter/lwpstory.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index 1911229f3192..320400ea01e5 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -466,11 +466,11 @@ OUString LwpStory::RegisterFirstFribStyle()
XFTextStyle* pBaseStyle = pXFStyleManager->FindTextStyle(pFirstFrib->GetStyleName());
if (pBaseStyle == nullptr)
return OUString();
- XFTextStyle* pStyle = new XFTextStyle;
+ std::unique_ptr<XFTextStyle> pStyle(new XFTextStyle);
*pStyle = *pBaseStyle;
OUString sName = "Ruby" + pFirstFrib->GetStyleName();
pStyle->SetStyleName(sName);
- pXFStyleManager->AddStyle(pStyle);
+ pXFStyleManager->AddStyle(std::move(pStyle));
return sName;
}