CWS-TOOLING: integrate CWS ab64_DEV300

This commit is contained in:
Jens-Heiner Rechtien
2008-11-20 14:05:36 +00:00
parent 2849810d86
commit 1c20d7b53d
6 changed files with 143 additions and 77 deletions

View File

@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: eventatt.cxx,v $
* $Revision: 1.35 $
* $Revision: 1.35.40.1 $
*
* This file is part of OpenOffice.org.
*
@@ -566,7 +566,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
OSL_TRACE("About to try get a hold of ThisComponent");
Reference< frame::XModel > xModel = getModelFromBasic( pStartedBasic ) ;
Reference< XScriptListener > xScriptListener = new BasicScriptListener_Impl( pBasic, xModel );
Reference< XScriptListener > xScriptListener = new BasicScriptListener_Impl( pStartedBasic, xModel );
Sequence< Any > aArgs( 4 );
aArgs[ 0 ] <<= xModel;

View File

@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: exprnode.cxx,v $
* $Revision: 1.19 $
* $Revision: 1.19.40.1 $
*
* This file is part of OpenOffice.org.
*
@@ -39,6 +39,13 @@
//////////////////////////////////////////////////////////////////////////
SbiExprNode::SbiExprNode( void )
{
pLeft = NULL;
pRight = NULL;
eNodeType = SbxDUMMY;
}
SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, SbiToken t, SbiExprNode* r )
{
BaseInit( p );

View File

@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: exprtree.cxx,v $
* $Revision: 1.24 $
* $Revision: 1.24.40.1 $
*
* This file is part of OpenOffice.org.
*
@@ -513,8 +513,15 @@ SbiExprNode* SbiExpression::Operand()
pParser->Next();
pRes = new SbiExprNode( pParser, pParser->GetSym() ); break;
case LPAREN:
nParenLevel++;
pParser->Next();
if( nParenLevel == 0 && m_eMode == EXPRMODE_LPAREN_PENDING && pParser->Peek() == RPAREN )
{
m_eMode = EXPRMODE_EMPTY_PAREN;
pRes = new SbiExprNode(); // Dummy node
pParser->Next();
break;
}
nParenLevel++;
pRes = Boolean();
if( pParser->Peek() != RPAREN )
{
@@ -589,16 +596,21 @@ SbiExprNode* SbiExpression::Unary()
SbiExprNode* SbiExpression::Exp()
{
SbiExprNode* pNd = Unary();
if( m_eMode != EXPRMODE_EMPTY_PAREN )
{
while( pParser->Peek() == EXPON ) {
SbiToken eTok = pParser->Next();
pNd = new SbiExprNode( pParser, pNd, eTok, Unary() );
}
}
return pNd;
}
SbiExprNode* SbiExpression::MulDiv()
{
SbiExprNode* pNd = Exp();
if( m_eMode != EXPRMODE_EMPTY_PAREN )
{
for( ;; )
{
SbiToken eTok = pParser->Peek();
@@ -607,32 +619,41 @@ SbiExprNode* SbiExpression::MulDiv()
eTok = pParser->Next();
pNd = new SbiExprNode( pParser, pNd, eTok, Exp() );
}
}
return pNd;
}
SbiExprNode* SbiExpression::IntDiv()
{
SbiExprNode* pNd = MulDiv();
if( m_eMode != EXPRMODE_EMPTY_PAREN )
{
while( pParser->Peek() == IDIV ) {
SbiToken eTok = pParser->Next();
pNd = new SbiExprNode( pParser, pNd, eTok, MulDiv() );
}
}
return pNd;
}
SbiExprNode* SbiExpression::Mod()
{
SbiExprNode* pNd = IntDiv();
if( m_eMode != EXPRMODE_EMPTY_PAREN )
{
while( pParser->Peek() == MOD ) {
SbiToken eTok = pParser->Next();
pNd = new SbiExprNode( pParser, pNd, eTok, IntDiv() );
}
}
return pNd;
}
SbiExprNode* SbiExpression::AddSub()
{
SbiExprNode* pNd = Mod();
if( m_eMode != EXPRMODE_EMPTY_PAREN )
{
for( ;; )
{
SbiToken eTok = pParser->Peek();
@@ -641,12 +662,15 @@ SbiExprNode* SbiExpression::AddSub()
eTok = pParser->Next();
pNd = new SbiExprNode( pParser, pNd, eTok, Mod() );
}
}
return pNd;
}
SbiExprNode* SbiExpression::Cat()
{
SbiExprNode* pNd = AddSub();
if( m_eMode != EXPRMODE_EMPTY_PAREN )
{
for( ;; )
{
SbiToken eTok = pParser->Peek();
@@ -655,12 +679,15 @@ SbiExprNode* SbiExpression::Cat()
eTok = pParser->Next();
pNd = new SbiExprNode( pParser, pNd, eTok, AddSub() );
}
}
return pNd;
}
SbiExprNode* SbiExpression::Comp()
{
SbiExprNode* pNd = Cat();
if( m_eMode != EXPRMODE_EMPTY_PAREN )
{
short nCount = 0;
for( ;; )
{
@@ -680,12 +707,15 @@ SbiExprNode* SbiExpression::Comp()
pParser->Error( SbERR_SYNTAX );
bError = TRUE;
}
}
return pNd;
}
SbiExprNode* SbiExpression::Like()
{
SbiExprNode* pNd = Comp();
if( m_eMode != EXPRMODE_EMPTY_PAREN )
{
short nCount = 0;
while( pParser->Peek() == LIKE ) {
SbiToken eTok = pParser->Next();
@@ -697,12 +727,15 @@ SbiExprNode* SbiExpression::Like()
pParser->Error( SbERR_SYNTAX );
bError = TRUE;
}
}
return pNd;
}
SbiExprNode* SbiExpression::Boolean()
{
SbiExprNode* pNd = Like();
if( m_eMode != EXPRMODE_EMPTY_PAREN )
{
for( ;; )
{
SbiToken eTok = pParser->Peek();
@@ -712,6 +745,7 @@ SbiExprNode* SbiExpression::Boolean()
eTok = pParser->Next();
pNd = new SbiExprNode( pParser, pNd, eTok, Like() );
}
}
return pNd;
}
@@ -932,6 +966,12 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa
bAssumeArrayMode = true;
eTok = NIL;
}
else if( eModeAfter == EXPRMODE_EMPTY_PAREN )
{
bBracket = TRUE;
delete pExpr;
return;
}
}
else
pExpr = new SbiExpression( pParser );

