summaryrefslogtreecommitdiff
path: root/include/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-09-16 14:26:50 +0200
committerMichael Stahl <mstahl@redhat.com>2016-09-16 14:33:59 +0200
commitdbf87d2124a0c01014b9e839804455d3be38831f (patch)
tree7698a6eb9def50936fbaf792a0a1acdeda99d6d0 /include/xmloff
parentc480677f5f654ada532dfba21e3d34718c977131 (diff)
coverity#1372990 xmloff: use unique_ptr for RewindMaps
Change-Id: I51e67607d94a465ce39e822f01a0c60efbf1a0f0
Diffstat (limited to 'include/xmloff')
-rw-r--r--include/xmloff/xmlictxt.hxx6
-rw-r--r--include/xmloff/xmlimp.hxx5
2 files changed, 6 insertions, 5 deletions
diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx
index 6e064e293a68..6d2411219d6b 100644
--- a/include/xmloff/xmlictxt.hxx
+++ b/include/xmloff/xmlictxt.hxx
@@ -43,10 +43,10 @@ class XMLOFF_DLLPUBLIC SvXMLImportContext : public ::cppu::WeakImplHelper1< ::cs
sal_uInt16 mnPrefix;
OUString maLocalName;
- std::unique_ptr<SvXMLNamespaceMap> mxRewindMap;
+ std::unique_ptr<SvXMLNamespaceMap> m_pRewindMap;
- SAL_DLLPRIVATE SvXMLNamespaceMap *TakeRewindMap() { return mxRewindMap.release(); }
- SAL_DLLPRIVATE void PutRewindMap( SvXMLNamespaceMap *p ) { mxRewindMap.reset(p); }
+ SAL_DLLPRIVATE std::unique_ptr<SvXMLNamespaceMap> TakeRewindMap() { return std::move(m_pRewindMap); }
+ SAL_DLLPRIVATE void PutRewindMap(std::unique_ptr<SvXMLNamespaceMap> p) { m_pRewindMap = std::move(p); }
protected:
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index cc54fe1b9aeb..87634e742455 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -175,7 +175,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper8<
std::unique_ptr<SvXMLImport_Impl> mpImpl; // dummy
- SvXMLNamespaceMap *mpNamespaceMap;
+ std::unique_ptr<SvXMLNamespaceMap> mpNamespaceMap;
std::unique_ptr<SvXMLUnitConverter> mpUnitConv;
SvXMLImportContexts_Impl maContexts;
FastSvXMLImportContexts_Impl maFastContexts;
@@ -200,7 +200,8 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper8<
const OUString getNamespacePrefixFromToken( sal_Int32 nToken );
void registerNamespaces();
void registerNSHelper(sal_Int32 nToken, sal_Int32 nPrefix, sal_Int32 nNamespace );
- SvXMLNamespaceMap* processNSAttributes(const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList);
+ std::unique_ptr<SvXMLNamespaceMap> processNSAttributes(
+ const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList);
void Characters(const OUString& aChars);
protected: