diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-02-11 07:51:53 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-02-11 07:51:53 +0000 |
commit | 326696598621c5883d7c28f491ca8192e8cfb21c (patch) | |
tree | a13e97abcc5cbd4c25d2ff53df419680c6d644f0 /basic | |
parent | 2413df68be6cd44374da1a3afcfa6a2d36e4ba4b (diff) |
CWS-TOOLING: integrate CWS ab61
2009-01-29 09:39:19 +0100 jsk r267096 : #i97038
2009-01-20 12:35:31 +0100 ab r266568 : #i94994# Applied patch
2009-01-19 17:50:55 +0100 ab r266514 : #i97038# Applied patch
2009-01-13 14:47:20 +0100 ab r266226 : #i96087# Applied patch
2009-01-13 12:24:30 +0100 ab r266207 : #i95200# Applied patch
2008-12-19 16:37:32 +0100 ab r265735 : #i93214# Applied patch
2008-12-19 16:21:38 +0100 ab r265730 : #i57749# Applied patch
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 3 | ||||
-rw-r--r-- | basic/source/comp/dim.cxx | 5 | ||||
-rw-r--r-- | basic/source/comp/scanner.cxx | 2 | ||||
-rw-r--r-- | basic/source/inc/namecont.hxx | 10 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 4 | ||||
-rw-r--r-- | basic/source/sbx/sbxexec.cxx | 4 | ||||
-rw-r--r-- | basic/source/uno/namecont.cxx | 23 |
7 files changed, 33 insertions, 18 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index d7dd09749419..35d9cd77301e 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -425,7 +425,8 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) SbProcedureProperty* pNewProp = new SbProcedureProperty ( pProcedureProp->GetName(), pProcedureProp->GetType() ); // ( pProcedureProp->GetName(), pProcedureProp->GetType(), this ); - pNewProp->ResetFlag( SBX_NO_BROADCAST ); + pNewProp->SetFlags( nFlags_ ); // Copy flags
+ pNewProp->ResetFlag( SBX_NO_BROADCAST ); // except the Broadcast if it was set
pProcedureProp->SetFlags( nFlags_ ); pProps->PutDirect( pNewProp, i ); StartListening( pNewProp->GetBroadcaster(), TRUE ); diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index 69b425a74c97..d242071784b6 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -1,4 +1,4 @@ -/************************************************************************* + /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -742,6 +742,7 @@ void SbiParser::DefEnum( BOOL bPrivate ) SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) { BOOL bFunc = BOOL( eCurTok == FUNCTION ); + BOOL bProp = BOOL( eCurTok == GET || eCurTok == SET || eCurTok == LET );
if( !TestSymbol() ) return NULL; String aName( aSym ); SbxDataType eType = eScanType; @@ -862,7 +863,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) // if( pDef->GetType() == SbxOBJECT ) // pDef->SetType( SbxVARIANT ), // Error( SbERR_SYNTAX ); - if( pDef->GetType() == SbxVARIANT && !bFunc ) + if( pDef->GetType() == SbxVARIANT && !( bFunc || bProp ) )
pDef->SetType( SbxEMPTY ); return pDef; } diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index b4e6ab6937a9..9cde971228d9 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -196,7 +196,7 @@ BOOL SbiScanner::NextSym() } // Leerstellen weg: - while( *pLine && ( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' ) ) + while( *pLine && (( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' )) )
pLine++, nCol++, bSpaces = TRUE; nCol1 = nCol; diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index df6d8f5cf1d2..02a41a6fc2c8 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -580,6 +580,9 @@ private: */ void impl_checkLoaded(); +private: + void impl_removeWithoutChecks( const ::rtl::OUString& _rElementName ); + public: SfxLibrary( ModifiableHelper& _rModifiable, @@ -651,6 +654,13 @@ public: ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); +public: + struct LibraryContainerAccess { friend class SfxLibraryContainer; private: LibraryContainerAccess() { } }; + void removeElementWithoutChecks( const ::rtl::OUString& _rElementName, LibraryContainerAccess ) + { + impl_removeWithoutChecks( _rElementName ); + } + protected: virtual bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const = 0; }; diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 9c9a994bb6c5..e92c8c974eb2 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -1786,9 +1786,9 @@ INT16 implGetDateYear( double aDate ) BOOL implDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, double& rdRet ) { - if ( nYear < 30 ) + if ( nYear < 30 && SbiRuntime::isVBAEnabled() )
nYear += 2000; - if ( nYear < 100 ) + else if ( nYear < 100 )
nYear += 1900; Date aCurDate( nDay, nMonth, nYear ); if ((nYear < 100 || nYear > 9999) ) diff --git a/basic/source/sbx/sbxexec.cxx b/basic/source/sbx/sbxexec.cxx index f03dfdf32bcb..5a5ba02d6da1 100644 --- a/basic/source/sbx/sbxexec.cxx +++ b/basic/source/sbx/sbxexec.cxx @@ -94,7 +94,7 @@ static const xub_Unicode* Symbol( const xub_Unicode* p, XubString& rSym, const S { rSym = p; // Dann darf es Buchstaben, Zahlen oder Underlines enthalten - while( *p && rCharClass.isAlphaNumeric( *p ) || *p == '_' ) + while( *p && (rCharClass.isAlphaNumeric( *p ) || *p == '_') )
p++, nLen++; // BASIC-Standard-Suffixe werden ignoriert if( *p && (*p == '%' || *p == '&' || *p == '!' || *p == '#' || *p == '$' ) ) @@ -118,7 +118,7 @@ static SbxVariable* QualifiedName { // Element einlesen refVar = Element( pObj, pGbl, &p, t, aCharClass ); - while( refVar.Is() && *p == '.' || *p == '!' ) + while( refVar.Is() && (*p == '.' || *p == '!') )
{ // Es folgt noch ein Objektelement. Das aktuelle Element // muss also ein SBX-Objekt sein oder liefern! diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index a7f226f9455f..c397e402fac4 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -2155,10 +2155,9 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name ) Sequence< OUString > aNames = pImplLib->getElementNames(); sal_Int32 nNameCount = aNames.getLength(); const OUString* pNames = aNames.getConstArray(); - for( sal_Int32 i = 0 ; i < nNameCount ; i++ ) + for( sal_Int32 i = 0 ; i < nNameCount ; ++i, ++pNames ) { - OUString aElementName = pNames[ i ]; - pImplLib->removeByName( aElementName ); + pImplLib->removeElementWithoutChecks( *pNames, SfxLibrary::LibraryContainerAccess() ); } } @@ -2907,20 +2906,16 @@ void SfxLibrary::insertByName( const OUString& aName, const Any& aElement ) implSetModified( sal_True ); } -void SfxLibrary::removeByName( const OUString& Name ) - throw(NoSuchElementException, WrappedTargetException, RuntimeException) +void SfxLibrary::impl_removeWithoutChecks( const ::rtl::OUString& _rElementName ) { - impl_checkReadOnly(); - impl_checkLoaded(); - - maNameContainer.removeByName( Name ); + maNameContainer.removeByName( _rElementName ); implSetModified( sal_True ); // Remove element file if( maStorageURL.getLength() ) { INetURLObject aElementInetObj( maStorageURL ); - aElementInetObj.insertName( Name, sal_False, + aElementInetObj.insertName( _rElementName, sal_False, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( maLibElementFileExtension ); OUString aFile = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2932,9 +2927,17 @@ void SfxLibrary::removeByName( const OUString& Name ) } catch( Exception& ) { + DBG_UNHANDLED_EXCEPTION(); } } +} +void SfxLibrary::removeByName( const OUString& Name ) + throw(NoSuchElementException, WrappedTargetException, RuntimeException) +{ + impl_checkReadOnly(); + impl_checkLoaded(); + impl_removeWithoutChecks( Name ); } // XTypeProvider |