diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-03 11:36:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-03 12:38:46 +0200 |
commit | 86e54f2d757fe300ba634cdcbf0ee8a589dbc2ae (patch) | |
tree | 691ebc93098a0421dcf7f93fc07df3a06b6a879c /lotuswordpro/source/filter/lwpfoundry.cxx | |
parent | 222dc6ef01ae56f9c77d225f96a99a93f841e809 (diff) |
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/lwpfoundry.cxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpfoundry.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwpfoundry.cxx b/lotuswordpro/source/filter/lwpfoundry.cxx index 5f19f8269e51..2f56998ee4b7 100644 --- a/lotuswordpro/source/filter/lwpfoundry.cxx +++ b/lotuswordpro/source/filter/lwpfoundry.cxx @@ -506,12 +506,12 @@ VO_PARASTYLE/VO_CHARACTERSTYLE call this method to add its created style to XFSt Prerequisite: pStyle has been created and all properties has been set to it. Return the XFStyle* added by XFStyleManager */ -void LwpStyleManager::AddStyle(LwpObjectID styleObjID, IXFStyle* pStyle) +void LwpStyleManager::AddStyle(LwpObjectID styleObjID, std::unique_ptr<IXFStyle> pNewStyle) { - assert(pStyle); + assert(pNewStyle); //pStyle may change if same style is found in XFStyleManager XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); - pStyle = pXFStyleManager->AddStyle(pStyle).m_pStyle; + auto pStyle = pXFStyleManager->AddStyle(std::move(pNewStyle)).m_pStyle; m_StyleList.emplace(styleObjID, pStyle); } |