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(
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()
{
......
......@@ -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)
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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;
......
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