diff options
author | Jacek Fraczek <fraczek.jacek@gmail.com> | 2016-10-05 22:00:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-10 08:48:30 +0000 |
commit | f004aa99514d385f3ee254bba735f5eaeb7d9ad8 (patch) | |
tree | aacd5792f553b8e9cbf029cc7e0797ed0dd423fe /idl | |
parent | 728c7327bd97602a38723553ed044ea4c01d13b2 (diff) |
tdf#89307: Removed SvRef::operator T*()
Conditional statements are using SvRef::Is() method.
Changed static_cast<T*>(svRef<T>) occurances to svRef.get().
Added operator == and != to SvRef.
SbxObject::Execute is using SbxVariableRef internally.
SbxObject::FindQualified is using SbxVariableRef internally.
Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395
Reviewed-on: https://gerrit.libreoffice.org/29621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'idl')
-rw-r--r-- | idl/inc/basobj.hxx | 2 | ||||
-rw-r--r-- | idl/inc/globals.hxx | 2 | ||||
-rw-r--r-- | idl/inc/object.hxx | 2 | ||||
-rw-r--r-- | idl/source/objects/object.cxx | 4 | ||||
-rw-r--r-- | idl/source/objects/slot.cxx | 6 | ||||
-rw-r--r-- | idl/source/objects/types.cxx | 4 | ||||
-rw-r--r-- | idl/source/prj/parser.cxx | 22 |
7 files changed, 21 insertions, 21 deletions
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index d6adb8d809ad..44de0278c36b 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -121,7 +121,7 @@ public: : aRef->GetName(); } - SvMetaReference * GetRef() const { return aRef; } + SvMetaReference * GetRef() const { return aRef.get(); } void SetRef( SvMetaReference * pRef ) { aRef = pRef; } }; diff --git a/idl/inc/globals.hxx b/idl/inc/globals.hxx index e49e81ef07f5..ad8aee0c2e45 100644 --- a/idl/inc/globals.hxx +++ b/idl/inc/globals.hxx @@ -88,7 +88,7 @@ inline SvStringHashEntry * SvHash_##Name() \ { \ if( !GetIdlApp().pGlobalNames ) \ GetIdlApp().pGlobalNames = new SvGlobalHashNames(); \ - return GetIdlApp().pGlobalNames->MM_##Name; \ + return GetIdlApp().pGlobalNames->MM_##Name.get(); \ } HASH_INLINE(module) diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx index d6c39055973a..6c8c90b3a74a 100644 --- a/idl/inc/object.hxx +++ b/idl/inc/object.hxx @@ -43,7 +43,7 @@ public: void SetClass( SvMetaClass * pClass ) { xClass = pClass; } SvMetaClass * GetClass() const - { return xClass; } + { return xClass.get(); } }; diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index efa7f17bef5b..7b0e648e7a41 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -91,7 +91,7 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase, aI.SetValue( rBase.GetUniqueId() ); xAttr->SetSlotId( aI ); } - aAttrList.push_back( xAttr ); + aAttrList.push_back( xAttr.get() ); return; } } @@ -129,7 +129,7 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, } } } - SvMetaClass * pSC = aSuperClass; + SvMetaClass * pSC = aSuperClass.get(); if( pSC ) return pSC->TestAttribute( rBase, rInStm, rAttr ); return true; diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index a4df0c89dbb1..d72e996eba68 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -110,12 +110,12 @@ OString SvMetaSlot::GetMangleName() const /** reference disbandment **/ SvMetaType * SvMetaSlot::GetSlotType() const { - if( aSlotType.Is() || !GetRef() ) return aSlotType; + if( aSlotType.Is() || !GetRef() ) return aSlotType.get(); return static_cast<SvMetaSlot *>(GetRef())->GetSlotType(); } SvMetaAttribute * SvMetaSlot::GetMethod() const { - if( aMethod.Is() || !GetRef() ) return aMethod; + if( aMethod.Is() || !GetRef() ) return aMethod.get(); return static_cast<SvMetaSlot *>(GetRef())->GetMethod(); } const OString& SvMetaSlot::GetGroupId() const @@ -510,7 +510,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const OString& rPrefix, xEnumSlot->SetEnumValue(enumValue); if ( !pFirstEnumSlot || xEnumSlot->GetSlotId().GetValue() < pFirstEnumSlot->GetSlotId().GetValue() ) - pFirstEnumSlot = xEnumSlot; + pFirstEnumSlot = xEnumSlot.get(); // insert the created slave as well xEnumSlot->Insert( rList, rPrefix, rBase); diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index d40230a5b2e1..ca5bb4d01844 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -39,7 +39,7 @@ SvMetaAttribute::SvMetaAttribute( SvMetaType * pType ) SvMetaType * SvMetaAttribute::GetType() const { - if( aType.Is() || !GetRef() ) return aType; + if( aType.Is() || !GetRef() ) return aType.get(); return static_cast<SvMetaAttribute *>(GetRef())->GetType(); } @@ -208,7 +208,7 @@ void SvMetaType::ReadContextSvIdl( SvIdlDataBase & rBase, if( xAttr->ReadSvIdl( rBase, rInStm ) ) { if( xAttr->Test( rInStm ) ) - GetAttrList().push_back( xAttr ); + GetAttrList().push_back( xAttr.get() ); } } diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index 43bc649dfec6..d21e334a3c51 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -40,7 +40,7 @@ void SvIdlParser::ReadSvIdl( const OUString & rPath ) Read( SvHash_module() ); tools::SvRef<SvMetaModule> aModule = new SvMetaModule; ReadModuleHeader(*aModule); - rBase.GetModuleList().push_back( aModule ); + rBase.GetModuleList().push_back( aModule.get() ); } } @@ -119,7 +119,7 @@ void SvIdlParser::ReadModuleElement( SvMetaModule& rModule ) if( xSlot->Test( rInStm ) ) { // announce globally - rBase.AppendSlot( xSlot ); + rBase.AppendSlot( xSlot.get() ); } } } @@ -192,7 +192,7 @@ void SvIdlParser::ReadStruct() if( !rBase.FindId( xAttr->aSlotId.getString(), &n ) ) throw SvParseException( rInStm, "no value for identifier <" + xAttr->aSlotId.getString() + "> " ); xAttr->aSlotId.SetValue(n); - xStruct->GetAttrList().push_back( xAttr ); + xStruct->GetAttrList().push_back( xAttr.get() ); if( !ReadIfDelimiter() ) break; if( rInStm.GetToken().IsChar() && rInStm.GetToken().GetChar() == '}') @@ -201,7 +201,7 @@ void SvIdlParser::ReadStruct() Read( '}' ); ReadDelimiter(); // announce globally - rBase.GetTypeList().push_back( xStruct ); + rBase.GetTypeList().push_back( xStruct.get() ); } void SvIdlParser::ReadItem() @@ -211,7 +211,7 @@ void SvIdlParser::ReadItem() xItem->SetRef( ReadKnownType() ); xItem->SetName( ReadIdentifier() ); // announce globally - rBase.GetTypeList().push_back( xItem ); + rBase.GetTypeList().push_back( xItem.get() ); } void SvIdlParser::ReadEnum() @@ -229,7 +229,7 @@ void SvIdlParser::ReadEnum() } Read( '}' ); // announce globally - rBase.GetTypeList().push_back( xEnum ); + rBase.GetTypeList().push_back( xEnum.get() ); } static OString getCommonSubPrefix(const OString &rA, const OString &rB) @@ -258,7 +258,7 @@ void SvIdlParser::ReadEnumValue( SvMetaTypeEnum& rEnum ) { rEnum.aPrefix = getCommonSubPrefix(rEnum.aPrefix, aEnumVal->GetName()); } - rEnum.aEnumValueList.push_back( aEnumVal ); + rEnum.aEnumValueList.push_back( aEnumVal.get() ); } void SvIdlParser::ReadInterfaceOrShell( SvMetaModule& rModule, MetaTypeType aMetaTypeType ) @@ -284,9 +284,9 @@ void SvIdlParser::ReadInterfaceOrShell( SvMetaModule& rModule, MetaTypeType aMet } Read( '}' ); } - rModule.aClassList.push_back( aClass ); + rModule.aClassList.push_back( aClass.get() ); // announce globally - rBase.GetClassList().push_back( aClass ); + rBase.GetClassList().push_back( aClass.get() ); } void SvIdlParser::ReadInterfaceOrShellEntry(SvMetaClass& rClass) @@ -327,7 +327,7 @@ void SvIdlParser::ReadInterfaceOrShellEntry(SvMetaClass& rClass) { if( !xAttr->GetSlotId().IsSet() ) xAttr->SetSlotId( SvIdentifier(rBase.GetUniqueId()) ); - rClass.aAttrList.push_back( xAttr ); + rClass.aAttrList.push_back( xAttr.get() ); } } } @@ -488,7 +488,7 @@ void SvIdlParser::ReadInterfaceOrShellMethod( SvMetaAttribute& rAttr ) xParamAttr->aType = ReadKnownType(); xParamAttr->SetName( ReadIdentifier() ); ReadSlotId(xParamAttr->aSlotId); - rAttr.aType->GetAttrList().push_back( xParamAttr ); + rAttr.aType->GetAttrList().push_back( xParamAttr.get() ); if (!ReadIfDelimiter()) break; } |