Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ main/winaccessibility/source/UAccCOMIDL/dlldata.c
# claude
.claude/

# Visual Studio (not VS Code)
.vs/

# bazel
bazel-*
user.bazelrc
Expand Down
13 changes: 13 additions & 0 deletions main/basic/source/classes/sb.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,19 @@ SbxObject* SbiFactory::CreateObject( const String& rClass )
catch( Exception& )
{}
}
else
if( rClass.EqualsIgnoreCaseAscii( "Scripting.Dictionary" ) )
{
try
{
Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory(), UNO_SET_THROW );
::rtl::OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.scripting.Dictionary" ) );
Reference< XInterface > xInterface( xFactory->createInstance( aServiceName ), UNO_SET_THROW );
return new SbUnoObject( aServiceName, uno::makeAny( xInterface ) );
}
catch( Exception& )
{}
}

return NULL;
}
Expand Down
43 changes: 43 additions & 0 deletions main/basic/source/classes/sbunoobj.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2397,6 +2397,49 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
}
GetSbData()->bBlockCompilerError = sal_False; // #106433 Unblock compiler errors
}
else if( pHint->GetId() == SBX_HINT_DATACHANGED )
{
if( bInvocation && pParams && mxInvocation.is() )
{
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
Sequence< Any > args( nParamCount + 1 );
Any* pAnyArgs = args.getArray();
bool bBlockConversionToSmallestType = pINST->IsCompatibility();

for( sal_uInt32 i = 0 ; i < nParamCount ; i++ )
pAnyArgs[i] = sbxToUnoValueImpl( pParams->Get( (sal_uInt16)(i+1) ),
bBlockConversionToSmallestType );

pAnyArgs[nParamCount] = sbxToUnoValueImpl( pVar, bBlockConversionToSmallestType );

GetSbData()->bBlockCompilerError = sal_True; // #106433 Block compiler errors for API calls
try
{
Sequence< sal_Int16 > OutParamIndex;
Sequence< Any > OutParam;
Any aRetAny = mxInvocation->invoke( pMeth->GetName(), args, OutParamIndex, OutParam );

const sal_Int16* pIndices = OutParamIndex.getConstArray();
sal_uInt32 nLen = OutParamIndex.getLength();
if( nLen )
{
const Any* pNewValues = OutParam.getConstArray();
for( sal_uInt32 j = 0 ; j < nLen ; j++ )
{
sal_Int16 iTarget = pIndices[ j ];
if( iTarget >= (sal_Int16)nParamCount )
break;
unoToSbxValue( (SbxVariable*)pParams->Get( (sal_uInt16)(j+1) ), pNewValues[ j ] );
}
}
}
catch( const Exception& )
{
implHandleAnyException( ::cppu::getCaughtException() );
}
GetSbData()->bBlockCompilerError = sal_False; // #106433 Unblock compiler errors
}
}
}
else
SbxObject::SFX_NOTIFY( rBC, rBCType, rHint, rHintType );
Expand Down
7 changes: 4 additions & 3 deletions main/basic/source/comp/dim.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ void SbiParser::DefType( sal_Bool bPrivate )
{
// Dimension the target array

for ( short i=0; i<pDim->GetSize();++i )
for ( short i=0; i<pDim->GetSize();++i )
{
sal_Int32 ub = -1;
sal_Int32 lb = nBase;
Expand All @@ -626,8 +626,9 @@ void SbiParser::DefType( sal_Bool bPrivate )
lb = ub;
ub = pNode->GetNumber();
}
else if ( !bCompatible )
ub += nBase;
else if ( !bCompatible )
ub += nBase;
// VBA: lb = nBase (respects Option Base), ub = declared value
pArray->AddDim32( lb, ub );
}
pArray->setHasFixedSize( true );
Expand Down
Loading
Loading