converter.cxx (6d739b60) | converter.cxx (5758ad8c) |
---|---|
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 --- 133 unchanged lines hidden (view full) --- 142 } 143 return lDestination; 144} 145 146//----------------------------------------------------------------------------- 147/** 148 * converts an unicode string hash to a sequence<PropertyValue>, where names and values match to key and values. 149 */ | 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 --- 133 unchanged lines hidden (view full) --- 142 } 143 return lDestination; 144} 145 146//----------------------------------------------------------------------------- 147/** 148 * converts an unicode string hash to a sequence<PropertyValue>, where names and values match to key and values. 149 */ |
150css::uno::Sequence< css::beans::PropertyValue > Converter::convert_OUStringHash2seqProp( const OUStringHash& lSource ) | 150css::uno::Sequence< css::beans::PropertyValue > Converter::convert_OUStringHash2seqProp( const OUStringHashMap& lSource ) |
151{ 152 css::uno::Sequence< css::beans::PropertyValue > lDestination (lSource.size()); 153 css::beans::PropertyValue* pDestination = lDestination.getArray(); 154 sal_Int32 nItem = 0; | 151{ 152 css::uno::Sequence< css::beans::PropertyValue > lDestination (lSource.size()); 153 css::beans::PropertyValue* pDestination = lDestination.getArray(); 154 sal_Int32 nItem = 0; |
155 for (OUStringHash::const_iterator pItem=lSource.begin(); pItem!=lSource.end(); ++pItem) | 155 for (OUStringHashMap::const_iterator pItem=lSource.begin(); pItem!=lSource.end(); ++pItem) |
156 { 157 pDestination[nItem].Name = pItem->first ; 158 pDestination[nItem].Value <<= pItem->second; 159 ++nItem; 160 } 161 return lDestination; 162} 163 164//----------------------------------------------------------------------------- 165/** 166 * converts a sequence<PropertyValue> to an unicode string hash, where keys and values match to names and values. 167 */ | 156 { 157 pDestination[nItem].Name = pItem->first ; 158 pDestination[nItem].Value <<= pItem->second; 159 ++nItem; 160 } 161 return lDestination; 162} 163 164//----------------------------------------------------------------------------- 165/** 166 * converts a sequence<PropertyValue> to an unicode string hash, where keys and values match to names and values. 167 */ |
168OUStringHash Converter::convert_seqProp2OUStringHash( const css::uno::Sequence< css::beans::PropertyValue >& lSource ) | 168OUStringHashMap Converter::convert_seqProp2OUStringHash( const css::uno::Sequence< css::beans::PropertyValue >& lSource ) |
169{ | 169{ |
170 OUStringHash lDestination; | 170 OUStringHashMap lDestination; |
171 sal_Int32 nCount = lSource.getLength(); 172 const css::beans::PropertyValue* pSource = lSource.getConstArray(); 173 for (sal_Int32 nItem=0; nItem<nCount; ++nItem) 174 { 175 pSource[nItem].Value >>= lDestination[pSource[nItem].Name]; 176 } 177 return lDestination; 178} --- 134 unchanged lines hidden --- | 171 sal_Int32 nCount = lSource.getLength(); 172 const css::beans::PropertyValue* pSource = lSource.getConstArray(); 173 for (sal_Int32 nItem=0; nItem<nCount; ++nItem) 174 { 175 pSource[nItem].Value >>= lDestination[pSource[nItem].Name]; 176 } 177 return lDestination; 178} --- 134 unchanged lines hidden --- |