Kaydet (Commit) fdba97bb authored tarafından Caolán McNamara's avatar Caolán McNamara

so SfxObjectUI_Impl pName is only set, never read

Change-Id: If920c1d32c457e339c13010a19670c917de9c3aa
üst 03f54ec2
...@@ -378,23 +378,18 @@ const SfxSlot* SfxInterface::GetRealSlot( sal_uInt16 nSlotId ) const ...@@ -378,23 +378,18 @@ const SfxSlot* SfxInterface::GetRealSlot( sal_uInt16 nSlotId ) const
return pSlot->pLinkedSlot; return pSlot->pLinkedSlot;
} }
void SfxInterface::RegisterPopupMenu( const ResId& rResId ) void SfxInterface::RegisterPopupMenu( const ResId& rResId )
{ {
pImpData->aPopupRes = rResId; pImpData->aPopupRes = rResId;
} }
void SfxInterface::RegisterObjectBar( sal_uInt16 nPos, const ResId& rResId, void SfxInterface::RegisterObjectBar( sal_uInt16 nPos, const ResId& rResId,
const OUString *pStr ) const OUString *pStr )
{ {
RegisterObjectBar( nPos, rResId, 0UL, pStr ); RegisterObjectBar( nPos, rResId, 0UL, pStr );
} }
void SfxInterface::RegisterObjectBar( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const OUString *pStr ) void SfxInterface::RegisterObjectBar( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const OUString *pStr )
{ {
SfxObjectUI_Impl* pUI = CreateObjectBarUI_Impl( nPos, rResId, nFeature, pStr ); SfxObjectUI_Impl* pUI = CreateObjectBarUI_Impl( nPos, rResId, nFeature, pStr );
...@@ -407,24 +402,7 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl( sal_uInt16 nPos, const ResId& rResId, ...@@ -407,24 +402,7 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl( sal_uInt16 nPos, const ResId& rResId,
if ((nPos & SFX_VISIBILITY_MASK) == 0) if ((nPos & SFX_VISIBILITY_MASK) == 0)
nPos |= SFX_VISIBILITY_STANDARD; nPos |= SFX_VISIBILITY_STANDARD;
SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(nPos, rResId, true, nFeature); return new SfxObjectUI_Impl(nPos, rResId, true, nFeature);
if (pStr == 0)
{
ResId aResId(rResId);
aResId.SetRT(RSC_STRING);
aResId.SetResMgr(rResId.GetResMgr());
if( ! aResId.GetResMgr() )
aResId.SetResMgr( SfxApplication::GetOrCreate()->GetOffResManager_Impl() );
if ( !aResId.GetResMgr() || !aResId.GetResMgr()->IsAvailable(aResId) )
pUI->pName = new OUString ("NoName");
else
pUI->pName = new OUString(aResId.toString());
}
else
pUI->pName = new OUString(*pStr);
return pUI;
} }
const ResId& SfxInterface::GetObjectBarResId( sal_uInt16 nNo ) const const ResId& SfxInterface::GetObjectBarResId( sal_uInt16 nNo ) const
...@@ -446,9 +424,6 @@ const ResId& SfxInterface::GetObjectBarResId( sal_uInt16 nNo ) const ...@@ -446,9 +424,6 @@ const ResId& SfxInterface::GetObjectBarResId( sal_uInt16 nNo ) const
return pImpData->aObjectBars[nNo]->aResId; return pImpData->aObjectBars[nNo]->aResId;
} }
sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const
{ {
bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment