summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-05 00:36:23 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-03-05 15:21:08 -0500
commit1a92b2d9a40071c5a86f4f7c6aa405ca5affe433 (patch)
tree43ec87b405da1abecd74139fa3b1d2ade74cb967
parent01c1b155e3a209ef2804316b14ba8481738cf0c4 (diff)
Adjusted ScSpecialFilterDlg for the ScRangeName change.
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx41
1 files changed, 12 insertions, 29 deletions
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 0defb836d5eb..e7bfecfdea3d 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -149,42 +149,25 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
{
if(pDoc->GetChangeTrack()!=NULL) aBtnCopyResult.Disable();
- ScRangeName* pRangeNames = pDoc->GetRangeName();
-#if NEW_RANGE_NAME
-#else
- const USHORT nCount = pRangeNames ? pRangeNames->GetCount() : 0;
-
- /*
- * Aus den RangeNames des Dokumentes werden nun die
- * gemerkt, bei denen es sich um Filter-Bereiche handelt
- */
-
+ ScRangeName* pRangeNames = pDoc->GetRangeName();
aLbFilterArea.Clear();
aLbFilterArea.InsertEntry( aStrUndefined, 0 );
- if ( nCount > 0 )
+ if (!pRangeNames->empty())
{
- String aString;
- ScRangeData* pData = NULL;
- USHORT nInsert = 0;
-
- for ( USHORT i=0; i<nCount; i++ )
+ ScRangeName::const_iterator itr = pRangeNames->begin(), itrEnd = pRangeNames->end();
+ USHORT nInsert = 0;
+ for (; itr != itrEnd; ++itr)
{
- pData = (ScRangeData*)(pRangeNames->At( i ));
- if ( pData )
- {
- if ( pData->HasType( RT_CRITERIA ) )
- {
- pData->GetName( aString );
- nInsert = aLbFilterArea.InsertEntry( aString );
- pData->GetSymbol( aString );
- aLbFilterArea.SetEntryData( nInsert,
- new String( aString ) );
- }
- }
+ if (!itr->HasType(RT_CRITERIA))
+ continue;
+
+ nInsert = aLbFilterArea.InsertEntry(itr->GetName());
+ rtl::OUString aSymbol;
+ itr->GetSymbol(aSymbol);
+ aLbFilterArea.SetEntryData(nInsert, new String(aSymbol));
}
}
-#endif
// is there a stored source range?