Kaydet (Commit) 16735020 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

No need for elaborate type name for this.

Change-Id: Ia29a5956813c5d71f042f774d00de3bc82b7f1aa
üst ed8c8a71
...@@ -31,20 +31,12 @@ XMLAutoStyleFamily::XMLAutoStyleFamily( ...@@ -31,20 +31,12 @@ XMLAutoStyleFamily::XMLAutoStyleFamily(
bool bAsFamily ) : bool bAsFamily ) :
mnFamily( nFamily ), maStrFamilyName( rStrName), mxMapper( rMapper ), mnFamily( nFamily ), maStrFamilyName( rStrName), mxMapper( rMapper ),
mnCount( 0 ), mnName( 0 ), maStrPrefix( rStrPrefix ), mbAsFamily( bAsFamily ) mnCount( 0 ), mnName( 0 ), maStrPrefix( rStrPrefix ), mbAsFamily( bAsFamily )
{}
{
mpNameList = new SvXMLAutoStylePoolNamesP_Impl;
}
XMLAutoStyleFamily::XMLAutoStyleFamily( sal_Int32 nFamily ) : XMLAutoStyleFamily::XMLAutoStyleFamily( sal_Int32 nFamily ) :
mnFamily( nFamily ), mpNameList( NULL ), mnCount( 0 ), mnName( 0 ), mnFamily(nFamily), mnCount(0), mnName(0), mbAsFamily(false) {}
mbAsFamily( false )
{}
XMLAutoStyleFamily::~XMLAutoStyleFamily() XMLAutoStyleFamily::~XMLAutoStyleFamily() {}
{
delete mpNameList;
}
void XMLAutoStyleFamily::ClearEntries() void XMLAutoStyleFamily::ClearEntries()
{ {
......
...@@ -39,7 +39,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam ...@@ -39,7 +39,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam
sBuffer.append( OUString::valueOf( (sal_Int32)rFamilyData.mnName ) ); sBuffer.append( OUString::valueOf( (sal_Int32)rFamilyData.mnName ) );
msName = sBuffer.makeStringAndClear(); 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) bool operator<( const XMLAutoStyleFamily& r1, const XMLAutoStyleFamily& r2)
......
...@@ -91,7 +91,7 @@ sal_Bool XMLAutoStylePoolParent::AddNamed( XMLAutoStyleFamily& rFamilyData, cons ...@@ -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 = XMLAutoStylePoolProperties* pProperties =
new XMLAutoStylePoolProperties( rFamilyData, rProperties ); new XMLAutoStylePoolProperties( rFamilyData, rProperties );
......
...@@ -104,7 +104,7 @@ void SvXMLAutoStylePoolP_Impl::RegisterName( sal_Int32 nFamily, const OUString& ...@@ -104,7 +104,7 @@ void SvXMLAutoStylePoolP_Impl::RegisterName( sal_Int32 nFamily, const OUString&
DBG_ASSERT( aFind != maFamilyList.end(), DBG_ASSERT( aFind != maFamilyList.end(),
"SvXMLAutoStylePool_Impl::RegisterName: unknown family" ); "SvXMLAutoStylePool_Impl::RegisterName: unknown family" );
if (aFind != maFamilyList.end()) if (aFind != maFamilyList.end())
aFind->mpNameList->insert(rName); aFind->maNameList.insert(rName);
} }
// //
...@@ -125,10 +125,7 @@ void SvXMLAutoStylePoolP_Impl::GetRegisteredNames( ...@@ -125,10 +125,7 @@ void SvXMLAutoStylePoolP_Impl::GetRegisteredNames(
XMLAutoStyleFamily &rFamily = *aJ; XMLAutoStyleFamily &rFamily = *aJ;
// iterate over names // iterate over names
SvXMLAutoStylePoolNamesP_Impl* pNames = rFamily.mpNameList; for (XMLAutoStyleFamily::NameSetType::const_iterator aI = rFamily.maNameList.begin(); aI != rFamily.maNameList.end(); ++aI)
if (!pNames)
continue;
for (SvXMLAutoStylePoolNamesP_Impl::const_iterator aI = pNames->begin(); aI != pNames->end(); ++aI)
{ {
aFamilies.push_back( rFamily.mnFamily ); aFamilies.push_back( rFamily.mnFamily );
aNames.push_back( *aI ); aNames.push_back( *aI );
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
class SvXMLAutoStylePoolP; class SvXMLAutoStylePoolP;
class XMLAutoStylePoolParent; class XMLAutoStylePoolParent;
typedef std::set<OUString> SvXMLAutoStylePoolNamesP_Impl;
class SvXMLExportPropertyMapper; class SvXMLExportPropertyMapper;
class SvXMLExport; class SvXMLExport;
...@@ -48,13 +47,14 @@ class SvXMLExport; ...@@ -48,13 +47,14 @@ class SvXMLExport;
struct XMLAutoStyleFamily : boost::noncopyable struct XMLAutoStyleFamily : boost::noncopyable
{ {
typedef boost::ptr_set<XMLAutoStylePoolParent> ParentsType; typedef boost::ptr_set<XMLAutoStylePoolParent> ParentsType;
typedef std::set<OUString> NameSetType;
sal_uInt32 mnFamily; sal_uInt32 mnFamily;
OUString maStrFamilyName; OUString maStrFamilyName;
UniReference < SvXMLExportPropertyMapper > mxMapper; UniReference < SvXMLExportPropertyMapper > mxMapper;
ParentsType maParents; ParentsType maParents;
SvXMLAutoStylePoolNamesP_Impl* mpNameList; NameSetType maNameList;
sal_uInt32 mnCount; sal_uInt32 mnCount;
sal_uInt32 mnName; sal_uInt32 mnName;
OUString maStrPrefix; OUString maStrPrefix;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment