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
This commit is contained in:
parent
2413df68be
commit
3266965986
9 changed files with 47 additions and 34 deletions
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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) )
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -41,6 +41,16 @@
|
|||
#include <tools/prewin.h>
|
||||
#include <tools/postwin.h>
|
||||
#endif
|
||||
#include <osl/thread.hxx>
|
||||
|
||||
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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue