basctl/sdi/basslots.sdi | 3 - idl/inc/basobj.hxx | 36 +------------ idl/inc/bastype.hxx | 25 --------- idl/inc/command.hxx | 2 idl/inc/database.hxx | 15 ++--- idl/inc/globals.hxx | 4 - idl/inc/lex.hxx | 12 ++-- idl/inc/module.hxx | 9 --- idl/inc/object.hxx | 8 +- idl/inc/slot.hxx | 90 +++++++++++++++------------------ idl/inc/types.hxx | 56 +++++++------------- idl/source/objects/basobj.cxx | 23 +------- idl/source/objects/bastype.cxx | 9 --- idl/source/objects/module.cxx | 29 +--------- idl/source/objects/object.cxx | 28 +++++----- idl/source/objects/slot.cxx | 75 ++++++++++++++++++--------- idl/source/objects/types.cxx | 105 +++++++-------------------------------- idl/source/prj/database.cxx | 29 +++++----- idl/source/prj/globals.cxx | 2 include/sfx2/msg.hxx | 12 +--- sc/sdi/scslots.sdi | 9 --- sc/sdi/tabvwsh.sdi | 17 ------ sd/sdi/sdgslots.sdi | 9 --- sd/sdi/sdslots.sdi | 9 --- sfx2/sdi/sfxslots.sdi | 3 - sfx2/source/control/bindings.cxx | 10 +-- sfx2/source/control/msg.cxx | 8 +- sfx2/source/control/objface.cxx | 6 +- sfx2/source/control/shell.cxx | 2 starmath/sdi/smslots.sdi | 3 - svx/sdi/svxslots.sdi | 3 - sw/sdi/swslots.sdi | 9 --- 32 files changed, 220 insertions(+), 440 deletions(-)
New commits: commit c4f056c01b674046c8d1852ae5e5ce0d48b0714f Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 13:48:55 2016 +0200 disambiguate the two GetType methods Change-Id: I922af3a2ebe8cdaa6465542a5d6de365e1bc6dff diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 09c8a7c..48d3331 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -80,7 +80,7 @@ public: sal_uLong GetAttrCount() const { return aAttrList.size(); } void SetType( MetaTypeType nT ); - MetaTypeType GetType() const { return nType; } + MetaTypeType GetMetaTypeType() const { return nType; } SvMetaType * GetBaseType() const; SvMetaType * GetReturnType() const; bool IsItem() const { return bIsItem; } diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index ecc2691..f95ea36 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -109,7 +109,7 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase, bool SvMetaClass::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { sal_uLong nTokPos = rInStm.Tell(); - if( SvMetaType::ReadHeaderSvIdl( rBase, rInStm ) && GetType() == MetaTypeType::Class ) + if( SvMetaType::ReadHeaderSvIdl( rBase, rInStm ) && GetMetaTypeType() == MetaTypeType::Class ) { bool bOk = true; if( rInStm.Read( ':' ) ) diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index cb8ce82..d2cddd7 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -84,12 +84,12 @@ bool SvMetaSlot::GetHidden() const bool SvMetaSlot::IsVariable() const { SvMetaType * pType = GetType(); - return pType->GetType() != MetaTypeType::Method; + return pType->GetMetaTypeType() != MetaTypeType::Method; } bool SvMetaSlot::IsMethod() const { - bool b = GetType()->GetType() == MetaTypeType::Method; + bool b = GetType()->GetMetaTypeType() == MetaTypeType::Method; b |= nullptr != GetMethod(); return b; } @@ -338,7 +338,7 @@ bool SvMetaSlot::Test( SvIdlDataBase & rBase, SvTokenStream & rInStm ) if( bOk ) { SvMetaType * pType = GetType(); - if( pType->GetType() == MetaTypeType::Method ) + if( pType->GetMetaTypeType() == MetaTypeType::Method ) pType = pType->GetReturnType(); if( !pType->IsItem() ) { diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index d4eaf65..392b0b0 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -114,7 +114,7 @@ sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) DBG_ASSERT( pType, "no type for attribute" ); SvMetaType * pBaseType = pType->GetBaseType(); DBG_ASSERT( pBaseType, "no base type for attribute" ); - if( pBaseType->GetType() == MetaTypeType::Struct ) + if( pBaseType->GetMetaTypeType() == MetaTypeType::Struct ) return pBaseType->MakeSfx( rAttrArray ); else { @@ -162,14 +162,14 @@ void SvMetaType::SetType( MetaTypeType nT ) SvMetaType * SvMetaType::GetBaseType() const { - if( GetRef() && GetType() == MetaTypeType::Base ) + if( GetRef() && GetMetaTypeType() == MetaTypeType::Base ) return static_cast<SvMetaType *>(GetRef())->GetBaseType(); return const_cast<SvMetaType *>(this); } SvMetaType * SvMetaType::GetReturnType() const { - DBG_ASSERT( GetType() == MetaTypeType::Method, "no method" ); + DBG_ASSERT( GetMetaTypeType() == MetaTypeType::Method, "no method" ); DBG_ASSERT( GetRef(), "no return type" ); return static_cast<SvMetaType *>(GetRef()); } @@ -254,7 +254,7 @@ sal_uLong SvMetaType::MakeSfx( OStringBuffer& rAttrArray ) { sal_uLong nC = 0; - if( GetBaseType()->GetType() == MetaTypeType::Struct ) + if( GetBaseType()->GetMetaTypeType() == MetaTypeType::Struct ) { sal_uLong nAttrCount = GetAttrCount(); // write the single attributes @@ -331,7 +331,7 @@ void SvMetaType::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) { if( IsItem() ) { - if( GetBaseType()->GetType() == MetaTypeType::Struct ) + if( GetBaseType()->GetMetaTypeType() == MetaTypeType::Struct ) GetBaseType()->WriteSfxItem( GetName(), rBase, rOutStm ); else WriteSfxItem( GetName(), rBase, rOutStm ); @@ -419,7 +419,7 @@ bool SvMetaTypeEnum::ReadSvIdl( SvIdlDataBase & rBase, { sal_uInt32 nTokPos = rInStm.Tell(); if( SvMetaType::ReadHeaderSvIdl( rBase, rInStm ) - && GetType() == MetaTypeType::Enum ) + && GetMetaTypeType() == MetaTypeType::Enum ) { if( SvMetaObject::ReadSvIdl( rBase, rInStm ) ) return true; commit 898061f9265da374b57d0c799618b12cbe832510 Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 13:35:00 2016 +0200 move isMethod/isVariable down from SvMetaAttribute to SvMetaSlot Change-Id: Ic13c61d6bd75d12e9dc5c75eaa75573dcb3b3b0b diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index 9e5296e..8c838ad 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -66,6 +66,9 @@ class SvMetaSlot : public SvMetaAttribute void SetEnumValue(SvMetaEnumValue *p) { pEnumValue = p; } OString GetMangleName() const; + bool IsVariable() const; + bool IsMethod() const; + protected: void SetToggle( bool bSet ) { aToggle = bSet; } void SetAutoUpdate( bool bSet ) { aAutoUpdate = bSet; } @@ -97,9 +100,6 @@ public: SvMetaSlot(); SvMetaSlot( SvMetaType * pType ); - virtual bool IsVariable() const override; - virtual bool IsMethod() const override; - SvMetaAttribute * GetMethod() const; SvMetaType * GetSlotType() const; const OString& GetGroupId() const; diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 16ab9db..09c8a7c 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -46,10 +46,6 @@ public: const SvIdentifier& GetSlotId() const; SvMetaType * GetType() const; - virtual bool IsMethod() const; - virtual bool IsVariable() const; - - virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ) override; virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; sal_uLong MakeSfx( OStringBuffer& rAtrrArray ); diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index 6c767ed..cb8ce82 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -83,12 +83,13 @@ bool SvMetaSlot::GetHidden() const bool SvMetaSlot::IsVariable() const { - return SvMetaAttribute::IsVariable(); + SvMetaType * pType = GetType(); + return pType->GetType() != MetaTypeType::Method; } bool SvMetaSlot::IsMethod() const { - bool b = SvMetaAttribute::IsMethod(); + bool b = GetType()->GetType() == MetaTypeType::Method; b |= nullptr != GetMethod(); return b; } diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 2144031..d4eaf65 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -50,19 +50,6 @@ const SvIdentifier & SvMetaAttribute::GetSlotId() const return static_cast<SvMetaAttribute *>(GetRef())->GetSlotId(); } -bool SvMetaAttribute::IsMethod() const -{ - SvMetaType * pType = GetType(); - DBG_ASSERT( pType, "no type for attribute" ); - return pType->GetType() == MetaTypeType::Method; -} - -bool SvMetaAttribute::IsVariable() const -{ - SvMetaType * pType = GetType(); - return pType->GetType() != MetaTypeType::Method; -} - bool SvMetaAttribute::Test( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { commit afa1779d27da31ef0d5084306db8dc955689a78f Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 13:28:49 2016 +0200 simplify getMangleName() Change-Id: I811acbbb88d8d9639001d7b9af6b0d4a66a80656 diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index a73a3b8..9e5296e 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -65,6 +65,7 @@ class SvMetaSlot : public SvMetaAttribute SvIdlDataBase & rBase, SvStream & rOutStm ); void SetEnumValue(SvMetaEnumValue *p) { pEnumValue = p; } + OString GetMangleName() const; protected: void SetToggle( bool bSet ) { aToggle = bSet; } void SetAutoUpdate( bool bSet ) { aAutoUpdate = bSet; } @@ -98,7 +99,6 @@ public: virtual bool IsVariable() const override; virtual bool IsMethod() const override; - virtual OString GetMangleName( bool bVariable ) const override; SvMetaAttribute * GetMethod() const; SvMetaType * GetSlotType() const; diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 142a211..16ab9db 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -48,7 +48,6 @@ public: virtual bool IsMethod() const; virtual bool IsVariable() const; - virtual OString GetMangleName( bool bVariable ) const; virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ) override; diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index 500715c..6c767ed 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -93,14 +93,11 @@ bool SvMetaSlot::IsMethod() const return b; } -OString SvMetaSlot::GetMangleName( bool bVariable ) const +OString SvMetaSlot::GetMangleName() const { - if( !bVariable ) - { - SvMetaAttribute * pMeth = GetMethod(); - if( pMeth ) - return pMeth->GetName(); - } + SvMetaAttribute * pMeth = GetMethod(); + if( pMeth ) + return pMeth->GetName(); return GetName(); } @@ -871,7 +868,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount, { rOutStm.WriteCharPtr( ",\"" ); - rOutStm.WriteCharPtr( GetMangleName( false ).getStr() ); + rOutStm.WriteCharPtr( GetMangleName().getStr() ); rOutStm.WriteCharPtr( "\"" ); } diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 4707344..2144031 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -63,11 +63,6 @@ bool SvMetaAttribute::IsVariable() const return pType->GetType() != MetaTypeType::Method; } -OString SvMetaAttribute::GetMangleName( bool ) const -{ - return GetName(); -} - bool SvMetaAttribute::Test( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { commit d61b45016ee4048068b8410c5e2635e8d84f9849 Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 13:25:26 2016 +0200 SvString is a just thin wrapper around OString eliminate it Change-Id: Icb91d25cc7bffb3060b9392f71d37e5a95844aa3 diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index 4a2b252..bcc3f0a 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -80,7 +80,7 @@ public: class SvMetaObject : public SvRttiBase { protected: - SvString aName; + OString aName; bool ReadNameSvIdl( SvTokenStream & rInStm ); void DoReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); @@ -95,7 +95,7 @@ public: static void WriteStars( SvStream & ); void SetName( const OString& rName ); - virtual const SvString & GetName() const { return aName; } + virtual const OString & GetName() const { return aName; } virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ); virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); @@ -130,10 +130,10 @@ protected: public: SvMetaReference(); - const SvString & GetName() const override + const OString & GetName() const override { return ( !aRef.Is() - || !SvMetaObject::GetName().getString().isEmpty() ) + || !SvMetaObject::GetName().isEmpty() ) ? SvMetaObject::GetName() : aRef->GetName(); } diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx index 220c536..ef7a88c 100644 --- a/idl/inc/bastype.hxx +++ b/idl/inc/bastype.hxx @@ -68,22 +68,7 @@ public: }; -class SvString -{ -private: - OString m_aStr; -public: - SvString() {} - void setString(const OString& rStr) - { - m_aStr = rStr; - } - const OString& getString() const - { - return m_aStr; - } - bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); -}; +bool ReadStringSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, OString& aString ); #endif // INCLUDED_IDL_INC_BASTYPE_HXX diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index dd09519..8973565 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -27,7 +27,7 @@ class SvMetaModule : public SvMetaReference { SvRefMemberList<SvMetaClass *> aClassList; // browser - SvString aSlotIdFile; + OString aSlotIdFile; bool bImported : 1, bIsModified : 1; diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index 999263a..a73a3b8 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -50,7 +50,7 @@ class SvMetaSlot : public SvMetaAttribute SvBOOL aImageRotation; SvBOOL aImageReflection; SvIdentifier aPseudoPrefix; - SvString aDisableFlags; + OString aDisableFlags; SvMetaSlot* pLinkedSlot; SvMetaSlot* pNextSlot; sal_uLong nListPos; diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index 3ccbb36..272b526 100644 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -68,7 +68,7 @@ SvMetaObject::SvMetaObject() void SvMetaObject::SetName( const OString& rName ) { - aName.setString(rName); + aName = rName; } bool SvMetaObject::ReadNameSvIdl( SvTokenStream & rInStm ) diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index a7b6c3d..ae60b55 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -111,7 +111,7 @@ void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase, rInStm.Seek( nTokPos ); } -bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) +bool ReadStringSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, OString& aRetString ) { sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); @@ -125,7 +125,7 @@ bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) pTok = &rInStm.GetToken(); if( pTok->IsString() ) { - setString(pTok->GetString()); + aRetString = pTok->GetString(); rInStm.GetToken_Next(); } if( bOk && bBraket ) diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index 1a2971e..4324215 100644 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -38,13 +38,13 @@ void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase, { SvMetaReference::ReadAttributesSvIdl( rBase, rInStm ); - if( aSlotIdFile.ReadSvIdl( SvHash_SlotIdFile(), rInStm ) ) + if( ReadStringSvIdl( SvHash_SlotIdFile(), rInStm, aSlotIdFile ) ) { sal_uInt32 nTokPos = rInStm.Tell(); - if( !rBase.ReadIdFile( OStringToOUString(aSlotIdFile.getString(), RTL_TEXTENCODING_ASCII_US)) ) + if( !rBase.ReadIdFile( OStringToOUString(aSlotIdFile, RTL_TEXTENCODING_ASCII_US)) ) { OStringBuffer aStr("cannot read file: "); - aStr.append(aSlotIdFile.getString()); + aStr.append(aSlotIdFile); rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index eba6cb5..ecc2691 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -147,18 +147,18 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, for( sal_uLong n = 0; n < aAttrList.size(); n++ ) { SvMetaAttribute * pS = aAttrList[n]; - if( pS->GetName().getString() == rAttr.GetName().getString() ) + if( pS->GetName() == rAttr.GetName() ) { // values have to match if( pS->GetSlotId().GetValue() != rAttr.GetSlotId().GetValue() ) { OSL_FAIL( "Same Name in MetaClass : " ); - OSL_FAIL( pS->GetName().getString().getStr() ); + OSL_FAIL( pS->GetName().getStr() ); OSL_FAIL( pS->GetSlotId().getString().getStr() ); OSL_FAIL( rAttr.GetSlotId().getString().getStr() ); OStringBuffer aStr("Attribute's "); - aStr.append(pS->GetName().getString()); + aStr.append(pS->GetName()); aStr.append(" with different id's"); rBase.SetError(aStr.makeStringAndClear(), rInStm.GetToken()); rBase.WriteError( rInStm ); @@ -177,9 +177,9 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, OSL_FAIL( rAttr.GetSlotId().getString().getStr() ); OStringBuffer aStr("Attribute "); - aStr.append(pS->GetName().getString()); + aStr.append(pS->GetName()); aStr.append(" and Attribute "); - aStr.append(rAttr.GetName().getString()); + aStr.append(rAttr.GetName()); aStr.append(" with equal id's"); rBase.SetError(aStr.makeStringAndClear(), rInStm.GetToken()); rBase.WriteError( rInStm ); @@ -328,10 +328,10 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) { WriteStars( rOutStm ); // define class - rOutStm.WriteCharPtr( "#ifdef " ).WriteCharPtr( GetName().getString().getStr() ) << endl; + rOutStm.WriteCharPtr( "#ifdef " ).WriteCharPtr( GetName().getStr() ) << endl; rOutStm.WriteCharPtr( "#undef ShellClass" ) << endl; - rOutStm.WriteCharPtr( "#undef " ).WriteCharPtr( GetName().getString().getStr() ) << endl; - rOutStm.WriteCharPtr( "#define ShellClass " ).WriteCharPtr( GetName().getString().getStr() ) << endl; + rOutStm.WriteCharPtr( "#undef " ).WriteCharPtr( GetName().getStr() ) << endl; + rOutStm.WriteCharPtr( "#define ShellClass " ).WriteCharPtr( GetName().getStr() ) << endl; // no slotmaps get written for interfaces if( !IsShell() ) @@ -340,7 +340,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) return; } // write parameter array - rOutStm.WriteCharPtr("static SfxFormalArgument a").WriteCharPtr(GetName().getString().getStr()).WriteCharPtr("Args_Impl[] =") << endl; + rOutStm.WriteCharPtr("static SfxFormalArgument a").WriteCharPtr(GetName().getStr()).WriteCharPtr("Args_Impl[] =") << endl; rOutStm.WriteChar('{') << endl; std::vector<sal_uLong> aSuperList; @@ -370,7 +370,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) rOutStm.WriteCharPtr( "};" ) << endl << endl; ByteStringList aStringList; - WriteSlotStubs( GetName().getString(), aSlotList, aStringList, rOutStm ); + WriteSlotStubs( GetName(), aSlotList, aStringList, rOutStm ); for ( size_t i = 0, n = aStringList.size(); i < n; ++i ) delete aStringList[ i ]; aStringList.clear(); @@ -378,18 +378,18 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) rOutStm << endl; // write slotmap - rOutStm.WriteCharPtr("static SfxSlot a").WriteCharPtr(GetName().getString().getStr()).WriteCharPtr("Slots_Impl[] =") << endl; + rOutStm.WriteCharPtr("static SfxSlot a").WriteCharPtr(GetName().getStr()).WriteCharPtr("Slots_Impl[] =") << endl; rOutStm.WriteChar( '{' ) << endl; // write all attributes - WriteSlots( GetName().getString(), 0, aSlotList, rBase, rOutStm ); + WriteSlots( GetName(), 0, aSlotList, rBase, rOutStm ); if( nSlotCount ) Back2Delemitter( rOutStm ); else { // at least one dummy WriteTab( rOutStm, 1 ); - rOutStm.WriteCharPtr( "SFX_SLOT_ARG(" ).WriteCharPtr( GetName().getString().getStr() ) + rOutStm.WriteCharPtr( "SFX_SLOT_ARG(" ).WriteCharPtr( GetName().getStr() ) .WriteCharPtr( ", 0, 0, " ) .WriteCharPtr( "SFX_STUB_PTR_EXEC_NONE," ) .WriteCharPtr( "SFX_STUB_PTR_STATE_NONE," ) diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index f94ad2c..500715c 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -99,9 +99,9 @@ OString SvMetaSlot::GetMangleName( bool bVariable ) const { SvMetaAttribute * pMeth = GetMethod(); if( pMeth ) - return pMeth->GetName().getString(); + return pMeth->GetName(); } - return GetName().getString(); + return GetName(); } /************************************************************************* @@ -128,7 +128,7 @@ const OString& SvMetaSlot::GetGroupId() const } const OString& SvMetaSlot::GetDisableFlags() const { - if( !aDisableFlags.getString().isEmpty() || !GetRef() ) return aDisableFlags.getString(); + if( !aDisableFlags.isEmpty() || !GetRef() ) return aDisableFlags; return static_cast<SvMetaSlot *>(GetRef())->GetDisableFlags(); } const OString& SvMetaSlot::GetExecMethod() const @@ -246,7 +246,7 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, bOk |= aGroupId.ReadSvIdl( SvHash_GroupId(), rInStm ); bOk |= aExecMethod.ReadSvIdl( SvHash_ExecMethod(), rInStm ); bOk |= aStateMethod.ReadSvIdl( SvHash_StateMethod(), rInStm ); - bOk |= aDisableFlags.ReadSvIdl( SvHash_DisableFlags(), rInStm ); + bOk |= ReadStringSvIdl( SvHash_DisableFlags(), rInStm, aDisableFlags ); bOk |= aReadOnlyDoc.ReadSvIdl( SvHash_ReadOnlyDoc(), rInStm ); bOk |= aExport.ReadSvIdl( SvHash_Export(), rInStm ); @@ -366,13 +366,13 @@ bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) if( pKnownSlot ) { SetRef( pKnownSlot ); - SetName( pKnownSlot->GetName().getString() ); + SetName( pKnownSlot->GetName() ); bOk = SvMetaObject::ReadSvIdl( rBase, rInStm ); } else { OStringBuffer aStr( "attribute " ); - aStr.append(pAttr->GetName().getString()); + aStr.append(pAttr->GetName()); aStr.append(" is method or variable but not a slot"); rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); @@ -393,19 +393,19 @@ bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) SetRef( pKnownSlot ); // names may differ, because explicitly given - if ( pKnownSlot->GetName().getString() != GetName().getString() ) + if ( pKnownSlot->GetName() != GetName() ) { OSL_FAIL("Illegal definition!"); rInStm.Seek( nTokPos ); return false; } - SetName( pKnownSlot->GetName().getString() ); + SetName( pKnownSlot->GetName() ); } else { OStringBuffer aStr("attribute "); - aStr.append(pAttr2->GetName().getString()); + aStr.append(pAttr2->GetName()); aStr.append(" is method or variable but not a slot"); rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); @@ -499,7 +499,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const OString& rPrefix, { // create SlotId SvMetaEnumValue *enumValue = pEnum->GetObject(n); - OString aValName = enumValue->GetName().getString(); + OString aValName = enumValue->GetName(); OStringBuffer aBuf; if( !GetPseudoPrefix().isEmpty() ) aBuf.append(GetPseudoPrefix()); @@ -687,7 +687,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount, else rOutStm.WriteChar( '0' ); rOutStm.WriteChar( ',' ); - rOutStm.WriteCharPtr( pEnumValue->GetName().getString().getStr() ); + rOutStm.WriteCharPtr( pEnumValue->GetName().getStr() ); } else { @@ -822,7 +822,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount, } if( pT ) { - rOutStm.WriteCharPtr( pT->GetName().getString().getStr() ); + rOutStm.WriteCharPtr( pT->GetName().getStr() ); if( !SvIdlDataBase::FindType( pT, rBase.aUsedTypes ) ) rBase.aUsedTypes.push_back( pT ); } @@ -904,9 +904,9 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO WriteTab( rOutStm, 1 ); rOutStm.WriteCharPtr("{ (const SfxType*) &a") // item type - .WriteCharPtr(pPType->GetName().getString().getStr()).WriteCharPtr("_Impl, ") + .WriteCharPtr(pPType->GetName().getStr()).WriteCharPtr("_Impl, ") // parameter name - .WriteCharPtr("\"").WriteCharPtr(pPar->GetName().getString().getStr()).WriteCharPtr("\", ") + .WriteCharPtr("\"").WriteCharPtr(pPar->GetName().getStr()).WriteCharPtr("\", ") // slot id .WriteCharPtr(pPar->GetSlotId().getString().getStr()).WriteCharPtr(" },") << endl; if( !SvIdlDataBase::FindType( pPType, rBase.aUsedTypes ) ) diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 07f7260..4707344 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -65,7 +65,7 @@ bool SvMetaAttribute::IsVariable() const OString SvMetaAttribute::GetMangleName( bool ) const { - return GetName().getString(); + return GetName(); } bool SvMetaAttribute::Test( SvIdlDataBase & rBase, @@ -139,7 +139,7 @@ sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) rAttrArray.append('{'); rAttrArray.append(GetSlotId().getString()); rAttrArray.append(",\""); - rAttrArray.append(GetName().getString()); + rAttrArray.append(GetName()); rAttrArray.append("\"}"); return 1; } @@ -350,9 +350,9 @@ void SvMetaType::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) if( IsItem() ) { if( GetBaseType()->GetType() == MetaTypeType::Struct ) - GetBaseType()->WriteSfxItem( GetName().getString(), rBase, rOutStm ); + GetBaseType()->WriteSfxItem( GetName(), rBase, rOutStm ); else - WriteSfxItem( GetName().getString(), rBase, rOutStm ); + WriteSfxItem( GetName(), rBase, rOutStm ); } } @@ -420,11 +420,11 @@ void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase, if( aEnumValueList.empty() ) { // the first - aPrefix = aEnumVal->GetName().getString(); + aPrefix = aEnumVal->GetName(); } else { - aPrefix = getCommonSubPrefix(aPrefix, aEnumVal->GetName().getString()); + aPrefix = getCommonSubPrefix(aPrefix, aEnumVal->GetName()); } aEnumValueList.push_back( aEnumVal ); } diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index a9ff18b..a7f584f 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -267,7 +267,7 @@ SvMetaType * SvIdlDataBase::FindType( const SvMetaType * pPType, SvMetaType * SvIdlDataBase::FindType( const OString& rName ) { for( SvRefMemberList<SvMetaType *>::const_iterator it = aTypeList.begin(); it != aTypeList.end(); ++it ) - if( rName.equals((*it)->GetName().getString()) ) + if( rName.equals((*it)->GetName()) ) return *it; return nullptr; } @@ -294,7 +294,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm ) SvMetaType * pType = nullptr; while( it != rList.end() ) { - if( (*it)->GetName().getString().equals(aName) ) + if( (*it)->GetName().equals(aName) ) { pType = *it; break; @@ -378,7 +378,7 @@ SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm ) for( sal_uLong n = 0; n < aClassList.size(); n++ ) { SvMetaClass * pClass = aClassList[n]; - if( pClass->GetName().getString().equals(pTok->GetString()) ) + if( pClass->GetName().equals(pTok->GetString()) ) return pClass; } commit 04e22bee0a79008a39dc9d78a460941f738020a6 Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 11:41:46 2016 +0200 format IDL compiler headers a little Change-Id: I54cb7a664908f8817958d4482a5adfdc6d2a0f3d diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index dd01e85..4a2b252 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -27,13 +27,8 @@ #include <vector> class SvTokenStream; -class SvMetaObject; class SvIdlDataBase; -typedef SvMetaObject * (*CreateMetaObjectType)(); - -#define C_PREF "C_" - template<typename T> class SvRefMemberList : private std::vector<T> { diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx index fdcd89d..6be70f4 100644 --- a/idl/inc/command.hxx +++ b/idl/inc/command.hxx @@ -35,7 +35,7 @@ public: OUString aTargetFile; OUString aExportFile; OUString m_DepFile; - sal_uInt32 nVerbosity; + sal_uInt32 nVerbosity; SvCommand( int argc, char ** argv ); ~SvCommand(); diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx index 7852e80..c9259bf 100644 --- a/idl/inc/database.hxx +++ b/idl/inc/database.hxx @@ -42,14 +42,15 @@ public: : nLine(nL), nColumn(nC) {} const OString& GetText() const { return aText; } - void SetText( const OString& rT ) { aText = rT; } + void SetText( const OString& rT ) { aText = rT; } bool IsError() const { return nLine != 0; } SvIdlError & operator = ( const SvIdlError & rRef ) - { aText = rRef.aText; - nLine = rRef.nLine; - nColumn = rRef.nColumn; - return *this; - } + { + aText = rRef.aText; + nLine = rRef.nLine; + nColumn = rRef.nColumn; + return *this; + } }; class SvIdlDataBase @@ -68,7 +69,7 @@ class SvIdlDataBase SvRefMemberList<SvMetaType *> aTmpTypeList; // not persistent protected: - ::std::set< OUString > m_DepFiles; + ::std::set< OUString > m_DepFiles; SvMetaObjectMemberStack aContextStack; OUString aPath; SvIdlError aError; diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index a8138c8..c06b605 100644 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -102,11 +102,11 @@ inline SvToken::SvToken() class SvTokenStream { sal_uLong nLine, nColumn; - int nBufPos; - int c; // next character + int nBufPos; + int c; // next character sal_uInt16 nTabSize; // length of tabulator - OString aStrTrue; - OString aStrFalse; + OString aStrTrue; + OString aStrFalse; sal_uLong nMaxPos; SvFileStream * pInStream; @@ -115,9 +115,9 @@ class SvTokenStream std::vector<std::unique_ptr<SvToken> > aTokList; std::vector<std::unique_ptr<SvToken> >::iterator pCurToken; - OString aBufStr; + OString aBufStr; - void InitCtor(); + void InitCtor(); int GetNextChar(); int GetFastNextChar() diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx index 6399b00..c4c45f02 100644 --- a/idl/inc/object.hxx +++ b/idl/inc/object.hxx @@ -78,15 +78,15 @@ class SvMetaClass : public SvMetaType const OString& rPrefix, SvIdlDataBase& rBase ); protected: - virtual void ReadContextSvIdl( SvIdlDataBase &, + virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; public: SvMetaClass(); - void FillClasses( SvMetaClassList & rList ); + void FillClasses( SvMetaClassList & rList ); - virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; - virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) override; + virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; + virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) override; }; #endif // INCLUDED_IDL_INC_OBJECT_HXX diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index d0bdc4a..999263a 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -27,32 +27,32 @@ class SvMetaSlot : public SvMetaAttribute { tools::SvRef<SvMetaType> aSlotType; tools::SvRef<SvMetaSlot> aMethod; - SvIdentifier aGroupId; - SvIdentifier aExecMethod; - SvIdentifier aStateMethod; - SvBOOL aPseudoSlots; - - SvBOOL aToggle; - SvBOOL aAutoUpdate; - - SvBOOL aAsynchron; - - SvBOOL aRecordPerItem;// exclusive - SvBOOL aRecordPerSet; - SvBOOL aNoRecord; - SvBOOL aRecordAbsolute; - - SvBOOL aMenuConfig; - SvBOOL aToolBoxConfig; - SvBOOL aAccelConfig; - SvBOOL aFastCall; - SvBOOL aContainer; - SvBOOL aImageRotation; - SvBOOL aImageReflection; - SvIdentifier aPseudoPrefix; - SvString aDisableFlags; - SvMetaSlot* pLinkedSlot; - SvMetaSlot* pNextSlot; + SvIdentifier aGroupId; + SvIdentifier aExecMethod; + SvIdentifier aStateMethod; + SvBOOL aPseudoSlots; + + SvBOOL aToggle; + SvBOOL aAutoUpdate; + + SvBOOL aAsynchron; + + SvBOOL aRecordPerItem;// exclusive + SvBOOL aRecordPerSet; + SvBOOL aNoRecord; + SvBOOL aRecordAbsolute; + + SvBOOL aMenuConfig; + SvBOOL aToolBoxConfig; + SvBOOL aAccelConfig; + SvBOOL aFastCall; + SvBOOL aContainer; + SvBOOL aImageRotation; + SvBOOL aImageReflection; + SvIdentifier aPseudoPrefix; + SvString aDisableFlags; + SvMetaSlot* pLinkedSlot; + SvMetaSlot* pNextSlot; sal_uLong nListPos; SvMetaEnumValue* pEnumValue; SvBOOL aReadOnlyDoc; @@ -64,23 +64,11 @@ class SvMetaSlot : public SvMetaAttribute size_t nStart, SvIdlDataBase & rBase, SvStream & rOutStm ); - void SetEnumValue(SvMetaEnumValue *p) - { pEnumValue = p; } + void SetEnumValue(SvMetaEnumValue *p) { pEnumValue = p; } protected: - void SetToggle( bool bSet ) - { - aToggle = bSet; - } - void SetAutoUpdate( bool bSet ) - { - aAutoUpdate = bSet; - } - - void SetAsynchron( bool bSet ) - { - aAsynchron = bSet; - } - + void SetToggle( bool bSet ) { aToggle = bSet; } + void SetAutoUpdate( bool bSet ) { aAutoUpdate = bSet; } + void SetAsynchron( bool bSet ) { aAsynchron = bSet; } void SetRecordPerItem( bool bSet ) { aRecordPerItem = bSet; @@ -99,8 +87,7 @@ protected: if( bSet ) aRecordPerItem = aRecordPerSet = false; } - void SetRecordAbsolute( bool bSet ) - { aRecordAbsolute = bSet; } + void SetRecordAbsolute( bool bSet ) { aRecordAbsolute = bSet; } public: SvMetaObject * MakeClone() const; diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 7044e00..142a211 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -27,8 +27,6 @@ struct SvSlotElement; typedef std::vector< SvSlotElement* > SvSlotElementList; -class SvMetaSlot; - class SvMetaType; class SvMetaAttribute : public SvMetaReference @@ -45,7 +43,7 @@ public: void SetSlotId( const SvIdentifier & rId ) { aSlotId = rId; } - const SvIdentifier & GetSlotId() const; + const SvIdentifier& GetSlotId() const; SvMetaType * GetType() const; virtual bool IsMethod() const; @@ -64,29 +62,27 @@ enum MetaTypeType { Method, Struct, Base, Enum, Class }; class SvMetaType : public SvMetaReference { - SvRefMemberList<SvMetaAttribute *>* pAttrList; - MetaTypeType nType; - bool bIsItem; - bool bIsShell; + SvRefMemberList<SvMetaAttribute *> aAttrList; + MetaTypeType nType; + bool bIsItem; + bool bIsShell; - void WriteSfxItem( const OString& rItemName, SvIdlDataBase & rBase, - SvStream & rOutStm ); + void WriteSfxItem( const OString& rItemName, SvIdlDataBase & rBase, + SvStream & rOutStm ); protected: - bool ReadNamesSvIdl( SvTokenStream & rInStm ); - virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; + bool ReadNamesSvIdl( SvTokenStream & rInStm ); + virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; - bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); public: SvMetaType(); SvMetaType( const OString& rTypeName ); virtual ~SvMetaType(); - SvRefMemberList<SvMetaAttribute *>& GetAttrList() const; - sal_uLong GetAttrCount() const - { - return pAttrList ? pAttrList->size() : 0L; - } + SvRefMemberList<SvMetaAttribute *>& + GetAttrList() { return aAttrList; } + sal_uLong GetAttrCount() const { return aAttrList.size(); } void SetType( MetaTypeType nT ); MetaTypeType GetType() const { return nType; } @@ -100,7 +96,7 @@ public: sal_uLong MakeSfx( OStringBuffer& rAtrrArray ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); bool ReadMethodArgs( SvIdlDataBase & rBase, - SvTokenStream & rInStm ); + SvTokenStream & rInStm ); }; class SvMetaTypeString : public SvMetaType @@ -120,7 +116,7 @@ public: class SvMetaTypeEnum : public SvMetaType { SvRefMemberList<SvMetaEnumValue *> aEnumValueList; - OString aPrefix; + OString aPrefix; protected: virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; public: diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 42deae19..07f7260 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -150,8 +150,7 @@ void SvMetaAttribute::Insert (SvSlotElementList&, const OString&, SvIdlDataBase& } #define CTOR \ - : pAttrList( nullptr ) \ - , nType( MetaTypeType::Base ) \ + : nType( MetaTypeType::Base ) \ , bIsItem( false ) \ , bIsShell( false ) \ @@ -166,23 +165,15 @@ SvMetaType::SvMetaType( const OString& rName ) SetName( rName ); } -SvMetaType::~SvMetaType() { - delete pAttrList; -} - -SvRefMemberList<SvMetaAttribute *>& SvMetaType::GetAttrList() const -{ - if( !pAttrList ) - const_cast<SvMetaType *>(this)->pAttrList = new SvRefMemberList<SvMetaAttribute *>(); - return *pAttrList; -} +SvMetaType::~SvMetaType() +{} void SvMetaType::SetType( MetaTypeType nT ) { nType = nT; if( nType == MetaTypeType::Class ) { - OStringBuffer aTmp(C_PREF); + OStringBuffer aTmp("C_"); aTmp.append("Object *"); } } @@ -287,7 +278,7 @@ sal_uLong SvMetaType::MakeSfx( OStringBuffer& rAttrArray ) // write the single attributes for( sal_uLong n = 0; n < nAttrCount; n++ ) { - nC += (*pAttrList)[n]->MakeSfx( rAttrArray ); + nC += aAttrList[n]->MakeSfx( rAttrArray ); if( n +1 < nAttrCount ) rAttrArray.append(", "); } commit 81c82cabe53101b828c56af71c5bd49b9ca60a21 Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 11:32:24 2016 +0200 aMethod is more accurately an SvMetaSlot Change-Id: Iaa57a3f24f545c49a5af0fd0b634994ea3d7551e diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index a8d9835..d0bdc4a 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -26,7 +26,7 @@ class SvMetaSlot : public SvMetaAttribute { tools::SvRef<SvMetaType> aSlotType; - tools::SvRef<SvMetaAttribute> aMethod; + tools::SvRef<SvMetaSlot> aMethod; SvIdentifier aGroupId; SvIdentifier aExecMethod; SvIdentifier aStateMethod; commit 760b86a75746968f8cd77c6aaae871af09aec47c Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 11:13:50 2016 +0200 Export attribute only applies to SvMetaSlot, so move it down Change-Id: I686fd2148d4cf03acbef892223c3ed2b1966e73a diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index 94fef1c..a8d9835 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -55,7 +55,8 @@ class SvMetaSlot : public SvMetaAttribute SvMetaSlot* pNextSlot; sal_uLong nListPos; SvMetaEnumValue* pEnumValue; - SvBOOL aReadOnlyDoc; + SvBOOL aReadOnlyDoc; + SvBOOL aExport; void WriteSlot( const OString& rShellName, sal_uInt16 nCount, const OString& rSlotId, @@ -138,6 +139,8 @@ public: bool GetImageRotation() const; bool GetImageReflection() const; bool GetReadOnlyDoc() const; + bool GetExport() const; + bool GetHidden() const; sal_uLong GetListPos() const { return nListPos; } diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 1f30f90..7044e00 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -35,7 +35,6 @@ class SvMetaAttribute : public SvMetaReference { tools::SvRef<SvMetaType> aType; SvIdentifier aSlotId; - SvBOOL aExport; protected: virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, @@ -47,8 +46,6 @@ public: void SetSlotId( const SvIdentifier & rId ) { aSlotId = rId; } const SvIdentifier & GetSlotId() const; - bool GetExport() const; - bool GetHidden() const; SvMetaType * GetType() const; virtual bool IsMethod() const; diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index 7ac6c72..f94ad2c 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -41,6 +41,7 @@ SvMetaSlot::SvMetaSlot() , nListPos(0) , pEnumValue(nullptr) , aReadOnlyDoc ( true, false ) + , aExport( true, false ) { } @@ -53,6 +54,7 @@ SvMetaSlot::SvMetaSlot( SvMetaType * pType ) , nListPos(0) , pEnumValue(nullptr) , aReadOnlyDoc ( true, false ) + , aExport( true, false ) { } @@ -62,6 +64,23 @@ bool SvMetaSlot::GetReadOnlyDoc() const return static_cast<SvMetaSlot *>(GetRef())->GetReadOnlyDoc(); } +bool SvMetaSlot::GetExport() const +{ + if( aExport.IsSet() || !GetRef() ) return aExport; + return static_cast<SvMetaSlot *>(GetRef())->GetExport(); +} + +bool SvMetaSlot::GetHidden() const +{ + // when export is set, but hidden is not the default is used + if ( aExport.IsSet() ) + return !aExport; + else if( !GetRef() ) + return false; + else + return static_cast<SvMetaSlot *>(GetRef())->GetHidden(); +} + bool SvMetaSlot::IsVariable() const { return SvMetaAttribute::IsVariable(); @@ -229,6 +248,7 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, bOk |= aStateMethod.ReadSvIdl( SvHash_StateMethod(), rInStm ); bOk |= aDisableFlags.ReadSvIdl( SvHash_DisableFlags(), rInStm ); bOk |= aReadOnlyDoc.ReadSvIdl( SvHash_ReadOnlyDoc(), rInStm ); + bOk |= aExport.ReadSvIdl( SvHash_Export(), rInStm ); if( aToggle.ReadSvIdl( SvHash_Toggle(), rInStm ) ) SetToggle( aToggle ), bOk = true; diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 84f6e55..42deae19 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -30,13 +30,11 @@ #include <database.hxx> SvMetaAttribute::SvMetaAttribute() - : aExport( true, false ) { } SvMetaAttribute::SvMetaAttribute( SvMetaType * pType ) : aType( pType ) - , aExport( true, false ) { } @@ -52,23 +50,6 @@ const SvIdentifier & SvMetaAttribute::GetSlotId() const return static_cast<SvMetaAttribute *>(GetRef())->GetSlotId(); } -bool SvMetaAttribute::GetExport() const -{ - if( aExport.IsSet() || !GetRef() ) return aExport; - return static_cast<SvMetaAttribute *>(GetRef())->GetExport(); -} - -bool SvMetaAttribute::GetHidden() const -{ - // when export is set, but hidden is not the default is used - if ( aExport.IsSet() ) - return !aExport; - else if( !GetRef() ) - return false; - else - return static_cast<SvMetaAttribute *>(GetRef())->GetHidden(); -} - bool SvMetaAttribute::IsMethod() const { SvMetaType * pType = GetType(); @@ -143,7 +124,6 @@ void SvMetaAttribute::ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { SvMetaReference::ReadAttributesSvIdl( rBase, rInStm ); - aExport.ReadSvIdl( SvHash_Export(), rInStm ); } sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi index 9faeb47..e2becfb 100644 --- a/sc/sdi/tabvwsh.sdi +++ b/sc/sdi/tabvwsh.sdi @@ -123,18 +123,6 @@ interface BaseSelection interface TableEditView { - SbxObject SearchSettings - [ - ] - - SbxObject Table - [ - ] - SbxObject Range - [ - Export = FALSE ; - ] - FID_TOGGLEINPUTLINE [ ExecMethod = Execute; StateMethod = GetState; ] SID_DEFINE_PRINTAREA [ ExecMethod = Execute; StateMethod = GetState; ] SID_ADD_PRINTAREA [ ExecMethod = Execute; StateMethod = GetState; ] commit 1795bb2fefe29ff0a46497918b5c571f9d541e5a Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 10:58:52 2016 +0200 ReadonlyDoc only applies to Slot's so move it down from SvMetaAttribute to SvMetaSlot Change-Id: I3a433d9a1cee0a5a9f52b57c6cd16b16198dade1 diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index b3c0968..94fef1c 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -55,6 +55,7 @@ class SvMetaSlot : public SvMetaAttribute SvMetaSlot* pNextSlot; sal_uLong nListPos; SvMetaEnumValue* pEnumValue; + SvBOOL aReadOnlyDoc; void WriteSlot( const OString& rShellName, sal_uInt16 nCount, const OString& rSlotId, @@ -136,6 +137,7 @@ public: bool GetContainer() const; bool GetImageRotation() const; bool GetImageReflection() const; + bool GetReadOnlyDoc() const; sal_uLong GetListPos() const { return nListPos; } diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 8947073..1f30f90 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -36,7 +36,6 @@ class SvMetaAttribute : public SvMetaReference tools::SvRef<SvMetaType> aType; SvIdentifier aSlotId; SvBOOL aExport; - SvBOOL aReadOnlyDoc; protected: virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, @@ -50,7 +49,6 @@ public: const SvIdentifier & GetSlotId() const; bool GetExport() const; bool GetHidden() const; - bool GetReadOnlyDoc() const; SvMetaType * GetType() const; virtual bool IsMethod() const; diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index 1a3f65c..7ac6c72 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -40,6 +40,7 @@ SvMetaSlot::SvMetaSlot() , pNextSlot(nullptr) , nListPos(0) , pEnumValue(nullptr) + , aReadOnlyDoc ( true, false ) { } @@ -51,9 +52,16 @@ SvMetaSlot::SvMetaSlot( SvMetaType * pType ) , pNextSlot(nullptr) , nListPos(0) , pEnumValue(nullptr) + , aReadOnlyDoc ( true, false ) { } +bool SvMetaSlot::GetReadOnlyDoc() const +{ + if( aReadOnlyDoc.IsSet() || !GetRef() ) return aReadOnlyDoc; + return static_cast<SvMetaSlot *>(GetRef())->GetReadOnlyDoc(); +} + bool SvMetaSlot::IsVariable() const { return SvMetaAttribute::IsVariable(); @@ -220,6 +228,7 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, bOk |= aExecMethod.ReadSvIdl( SvHash_ExecMethod(), rInStm ); bOk |= aStateMethod.ReadSvIdl( SvHash_StateMethod(), rInStm ); bOk |= aDisableFlags.ReadSvIdl( SvHash_DisableFlags(), rInStm ); + bOk |= aReadOnlyDoc.ReadSvIdl( SvHash_ReadOnlyDoc(), rInStm ); if( aToggle.ReadSvIdl( SvHash_Toggle(), rInStm ) ) SetToggle( aToggle ), bOk = true; diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index baaf5e3..84f6e55 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -31,14 +31,12 @@ SvMetaAttribute::SvMetaAttribute() : aExport( true, false ) - , aReadOnlyDoc ( true, false ) { } SvMetaAttribute::SvMetaAttribute( SvMetaType * pType ) : aType( pType ) , aExport( true, false ) - , aReadOnlyDoc ( true, false) { } @@ -71,12 +69,6 @@ bool SvMetaAttribute::GetHidden() const return static_cast<SvMetaAttribute *>(GetRef())->GetHidden(); } -bool SvMetaAttribute::GetReadOnlyDoc() const -{ - if( aReadOnlyDoc.IsSet() || !GetRef() ) return aReadOnlyDoc; - return static_cast<SvMetaSlot *>(GetRef())->GetReadOnlyDoc(); -} - bool SvMetaAttribute::IsMethod() const { SvMetaType * pType = GetType(); @@ -152,7 +144,6 @@ void SvMetaAttribute::ReadAttributesSvIdl( SvIdlDataBase & rBase, { SvMetaReference::ReadAttributesSvIdl( rBase, rInStm ); aExport.ReadSvIdl( SvHash_Export(), rInStm ); - aReadOnlyDoc.ReadSvIdl( SvHash_ReadOnlyDoc(), rInStm ); } sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) commit b2c7ea1a22eb2158d3e40351c066ac174f61eb55 Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 10:49:57 2016 +0200 cParserChar in SvMetaType is unused Change-Id: Ie46b381a3d6005e5ce98f33146a6c38f671b8473 diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index f2c514f..8947073 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -73,7 +73,6 @@ class SvMetaType : public SvMetaReference MetaTypeType nType; bool bIsItem; bool bIsShell; - char cParserChar; void WriteSfxItem( const OString& rItemName, SvIdlDataBase & rBase, SvStream & rOutStm ); @@ -84,8 +83,7 @@ protected: bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); public: SvMetaType(); - SvMetaType( const OString& rTypeName, - char cParserChar ); + SvMetaType( const OString& rTypeName ); virtual ~SvMetaType(); diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 7a904a5..baaf5e3 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -183,19 +183,16 @@ void SvMetaAttribute::Insert (SvSlotElementList&, const OString&, SvIdlDataBase& , nType( MetaTypeType::Base ) \ , bIsItem( false ) \ , bIsShell( false ) \ - , cParserChar( 'h' ) SvMetaType::SvMetaType() CTOR { } -SvMetaType::SvMetaType( const OString& rName, - char cPc ) +SvMetaType::SvMetaType( const OString& rName ) CTOR { SetName( rName ); - cParserChar = cPc; } SvMetaType::~SvMetaType() { @@ -415,7 +412,7 @@ bool SvMetaType::ReadMethodArgs( SvIdlDataBase & rBase, } SvMetaTypeString::SvMetaTypeString() - : SvMetaType( "String", 's' ) + : SvMetaType( "String" ) { } @@ -488,7 +485,7 @@ bool SvMetaTypeEnum::ReadSvIdl( SvIdlDataBase & rBase, } SvMetaTypevoid::SvMetaTypevoid() - : SvMetaType( "void", 'v' ) + : SvMetaType( "void" ) { } diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 3474f5f..a9ff18b 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -45,9 +45,8 @@ SvIdlDataBase::~SvIdlDataBase() delete pIdTable; } -#define ADD_TYPE( Name, ParserChar ) \ - aTypeList.push_back( new SvMetaType( SvHash_##Name()->GetName(), \ - ParserChar ) ); +#define ADD_TYPE( Name ) \ + aTypeList.push_back( new SvMetaType( SvHash_##Name()->GetName() ) ); SvRefMemberList<SvMetaType *>& SvIdlDataBase::GetTypeList() { @@ -57,15 +56,15 @@ SvRefMemberList<SvMetaType *>& SvIdlDataBase::GetTypeList() aTypeList.push_back( new SvMetaTypevoid() ); // MI: IDispatch::Invoke can not unsigned - ADD_TYPE( UINT16, 'h' ); - ADD_TYPE( INT16, 'h' ); - ADD_TYPE( UINT32, 'l' ); - ADD_TYPE( INT32, 'l' ); - ADD_TYPE( BOOL, 'b' ); - ADD_TYPE( BYTE, 'c' ); - ADD_TYPE( float, 'f' ); - ADD_TYPE( double, 'F' ); - ADD_TYPE( SbxObject, 'o' ); + ADD_TYPE( UINT16 ); + ADD_TYPE( INT16 ); + ADD_TYPE( UINT32 ); + ADD_TYPE( INT32 ); + ADD_TYPE( BOOL ); + ADD_TYPE( BYTE ); + ADD_TYPE( float ); + ADD_TYPE( double ); + ADD_TYPE( SbxObject ); // Attention! When adding types all binary data bases get incompatible commit 37458b730b7f193a1a853b06ae68f19e53e1ad58 Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 10:46:49 2016 +0200 aBasicPostfix in SvMetaType is unused Change-Id: Ic0c3fc2bb6664031eec649b36e2423a4d1b0ec6d diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 57d3ecf..f2c514f 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -69,7 +69,6 @@ enum MetaTypeType { Method, Struct, Base, Enum, Class }; class SvMetaType : public SvMetaReference { - SvIdentifier aBasicPostfix; SvRefMemberList<SvMetaAttribute *>* pAttrList; MetaTypeType nType; bool bIsItem; @@ -86,8 +85,7 @@ protected: public: SvMetaType(); SvMetaType( const OString& rTypeName, - char cParserChar, - const OString& rBasicPostfix ); + char cParserChar ); virtual ~SvMetaType(); diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index aea5f1f..7a904a5 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -191,13 +191,11 @@ SvMetaType::SvMetaType() } SvMetaType::SvMetaType( const OString& rName, - char cPc, - const OString& rBasicPostfix ) + char cPc ) CTOR { SetName( rName ); cParserChar = cPc; - aBasicPostfix.setString(rBasicPostfix); } SvMetaType::~SvMetaType() { @@ -417,7 +415,7 @@ bool SvMetaType::ReadMethodArgs( SvIdlDataBase & rBase, } SvMetaTypeString::SvMetaTypeString() - : SvMetaType( "String", 's', "$" ) + : SvMetaType( "String", 's' ) { } @@ -490,7 +488,7 @@ bool SvMetaTypeEnum::ReadSvIdl( SvIdlDataBase & rBase, } SvMetaTypevoid::SvMetaTypevoid() - : SvMetaType( "void", 'v', "" ) + : SvMetaType( "void", 'v' ) { } diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 58fcc64..3474f5f 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -45,9 +45,9 @@ SvIdlDataBase::~SvIdlDataBase() delete pIdTable; } -#define ADD_TYPE( Name, ParserChar, BasPost ) \ +#define ADD_TYPE( Name, ParserChar ) \ aTypeList.push_back( new SvMetaType( SvHash_##Name()->GetName(), \ - ParserChar, BasPost ) ); + ParserChar ) ); SvRefMemberList<SvMetaType *>& SvIdlDataBase::GetTypeList() { @@ -57,15 +57,15 @@ SvRefMemberList<SvMetaType *>& SvIdlDataBase::GetTypeList() aTypeList.push_back( new SvMetaTypevoid() ); // MI: IDispatch::Invoke can not unsigned - ADD_TYPE( UINT16, 'h', "&" ); - ADD_TYPE( INT16, 'h', "%" ); - ADD_TYPE( UINT32, 'l', "&" ); - ADD_TYPE( INT32, 'l', "&" ); - ADD_TYPE( BOOL, 'b', "" ); - ADD_TYPE( BYTE, 'c', "%" ); - ADD_TYPE( float, 'f', "!" ); - ADD_TYPE( double, 'F', "#" ); - ADD_TYPE( SbxObject, 'o', "" ); + ADD_TYPE( UINT16, 'h' ); + ADD_TYPE( INT16, 'h' ); + ADD_TYPE( UINT32, 'l' ); + ADD_TYPE( INT32, 'l' ); + ADD_TYPE( BOOL, 'b' ); + ADD_TYPE( BYTE, 'c' ); + ADD_TYPE( float, 'f' ); + ADD_TYPE( double, 'F' ); + ADD_TYPE( SbxObject, 'o' ); // Attention! When adding types all binary data bases get incompatible commit 98fa826a51a67d278c7c81f728c35753ffefe1b5 Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 10:20:47 2016 +0200 convert SfxSlotKind to scoped enum Change-Id: I742e83bd455bc0efa4ad5a34575d3255c3a9a16f diff --git a/include/sfx2/msg.hxx b/include/sfx2/msg.hxx index 37d478f..97313d0 100644 --- a/include/sfx2/msg.hxx +++ b/include/sfx2/msg.hxx @@ -85,11 +85,11 @@ class SfxRequest; -enum SfxSlotKind +enum class SfxSlotKind { - SFX_KIND_STANDARD, - SFX_KIND_ENUM, - SFX_KIND_ATTR + Standard, + Enum, + Attribute }; @@ -193,16 +193,12 @@ SFX_DECL_TYPE(22); // for SvxSearchItem 0, 0, DisableFlags, UnoName \ } -//class SfxPoolItem; - struct SfxFormalArgument { const SfxType* pType; // Type of the parameter (SfxPoolItem subclass) const char* pName; // Name of the sParameters sal_uInt16 nSlotId; // Slot-Id for identification of the Parameters -// const TypeId& Type() const -// { return pType->aTypeId; } SfxPoolItem* CreateItem() const { return pType->createSfxPoolItemFunc(); } }; diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 843169fb9..c1d7e5f 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1181,7 +1181,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell { SfxItemPool &rPool = pShell->GetPool(); - if ( SFX_KIND_ENUM == pSlot->GetKind() ) + if ( SfxSlotKind::Enum == pSlot->GetKind() ) { // for Enum-Slots, the Master has to be executed with the value // of the enums @@ -1191,7 +1191,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell aReq.AppendItem( SfxAllEnumItem( rPool.GetWhich(nSlotId), pSlot->GetValue() ) ); pDispatcher->_Execute( *pShell, *pRealSlot, aReq, aReq.GetCallMode() | SfxCallMode::RECORD ); } - else if ( SFX_KIND_ATTR == pSlot->GetKind() ) + else if ( SfxSlotKind::Attribute == pSlot->GetKind() ) { // Which value has to be mapped for Attribute slots const sal_uInt16 nSlotId = pSlot->GetSlotId(); @@ -1339,7 +1339,7 @@ SfxItemSet* SfxBindings::CreateSet_Impl // get the status method, which is served by the pCache SfxStateFunc pFnc = nullptr; const SfxInterface *pInterface = pShell->GetInterface(); - if ( SFX_KIND_ENUM == pMsgSvr->GetSlot()->GetKind() ) + if ( SfxSlotKind::Enum == pMsgSvr->GetSlot()->GetKind() ) { pRealSlot = pInterface->GetRealSlot(pMsgSvr->GetSlot()); pCache = GetStateCache( pRealSlot->GetSlotId() ); @@ -1451,7 +1451,7 @@ void SfxBindings::UpdateControllers_Impl SfxItemState eState // state of item ) { - DBG_ASSERT( !rFound.pSlot || SFX_KIND_ENUM != rFound.pSlot->GetKind(), + DBG_ASSERT( !rFound.pSlot || SfxSlotKind::Enum != rFound.pSlot->GetKind(), "direct update of enum slot isn't allowed" ); SfxStateCache* pCache = rFound.pCache; @@ -1498,7 +1498,7 @@ void SfxBindings::UpdateControllers_Impl for ( const SfxSlot *pSlave = pFirstSlave; pSlave; pSlave = pSlave->GetNextSlot() ) { DBG_ASSERT(pSlave, "Wrong SlaveSlot binding!"); - DBG_ASSERT(SFX_KIND_ENUM == pSlave->GetKind(),"non enum slaves aren't allowed"); + DBG_ASSERT(SfxSlotKind::Enum == pSlave->GetKind(),"non enum slaves aren't allowed"); DBG_ASSERT(pSlave->GetMasterSlotId() == pSlot->GetSlotId(),"Wrong MasterSlot!"); // Binding exist for function ? diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx index 574182c..688c948 100644 --- a/sfx2/source/control/msg.cxx +++ b/sfx2/source/control/msg.cxx @@ -26,19 +26,19 @@ SfxSlotKind SfxSlot::GetKind() const { if( !nMasterSlotId && !nValue) - return (SfxSlotKind) SFX_KIND_STANDARD; + return SfxSlotKind::Standard; if ( nMasterSlotId && fnExec==nullptr && fnState==nullptr ) { if ( *pType->pType == typeid(SfxBoolItem) ) - return (SfxSlotKind) SFX_KIND_ENUM; + return SfxSlotKind::Enum; else { OSL_FAIL( "invalid slot kind detected" ); - return SFX_KIND_ENUM; + return SfxSlotKind::Enum; } } else - return (SfxSlotKind) SFX_KIND_ATTR; + return SfxSlotKind::Attribute; } diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index cd51b0a..ecaebd9 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -153,7 +153,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount ) // every master refers to his first slave (ENUM), // all slaves refer to their master. // Slaves refer in a circle to the other slaves with the same master - if ( pIter->GetKind() == SFX_KIND_ENUM ) + if ( pIter->GetKind() == SfxSlotKind::Enum ) { pIter->pLinkedSlot = GetSlot( pIter->nMasterSlotId ); assert( pIter->pLinkedSlot ); @@ -203,7 +203,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount ) if ( pNext->GetSlotId() <= pIter->GetSlotId() ) SAL_WARN( "sfx.control", "Wrong order" ); - if ( pIter->GetKind() == SFX_KIND_ENUM ) + if ( pIter->GetKind() == SfxSlotKind::Enum ) { const SfxSlot *pMasterSlot = GetSlot(pIter->nMasterSlotId); const SfxSlot *pFirstSlave = pMasterSlot->pLinkedSlot; @@ -240,7 +240,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount ) { if ( pIter->pLinkedSlot ) { - if ( pIter->pLinkedSlot->GetKind() != SFX_KIND_ENUM ) + if ( pIter->pLinkedSlot->GetKind() != SfxSlotKind::Enum ) { OStringBuffer aStr("Slave is no enum: "); aStr.append(static_cast<sal_Int32>(pIter->GetSlotId())); diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index c37c41d..d009c0c 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -272,7 +272,7 @@ void SfxShell::Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId ) if ( pSlot ) { // At Enum-Slots invalidate the Master-Slot - if ( SFX_KIND_ENUM == pSlot->GetKind() ) + if ( SfxSlotKind::Enum == pSlot->GetKind() ) pSlot = pSlot->GetLinkedSlot(); // Invalidate the Slot itself and possible also all Slave-Slots commit e137c4028ce5ceb2bbf988f47875e6b5e2c9764f Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 09:56:06 2016 +0200 remove unused ModulePrefix in *.SDI files Change-Id: I92bb724259b6fd59af3a14810744cf1537ae2428 diff --git a/idl/inc/globals.hxx b/idl/inc/globals.hxx index 7b8858c..4663f57 100644 --- a/idl/inc/globals.hxx +++ b/idl/inc/globals.hxx @@ -70,7 +70,6 @@ struct SvGlobalHashNames SvStringHashEntryRef MM_ReadOnlyDoc; SvStringHashEntryRef MM_struct; SvStringHashEntryRef MM_SlotType; - SvStringHashEntryRef MM_ModulePrefix; SvStringHashEntryRef MM_DisableFlags; SvGlobalHashNames(); @@ -137,7 +136,6 @@ HASH_INLINE(ImageReflection) HASH_INLINE(ReadOnlyDoc) HASH_INLINE(struct) HASH_INLINE(SlotType) -HASH_INLINE(ModulePrefix) HASH_INLINE(DisableFlags) diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index a8db970..dd09519 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -28,7 +28,6 @@ class SvMetaModule : public SvMetaReference SvRefMemberList<SvMetaClass *> aClassList; // browser SvString aSlotIdFile; - SvString aModulePrefix; bool bImported : 1, bIsModified : 1; diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index 59b04ce..1a2971e 100644 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -51,7 +51,6 @@ void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase, rInStm.Seek( nTokPos ); } } - aModulePrefix.ReadSvIdl( SvHash_ModulePrefix(), rInStm ); } void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase, diff --git a/idl/source/prj/globals.cxx b/idl/source/prj/globals.cxx index efca4af..cb73712 100644 --- a/idl/source/prj/globals.cxx +++ b/idl/source/prj/globals.cxx @@ -97,7 +97,6 @@ SvGlobalHashNames::SvGlobalHashNames() A_ENTRY(ReadOnlyDoc) A_ENTRY(struct) A_ENTRY(SlotType) - A_ENTRY(ModulePrefix) A_ENTRY(DisableFlags) {} diff --git a/sc/sdi/scslots.sdi b/sc/sdi/scslots.sdi index a25edbb..327af87 100644 --- a/sc/sdi/scslots.sdi +++ b/sc/sdi/scslots.sdi @@ -16,11 +16,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -module -StarCalc +module StarCalc [ -SlotIdFile( "scslots.hrc" ) -ModulePrefix( "Sc" ) + SlotIdFile( "scslots.hrc" ) ] { struct ScProtection diff --git a/sd/sdi/sdgslots.sdi b/sd/sdi/sdgslots.sdi index dcd9449..f673101 100644 --- a/sd/sdi/sdgslots.sdi +++ b/sd/sdi/sdgslots.sdi @@ -15,11 +15,9 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -module -StarDraw +module StarDraw [ -SlotIdFile( "sdslots.hrc" ) -ModulePrefix( "Sd" ) + SlotIdFile( "sdslots.hrc" ) ] { include "sfxitems.sdi" diff --git a/sd/sdi/sdslots.sdi b/sd/sdi/sdslots.sdi index 22a9317..204cbfc 100644 --- a/sd/sdi/sdslots.sdi +++ b/sd/sdi/sdslots.sdi @@ -16,11 +16,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -module -StarDraw +module StarDraw [ -SlotIdFile( "sdslots.hrc" ) -ModulePrefix( "Sd" ) + SlotIdFile( "sdslots.hrc" ) ] { include "sfxitems.sdi" diff --git a/sw/sdi/swslots.sdi b/sw/sdi/swslots.sdi index d5a89f2..52e868c 100644 --- a/sw/sdi/swslots.sdi +++ b/sw/sdi/swslots.sdi @@ -16,11 +16,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -module -StarWriter +module StarWriter [ -SlotIdFile( "swslots.hrc" ) -ModulePrefix( "Sw" ) + SlotIdFile( "swslots.hrc" ) ] { include "sfxitems.sdi" commit 8a79d044c067051bff3729fc14a18ac7382325ec Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 09:02:18 2016 +0200 remove unused HelpText attribute from *.sdi files Change-Id: I21bcf66c552cd38eaae1bdc85626aa9bd1782ebd diff --git a/basctl/sdi/basslots.sdi b/basctl/sdi/basslots.sdi index 3074e71..ed588f2 100644 --- a/basctl/sdi/basslots.sdi +++ b/basctl/sdi/basslots.sdi @@ -19,7 +19,6 @@ module BasicIDE [ -HelpText( "BasicIDE" ) SlotIdFile( "basslots.hrc" ) ] { diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index 6db8ca0..dd01e85 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -86,7 +86,6 @@ class SvMetaObject : public SvRttiBase { protected: SvString aName; - SvHelpText aHelpText; bool ReadNameSvIdl( SvTokenStream & rInStm ); void DoReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); @@ -102,7 +101,6 @@ public: void SetName( const OString& rName ); virtual const SvString & GetName() const { return aName; } - virtual const SvString & GetHelpText() const { return aHelpText; } virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ); virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); @@ -145,14 +143,6 @@ public: : aRef->GetName(); } - const SvString & GetHelpText() const override - { - return ( !aRef.Is() - || !SvMetaObject::GetHelpText().getString().isEmpty() ) - ? SvMetaObject::GetHelpText() - : aRef->GetHelpText(); - } - SvMetaReference * GetRef() const { return aRef; } void SetRef( SvMetaReference * pRef ) { aRef = pRef; } diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx index f571a02..220c536 100644 --- a/idl/inc/bastype.hxx +++ b/idl/inc/bastype.hxx @@ -86,14 +86,6 @@ public: }; -class SvHelpText : public SvString -{ -public: - SvHelpText() {} - void ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); -}; - - #endif // INCLUDED_IDL_INC_BASTYPE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/idl/inc/globals.hxx b/idl/inc/globals.hxx index a78e3aa..7b8858c 100644 --- a/idl/inc/globals.hxx +++ b/idl/inc/globals.hxx @@ -30,7 +30,6 @@ struct SvGlobalHashNames SvStringHashEntryRef MM_module; SvStringHashEntryRef MM_interface; SvStringHashEntryRef MM_String; - SvStringHashEntryRef MM_HelpText; SvStringHashEntryRef MM_void; SvStringHashEntryRef MM_shell; SvStringHashEntryRef MM_Toggle; @@ -99,7 +98,6 @@ inline SvStringHashEntry * SvHash_##Name() \ HASH_INLINE(module) HASH_INLINE(interface) -HASH_INLINE(HelpText) HASH_INLINE(shell) HASH_INLINE(Toggle) HASH_INLINE(AutoUpdate) diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index 8bc07bd..3ccbb36 100644 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -87,10 +87,9 @@ bool SvMetaObject::ReadNameSvIdl( SvTokenStream & rInStm ) return false; } -void SvMetaObject::ReadAttributesSvIdl( SvIdlDataBase & rBase, - SvTokenStream & rInStm ) +void SvMetaObject::ReadAttributesSvIdl( SvIdlDataBase & , + SvTokenStream & ) { - aHelpText.ReadSvIdl( rBase, rInStm ); } void SvMetaObject::DoReadContextSvIdl( SvIdlDataBase & rBase, diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index ced082f..a7b6c3d 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -138,9 +138,4 @@ bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) return false; } -void SvHelpText::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) -{ - SvString::ReadSvIdl( SvHash_HelpText(), rInStm ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/idl/source/prj/globals.cxx b/idl/source/prj/globals.cxx index 439e7d47..efca4af 100644 --- a/idl/source/prj/globals.cxx +++ b/idl/source/prj/globals.cxx @@ -57,7 +57,6 @@ SvGlobalHashNames::SvGlobalHashNames() : MM_module( INS( "module" ) ) , MM_interface( INS( "interface" ) ) , MM_String( INS( "String" ) ) - , MM_HelpText( INS( "HelpText" ) ) , MM_void( INS( "void" ) ) , MM_shell( INS( "shell" ) ) , MM_Toggle( INS( "Toggle" ) ) diff --git a/sc/sdi/scslots.sdi b/sc/sdi/scslots.sdi index b7b26ee..a25edbb 100644 --- a/sc/sdi/scslots.sdi +++ b/sc/sdi/scslots.sdi @@ -19,7 +19,6 @@ module StarCalc [ -HelpText( "StarDivision StarCalc" ), SlotIdFile( "scslots.hrc" ) ModulePrefix( "Sc" ) ] diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi index 4597f16..9faeb47 100644 --- a/sc/sdi/tabvwsh.sdi +++ b/sc/sdi/tabvwsh.sdi @@ -223,7 +223,6 @@ interface DataPilotTables interface DataPilotTable { SbxObject DataPilotFields SID_PIVOT_FIELDS - [ HelpText = "" ; ] } interface DataPilotFields @@ -233,11 +232,8 @@ interface DataPilotFields interface DataPilotField { String FieldName SID_PFIELD_NAME - [ HelpText = "" ; ] UINT16 Orientation SID_PFIELD_ORIENTATION - [ HelpText = "" ; ] UINT16 Function SID_PFIELD_FUNCTION - [ HelpText = "" ; ] } @@ -248,7 +244,6 @@ shell ScTabViewShell import Tables "ActiveDocument.Tables"; import BaseSelection; import TableEditView; -// import SearchSettings; SID_STATUS_PAGESTYLE [ ExecMethod = Execute; StateMethod = GetState; ] diff --git a/sd/sdi/sdgslots.sdi b/sd/sdi/sdgslots.sdi index a28b8e8..dcd9449 100644 --- a/sd/sdi/sdgslots.sdi +++ b/sd/sdi/sdgslots.sdi @@ -18,7 +18,6 @@ module StarDraw [ -HelpText( "StarDraw Application" ) SlotIdFile( "sdslots.hrc" ) ModulePrefix( "Sd" ) ] diff --git a/sd/sdi/sdslots.sdi b/sd/sdi/sdslots.sdi index 57e9bbc..22a9317 100644 --- a/sd/sdi/sdslots.sdi +++ b/sd/sdi/sdslots.sdi @@ -19,7 +19,6 @@ module StarDraw [ -HelpText( "StarDraw Application" ) SlotIdFile( "sdslots.hrc" ) ModulePrefix( "Sd" ) ] diff --git a/sfx2/sdi/sfxslots.sdi b/sfx2/sdi/sfxslots.sdi index f7e9f87..0f96f24 100644 --- a/sfx2/sdi/sfxslots.sdi +++ b/sfx2/sdi/sfxslots.sdi @@ -19,7 +19,6 @@ module StarApplicationFrame [ -HelpText( "StarDivision Application Framework" ), SlotIdFile( "sfx2/sfx.hrc" ) ] { diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi index 4914410..14ee77d 100644 --- a/starmath/sdi/smslots.sdi +++ b/starmath/sdi/smslots.sdi @@ -19,7 +19,6 @@ module StarMath [ - HelpText ( "StarMath Application" ) SlotIdFile ( "starmath.hrc" ) SlotIdFile ( "editeng/editids.hrc" ) SlotIdFile ( "sfx2/sfxsids.hrc" ) diff --git a/svx/sdi/svxslots.sdi b/svx/sdi/svxslots.sdi index ba72971..b29a902 100644 --- a/svx/sdi/svxslots.sdi +++ b/svx/sdi/svxslots.sdi @@ -18,7 +18,6 @@ module SvxItems [ -HelpText( "Svx-Items" ) SlotIdFile( "svxslots.hrc" ) ] { diff --git a/sw/sdi/swslots.sdi b/sw/sdi/swslots.sdi index 9b58460..d5a89f2 100644 --- a/sw/sdi/swslots.sdi +++ b/sw/sdi/swslots.sdi @@ -19,7 +19,6 @@ module StarWriter [ -HelpText( "StarWriter Application" ) SlotIdFile( "swslots.hrc" ) ModulePrefix( "Sw" ) ] commit aa9b67dda02bc596988196261205619e10a08f6f Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 09:01:57 2016 +0200 remove unnecessary module GUIDs in *.sdi files Change-Id: I78784abc1031027d69bbe31d150bc78c8bfbfcf4 diff --git a/basctl/sdi/basslots.sdi b/basctl/sdi/basslots.sdi index f85923c..3074e71 100644 --- a/basctl/sdi/basslots.sdi +++ b/basctl/sdi/basslots.sdi @@ -17,8 +17,6 @@ */ module -"6706E0E7-FB05-101B-804c-04021c007002" -"6806E0E7-FB05-101B-804c-04021c007002" BasicIDE [ HelpText( "BasicIDE" ) diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index fa31659..a8db970 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -32,8 +32,6 @@ class SvMetaModule : public SvMetaReference bool bImported : 1, bIsModified : 1; - SvGlobalName aBeginName; - SvGlobalName aEndName; protected: virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index 66b29c365..59b04ce 100644 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -168,19 +168,6 @@ bool SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); bool bOk = pTok->Is( SvHash_module() ); - if( bOk ) - { - pTok = rInStm.GetToken_Next(); - if( pTok->IsString() ) - bOk = aBeginName.MakeId(OStringToOUString(pTok->GetString(), RTL_TEXTENCODING_ASCII_US)); - } - rInStm.ReadDelemiter(); - if( bOk ) - { - pTok = rInStm.GetToken_Next(); - if( pTok->IsString() ) - bOk = aEndName.MakeId(OStringToOUString(pTok->GetString(), RTL_TEXTENCODING_ASCII_US)); - } rInStm.ReadDelemiter(); if( bOk ) { diff --git a/sc/sdi/scslots.sdi b/sc/sdi/scslots.sdi index 41a711f..b7b26ee 100644 --- a/sc/sdi/scslots.sdi +++ b/sc/sdi/scslots.sdi @@ -17,8 +17,6 @@ */ module -"ADC7D7A1-2341-101C-A55A-04021C007002" -"82528B40-234D-101C-A55A-04021C007002" StarCalc [ HelpText( "StarDivision StarCalc" ), diff --git a/sd/sdi/sdgslots.sdi b/sd/sdi/sdgslots.sdi index c384960..a28b8e8 100644 --- a/sd/sdi/sdgslots.sdi +++ b/sd/sdi/sdgslots.sdi @@ -16,8 +16,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ module -"2DADF501-1F00-101C-A2E4-00001B4C5CE7" -"33A1C840-1F00-101C-A2E4-00001B4C5CE7" StarDraw [ HelpText( "StarDraw Application" ) diff --git a/sd/sdi/sdslots.sdi b/sd/sdi/sdslots.sdi index 32f796a..57e9bbc 100644 --- a/sd/sdi/sdslots.sdi +++ b/sd/sdi/sdslots.sdi @@ -17,8 +17,6 @@ */ module -"2DADF501-1F00-101C-A2E4-00001B4C5CE7" -"33A1C840-1F00-101C-A2E4-00001B4C5CE7" StarDraw [ HelpText( "StarDraw Application" ) diff --git a/sfx2/sdi/sfxslots.sdi b/sfx2/sdi/sfxslots.sdi index 59a1564..f7e9f87 100644 --- a/sfx2/sdi/sfxslots.sdi +++ b/sfx2/sdi/sfxslots.sdi @@ -17,8 +17,6 @@ */ module -"384E40E0-1F22-101C-9961-04021C007002" -"5A30E000-1F22-101C-9961-04021C007002" StarApplicationFrame [ HelpText( "StarDivision Application Framework" ), diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi index f32d26f..4914410 100644 --- a/starmath/sdi/smslots.sdi +++ b/starmath/sdi/smslots.sdi @@ -17,8 +17,6 @@ */ module -"312C4240-35E7-101C-B12A-04021C007002" -"58216740-35E7-101C-B12A-04021C007002" StarMath [ HelpText ( "StarMath Application" ) diff --git a/svx/sdi/svxslots.sdi b/svx/sdi/svxslots.sdi index 4e501cb..ba72971 100644 --- a/svx/sdi/svxslots.sdi +++ b/svx/sdi/svxslots.sdi @@ -16,8 +16,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ module -"BD25A480-30AB-101C-A17D-000024021828" -"C049C7E0-30AB-101C-A17D-000024021828" SvxItems [ HelpText( "Svx-Items" ) diff --git a/sw/sdi/swslots.sdi b/sw/sdi/swslots.sdi index dd9a772..9b58460 100644 --- a/sw/sdi/swslots.sdi +++ b/sw/sdi/swslots.sdi @@ -17,8 +17,6 @@ */ module -"9F76B581-23DD-101C-80B6-000024021835" -"A1810F00-23DE-101C-80B6-000024021835" StarWriter [ HelpText( "StarWriter Application" ) commit f5a28361582a5b46a4e316f2018132980925c393 Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 08:45:00 2016 +0200 aTypeList,aAttrList in SvMetaModule are unused Change-Id: I545e55021f6e0791c80df64695faa86eb6e020ea diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index 2a64c63..fa31659 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -26,8 +26,6 @@ class SvMetaModule : public SvMetaReference { SvRefMemberList<SvMetaClass *> aClassList; - SvRefMemberList<SvMetaType *> aTypeList; - SvRefMemberList<SvMetaAttribute *> aAttrList; // browser SvString aSlotIdFile; SvString aModulePrefix; diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index 56cad71..66b29c365 100644 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -75,8 +75,6 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase, if( aEnum->ReadSvIdl( rBase, rInStm ) ) { - // declared in module - aTypeList.push_back( aEnum ); // announce globally rBase.GetTypeList().push_back( aEnum ); } @@ -88,8 +86,6 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase, if( xItem->ReadSvIdl( rBase, rInStm ) ) { - // declared in module - aTypeList.push_back( xItem ); // announce globally rBase.GetTypeList().push_back( xItem ); } @@ -158,8 +154,6 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase, { if( xSlot->Test( rBase, rInStm ) ) { - // declared in module - aAttrList.push_back( xSlot ); // announce globally rBase.AppendAttr( xSlot ); } commit f408ced762d535511f9bb2a496fef96a05b0b074 Author: Noel Grandin <n...@peralex.com> Date: Mon Feb 8 08:42:02 2016 +0200 SvMetaReference currently serves no purpose Change-Id: I676e61fee201b1a2e7f66b541061de2b049bffa9 diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index 5524df0..6db8ca0 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -158,19 +158,6 @@ public: { aRef = pRef; } }; -class SvMetaModule; -class SvMetaExtern : public SvMetaReference -{ - SvMetaModule * pModule; // included in which module - -public: - SvMetaExtern(); - - void SetModule( SvIdlDataBase & rBase ); - virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; -}; - - #endif // INCLUDED_IDL_INC_BASOBJ_HXX diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index 3a05264..2a64c63 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -23,7 +23,7 @@ #include <slot.hxx> #include <object.hxx> -class SvMetaModule : public SvMetaExtern +class SvMetaModule : public SvMetaReference { SvRefMemberList<SvMetaClass *> aClassList; SvRefMemberList<SvMetaType *> aTypeList; diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 2356f5d..57d3ecf 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -67,7 +67,7 @@ public: enum MetaTypeType { Method, Struct, Base, Enum, Class }; -class SvMetaType : public SvMetaExtern +class SvMetaType : public SvMetaReference { SvIdentifier aBasicPostfix; SvRefMemberList<SvMetaAttribute *>* pAttrList; diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index a9ddcf8..8bc07bd 100644 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -150,20 +150,4 @@ SvMetaReference::SvMetaReference() } -SvMetaExtern::SvMetaExtern() - : pModule( nullptr ) -{ -} - -void SvMetaExtern::SetModule( SvIdlDataBase & rBase ) -{ - pModule = static_cast<SvMetaModule *>(rBase.GetStack().Get( checkSvMetaObject<SvMetaModule> )); -} - -bool SvMetaExtern::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) -{ - SetModule( rBase ); - return SvMetaReference::ReadSvIdl( rBase, rInStm ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index c4d510d..56cad71 100644 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -36,7 +36,7 @@ SvMetaModule::SvMetaModule( bool bImp ) void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - SvMetaExtern::ReadAttributesSvIdl( rBase, rInStm ); + SvMetaReference::ReadAttributesSvIdl( rBase, rInStm ); if( aSlotIdFile.ReadSvIdl( SvHash_SlotIdFile(), rInStm ) ) { @@ -195,7 +195,6 @@ bool SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) if( ReadNameSvIdl( rInStm ) ) { // set pointer to itself - SetModule( rBase ); bOk = SvMetaObject::ReadSvIdl( rBase, rInStm ); } rBase.GetStack().Pop(); // remove from stack diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 84371cb..aea5f1f 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -279,9 +279,7 @@ bool SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase, rBase.WriteError( rInStm ); } } - if( bOk ) - SetModule( rBase ); - else + if( !bOk ) rInStm.Seek( nTokPos ); return bOk; } @@ -292,7 +290,7 @@ bool SvMetaType::ReadSvIdl( SvIdlDataBase & rBase, if( ReadHeaderSvIdl( rBase, rInStm ) ) { rBase.Write(OString('.')); - return SvMetaExtern::ReadSvIdl( rBase, rInStm ); + return SvMetaReference::ReadSvIdl( rBase, rInStm ); } return false; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits