diff options
author | Noel Grandin <noel@peralex.com> | 2015-12-03 12:38:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-12-03 13:57:23 +0200 |
commit | 2b17ec2175e288b92044092166d5b885978cecff (patch) | |
tree | f57160fe8e3987a5f51f9a6860153732c8811974 /sw/source/core | |
parent | e6721d2d17f5f34dcac14c3379521bb7fb6b8c03 (diff) |
uno:Sequence->std::vector in SmartTagMgr
Change-Id: I163f7d6c0f30ac2929df1cae202e695d21bb49fc
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 22afa5177178..47b90854b55e 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3365,12 +3365,11 @@ void SwCursorShell::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterEndElement(pWriter); } -static void lcl_FillRecognizerData( uno::Sequence< OUString >& rSmartTagTypes, +static void lcl_FillRecognizerData( std::vector< OUString >& rSmartTagTypes, uno::Sequence< uno::Reference< container::XStringKeyMap > >& rStringKeyMaps, const SwWrongList& rSmartTagList, sal_Int32 nCurrent ) { // Insert smart tag information - std::vector< OUString > aSmartTagTypes; std::vector< uno::Reference< container::XStringKeyMap > > aStringKeyMaps; for ( sal_uInt16 i = 0; i < rSmartTagList.Count(); ++i ) @@ -3383,24 +3382,18 @@ static void lcl_FillRecognizerData( uno::Sequence< OUString >& rSmartTagTypes, const SwWrongArea* pArea = rSmartTagList.GetElement( i ); if ( pArea ) { - aSmartTagTypes.push_back( pArea->maType ); + rSmartTagTypes.push_back( pArea->maType ); aStringKeyMaps.push_back( pArea->mxPropertyBag ); } } } - if ( !aSmartTagTypes.empty() ) + if ( !rSmartTagTypes.empty() ) { - rSmartTagTypes.realloc( aSmartTagTypes.size() ); - rStringKeyMaps.realloc( aSmartTagTypes.size() ); - - std::vector< OUString >::const_iterator aTypesIter = aSmartTagTypes.begin(); - sal_uInt16 i = 0; - for ( aTypesIter = aSmartTagTypes.begin(); aTypesIter != aSmartTagTypes.end(); ++aTypesIter ) - rSmartTagTypes[i++] = *aTypesIter; + rStringKeyMaps.realloc( rSmartTagTypes.size() ); std::vector< uno::Reference< container::XStringKeyMap > >::const_iterator aMapsIter = aStringKeyMaps.begin(); - i = 0; + sal_uInt16 i = 0; for ( aMapsIter = aStringKeyMaps.begin(); aMapsIter != aStringKeyMaps.end(); ++aMapsIter ) rStringKeyMaps[i++] = *aMapsIter; } @@ -3423,7 +3416,7 @@ static void lcl_FillTextRange( uno::Reference<text::XTextRange>& rRange, rRange = xRange; } -void SwCursorShell::GetSmartTagTerm( uno::Sequence< OUString >& rSmartTagTypes, +void SwCursorShell::GetSmartTagTerm( std::vector< OUString >& rSmartTagTypes, uno::Sequence< uno::Reference< container::XStringKeyMap > >& rStringKeyMaps, uno::Reference< text::XTextRange>& rRange ) const { |