From 68af7378074397466c15509a5d813dce69a54a41 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 25 Sep 2017 10:33:48 +0200 Subject: 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 --- writerperfect/source/writer/exp/XMLSectionContext.cxx | 2 +- writerperfect/source/writer/exp/XMLSectionContext.hxx | 2 +- writerperfect/source/writer/exp/XMLTextFrameContext.cxx | 6 +++--- writerperfect/source/writer/exp/XMLTextFrameContext.hxx | 2 +- writerperfect/source/writer/exp/XMLTextListContext.cxx | 2 +- writerperfect/source/writer/exp/XMLTextListContext.hxx | 2 +- writerperfect/source/writer/exp/XMLTextListItemContext.cxx | 2 +- writerperfect/source/writer/exp/XMLTextListItemContext.hxx | 2 +- writerperfect/source/writer/exp/txtparai.cxx | 8 ++++---- writerperfect/source/writer/exp/txtparai.hxx | 4 ++-- writerperfect/source/writer/exp/txtstyli.cxx | 2 +- writerperfect/source/writer/exp/txtstyli.hxx | 2 +- writerperfect/source/writer/exp/xmlfmt.cxx | 2 +- writerperfect/source/writer/exp/xmlfmt.hxx | 2 +- writerperfect/source/writer/exp/xmlictxt.cxx | 2 +- writerperfect/source/writer/exp/xmlictxt.hxx | 7 ++++--- writerperfect/source/writer/exp/xmlimp.cxx | 10 +++++----- writerperfect/source/writer/exp/xmlimp.hxx | 2 +- writerperfect/source/writer/exp/xmlmetai.cxx | 2 +- writerperfect/source/writer/exp/xmlmetai.hxx | 2 +- writerperfect/source/writer/exp/xmltbli.cxx | 10 +++++----- writerperfect/source/writer/exp/xmltbli.hxx | 2 +- writerperfect/source/writer/exp/xmltext.cxx | 4 ++-- writerperfect/source/writer/exp/xmltext.hxx | 4 ++-- 24 files changed, 43 insertions(+), 42 deletions(-) (limited to 'writerperfect/source/writer/exp') diff --git a/writerperfect/source/writer/exp/XMLSectionContext.cxx b/writerperfect/source/writer/exp/XMLSectionContext.cxx index ba6e1a7944f7..9d3621c4f346 100644 --- a/writerperfect/source/writer/exp/XMLSectionContext.cxx +++ b/writerperfect/source/writer/exp/XMLSectionContext.cxx @@ -24,7 +24,7 @@ XMLSectionContext::XMLSectionContext(XMLImport &rImport) { } -XMLImportContext *XMLSectionContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLSectionContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { return CreateTextChildContext(mrImport, rName); } diff --git a/writerperfect/source/writer/exp/XMLSectionContext.hxx b/writerperfect/source/writer/exp/XMLSectionContext.hxx index 5aa49a444a9a..9eeb69a311b4 100644 --- a/writerperfect/source/writer/exp/XMLSectionContext.hxx +++ b/writerperfect/source/writer/exp/XMLSectionContext.hxx @@ -23,7 +23,7 @@ class XMLSectionContext : public XMLImportContext public: XMLSectionContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL startElement(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL endElement(const OUString &rName) override; }; diff --git a/writerperfect/source/writer/exp/XMLTextFrameContext.cxx b/writerperfect/source/writer/exp/XMLTextFrameContext.cxx index 60cbe2d21263..94c76b71be9a 100644 --- a/writerperfect/source/writer/exp/XMLTextFrameContext.cxx +++ b/writerperfect/source/writer/exp/XMLTextFrameContext.cxx @@ -25,7 +25,7 @@ class XMLTextImageContext : public XMLImportContext public: XMLTextImageContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL startElement(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL endElement(const OUString &rName) override; @@ -40,7 +40,7 @@ XMLTextImageContext::XMLTextImageContext(XMLImport &rImport) { } -XMLImportContext *XMLTextImageContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLTextImageContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "office:binary-data") { @@ -76,7 +76,7 @@ XMLTextFrameContext::XMLTextFrameContext(XMLImport &rImport) { } -XMLImportContext *XMLTextFrameContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLTextFrameContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "draw:image") return new XMLTextImageContext(mrImport); diff --git a/writerperfect/source/writer/exp/XMLTextFrameContext.hxx b/writerperfect/source/writer/exp/XMLTextFrameContext.hxx index 2cf14889df05..076426e69ed9 100644 --- a/writerperfect/source/writer/exp/XMLTextFrameContext.hxx +++ b/writerperfect/source/writer/exp/XMLTextFrameContext.hxx @@ -27,7 +27,7 @@ class XMLTextFrameContext : public XMLImportContext public: XMLTextFrameContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL startElement(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL endElement(const OUString &rName) override; diff --git a/writerperfect/source/writer/exp/XMLTextListContext.cxx b/writerperfect/source/writer/exp/XMLTextListContext.cxx index edfd7371b15e..3a7698890759 100644 --- a/writerperfect/source/writer/exp/XMLTextListContext.cxx +++ b/writerperfect/source/writer/exp/XMLTextListContext.cxx @@ -23,7 +23,7 @@ XMLTextListContext::XMLTextListContext(XMLImport &rImport) { } -XMLImportContext *XMLTextListContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLTextListContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "text:list-item") return new XMLTextListItemContext(mrImport); diff --git a/writerperfect/source/writer/exp/XMLTextListContext.hxx b/writerperfect/source/writer/exp/XMLTextListContext.hxx index 533257228fbb..8e9152f06058 100644 --- a/writerperfect/source/writer/exp/XMLTextListContext.hxx +++ b/writerperfect/source/writer/exp/XMLTextListContext.hxx @@ -23,7 +23,7 @@ class XMLTextListContext : public XMLImportContext public: XMLTextListContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; }; } // namespace exp diff --git a/writerperfect/source/writer/exp/XMLTextListItemContext.cxx b/writerperfect/source/writer/exp/XMLTextListItemContext.cxx index 7b166d52fb42..cbf3462566f0 100644 --- a/writerperfect/source/writer/exp/XMLTextListItemContext.cxx +++ b/writerperfect/source/writer/exp/XMLTextListItemContext.cxx @@ -25,7 +25,7 @@ XMLTextListItemContext::XMLTextListItemContext(XMLImport &rImport) { } -XMLImportContext *XMLTextListItemContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLTextListItemContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "text:p" || rName == "text:h") return new XMLParaContext(mrImport); diff --git a/writerperfect/source/writer/exp/XMLTextListItemContext.hxx b/writerperfect/source/writer/exp/XMLTextListItemContext.hxx index cb6a68aedf5a..cbca5bf7feac 100644 --- a/writerperfect/source/writer/exp/XMLTextListItemContext.hxx +++ b/writerperfect/source/writer/exp/XMLTextListItemContext.hxx @@ -23,7 +23,7 @@ class XMLTextListItemContext : public XMLImportContext public: XMLTextListItemContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; }; } // namespace exp 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 &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL startElement(const OUString &rName, const css::uno::Reference &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 &/*xAttribs*/) +rtl::Reference XMLSpanContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*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 &/*xAttribs*/) +rtl::Reference XMLParaContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*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 CreateParagraphOrSpanChildContext(XMLImport &rImport, const OUString &rName, const librevenge::RVNGPropertyList &rTextPropertyList) { if (rName == "text:span") return new XMLSpanContext(rImport, rTextPropertyList); diff --git a/writerperfect/source/writer/exp/txtparai.hxx b/writerperfect/source/writer/exp/txtparai.hxx index a427d2602516..c32ef1916b0b 100644 --- a/writerperfect/source/writer/exp/txtparai.hxx +++ b/writerperfect/source/writer/exp/txtparai.hxx @@ -23,7 +23,7 @@ class XMLParaContext : public XMLImportContext public: XMLParaContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) override; void SAL_CALL startElement(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL endElement(const OUString &rName) override; @@ -36,7 +36,7 @@ private: }; /// Shared child context factory for paragraph and span contexts. -XMLImportContext *CreateParagraphOrSpanChildContext(XMLImport &rImport, const OUString &rName, const librevenge::RVNGPropertyList &rTextPropertyList); +rtl::Reference CreateParagraphOrSpanChildContext(XMLImport &rImport, const OUString &rName, const librevenge::RVNGPropertyList &rTextPropertyList); } // namespace exp } // namespace writerperfect diff --git a/writerperfect/source/writer/exp/txtstyli.cxx b/writerperfect/source/writer/exp/txtstyli.cxx index 420651a1ddb0..bdb36eedea51 100644 --- a/writerperfect/source/writer/exp/txtstyli.cxx +++ b/writerperfect/source/writer/exp/txtstyli.cxx @@ -81,7 +81,7 @@ XMLStyleContext::XMLStyleContext(XMLImport &rImport, XMLStylesContext &rStyles) { } -XMLImportContext *XMLStyleContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLStyleContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "style:paragraph-properties") return new XMLParagraphPropertiesContext(mrImport, *this); diff --git a/writerperfect/source/writer/exp/txtstyli.hxx b/writerperfect/source/writer/exp/txtstyli.hxx index 83ffd78f4e70..5852730049a0 100644 --- a/writerperfect/source/writer/exp/txtstyli.hxx +++ b/writerperfect/source/writer/exp/txtstyli.hxx @@ -27,7 +27,7 @@ class XMLStyleContext : public XMLImportContext public: XMLStyleContext(XMLImport &rImport, XMLStylesContext &rStyles); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL startElement(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL endElement(const OUString &rName) override; diff --git a/writerperfect/source/writer/exp/xmlfmt.cxx b/writerperfect/source/writer/exp/xmlfmt.cxx index b3317283f470..f1e501ccc748 100644 --- a/writerperfect/source/writer/exp/xmlfmt.cxx +++ b/writerperfect/source/writer/exp/xmlfmt.cxx @@ -26,7 +26,7 @@ XMLStylesContext::XMLStylesContext(XMLImport &rImport, std::map &/*xAttribs*/) +rtl::Reference XMLStylesContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "style:style") return new XMLStyleContext(mrImport, *this); diff --git a/writerperfect/source/writer/exp/xmlfmt.hxx b/writerperfect/source/writer/exp/xmlfmt.hxx index 394be55b36c2..aea29dbdfa8f 100644 --- a/writerperfect/source/writer/exp/xmlfmt.hxx +++ b/writerperfect/source/writer/exp/xmlfmt.hxx @@ -27,7 +27,7 @@ class XMLStylesContext : public XMLImportContext public: XMLStylesContext(XMLImport &rImport, std::map &rParagraphStyles, std::map &rTextStyles); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; std::map &GetCurrentParagraphStyles(); std::map &GetCurrentTextStyles(); diff --git a/writerperfect/source/writer/exp/xmlictxt.cxx b/writerperfect/source/writer/exp/xmlictxt.cxx index 5f5a731493c8..ba5c06804dc4 100644 --- a/writerperfect/source/writer/exp/xmlictxt.cxx +++ b/writerperfect/source/writer/exp/xmlictxt.cxx @@ -23,7 +23,7 @@ XMLImportContext::XMLImportContext(XMLImport &rImport) { } -XMLImportContext *XMLImportContext::CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) +rtl::Reference XMLImportContext::CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) { return mrImport.CreateContext(rName, xAttribs); } diff --git a/writerperfect/source/writer/exp/xmlictxt.hxx b/writerperfect/source/writer/exp/xmlictxt.hxx index 0076852f25d3..cbdeab0f6898 100644 --- a/writerperfect/source/writer/exp/xmlictxt.hxx +++ b/writerperfect/source/writer/exp/xmlictxt.hxx @@ -10,12 +10,13 @@ #ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLICTXT_HXX #define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLICTXT_HXX -#include - #include #include +#include +#include + namespace writerperfect { namespace exp @@ -32,7 +33,7 @@ class XMLImportContext : public cppu::WeakImplHelper public: XMLImportContext(XMLImport &rImport); - virtual XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs); + virtual rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs); // XDocumentHandler void SAL_CALL startDocument() override; diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx index 2370399edb65..5d368ed277f0 100644 --- a/writerperfect/source/writer/exp/xmlimp.cxx +++ b/writerperfect/source/writer/exp/xmlimp.cxx @@ -27,7 +27,7 @@ class XMLBodyContext : public XMLImportContext public: XMLBodyContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) override; }; XMLBodyContext::XMLBodyContext(XMLImport &rImport) @@ -35,7 +35,7 @@ XMLBodyContext::XMLBodyContext(XMLImport &rImport) { } -XMLImportContext *XMLBodyContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLBodyContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "office:text") return new XMLBodyContentContext(mrImport); @@ -48,7 +48,7 @@ class XMLOfficeDocContext : public XMLImportContext public: XMLOfficeDocContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) override; }; XMLOfficeDocContext::XMLOfficeDocContext(XMLImport &rImport) @@ -56,7 +56,7 @@ XMLOfficeDocContext::XMLOfficeDocContext(XMLImport &rImport) { } -XMLImportContext *XMLOfficeDocContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLOfficeDocContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "office:body") return new XMLBodyContext(mrImport); @@ -74,7 +74,7 @@ XMLImport::XMLImport(librevenge::RVNGTextInterface &rGenerator) { } -XMLImportContext *XMLImport::CreateContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLImport::CreateContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "office:document") return new XMLOfficeDocContext(*this); diff --git a/writerperfect/source/writer/exp/xmlimp.hxx b/writerperfect/source/writer/exp/xmlimp.hxx index 128a88cabdd6..f971327fada8 100644 --- a/writerperfect/source/writer/exp/xmlimp.hxx +++ b/writerperfect/source/writer/exp/xmlimp.hxx @@ -43,7 +43,7 @@ class XMLImport : public cppu::WeakImplHelper public: XMLImport(librevenge::RVNGTextInterface &rGenerator); - XMLImportContext *CreateContext(const OUString &rName, const css::uno::Reference &xAttribs); + rtl::Reference CreateContext(const OUString &rName, const css::uno::Reference &xAttribs); librevenge::RVNGTextInterface &GetGenerator() const; std::map &GetAutomaticTextStyles(); diff --git a/writerperfect/source/writer/exp/xmlmetai.cxx b/writerperfect/source/writer/exp/xmlmetai.cxx index 8777f4fa0b6f..0d804833bc7a 100644 --- a/writerperfect/source/writer/exp/xmlmetai.cxx +++ b/writerperfect/source/writer/exp/xmlmetai.cxx @@ -133,7 +133,7 @@ XMLMetaDocumentContext::XMLMetaDocumentContext(XMLImport &rImport) { } -XMLImportContext *XMLMetaDocumentContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLMetaDocumentContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "dc:title") return new XMLDcTitleContext(mrImport, *this); diff --git a/writerperfect/source/writer/exp/xmlmetai.hxx b/writerperfect/source/writer/exp/xmlmetai.hxx index b02e1f21caaf..12285937a705 100644 --- a/writerperfect/source/writer/exp/xmlmetai.hxx +++ b/writerperfect/source/writer/exp/xmlmetai.hxx @@ -25,7 +25,7 @@ class XMLMetaDocumentContext : public XMLImportContext public: XMLMetaDocumentContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL endElement(const OUString &rName) override; diff --git a/writerperfect/source/writer/exp/xmltbli.cxx b/writerperfect/source/writer/exp/xmltbli.cxx index 735e276de241..d5844fd18d5c 100644 --- a/writerperfect/source/writer/exp/xmltbli.cxx +++ b/writerperfect/source/writer/exp/xmltbli.cxx @@ -26,7 +26,7 @@ class XMLTableCellContext : public XMLImportContext public: XMLTableCellContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL startElement(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL endElement(const OUString &rName) override; @@ -37,7 +37,7 @@ XMLTableCellContext::XMLTableCellContext(XMLImport &rImport) { } -XMLImportContext *XMLTableCellContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLTableCellContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { return CreateTextChildContext(mrImport, rName); } @@ -58,7 +58,7 @@ class XMLTableRowContext : public XMLImportContext public: XMLTableRowContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL startElement(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL endElement(const OUString &rName) override; @@ -69,7 +69,7 @@ XMLTableRowContext::XMLTableRowContext(XMLImport &rImport) { } -XMLImportContext *XMLTableRowContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLTableRowContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "table:table-cell") return new XMLTableCellContext(mrImport); @@ -91,7 +91,7 @@ XMLTableContext::XMLTableContext(XMLImport &rImport) { } -XMLImportContext *XMLTableContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLTableContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { if (rName == "table:table-row") return new XMLTableRowContext(mrImport); diff --git a/writerperfect/source/writer/exp/xmltbli.hxx b/writerperfect/source/writer/exp/xmltbli.hxx index ceeb098c1f9c..07ae0a647181 100644 --- a/writerperfect/source/writer/exp/xmltbli.hxx +++ b/writerperfect/source/writer/exp/xmltbli.hxx @@ -23,7 +23,7 @@ class XMLTableContext : public XMLImportContext public: XMLTableContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL startElement(const OUString &rName, const css::uno::Reference &xAttribs) override; void SAL_CALL endElement(const OUString &rName) override; diff --git a/writerperfect/source/writer/exp/xmltext.cxx b/writerperfect/source/writer/exp/xmltext.cxx index 14c5b306dd99..3902e15ae839 100644 --- a/writerperfect/source/writer/exp/xmltext.cxx +++ b/writerperfect/source/writer/exp/xmltext.cxx @@ -26,12 +26,12 @@ XMLBodyContentContext::XMLBodyContentContext(XMLImport &rImport) { } -XMLImportContext *XMLBodyContentContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) +rtl::Reference XMLBodyContentContext::CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) { return CreateTextChildContext(mrImport, rName); } -XMLImportContext *CreateTextChildContext(XMLImport &rImport, const OUString &rName) +rtl::Reference CreateTextChildContext(XMLImport &rImport, const OUString &rName) { if (rName == "text:p" || rName == "text:h") return new XMLParaContext(rImport); diff --git a/writerperfect/source/writer/exp/xmltext.hxx b/writerperfect/source/writer/exp/xmltext.hxx index dc8f35f33fbd..bce957c4f7e8 100644 --- a/writerperfect/source/writer/exp/xmltext.hxx +++ b/writerperfect/source/writer/exp/xmltext.hxx @@ -23,11 +23,11 @@ class XMLBodyContentContext : public XMLImportContext public: XMLBodyContentContext(XMLImport &rImport); - XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) override; + rtl::Reference CreateChildContext(const OUString &rName, const css::uno::Reference &/*xAttribs*/) override; }; /// Context factory for body text, section, table cell, etc. -XMLImportContext *CreateTextChildContext(XMLImport &rImport, const OUString &rName); +rtl::Reference CreateTextChildContext(XMLImport &rImport, const OUString &rName); } // namespace exp } // namespace writerperfect -- cgit v1.2.3