1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #include <precomp.h> 29 #include <slots.hxx> 30 31 32 // NOT FULLY DEFINED SERVICES 33 #include <ary/ary_disp.hxx> 34 35 36 37 namespace ary 38 { 39 40 41 //*********************** Slot ********************// 42 43 44 void 45 Slot::StoreAt( Display & o_rDestination ) const 46 { 47 o_rDestination.StartSlot(); 48 StoreEntries(o_rDestination); 49 o_rDestination.FinishSlot(); 50 } 51 52 53 //*********************** Slot_Null ********************// 54 55 Slot_Null::~Slot_Null() 56 { 57 } 58 59 void 60 Slot_Null::StoreAt( Display & ) const 61 { 62 // Does nothing 63 } 64 65 uintt 66 Slot_Null::Size() const 67 { 68 return 0; 69 } 70 71 void 72 Slot_Null::StoreEntries( Display & ) const 73 { 74 // Does nothing 75 } 76 77 //*********************** Slot_MapLocalCe ********************// 78 79 Slot_MapLocalCe::Slot_MapLocalCe( const cpp::Map_LocalCe & i_rData ) 80 : pData(&i_rData) 81 { 82 } 83 84 Slot_MapLocalCe::~Slot_MapLocalCe() 85 { 86 } 87 88 uintt 89 Slot_MapLocalCe::Size() const 90 { 91 return pData->size();; 92 } 93 94 void 95 Slot_MapLocalCe::StoreEntries( Display & o_rDestination ) const 96 { 97 for ( cpp::Map_LocalCe::const_iterator it = pData->begin(); 98 it != pData->end(); 99 ++it ) 100 { 101 o_rDestination.DisplaySlot_LocalCe( (*it).second, (*it).first ); 102 } 103 } 104 105 106 107 //*********************** Slot_MapOperations ********************// 108 109 Slot_MapOperations::Slot_MapOperations( const std::multimap<String, cpp::Ce_id> & i_rData ) 110 : pData(&i_rData) 111 { 112 } 113 114 Slot_MapOperations::~Slot_MapOperations() 115 { 116 } 117 118 uintt 119 Slot_MapOperations::Size() const 120 { 121 return pData->size();; 122 } 123 124 void 125 Slot_MapOperations::StoreEntries( Display & o_rDestination ) const 126 { 127 for ( std::multimap<String, cpp::Ce_id>::const_iterator it = pData->begin(); 128 it != pData->end(); 129 ++it ) 130 { 131 o_rDestination.DisplaySlot_LocalCe( (*it).second, (*it).first ); 132 } 133 } 134 135 //*********************** Slot_ListLocalCe ********************// 136 137 Slot_ListLocalCe::Slot_ListLocalCe( const cpp::List_LocalCe & i_rData ) 138 : pData(&i_rData) 139 { 140 } 141 142 Slot_ListLocalCe::~Slot_ListLocalCe() 143 { 144 } 145 146 uintt 147 Slot_ListLocalCe::Size() const 148 { 149 return pData->size();; 150 } 151 152 void 153 Slot_ListLocalCe::StoreEntries( Display & o_rDestination ) const 154 { 155 for ( cpp::List_LocalCe::const_iterator it = pData->begin(); 156 it != pData->end(); 157 ++it ) 158 { 159 o_rDestination.DisplaySlot_LocalCe( (*it).nId, (*it).sLocalName ); 160 } 161 } 162 163 164 } // namespace ary 165