summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-26 09:46:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-26 11:10:41 +0000
commit12088021a0cebc2569b3e0f2e90e4f338d4d601b (patch)
tree44237f1a630edc63de12828f475304871fd9621f /idl
parent5cc2997f0e9b20a5aa91b61dea6070189b0a584a (diff)
ByteString->rtl::OString
Diffstat (limited to 'idl')
-rw-r--r--idl/inc/basobj.hxx8
-rw-r--r--idl/inc/bastype.hxx30
-rw-r--r--idl/inc/command.hxx6
-rw-r--r--idl/inc/module.hxx8
-rw-r--r--idl/inc/object.hxx21
-rw-r--r--idl/inc/slot.hxx28
-rw-r--r--idl/inc/types.hxx14
-rw-r--r--idl/source/objects/basobj.cxx2
-rw-r--r--idl/source/objects/bastype.cxx17
-rw-r--r--idl/source/objects/module.cxx34
-rw-r--r--idl/source/objects/object.cxx46
-rw-r--r--idl/source/objects/slot.cxx176
-rw-r--r--idl/source/objects/types.cxx109
-rw-r--r--idl/source/prj/command.cxx2
-rw-r--r--idl/source/prj/database.cxx10
15 files changed, 259 insertions, 252 deletions
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index a669f02fc247..959a9f830224 100644
--- a/idl/inc/basobj.hxx
+++ b/idl/inc/basobj.hxx
@@ -183,7 +183,7 @@ public:
const SvString & GetName() const
{
return ( !aRef.Is()
- || SvMetaName::GetName().getString().Len() )
+ || !SvMetaName::GetName().getString().isEmpty() )
? SvMetaName::GetName()
: aRef->GetName();
}
@@ -191,7 +191,7 @@ public:
const SvString & GetHelpText() const
{
return ( !aRef.Is()
- || SvMetaName::GetHelpText().getString().Len() )
+ || !SvMetaName::GetHelpText().getString().isEmpty() )
? SvMetaName::GetHelpText()
: aRef->GetHelpText();
}
@@ -199,7 +199,7 @@ public:
const SvString & GetConfigName() const
{
return ( !aRef.Is()
- || SvMetaName::GetConfigName().getString().Len() )
+ || !SvMetaName::GetConfigName().getString().isEmpty() )
? SvMetaName::GetConfigName()
: aRef->GetConfigName();
}
@@ -207,7 +207,7 @@ public:
const SvString & GetDescription() const
{
return ( !aRef.Is()
- || SvMetaName::GetDescription().getString().Len() )
+ || !SvMetaName::GetDescription().getString().isEmpty() )
? SvMetaName::GetDescription()
: aRef->GetDescription();
}
diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx
index 0231bd7357f8..08d955713bd0 100644
--- a/idl/inc/bastype.hxx
+++ b/idl/inc/bastype.hxx
@@ -152,30 +152,33 @@ public:
sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm );
- ByteString GetSvIdlString( SvStringHashEntry * pName );
+ rtl::OString GetSvIdlString( SvStringHashEntry * pName );
};
class SvIdentifier
{
private:
- ByteString m_aStr;
+ rtl::OString m_aStr;
public:
SvIdentifier()
{
}
- void setString(const ByteString & rStr)
+ void setString(const rtl::OString& rStr)
{
m_aStr = rStr;
}
- const ByteString& getString() const
+ const rtl::OString& getString() const
{
return m_aStr;
}
friend SvStream& operator << (SvStream &, const SvIdentifier &);
friend SvStream& operator >> (SvStream &, SvIdentifier &);
- sal_Bool IsSet() const { return m_aStr.Len() != 0; }
+ sal_Bool IsSet() const
+ {
+ return !m_aStr.isEmpty();
+ }
sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
sal_uInt16 nTab );
@@ -207,12 +210,21 @@ public:
class SvString
{
private:
- ByteString m_aStr;
+ rtl::OString m_aStr;
public:
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; }
+ void setString(const rtl::OString& rStr)
+ {
+ m_aStr = rStr;
+ }
+ const rtl::OString& getString() const
+ {
+ return m_aStr;
+ }
+ sal_Bool IsSet() const
+ {
+ return !m_aStr.isEmpty();
+ }
friend SvStream& operator << (SvStream &, const SvString &);
friend SvStream& operator >> (SvStream &, SvString &);
diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx
index 6d89717d2c1f..d498602c80cc 100644
--- a/idl/inc/command.hxx
+++ b/idl/inc/command.hxx
@@ -33,12 +33,8 @@
#include <rtl/ustring.hxx>
#include <vector>
-#ifndef STRING_LIST
-#define STRING_LIST
typedef ::std::vector< String* > StringList;
-#endif
-
-typedef ::std::vector< ByteString* > ByteStringList;
+typedef ::std::vector< rtl::OString* > ByteStringList;
class SvCommand
{
diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx
index f1269321d8e1..471a0a5d1c82 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.getString(); }
+ const rtl::OString& GetModulePrefix() const { return aModulePrefix.getString(); }
- virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL );
+ virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL );
- const ByteString & GetHelpFileName() const { return aHelpFileName.getString(); }
- const ByteString & GetTypeLibFileName() const { return aTypeLibFile.getString(); }
+ const rtl::OString& GetHelpFileName() const { return aHelpFileName.getString(); }
+ const rtl::OString& GetTypeLibFileName() const { return aTypeLibFile.getString(); }
const SvMetaAttributeMemberList & GetAttrList() const { return aAttrList; }
const SvMetaTypeMemberList & GetTypeList() const { return aTypeList; }
diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx
index 5319f41226be..a5d8432f0379 100644
--- a/idl/inc/object.hxx
+++ b/idl/inc/object.hxx
@@ -36,11 +36,12 @@
struct SvSlotElement
{
SvMetaSlotRef xSlot;
- ByteString aPrefix;
- SvSlotElement( SvMetaSlot * pS, const ByteString & rPrefix )
- : xSlot( pS )
- , aPrefix( rPrefix )
- {}
+ rtl::OString aPrefix;
+ SvSlotElement( SvMetaSlot * pS, const rtl::OString& rPrefix )
+ : xSlot( pS )
+ , aPrefix( rPrefix )
+ {
+ }
};
typedef std::vector< SvSlotElement* > SvSlotElementList;
@@ -51,15 +52,15 @@ SV_DECL_REF(SvMetaClass)
class SvClassElement : public SvPersistBase
{
SvBOOL aAutomation;
- ByteString aPrefix;
+ rtl::OString aPrefix;
SvMetaClassRef xClass;
public:
SV_DECL_PERSIST1( SvClassElement, SvPersistBase, 1 )
SvClassElement();
- void SetPrefix( const ByteString & rPrefix )
+ void SetPrefix( const rtl::OString& rPrefix )
{ aPrefix = rPrefix; }
- const ByteString & GetPrefix() const
+ const rtl::OString& GetPrefix() const
{ return aPrefix; }
void SetAutomation( sal_Bool rAutomation )
@@ -88,14 +89,14 @@ class SvMetaClass : public SvMetaType
sal_Bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
SvMetaAttribute & rAttr ) const;
- void WriteSlotStubs( const ByteString & rShellName,
+ void WriteSlotStubs( const rtl::OString& rShellName,
SvSlotElementList & rSlotList,
ByteStringList & rList,
SvStream & rOutStm );
sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
SvSlotElementList & rSlotList,
SvStream & rOutStm );
- sal_uInt16 WriteSlots( const ByteString & rShellName, sal_uInt16 nCount,
+ sal_uInt16 WriteSlots( const rtl::OString& rShellName, sal_uInt16 nCount,
SvSlotElementList & rSlotList,
SvIdlDataBase & rBase,
SvStream & rOutStm );
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
index d7cd8964b83d..85e56ebe1617 100644
--- a/idl/inc/slot.hxx
+++ b/idl/inc/slot.hxx
@@ -78,11 +78,11 @@ class SvMetaSlot : public SvMetaAttribute
SvMetaEnumValue* pEnumValue;
SvString aUnoName;
- void WriteSlot( const ByteString & rShellName,
- sal_uInt16 nCount, const ByteString & rSlotId,
+ void WriteSlot( const rtl::OString& rShellName,
+ sal_uInt16 nCount, const rtl::OString& rSlotId,
SvSlotElementList &rList,
size_t nStart,
- const ByteString & rPrefix,
+ const rtl::OString& rPrefix,
SvIdlDataBase & rBase, SvStream & rOutStm );
virtual void Write( SvIdlDataBase & rBase,
SvStream & rOutStm, sal_uInt16 nTab,
@@ -192,12 +192,12 @@ public:
SvMetaAttribute * GetMethod() const;
SvMetaType * GetSlotType() const;
sal_Bool GetHasCoreId() const;
- const ByteString & GetGroupId() const;
- const ByteString & GetConfigId() const;
- const ByteString & GetExecMethod() const;
- const ByteString & GetStateMethod() const;
- const ByteString & GetDefault() const;
- const ByteString & GetDisableFlags() const;
+ const rtl::OString& GetGroupId() const;
+ const rtl::OString& GetConfigId() const;
+ const rtl::OString& GetExecMethod() const;
+ const rtl::OString& GetStateMethod() const;
+ const rtl::OString& GetDefault() const;
+ const rtl::OString& GetDisableFlags() const;
sal_Bool GetPseudoSlots() const;
sal_Bool GetCachable() const;
sal_Bool GetVolatile() const;
@@ -214,8 +214,8 @@ public:
sal_Bool GetRecordAbsolute() const;
sal_Bool GetHasDialog() const;
- const ByteString & GetPseudoPrefix() const;
- const ByteString & GetUnoName() const;
+ const rtl::OString& GetPseudoPrefix() const;
+ const rtl::OString& GetUnoName() const;
sal_Bool GetMenuConfig() const;
sal_Bool GetToolBoxConfig() const;
sal_Bool GetStatusBarConfig() const;
@@ -247,14 +247,14 @@ public:
SvStream & rOutStm, sal_uInt16 nTab );
virtual void Insert( SvSlotElementList&, const ByteString & rPrefix,
SvIdlDataBase& );
- void WriteSlotStubs( const ByteString & rShellName,
+ void WriteSlotStubs( const rtl::OString& rShellName,
ByteStringList & rList,
SvStream & rOutStm );
- sal_uInt16 WriteSlotMap( const ByteString & rShellName,
+ sal_uInt16 WriteSlotMap( const rtl::OString& rShellName,
sal_uInt16 nCount,
SvSlotElementList&,
size_t nStart,
- const ByteString &,
+ const rtl::OString&,
SvIdlDataBase & rBase,
SvStream & rOutStm );
sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 921e4a9ec865..bfa83b2eb161 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -211,12 +211,12 @@ public:
void SetBasicName(const ByteString& rName)
{ aBasicName.setString(rName); }
- const ByteString & GetBasicName() const;
- ByteString GetBasicPostfix() const;
- const ByteString & GetSvName() const;
- const ByteString & GetSbxName() const;
- const ByteString & GetOdlName() const;
- const ByteString & GetCName() const;
+ const rtl::OString& GetBasicName() const;
+ rtl::OString GetBasicPostfix() const;
+ const rtl::OString& GetSvName() const;
+ const rtl::OString& GetSbxName() const;
+ const rtl::OString& GetOdlName() const;
+ const rtl::OString& GetCName() const;
char GetParserChar() const { return cParserChar; }
virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL );
@@ -227,7 +227,7 @@ public:
SvStream & rOutStm, sal_uInt16 nTab );
virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0 );
- ByteString GetCString() const;
+ rtl::OString GetCString() const;
void WriteSvIdlType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
void WriteOdlType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
void AppendParserString (ByteString &rString);
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index a2c2a967bd2b..b08e89144c49 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -389,7 +389,7 @@ void SvMetaName::WriteAttributes( SvIdlDataBase &, SvStream & rOutStm,
if( GetHelpText().IsSet() )
{
WriteTab( rOutStm, nTab );
- rOutStm << "helpstring(\"" << GetHelpText().getString().GetBuffer() << "\")," << endl;
+ rOutStm << "helpstring(\"" << GetHelpText().getString().getStr() << "\")," << endl;
}
if( GetHelpContext().IsSet() )
{
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index 777ba787ac11..e31bcfeb97d7 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -175,18 +175,15 @@ sal_Bool SvBOOL::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm )
return sal_True;
}
-ByteString SvBOOL::GetSvIdlString( SvStringHashEntry * pName )
+rtl::OString SvBOOL::GetSvIdlString( SvStringHashEntry * pName )
{
if( nVal )
return pName->GetName();
- else
- {
- ByteString aTmp( pName->GetName() );
- aTmp += "(FALSE)";
- return aTmp;
- }
-}
+ return rtl::OStringBuffer(pName->GetName()).
+ append(RTL_CONSTASCII_STRINGPARAM("(FALSE)")).
+ makeStringAndClear();
+}
sal_Bool SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
{
@@ -220,7 +217,7 @@ sal_Bool SvIdentifier::WriteSvIdl( SvStringHashEntry * pName,
sal_uInt16 /*nTab */ )
{
rOutStm << pName->GetName().GetBuffer() << '(';
- rOutStm << getString().GetBuffer() << ')';
+ rOutStm << getString().getStr() << ')';
return sal_True;
}
@@ -335,7 +332,7 @@ sal_Bool SvString::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
sal_uInt16 /*nTab */ )
{
rOutStm << pName->GetName().GetBuffer() << "(\"";
- rOutStm << m_aStr.GetBuffer() << "\")";
+ rOutStm << m_aStr.getStr() << "\")";
return sal_True;
}
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 7a8a943f806d..84502c20da65 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -141,7 +141,7 @@ void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase,
if( aSlotIdFile.ReadSvIdl( SvHash_SlotIdFile(), rInStm ) )
{
sal_uInt32 nTokPos = rInStm.Tell();
- if( !rBase.ReadIdFile( String::CreateFromAscii( aSlotIdFile.getString().GetBuffer() ) ) )
+ if( !rBase.ReadIdFile( String::CreateFromAscii( aSlotIdFile.getString().getStr() ) ) )
{
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("cannot read file: "));
aStr.append(aSlotIdFile.getString());
@@ -160,21 +160,21 @@ void SvMetaModule::WriteAttributesSvIdl( SvIdlDataBase & rBase,
sal_uInt16 nTab )
{
SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab );
- if( aTypeLibFile.getString().Len() || aSlotIdFile.getString().Len() || aTypeLibFile.getString().Len() )
+ if( !aTypeLibFile.getString().isEmpty() || !aSlotIdFile.getString().isEmpty() || !aTypeLibFile.getString().isEmpty() )
{
- if( aHelpFileName.getString().Len() )
+ if( !aHelpFileName.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aHelpFileName.WriteSvIdl( SvHash_HelpFile(), rOutStm, nTab +1 );
rOutStm << ';' << endl;
}
- if( aSlotIdFile.getString().Len() )
+ if( !aSlotIdFile.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aSlotIdFile.WriteSvIdl( SvHash_SlotIdFile(), rOutStm, nTab +1 );
rOutStm << ';' << endl;
}
- if( aTypeLibFile.getString().Len() )
+ if( !aTypeLibFile.getString().isEmpty() )
{
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.getString().Len() )
+ if( !aHelpFileName.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
rOutStm << "// class SvMetaModule" << endl;
WriteTab( rOutStm, nTab );
- rOutStm << "helpfile(\"" << aHelpFileName.getString().GetBuffer() << "\");" << endl;
+ rOutStm << "helpfile(\"" << aHelpFileName.getString().getStr() << "\");" << endl;
}
}
@@ -417,15 +417,15 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
{
case WRITE_ODL:
{
- if( aSlotIdFile.getString().Len() )
+ if( !aSlotIdFile.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
- rOutStm << "#include \"" << aSlotIdFile.getString().GetBuffer() << '"' << endl << endl;
+ rOutStm << "#include \"" << aSlotIdFile.getString().getStr() << '"' << endl << endl;
}
SvMetaExtern::Write( rBase, rOutStm, nTab, nT, nA );
rOutStm << endl;
WriteTab( rOutStm, nTab );
- rOutStm << "library " << GetName().getString().GetBuffer() << endl;
+ rOutStm << "library " << GetName().getString().getStr() << 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().getString().GetBuffer() << endl;
+ rOutStm << "<MODULE>" << endl << GetName().getString().getStr() << 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().getString().GetBuffer();
+ rOutStm << pClass->GetName().getString().getStr();
SvMetaClass* pSC = pClass->GetSuperClass();
if( pSC )
- rOutStm << " : " << pSC->GetName().getString().GetBuffer();
+ rOutStm << " : " << pSC->GetName().getString().getStr();
// imported classes
const SvClassElementMemberList& rClassList = pClass->GetClassList();
@@ -471,11 +471,11 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
{
rOutStm << " ( ";
- for( sal_uLong m=0; m<rClassList.Count(); m++ )
+ for( sal_uLong m=0; m<rClassList.Count(); ++m )
{
SvClassElement *pEle = rClassList.GetObject(m);
SvMetaClass *pCl = pEle->GetClass();
- rOutStm << pCl->GetName().getString().GetBuffer();
+ rOutStm << pCl->GetName().getString().getStr();
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.getString().Len() )
- rOutStm << "//#include <" << aSlotIdFile.getString().GetBuffer() << '>' << endl;
+ if( !aSlotIdFile.getString().isEmpty() )
+ rOutStm << "//#include <" << aSlotIdFile.getString().getStr() << '>' << 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 8313db18204e..a9ebfa3a36ef 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -67,7 +67,7 @@ void SvClassElement::Save( SvPersistStream & rStm )
// create mask
sal_uInt8 nMask = 0;
if( aAutomation.IsSet() ) nMask |= 0x1;
- if( aPrefix.Len() ) nMask |= 0x2;
+ if( !aPrefix.isEmpty() ) nMask |= 0x2;
if( xClass.Is() ) nMask |= 0x4;
// write data
@@ -276,12 +276,12 @@ void SvMetaClass::WriteContextSvIdl
SvClassElement * pEle = aClassList.GetObject( n );
WriteTab( rOutStm, nTab );
rOutStm << SvHash_import()->GetName().GetBuffer() << ' '
- << pEle->GetPrefix().GetBuffer();
+ << pEle->GetPrefix().getStr();
if( pEle->GetAutomation() )
rOutStm << " [ " << SvHash_Automation()->GetName().GetBuffer()
<< " ]";
- if( pEle->GetPrefix().Len() )
- rOutStm << ' ' << pEle->GetPrefix().GetBuffer();
+ if( !pEle->GetPrefix().isEmpty() )
+ rOutStm << ' ' << pEle->GetPrefix().getStr();
rOutStm << ';' << endl;
}
}
@@ -322,7 +322,7 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS
if ( !rAttr.GetRef() && rAttr.IsA( TYPE( SvMetaSlot ) ) )
{
OSL_FAIL( "Neuer Slot : " );
- OSL_FAIL( rAttr.GetSlotId().getString().GetBuffer() );
+ OSL_FAIL( rAttr.GetSlotId().getString().getStr() );
}
for( sal_uLong n = 0; n < aAttrList.Count(); n++ )
@@ -334,9 +334,9 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS
if( pS->GetSlotId().GetValue() != rAttr.GetSlotId().GetValue() )
{
OSL_FAIL( "Gleicher Name in MetaClass : " );
- OSL_FAIL( pS->GetName().getString().GetBuffer() );
- OSL_FAIL( pS->GetSlotId().getString().GetBuffer() );
- OSL_FAIL( rAttr.GetSlotId().getString().GetBuffer() );
+ OSL_FAIL( pS->GetName().getString().getStr() );
+ OSL_FAIL( pS->GetSlotId().getString().getStr() );
+ OSL_FAIL( rAttr.GetSlotId().getString().getStr() );
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Attribute's "));
aStr.append(pS->GetName().getString());
@@ -355,8 +355,8 @@ 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().getString().GetBuffer() );
- OSL_FAIL( rAttr.GetSlotId().getString().GetBuffer() );
+ OSL_FAIL( pS->GetSlotId().getString().getStr() );
+ OSL_FAIL( rAttr.GetSlotId().getString().getStr() );
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Attribute "));
aStr.append(pS->GetName().getString());
@@ -380,7 +380,7 @@ void SvMetaClass::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
{
WriteHeaderSvIdl( rBase, rOutStm, nTab );
if( aSuperClass.Is() )
- rOutStm << " : " << aSuperClass->GetName().getString().GetBuffer();
+ rOutStm << " : " << aSuperClass->GetName().getString().getStr();
rOutStm << endl;
SvMetaName::WriteSvIdl( rBase, rOutStm, nTab );
rOutStm << endl;
@@ -407,7 +407,7 @@ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
case WRITE_DOCU:
{
rOutStm << "<INTERFACE>" << endl
- << GetName().getString().GetBuffer();
+ << GetName().getString().getStr();
if ( GetAutomation() )
rOutStm << " ( Automation ) ";
rOutStm << endl;
@@ -451,7 +451,7 @@ sal_uInt16 SvMetaClass::WriteSlotParamArray( SvIdlDataBase & rBase,
return nCount;
}
-sal_uInt16 SvMetaClass::WriteSlots( const ByteString & rShellName,
+sal_uInt16 SvMetaClass::WriteSlots( const rtl::OString& rShellName,
sal_uInt16 nCount, SvSlotElementList & rSlotList,
SvIdlDataBase & rBase,
SvStream & rOutStm )
@@ -514,7 +514,7 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>&
SvClassElement * pEle = aClassList.GetObject( n );
SvMetaClass * pCl = pEle->GetClass();
rtl::OStringBuffer rPre(rPrefix);
- if( rPre.getLength() && pEle->GetPrefix().Len() )
+ if( rPre.getLength() && pEle->GetPrefix().getLength() )
rPre.append('.');
rPre.append(pEle->GetPrefix());
@@ -553,7 +553,7 @@ void SvMetaClass::FillClasses( SvMetaClassList & rList )
}
-void SvMetaClass::WriteSlotStubs( const ByteString & rShellName,
+void SvMetaClass::WriteSlotStubs( const rtl::OString& rShellName,
SvSlotElementList & rSlotList,
ByteStringList & rList,
SvStream & rOutStm )
@@ -571,10 +571,10 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
{
WriteStars( rOutStm );
// define class
- rOutStm << "#ifdef " << GetName().getString().GetBuffer() << endl;
+ rOutStm << "#ifdef " << GetName().getString().getStr() << endl;
rOutStm << "#undef ShellClass" << endl;
- rOutStm << "#undef " << GetName().getString().GetBuffer() << endl;
- rOutStm << "#define ShellClass " << GetName().getString().GetBuffer() << endl;
+ rOutStm << "#undef " << GetName().getString().getStr() << endl;
+ rOutStm << "#define ShellClass " << GetName().getString().getStr() << endl;
// no slotmaps get written for interfaces
if( !IsShell() )
@@ -583,7 +583,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
return;
}
// write parameter array
- rOutStm << "SFX_ARGUMENTMAP(" << GetName().getString().GetBuffer() << ')' << endl
+ rOutStm << "SFX_ARGUMENTMAP(" << GetName().getString().getStr() << ')' << endl
<< '{' << endl;
std::vector<sal_uLong> aSuperList;
@@ -620,7 +620,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
rOutStm << endl;
// write slotmap
- rOutStm << "SFX_SLOTMAP_ARG(" << GetName().getString().GetBuffer() << ')' << endl
+ rOutStm << "SFX_SLOTMAP_ARG(" << GetName().getString().getStr() << ')' << endl
<< '{' << endl;
// write all attributes
@@ -631,7 +631,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
{
// at least one dummy
WriteTab( rOutStm, 1 );
- rOutStm << "SFX_SLOT_ARG(" << GetName().getString().GetBuffer()
+ rOutStm << "SFX_SLOT_ARG(" << GetName().getString().getStr()
<< ", 0, 0, "
<< "SFX_STUB_PTR_EXEC_NONE,"
<< "SFX_STUB_PTR_STATE_NONE,"
@@ -679,7 +679,7 @@ void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 )
const char * pSup = aSuperName.getStr();
rOutStm
- << "class " << GetSvName().GetBuffer()
+ << "class " << GetSvName().getStr()
<< ": public " << pSup << endl
<< '{' << endl
<< "protected:" << endl
@@ -732,7 +732,7 @@ void SvMetaClass::WriteCxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 )
<< "\t sal_uInt16 * pMajor," << endl
<< "\t sal_uInt16 * pMinor ) const" << endl;
rOutStm << '{' << endl
- << "\t*pName = \"" << pMod->GetTypeLibFileName().GetBuffer() << "\";" << endl
+ << "\t*pName = \"" << pMod->GetTypeLibFileName().getStr() << "\";" << endl
<< "\t*pMajor = "
<< rtl::OString::valueOf(static_cast<sal_Int32>(pMod->GetVersion().GetMajorVersion())).getStr()
<< ';' << endl
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 0728f0ce6bc0..c690c25d7b86 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.getString().Len() ) nMask |= 0x0002;
+ if( !aGroupId.getString().isEmpty() ) nMask |= 0x0002;
if( aHasCoreId.IsSet() ) nMask |= 0x0004;
- 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( !aConfigId.getString().isEmpty() ) nMask |= 0x0008;
+ if( !aExecMethod.getString().isEmpty() ) nMask |= 0x0010;
+ if( !aStateMethod.getString().isEmpty() ) nMask |= 0x0020;
+ if( !aDefault.getString().isEmpty() ) 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.getString().Len() ) nMask |= 0x0020;
+ if( !aPseudoPrefix.getString().isEmpty() ) nMask |= 0x0020;
if( aRecordPerSet.IsSet() ) nMask |= 0x0040;
if( aMenuConfig.IsSet() ) nMask |= 0x0080;
if( aToolBoxConfig.IsSet() ) nMask |= 0x0100;
@@ -333,34 +333,34 @@ sal_Bool SvMetaSlot::GetHasCoreId() const
if( aHasCoreId.IsSet() || !GetRef() ) return aHasCoreId;
return ((SvMetaSlot *)GetRef())->GetHasCoreId();
}
-const ByteString & SvMetaSlot::GetGroupId() const
+const rtl::OString& SvMetaSlot::GetGroupId() const
{
- if( aGroupId.getString().Len() || !GetRef() ) return aGroupId.getString();
+ if( !aGroupId.getString().isEmpty() || !GetRef() ) return aGroupId.getString();
return ((SvMetaSlot *)GetRef())->GetGroupId();
}
-const ByteString & SvMetaSlot::GetDisableFlags() const
+const rtl::OString& SvMetaSlot::GetDisableFlags() const
{
- if( aDisableFlags.getString().Len() || !GetRef() ) return aDisableFlags.getString();
+ if( !aDisableFlags.getString().isEmpty() || !GetRef() ) return aDisableFlags.getString();
return ((SvMetaSlot *)GetRef())->GetDisableFlags();
}
-const ByteString & SvMetaSlot::GetConfigId() const
+const rtl::OString& SvMetaSlot::GetConfigId() const
{
- if( aConfigId.getString().Len() || !GetRef() ) return aConfigId.getString();
+ if( !aConfigId.getString().isEmpty() || !GetRef() ) return aConfigId.getString();
return ((SvMetaSlot *)GetRef())->GetConfigId();
}
-const ByteString & SvMetaSlot::GetExecMethod() const
+const rtl::OString& SvMetaSlot::GetExecMethod() const
{
- if( aExecMethod.getString().Len() || !GetRef() ) return aExecMethod.getString();
+ if( !aExecMethod.getString().isEmpty() || !GetRef() ) return aExecMethod.getString();
return ((SvMetaSlot *)GetRef())->GetExecMethod();
}
-const ByteString & SvMetaSlot::GetStateMethod() const
+const rtl::OString& SvMetaSlot::GetStateMethod() const
{
- if( aStateMethod.getString().Len() || !GetRef() ) return aStateMethod.getString();
+ if( !aStateMethod.getString().isEmpty() || !GetRef() ) return aStateMethod.getString();
return ((SvMetaSlot *)GetRef())->GetStateMethod();
}
-const ByteString & SvMetaSlot::GetDefault() const
+const rtl::OString& SvMetaSlot::GetDefault() const
{
- if( aDefault.getString().Len() || !GetRef() ) return aDefault.getString();
+ if( !aDefault.getString().isEmpty() || !GetRef() ) return aDefault.getString();
return ((SvMetaSlot *)GetRef())->GetDefault();
}
sal_Bool SvMetaSlot::GetPseudoSlots() const
@@ -449,9 +449,9 @@ sal_Bool SvMetaSlot::GetHasDialog() const
if( aHasDialog.IsSet() || !GetRef() ) return aHasDialog;
return ((SvMetaSlot *)GetRef())->GetHasDialog();
}
-const ByteString & SvMetaSlot::GetPseudoPrefix() const
+const rtl::OString& SvMetaSlot::GetPseudoPrefix() const
{
- if( aPseudoPrefix.getString().Len() || !GetRef() ) return aPseudoPrefix.getString();
+ if( !aPseudoPrefix.getString().isEmpty() || !GetRef() ) return aPseudoPrefix.getString();
return ((SvMetaSlot *)GetRef())->GetPseudoPrefix();
}
sal_Bool SvMetaSlot::GetMenuConfig() const
@@ -497,7 +497,7 @@ sal_Bool SvMetaSlot::GetImageReflection() const
return ((SvMetaSlot *)GetRef())->GetImageReflection();
}
-const ByteString& SvMetaSlot::GetUnoName() const
+const rtl::OString& SvMetaSlot::GetUnoName() const
{
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.getString().Len() )
+ if( !aGroupId.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aGroupId.WriteSvIdl( SvHash_GroupId(), rOutStm, nTab +1);
rOutStm << ';' << endl;
}
- if( aExecMethod.getString().Len() )
+ if( !aExecMethod.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aExecMethod.WriteSvIdl( SvHash_ExecMethod(), rOutStm, nTab +1);
rOutStm << ';' << endl;
}
- if( aStateMethod.getString().Len() )
+ if( !aStateMethod.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aStateMethod.WriteSvIdl( SvHash_StateMethod(), rOutStm, nTab +1);
rOutStm << ';' << endl;
}
- if( aDisableFlags.getString().Len() )
+ if( !aDisableFlags.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aDisableFlags.WriteSvIdl( SvHash_DisableFlags(), rOutStm, nTab +1);
@@ -1010,7 +1010,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix,
SvMetaEnumValue *enumValue = pEnum->GetObject(n);
ByteString aValName = enumValue->GetName().getString();
rtl::OStringBuffer aBuf;
- if( GetPseudoPrefix().Len() )
+ if( !GetPseudoPrefix().isEmpty() )
aBuf.append(GetPseudoPrefix());
else
aBuf.append(GetSlotId().getString());
@@ -1088,20 +1088,21 @@ static ByteString MakeSlotName( SvStringHashEntry * pEntry )
return aName.makeStringAndClear().toAsciiUpperCase();
};
-void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName,
+void SvMetaSlot::WriteSlotStubs( const rtl::OString& rShellName,
ByteStringList & rList,
SvStream & rOutStm )
{
if ( !GetExport() && !GetHidden() )
return;
- ByteString aMethodName( GetExecMethod() );
- if ( aMethodName.Len() && aMethodName != "NoExec" )
+ rtl::OString aMethodName( GetExecMethod() );
+ if ( !aMethodName.isEmpty() &&
+ !aMethodName.equalsL(RTL_CONSTASCII_STRINGPARAM("NoExec")) )
{
sal_Bool bIn = sal_False;
for( size_t n = 0; n < rList.size(); n++ )
{
- if( *(rList[ n ]) == aMethodName )
+ if (rList[n]->equals(aMethodName))
{
bIn=sal_True;
break;
@@ -1110,22 +1111,23 @@ void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName,
if ( !bIn )
{
- rList.push_back( new ByteString(aMethodName) );
+ rList.push_back( new rtl::OString(aMethodName) );
rOutStm << "SFX_EXEC_STUB("
- << rShellName.GetBuffer()
+ << rShellName.getStr()
<< ','
- << aMethodName.GetBuffer()
+ << aMethodName.getStr()
<< ')' << endl;
}
}
aMethodName = GetStateMethod();
- if ( aMethodName.Len() && aMethodName != "NoState" )
+ if (!aMethodName.isEmpty() &&
+ !aMethodName.equalsL(RTL_CONSTASCII_STRINGPARAM("NoState")))
{
sal_Bool bIn = sal_False;
for ( size_t n=0; n < rList.size(); n++ )
{
- if ( *(rList[ n ]) == aMethodName )
+ if (rList[n]->equals(aMethodName))
{
bIn=sal_True;
break;
@@ -1134,21 +1136,21 @@ void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName,
if ( !bIn )
{
- rList.push_back( new ByteString(aMethodName) );
+ rList.push_back( new rtl::OString(aMethodName) );
rOutStm << "SFX_STATE_STUB("
- << rShellName.GetBuffer()
+ << rShellName.getStr()
<< ','
- << aMethodName.GetBuffer()
+ << aMethodName.getStr()
<< ')' << endl;
}
}
}
-void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
- const ByteString & rSlotId,
+void SvMetaSlot::WriteSlot( const rtl::OString& rShellName, sal_uInt16 nCount,
+ const rtl::OString& rSlotId,
SvSlotElementList& rSlotList,
size_t nStart,
- const ByteString & rPrefix,
+ const rtl::OString& rPrefix,
SvIdlDataBase & rBase, SvStream & rOutStm )
{
if ( !GetExport() && !GetHidden() )
@@ -1166,18 +1168,18 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
if( bIsEnumSlot )
rOutStm << "SFX_NEW_SLOT_ENUM( ";
else
- rOutStm << "SFX_NEW_SLOT_ARG( " << rShellName.GetBuffer() << ',' ;
+ rOutStm << "SFX_NEW_SLOT_ARG( " << rShellName.getStr() << ',' ;
- rOutStm << rSlotId.GetBuffer() << ',';
+ rOutStm << rSlotId.getStr() << ',';
const SvHelpContext& rHlpCtx = GetHelpContext();
if( rHlpCtx.IsSet() )
- rOutStm << rHlpCtx.getString().GetBuffer() << ',';
+ rOutStm << rHlpCtx.getString().getStr() << ',';
else
- rOutStm << rSlotId.GetBuffer() << ',';
+ rOutStm << rSlotId.getStr() << ',';
// GroupId
- if( GetGroupId().Len() )
- rOutStm << GetGroupId().GetBuffer();
+ if( !GetGroupId().isEmpty() )
+ rOutStm << GetGroupId().getStr();
else
rOutStm << '0';
rOutStm << ',' << endl;
@@ -1185,23 +1187,23 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
if( bIsEnumSlot )
{
- rOutStm << "&a" << rShellName.GetBuffer() << "Slots_Impl["
+ rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
<< rtl::OString::valueOf(static_cast<sal_Int32>(pLinkedSlot->GetListPos())).getStr()
<< "] /*Offset Master*/, " << endl;
WriteTab( rOutStm, 4 );
- rOutStm << "&a" << rShellName.GetBuffer() << "Slots_Impl["
+ rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
<< rtl::OString::valueOf(static_cast<sal_Int32>(pNextSlot->GetListPos())).getStr()
<< "] /*Offset Next*/, " << endl;
WriteTab( rOutStm, 4 );
// SlotId
- if( GetSlotId().getString().Len() )
- rOutStm << pLinkedSlot->GetSlotId().getString().GetBuffer();
+ if( !GetSlotId().getString().isEmpty() )
+ rOutStm << pLinkedSlot->GetSlotId().getString().getStr();
else
rOutStm << '0';
rOutStm << ',';
- rOutStm << pEnumValue->GetName().getString().GetBuffer();
+ rOutStm << pEnumValue->GetName().getString().getStr();
}
else
{
@@ -1244,30 +1246,36 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
}
else
{
- rOutStm << "&a" << rShellName.GetBuffer() << "Slots_Impl["
+ rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
<< rtl::OString::valueOf(static_cast<sal_Int32>(pLinkedSlot->GetListPos())).getStr()
<< "] /*Offset Linked*/, " << endl;
WriteTab( rOutStm, 4 );
}
- rOutStm << "&a" << rShellName.GetBuffer() << "Slots_Impl["
+ rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
<< rtl::OString::valueOf(static_cast<sal_Int32>(pNextSlot->GetListPos())).getStr()
<< "] /*Offset Next*/, " << endl;
WriteTab( rOutStm, 4 );
// write ExecMethod, with standard name if not specified
- if( GetExecMethod().Len() && GetExecMethod() != "NoExec")
- rOutStm << "SFX_STUB_PTR(" << rShellName.GetBuffer() << ','
- << GetExecMethod().GetBuffer() << ')';
+ if( !GetExecMethod().isEmpty() &&
+ !GetExecMethod().equalsL(RTL_CONSTASCII_STRINGPARAM("NoExec")))
+ {
+ rOutStm << "SFX_STUB_PTR(" << rShellName.getStr() << ','
+ << GetExecMethod().getStr() << ')';
+ }
else
rOutStm << "SFX_STUB_PTR_EXEC_NONE";
rOutStm << ',';
// write StateMethod, with standard name if not specified
- if( GetStateMethod().Len() && GetStateMethod() != "NoState")
- rOutStm << "SFX_STUB_PTR(" << rShellName.GetBuffer() << ','
- << GetStateMethod().GetBuffer() << ')';
+ if( !GetStateMethod().isEmpty() &&
+ !GetStateMethod().equalsL(RTL_CONSTASCII_STRINGPARAM("NoState")))
+ {
+ rOutStm << "SFX_STUB_PTR(" << rShellName.getStr() << ','
+ << GetStateMethod().getStr() << ')';
+ }
else
rOutStm << "SFX_STUB_PTR_STATE_NONE";
}
@@ -1323,10 +1331,10 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
rOutStm << ',' << endl;
WriteTab( rOutStm, 4 );
- if ( !GetDisableFlags().Len() )
+ if ( GetDisableFlags().isEmpty() )
rOutStm << "0";
else
- rOutStm << GetDisableFlags().GetBuffer();
+ rOutStm << GetDisableFlags().getStr();
// write attribute type
if( !bIsEnumSlot )
@@ -1344,7 +1352,7 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
}
if( pT )
{
- rOutStm << pT->GetName().getString().GetBuffer();
+ rOutStm << pT->GetName().getString().getStr();
if( !rBase.FindType( pT, rBase.aUsedTypes ) )
rBase.aUsedTypes.Append( pT );
}
@@ -1387,8 +1395,8 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount,
if ( GetExport() )
{
rOutStm << ",\"";
- if( rPrefix.Len() )
- rOutStm << rPrefix.GetBuffer();
+ if (!rPrefix.isEmpty())
+ rOutStm << rPrefix.getStr();
rOutStm << '.';
if ( !IsVariable() || !GetType() ||
GetType()->GetBaseType()->GetType() != TYPE_STRUCT )
@@ -1445,11 +1453,11 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO
SvMetaType * pPType = pPar->GetType();
WriteTab( rOutStm, 1 );
rOutStm << "SFX_ARGUMENT("
- << pPar->GetSlotId().getString().GetBuffer() << ',' // SlodId
+ << pPar->GetSlotId().getString().getStr() << ',' // SlodId
// parameter name
- << "\"" << pPar->GetName().getString().GetBuffer() << "\","
+ << "\"" << pPar->GetName().getString().getStr() << "\","
// item name
- << pPType->GetName().getString().GetBuffer() << ")," << endl;
+ << pPType->GetName().getString().getStr() << ")," << endl;
if( !rBase.FindType( pPType, rBase.aUsedTypes ) )
rBase.aUsedTypes.Append( pPType );
}
@@ -1458,15 +1466,15 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO
return 0;
}
-sal_uInt16 SvMetaSlot::WriteSlotMap( const ByteString & rShellName, sal_uInt16 nCount,
+sal_uInt16 SvMetaSlot::WriteSlotMap( const rtl::OString& rShellName, sal_uInt16 nCount,
SvSlotElementList& rSlotList,
size_t nStart,
- const ByteString & rPrefix,
+ const rtl::OString& rPrefix,
SvIdlDataBase & rBase,
SvStream & rOutStm )
{
// SlotId, if not specified generate from name
- ByteString slotId = GetSlotId().getString();
+ rtl::OString slotId = GetSlotId().getString();
sal_uInt16 nSCount = 0;
if( IsMethod() )
@@ -1523,7 +1531,7 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
{
ByteString aValName = pEnum->GetObject( n )->GetName().getString();
rtl::OStringBuffer aBuf;
- if( GetPseudoPrefix().Len() )
+ if( !GetPseudoPrefix().isEmpty() )
aBuf.append(GetPseudoPrefix());
else
aBuf.append(GetSlotId().getString());
@@ -1569,7 +1577,7 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
if( !pTable->IsKeyValid( nSId ) )
{
pTable->Insert( nSId, this );
- rOutStm << "#define " << GetSlotId().getString().GetBuffer() << '\t'
+ rOutStm << "#define " << GetSlotId().getString().getStr() << '\t'
<< rtl::OString::valueOf(static_cast<sal_Int32>(nSId)).getStr()
<< endl;
}
@@ -1582,7 +1590,7 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
ByteString aValName = pEnum->GetObject( n )->GetName().getString();
rtl::OStringBuffer aBuf;
- if( GetPseudoPrefix().Len() )
+ if( !GetPseudoPrefix().isEmpty() )
aBuf.append(GetPseudoPrefix());
else
aBuf.append(GetSlotId().getString());
@@ -1624,18 +1632,18 @@ void WriteBool( sal_Bool bSet, SvStream& rStream )
void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
{
rStrm << "PROJECT,";
- rStrm << GetSlotId().getString().GetBuffer() << ',';
+ rStrm << GetSlotId().getString().getStr() << ',';
rStrm
<< rtl::OString::valueOf(
static_cast<sal_Int32>(GetSlotId().GetValue())).getStr()
<< ',';
- if ( GetPseudoPrefix().Len() )
- rStrm << GetPseudoPrefix().GetBuffer() << ',';
+ if ( !GetPseudoPrefix().isEmpty() )
+ rStrm << GetPseudoPrefix().getStr() << ',';
else
rStrm << ',';
- rStrm << GetGroupId().GetBuffer() << ',';
+ rStrm << GetGroupId().getStr() << ',';
WriteBool( GetAccelConfig(), rStrm );
WriteBool( GetMenuConfig(), rStrm );
@@ -1643,7 +1651,7 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
WriteBool( GetToolBoxConfig(), rStrm );
if ( GetSlotType() )
- rStrm << GetSlotType()->GetName().getString().GetBuffer() << ',';
+ rStrm << GetSlotType()->GetName().getString().getStr() << ',';
else
rStrm << ',';
@@ -1660,7 +1668,7 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
WriteBool( GetReadOnlyDoc(), rStrm );
WriteBool( GetImageRotation(), rStrm );
WriteBool( GetImageReflection(), rStrm );
- rStrm << GetDisableFlags().GetBuffer() << ',';
+ rStrm << GetDisableFlags().getStr() << ',';
if( GetSynchron() )
rStrm << "Synchron" << ',';
@@ -1683,16 +1691,16 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
if ( GetType()->GetType() != TYPE_METHOD && GetMethod() )
{
- rStrm << GetMethod()->GetType()->GetReturnType()->GetName().getString().GetBuffer() << ',';
- rStrm << GetMethod()->GetName().getString().GetBuffer() << ',';
+ rStrm << GetMethod()->GetType()->GetReturnType()->GetName().getString().getStr() << ',';
+ rStrm << GetMethod()->GetName().getString().getStr() << ',';
}
else
{
rStrm << ",,";
}
- rStrm << GetType()->GetSvName().GetBuffer() << ',';
- rStrm << GetName().getString().GetBuffer() << ',';
+ rStrm << GetType()->GetSvName().getStr() << ',';
+ rStrm << GetName().getString().getStr() << ',';
if ( GetType()->GetType() == TYPE_METHOD || GetMethod() )
{
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 06cdcd93ad39..58891559e652 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -243,9 +243,9 @@ void SvMetaAttribute::WriteSvIdl
{
SvMetaType * pType = GetType();
pType->WriteTypePrefix( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm << ' ' << GetName().getString().GetBuffer();
+ rOutStm << ' ' << GetName().getString().getStr();
if( aSlotId.IsSet() )
- rOutStm << ' ' << aSlotId.getString().GetBuffer();
+ rOutStm << ' ' << aSlotId.getString().getStr();
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().getString().Len() )
+ if( !GetName().getString().isEmpty() )
{
rOutStm << ' ';
- rOutStm << GetName().getString().GetBuffer();
+ rOutStm << GetName().getString().getStr();
}
if ( nT == WRITE_DOCU )
@@ -376,7 +376,7 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
OSL_FAIL( "Falscher Parametertyp!" );
}
else
- rOutStm << pBaseType->GetBasicPostfix().GetBuffer();
+ rOutStm << pBaseType->GetBasicPostfix().getStr();
}
}
}
@@ -384,9 +384,9 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
sal_uLong SvMetaAttribute::MakeSlotValue( SvIdlDataBase & rBase, sal_Bool bVar ) const
{
- const SvNumberIdentifier & rId = GetSlotId();
+ const SvNumberIdentifier & rId = GetSlotId();
sal_uLong n = rId.GetValue();
- if( rBase.aStructSlotId.getString().Len() )
+ if( !rBase.aStructSlotId.getString().isEmpty() )
{
n = n << 20;
n += rBase.aStructSlotId.GetValue();
@@ -517,7 +517,7 @@ void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase,
sal_uLong nCount = rList.Count();
SvNumberIdentifier slotId = rBase.aStructSlotId;
- if ( GetSlotId().getString().Len() )
+ if ( !GetSlotId().getString().isEmpty() )
rBase.aStructSlotId = GetSlotId();
// offial hack interface by MM: special controls get passed with the WriteAttribute
@@ -576,10 +576,10 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
WriteTab( rOutStm, nTab );
pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
- if( GetName().getString().Len() )
+ if( !GetName().getString().isEmpty() )
{
rOutStm << ' ';
- rOutStm << GetName().getString().GetBuffer();
+ rOutStm << GetName().getString().getStr();
}
if( pType->GetType() == TYPE_METHOD )
pType->WriteMethodArgs( rBase, rOutStm, nTab, nT );
@@ -608,7 +608,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
if( nBType == TYPE_STRUCT )
{
// for assistance emit the name of the property as acomment
- rOutStm << "/* " << GetName().getString().GetBuffer() << " */" << endl;
+ rOutStm << "/* " << GetName().getString().getStr() << " */" << endl;
WriteRecursiv_Impl( rBase, rOutStm, nTab, nT, nA );
}
@@ -653,20 +653,20 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
if( !bVariable && IsMethod() )
{
rOutStm << "<METHOD>" << endl
- << GetSlotId().getString().GetBuffer() << endl
- << GetName().getString().GetBuffer() << endl
+ << GetSlotId().getString().getStr() << endl
+ << GetName().getString().getStr() << endl
<< endl; // readonly
// return type
SvMetaType* pType2 = GetType();
SvMetaType* pBaseType2 = pType2->GetBaseType();
- rOutStm << pBaseType2->GetReturnType()->GetBaseType()->GetBasicName().GetBuffer() << endl;
+ rOutStm << pBaseType2->GetReturnType()->GetBaseType()->GetBasicName().getStr() << endl;
- DBG_ASSERT( pBaseType2->GetReturnType()->GetBaseType()->GetBasicName().Len(),
+ DBG_ASSERT( !pBaseType2->GetReturnType()->GetBaseType()->GetBasicName().isEmpty(),
"Leerer BasicName" );
// syntax
- rOutStm << GetName().getString().GetBuffer();
+ rOutStm << GetName().getString().getStr();
pType2->WriteMethodArgs( rBase, rOutStm, nTab, nT );
// C return type
@@ -691,17 +691,17 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
else
{
rOutStm << "<PROPERTY>" << endl
- << GetSlotId().getString().GetBuffer() << endl
- << GetName().getString().GetBuffer() << endl;
+ << GetSlotId().getString().getStr() << endl
+ << GetName().getString().getStr() << endl;
if ( GetReadonly() )
rOutStm << "(nur lesen)" << endl;
else
rOutStm << endl;
// for properties type instead of the return value
- rOutStm << pBaseType->GetBasicName().GetBuffer() << endl;
+ rOutStm << pBaseType->GetBasicName().getStr() << endl;
- DBG_ASSERT( pBaseType->GetBasicName().Len(),
+ DBG_ASSERT( !pBaseType->GetBasicName().isEmpty(),
"Leerer BasicName" );
// for properties no syntax
@@ -899,7 +899,7 @@ SvMetaType * SvMetaType::GetReturnType() const
return (SvMetaType *)GetRef();
}
-const ByteString& SvMetaType::GetBasicName() const
+const rtl::OString& SvMetaType::GetBasicName() const
{
if( aBasicName.IsSet() || !GetRef() )
return aBasicName.getString();
@@ -907,19 +907,12 @@ const ByteString& SvMetaType::GetBasicName() const
return ((SvMetaType*)GetRef())->GetBasicName();
}
-ByteString SvMetaType::GetBasicPostfix() const
+rtl::OString SvMetaType::GetBasicPostfix() const
{
-
- ByteString aRet;
-
// MBN and Co always want "As xxx"
- {
-
- aRet = " As ";
- aRet += GetBasicName();
- }
-
- return aRet;
+ return rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM(" As ")).
+ append(GetBasicName()).
+ makeStringAndClear();
}
sal_Bool SvMetaType::GetIn() const
@@ -986,7 +979,7 @@ int SvMetaType::GetCall1() const
return ((SvMetaType *)GetRef())->GetCall1();
}
-const ByteString & SvMetaType::GetSvName() const
+const rtl::OString& SvMetaType::GetSvName() const
{
if( aSvName.IsSet() || !GetRef() )
return aSvName.getString();
@@ -994,7 +987,7 @@ const ByteString & SvMetaType::GetSvName() const
return ((SvMetaType *)GetRef())->GetSvName();
}
-const ByteString & SvMetaType::GetSbxName() const
+const rtl::OString& SvMetaType::GetSbxName() const
{
if( aSbxName.IsSet() || !GetRef() )
return aSbxName.getString();
@@ -1002,7 +995,7 @@ const ByteString & SvMetaType::GetSbxName() const
return ((SvMetaType *)GetRef())->GetSbxName();
}
-const ByteString & SvMetaType::GetOdlName() const
+const rtl::OString& SvMetaType::GetOdlName() const
{
if( aOdlName.IsSet() || !GetRef() )
return aOdlName.getString();
@@ -1010,7 +1003,7 @@ const ByteString & SvMetaType::GetOdlName() const
return ((SvMetaType *)GetRef())->GetOdlName();
}
-const ByteString & SvMetaType::GetCName() const
+const rtl::OString& SvMetaType::GetCName() const
{
if( aCName.IsSet() || !GetRef() )
return aCName.getString();
@@ -1028,7 +1021,7 @@ sal_Bool SvMetaType::SetName( const ByteString & rName, SvIdlDataBase * pBase )
return SvMetaReference::SetName( rName, pBase );
}
-ByteString SvMetaType::GetCString() const
+rtl::OString SvMetaType::GetCString() const
{
rtl::OStringBuffer out( GetSvName() );
if( aCall0 == (int)CALL_POINTER )
@@ -1264,25 +1257,25 @@ void SvMetaType::WriteHeaderSvIdl( SvIdlDataBase & rBase,
rOutStm << SvHash_shell()->GetName().GetBuffer();
else
rOutStm << SvHash_interface()->GetName().GetBuffer();
- rOutStm << ' ' << GetName().getString().GetBuffer();
+ rOutStm << ' ' << GetName().getString().getStr();
}
break;
case TYPE_STRUCT:
{
rOutStm << SvHash_struct()->GetName().GetBuffer()
- << ' ' << GetName().getString().GetBuffer();
+ << ' ' << GetName().getString().getStr();
}
break;
case TYPE_UNION:
{
rOutStm << SvHash_union()->GetName().GetBuffer()
- << ' ' << GetName().getString().GetBuffer();
+ << ' ' << GetName().getString().getStr();
}
break;
case TYPE_ENUM:
{
rOutStm << SvHash_enum()->GetName().GetBuffer()
- << ' ' << GetName().getString().GetBuffer();
+ << ' ' << GetName().getString().getStr();
}
break;
case TYPE_POINTER:
@@ -1297,14 +1290,14 @@ void SvMetaType::WriteHeaderSvIdl( SvIdlDataBase & rBase,
((SvMetaType *)GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
rOutStm << ' ';
}
- rOutStm << GetName().getString().GetBuffer();
+ rOutStm << GetName().getString().getStr();
}
break;
case TYPE_METHOD:
{
rOutStm << SvHash_typedef()->GetName().GetBuffer() << ' ';
((SvMetaType *)GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm << ' ' << GetName().getString().GetBuffer() << "( ";
+ rOutStm << ' ' << GetName().getString().getStr() << "( ";
WriteContextSvIdl( rBase, rOutStm, nTab );
rOutStm << " )";
}
@@ -1326,7 +1319,7 @@ void SvMetaType::WriteAttributesSvIdl( SvIdlDataBase & rBase,
sal_uInt16 nTab )
{
SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab );
- ByteString name = GetName().getString();
+ rtl::OString name = GetName().getString();
if( aSvName.getString() != name || aSbxName.getString() != name || aOdlName.getString() != name )
{
WriteTab( rOutStm, nTab );
@@ -1585,7 +1578,7 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
rOutStm << SvHash_in()->GetName().GetBuffer() << ' ';
else if( GetOut() )
rOutStm << SvHash_out()->GetName().GetBuffer() << ' ';
- rOutStm << GetCString().GetBuffer();
+ rOutStm << GetCString().getStr();
}
break;
@@ -1636,21 +1629,21 @@ 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().getString().GetBuffer()
+ rOutStm << C_PREF << pBaseType->GetName().getString().getStr()
<< " *";
else
{
if ( pBaseType->GetType() == TYPE_ENUM )
rOutStm << C_PREF;
- rOutStm << pBaseType->GetCName().GetBuffer();
+ rOutStm << pBaseType->GetCName().getStr();
}
}
else
{
if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm << pBaseType->GetName().getString().GetBuffer() << " *";
+ rOutStm << pBaseType->GetName().getString().getStr() << " *";
else
- rOutStm << pBaseType->GetName().getString().GetBuffer();
+ rOutStm << pBaseType->GetName().getString().getStr();
}
}
break;
@@ -1669,11 +1662,11 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
else
{
if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm << "VARIANT" << pBaseType->GetName().getString().GetBuffer();
+ rOutStm << "VARIANT" << pBaseType->GetName().getString().getStr();
else if ( pBaseType->GetType() == TYPE_ENUM )
rOutStm << "integer";
else
- rOutStm << pBaseType->GetOdlName().GetBuffer();
+ rOutStm << pBaseType->GetOdlName().getStr();
}
}
@@ -1805,16 +1798,16 @@ sal_Bool SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase,
void SvMetaEnumValue::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 )
{
- rOutStm << GetName().getString().GetBuffer();
+ rOutStm << GetName().getString().getStr();
}
void SvMetaEnumValue::Write( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16,
WriteType nT, WriteAttribute )
{
if ( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
- rOutStm << C_PREF << GetName().getString().GetBuffer();
+ rOutStm << C_PREF << GetName().getString().getStr();
else
- rOutStm << GetName().getString().GetBuffer();
+ rOutStm << GetName().getString().getStr();
}
SV_IMPL_META_FACTORY1( SvMetaTypeEnum, SvMetaType );
@@ -2003,7 +1996,7 @@ ByteString SvMetaAttribute::Compare( SvMetaAttribute* pAttr )
if ( GetType()->GetType() != pAttr->GetType()->GetType() )
aStr += " Type\n";
- if ( !GetType()->GetSvName().Equals( pAttr->GetType()->GetSvName() ) )
+ if ( !GetType()->GetSvName().equals( pAttr->GetType()->GetSvName() ) )
aStr += " ItemType\n";
}
@@ -2027,9 +2020,9 @@ ByteString SvMetaAttribute::Compare( SvMetaAttribute* pAttr )
void SvMetaAttribute::WriteCSV( SvIdlDataBase&, SvStream& rStrm )
{
- rStrm << GetType()->GetSvName().GetBuffer() << ' ';
- rStrm << GetName().getString().GetBuffer() << ' ';
- rStrm << GetSlotId().getString().GetBuffer();
+ rStrm << GetType()->GetSvName().getStr() << ' ';
+ rStrm << GetName().getString().getStr() << ' ';
+ rStrm << GetSlotId().getString().getStr();
}
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index b7943b66f67b..7a7bc82777a8 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -375,7 +375,7 @@ SvCommand::SvCommand( int argc, char ** argv )
SvCommand::~SvCommand()
{
- // release ByteString list
+ // release String list
for ( size_t i = 0, n = aInFileList.size(); i < n; ++i )
delete aInFileList[ i ];
aInFileList.clear();
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index b55addf0743a..cea9ba568568 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().getString().Equals(rName) )
+ if( aModuleList.GetObject( n )->GetName().getString().equals(rName) )
return aModuleList.GetObject( n );
return NULL;
}
@@ -411,12 +411,12 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
if( pTok->IsIdentifier() )
{
- ByteString aName = pTok->GetString();
+ rtl::OString aName = pTok->GetString();
SvMetaTypeMemberList & rList = GetTypeList();
SvMetaType * pType = rList.First();
while( pType )
{
- if( pType->GetName().getString() == aName )
+ if( pType->GetName().getString().equals(aName) )
break;
pType = rList.Next();
}
@@ -485,7 +485,7 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
for( sal_uLong i = 0; i < aAttrList.Count(); i++ )
{
SvMetaAttribute * pAttr = aAttrList.GetObject( i );
- if( pAttr->GetSlotId().getString() == pTok->GetString() )
+ if( pAttr->GetSlotId().getString().equals(pTok->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().getString() == pTok->GetString() )
+ if( pClass->GetName().getString().equals(pTok->GetString()) )
return pClass;
}