xref: /AOO41X/main/sc/source/ui/app/rfindlst.cxx (revision b3f79822e811ac3493b185030a72c3c5a51f32d8)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sc.hxx"
26 
27 
28 
29 #include "rfindlst.hxx"
30 
31 // STATIC DATA -----------------------------------------------------------
32 
33 #define SC_RANGECOLORS  8
34 
35 static ColorData aColNames[SC_RANGECOLORS] =
36     { COL_LIGHTBLUE, COL_LIGHTRED, COL_LIGHTMAGENTA, COL_GREEN,
37         COL_BLUE, COL_RED, COL_MAGENTA, COL_BROWN };
38 
39 //==================================================================
40 
ScRangeFindList(const String & rName)41 ScRangeFindList::ScRangeFindList(const String& rName) :
42     aDocName( rName ),
43     bHidden( sal_False )
44 {
45 }
46 
~ScRangeFindList()47 ScRangeFindList::~ScRangeFindList()
48 {
49     void* pEntry = aEntries.First();
50     while ( pEntry )
51     {
52         delete (ScRangeFindData*) aEntries.Remove( pEntry );
53         pEntry = aEntries.Next();
54     }
55 }
56 
GetColorName(sal_uInt16 nIndex)57 ColorData ScRangeFindList::GetColorName( sal_uInt16 nIndex )        // static
58 {
59     return aColNames[nIndex % SC_RANGECOLORS];
60 }
61 
62 //==================================================================
63 
64