[Libreoffice-commits] core.git: idl/inc idl/source

Noel Grandin noel at peralex.com
Sun Feb 7 06:51:58 UTC 2016


 idl/inc/types.hxx            |    8 ------
 idl/source/objects/types.cxx |   52 -------------------------------------------
 idl/source/prj/database.cxx  |   37 +-----------------------------
 3 files changed, 3 insertions(+), 94 deletions(-)

New commits:
commit 5d410b57bee6fe6e4ffcf9365874708f1b2a2662
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 5 11:29:32 2016 +0200

    remove CALL enum and associated code paths
    
    not used
    
    Change-Id: Ia000014d48ac6da92b396c4aa7b736c8a6f27149
    Reviewed-on: https://gerrit.libreoffice.org/22148
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 789ef46..9e4a74c 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 4ebfcc3..51be69d 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 67c6c0a..3e69e54 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 );


More information about the Libreoffice-commits mailing list