summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--idl/inc/types.hxx8
-rw-r--r--idl/source/objects/types.cxx52
-rw-r--r--idl/source/prj/database.cxx37
3 files changed, 3 insertions, 94 deletions
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 789ef46d4f6a..9e4a74c6c81a 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -68,12 +68,10 @@ public:
SvIdlDataBase& );
};
-enum { CALL_VALUE, CALL_POINTER, CALL_REFERENCE };
enum { TYPE_METHOD, TYPE_STRUCT, TYPE_BASE, TYPE_ENUM,
TYPE_CLASS, TYPE_POINTER };
class SvMetaType : public SvMetaExtern
{
- Svint aCall0, aCall1;
SvIdentifier aCName;
SvIdentifier aBasicPostfix;
SvIdentifier aBasicName;
@@ -115,12 +113,6 @@ public:
bool IsItem() const { return bIsItem; }
bool IsShell() const { return bIsShell; }
- void SetCall0( int e );
- int GetCall0() const;
-
- void SetCall1( int e);
- int GetCall1() const;
-
void SetBasicName(const OString& rName)
{ aBasicName.setString(rName); }
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 4ebfcc371a2d..51be69d31af5 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -181,9 +181,7 @@ void SvMetaAttribute::Insert (SvSlotElementList&, const OString&, SvIdlDataBase&
}
#define CTOR \
- : aCall0( CALL_VALUE, false ) \
- , aCall1( CALL_VALUE, false ) \
- , pAttrList( nullptr ) \
+ : pAttrList( nullptr ) \
, nType( TYPE_BASE ) \
, bIsItem( false ) \
, bIsShell( false ) \
@@ -264,54 +262,6 @@ const OString& SvMetaType::GetBasicName() const
return static_cast<SvMetaType*>(GetRef())->GetBasicName();
}
-void SvMetaType::SetCall0( int e )
-{
- aCall0 = (int)e;
- if( aCall0 == CALL_VALUE && aCall1 == CALL_VALUE )
- {
- if( GetType() == TYPE_POINTER )
- SetType( TYPE_BASE );
- }
- else
- {
- DBG_ASSERT( nType == TYPE_POINTER || nType == TYPE_BASE,
- "set no base type to pointer" );
- SetType( TYPE_POINTER );
- }
-}
-
-int SvMetaType::GetCall0() const
-{
- if( aCall0.IsSet() || !GetRef() )
- return aCall0;
- else
- return static_cast<SvMetaType *>(GetRef())->GetCall0();
-}
-
-void SvMetaType::SetCall1( int e )
-{
- aCall1 = (int)e;
- if( aCall0 == CALL_VALUE && aCall1 == CALL_VALUE )
- {
- if( GetType() == TYPE_POINTER )
- SetType( TYPE_BASE );
- }
- else
- {
- DBG_ASSERT( nType == TYPE_POINTER || nType == TYPE_BASE,
- "set no base type to pointer" );
- SetType( TYPE_POINTER );
- }
-}
-
-int SvMetaType::GetCall1() const
-{
- if( aCall1.IsSet() || !GetRef() )
- return aCall1;
- else
- return static_cast<SvMetaType *>(GetRef())->GetCall1();
-}
-
const OString& SvMetaType::GetCName() const
{
if( aCName.IsSet() || !GetRef() )
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 67c6c0a58f7e..3e69e54ae54c 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -283,10 +283,6 @@ SvMetaType * SvIdlDataBase::FindType( const OString& rName )
SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
{
- int nCall0 = CALL_VALUE;
- int nCall1 = CALL_VALUE;
- bool bSet = false; // any attribute set
-
sal_uInt32 nTokPos = rInStm.Tell();
SvToken * pTok = rInStm.GetToken_Next();
@@ -316,37 +312,8 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
}
if( pType )
{
- pTok = &rInStm.GetToken();
- if( pTok->IsChar() )
- {
- if( pTok->GetChar() == '&' || pTok->GetChar() == '*' )
- {
- nCall0 = (pTok->GetChar() == '&') ? CALL_REFERENCE :
- CALL_POINTER;
- rInStm.GetToken_Next();
- pTok = &rInStm.GetToken();
- if( pTok->GetChar() == '&' || pTok->GetChar() == '*' )
- {
- nCall1 = (pTok->GetChar() == '&') ? CALL_REFERENCE :
- CALL_POINTER;
- rInStm.GetToken_Next();
- }
- bSet = true;
- }
- }
-
- if( !bSet )
- // is exactly this type
- return pType;
-
- DBG_ASSERT( aTmpTypeList.front(), "mindestens ein Element" );
- tools::SvRef<SvMetaType> xType( new SvMetaType( pType->GetName().getString(), 'h', "dummy" ) );
- xType->SetRef( pType );
- xType->SetCall0( nCall0 );
- xType->SetCall1( nCall1 );
-
- aTmpTypeList.push_back( xType );
- return xType;
+ // is exactly this type
+ return pType;
}
}
rInStm.Seek( nTokPos );