1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef INCLUDED_UUI_GETCONTINUATIONS_HXX
30 #define INCLUDED_UUI_GETCONTINUATIONS_HXX
32 #include "com/sun/star/uno/Reference.hxx"
33 #include "com/sun/star/uno/Sequence.hxx"
35 namespace com
{ namespace sun
{ namespace star
{
37 class XInteractionContinuation
;
43 com::sun::star::uno::Reference
<
44 com::sun::star::task::XInteractionContinuation
> const & rContinuation
,
45 com::sun::star::uno::Reference
< t1
> * pContinuation
)
47 if (pContinuation
&& !pContinuation
->is())
49 pContinuation
->set(rContinuation
, com::sun::star::uno::UNO_QUERY
);
50 if (pContinuation
->is())
56 template< class t1
, class t2
>
57 void getContinuations(
58 com::sun::star::uno::Sequence
<
59 com::sun::star::uno::Reference
<
60 com::sun::star::task::XInteractionContinuation
> > const &
62 com::sun::star::uno::Reference
< t1
> * pContinuation1
,
63 com::sun::star::uno::Reference
< t2
> * pContinuation2
)
65 for (sal_Int32 i
= 0; i
< rContinuations
.getLength(); ++i
)
67 if (setContinuation(rContinuations
[i
], pContinuation1
))
69 if (setContinuation(rContinuations
[i
], pContinuation2
))
74 template< class t1
, class t2
, class t3
>
75 void getContinuations(
76 com::sun::star::uno::Sequence
<
77 com::sun::star::uno::Reference
<
78 com::sun::star::task::XInteractionContinuation
> > const &
80 com::sun::star::uno::Reference
< t1
> * pContinuation1
,
81 com::sun::star::uno::Reference
< t2
> * pContinuation2
,
82 com::sun::star::uno::Reference
< t3
> * pContinuation3
)
84 for (sal_Int32 i
= 0; i
< rContinuations
.getLength(); ++i
)
86 if (setContinuation(rContinuations
[i
], pContinuation1
))
88 if (setContinuation(rContinuations
[i
], pContinuation2
))
90 if (setContinuation(rContinuations
[i
], pContinuation3
))
95 template< class t1
, class t2
, class t3
, class t4
>
96 void getContinuations(
97 com::sun::star::uno::Sequence
<
98 com::sun::star::uno::Reference
<
99 com::sun::star::task::XInteractionContinuation
> > const &
101 com::sun::star::uno::Reference
< t1
> * pContinuation1
,
102 com::sun::star::uno::Reference
< t2
> * pContinuation2
,
103 com::sun::star::uno::Reference
< t3
> * pContinuation3
,
104 com::sun::star::uno::Reference
< t4
> * pContinuation4
)
106 for (sal_Int32 i
= 0; i
< rContinuations
.getLength(); ++i
)
108 if (setContinuation(rContinuations
[i
], pContinuation1
))
110 if (setContinuation(rContinuations
[i
], pContinuation2
))
112 if (setContinuation(rContinuations
[i
], pContinuation3
))
114 if (setContinuation(rContinuations
[i
], pContinuation4
))
119 #endif /* INCLUDED_UUI_GETCONTINUATIONS_HXX */
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */