[Libreoffice-commits] core.git: xmloff/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Oct 4 06:16:33 UTC 2018
xmloff/source/transform/TransformerBase.cxx | 6 +++---
xmloff/source/transform/TransformerContext.hxx | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit b8767d980898d346d9a8a2cc1cbfb040bfc1851a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Oct 3 15:35:29 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Oct 4 08:16:06 2018 +0200
pass SvXMLNamespaceMap around using std::unique_ptr
Change-Id: Ia5ae67678a508e3df81e72cb84993491e222c528
Reviewed-on: https://gerrit.libreoffice.org/61307
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx
index 148230a179b1..03ddddb3f738 100644
--- a/xmloff/source/transform/TransformerBase.cxx
+++ b/xmloff/source/transform/TransformerBase.cxx
@@ -282,7 +282,7 @@ void SAL_CALL XMLTransformerBase::startElement( const OUString& rName,
// Remember old namespace map.
if( pRewindMap )
- xContext->PutRewindMap( pRewindMap.release() );
+ xContext->PutRewindMap( std::move(pRewindMap) );
// Push context on stack.
m_vContexts.push_back( xContext );
@@ -314,7 +314,7 @@ rName
m_vContexts.pop_back();
// Get a namespace map to rewind.
- SvXMLNamespaceMap *pRewindMap = xContext->TakeRewindMap();
+ std::unique_ptr<SvXMLNamespaceMap> pRewindMap = xContext->TakeRewindMap();
// Delete the current context.
xContext = nullptr;
@@ -322,7 +322,7 @@ rName
// Rewind a namespace map.
if( pRewindMap )
{
- m_pNamespaceMap.reset( pRewindMap );
+ m_pNamespaceMap = std::move( pRewindMap );
}
}
}
diff --git a/xmloff/source/transform/TransformerContext.hxx b/xmloff/source/transform/TransformerContext.hxx
index 0a2446f252d4..fe390630a63d 100644
--- a/xmloff/source/transform/TransformerContext.hxx
+++ b/xmloff/source/transform/TransformerContext.hxx
@@ -41,8 +41,8 @@ class XMLTransformerContext : public ::salhelper::SimpleReferenceObject
std::unique_ptr<SvXMLNamespaceMap> m_xRewindMap;
- SvXMLNamespaceMap *TakeRewindMap() { return m_xRewindMap.release(); }
- void PutRewindMap( SvXMLNamespaceMap *p ) { m_xRewindMap.reset(p); }
+ std::unique_ptr<SvXMLNamespaceMap> TakeRewindMap() { return std::move(m_xRewindMap); }
+ void PutRewindMap( std::unique_ptr<SvXMLNamespaceMap> p ) { m_xRewindMap = std::move(p); }
protected:
More information about the Libreoffice-commits
mailing list