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 #ifndef INCLUDED_UUI_GETCONTINUATIONS_HXX
21 #define INCLUDED_UUI_GETCONTINUATIONS_HXX
23 #include "com/sun/star/uno/Reference.hxx"
24 #include "com/sun/star/uno/Sequence.hxx"
26 namespace com
{ namespace sun
{ namespace star
{
28 class XInteractionContinuation
;
34 com::sun::star::uno::Reference
<
35 com::sun::star::task::XInteractionContinuation
> const & rContinuation
,
36 com::sun::star::uno::Reference
< t1
> * pContinuation
)
38 if (pContinuation
&& !pContinuation
->is())
40 pContinuation
->set(rContinuation
, com::sun::star::uno::UNO_QUERY
);
41 if (pContinuation
->is())
47 template< class t1
, class t2
>
48 void getContinuations(
49 com::sun::star::uno::Sequence
<
50 com::sun::star::uno::Reference
<
51 com::sun::star::task::XInteractionContinuation
> > const &
53 com::sun::star::uno::Reference
< t1
> * pContinuation1
,
54 com::sun::star::uno::Reference
< t2
> * pContinuation2
)
56 for (sal_Int32 i
= 0; i
< rContinuations
.getLength(); ++i
)
58 if (setContinuation(rContinuations
[i
], pContinuation1
))
60 if (setContinuation(rContinuations
[i
], pContinuation2
))
65 template< class t1
, class t2
, class t3
>
66 void getContinuations(
67 com::sun::star::uno::Sequence
<
68 com::sun::star::uno::Reference
<
69 com::sun::star::task::XInteractionContinuation
> > const &
71 com::sun::star::uno::Reference
< t1
> * pContinuation1
,
72 com::sun::star::uno::Reference
< t2
> * pContinuation2
,
73 com::sun::star::uno::Reference
< t3
> * pContinuation3
)
75 for (sal_Int32 i
= 0; i
< rContinuations
.getLength(); ++i
)
77 if (setContinuation(rContinuations
[i
], pContinuation1
))
79 if (setContinuation(rContinuations
[i
], pContinuation2
))
81 if (setContinuation(rContinuations
[i
], pContinuation3
))
86 template< class t1
, class t2
, class t3
, class t4
>
87 void getContinuations(
88 com::sun::star::uno::Sequence
<
89 com::sun::star::uno::Reference
<
90 com::sun::star::task::XInteractionContinuation
> > const &
92 com::sun::star::uno::Reference
< t1
> * pContinuation1
,
93 com::sun::star::uno::Reference
< t2
> * pContinuation2
,
94 com::sun::star::uno::Reference
< t3
> * pContinuation3
,
95 com::sun::star::uno::Reference
< t4
> * pContinuation4
)
97 for (sal_Int32 i
= 0; i
< rContinuations
.getLength(); ++i
)
99 if (setContinuation(rContinuations
[i
], pContinuation1
))
101 if (setContinuation(rContinuations
[i
], pContinuation2
))
103 if (setContinuation(rContinuations
[i
], pContinuation3
))
105 if (setContinuation(rContinuations
[i
], pContinuation4
))
110 #endif /* INCLUDED_UUI_GETCONTINUATIONS_HXX */
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */