sw/source/filter/xml/swxml.cxx | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-)
New commits: commit db7bddbff203cb624ba61f4f72b04d4de6253d4c Author: Jochen Nitschke <j.nitschke+loger...@ok.de> Date: Wed May 10 11:12:48 2017 +0200 fix wrong Sequence size Avoid this kind of mistake with list initialization and cppcheck is happy too. Change-Id: Ibcd609590f3dc3c2e98434c26d4bd64324a2036d Reviewed-on: https://gerrit.libreoffice.org/37472 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 4daf020f83e6..154cb7382064 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -677,19 +677,14 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c xInfoSet->setPropertyValue( "SourceStorage", Any( xStorage ) ); // prepare filter arguments, WARNING: the order is important! - Sequence<Any> aFilterArgs( 5 ); - Any *pArgs = aFilterArgs.getArray(); - *pArgs++ <<= xInfoSet; - *pArgs++ <<= xStatusIndicator; - *pArgs++ <<= xGraphicResolver; - *pArgs++ <<= xObjectResolver; - *pArgs++ <<= aLateInitSettings; - - Sequence<Any> aEmptyArgs( 3 ); - // cppcheck-suppress redundantAssignment - pArgs = aEmptyArgs.getArray(); - *pArgs++ <<= xInfoSet; - *pArgs++ <<= xStatusIndicator; + Sequence<Any> aFilterArgs{ Any(xInfoSet), + Any(xStatusIndicator), + Any(xGraphicResolver), + Any(xObjectResolver), + Any(aLateInitSettings) }; + + Sequence<Any> aEmptyArgs{ Any(xInfoSet), + Any(xStatusIndicator) }; // prepare for special modes if( aOpt.IsFormatsOnly() ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits