From 6135676d78f3b25cdbaa362f056ff6e44dfb57a6 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 30 Aug 2007 09:11:01 +0000 Subject: INTEGRATION: CWS npower7 (1.6.48); FILE MERGED 2007/04/27 14:32:16 npower 1.6.48.3: #70380 remove some OSL_TRACE bits 2007/04/27 14:09:38 npower 1.6.48.2: Issue number: 70380 limit 'proper' dimension checking to VBA support only Submitted by: Reviewed by: 2007/02/16 17:06:54 npower 1.6.48.1: #i70380 compatible erase behaviour --- basic/source/sbx/sbxarray.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'basic') diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 3be9b997763c..3b0249796009 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sbxarray.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: hr $ $Date: 2007-08-03 09:56:36 $ + * last change: $Author: vg $ $Date: 2007-08-30 10:11:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,7 +39,8 @@ #ifndef _STREAM_HXX //autogen #include #endif -#include +#include "sbx.hxx" +#include "runtime.hxx" #include using namespace std; @@ -592,7 +593,7 @@ void SbxArray::PutDirect( SbxVariable* pVar, UINT32 nIdx ) // ////////////////////////////////////////////////////////////////////////// -SbxDimArray::SbxDimArray( SbxDataType t ) : SbxArray( t ) +SbxDimArray::SbxDimArray( SbxDataType t ) : SbxArray( t ), mbHasFixedSize( false ) { pFirst = pLast = NULL; nDim = 0; @@ -617,6 +618,7 @@ SbxDimArray& SbxDimArray::operator=( const SbxDimArray& rArray ) AddDim32( p->nLbound, p->nUbound ); p = p->pNext; } + this->mbHasFixedSize = rArray.mbHasFixedSize; } return *this; } @@ -792,7 +794,7 @@ void SbxDimArray::Put32( SbxVariable* p, const INT32* pIdx ) UINT32 SbxDimArray::Offset32( SbxArray* pPar ) { - if( nDim == 0 || !pPar ) + if( nDim == 0 || !pPar || ( ( nDim != ( pPar->Count() - 1 ) ) && SbiRuntime::isVBAEnabled() ) ) { SetError( SbxERR_BOUNDS ); return 0; } -- cgit