diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-09-25 10:33:48 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-09-25 14:11:23 +0200 |
commit | 68af7378074397466c15509a5d813dce69a54a41 (patch) | |
tree | 0db6984a4649e0acf32ddc4516aacded7a5d168e /writerperfect/source/writer/exp/txtparai.cxx | |
parent | 7810858ee6cac233ce5868de1f2ef5de1d443af4 (diff) |
EPUB export: don't leak when exceptions are thrown
Additional benefit is that this way we're again in sync with xmloff
code.
Change-Id: Ifa1dd976fbd2ce04cb47814060508c65e35474ca
Diffstat (limited to 'writerperfect/source/writer/exp/txtparai.cxx')
-rw-r--r-- | writerperfect/source/writer/exp/txtparai.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/writerperfect/source/writer/exp/txtparai.cxx b/writerperfect/source/writer/exp/txtparai.cxx index 8e19475b65fe..fa6f91f0bd7b 100644 --- a/writerperfect/source/writer/exp/txtparai.cxx +++ b/writerperfect/source/writer/exp/txtparai.cxx @@ -76,7 +76,7 @@ class XMLSpanContext : public XMLImportContext public: XMLSpanContext(XMLImport &rImport, const librevenge::RVNGPropertyList &rPropertyList); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs) override; + rtl::Reference<XMLImportContext> CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs) override; void SAL_CALL startElement(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs) override; void SAL_CALL characters(const OUString &rChars) override; @@ -94,7 +94,7 @@ XMLSpanContext::XMLSpanContext(XMLImport &rImport, const librevenge::RVNGPropert m_aPropertyList.insert(itProp.key(), itProp()->clone()); } -XMLImportContext *XMLSpanContext::CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/) +rtl::Reference<XMLImportContext> XMLSpanContext::CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/) { if (rName == "draw:frame") return new XMLTextFrameContext(mrImport); @@ -259,7 +259,7 @@ XMLParaContext::XMLParaContext(XMLImport &rImport) { } -XMLImportContext *XMLParaContext::CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/) +rtl::Reference<XMLImportContext> XMLParaContext::CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/) { if (rName == "text:a") return new XMLHyperlinkContext(mrImport); @@ -308,7 +308,7 @@ void XMLParaContext::characters(const OUString &rChars) mrImport.GetGenerator().closeSpan(); } -XMLImportContext *CreateParagraphOrSpanChildContext(XMLImport &rImport, const OUString &rName, const librevenge::RVNGPropertyList &rTextPropertyList) +rtl::Reference<XMLImportContext> CreateParagraphOrSpanChildContext(XMLImport &rImport, const OUString &rName, const librevenge::RVNGPropertyList &rTextPropertyList) { if (rName == "text:span") return new XMLSpanContext(rImport, rTextPropertyList); |