Kaydet (Commit) 403d52a6 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Don't crash if aArgs is empty

Change-Id: I6a6495ab5729bc45a0049fcbab884752267570be
Reviewed-on: https://gerrit.libreoffice.org/49336Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
üst e1d1bce7
......@@ -40,12 +40,14 @@ using namespace ::ooo::vba;
ScVbaGlobals::ScVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, "ExcelDocumentContext" )
{
uno::Sequence< beans::PropertyValue > aInitArgs( 2 );
uno::Sequence< beans::PropertyValue > aInitArgs( aArgs.getLength() + 1 );
aInitArgs[ 0 ].Name = "Application";
aInitArgs[ 0 ].Value <<= getApplication();
aInitArgs[ 1 ].Name = "ExcelDocumentContext";
aInitArgs[ 1 ].Value <<= getXSomethingFromArgs< frame::XModel >( aArgs, 0 );
if ( aArgs.getLength() > 0 )
{
aInitArgs[ 1 ].Name = "ExcelDocumentContext";
aInitArgs[ 1 ].Value <<= getXSomethingFromArgs< frame::XModel >( aArgs, 0 );
}
init( aInitArgs );
}
......
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