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/source/control/objface.cxx | |
parent | f676e9a604bed14865e5c9a277fda0d7b564085d (diff) |
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/source/control/objface.cxx')
-rw-r--r-- | sfx2/source/control/objface.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
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? |