diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-21 12:12:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-22 11:01:53 +0200 |
commit | 442df6cf8345f8029d5a3b470bc4981a5aa2bf20 (patch) | |
tree | 9efa6f2b29f41d79f968d1e8ad2588c323305776 /include/xmloff | |
parent | a411d7729ab2bed05c3c5d22a8cbcf5dde034b91 (diff) |
ofz: don't leak in face of exceptions
Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2
Reviewed-on: https://gerrit.libreoffice.org/42587
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 'include/xmloff')
-rw-r--r-- | include/xmloff/DocumentSettingsContext.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/XMLEventsImportContext.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/XMLGraphicsDefaultStyle.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/XMLShapeStyleContext.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/XMLTextMasterPageContext.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/XMLTextShapeStyleContext.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/prstylei.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/shapeimport.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/txtstyli.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/xmlictxt.hxx | 8 | ||||
-rw-r--r-- | include/xmloff/xmlmetai.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/xmlnumfi.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/xmlnumi.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/xmlprcon.hxx | 4 | ||||
-rw-r--r-- | include/xmloff/xmlscripti.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/xmlstyle.hxx | 4 |
16 files changed, 22 insertions, 20 deletions
diff --git a/include/xmloff/DocumentSettingsContext.hxx b/include/xmloff/DocumentSettingsContext.hxx index 01443e57094b..9fd34a38a44d 100644 --- a/include/xmloff/DocumentSettingsContext.hxx +++ b/include/xmloff/DocumentSettingsContext.hxx @@ -38,7 +38,7 @@ public: const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList); virtual ~XMLDocumentSettingsContext() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void EndElement() override; diff --git a/include/xmloff/XMLEventsImportContext.hxx b/include/xmloff/XMLEventsImportContext.hxx index edbb27aee733..ee45e1b95f0e 100644 --- a/include/xmloff/XMLEventsImportContext.hxx +++ b/include/xmloff/XMLEventsImportContext.hxx @@ -109,7 +109,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/include/xmloff/XMLGraphicsDefaultStyle.hxx b/include/xmloff/XMLGraphicsDefaultStyle.hxx index b53806c69e96..816ff0db2f46 100644 --- a/include/xmloff/XMLGraphicsDefaultStyle.hxx +++ b/include/xmloff/XMLGraphicsDefaultStyle.hxx @@ -40,7 +40,7 @@ public: virtual ~XMLGraphicsDefaultStyle() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/include/xmloff/XMLShapeStyleContext.hxx b/include/xmloff/XMLShapeStyleContext.hxx index 8163a9e49c28..a0eace1100a9 100644 --- a/include/xmloff/XMLShapeStyleContext.hxx +++ b/include/xmloff/XMLShapeStyleContext.hxx @@ -52,7 +52,7 @@ public: sal_uInt16 nFamily); virtual ~XMLShapeStyleContext() override; - SvXMLImportContext * CreateChildContext( + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/include/xmloff/XMLTextMasterPageContext.hxx b/include/xmloff/XMLTextMasterPageContext.hxx index f439f9262e51..eab02ed18899 100644 --- a/include/xmloff/XMLTextMasterPageContext.hxx +++ b/include/xmloff/XMLTextMasterPageContext.hxx @@ -59,7 +59,7 @@ public: bool bOverwrite ); virtual ~XMLTextMasterPageContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/include/xmloff/XMLTextShapeStyleContext.hxx b/include/xmloff/XMLTextShapeStyleContext.hxx index 9c773e91f0d8..f1f9bf5a49d5 100644 --- a/include/xmloff/XMLTextShapeStyleContext.hxx +++ b/include/xmloff/XMLTextShapeStyleContext.hxx @@ -46,7 +46,7 @@ public: SvXMLStylesContext& rStyles, sal_uInt16 nFamily ); virtual ~XMLTextShapeStyleContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/include/xmloff/prstylei.hxx b/include/xmloff/prstylei.hxx index cd843faf2c9d..636e4042f1e6 100644 --- a/include/xmloff/prstylei.hxx +++ b/include/xmloff/prstylei.hxx @@ -95,7 +95,7 @@ public: bool bDefaultStyle=false ); virtual ~XMLPropStyleContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx index 58387766c3a0..080b71a02d0f 100644 --- a/include/xmloff/shapeimport.hxx +++ b/include/xmloff/shapeimport.hxx @@ -270,7 +270,7 @@ public: const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, css::uno::Reference< css::drawing::XShapes > const & rShapes, const css::uno::Reference< css::xml::sax::XAttributeList >& xFrameAttrList); - static SvXMLImportContext* CreateFrameChildContext( + static SvXMLImportContextRef CreateFrameChildContext( SvXMLImportContext *pThisContext, sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ); diff --git a/include/xmloff/txtstyli.hxx b/include/xmloff/txtstyli.hxx index 0c7e5891ae57..85efa3f79d7c 100644 --- a/include/xmloff/txtstyli.hxx +++ b/include/xmloff/txtstyli.hxx @@ -65,7 +65,7 @@ public: XMLTextStyleContext(const XMLTextStyleContext &) = delete; XMLTextStyleContext operator=(const XMLTextStyleContext &) = delete; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx index 554ecbe4e9e2..d22a72394504 100644 --- a/include/xmloff/xmlictxt.hxx +++ b/include/xmloff/xmlictxt.hxx @@ -34,6 +34,10 @@ class SvXMLNamespaceMap; class SvXMLImport; +class SvXMLImportContext; + +typedef rtl::Reference<SvXMLImportContext> SvXMLImportContextRef; + class XMLOFF_DLLPUBLIC SvXMLImportContext : public cppu::WeakImplHelper< css::xml::sax::XFastContextHandler > { friend class SvXMLImport; @@ -75,7 +79,7 @@ public: /** Create a children element context. By default, the import's * CreateContext method is called to create a new default context. */ - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ); @@ -118,8 +122,6 @@ public: void ReleaseRef(); }; -typedef rtl::Reference<SvXMLImportContext> SvXMLImportContextRef; - #endif // INCLUDED_XMLOFF_XMLICTXT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/xmloff/xmlmetai.hxx b/include/xmloff/xmlmetai.hxx index e84eb3b8b5a4..2b9160251bc0 100644 --- a/include/xmloff/xmlmetai.hxx +++ b/include/xmloff/xmlmetai.hxx @@ -49,7 +49,7 @@ public: virtual ~SvXMLMetaDocumentContext() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx index cedad8c08436..d62866d9c4a6 100644 --- a/include/xmloff/xmlnumfi.hxx +++ b/include/xmloff/xmlnumfi.hxx @@ -171,7 +171,7 @@ public: SvXMLStylesContext& rStyles ); virtual ~SvXMLNumFormatContext() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void CreateAndInsert(bool bOverwrite) override; diff --git a/include/xmloff/xmlnumi.hxx b/include/xmloff/xmlnumi.hxx index b4a130c45636..57898f76d254 100644 --- a/include/xmloff/xmlnumi.hxx +++ b/include/xmloff/xmlnumi.hxx @@ -67,7 +67,7 @@ public: ~SvxXMLListStyleContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/include/xmloff/xmlprcon.hxx b/include/xmloff/xmlprcon.hxx index 3961efe9bd8d..012bf1b26a13 100644 --- a/include/xmloff/xmlprcon.hxx +++ b/include/xmloff/xmlprcon.hxx @@ -49,14 +49,14 @@ public: virtual ~SvXMLPropertySetContext() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; // This method is called from this instance implementation of // CreateChildContext if the element matches an entry in the // SvXMLImportItemMapper with the mid flag MID_FLAG_ELEMENT_ITEM_IMPORT - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, ::std::vector< XMLPropertyState > &rProperties, diff --git a/include/xmloff/xmlscripti.hxx b/include/xmloff/xmlscripti.hxx index 85043df4a226..16fdc20e0d13 100644 --- a/include/xmloff/xmlscripti.hxx +++ b/include/xmloff/xmlscripti.hxx @@ -40,7 +40,7 @@ public: virtual ~XMLScriptContext() override; // Create child element. - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx index 5ef5fc5d6596..1c06b1388aed 100644 --- a/include/xmloff/xmlstyle.hxx +++ b/include/xmloff/xmlstyle.hxx @@ -95,7 +95,7 @@ public: virtual ~SvXMLStyleContext() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; @@ -205,7 +205,7 @@ public: virtual ~SvXMLStylesContext() override; // Create child element. - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; |