View File

@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: expr.hxx,v $
* $Revision: 1.15 $
* $Revision: 1.15.40.1 $
*
* This file is part of OpenOffice.org.
*
@@ -67,9 +67,10 @@ enum SbiExprMode { // Expression context:
EXPRMODE_STANDALONE, // a param1, param2 OR a( param1, param2 ) = 42
EXPRMODE_LPAREN_PENDING, // start of parameter list with bracket, special handling
EXPRMODE_LPAREN_NOT_NEEDED, // pending LPAREN has not been used
EXPRMODE_ARRAY_OR_OBJECT // '=' or '(' or '.' found after ')' on ParenLevel 0, stopping
EXPRMODE_ARRAY_OR_OBJECT, // '=' or '(' or '.' found after ')' on ParenLevel 0, stopping
// expression, assuming array syntax a(...)[(...)] = ?
// or a(...).b(...)
EXPRMODE_EMPTY_PAREN // It turned out that the paren don't contain anything: a()
};
enum SbiNodeType {
@@ -77,7 +78,8 @@ enum SbiNodeType {
SbxSTRVAL, // aStrVal = Wert, before #i59791/#i45570: nStringId = Wert
SbxVARVAL, // aVar = Wert
SbxTYPEOF, // TypeOf ObjExpr Is Type
SbxNODE // Node
SbxNODE, // Node
SbxDUMMY
};
enum RecursiveMode
@@ -117,6 +119,7 @@ class SbiExprNode { // Operatoren (und Operanden)
void GenElement( SbiOpcode ); // Element
void BaseInit( SbiParser* p ); // Hilfsfunktion fuer Ctor, AB 17.12.95
public:
SbiExprNode( void );
SbiExprNode( SbiParser*, double, SbxDataType );
SbiExprNode( SbiParser*, const String& );
SbiExprNode( SbiParser*, const SbiSymDef&, SbxDataType, SbiExprList* = NULL );

View File

@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: ActiveMSPList.cxx,v $
* $Revision: 1.16 $
* $Revision: 1.16.16.1 $
*
* This file is part of OpenOffice.org.
*
@@ -96,6 +96,8 @@ ActiveMSPList::getMSPFromAnyContext( const Any& aContext )
Reference< document::XScriptInvocationContext > xScriptContext( aContext, UNO_QUERY );
if ( xScriptContext.is() )
{
try
{
// the component supports executing scripts embedded in a - possibly foreign document.
// Check whether this other document its the component itself.
@@ -105,6 +107,11 @@ ActiveMSPList::getMSPFromAnyContext( const Any& aContext )
return msp;
}
}
catch( const lang::IllegalArgumentException& )
{
xModel.set( Reference< frame::XModel >() );
}
}
if ( xModel.is() )
{

View File

@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: sfxhelp.cxx,v $
* $Revision: 1.82 $
* $Revision: 1.82.78.1 $
*
* This file is part of OpenOffice.org.
*
@@ -782,11 +782,20 @@ BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
INetProtocol nProtocol = aParser.GetProtocol();
if ( nProtocol != INET_PROT_VND_SUN_STAR_HELP )
{
// #90162 Accept anything that is not invalid as help id, as both
// #i90162 Accept anything that is not invalid as help id, as both
// uno: URLs used as commands/help ids in the Office and the scheme
// used in extension help ids (e.g. com.foocorp.foo-ext:FooDialogButton)
// are accepted as INET_PROT_UNO respectively INET_PROT_GENERIC
if ( nProtocol != INET_PROT_NOT_VALID )
bool bAcceptAsURL = ( nProtocol != INET_PROT_NOT_VALID );
// #i94891 As in some extensions help ids like foo.bar.dummy without
// any : have been used that worked before the fix of #i90162 (see
// above) strings containing . will be also accepted to avoid brea-
// king the help of existing extensions.
if( !bAcceptAsURL )
bAcceptAsURL = ( rURL.Search( '.' ) != STRING_NOTFOUND );
if ( bAcceptAsURL )
{
aHelpURL = CreateHelpURL_Impl( rURL, GetHelpModuleName_Impl( ) );
}