Decrease fragility in odd use cases with no current document
Change-Id: I9966166561d4c6e577f3f7e8e04572f97a0b295e Reviewed-on: https://gerrit.libreoffice.org/49450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
This commit is contained in:
@@ -409,7 +409,10 @@ uno::Reference< vba::XVBACompatibility > getVBACompatibility( const uno::Referen
|
||||
|
||||
bool getDefaultVBAMode( StarBASIC* pb )
|
||||
{
|
||||
uno::Reference< vba::XVBACompatibility > xVBACompat = getVBACompatibility( getDocumentModel( pb ) );
|
||||
uno::Reference< frame::XModel > xModel( getDocumentModel( pb ) );
|
||||
if (!xModel.is())
|
||||
return false;
|
||||
uno::Reference< vba::XVBACompatibility > xVBACompat = getVBACompatibility( xModel );
|
||||
return xVBACompat.is() && xVBACompat->getVBACompatibilityMode();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user