summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-08-19 13:21:18 +0200
committerMichael Stahl <mstahl@redhat.com>2015-08-19 19:32:18 +0200
commita4de770bab5e05af42dcd790b1e4a54fcc758e6c (patch)
tree11a9db938a7f405ee737511356e88917a25d7625 /xmloff
parent58c3bbfd467b93d133e00789afcd7a00a3f53895 (diff)
comphelper: reduce copypasta with UniquePtrValueLess functor
Change-Id: Ib93b818eeebc2f370535d1b061beabf7e8c65257
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/impastpl.hxx25
1 files changed, 7 insertions, 18 deletions
diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx
index 4dbce494ac74..d7a8240e7c3b 100644
--- a/xmloff/source/style/impastpl.hxx
+++ b/xmloff/source/style/impastpl.hxx
@@ -28,6 +28,9 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+
+#include <comphelper/stl_types.hxx>
+
#include <xmloff/maptype.hxx>
#include <xmloff/xmlexppr.hxx>
@@ -102,15 +105,8 @@ public:
struct XMLAutoStyleFamily : boost::noncopyable
{
- struct XMLAutoStylePoolParent_Less
- {
- bool operator()(std::unique_ptr<XMLAutoStylePoolParent> const& lhs,
- std::unique_ptr<XMLAutoStylePoolParent> const& rhs) const
- {
- return (*lhs) < (*rhs);
- }
- };
- typedef std::set<std::unique_ptr<XMLAutoStylePoolParent>, XMLAutoStylePoolParent_Less> ParentSetType;
+ typedef std::set<std::unique_ptr<XMLAutoStylePoolParent>,
+ comphelper::UniquePtrValueLess<XMLAutoStylePoolParent>> ParentSetType;
typedef std::set<OUString> NameSetType;
sal_uInt32 mnFamily;
@@ -140,16 +136,9 @@ struct XMLAutoStyleFamily : boost::noncopyable
class SvXMLAutoStylePoolP_Impl
{
- struct XMLAutoStyleFamily_Less
- {
- bool operator()(std::unique_ptr<XMLAutoStyleFamily> const& lhs,
- std::unique_ptr<XMLAutoStyleFamily> const& rhs) const
- {
- return (*lhs) < (*rhs);
- }
- };
// A set that finds and sorts based only on mnFamily
- typedef std::set<std::unique_ptr<XMLAutoStyleFamily>, XMLAutoStyleFamily_Less> FamilySetType;
+ typedef std::set<std::unique_ptr<XMLAutoStyleFamily>,
+ comphelper::UniquePtrValueLess<XMLAutoStyleFamily>> FamilySetType;
SvXMLExport& rExport;
FamilySetType m_FamilySet;