summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-20 10:08:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-20 10:47:35 +0200
commita25385e0d8027d7257ab95a4b787404dfca59913 (patch)
tree69c59dc0462e490d1afc0121ae955830befa1081 /include
parenta69cc693fee8581d1612e79be13e0234ad72cd6e (diff)
simplify some XMLPropertyState memory management
which fixes a leak if some of the code throws an exception Change-Id: Ic89060e7951060458ffe7ee5b6fe51cd076ef19b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115830 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/xmloff/txtparae.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index 2495f0f504d0..3a7ca544d358 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -29,6 +29,7 @@
#include <xmloff/xmltoken.hxx>
#include <xmloff/SinglePropertySetInfoCache.hxx>
#include <xmloff/XMLTextListAutoStylePool.hxx>
+#include <o3tl/span.hxx>
#include <memory>
#include <vector>
@@ -385,14 +386,14 @@ public:
void Add(
XmlStyleFamily nFamily,
const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
- const XMLPropertyState** pAddState = nullptr, bool bDontSeek = false );
+ const o3tl::span<XMLPropertyState> aAddStates = {}, bool bDontSeek = false );
/// find style name for specified family and parent
OUString Find(
XmlStyleFamily nFamily,
const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
const OUString& rParent,
- const XMLPropertyState** pAddState = nullptr ) const;
+ const o3tl::span<XMLPropertyState> aAddStates = {} ) const;
static SvXMLExportPropertyMapper *CreateShapeExtPropMapper(
SvXMLExport& rExport );