summaryrefslogtreecommitdiff
path: root/include/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-17 09:39:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-20 15:15:58 +0200
commit35e1658e7275777ee94902b5014fd93b8daf975c (patch)
treef9ee60c44eb4adf0e16a35d9cfcb499890f7cf2e /include/xmloff
parent3c658d7fd77eb2e7b98e70c6b8fd5f80cb6414f7 (diff)
loplugin:useuniqueptr in XMLEventExport
Change-Id: I29a7c565db576afa4dbd0e0fbd1dfd99f9c989fc Reviewed-on: https://gerrit.libreoffice.org/60618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/xmloff')
-rw-r--r--include/xmloff/XMLEventExport.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/xmloff/XMLEventExport.hxx b/include/xmloff/XMLEventExport.hxx
index 797fc4a6dde3..8dba84465ace 100644
--- a/include/xmloff/XMLEventExport.hxx
+++ b/include/xmloff/XMLEventExport.hxx
@@ -29,6 +29,7 @@
#include <xmloff/xmlevent.hxx>
#include <map>
+#include <memory>
class SvXMLExport;
namespace com { namespace sun { namespace star {
@@ -38,7 +39,7 @@ namespace com { namespace sun { namespace star {
namespace beans { struct PropertyValue; }
} } }
-typedef ::std::map< OUString, XMLEventExportHandler* > HandlerMap;
+typedef ::std::map< OUString, std::unique_ptr<XMLEventExportHandler> > HandlerMap;
typedef ::std::map< OUString, XMLEventName > NameMap;
/**
@@ -69,13 +70,16 @@ public:
XMLEventExport(SvXMLExport& rExport);
~XMLEventExport();
+ XMLEventExport& operator=( XMLEventExport const & ) = delete; // MSVC2017 workaround
+ XMLEventExport( XMLEventExport const & ) = delete; // MSVC2017 workaround
+
/// register an EventExportHandler for a particular script type
///
/// The handlers will be deleted when the object is destroyed, hence
/// no pointers to a handler registered with AddHandler() should be
/// held by anyone.
void AddHandler( const OUString& rName,
- XMLEventExportHandler* rHandler );
+ std::unique_ptr<XMLEventExportHandler> pHandler );
/// register additional event names
void AddTranslationTable( const XMLEventNameTranslation* pTransTable );