From 573fbd43261775370fa64fbf2d0693358fc8bf55 Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Wed, 5 Jan 2005 10:36:42 +0000 Subject: INTEGRATION: CWS swqcore02 (1.18.106); FILE MERGED 2004/11/24 16:00:29 dvo 1.18.106.1: #i30054# prevent name-collision of styles and automatic-styles in storage format --- xmloff/source/style/xmlaustp.cxx | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index f4be1f3610..7e07fbb3a9 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlaustp.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: rt $ $Date: 2004-07-13 08:26:02 $ + * last change: $Author: obo $ $Date: 2005-01-05 11:36:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -380,6 +380,28 @@ void SvXMLAutoStylePoolP::RegisterName( sal_Int32 nFamily, pImpl->RegisterName( nFamily, rName ); } +void SvXMLAutoStylePoolP::GetRegisteredNames( + uno::Sequence& rFamilies, + uno::Sequence& rNames ) +{ + pImpl->GetRegisteredNames( rFamilies, rNames ); +} + +void SvXMLAutoStylePoolP::RegisterNames( + uno::Sequence& aFamilies, + uno::Sequence& aNames ) +{ + DBG_ASSERT( aFamilies.getLength() == aNames.getLength(), + "aFamilies != aNames" ); + + // iterate over sequence(s) and call RegisterName(..) for each pair + const sal_Int32* pFamilies = aFamilies.getConstArray(); + const OUString* pNames = aNames.getConstArray(); + sal_Int32 nCount = min( aFamilies.getLength(), aNames.getLength() ); + for( sal_Int32 n = 0; n < nCount; n++ ) + RegisterName( pFamilies[n], pNames[n] ); +} + OUString SvXMLAutoStylePoolP::Add( sal_Int32 nFamily, const vector< XMLPropertyState >& rProperties ) { -- cgit v1.2.3