Update ooo320-m1
[ooovba.git] / autodoc / source / ary / kernel / slots.cxx
blob50c6de71892511f527b0f20451c4d5cf5cb9b72c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: slots.cxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include <precomp.h>
32 #include <slots.hxx>
35 // NOT FULLY DEFINED SERVICES
36 #include <ary/ary_disp.hxx>
40 namespace ary
44 //*********************** Slot ********************//
47 void
48 Slot::StoreAt( Display & o_rDestination ) const
50 o_rDestination.StartSlot();
51 StoreEntries(o_rDestination);
52 o_rDestination.FinishSlot();
56 //*********************** Slot_Null ********************//
58 Slot_Null::~Slot_Null()
62 void
63 Slot_Null::StoreAt( Display & ) const
65 // Does nothing
68 uintt
69 Slot_Null::Size() const
71 return 0;
74 void
75 Slot_Null::StoreEntries( Display & ) const
77 // Does nothing
80 //*********************** Slot_MapLocalCe ********************//
82 Slot_MapLocalCe::Slot_MapLocalCe( const cpp::Map_LocalCe & i_rData )
83 : pData(&i_rData)
87 Slot_MapLocalCe::~Slot_MapLocalCe()
91 uintt
92 Slot_MapLocalCe::Size() const
94 return pData->size();;
97 void
98 Slot_MapLocalCe::StoreEntries( Display & o_rDestination ) const
100 for ( cpp::Map_LocalCe::const_iterator it = pData->begin();
101 it != pData->end();
102 ++it )
104 o_rDestination.DisplaySlot_LocalCe( (*it).second, (*it).first );
110 //*********************** Slot_MapOperations ********************//
112 Slot_MapOperations::Slot_MapOperations( const std::multimap<String, cpp::Ce_id> & i_rData )
113 : pData(&i_rData)
117 Slot_MapOperations::~Slot_MapOperations()
121 uintt
122 Slot_MapOperations::Size() const
124 return pData->size();;
127 void
128 Slot_MapOperations::StoreEntries( Display & o_rDestination ) const
130 for ( std::multimap<String, cpp::Ce_id>::const_iterator it = pData->begin();
131 it != pData->end();
132 ++it )
134 o_rDestination.DisplaySlot_LocalCe( (*it).second, (*it).first );
138 //*********************** Slot_ListLocalCe ********************//
140 Slot_ListLocalCe::Slot_ListLocalCe( const cpp::List_LocalCe & i_rData )
141 : pData(&i_rData)
145 Slot_ListLocalCe::~Slot_ListLocalCe()
149 uintt
150 Slot_ListLocalCe::Size() const
152 return pData->size();;
155 void
156 Slot_ListLocalCe::StoreEntries( Display & o_rDestination ) const
158 for ( cpp::List_LocalCe::const_iterator it = pData->begin();
159 it != pData->end();
160 ++it )
162 o_rDestination.DisplaySlot_LocalCe( (*it).nId, (*it).sLocalName );
167 } // namespace ary