diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-09 21:47:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-10 07:36:57 +0100 |
commit | 830e5e055760c31693e72e036ad473f4a3c43b55 (patch) | |
tree | 6e1cf0033f0a0ff60cc32b31f13e7af44ef38225 /include | |
parent | 09cb778b6eb7d3a5b9029965a1320b49c90e7295 (diff) |
pass FastAttributeList around by rtl::Reference
Change-Id: I958a22f60975c74dfaeb8469b4c0cd3759d40130
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110653
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/export/vmlexport.hxx | 7 | ||||
-rw-r--r-- | include/sax/fshelper.hxx | 13 |
2 files changed, 10 insertions, 10 deletions
diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx index a1c79fda73a8..4ee885fba6bd 100644 --- a/include/oox/export/vmlexport.hxx +++ b/include/oox/export/vmlexport.hxx @@ -34,6 +34,7 @@ #include <sal/types.h> #include <sax/fshelper.hxx> #include <vcl/checksum.hxx> +#include <rtl/ref.hxx> namespace com::sun::star { namespace drawing { @@ -83,14 +84,14 @@ class OOX_DLLPUBLIC VMLExport : public EscherEx /// Anchoring - Writer specific properties sal_Int16 m_eHOri, m_eVOri, m_eHRel, m_eVRel; - std::unique_ptr<sax_fastparser::FastAttributeList> m_pWrapAttrList; + rtl::Reference<sax_fastparser::FastAttributeList> m_pWrapAttrList; bool m_bInline; // css::text::TextContentAnchorType_AS_CHARACTER /// The object we're exporting. const SdrObject* m_pSdrObject; /// Fill the shape attributes as they come. - ::sax_fastparser::FastAttributeList *m_pShapeAttrList; + rtl::Reference<::sax_fastparser::FastAttributeList> m_pShapeAttrList; /// Remember the shape type. sal_uInt32 m_nShapeType; @@ -142,7 +143,7 @@ public: OString const & AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1, sal_Int16 eVOri = -1, sal_Int16 eHRel = -1, sal_Int16 eVRel = -1, - std::unique_ptr<sax_fastparser::FastAttributeList> m_pWrapAttrList = {}, + sax_fastparser::FastAttributeList* pWrapAttrList = nullptr, const bool bOOxmlExport = false ); OString const & AddInlineSdrObject( const SdrObject& rObj, const bool bOOxmlExport ); virtual void AddSdrObjectVMLObject( const SdrObject& rObj) override; diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx index 7a540ef6fddf..79f0e1a0f30f 100644 --- a/include/sax/fshelper.hxx +++ b/include/sax/fshelper.hxx @@ -24,6 +24,7 @@ #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <rtl/ustring.hxx> +#include <rtl/ref.hxx> #include <sax/saxdllapi.h> #include <optional> #include <memory> @@ -39,8 +40,6 @@ namespace sax_fastparser { enum class MergeMarks { APPEND = 0, PREPEND = 1, POSTPONE = 2}; -typedef css::uno::Reference< css::xml::sax::XFastAttributeList > XFastAttributeListRef; - class FastSaxSerializer; class SAX_DLLPUBLIC FastSerializerHelper @@ -123,12 +122,12 @@ public: void endElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId) { endElement( FSNS( namespaceTokenId, elementTokenId ) ); } - void singleElement(sal_Int32 elementTokenId, const XFastAttributeListRef& xAttrList); - void singleElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, XFastAttributeListRef const & xAttrList) + void singleElement(sal_Int32 elementTokenId, const rtl::Reference<FastAttributeList>& xAttrList); + void singleElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, rtl::Reference<FastAttributeList> const & xAttrList) { singleElement(FSNS( namespaceTokenId, elementTokenId), xAttrList); } - void startElement(sal_Int32 elementTokenId, const XFastAttributeListRef& xAttrList); - void startElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, XFastAttributeListRef const & xAttrList) + void startElement(sal_Int32 elementTokenId, const rtl::Reference<FastAttributeList>& xAttrList); + void startElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, rtl::Reference<FastAttributeList> const & xAttrList) { startElement( FSNS( namespaceTokenId, elementTokenId ), xAttrList ); } FastSerializerHelper* write(const char* value); @@ -145,7 +144,7 @@ public: css::uno::Reference< css::io::XOutputStream > const & getOutputStream() const; - static FastAttributeList *createAttrList(); + static rtl::Reference<FastAttributeList> createAttrList(); void mark(sal_Int32 nTag, const css::uno::Sequence< sal_Int32 >& rOrder = |