diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-25 10:12:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-25 14:54:02 +0000 |
commit | 83078214196b071cf1d8e5796803b6ebc1bc9de4 (patch) | |
tree | dffa5b67e5ad6c95341c2f6b97dcc6f6de8c7155 /sfx2 | |
parent | tidy up this deref before check code (diff) | |
download | core-83078214196b071cf1d8e5796803b6ebc1bc9de4.tar.gz core-83078214196b071cf1d8e5796803b6ebc1bc9de4.zip |
We now only need one bit of information here
whether there *is* an id, or whether there is not an id. An id of 0 seems to
be used as a flag that an interface is some sort of superclass which can be
subclassed by something else and have its toolbars etc reused.
Convert this to a bool so we don't need an a resource id for each one and just
drop the third arg for the normal "final" case and use a different define for
the inheritable case
Change-Id: I98380f03d73d57bf8cba02d339097e384518abaa
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appmisc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/module.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/objface.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 73d38e3e754a..fa87870cf690 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -89,7 +89,7 @@ using namespace ::com::sun::star::container; #define SFX_ITEMTYPE_STATBAR 4 -SFX_IMPL_INTERFACE(SfxApplication,SfxShell,SfxResId(RID_DESKTOP)) +SFX_IMPL_INTERFACE(SfxApplication,SfxShell) void SfxApplication::InitInterface_Impl() { diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index 424880e0d042..c58c2d8128f3 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -134,7 +134,7 @@ ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, bool bBig ) TYPEINIT1(SfxModule, SfxShell); -SFX_IMPL_INTERFACE(SfxModule, SfxShell, SfxResId(0)) +SFX_IMPL_SUPERCLASS_INTERFACE(SfxModule, SfxShell) void SfxModule::InitInterface_Impl() { diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index 706258fd06f4..6e261e483124 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -104,14 +104,14 @@ static SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, sal_uInt32 nRes // constuctor, registeres a new unit SfxInterface::SfxInterface( const char *pClassName, - const ResId& rNameResId, + bool bUsableSuperClass, SfxInterfaceId nId, const SfxInterface* pParent, SfxSlot &rSlotMap, sal_uInt16 nSlotCount ): pName(pClassName), pGenoType(pParent), nClassId(nId), - aNameResId(rNameResId.GetId(),*rNameResId.GetResMgr()), + bSuperClass(bUsableSuperClass), pImpData(0) { pImpData = new SfxInterface_Impl; @@ -394,7 +394,7 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, sal_uInt32 nResId, sal sal_uInt32 SfxInterface::GetObjectBarId(sal_uInt16 nNo) const { - bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); + bool bGenoType = (pGenoType != 0 && pGenoType->UseAsSuperClass()); if ( bGenoType ) { // Are there toolbars in the super class? @@ -413,7 +413,7 @@ sal_uInt32 SfxInterface::GetObjectBarId(sal_uInt16 nNo) const sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const { - bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); + bool bGenoType = (pGenoType != 0 && pGenoType->UseAsSuperClass()); if ( bGenoType ) { // Are there toolbars in the super class? @@ -432,7 +432,7 @@ sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const sal_uInt16 SfxInterface::GetObjectBarCount() const { - if (pGenoType && ! pGenoType->HasName()) + if (pGenoType && pGenoType->UseAsSuperClass()) return pImpData->aObjectBars.size() + pGenoType->GetObjectBarCount(); else return pImpData->aObjectBars.size(); @@ -520,7 +520,7 @@ const ResId& SfxInterface::GetStatusBarResId() const sal_uInt32 SfxInterface::GetObjectBarFeature ( sal_uInt16 nNo ) const { - bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); + bool bGenoType = (pGenoType != 0 && pGenoType->UseAsSuperClass()); if ( bGenoType ) { // Are there toolbars in the super class? @@ -539,7 +539,7 @@ sal_uInt32 SfxInterface::GetObjectBarFeature ( sal_uInt16 nNo ) const bool SfxInterface::IsObjectBarVisible(sal_uInt16 nNo) const { - bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); + bool bGenoType = (pGenoType != 0 && pGenoType->UseAsSuperClass()); if ( bGenoType ) { // Are there toolbars in the super class? diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index f3bb54701344..30e91648d882 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -116,7 +116,7 @@ using namespace ::com::sun::star::task; #define SfxObjectShell #include "sfxslots.hxx" -SFX_IMPL_INTERFACE(SfxObjectShell, SfxShell, SfxResId(0)) +SFX_IMPL_SUPERCLASS_INTERFACE(SfxObjectShell, SfxShell) void SfxObjectShell::InitInterface_Impl() { diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index b2a1b28c36a0..e84c617994f3 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -145,7 +145,7 @@ using ::com::sun::star::container::XIndexContainer; #include "sfxslots.hxx" #undef SfxViewFrame -SFX_IMPL_INTERFACE(SfxViewFrame,SfxShell,SfxResId(0)) +SFX_IMPL_SUPERCLASS_INTERFACE(SfxViewFrame,SfxShell) void SfxViewFrame::InitInterface_Impl() { diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index a5f04e05458b..be8f9fa3400c 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -293,7 +293,7 @@ SfxViewShell_Impl::SfxViewShell_Impl(sal_uInt16 const nFlags) , m_pController(0) {} -SFX_IMPL_INTERFACE(SfxViewShell,SfxShell,SfxResId(0)) +SFX_IMPL_SUPERCLASS_INTERFACE(SfxViewShell,SfxShell) void SfxViewShell::InitInterface_Impl() { |