1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <cppuhelper/typeprovider.hxx>
23 #include <osl/mutex.hxx>
26 using namespace com::sun::star::uno
;
32 OImplementationId::~OImplementationId()
37 Sequence
< sal_Int8
> OImplementationId::getImplementationId() const
41 MutexGuard
aGuard( Mutex::getGlobalMutex() );
44 Sequence
< sal_Int8
> * pSeq
= new Sequence
< sal_Int8
>( 16 );
45 ::rtl_createUuid( reinterpret_cast<sal_uInt8
*>(pSeq
->getArray()), nullptr, _bUseEthernetAddress
);
53 static void copy( Sequence
< Type
> & rDest
, const Sequence
< Type
> & rSource
, sal_Int32 nOffset
)
55 Type
* pDest
= rDest
.getArray();
56 const Type
* pSource
= rSource
.getConstArray();
58 for ( sal_Int32 nPos
= rSource
.getLength(); nPos
--; )
59 pDest
[nOffset
+ nPos
] = pSource
[nPos
];
63 OTypeCollection::OTypeCollection(
65 const Sequence
< Type
> & rAddTypes
)
66 : _aTypes( 1 + rAddTypes
.getLength() )
69 copy( _aTypes
, rAddTypes
, 1 );
72 OTypeCollection::OTypeCollection(
75 const Sequence
< Type
> & rAddTypes
)
76 : _aTypes( 2 + rAddTypes
.getLength() )
80 copy( _aTypes
, rAddTypes
, 2 );
83 OTypeCollection::OTypeCollection(
87 const Sequence
< Type
> & rAddTypes
)
88 : _aTypes( 3 + rAddTypes
.getLength() )
93 copy( _aTypes
, rAddTypes
, 3 );
96 OTypeCollection::OTypeCollection(
101 const Sequence
< Type
> & rAddTypes
)
102 : _aTypes( 4 + rAddTypes
.getLength() )
108 copy( _aTypes
, rAddTypes
, 4 );
111 OTypeCollection::OTypeCollection(
117 const Sequence
< Type
> & rAddTypes
)
118 : _aTypes( 5 + rAddTypes
.getLength() )
125 copy( _aTypes
, rAddTypes
, 5 );
128 OTypeCollection::OTypeCollection(
135 const Sequence
< Type
> & rAddTypes
)
136 : _aTypes( 6 + rAddTypes
.getLength() )
144 copy( _aTypes
, rAddTypes
, 6 );
147 OTypeCollection::OTypeCollection(
155 const Sequence
< Type
> & rAddTypes
)
156 : _aTypes( 7 + rAddTypes
.getLength() )
165 copy( _aTypes
, rAddTypes
, 7 );
168 OTypeCollection::OTypeCollection(
177 const Sequence
< Type
> & rAddTypes
)
178 : _aTypes( 8 + rAddTypes
.getLength() )
188 copy( _aTypes
, rAddTypes
, 8 );
191 OTypeCollection::OTypeCollection(
201 const Sequence
< Type
> & rAddTypes
)
202 : _aTypes( 9 + rAddTypes
.getLength() )
213 copy( _aTypes
, rAddTypes
, 9 );
216 OTypeCollection::OTypeCollection(
226 const Type
& rType10
,
227 const Sequence
< Type
> & rAddTypes
)
228 : _aTypes( 10 + rAddTypes
.getLength() )
239 _aTypes
[9] = rType10
;
240 copy( _aTypes
, rAddTypes
, 10 );
243 OTypeCollection::OTypeCollection(
253 const Type
& rType10
,
254 const Type
& rType11
,
255 const Sequence
< Type
> & rAddTypes
)
256 : _aTypes( 11 + rAddTypes
.getLength() )
267 _aTypes
[9] = rType10
;
268 _aTypes
[10] = rType11
;
269 copy( _aTypes
, rAddTypes
, 11 );
272 OTypeCollection::OTypeCollection(
282 const Type
& rType10
,
283 const Type
& rType11
,
284 const Type
& rType12
,
285 const Sequence
< Type
> & rAddTypes
)
286 : _aTypes( 12 + rAddTypes
.getLength() )
297 _aTypes
[9] = rType10
;
298 _aTypes
[10] = rType11
;
299 _aTypes
[11] = rType12
;
300 copy( _aTypes
, rAddTypes
, 12 );
305 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */