summaryrefslogtreecommitdiff
path: root/lotuswordpro/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-22 10:35:18 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-22 17:48:23 +0100
commit4829542997ddd3f32a834b460a077bbe2ffbdf95 (patch)
treedb4349d9cd37f4e373735d5230529a6687aaaba6 /lotuswordpro/source
parent9b679d3f627023bbe2859258fe0ad909e23d0feb (diff)
ofz#7063 ensure lifecycle
Change-Id: I18d62bc3bd409ca65c85ea47e8d5b3930481edf9 Reviewed-on: https://gerrit.libreoffice.org/51731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r--lotuswordpro/source/filter/lwpbookmarkmgr.cxx29
1 files changed, 13 insertions, 16 deletions
diff --git a/lotuswordpro/source/filter/lwpbookmarkmgr.cxx b/lotuswordpro/source/filter/lwpbookmarkmgr.cxx
index fdfed20edf6c..3ce1ef05355e 100644
--- a/lotuswordpro/source/filter/lwpbookmarkmgr.cxx
+++ b/lotuswordpro/source/filter/lwpbookmarkmgr.cxx
@@ -57,44 +57,41 @@
void LwpBookmarkMgr::AddXFBookmarkStart(const OUString& sName,XFBookmarkStart* pMark)
{
- std::map<OUString,XFBookmarkStart*>::iterator iter;
- iter = m_MapStart.find(sName);
+ auto iter = m_MapStart.find(sName);
if (iter == m_MapStart.end())//not find
{
m_MapStart[sName] = pMark;
}
else //have exist the same bookmark name
{
- XFBookmarkStart* pFind = iter->second;
- OUString totalName = pFind->GetDivision() + ":";
- totalName += pFind->GetName();
- pFind->SetName(totalName);
- m_MapStart[totalName] = pFind;
+ auto xFind = iter->second;
+ OUString totalName = xFind->GetDivision() + ":";
+ totalName += xFind->GetName();
+ xFind->SetName(totalName);
+ m_MapStart[totalName] = xFind;
m_MapStart[sName] = pMark;
}
}
void LwpBookmarkMgr::AddXFBookmarkEnd(const OUString& sName,XFBookmarkEnd* pMark)
{
- std::map<OUString,XFBookmarkEnd*>::iterator iter;
- iter = m_MapEnd.find(sName);
+ auto iter = m_MapEnd.find(sName);
if (iter == m_MapEnd.end())//not find
{
m_MapEnd[sName] = pMark;
}
else //have exist the same bookmark name
{
- XFBookmarkEnd* pFind = iter->second;
- OUString totalName = pFind->GetDivision() + ":";
- totalName += pFind->GetName();
- pFind->SetName(totalName);
- m_MapEnd[totalName] = pFind;
+ auto xFind = iter->second;
+ OUString totalName = xFind->GetDivision() + ":";
+ totalName += xFind->GetName();
+ xFind->SetName(totalName);
+ m_MapEnd[totalName] = xFind;
m_MapEnd[sName] = pMark;
}
}
bool LwpBookmarkMgr::FindBookmark(const OUString& sName)
{
- std::map<OUString,XFBookmarkStart*>::iterator iter;
- iter = m_MapStart.find(sName);
+ auto iter = m_MapStart.find(sName);
return iter != m_MapStart.end();
}