diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-08-01 10:56:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-08-01 13:54:51 +0100 |
commit | 7e579295c8c07998d7e077fa7e1db24745726e5f (patch) | |
tree | 5a276e6f17e6094b578b9b6947db9398e7509c65 /xmloff/source/style/impastp1.cxx | |
parent | 3515019f8aabebc6f0037fa2e8f4a271b64e3845 (diff) |
convert SvXMLAutoStylePoolNamesP_Impl to a std::set
Change-Id: I839edf8d0e941f78f6f6f9e6a9117f76587a5f39
Diffstat (limited to 'xmloff/source/style/impastp1.cxx')
-rw-r--r-- | xmloff/source/style/impastp1.cxx | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/xmloff/source/style/impastp1.cxx b/xmloff/source/style/impastp1.cxx index ec98e9c37a77..4eeffef337d9 100644 --- a/xmloff/source/style/impastp1.cxx +++ b/xmloff/source/style/impastp1.cxx @@ -52,13 +52,13 @@ XMLFamilyData_Impl::XMLFamilyData_Impl( { mpParentList = new SvXMLAutoStylePoolParentsP_Impl( 5, 5 ); - mpNameList = new SvXMLAutoStylePoolNamesP_Impl( 5, 5 ); + mpNameList = new SvXMLAutoStylePoolNamesP_Impl; } XMLFamilyData_Impl::~XMLFamilyData_Impl() { - if( mpParentList ) delete mpParentList; - if( mpNameList ) delete mpNameList; + delete mpParentList; + delete mpNameList; DBG_ASSERT( !pCache || !pCache->size(), "auto style pool cache is not empty!" ); if( pCache ) { @@ -71,8 +71,7 @@ XMLFamilyData_Impl::~XMLFamilyData_Impl() void XMLFamilyData_Impl::ClearEntries() { - if( mpParentList ) - delete mpParentList; + delete mpParentList; mpParentList = new SvXMLAutoStylePoolParentsP_Impl( 5, 5 ); DBG_ASSERT( !pCache || !pCache->size(), "auto style pool cache is not empty!" ); if( pCache ) @@ -105,29 +104,4 @@ int XMLFamilyDataSort_Impl( const XMLFamilyData_Impl& r1, const XMLFamilyData_Im IMPL_CONTAINER_SORT( XMLFamilyDataList_Impl, XMLFamilyData_Impl, XMLFamilyDataSort_Impl ) -//############################################################################# -// -// Sorted list of OUString - elements -// - -/////////////////////////////////////////////////////////////////////////////// -// -// Sort-function for OUString-list -// - -int SvXMLAutoStylePoolNamesPCmp_Impl( const OUString& r1, - const OUString& r2 ) -{ - return (int)r1.compareTo( r2 ); -} - -/////////////////////////////////////////////////////////////////////////////// -// -// Implementation of sorted OUString-list -// - -IMPL_CONTAINER_SORT( SvXMLAutoStylePoolNamesP_Impl, - OUString, - SvXMLAutoStylePoolNamesPCmp_Impl ) - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |