summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-29 10:37:09 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-05 09:18:16 +0000
commitb7859cdc9bfc90878a6d17136920370ef6426372 (patch)
treee104982075478acb014cf911678abd28209dc2d9 /idl
parentf80d46233150d36183ec3e03708f9f6290c8c339 (diff)
don't inherit from ByteString
Diffstat (limited to 'idl')
-rw-r--r--idl/inc/basobj.hxx10
-rw-r--r--idl/inc/bastype.hxx16
-rw-r--r--idl/inc/module.hxx6
-rw-r--r--idl/inc/types.hxx2
-rw-r--r--idl/source/objects/basobj.cxx8
-rw-r--r--idl/source/objects/bastype.cxx18
-rw-r--r--idl/source/objects/module.cxx46
-rw-r--r--idl/source/objects/object.cxx46
-rw-r--r--idl/source/objects/slot.cxx106
-rw-r--r--idl/source/objects/types.cxx130
-rw-r--r--idl/source/prj/database.cxx16
11 files changed, 203 insertions, 201 deletions
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index d40aab316c18..a669f02fc247 100644
--- a/idl/inc/basobj.hxx
+++ b/idl/inc/basobj.hxx
@@ -153,7 +153,7 @@ public:
virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL );
void SetDescription( const ByteString& rText )
- { aDescription = rText; }
+ { aDescription.setString(rText); }
const SvHelpContext& GetHelpContext() const { return aHelpContext; }
virtual const SvString & GetName() const { return aName; }
virtual const SvString & GetHelpText() const { return aHelpText; }
@@ -183,7 +183,7 @@ public:
const SvString & GetName() const
{
return ( !aRef.Is()
- || SvMetaName::GetName().Len() )
+ || SvMetaName::GetName().getString().Len() )
? SvMetaName::GetName()
: aRef->GetName();
}
@@ -191,7 +191,7 @@ public:
const SvString & GetHelpText() const
{
return ( !aRef.Is()
- || SvMetaName::GetHelpText().Len() )
+ || SvMetaName::GetHelpText().getString().Len() )
? SvMetaName::GetHelpText()
: aRef->GetHelpText();
}
@@ -199,7 +199,7 @@ public:
const SvString & GetConfigName() const
{
return ( !aRef.Is()
- || SvMetaName::GetConfigName().Len() )
+ || SvMetaName::GetConfigName().getString().Len() )
? SvMetaName::GetConfigName()
: aRef->GetConfigName();
}
@@ -207,7 +207,7 @@ public:
const SvString & GetDescription() const
{
return ( !aRef.Is()
- || SvMetaName::GetDescription().Len() )
+ || SvMetaName::GetDescription().getString().Len() )
? SvMetaName::GetDescription()
: aRef->GetDescription();
}
diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx
index d52a38b9a81e..0231bd7357f8 100644
--- a/idl/inc/bastype.hxx
+++ b/idl/inc/bastype.hxx
@@ -164,11 +164,11 @@ public:
SvIdentifier()
{
}
- void setIdentifier(const ByteString & rStr)
+ void setString(const ByteString & rStr)
{
m_aStr = rStr;
}
- const ByteString& getIdentifier() const
+ const ByteString& getString() const
{
return m_aStr;
}
@@ -204,13 +204,15 @@ public:
};
-class SvString : public ByteString
+class SvString
{
+private:
+ ByteString m_aStr;
public:
- SvString(){};
- SvString & operator = ( const ByteString & rStr )
- { ByteString::operator =( rStr ); return *this; }
- sal_Bool IsSet() const { return Len() != 0; }
+ SvString() {}
+ void setString(const ByteString &rStr) { m_aStr = rStr; }
+ const ByteString& getString() const { return m_aStr; }
+ sal_Bool IsSet() const { return m_aStr.Len() != 0; }
friend SvStream& operator << (SvStream &, const SvString &);
friend SvStream& operator >> (SvStream &, SvString &);
diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx
index 633187c817cb..f1269321d8e1 100644
--- a/idl/inc/module.hxx
+++ b/idl/inc/module.hxx
@@ -68,12 +68,12 @@ public:
SvMetaModule();
const String & GetIdlFileName() const { return aIdlFileName; }
- const ByteString & GetModulePrefix() const { return aModulePrefix; }
+ const ByteString & GetModulePrefix() const { return aModulePrefix.getString(); }
virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL );
- const ByteString & GetHelpFileName() const { return aHelpFileName; }
- const ByteString & GetTypeLibFileName() const { return aTypeLibFile; }
+ const ByteString & GetHelpFileName() const { return aHelpFileName.getString(); }
+ const ByteString & GetTypeLibFileName() const { return aTypeLibFile.getString(); }
const SvMetaAttributeMemberList & GetAttrList() const { return aAttrList; }
const SvMetaTypeMemberList & GetTypeList() const { return aTypeList; }
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 0b7c4bacace6..921e4a9ec865 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -209,7 +209,7 @@ public:
int GetCall1() const;
void SetBasicName(const ByteString& rName)
- { aBasicName.setIdentifier(rName); }
+ { aBasicName.setString(rName); }
const ByteString & GetBasicName() const;
ByteString GetBasicPostfix() const;
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index 3d688a35c29d..a2c2a967bd2b 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -171,7 +171,7 @@ void SvMetaName::Save( SvPersistStream & rStm )
sal_Bool SvMetaName::SetName( const ByteString & rName, SvIdlDataBase * )
{
- aName = rName;
+ aName.setString(rName);
return sal_True;
}
@@ -196,7 +196,7 @@ void SvMetaName::ReadAttributesSvIdl( SvIdlDataBase & rBase,
sal_uInt32 nTokPos = rInStm.Tell();
if( aName.ReadSvIdl( SvHash_Name(), rInStm ) )
{
- if( !SetName( aName, &rBase ) )
+ if( !SetName( aName.getString(), &rBase ) )
rInStm.Seek( nTokPos );
}
aHelpContext.ReadSvIdl( rBase, SvHash_HelpContext(), rInStm );
@@ -237,7 +237,7 @@ void SvMetaName::WriteDescription( SvStream & rOutStm )
{
rOutStm << "<DESCRIPTION>" << endl;
- ByteString aDesc( GetDescription() );
+ ByteString aDesc( GetDescription().getString() );
sal_uInt16 nPos = aDesc.Search( '\n' );
while ( nPos != STRING_NOTFOUND )
{
@@ -389,7 +389,7 @@ void SvMetaName::WriteAttributes( SvIdlDataBase &, SvStream & rOutStm,
if( GetHelpText().IsSet() )
{
WriteTab( rOutStm, nTab );
- rOutStm << "helpstring(\"" << GetHelpText().GetBuffer() << "\")," << endl;
+ rOutStm << "helpstring(\"" << GetHelpText().getString().GetBuffer() << "\")," << endl;
}
if( GetHelpContext().IsSet() )
{
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index 7cefabc45ab3..19e3a1170fd6 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -222,19 +222,19 @@ sal_Bool SvIdentifier::WriteSvIdl( SvStringHashEntry * pName,
sal_uInt16 /*nTab */ )
{
rOutStm << pName->GetName().GetBuffer() << '(';
- rOutStm << getIdentifier().GetBuffer() << ')';
+ rOutStm << getString().GetBuffer() << ')';
return sal_True;
}
SvStream& operator << (SvStream & rStm, const SvIdentifier & r )
{
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, r.getIdentifier());
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, r.getString());
return rStm;
}
SvStream& operator >> (SvStream & rStm, SvIdentifier & r )
{
- r.setIdentifier(read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm));
+ r.setString(read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm));
return rStm;
}
@@ -246,7 +246,7 @@ sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
if( SvIdentifier::ReadSvIdl( pName, rInStm ) )
{
sal_uLong n;
- if( rBase.FindId( getIdentifier(), &n ) )
+ if( rBase.FindId( getString(), &n ) )
{
nValue = n;
return sal_True;
@@ -254,7 +254,7 @@ sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
else
{
ByteString aStr ("no value for identifier <");
- aStr += getIdentifier();
+ aStr += getString();
aStr += "> ";
rBase.SetError( aStr, rInStm.GetToken() );
rBase.WriteError( rInStm );
@@ -281,7 +281,7 @@ sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
else
{
ByteString aStr ("no value for identifier <");
- aStr += getIdentifier();
+ aStr += getString();
aStr += "> ";
rBase.SetError( aStr, rInStm.GetToken() );
rBase.WriteError( rInStm );
@@ -337,19 +337,19 @@ sal_Bool SvString::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
sal_uInt16 /*nTab */ )
{
rOutStm << pName->GetName().GetBuffer() << "(\"";
- rOutStm << GetBuffer() << "\")";
+ rOutStm << m_aStr.GetBuffer() << "\")";
return sal_True;
}
SvStream& operator << (SvStream & rStm, const SvString & r )
{
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, r);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, r.getString());
return rStm;
}
SvStream& operator >> (SvStream & rStm, SvString & r )
{
- r = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
+ r.setString(read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm));
return rStm;
}
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 8766f105a201..c91531613506 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -66,9 +66,9 @@ void SvMetaModule::Load( SvPersistStream & rStm )
rStm >> aAttrList;
// browser
rStm.ReadUniOrByteString( aIdlFileName, rStm.GetStreamCharSet() );
- aHelpFileName = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
- aSlotIdFile = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
- aModulePrefix = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
+ aHelpFileName.setString(read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm));
+ aSlotIdFile.setString(read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm));
+ aModulePrefix.setString(read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm));
// read compiler data
sal_uInt16 nCmpLen;
@@ -91,9 +91,9 @@ void SvMetaModule::Save( SvPersistStream & rStm )
rStm << aAttrList;
// browser
rStm.WriteUniOrByteString( aIdlFileName, rStm.GetStreamCharSet() );
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aHelpFileName);
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aSlotIdFile);
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aModulePrefix);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aHelpFileName.getString());
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aSlotIdFile.getString());
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aModulePrefix.getString());
// write compiler data
sal_uInt16 nCmpLen = 0;
@@ -141,10 +141,10 @@ void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase,
if( aSlotIdFile.ReadSvIdl( SvHash_SlotIdFile(), rInStm ) )
{
sal_uInt32 nTokPos = rInStm.Tell();
- if( !rBase.ReadIdFile( String::CreateFromAscii( aSlotIdFile.GetBuffer() ) ) )
+ if( !rBase.ReadIdFile( String::CreateFromAscii( aSlotIdFile.getString().GetBuffer() ) ) )
{
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("cannot read file: "));
- aStr.append(aSlotIdFile);
+ aStr.append(aSlotIdFile.getString());
rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() );
rBase.WriteError( rInStm );
@@ -160,21 +160,21 @@ void SvMetaModule::WriteAttributesSvIdl( SvIdlDataBase & rBase,
sal_uInt16 nTab )
{
SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab );
- if( aTypeLibFile.Len() || aSlotIdFile.Len() || aTypeLibFile.Len() )
+ if( aTypeLibFile.getString().Len() || aSlotIdFile.getString().Len() || aTypeLibFile.getString().Len() )
{
- if( aHelpFileName.Len() )
+ if( aHelpFileName.getString().Len() )
{
WriteTab( rOutStm, nTab );
aHelpFileName.WriteSvIdl( SvHash_HelpFile(), rOutStm, nTab +1 );
rOutStm << ';' << endl;
}
- if( aSlotIdFile.Len() )
+ if( aSlotIdFile.getString().Len() )
{
WriteTab( rOutStm, nTab );
aSlotIdFile.WriteSvIdl( SvHash_SlotIdFile(), rOutStm, nTab +1 );
rOutStm << ';' << endl;
}
- if( aTypeLibFile.Len() )
+ if( aTypeLibFile.getString().Len() )
{
WriteTab( rOutStm, nTab );
aTypeLibFile.WriteSvIdl( SvHash_TypeLibFile(), rOutStm, nTab +1 );
@@ -400,12 +400,12 @@ void SvMetaModule::WriteAttributes( SvIdlDataBase & rBase,
WriteType nT, WriteAttribute nA )
{
SvMetaExtern::WriteAttributes( rBase, rOutStm, nTab, nT, nA );
- if( aHelpFileName.Len() )
+ if( aHelpFileName.getString().Len() )
{
WriteTab( rOutStm, nTab );
rOutStm << "// class SvMetaModule" << endl;
WriteTab( rOutStm, nTab );
- rOutStm << "helpfile(\"" << aHelpFileName.GetBuffer() << "\");" << endl;
+ rOutStm << "helpfile(\"" << aHelpFileName.getString().GetBuffer() << "\");" << endl;
}
}
@@ -417,15 +417,15 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
{
case WRITE_ODL:
{
- if( aSlotIdFile.Len() )
+ if( aSlotIdFile.getString().Len() )
{
WriteTab( rOutStm, nTab );
- rOutStm << "#include \"" << aSlotIdFile.GetBuffer() << '"' << endl << endl;
+ rOutStm << "#include \"" << aSlotIdFile.getString().GetBuffer() << '"' << endl << endl;
}
SvMetaExtern::Write( rBase, rOutStm, nTab, nT, nA );
rOutStm << endl;
WriteTab( rOutStm, nTab );
- rOutStm << "library " << GetName().GetBuffer() << endl;
+ rOutStm << "library " << GetName().getString().GetBuffer() << endl;
WriteTab( rOutStm, nTab );
rOutStm << '{' << endl;
WriteTab( rOutStm, nTab );
@@ -450,7 +450,7 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
case WRITE_DOCU:
{
rOutStm << "SvIDL interface documentation" << endl << endl;
- rOutStm << "<MODULE>" << endl << GetName().GetBuffer() << endl;
+ rOutStm << "<MODULE>" << endl << GetName().getString().GetBuffer() << endl;
WriteDescription( rOutStm );
rOutStm << "</MODULE>" << endl << endl;
@@ -460,10 +460,10 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
SvMetaClass * pClass = aClassList.GetObject( n );
if( !pClass->IsShell() )
{
- rOutStm << pClass->GetName().GetBuffer();
+ rOutStm << pClass->GetName().getString().GetBuffer();
SvMetaClass* pSC = pClass->GetSuperClass();
if( pSC )
- rOutStm << " : " << pSC->GetName().GetBuffer();
+ rOutStm << " : " << pSC->GetName().getString().GetBuffer();
// imported classes
const SvClassElementMemberList& rClassList = pClass->GetClassList();
@@ -475,7 +475,7 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
{
SvClassElement *pEle = rClassList.GetObject(m);
SvMetaClass *pCl = pEle->GetClass();
- rOutStm << pCl->GetName().GetBuffer();
+ rOutStm << pCl->GetName().getString().GetBuffer();
if ( m+1 == rClassList.Count() )
rOutStm << " )";
else
@@ -510,8 +510,8 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
void SvMetaModule::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
Table * pTable )
{
- if( aSlotIdFile.Len() )
- rOutStm << "//#include <" << aSlotIdFile.GetBuffer() << '>' << endl;
+ if( aSlotIdFile.getString().Len() )
+ rOutStm << "//#include <" << aSlotIdFile.getString().GetBuffer() << '>' << endl;
for( sal_uLong n = 0; n < aClassList.Count(); n++ )
{
aClassList.GetObject( n )->WriteSrc( rBase, rOutStm, pTable );
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 24ed04af3080..92da00e6aaca 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -324,24 +324,24 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS
if ( !rAttr.GetRef() && rAttr.IsA( TYPE( SvMetaSlot ) ) )
{
OSL_FAIL( "Neuer Slot : " );
- OSL_FAIL( rAttr.GetSlotId().getIdentifier().GetBuffer() );
+ OSL_FAIL( rAttr.GetSlotId().getString().GetBuffer() );
}
for( sal_uLong n = 0; n < aAttrList.Count(); n++ )
{
SvMetaAttribute * pS = aAttrList.GetObject( n );
- if( pS->GetName() == rAttr.GetName() )
+ if( pS->GetName().getString() == rAttr.GetName().getString() )
{
// values have to match
if( pS->GetSlotId().GetValue() != rAttr.GetSlotId().GetValue() )
{
OSL_FAIL( "Gleicher Name in MetaClass : " );
- OSL_FAIL( pS->GetName().GetBuffer() );
- OSL_FAIL( pS->GetSlotId().getIdentifier().GetBuffer() );
- OSL_FAIL( rAttr.GetSlotId().getIdentifier().GetBuffer() );
+ OSL_FAIL( pS->GetName().getString().GetBuffer() );
+ OSL_FAIL( pS->GetSlotId().getString().GetBuffer() );
+ OSL_FAIL( rAttr.GetSlotId().getString().GetBuffer() );
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Attribute's "));
- aStr.append(pS->GetName());
+ aStr.append(pS->GetName().getString());
aStr.append(RTL_CONSTASCII_STRINGPARAM(" with different id's"));
rBase.SetError(aStr.makeStringAndClear(), rInStm.GetToken());
rBase.WriteError( rInStm );
@@ -357,13 +357,13 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS
OSL_FAIL( "Gleiche Id in MetaClass : " );
OSL_FAIL(rtl::OString::valueOf(static_cast<sal_Int32>(
pS->GetSlotId().GetValue())).getStr());
- OSL_FAIL( pS->GetSlotId().getIdentifier().GetBuffer() );
- OSL_FAIL( rAttr.GetSlotId().getIdentifier().GetBuffer() );
+ OSL_FAIL( pS->GetSlotId().getString().GetBuffer() );
+ OSL_FAIL( rAttr.GetSlotId().getString().GetBuffer() );
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Attribute "));
- aStr.append(pS->GetName());
+ aStr.append(pS->GetName().getString());
aStr.append(RTL_CONSTASCII_STRINGPARAM(" and Attribute "));
- aStr.append(rAttr.GetName());
+ aStr.append(rAttr.GetName().getString());
aStr.append(RTL_CONSTASCII_STRINGPARAM(" with equal id's"));
rBase.SetError(aStr.makeStringAndClear(), rInStm.GetToken());
rBase.WriteError( rInStm );
@@ -382,7 +382,7 @@ void SvMetaClass::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
{
WriteHeaderSvIdl( rBase, rOutStm, nTab );
if( aSuperClass.Is() )
- rOutStm << " : " << aSuperClass->GetName().GetBuffer();
+ rOutStm << " : " << aSuperClass->GetName().getString().GetBuffer();
rOutStm << endl;
SvMetaName::WriteSvIdl( rBase, rOutStm, nTab );
rOutStm << endl;
@@ -392,7 +392,7 @@ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab,
WriteType nT, WriteAttribute )
{
- rBase.aIFaceName = GetName();
+ rBase.aIFaceName = GetName().getString();
switch( nT )
{
case WRITE_ODL:
@@ -409,7 +409,7 @@ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
case WRITE_DOCU:
{
rOutStm << "<INTERFACE>" << endl
- << GetName().GetBuffer();
+ << GetName().getString().GetBuffer();
if ( GetAutomation() )
rOutStm << " ( Automation ) ";
rOutStm << endl;
@@ -573,10 +573,10 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
{
WriteStars( rOutStm );
// define class
- rOutStm << "#ifdef " << GetName().GetBuffer() << endl;
+ rOutStm << "#ifdef " << GetName().getString().GetBuffer() << endl;
rOutStm << "#undef ShellClass" << endl;
- rOutStm << "#undef " << GetName().GetBuffer() << endl;
- rOutStm << "#define ShellClass " << GetName().GetBuffer() << endl;
+ rOutStm << "#undef " << GetName().getString().GetBuffer() << endl;
+ rOutStm << "#define ShellClass " << GetName().getString().GetBuffer() << endl;
// no slotmaps get written for interfaces
if( !IsShell() )
@@ -585,7 +585,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
return;
}
// write parameter array
- rOutStm << "SFX_ARGUMENTMAP(" << GetName().GetBuffer() << ')' << endl
+ rOutStm << "SFX_ARGUMENTMAP(" << GetName().getString().GetBuffer() << ')' << endl
<< '{' << endl;
std::vector<sal_uLong> aSuperList;
@@ -614,7 +614,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
rOutStm << endl << "};" << endl << endl;
ByteStringList aStringList;
- WriteSlotStubs( GetName(), aSlotList, aStringList, rOutStm );
+ WriteSlotStubs( GetName().getString(), aSlotList, aStringList, rOutStm );
for ( size_t i = 0, n = aStringList.size(); i < n; ++i )
delete aStringList[ i ];
aStringList.clear();
@@ -622,18 +622,18 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
rOutStm << endl;
// write slotmap
- rOutStm << "SFX_SLOTMAP_ARG(" << GetName().GetBuffer() << ')' << endl
+ rOutStm << "SFX_SLOTMAP_ARG(" << GetName().getString().GetBuffer() << ')' << endl
<< '{' << endl;
// write all attributes
- WriteSlots( GetName(), 0, aSlotList, rBase, rOutStm );
+ WriteSlots( GetName().getString(), 0, aSlotList, rBase, rOutStm );
if( nSlotCount )
Back2Delemitter( rOutStm );
else
{
// at least one dummy
WriteTab( rOutStm, 1 );
- rOutStm << "SFX_SLOT_ARG(" << GetName().GetBuffer()
+ rOutStm << "SFX_SLOT_ARG(" << GetName().getString().GetBuffer()
<< ", 0, 0, "
<< "SFX_STUB_PTR_EXEC_NONE,"
<< "SFX_STUB_PTR_STATE_NONE,"
@@ -677,7 +677,7 @@ void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 )
{
ByteString aSuperName( "SvDispatch" );
if( GetSuperClass() )
- aSuperName = GetSuperClass()->GetName();
+ aSuperName = GetSuperClass()->GetName().getString();
const char * pSup = aSuperName.GetBuffer();
rOutStm
@@ -702,7 +702,7 @@ void SvMetaClass::WriteCxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 )
{
ByteString aSuperName( "SvDispatch" );
if( GetSuperClass() )
- aSuperName = GetSuperClass()->GetName();
+ aSuperName = GetSuperClass()->GetName().getString();
const char * pSup = aSuperName.GetBuffer();
ByteString name = GetSvName();
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 0502c71a8c54..0728f0ce6bc0 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -172,12 +172,12 @@ void SvMetaSlot::Save( SvPersistStream & rStm )
// create mask
sal_uInt16 nMask = 0;
if( aMethod.Is() ) nMask |= 0x0001;
- if( aGroupId.getIdentifier().Len() ) nMask |= 0x0002;
+ if( aGroupId.getString().Len() ) nMask |= 0x0002;
if( aHasCoreId.IsSet() ) nMask |= 0x0004;
- if( aConfigId.getIdentifier().Len() ) nMask |= 0x0008;
- if( aExecMethod.getIdentifier().Len() ) nMask |= 0x0010;
- if( aStateMethod.getIdentifier().Len() ) nMask |= 0x0020;
- if( aDefault.getIdentifier().Len() ) nMask |= 0x0040;
+ if( aConfigId.getString().Len() ) nMask |= 0x0008;
+ if( aExecMethod.getString().Len() ) nMask |= 0x0010;
+ if( aStateMethod.getString().Len() ) nMask |= 0x0020;
+ if( aDefault.getString().Len() ) nMask |= 0x0040;
if( aPseudoSlots.IsSet() ) nMask |= 0x0080;
if( aGet.IsSet() ) nMask |= 0x0100;
if( aSet.IsSet() ) nMask |= 0x0200;
@@ -231,7 +231,7 @@ void SvMetaSlot::Save( SvPersistStream & rStm )
if( aNoRecord.IsSet() ) nMask |= 0x0004;
if( aHasDialog.IsSet() ) nMask |= 0x0008;
if ( aDisableFlags.IsSet() ) nMask |= 0x0010;
- if( aPseudoPrefix.getIdentifier().Len() ) nMask |= 0x0020;
+ if( aPseudoPrefix.getString().Len() ) nMask |= 0x0020;
if( aRecordPerSet.IsSet() ) nMask |= 0x0040;
if( aMenuConfig.IsSet() ) nMask |= 0x0080;
if( aToolBoxConfig.IsSet() ) nMask |= 0x0100;
@@ -306,9 +306,9 @@ rtl::OString SvMetaSlot::GetMangleName( sal_Bool bVariable ) const
{
SvMetaAttribute * pMeth = GetMethod();
if( pMeth )
- return pMeth->GetName();
+ return pMeth->GetName().getString();
}
- return GetName();
+ return GetName().getString();
}
/*************************************************************************
@@ -335,32 +335,32 @@ sal_Bool SvMetaSlot::GetHasCoreId() const
}
const ByteString & SvMetaSlot::GetGroupId() const
{
- if( aGroupId.getIdentifier().Len() || !GetRef() ) return aGroupId.getIdentifier();
+ if( aGroupId.getString().Len() || !GetRef() ) return aGroupId.getString();
return ((SvMetaSlot *)GetRef())->GetGroupId();
}
const ByteString & SvMetaSlot::GetDisableFlags() const
{
- if( aDisableFlags.Len() || !GetRef() ) return aDisableFlags;
+ if( aDisableFlags.getString().Len() || !GetRef() ) return aDisableFlags.getString();
return ((SvMetaSlot *)GetRef())->GetDisableFlags();
}
const ByteString & SvMetaSlot::GetConfigId() const
{
- if( aConfigId.getIdentifier().Len() || !GetRef() ) return aConfigId.getIdentifier();
+ if( aConfigId.getString().Len() || !GetRef() ) return aConfigId.getString();
return ((SvMetaSlot *)GetRef())->GetConfigId();
}
const ByteString & SvMetaSlot::GetExecMethod() const
{
- if( aExecMethod.getIdentifier().Len() || !GetRef() ) return aExecMethod.getIdentifier();
+ if( aExecMethod.getString().Len() || !GetRef() ) return aExecMethod.getString();
return ((SvMetaSlot *)GetRef())->GetExecMethod();
}
const ByteString & SvMetaSlot::GetStateMethod() const
{
- if( aStateMethod.getIdentifier().Len() || !GetRef() ) return aStateMethod.getIdentifier();
+ if( aStateMethod.getString().Len() || !GetRef() ) return aStateMethod.getString();
return ((SvMetaSlot *)GetRef())->GetStateMethod();
}
const ByteString & SvMetaSlot::GetDefault() const
{
- if( aDefault.getIdentifier().Len() || !GetRef() ) return aDefault.getIdentifier();
+ if( aDefault.getString().Len() || !GetRef() ) return aDefault.getString();
return ((SvMetaSlot *)GetRef())->GetDefault();
}
sal_Bool SvMetaSlot::GetPseudoSlots() const
@@ -451,7 +451,7 @@ sal_Bool SvMetaSlot::GetHasDialog() const
}
const ByteString & SvMetaSlot::GetPseudoPrefix() const
{
- if( aPseudoPrefix.getIdentifier().Len() || !GetRef() ) return aPseudoPrefix.getIdentifier();
+ if( aPseudoPrefix.getString().Len() || !GetRef() ) return aPseudoPrefix.getString();
return ((SvMetaSlot *)GetRef())->GetPseudoPrefix();
}
sal_Bool SvMetaSlot::GetMenuConfig() const
@@ -499,7 +499,7 @@ sal_Bool SvMetaSlot::GetImageReflection() const
const ByteString& SvMetaSlot::GetUnoName() const
{
- if( aUnoName.IsSet() || !GetRef() ) return aUnoName;
+ if( aUnoName.IsSet() || !GetRef() ) return aUnoName.getString();
return ((SvMetaSlot *)GetRef())->GetUnoName();
}
@@ -653,26 +653,26 @@ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase,
aHasCoreId.WriteSvIdl( SvHash_HasCoreId(), rOutStm );
rOutStm << ';' << endl;
}
- if( aGroupId.getIdentifier().Len() )
+ if( aGroupId.getString().Len() )
{
WriteTab( rOutStm, nTab );
aGroupId.WriteSvIdl( SvHash_GroupId(), rOutStm, nTab +1);
rOutStm << ';' << endl;
}
- if( aExecMethod.getIdentifier().Len() )
+ if( aExecMethod.getString().Len() )
{
WriteTab( rOutStm, nTab );
aExecMethod.WriteSvIdl( SvHash_ExecMethod(), rOutStm, nTab +1);
rOutStm << ';' << endl;
}
- if( aStateMethod.getIdentifier().Len() )
+ if( aStateMethod.getString().Len() )
{
WriteTab( rOutStm, nTab );
aStateMethod.WriteSvIdl( SvHash_StateMethod(), rOutStm, nTab +1);
rOutStm << ';' << endl;
}
- if( aDisableFlags.Len() )
+ if( aDisableFlags.getString().Len() )
{
WriteTab( rOutStm, nTab );
aDisableFlags.WriteSvIdl( SvHash_DisableFlags(), rOutStm, nTab +1);
@@ -837,13 +837,13 @@ sal_Bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
if( pKnownSlot )
{
SetRef( pKnownSlot );
- SetName( pKnownSlot->GetName(), &rBase );
+ SetName( pKnownSlot->GetName().getString(), &rBase );
bOk = SvMetaName::ReadSvIdl( rBase, rInStm );
}
else
{
rtl::OStringBuffer aStr( "attribute " );
- aStr.append(pAttr->GetName());
+ aStr.append(pAttr->GetName().getString());
aStr.append(" is method or variable but not a slot");
rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() );
rBase.WriteError( rInStm );
@@ -864,19 +864,19 @@ sal_Bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
SetRef( pKnownSlot );
// names may differ, because explicitly given
- if ( pKnownSlot->GetName() != GetName() )
+ if ( pKnownSlot->GetName().getString() != GetName().getString() )
{
OSL_FAIL("Illegal definition!");
rInStm.Seek( nTokPos );
return sal_False;
}
- SetName( pKnownSlot->GetName(), &rBase );
+ SetName( pKnownSlot->GetName().getString(), &rBase );
}
else
{
rtl::OStringBuffer aStr("attribute ");
- aStr.append(pAttr2->GetName());
+ aStr.append(pAttr2->GetName().getString());
aStr.append(" is method or variable but not a slot");
rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() );
rBase.WriteError( rInStm );
@@ -919,7 +919,7 @@ void SvMetaSlot::Write( SvIdlDataBase & rBase,
if( xM.Is() )
{
xM->SetSlotId( GetSlotId() );
- xM->SetDescription( GetDescription() );
+ xM->SetDescription( GetDescription().getString() );
xM->Write( rBase, rOutStm, nTab, nT, nA );
return;
}
@@ -1008,12 +1008,12 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix,
{
// create SlotId
SvMetaEnumValue *enumValue = pEnum->GetObject(n);
- ByteString aValName = enumValue->GetName();
+ ByteString aValName = enumValue->GetName().getString();
rtl::OStringBuffer aBuf;
if( GetPseudoPrefix().Len() )
aBuf.append(GetPseudoPrefix());
else
- aBuf.append(GetSlotId().getIdentifier());
+ aBuf.append(GetSlotId().getString());
aBuf.append('_');
aBuf.append(aValName.Copy(pEnum->GetPrefix().Len()));
@@ -1023,7 +1023,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix,
for( m=0; m<rBase.GetAttrList().Count(); m++ )
{
SvMetaAttribute * pAttr = rBase.GetAttrList().GetObject( m );
- if (aSId.equals(pAttr->GetSlotId().getIdentifier()))
+ if (aSId.equals(pAttr->GetSlotId().getString()))
{
SvMetaSlot* pSlot = PTR_CAST( SvMetaSlot, pAttr );
xEnumSlot = pSlot->Clone();
@@ -1039,7 +1039,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix,
if ( rBase.FindId(aSId , &nValue) )
{
SvNumberIdentifier aId;
- aId.setIdentifier(aSId);
+ aId.setString(aSId);
aId.SetValue(nValue);
xEnumSlot->SetSlotId(aId);
}
@@ -1171,7 +1171,7 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
rOutStm << rSlotId.GetBuffer() << ',';
const SvHelpContext& rHlpCtx = GetHelpContext();
if( rHlpCtx.IsSet() )
- rOutStm << rHlpCtx.getIdentifier().GetBuffer() << ',';
+ rOutStm << rHlpCtx.getString().GetBuffer() << ',';
else
rOutStm << rSlotId.GetBuffer() << ',';
@@ -1196,12 +1196,12 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
WriteTab( rOutStm, 4 );
// SlotId
- if( GetSlotId().getIdentifier().Len() )
- rOutStm << pLinkedSlot->GetSlotId().getIdentifier().GetBuffer();
+ if( GetSlotId().getString().Len() )
+ rOutStm << pLinkedSlot->GetSlotId().getString().GetBuffer();
else
rOutStm << '0';
rOutStm << ',';
- rOutStm << pEnumValue->GetName().GetBuffer();
+ rOutStm << pEnumValue->GetName().getString().GetBuffer();
}
else
{
@@ -1344,7 +1344,7 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
}
if( pT )
{
- rOutStm << pT->GetName().GetBuffer();
+ rOutStm << pT->GetName().getString().GetBuffer();
if( !rBase.FindType( pT, rBase.aUsedTypes ) )
rBase.aUsedTypes.Append( pT );
}
@@ -1445,11 +1445,11 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO
SvMetaType * pPType = pPar->GetType();
WriteTab( rOutStm, 1 );
rOutStm << "SFX_ARGUMENT("
- << pPar->GetSlotId().getIdentifier().GetBuffer() << ',' // SlodId
+ << pPar->GetSlotId().getString().GetBuffer() << ',' // SlodId
// parameter name
- << "\"" << pPar->GetName().GetBuffer() << "\","
+ << "\"" << pPar->GetName().getString().GetBuffer() << "\","
// item name
- << pPType->GetName().GetBuffer() << ")," << endl;
+ << pPType->GetName().getString().GetBuffer() << ")," << endl;
if( !rBase.FindType( pPType, rBase.aUsedTypes ) )
rBase.aUsedTypes.Append( pPType );
}
@@ -1466,7 +1466,7 @@ sal_uInt16 SvMetaSlot::WriteSlotMap( const ByteString & rShellName, sal_uInt16 n
SvStream & rOutStm )
{
// SlotId, if not specified generate from name
- ByteString slotId = GetSlotId().getIdentifier();
+ ByteString slotId = GetSlotId().getString();
sal_uInt16 nSCount = 0;
if( IsMethod() )
@@ -1500,13 +1500,13 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
<< endl << '{' << endl;
WriteTab( rOutStm, 1 );
- ByteString aStr = GetConfigName();
+ ByteString aStr = GetConfigName().getString();
if( !aStr.Len() )
- aStr = GetName();
+ aStr = GetName().getString();
rOutStm << "SlotName = \"" << aStr.GetBuffer() << "\";" << endl;
- aStr = GetHelpText();
+ aStr = GetHelpText().getString();
if( aStr.Len() )
{
WriteTab( rOutStm, 1 );
@@ -1521,12 +1521,12 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
{
for( sal_uLong n = 0; n < pEnum->Count(); n++ )
{
- ByteString aValName = pEnum->GetObject( n )->GetName();
+ ByteString aValName = pEnum->GetObject( n )->GetName().getString();
rtl::OStringBuffer aBuf;
if( GetPseudoPrefix().Len() )
aBuf.append(GetPseudoPrefix());
else
- aBuf.append(GetSlotId().getIdentifier());
+ aBuf.append(GetSlotId().getString());
aBuf.append('_');
aBuf.append(aValName.Copy(pEnum->GetPrefix().Len()));
@@ -1550,7 +1550,7 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
WriteTab( rOutStm, 1 );
rOutStm << "SlotName = \"" << aValName.GetBuffer() << "\";" << endl;
- ByteString aStr = GetHelpText();
+ ByteString aStr = GetHelpText().getString();
if( aStr.Len() )
{
WriteTab( rOutStm, 1 );
@@ -1569,7 +1569,7 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
if( !pTable->IsKeyValid( nSId ) )
{
pTable->Insert( nSId, this );
- rOutStm << "#define " << GetSlotId().getIdentifier().GetBuffer() << '\t'
+ rOutStm << "#define " << GetSlotId().getString().GetBuffer() << '\t'
<< rtl::OString::valueOf(static_cast<sal_Int32>(nSId)).getStr()
<< endl;
}
@@ -1579,13 +1579,13 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
{
for( sal_uLong n = 0; n < pEnum->Count(); n++ )
{
- ByteString aValName = pEnum->GetObject( n )->GetName();
+ ByteString aValName = pEnum->GetObject( n )->GetName().getString();
rtl::OStringBuffer aBuf;
if( GetPseudoPrefix().Len() )
aBuf.append(GetPseudoPrefix());
else
- aBuf.append(GetSlotId().getIdentifier());
+ aBuf.append(GetSlotId().getString());
aBuf.append('_');
aBuf.append(aValName.Copy(pEnum->GetPrefix().Len()));
@@ -1624,7 +1624,7 @@ void WriteBool( sal_Bool bSet, SvStream& rStream )
void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
{
rStrm << "PROJECT,";
- rStrm << GetSlotId().getIdentifier().GetBuffer() << ',';
+ rStrm << GetSlotId().getString().GetBuffer() << ',';
rStrm
<< rtl::OString::valueOf(
static_cast<sal_Int32>(GetSlotId().GetValue())).getStr()
@@ -1643,7 +1643,7 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
WriteBool( GetToolBoxConfig(), rStrm );
if ( GetSlotType() )
- rStrm << GetSlotType()->GetName().GetBuffer() << ',';
+ rStrm << GetSlotType()->GetName().getString().GetBuffer() << ',';
else
rStrm << ',';
@@ -1683,8 +1683,8 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
if ( GetType()->GetType() != TYPE_METHOD && GetMethod() )
{
- rStrm << GetMethod()->GetType()->GetReturnType()->GetName().GetBuffer() << ',';
- rStrm << GetMethod()->GetName().GetBuffer() << ',';
+ rStrm << GetMethod()->GetType()->GetReturnType()->GetName().getString().GetBuffer() << ',';
+ rStrm << GetMethod()->GetName().getString().GetBuffer() << ',';
}
else
{
@@ -1692,7 +1692,7 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
}
rStrm << GetType()->GetSvName().GetBuffer() << ',';
- rStrm << GetName().GetBuffer() << ',';
+ rStrm << GetName().getString().GetBuffer() << ',';
if ( GetType()->GetType() == TYPE_METHOD || GetMethod() )
{
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 4c64b21cd025..a37ba18c593e 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -185,7 +185,7 @@ sal_Bool SvMetaAttribute::IsVariable() const
rtl::OString SvMetaAttribute::GetMangleName( sal_Bool ) const
{
- return GetName();
+ return GetName().getString();
}
sal_Bool SvMetaAttribute::Test( SvIdlDataBase & rBase,
@@ -243,9 +243,9 @@ void SvMetaAttribute::WriteSvIdl
{
SvMetaType * pType = GetType();
pType->WriteTypePrefix( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm << ' ' << GetName().GetBuffer();
+ rOutStm << ' ' << GetName().getString().GetBuffer();
if( aSlotId.IsSet() )
- rOutStm << ' ' << aSlotId.getIdentifier().GetBuffer();
+ rOutStm << ' ' << aSlotId.getString().GetBuffer();
if( pType->GetType() == TYPE_METHOD )
pType->WriteMethodArgs( rBase, rOutStm, nTab, WRITE_IDL );
sal_uLong nPos = rOutStm.Tell();
@@ -361,10 +361,10 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
}
- if( GetName().Len() )
+ if( GetName().getString().Len() )
{
rOutStm << ' ';
- rOutStm << GetName().GetBuffer();
+ rOutStm << GetName().getString().GetBuffer();
}
if ( nT == WRITE_DOCU )
@@ -386,7 +386,7 @@ sal_uLong SvMetaAttribute::MakeSlotValue( SvIdlDataBase & rBase, sal_Bool bVar )
{
const SvNumberIdentifier & rId = GetSlotId();
sal_uLong n = rId.GetValue();
- if( rBase.aStructSlotId.getIdentifier().Len() )
+ if( rBase.aStructSlotId.getString().Len() )
{
n = n << 20;
n += rBase.aStructSlotId.GetValue();
@@ -444,7 +444,7 @@ void SvMetaAttribute::WriteCSource( SvIdlDataBase & rBase, SvStream & rOutStm,
// for Set the return is always void
sal_Bool bVoid = bSet;
if( pBaseType->GetType() == TYPE_METHOD )
- bVoid = pBaseType->GetReturnType()->GetBaseType()->GetName() == "void";
+ bVoid = pBaseType->GetReturnType()->GetBaseType()->GetName().getString() == "void";
// emit methods/functions body
rOutStm << '{' << endl;
@@ -502,7 +502,7 @@ void SvMetaAttribute::WriteCSource( SvIdlDataBase & rBase, SvStream & rOutStm,
if( IsMethod() )
pBaseType->WriteParamNames( rBase, rOutStm, ByteString() );
else if( bSet )
- pBaseType->WriteParamNames( rBase, rOutStm, GetName() );
+ pBaseType->WriteParamNames( rBase, rOutStm, GetName().getString() );
}
rOutStm << " );" << endl;
@@ -517,7 +517,7 @@ void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase,
sal_uLong nCount = rList.Count();
SvNumberIdentifier slotId = rBase.aStructSlotId;
- if ( GetSlotId().getIdentifier().Len() )
+ if ( GetSlotId().getString().Len() )
rBase.aStructSlotId = GetSlotId();
// offial hack interface by MM: special controls get passed with the WriteAttribute
@@ -528,7 +528,7 @@ void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase,
{
SvMetaAttribute *pAttr = rList.GetObject( i );
if ( nT == WRITE_DOCU )
- pAttr->SetDescription( GetDescription() );
+ pAttr->SetDescription( GetDescription().getString() );
pAttr->Write( rBase, rOutStm, nTab, nT, nA );
if( nT == WRITE_ODL && i +1 < nCount )
rOutStm << ';' << endl;
@@ -576,10 +576,10 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
WriteTab( rOutStm, nTab );
pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
- if( GetName().Len() )
+ if( GetName().getString().Len() )
{
rOutStm << ' ';
- rOutStm << GetName().GetBuffer();
+ rOutStm << GetName().getString().GetBuffer();
}
if( pType->GetType() == TYPE_METHOD )
pType->WriteMethodArgs( rBase, rOutStm, nTab, nT );
@@ -592,7 +592,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
{
ByteString name;
name += rBase.aIFaceName;
- name += GetName();
+ name += GetName().getString();
const char * pName = name.GetBuffer();
WriteTab( rOutStm, nTab );
pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
@@ -608,13 +608,13 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
if( nBType == TYPE_STRUCT )
{
// for assistance emit the name of the property as acomment
- rOutStm << "/* " << GetName().GetBuffer() << " */" << endl;
+ rOutStm << "/* " << GetName().getString().GetBuffer() << " */" << endl;
WriteRecursiv_Impl( rBase, rOutStm, nTab, nT, nA );
}
else
{
- ByteString name = GetName();
+ ByteString name = GetName().getString();
sal_Bool bReadonly = GetReadonly() || ( nA & WA_READONLY );
if ( !bReadonly && !IsMethod() )
@@ -653,8 +653,8 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
if( !bVariable && IsMethod() )
{
rOutStm << "<METHOD>" << endl
- << GetSlotId().getIdentifier().GetBuffer() << endl
- << GetName().GetBuffer() << endl
+ << GetSlotId().getString().GetBuffer() << endl
+ << GetName().getString().GetBuffer() << endl
<< endl; // readonly
// return type
@@ -666,7 +666,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
"Leerer BasicName" );
// syntax
- rOutStm << GetName().GetBuffer();
+ rOutStm << GetName().getString().GetBuffer();
pType2->WriteMethodArgs( rBase, rOutStm, nTab, nT );
// C return type
@@ -691,8 +691,8 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
else
{
rOutStm << "<PROPERTY>" << endl
- << GetSlotId().getIdentifier().GetBuffer() << endl
- << GetName().GetBuffer() << endl;
+ << GetSlotId().getString().GetBuffer() << endl
+ << GetName().getString().GetBuffer() << endl;
if ( GetReadonly() )
rOutStm << "(nur lesen)" << endl;
else
@@ -730,9 +730,9 @@ sal_uLong SvMetaAttribute::MakeSfx( rtl::OStringBuffer& rAttrArray )
else
{
rAttrArray.append('{');
- rAttrArray.append(GetSlotId().getIdentifier());
+ rAttrArray.append(GetSlotId().getString());
rAttrArray.append(",\"");
- rAttrArray.append(GetName());
+ rAttrArray.append(GetName().getString());
rAttrArray.append("\"}");
return 1;
}
@@ -772,7 +772,7 @@ SvMetaType::SvMetaType( const rtl::OString& rName, char cPC,
{
SetName( rName );
cParserChar = cPC;
- aCName.setIdentifier(rCName);
+ aCName.setString(rCName);
}
SvMetaType::SvMetaType( const rtl::OString& rName,
@@ -785,12 +785,12 @@ SvMetaType::SvMetaType( const rtl::OString& rName,
CTOR
{
SetName( rName );
- aSbxName.setIdentifier(rSbxName);
- aOdlName.setIdentifier(rOdlName);
+ aSbxName.setString(rSbxName);
+ aOdlName.setString(rOdlName);
cParserChar = cPc;
- aCName.setIdentifier(rCName);
- aBasicName.setIdentifier(rBasicName);
- aBasicPostfix.setIdentifier(rBasicPostfix);
+ aCName.setString(rCName);
+ aBasicName.setString(rBasicName);
+ aBasicPostfix.setString(rBasicPostfix);
}
void SvMetaType::Load( SvPersistStream & rStm )
@@ -875,13 +875,13 @@ void SvMetaType::SetType( int nT )
nType = nT;
if( nType == TYPE_ENUM )
{
- aOdlName.setIdentifier("short");
+ aOdlName.setString("short");
}
else if( nType == TYPE_CLASS )
{
ByteString aTmp(C_PREF);
aTmp += "Object *";
- aCName.setIdentifier(aTmp);
+ aCName.setString(aTmp);
}
}
@@ -902,7 +902,7 @@ SvMetaType * SvMetaType::GetReturnType() const
const ByteString& SvMetaType::GetBasicName() const
{
if( aBasicName.IsSet() || !GetRef() )
- return aBasicName.getIdentifier();
+ return aBasicName.getString();
else
return ((SvMetaType*)GetRef())->GetBasicName();
}
@@ -989,7 +989,7 @@ int SvMetaType::GetCall1() const
const ByteString & SvMetaType::GetSvName() const
{
if( aSvName.IsSet() || !GetRef() )
- return aSvName.getIdentifier();
+ return aSvName.getString();
else
return ((SvMetaType *)GetRef())->GetSvName();
}
@@ -997,7 +997,7 @@ const ByteString & SvMetaType::GetSvName() const
const ByteString & SvMetaType::GetSbxName() const
{
if( aSbxName.IsSet() || !GetRef() )
- return aSbxName.getIdentifier();
+ return aSbxName.getString();
else
return ((SvMetaType *)GetRef())->GetSbxName();
}
@@ -1005,7 +1005,7 @@ const ByteString & SvMetaType::GetSbxName() const
const ByteString & SvMetaType::GetOdlName() const
{
if( aOdlName.IsSet() || !GetRef() )
- return aOdlName.getIdentifier();
+ return aOdlName.getString();
else
return ((SvMetaType *)GetRef())->GetOdlName();
}
@@ -1013,18 +1013,18 @@ const ByteString & SvMetaType::GetOdlName() const
const ByteString & SvMetaType::GetCName() const
{
if( aCName.IsSet() || !GetRef() )
- return aCName.getIdentifier();
+ return aCName.getString();
else
return ((SvMetaType *)GetRef())->GetCName();
}
sal_Bool SvMetaType::SetName( const ByteString & rName, SvIdlDataBase * pBase )
{
- aSvName.setIdentifier(rName);
- aSbxName.setIdentifier(rName);
- aCName.setIdentifier(rName);
+ aSvName.setString(rName);
+ aSbxName.setString(rName);
+ aCName.setString(rName);
if( GetType() != TYPE_ENUM )
- aOdlName.setIdentifier(rName);
+ aOdlName.setString(rName);
return SvMetaReference::SetName( rName, pBase );
}
@@ -1173,7 +1173,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
// write only enum
return;
- ByteString name = GetName();
+ ByteString name = GetName().getString();
if( nT == WRITE_ODL || nT == WRITE_C_HEADER || nT == WRITE_CXX_HEADER )
{
switch( nType )
@@ -1265,25 +1265,25 @@ void SvMetaType::WriteHeaderSvIdl( SvIdlDataBase & rBase,
rOutStm << SvHash_shell()->GetName().GetBuffer();
else
rOutStm << SvHash_interface()->GetName().GetBuffer();
- rOutStm << ' ' << GetName().GetBuffer();
+ rOutStm << ' ' << GetName().getString().GetBuffer();
}
break;
case TYPE_STRUCT:
{
rOutStm << SvHash_struct()->GetName().GetBuffer()
- << ' ' << GetName().GetBuffer();
+ << ' ' << GetName().getString().GetBuffer();
}
break;
case TYPE_UNION:
{
rOutStm << SvHash_union()->GetName().GetBuffer()
- << ' ' << GetName().GetBuffer();
+ << ' ' << GetName().getString().GetBuffer();
}
break;
case TYPE_ENUM:
{
rOutStm << SvHash_enum()->GetName().GetBuffer()
- << ' ' << GetName().GetBuffer();
+ << ' ' << GetName().getString().GetBuffer();
}
break;
case TYPE_POINTER:
@@ -1298,14 +1298,14 @@ void SvMetaType::WriteHeaderSvIdl( SvIdlDataBase & rBase,
((SvMetaType *)GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
rOutStm << ' ';
}
- rOutStm << GetName().GetBuffer();
+ rOutStm << GetName().getString().GetBuffer();
}
break;
case TYPE_METHOD:
{
rOutStm << SvHash_typedef()->GetName().GetBuffer() << ' ';
((SvMetaType *)GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm << ' ' << GetName().GetBuffer() << "( ";
+ rOutStm << ' ' << GetName().getString().GetBuffer() << "( ";
WriteContextSvIdl( rBase, rOutStm, nTab );
rOutStm << " )";
}
@@ -1327,24 +1327,24 @@ void SvMetaType::WriteAttributesSvIdl( SvIdlDataBase & rBase,
sal_uInt16 nTab )
{
SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab );
- ByteString name = GetName();
- if( aSvName.getIdentifier() != name || aSbxName.getIdentifier() != name || aOdlName.getIdentifier() != name )
+ ByteString name = GetName().getString();
+ if( aSvName.getString() != name || aSbxName.getString() != name || aOdlName.getString() != name )
{
WriteTab( rOutStm, nTab );
rOutStm << "class SvMetaType" << endl;
- if( aSvName.getIdentifier() != name )
+ if( aSvName.getString() != name )
{
WriteTab( rOutStm, nTab );
aSvName.WriteSvIdl( SvHash_SvName(), rOutStm, nTab );
rOutStm << endl;
}
- if( aSbxName.getIdentifier() != name )
+ if( aSbxName.getString() != name )
{
WriteTab( rOutStm, nTab );
aSbxName.WriteSvIdl( SvHash_SbxName(), rOutStm, nTab );
rOutStm << endl;
}
- if( aOdlName.getIdentifier() != name )
+ if( aOdlName.getString() != name )
{
WriteTab( rOutStm, nTab );
aOdlName.WriteSvIdl( SvHash_OdlName(), rOutStm, nTab );
@@ -1453,9 +1453,9 @@ void SvMetaType::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
if( IsItem() )
{
if( GetBaseType()->GetType() == TYPE_STRUCT )
- GetBaseType()->WriteSfxItem( GetName(), rBase, rOutStm );
+ GetBaseType()->WriteSfxItem( GetName().getString(), rBase, rOutStm );
else
- WriteSfxItem( GetName(), rBase, rOutStm );
+ WriteSfxItem( GetName().getString(), rBase, rOutStm );
}
}
@@ -1638,7 +1638,7 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
else if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
{
if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm << C_PREF << pBaseType->GetName().GetBuffer()
+ rOutStm << C_PREF << pBaseType->GetName().getString().GetBuffer()
<< " *";
else
{
@@ -1650,9 +1650,9 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
else
{
if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm << pBaseType->GetName().GetBuffer() << " *";
+ rOutStm << pBaseType->GetName().getString().GetBuffer() << " *";
else
- rOutStm << pBaseType->GetName().GetBuffer();
+ rOutStm << pBaseType->GetName().getString().GetBuffer();
}
}
break;
@@ -1671,7 +1671,7 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
else
{
if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm << "VARIANT" << pBaseType->GetName().GetBuffer();
+ rOutStm << "VARIANT" << pBaseType->GetName().getString().GetBuffer();
else if ( pBaseType->GetType() == TYPE_ENUM )
rOutStm << "integer";
else
@@ -1737,7 +1737,7 @@ void SvMetaType::WriteParamNames( SvIdlDataBase & rBase,
for( sal_uLong n = 0; n < nAttrCount; n++ )
{
SvMetaAttribute * pA = pAttrList->GetObject( n );
- ByteString aStr = pA->GetName();
+ ByteString aStr = pA->GetName().getString();
pA->GetType()->WriteParamNames( rBase, rOutStm, aStr );
if( n +1 < nAttrCount )
rOutStm << ", ";
@@ -1807,16 +1807,16 @@ sal_Bool SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase,
void SvMetaEnumValue::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 )
{
- rOutStm << GetName().GetBuffer();
+ rOutStm << GetName().getString().GetBuffer();
}
void SvMetaEnumValue::Write( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16,
WriteType nT, WriteAttribute )
{
if ( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
- rOutStm << C_PREF << GetName().GetBuffer();
+ rOutStm << C_PREF << GetName().getString().GetBuffer();
else
- rOutStm << GetName().GetBuffer();
+ rOutStm << GetName().getString().GetBuffer();
}
SV_IMPL_META_FACTORY1( SvMetaTypeEnum, SvMetaType );
@@ -1867,10 +1867,10 @@ void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase,
{
if( 0 == aEnumValueList.Count() )
// the first
- aPrefix = aEnumVal->GetName();
+ aPrefix = aEnumVal->GetName().getString();
else
{
- sal_uInt16 nPos = aPrefix.Match( aEnumVal->GetName() );
+ sal_uInt16 nPos = aPrefix.Match( aEnumVal->GetName().getString() );
if( nPos != aPrefix.Len() && nPos != STRING_MATCH )
aPrefix.Erase( nPos );
}
@@ -2030,8 +2030,8 @@ ByteString SvMetaAttribute::Compare( SvMetaAttribute* pAttr )
void SvMetaAttribute::WriteCSV( SvIdlDataBase&, SvStream& rStrm )
{
rStrm << GetType()->GetSvName().GetBuffer() << ' ';
- rStrm << GetName().GetBuffer() << ' ';
- rStrm << GetSlotId().getIdentifier().GetBuffer();
+ rStrm << GetName().getString().GetBuffer() << ' ';
+ rStrm << GetSlotId().getString().GetBuffer();
}
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 2cddc15b444b..b55addf0743a 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -88,7 +88,7 @@ SvMetaTypeMemberList & SvIdlDataBase::GetTypeList()
SvMetaModule * SvIdlDataBase::GetModule( const rtl::OString& rName )
{
for( sal_uLong n = 0; n < aModuleList.Count(); n++ )
- if( aModuleList.GetObject( n )->GetName().Equals(rName) )
+ if( aModuleList.GetObject( n )->GetName().getString().Equals(rName) )
return aModuleList.GetObject( n );
return NULL;
}
@@ -365,7 +365,7 @@ SvMetaType * SvIdlDataBase::FindType( const SvMetaType * pPType,
SvMetaType * SvIdlDataBase::FindType( const rtl::OString& rName )
{
SvMetaType * pType = aTypeList.First();
- while( pType && !rName.equals(pType->GetName()) )
+ while( pType && !rName.equals(pType->GetName().getString()) )
pType = aTypeList.Next();
return pType;
}
@@ -416,7 +416,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
SvMetaType * pType = rList.First();
while( pType )
{
- if( pType->GetName() == aName )
+ if( pType->GetName().getString() == aName )
break;
pType = rList.Next();
}
@@ -446,7 +446,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
return pType;
DBG_ASSERT( aTmpTypeList.First(), "mindestens ein Element" );
- SvMetaTypeRef xType = new SvMetaType( pType->GetName(), 'h', "dummy" );
+ SvMetaTypeRef xType = new SvMetaType( pType->GetName().getString(), 'h', "dummy" );
xType->SetRef( pType );
xType->SetIn( bIn );
xType->SetOut( bOut );
@@ -485,7 +485,7 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
for( sal_uLong i = 0; i < aAttrList.Count(); i++ )
{
SvMetaAttribute * pAttr = aAttrList.GetObject( i );
- if( pAttr->GetSlotId().getIdentifier() == pTok->GetString() )
+ if( pAttr->GetSlotId().getString() == pTok->GetString() )
return pAttr;
}
}
@@ -506,12 +506,12 @@ SvMetaAttribute* SvIdlDataBase::SearchKnownAttr
)
{
sal_uLong n;
- if( FindId( rId.getIdentifier(), &n ) )
+ if( FindId( rId.getString(), &n ) )
{
for( sal_uLong i = 0; i < aAttrList.Count(); i++ )
{
SvMetaAttribute * pAttr = aAttrList.GetObject( i );
- if( pAttr->GetSlotId().getIdentifier() == rId.getIdentifier() )
+ if( pAttr->GetSlotId().getString() == rId.getString() )
return pAttr;
}
}
@@ -528,7 +528,7 @@ SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm )
for( sal_uLong n = 0; n < aClassList.Count(); n++ )
{
SvMetaClass * pClass = aClassList.GetObject( n );
- if( pClass->GetName() == pTok->GetString() )
+ if( pClass->GetName().getString() == pTok->GetString() )
return pClass;
}