summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-01-14 13:52:54 +0200
committerMichael Stahl <mstahl@redhat.com>2014-01-16 16:08:34 +0100
commitc648d0872058941ed18499a8bf1993037d9b5532 (patch)
tree47121b3eff267e34480335130106ca1c33be6fd9 /idl
parent70f360f34a9f6605864644feee3c9b9b6ffb79a1 (diff)
convert SvStream::operator<< overloads to more explicit methods
This is in preparation for more conversion of SvStream::operator<< calls to use more explicit method names. This converts the subclasses that have their own convenience overloads of operator<< to use normal methods. Change-Id: I5efd5d9a24c264cb86d2471303dd5849bf91ba80
Diffstat (limited to 'idl')
-rw-r--r--idl/inc/bastype.hxx14
-rw-r--r--idl/source/objects/basobj.cxx18
-rw-r--r--idl/source/objects/bastype.cxx12
-rw-r--r--idl/source/objects/module.cxx12
-rw-r--r--idl/source/objects/object.cxx10
-rw-r--r--idl/source/objects/slot.cxx20
-rw-r--r--idl/source/objects/types.cxx30
-rw-r--r--idl/source/prj/database.cxx4
8 files changed, 60 insertions, 60 deletions
diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx
index f03f3f6d4c8d..8a2fe6f65a4e 100644
--- a/idl/inc/bastype.hxx
+++ b/idl/inc/bastype.hxx
@@ -42,7 +42,7 @@ public:
static sal_uInt32 Read( SvStream & rStm );
static void Write( SvStream & rStm, sal_uInt32 nVal );
- friend SvStream& operator << (SvStream & rStm, const SvUINT32 & r )
+ friend SvStream& WriteSvUINT32(SvStream & rStm, const SvUINT32 & r )
{ SvUINT32::Write( rStm, r.nVal ); return rStm; }
friend SvStream& operator >> (SvStream & rStm, SvUINT32 & r )
{ r.nVal = SvUINT32::Read( rStm ); return rStm; }
@@ -62,7 +62,7 @@ public:
operator int ()const { return nVal; }
sal_Bool IsSet() const { return bSet; }
- friend SvStream& operator << (SvStream & rStm, const Svint & r )
+ friend SvStream& WriteSvint(SvStream & rStm, const Svint & r )
{ SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); rStm << r.bSet; return rStm; }
friend SvStream& operator >> (SvStream & rStm, Svint & r )
{ r.nVal = (int)SvUINT32::Read( rStm ); rStm >> r.bSet ; return rStm; }
@@ -86,7 +86,7 @@ public:
sal_Bool Is() const { return nVal; }
sal_Bool IsSet() const { return bSet; }
- friend SvStream& operator << (SvStream &, const SvBOOL &);
+ friend SvStream& WriteSvBOOL(SvStream &, const SvBOOL &);
friend SvStream& operator >> (SvStream &, SvBOOL &);
sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
@@ -111,7 +111,7 @@ public:
{
return m_aStr;
}
- friend SvStream& operator << (SvStream &, const SvIdentifier &);
+ friend SvStream& WriteSvIdentifier(SvStream &, const SvIdentifier &);
friend SvStream& operator >> (SvStream &, SvIdentifier &);
sal_Bool IsSet() const
@@ -138,7 +138,7 @@ public:
sal_uInt32 GetValue() const { return nValue; }
void SetValue( sal_uInt32 nVal ) { nValue = nVal; }
- friend SvStream& operator << (SvStream &, const SvNumberIdentifier &);
+ friend SvStream& WriteSvNumberIdentifier(SvStream &, const SvNumberIdentifier &);
friend SvStream& operator >> (SvStream &, SvNumberIdentifier &);
sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
sal_Bool ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName,
@@ -164,7 +164,7 @@ public:
{
return !m_aStr.isEmpty();
}
- friend SvStream& operator << (SvStream &, const SvString &);
+ friend SvStream& WriteSvString(SvStream &, const SvString &);
friend SvStream& operator >> (SvStream &, SvString &);
sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
@@ -215,7 +215,7 @@ public:
sal_uInt16 GetMajorVersion() const { return nMajorVersion; }
sal_uInt16 GetMinorVersion() const { return nMinorVersion; }
- friend SvStream& operator << (SvStream &, const SvVersion &);
+ friend SvStream& WriteSvVersion(SvStream &, const SvVersion &);
friend SvStream& operator >> (SvStream &, SvVersion &);
sal_Bool ReadSvIdl( SvTokenStream & rInStm );
sal_Bool WriteSvIdl( SvStream & rOutStm );
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index 7901b2fa798d..c305b517c11c 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -145,11 +145,11 @@ void SvMetaName::Save( SvPersistStream & rStm )
if( aDescription.IsSet() ) nMask |= 0x10;
rStm << nMask;
- if( nMask & 0x01 ) rStm << aName;
- if( nMask & 0x02 ) rStm << aHelpContext;
- if( nMask & 0x04 ) rStm << aHelpText;
- if( nMask & 0x08 ) rStm << aConfigName;
- if( nMask & 0x10 ) rStm << aDescription;
+ if( nMask & 0x01 ) WriteSvString( rStm, aName );
+ if( nMask & 0x02 ) WriteSvNumberIdentifier( rStm, aHelpContext );
+ if( nMask & 0x04 ) WriteSvString( rStm, aHelpText );
+ if( nMask & 0x08 ) WriteSvString( rStm, aConfigName );
+ if( nMask & 0x10 ) WriteSvString( rStm, aDescription );
}
sal_Bool SvMetaName::SetName( const OString& rName, SvIdlDataBase * )
@@ -427,7 +427,7 @@ void SvMetaReference::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
- if( nMask & 0x01 ) rStm << aRef;
+ if( nMask & 0x01 ) WriteSvPersistBase( rStm, aRef );
}
SV_IMPL_META_FACTORY1( SvMetaExtern, SvMetaReference );
@@ -472,9 +472,9 @@ void SvMetaExtern::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
- if( nMask & 0x01 ) rStm << pModule;
- if( nMask & 0x02 ) rStm << aUUId;
- if( nMask & 0x04 ) rStm << aVersion;
+ if( nMask & 0x01 ) WriteSvPersistBase( rStm, pModule );
+ if( nMask & 0x02 ) WriteSvGlobalName( rStm, aUUId );
+ if( nMask & 0x04 ) WriteSvVersion( rStm, aVersion );
}
SvMetaModule * SvMetaExtern::GetModule() const
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index 171c32cc78ce..bccb4e64567a 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -66,7 +66,7 @@ void SvUINT32::Write( SvStream & rStm, sal_uInt32 nVal )
SvPersistStream::WriteCompressed( rStm, nVal );
}
-SvStream& operator << (SvStream & rStm, const SvBOOL & rb )
+SvStream& WriteSvBOOL(SvStream & rStm, const SvBOOL & rb )
{
sal_uInt8 n = rb.nVal;
if( rb.bSet )
@@ -88,7 +88,7 @@ SvStream& operator >> (SvStream & rStm, SvBOOL & rb )
return rStm;
}
-SvStream& operator << (SvStream & rStm, const SvVersion & r )
+SvStream& WriteSvVersion(SvStream & rStm, const SvVersion & r )
{
if( (r.GetMajorVersion() || r.GetMinorVersion())
&& r.GetMajorVersion() <= 0x0F && r.GetMinorVersion() <= 0x0F )
@@ -212,7 +212,7 @@ sal_Bool SvIdentifier::WriteSvIdl( SvStringHashEntry * pName,
return sal_True;
}
-SvStream& operator << (SvStream & rStm, const SvIdentifier & r )
+SvStream& WriteSvIdentifier(SvStream & rStm, const SvIdentifier & r )
{
write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, r.getString());
return rStm;
@@ -275,9 +275,9 @@ sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
return sal_False;
}
-SvStream& operator << (SvStream & rStm, const SvNumberIdentifier & r )
+SvStream& WriteSvNumberIdentifier(SvStream & rStm, const SvNumberIdentifier & r )
{
- rStm << (SvIdentifier &)r;
+ WriteSvIdentifier( rStm, (SvIdentifier &)r );
SvPersistStream::WriteCompressed( rStm, r.nValue );
return rStm;
}
@@ -325,7 +325,7 @@ sal_Bool SvString::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
return sal_True;
}
-SvStream& operator << (SvStream & rStm, const SvString & r )
+SvStream& WriteSvString(SvStream & rStm, const SvString & r )
{
write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, r.getString());
return rStm;
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 14acf1944fbb..2bd822db0a2d 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -77,9 +77,9 @@ void SvMetaModule::Save( SvPersistStream & rStm )
rStm << (sal_uInt16)(MODULE_VER | IDL_WRITE_COMPILER); // Version
- rStm << aClassList;
- rStm << aTypeList;
- rStm << aAttrList;
+ WriteSvDeclPersistList( rStm, aClassList );
+ WriteSvDeclPersistList( rStm, aTypeList );
+ WriteSvDeclPersistList( rStm, aAttrList );
// browser
rStm.WriteUniOrByteString( aIdlFileName, rStm.GetStreamCharSet() );
write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aHelpFileName.getString());
@@ -90,9 +90,9 @@ void SvMetaModule::Save( SvPersistStream & rStm )
sal_uInt16 nCmpLen = 0;
sal_uLong nLenPos = rStm.Tell();
rStm << nCmpLen;
- rStm << aBeginName;
- rStm << aEndName;
- rStm << aNextName;
+ WriteSvGlobalName( rStm, aBeginName );
+ WriteSvGlobalName( rStm, aEndName );
+ WriteSvGlobalName( rStm, aNextName );
// write length of compiler data
sal_uLong nPos = rStm.Tell();
rStm.Seek( nLenPos );
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index d826561fd838..81996677f701 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -65,7 +65,7 @@ void SvClassElement::Save( SvPersistStream & rStm )
rStm << nMask;
if( nMask & 0x01 ) rStm << aAutomation;
if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aPrefix);
- if( nMask & 0x04 ) rStm << xClass;
+ if( nMask & 0x04 ) WriteSvPersistBase( rStm, xClass );
}
SV_IMPL_META_FACTORY1( SvMetaClass, SvMetaType );
@@ -117,10 +117,10 @@ void SvMetaClass::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
- if( nMask & 0x01 ) rStm << aAttrList;
- if( nMask & 0x02 ) rStm << aSuperClass;
- if( nMask & 0x04 ) rStm << aClassList;
- if( nMask & 0x08 ) rStm << xAutomationInterface;
+ if( nMask & 0x01 ) WriteSvDeclPersistList( rStm, aAttrList );
+ if( nMask & 0x02 ) WriteSvPersistBase( rStm, aSuperClass );
+ if( nMask & 0x04 ) WriteSvDeclPersistList( rStm, aClassList );
+ if( nMask & 0x08 ) WriteSvPersistBase( rStm, xAutomationInterface );
if( nMask & 0x10 ) rStm << aAutomation;
}
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index c54010439a42..3f96386c24a5 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -182,19 +182,19 @@ void SvMetaSlot::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
TEST_WRITE
- if( nMask & 0x0001 ) rStm << aMethod;
+ if( nMask & 0x0001 ) WriteSvPersistBase( rStm, aMethod );
TEST_WRITE
- if( nMask & 0x0002 ) rStm << aGroupId;
+ if( nMask & 0x0002 ) WriteSvIdentifier( rStm, aGroupId );
TEST_WRITE
if( nMask & 0x0004 ) rStm << aHasCoreId;
TEST_WRITE
- if( nMask & 0x0008 ) rStm << aConfigId;
+ if( nMask & 0x0008 ) WriteSvIdentifier( rStm, aConfigId );
TEST_WRITE
- if( nMask & 0x0010 ) rStm << aExecMethod;
+ if( nMask & 0x0010 ) WriteSvIdentifier( rStm, aExecMethod );
TEST_WRITE
- if( nMask & 0x0020 ) rStm << aStateMethod;
+ if( nMask & 0x0020 ) WriteSvIdentifier( rStm, aStateMethod );
TEST_WRITE
- if( nMask & 0x0040 ) rStm << aDefault;
+ if( nMask & 0x0040 ) WriteSvIdentifier( rStm, aDefault );
TEST_WRITE
if( nMask & 0x0080 ) rStm << aPseudoSlots;
TEST_WRITE
@@ -245,9 +245,9 @@ void SvMetaSlot::Save( SvPersistStream & rStm )
TEST_WRITE
if( nMask & 0x0008 ) rStm << aHasDialog;
TEST_WRITE
- if( nMask & 0x0010 ) rStm << aDisableFlags;
+ if( nMask & 0x0010 ) WriteSvString( rStm, aDisableFlags );
TEST_WRITE
- if( nMask & 0x0020 ) rStm << aPseudoPrefix;
+ if( nMask & 0x0020 ) WriteSvIdentifier( rStm, aPseudoPrefix );
TEST_WRITE
if( nMask & 0x0040 ) rStm << aRecordPerSet;
TEST_WRITE
@@ -263,7 +263,7 @@ void SvMetaSlot::Save( SvPersistStream & rStm )
TEST_WRITE
if( nMask & 0x1000 ) rStm << aContainer;
TEST_WRITE
- if( nMask & 0x2000 ) rStm << aSlotType;
+ if( nMask & 0x2000 ) WriteSvPersistBase( rStm, aSlotType );
TEST_WRITE
if( nMask & 0x4000 ) rStm << aRecordAbsolute;
TEST_WRITE
@@ -274,7 +274,7 @@ void SvMetaSlot::Save( SvPersistStream & rStm )
if( aImageReflection.IsSet() ) nMask |= 0x0002;
rStm << nMask;
TEST_WRITE
- if( nMask & 0x0001 ) rStm << aUnoName;
+ if( nMask & 0x0001 ) WriteSvString( rStm, aUnoName );
TEST_WRITE
if( nMask & 0x0002 ) rStm << aImageReflection;
}
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 15b835f9f67e..c9c93717134f 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -87,8 +87,8 @@ void SvMetaAttribute::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
- if( nMask & 0x1 ) rStm << aType;
- if( nMask & 0x2 ) rStm << aSlotId;
+ if( nMask & 0x1 ) WriteSvPersistBase( rStm, aType );
+ if( nMask & 0x2 ) WriteSvNumberIdentifier( rStm, aSlotId );
if( nMask & 0x4 ) rStm << aExport;
if( nMask & 0x8 ) rStm << aReadonly;
if( nMask & 0x10 ) rStm << aAutomation;
@@ -838,20 +838,20 @@ void SvMetaType::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
- if( nMask & 0x0001 ) rStm << aIn;
- if( nMask & 0x0002 ) rStm << aOut;
- if( nMask & 0x0004 ) rStm << aCall0;
- if( nMask & 0x0008 ) rStm << aCall1;
- if( nMask & 0x0010 ) rStm << aSbxDataType;
- if( nMask & 0x0020 ) rStm << aSvName;
- if( nMask & 0x0040 ) rStm << aSbxName;
- if( nMask & 0x0080 ) rStm << aOdlName;
- if( nMask & 0x0100 ) rStm << *pAttrList;
+ if( nMask & 0x0001 ) WriteSvBOOL( rStm, aIn );
+ if( nMask & 0x0002 ) WriteSvBOOL( rStm, aOut );
+ if( nMask & 0x0004 ) WriteSvint( rStm, aCall0 );
+ if( nMask & 0x0008 ) WriteSvint( rStm, aCall1 );
+ if( nMask & 0x0010 ) WriteSvint( rStm, aSbxDataType );
+ if( nMask & 0x0020 ) WriteSvIdentifier( rStm, aSvName );
+ if( nMask & 0x0040 ) WriteSvIdentifier( rStm, aSbxName );
+ if( nMask & 0x0080 ) WriteSvIdentifier( rStm, aOdlName );
+ if( nMask & 0x0100 ) WriteSvDeclPersistList( rStm, *pAttrList );
if( nMask & 0x0800 ) rStm << (sal_uInt16)nType;
if( nMask & 0x1000 ) rStm << cParserChar;
- if( nMask & 0x2000 ) rStm << aCName;
- if( nMask & 0x4000 ) rStm << aBasicName;
- if( nMask & 0x8000 ) rStm << aBasicPostfix;
+ if( nMask & 0x2000 ) WriteSvIdentifier( rStm, aCName );
+ if( nMask & 0x4000 ) WriteSvIdentifier( rStm, aBasicName );
+ if( nMask & 0x8000 ) WriteSvIdentifier( rStm, aBasicPostfix );
}
SvMetaAttributeMemberList & SvMetaType::GetAttrList() const
@@ -1841,7 +1841,7 @@ void SvMetaTypeEnum::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
- if( nMask & 0x01 ) rStm << aEnumValueList;
+ if( nMask & 0x01 ) WriteSvDeclPersistList( rStm, aEnumValueList );
if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aPrefix);
}
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index b42c5728930c..1439ce7a1fb4 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -144,10 +144,10 @@ void SvIdlDataBase::Save( SvStream & rStm, sal_uInt32 nFlags )
if( !pModule->IsImported() )
aList.insert( pModule->GetClassList() );
}
- aPStm << aList;
+ WriteSvDeclPersistList( aPStm, aList );
}
else
- aPStm << aClassList;
+ WriteSvDeclPersistList( aPStm, aClassList );
aTypeList.WriteObjects( aPStm, bOnlyStreamedObjs );
aAttrList.WriteObjects( aPStm, bOnlyStreamedObjs );