Kaydet (Commit) 12a5cda3 authored tarafından Oliver Bolte's avatar Oliver Bolte

INTEGRATION: CWS swqcore02 (1.13.104); FILE MERGED

2004/11/24 16:00:29 dvo 1.13.104.1: #i30054# prevent name-collision of styles and automatic-styles in storage format
üst 2a0e9b74
......@@ -2,9 +2,9 @@
*
* $RCSfile: impastp4.cxx,v $
*
* $Revision: 1.13 $
* $Revision: 1.14 $
*
* last change: $Author: rt $ $Date: 2004-07-13 08:23:58 $
* last change: $Author: obo $ $Date: 2005-01-05 11:36:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -167,6 +167,45 @@ void SvXMLAutoStylePoolP_Impl::RegisterName( sal_Int32 nFamily, const OUString&
}
}
///////////////////////////////////////////////////////////////////////////////
//
// Retrieve the list of registered names
//
void SvXMLAutoStylePoolP_Impl::GetRegisteredNames(
uno::Sequence<sal_Int32>& rFamilies,
uno::Sequence<OUString>& rNames )
{
// collect registered names + families
vector<sal_Int32> aFamilies;
vector<OUString> aNames;
// iterate over families
sal_uInt32 nCount = maFamilyList.Count();
for( sal_uInt32 i = 0; i < nCount; i++ )
{
XMLFamilyData_Impl* pFamily = maFamilyList.GetObject( i );
// iterate over names
SvXMLAutoStylePoolNamesP_Impl* pNames = pFamily->mpNameList;
sal_uInt32 nNames = ( pNames != NULL ) ? pNames->Count() : 0;
for( sal_uInt32 j = 0; j < nNames; j++ )
{
aFamilies.push_back( pFamily->mnFamily );
aNames.push_back( *pNames->GetObject( j ) );
}
}
// copy the families + names into the sequence types
DBG_ASSERT( aFamilies.size() == aNames.size(), "families != names" );
rFamilies.realloc( aFamilies.size() );
std::copy( aFamilies.begin(), aFamilies.end(), rFamilies.getArray() );
rNames.realloc( aNames.size() );
std::copy( aNames.begin(), aNames.end(), rNames.getArray() );
}
///////////////////////////////////////////////////////////////////////////////
//
// Adds a array of XMLPropertyState ( vector< XMLPropertyState > ) to list
......
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