From a4de770bab5e05af42dcd790b1e4a54fcc758e6c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 19 Aug 2015 13:21:18 +0200 Subject: comphelper: reduce copypasta with UniquePtrValueLess functor Change-Id: Ib93b818eeebc2f370535d1b061beabf7e8c65257 --- xmloff/source/style/impastpl.hxx | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'xmloff/source') 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 #include #include + +#include + #include #include @@ -102,15 +105,8 @@ public: struct XMLAutoStyleFamily : boost::noncopyable { - struct XMLAutoStylePoolParent_Less - { - bool operator()(std::unique_ptr const& lhs, - std::unique_ptr const& rhs) const - { - return (*lhs) < (*rhs); - } - }; - typedef std::set, XMLAutoStylePoolParent_Less> ParentSetType; + typedef std::set, + comphelper::UniquePtrValueLess> ParentSetType; typedef std::set NameSetType; sal_uInt32 mnFamily; @@ -140,16 +136,9 @@ struct XMLAutoStyleFamily : boost::noncopyable class SvXMLAutoStylePoolP_Impl { - struct XMLAutoStyleFamily_Less - { - bool operator()(std::unique_ptr const& lhs, - std::unique_ptr const& rhs) const - { - return (*lhs) < (*rhs); - } - }; // A set that finds and sorts based only on mnFamily - typedef std::set, XMLAutoStyleFamily_Less> FamilySetType; + typedef std::set, + comphelper::UniquePtrValueLess> FamilySetType; SvXMLExport& rExport; FamilySetType m_FamilySet; -- cgit v1.2.3