diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-26 09:46:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-26 11:10:41 +0000 |
commit | 12088021a0cebc2569b3e0f2e90e4f338d4d601b (patch) | |
tree | 44237f1a630edc63de12828f475304871fd9621f /idl/inc | |
parent | 5cc2997f0e9b20a5aa91b61dea6070189b0a584a (diff) |
ByteString->rtl::OString
Diffstat (limited to 'idl/inc')
-rw-r--r-- | idl/inc/basobj.hxx | 8 | ||||
-rw-r--r-- | idl/inc/bastype.hxx | 30 | ||||
-rw-r--r-- | idl/inc/command.hxx | 6 | ||||
-rw-r--r-- | idl/inc/module.hxx | 8 | ||||
-rw-r--r-- | idl/inc/object.hxx | 21 | ||||
-rw-r--r-- | idl/inc/slot.hxx | 28 | ||||
-rw-r--r-- | idl/inc/types.hxx | 14 |
7 files changed, 62 insertions, 53 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); |