diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-17 22:57:24 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-17 23:10:59 -0400 |
commit | 16735020088ce652e57091ed6dc376a40b876546 (patch) | |
tree | 48f1d5112a124bc4be4162fcfd6c03ea6d1a0097 /xmloff | |
parent | ed8c8a7173d26defac017ed9a1950b47d573898a (diff) |
No need for elaborate type name for this.
Change-Id: Ia29a5956813c5d71f042f774d00de3bc82b7f1aa
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/impastp1.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/style/impastp2.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/impastp3.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/impastp4.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/style/impastpl.hxx | 4 |
5 files changed, 9 insertions, 20 deletions
diff --git a/xmloff/source/style/impastp1.cxx b/xmloff/source/style/impastp1.cxx index 2106184637f5..63ce9dee4522 100644 --- a/xmloff/source/style/impastp1.cxx +++ b/xmloff/source/style/impastp1.cxx @@ -31,20 +31,12 @@ XMLAutoStyleFamily::XMLAutoStyleFamily( bool bAsFamily ) : mnFamily( nFamily ), maStrFamilyName( rStrName), mxMapper( rMapper ), mnCount( 0 ), mnName( 0 ), maStrPrefix( rStrPrefix ), mbAsFamily( bAsFamily ) - -{ - mpNameList = new SvXMLAutoStylePoolNamesP_Impl; -} +{} XMLAutoStyleFamily::XMLAutoStyleFamily( sal_Int32 nFamily ) : - mnFamily( nFamily ), mpNameList( NULL ), mnCount( 0 ), mnName( 0 ), - mbAsFamily( false ) -{} + mnFamily(nFamily), mnCount(0), mnName(0), mbAsFamily(false) {} -XMLAutoStyleFamily::~XMLAutoStyleFamily() -{ - delete mpNameList; -} +XMLAutoStyleFamily::~XMLAutoStyleFamily() {} void XMLAutoStyleFamily::ClearEntries() { diff --git a/xmloff/source/style/impastp2.cxx b/xmloff/source/style/impastp2.cxx index e6caba18fa9b..8c6b50d1bd97 100644 --- a/xmloff/source/style/impastp2.cxx +++ b/xmloff/source/style/impastp2.cxx @@ -39,7 +39,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam sBuffer.append( OUString::valueOf( (sal_Int32)rFamilyData.mnName ) ); msName = sBuffer.makeStringAndClear(); } - while( rFamilyData.mpNameList->find(msName) != rFamilyData.mpNameList->end() ); + while (rFamilyData.maNameList.find(msName) != rFamilyData.maNameList.end()); } bool operator<( const XMLAutoStyleFamily& r1, const XMLAutoStyleFamily& r2) diff --git a/xmloff/source/style/impastp3.cxx b/xmloff/source/style/impastp3.cxx index 8dde3f76b71c..589d7e39e10b 100644 --- a/xmloff/source/style/impastp3.cxx +++ b/xmloff/source/style/impastp3.cxx @@ -91,7 +91,7 @@ sal_Bool XMLAutoStylePoolParent::AddNamed( XMLAutoStyleFamily& rFamilyData, cons } } - if(rFamilyData.mpNameList->find(rName) == rFamilyData.mpNameList->end()) + if (rFamilyData.maNameList.find(rName) == rFamilyData.maNameList.end()) { XMLAutoStylePoolProperties* pProperties = new XMLAutoStylePoolProperties( rFamilyData, rProperties ); diff --git a/xmloff/source/style/impastp4.cxx b/xmloff/source/style/impastp4.cxx index a5d2f91387ea..8aa7214d747a 100644 --- a/xmloff/source/style/impastp4.cxx +++ b/xmloff/source/style/impastp4.cxx @@ -104,7 +104,7 @@ void SvXMLAutoStylePoolP_Impl::RegisterName( sal_Int32 nFamily, const OUString& DBG_ASSERT( aFind != maFamilyList.end(), "SvXMLAutoStylePool_Impl::RegisterName: unknown family" ); if (aFind != maFamilyList.end()) - aFind->mpNameList->insert(rName); + aFind->maNameList.insert(rName); } // @@ -125,10 +125,7 @@ void SvXMLAutoStylePoolP_Impl::GetRegisteredNames( XMLAutoStyleFamily &rFamily = *aJ; // iterate over names - SvXMLAutoStylePoolNamesP_Impl* pNames = rFamily.mpNameList; - if (!pNames) - continue; - for (SvXMLAutoStylePoolNamesP_Impl::const_iterator aI = pNames->begin(); aI != pNames->end(); ++aI) + for (XMLAutoStyleFamily::NameSetType::const_iterator aI = rFamily.maNameList.begin(); aI != rFamily.maNameList.end(); ++aI) { aFamilies.push_back( rFamily.mnFamily ); aNames.push_back( *aI ); diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx index 56eb40a9ec21..04632ac3a31d 100644 --- a/xmloff/source/style/impastpl.hxx +++ b/xmloff/source/style/impastpl.hxx @@ -37,7 +37,6 @@ class SvXMLAutoStylePoolP; class XMLAutoStylePoolParent; -typedef std::set<OUString> SvXMLAutoStylePoolNamesP_Impl; class SvXMLExportPropertyMapper; class SvXMLExport; @@ -48,13 +47,14 @@ class SvXMLExport; struct XMLAutoStyleFamily : boost::noncopyable { typedef boost::ptr_set<XMLAutoStylePoolParent> ParentsType; + typedef std::set<OUString> NameSetType; sal_uInt32 mnFamily; OUString maStrFamilyName; UniReference < SvXMLExportPropertyMapper > mxMapper; ParentsType maParents; - SvXMLAutoStylePoolNamesP_Impl* mpNameList; + NameSetType maNameList; sal_uInt32 mnCount; sal_uInt32 mnName; OUString maStrPrefix; |