summaryrefslogtreecommitdiff
path: root/idl/source/objects
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-12 08:58:26 +0200
committerNoel Grandin <noel@peralex.com>2016-02-12 09:13:43 +0200
commitb27dcabad349b68d2068dfe68924a5b0867f5ee9 (patch)
tree1f8810d1d321445b112ed76ba727dba1b3710450 /idl/source/objects
parentf3f533f0c60d90fb723ecf417ce3a20bc38fa6c7 (diff)
move parsing of enum into SvIdlParser
Change-Id: I89eef20d62f92f7345750c48c34c9f3b7bca287e
Diffstat (limited to 'idl/source/objects')
-rw-r--r--idl/source/objects/types.cxx54
1 files changed, 0 insertions, 54 deletions
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index d63e8c7801d2..c5c799d83dc2 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -354,60 +354,6 @@ SvMetaTypeEnum::SvMetaTypeEnum()
{
}
-namespace
-{
- OString getCommonSubPrefix(const OString &rA, const OString &rB)
- {
- sal_Int32 nMax = std::min(rA.getLength(), rB.getLength());
- sal_Int32 nI = 0;
- while (nI < nMax)
- {
- if (rA[nI] != rB[nI])
- break;
- ++nI;
- }
- return rA.copy(0, nI);
- }
-}
-
-void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase,
- SvTokenStream & rInStm )
-{
- sal_uInt32 nTokPos = rInStm.Tell();
-
- tools::SvRef<SvMetaEnumValue> aEnumVal = new SvMetaEnumValue();
- bool bOk = aEnumVal->ReadSvIdl( rBase, rInStm );
- if( bOk )
- {
- if( aEnumValueList.empty() )
- {
- // the first
- aPrefix = aEnumVal->GetName();
- }
- else
- {
- aPrefix = getCommonSubPrefix(aPrefix, aEnumVal->GetName());
- }
- aEnumValueList.push_back( aEnumVal );
- }
- if( !bOk )
- rInStm.Seek( nTokPos );
-}
-
-bool SvMetaTypeEnum::ReadSvIdl( SvIdlDataBase & rBase,
- SvTokenStream & rInStm )
-{
- sal_uInt32 nTokPos = rInStm.Tell();
- if( SvMetaType::ReadHeaderSvIdl( rBase, rInStm )
- && GetMetaTypeType() == MetaTypeType::Enum )
- {
- if( SvMetaObject::ReadSvIdl( rBase, rInStm ) )
- return true;
- }
- rInStm.Seek( nTokPos );
- return false;
-}
-
SvMetaTypevoid::SvMetaTypevoid()
: SvMetaType( "void" )
{