From 0b3e6b79af3721f51569d2b7090713f41d522ece Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 24 Nov 2014 15:03:39 +0000 Subject: ResId return from GetObjectBarResId is only used for its numerical id Change-Id: I173d20d68b25a614e25b1c933cc5f18f7116ab9c --- include/sfx2/objface.hxx | 2 +- sfx2/source/control/dispatch.cxx | 2 +- sfx2/source/control/objface.cxx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/sfx2/objface.hxx b/include/sfx2/objface.hxx index 32e009039728..9dd834f79ef4 100644 --- a/include/sfx2/objface.hxx +++ b/include/sfx2/objface.hxx @@ -75,7 +75,7 @@ public: void RegisterChildWindow(sal_uInt16, bool bContext = false); void RegisterChildWindow(sal_uInt16, bool bContext, sal_uInt32 nFeature); void RegisterStatusBar( const ResId& ); - const ResId& GetObjectBarResId( sal_uInt16 nNo ) const; + sal_uInt32 GetObjectBarId(sal_uInt16 nNo) const; sal_uInt16 GetObjectBarPos( sal_uInt16 nNo ) const; sal_uInt32 GetObjectBarFeature( sal_uInt16 nNo ) const; sal_uInt16 GetObjectBarCount() const; diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index de2a3b43e614..7ee9f083bda5 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1328,7 +1328,7 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne SfxObjectBars_Impl& rBar = pImp->aObjBars[nPos & SFX_POSITION_MASK]; rBar.nMode = nPos; - rBar.nResId = pIFace->GetObjectBarResId(nNo).GetId(); + rBar.nResId = pIFace->GetObjectBarId(nNo); rBar.pIFace = pIFace; if ( bUIActive || bIsActive ) diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index 00309db6532c..588bf6e46665 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -400,7 +400,7 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, const ResId& rResId, s return new SfxObjectUI_Impl(nPos, rResId, true, nFeature); } -const ResId& SfxInterface::GetObjectBarResId( sal_uInt16 nNo ) const +sal_uInt32 SfxInterface::GetObjectBarId(sal_uInt16 nNo) const { bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); if ( bGenoType ) @@ -409,14 +409,14 @@ const ResId& SfxInterface::GetObjectBarResId( sal_uInt16 nNo ) const sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount(); if ( nNo < nBaseCount ) // The Super class comes first - return pGenoType->GetObjectBarResId( nNo ); + return pGenoType->GetObjectBarId(nNo); else nNo = nNo - nBaseCount; } assert( nNoaObjectBars.size() ); - return pImpData->aObjectBars[nNo]->aResId; + return pImpData->aObjectBars[nNo]->aResId.GetId(); } sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const -- cgit