From 452d2640c41097c0663bc3928c312ba314b67a65 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Fri, 30 Jan 2009 15:57:36 +0000 Subject: CWS-TOOLING: integrate CWS extras310_OOO310 2008-12-15 13:34:58 +0100 va r265480 : #i95258#: Initial Revision. 2008-11-27 17:19:55 +0100 va r264511 : #i91071#: Updated AutoCorrection List 2008-11-27 16:45:51 +0100 va r264508 : #i96663#: Initial Revision. 2008-11-27 16:44:27 +0100 va r264507 : #i96663# Added Mongolian AutoCorrection 2008-11-27 16:05:53 +0100 va r264501 : #i96160#: Updated AutoCorrection List. 2008-11-17 14:40:19 +0100 va r263724 : #i90138#: Recreated soffice.od* files (shellnew). 2008-11-12 16:06:40 +0100 va r263606 : #i87843#: Corrected Comma Mistakes. 2008-11-12 16:06:02 +0100 va r263605 : #i87843#: Corrected Comma Mistakes. 2008-11-12 13:07:14 +0100 va r263589 : #i54540#: Added Mr. and Mrs. to the List of known Abbreviations to avoid Capitalization 2008-11-12 12:59:14 +0100 va r263586 : New Directory 2008-11-12 12:14:20 +0100 va r263584 : #i89321#: Fixed and optimized of background fill images --- basic/source/classes/sb.cxx | 3 ++- basic/source/comp/dim.cxx | 5 ++-- basic/source/comp/scanner.cxx | 2 +- basic/source/inc/namecont.hxx | 10 ++++++++ basic/source/runtime/methods.cxx | 4 ++-- basic/source/sbx/sbxexec.cxx | 4 ++-- basic/source/uno/namecont.cxx | 23 +++++++++++-------- scripting/source/basprov/basscript.cxx | 2 +- xmlhelp/source/com/sun/star/help/HelpCompiler.cxx | 28 +++++++++++------------ 9 files changed, 47 insertions(+), 34 deletions(-) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 576547238b..1c0f70dbb4 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 d96923b6ea..b6c95c5748 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 a6d2071bf4..ee487baaa9 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 4c2b438543..a5e52845ff 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 fe6014560d..5c1bae13ab 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 aa0de5a626..234befbff0 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 21c83f85fc..c15d937f9b 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 diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx index 1d0fb3a4be..2fedb5f7a3 100644 --- a/scripting/source/basprov/basscript.cxx +++ b/scripting/source/basprov/basscript.cxx @@ -131,7 +131,7 @@ namespace basprov throw provider::ScriptFrameworkErrorException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "wrong number of paramters!" ) ), + "wrong number of parameters!" ) ), Reference< XInterface >(), m_funcName, ::rtl::OUString( diff --git a/xmlhelp/source/com/sun/star/help/HelpCompiler.cxx b/xmlhelp/source/com/sun/star/help/HelpCompiler.cxx index 74a01771ca..2609606e68 100644 --- a/xmlhelp/source/com/sun/star/help/HelpCompiler.cxx +++ b/xmlhelp/source/com/sun/star/help/HelpCompiler.cxx @@ -41,6 +41,16 @@ #include #include #endif +#include + +static void impl_sleep( sal_uInt32 nSec ) +{ + TimeValue aTime; + aTime.Seconds = nSec; + aTime.Nanosec = 0; + + osl::Thread::wait( aTime ); +} HelpCompiler::HelpCompiler(StreamTable &in_streamTable, const fs::path &in_inputFile, const fs::path &in_src, const fs::path &in_resEmbStylesheet, @@ -62,11 +72,7 @@ xmlDocPtr HelpCompiler::getSourceDocument(const fs::path &filePath) { res = xmlParseFile(filePath.native_file_string().c_str()); if( !res ){ -#if defined(UNX) || defined(OS2) - sleep( 3 ); -#else - Sleep( 3 ); -#endif + impl_sleep( 3 ); res = xmlParseFile(filePath.native_file_string().c_str()); } } @@ -91,11 +97,7 @@ xmlDocPtr HelpCompiler::getSourceDocument(const fs::path &filePath) xmlDocPtr doc = xmlParseFile(filePath.native_file_string().c_str()); if( !doc ) { -#if defined(UNX) || defined(OS2) - sleep( 3 ); -#else - Sleep( 3 ); -#endif + impl_sleep( 3 ); doc = xmlParseFile(filePath.native_file_string().c_str()); } @@ -416,11 +418,7 @@ bool HelpCompiler::compile( void ) throw( HelpProcessingException ) // resolve the dom if (!docResolvedOrg) { -#if defined(UNX) || defined(OS2) - sleep( 3 ); -#else - Sleep( 3 ); -#endif + impl_sleep( 3 ); docResolvedOrg = getSourceDocument(inputFile); if( !docResolvedOrg ) { -- cgit v1.2.3