From 8c8fdb0a668d759adac11bd83203c8eeded390d5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 13 Feb 2016 15:13:10 +0200 Subject: sequence->vector in extensions Change-Id: Iaf7feae5927795e8b5508f9ef49369fad802a57f Reviewed-on: https://gerrit.libreoffice.org/23689 Tested-by: Jenkins Reviewed-by: Noel Grandin --- extensions/source/propctrlr/formcomponenthandler.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'extensions/source/propctrlr/formcomponenthandler.cxx') diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index c44d3d9f74fa..09ec0ed9d895 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -277,9 +277,8 @@ namespace pcr const OUString* pStrings = aStrings.getConstArray(); sal_Int32 nCount = aStrings.getLength(); - Sequence< OUString > aResolvedStrings; - aResolvedStrings.realloc( nCount ); - OUString* pResolvedStrings = aResolvedStrings.getArray(); + std::vector< OUString > aResolvedStrings; + aResolvedStrings.resize( nCount ); try { for ( sal_Int32 i = 0; i < nCount; ++i ) @@ -287,14 +286,14 @@ namespace pcr OUString aIdStr = pStrings[i]; OUString aPureIdStr = aIdStr.copy( 1 ); if( xStringResourceResolver->hasEntryForId( aPureIdStr ) ) - pResolvedStrings[i] = xStringResourceResolver->resolveString( aPureIdStr ); + aResolvedStrings[i] = xStringResourceResolver->resolveString( aPureIdStr ); else - pResolvedStrings[i] = aIdStr; + aResolvedStrings[i] = aIdStr; } } catch( const resource::MissingResourceException & ) {} - aPropertyValue <<= aResolvedStrings; + aPropertyValue <<= comphelper::containerToSequence(aResolvedStrings); } } else @@ -2873,9 +2872,9 @@ namespace pcr const SfxItemSet* pOut = aDlg->GetOutputItemSet(); if ( pOut ) { - Sequence< NamedValue > aFontPropertyValues; + std::vector< NamedValue > aFontPropertyValues; ControlCharacterDialog::translateItemsToProperties( *pOut, aFontPropertyValues ); - _out_rNewValue <<= aFontPropertyValues; + _out_rNewValue <<= comphelper::containerToSequence(aFontPropertyValues); bSuccess = true; } } -- cgit