summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-11-15 15:34:02 +0000
committerRüdiger Timm <rt@openoffice.org>2004-11-15 15:34:02 +0000
commit8589c5e1586e7460f8c8f0268c92c2d6f36df125 (patch)
tree1cd720a8cb4bc628b2d895e55c3a9194bba84119 /basic
parent74a7b8a568fbe53c16ee9826006004b3d189e34f (diff)
INTEGRATION: CWS texteng03 (1.10.90); FILE MERGED
2004/10/29 13:22:17 ab 1.10.90.1: #111742# Enum support
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/image.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 683e98c10936..0824c728221e 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: image.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: rt $ $Date: 2003-12-01 16:26:51 $
+ * last change: $Author: rt $ $Date: 2004-11-15 16:34:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -72,7 +72,6 @@
SbiImage::SbiImage()
{
- rTypes = new SbxArray;
pStringOff = NULL;
pStrings = NULL;
pCode = NULL;
@@ -419,10 +418,20 @@ void SbiImage::AddCode( char* p, USHORT s )
void SbiImage::AddType(SbxObject* pObject) // User-Type mit aufnehmen
{
+ if( !rTypes.Is() )
+ rTypes = new SbxArray;
SbxObject *pCopyObject = new SbxObject(*pObject);
rTypes->Insert (pCopyObject,rTypes->Count());
}
+void SbiImage::AddEnum(SbxObject* pObject) // Register enum type
+{
+ if( !rEnums.Is() )
+ rEnums = new SbxArray;
+ rEnums->Insert( pObject, rEnums->Count() );
+}
+
+
/**************************************************************************
*
* Zugriffe auf das Image
@@ -444,6 +453,6 @@ String SbiImage::GetString( short nId ) const
const SbxObject* SbiImage::FindType (String aTypeName) const
{
- return (SbxObject *)rTypes->Find(aTypeName,SbxCLASS_OBJECT);
+ return rTypes.Is() ? (SbxObject*)rTypes->Find(aTypeName,SbxCLASS_OBJECT) : NULL;
}