diff options
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/srchxtra.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 6b9f01fb9976..1daecd2d39bc 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -49,6 +49,7 @@ #include <dialmgr.hxx> #include "backgrnd.hxx" #include <svx/dialogs.hrc> // RID_SVXPAGE_... +#include <tools/resary.hxx> // class SvxSearchFormatDialog ------------------------------------------- @@ -161,6 +162,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, SfxObjectShell* pSh = SfxObjectShell::Current(); DBG_ASSERT( pSh, "No DocShell" ); + ResStringArray aAttrNames( SVX_RES( RID_ATTR_NAMES ) ); SfxItemPool& rPool = pSh->GetPool(); SfxItemSet aSet( rPool, pWhRanges ); SfxWhichIter aIter( aSet ); @@ -183,18 +185,14 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, } // item resources are in svx - USHORT nResId = nSlot - SID_SVX_START + RID_ATTR_BEGIN; + sal_uInt32 nId = aAttrNames.FindIndex( nSlot ); SvLBoxEntry* pEntry = NULL; - ResId aId( nResId, DIALOG_MGR() ); - aId.SetRT( RSC_STRING ); - if ( DIALOG_MGR().IsAvailable( aId ) ) - pEntry = aAttrLB.SvTreeListBox::InsertEntry( CUI_RESSTR( nResId ) ); + if ( RESARRAY_INDEX_NOTFOUND != nId ) + pEntry = aAttrLB.SvTreeListBox::InsertEntry( aAttrNames.GetString(nId) ); else { ByteString sError( "no resource for slot id\nslot = " ); sError += ByteString::CreateFromInt32( nSlot ); - sError += ByteString( "\nresid = " ); - sError += ByteString::CreateFromInt32( nResId ); DBG_ERRORFILE( sError.GetBuffer() ); } |