summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorPascal Junck <pjunck@openoffice.org>2004-11-02 10:52:32 +0000
committerPascal Junck <pjunck@openoffice.org>2004-11-02 10:52:32 +0000
commitc4b070f023622b29ad5b64810b5446e142ffee08 (patch)
treee419a04f45697bb0a430ec1a80d97d1c73795f74 /basic
parent5b0ce2a114e17faa2dee9a563d9a8034c645b83f (diff)
INTEGRATION: CWS ab11clonepp4 (1.17.44); FILE MERGED
2004/10/15 08:39:04 ab 1.17.44.1: #118083# #118084# Class support PP4 -> SO 8
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbxmod.cxx32
1 files changed, 29 insertions, 3 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 75abf5270947..d8fd3950fb2e 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sbxmod.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: obo $ $Date: 2004-05-28 14:34:58 $
+ * last change: $Author: pjunck $ $Date: 2004-11-02 11:52:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -108,6 +108,7 @@
TYPEINIT1(SbModule,SbxObject)
TYPEINIT1(SbMethod,SbxMethod)
TYPEINIT1(SbProperty,SbxProperty)
+TYPEINIT1(SbProcedureProperty,SbProperty)
TYPEINIT1(SbJScriptModule,SbModule)
TYPEINIT1(SbJScriptMethod,SbMethod)
@@ -348,6 +349,25 @@ SbProperty* SbModule::GetProperty( const String& rName, SbxDataType t )
return pProp;
}
+SbProcedureProperty* SbModule::GetProcedureProperty
+ ( const String& rName, SbxDataType t )
+{
+ SbxVariable* p = pProps->Find( rName, SbxCLASS_PROPERTY );
+ SbProcedureProperty* pProp = p ? PTR_CAST(SbProcedureProperty,p) : NULL;
+ if( p && !pProp )
+ pProps->Remove( p );
+ if( !pProp )
+ {
+ pProp = new SbProcedureProperty( rName, t );
+ pProp->SetFlag( SBX_READWRITE );
+ pProp->SetParent( this );
+ pProps->Put( pProp, pProps->Count() );
+ StartListening( pProp->GetBroadcaster(), TRUE );
+ }
+ return pProp;
+}
+
+
// Aus dem Codegenerator: Ungueltige Eintraege entfernen
void SbModule::EndDefinitions( BOOL bNewState )
@@ -391,7 +411,8 @@ const String& SbModule::GetSource() const
void SbModule::SetParent( SbxObject* p )
{
- DBG_ASSERT( !p || p->IsA( TYPE(StarBASIC) ), "SbModules nur in BASIC eintragen" );
+ // #118083: Assertion is not valid any more
+ // DBG_ASSERT( !p || p->IsA( TYPE(StarBASIC) ), "SbModules nur in BASIC eintragen" );
pParent = p;
}
@@ -2173,4 +2194,9 @@ SbProperty::SbProperty( const String& r, SbxDataType t, SbModule* p )
SbProperty::~SbProperty()
{}
+/////////////////////////////////////////////////////////////////////////
+
+SbProcedureProperty::~SbProcedureProperty()
+{}
+