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 #ifndef INCLUDED_testtools_source_bridgetest_multi_hxx
29 #define INCLUDED_testtools_source_bridgetest_multi_hxx
30 
31 #include "sal/config.h"
32 
33 #include "com/sun/star/uno/Reference.hxx"
34 #include "com/sun/star/uno/RuntimeException.hpp"
35 #include "cppuhelper/implbase1.hxx"
36 #include "rtl/ustring.hxx"
37 #include "sal/types.h"
38 #include "test/testtools/bridgetest/XMulti.hpp"
39 
40 namespace testtools { namespace bridgetest {
41 
42 class Multi: public cppu::WeakImplHelper1< test::testtools::bridgetest::XMulti >
43 {
44 public:
45     Multi(): m_attribute1(0.0), m_attribute3(0.0) {}
46 
47     virtual double SAL_CALL getatt1()
48         throw (com::sun::star::uno::RuntimeException)
49     { return m_attribute1; }
50 
51     virtual void SAL_CALL setatt1(double value)
52         throw (com::sun::star::uno::RuntimeException)
53     { m_attribute1 = value; }
54 
55     virtual sal_Int32 SAL_CALL fn11(sal_Int32 arg)
56         throw (com::sun::star::uno::RuntimeException)
57     { return 11 * arg; }
58 
59     virtual rtl::OUString SAL_CALL fn12(rtl::OUString const & arg)
60         throw (com::sun::star::uno::RuntimeException)
61     { return rtl::OUString::createFromAscii("12") + arg; }
62 
63     virtual sal_Int32 SAL_CALL fn21(sal_Int32 arg)
64         throw (com::sun::star::uno::RuntimeException)
65     { return 21 * arg; }
66 
67     virtual rtl::OUString SAL_CALL fn22(rtl::OUString const & arg)
68         throw (com::sun::star::uno::RuntimeException)
69     { return rtl::OUString::createFromAscii("22") + arg; }
70 
71     virtual double SAL_CALL getatt3()
72         throw (com::sun::star::uno::RuntimeException)
73     { return m_attribute3; }
74 
75     virtual void SAL_CALL setatt3(double value)
76         throw (com::sun::star::uno::RuntimeException)
77     { m_attribute3 = value; }
78 
79     virtual sal_Int32 SAL_CALL fn31(sal_Int32 arg)
80         throw (com::sun::star::uno::RuntimeException)
81     { return 31 * arg; }
82 
83     virtual rtl::OUString SAL_CALL fn32(rtl::OUString const & arg)
84         throw (com::sun::star::uno::RuntimeException)
85     { return rtl::OUString::createFromAscii("32") + arg; }
86 
87     virtual sal_Int32 SAL_CALL fn33()
88         throw (com::sun::star::uno::RuntimeException)
89     { return 33; }
90 
91     virtual sal_Int32 SAL_CALL fn41(sal_Int32 arg)
92         throw (com::sun::star::uno::RuntimeException)
93     { return 41 * arg; }
94 
95     virtual sal_Int32 SAL_CALL fn61(sal_Int32 arg)
96         throw (com::sun::star::uno::RuntimeException)
97     { return 61 * arg; }
98 
99     virtual rtl::OUString SAL_CALL fn62(rtl::OUString const & arg)
100         throw (com::sun::star::uno::RuntimeException)
101     { return rtl::OUString::createFromAscii("62") + arg; }
102 
103     virtual sal_Int32 SAL_CALL fn71(sal_Int32 arg)
104         throw (com::sun::star::uno::RuntimeException)
105     { return 71 * arg; }
106 
107     virtual rtl::OUString SAL_CALL fn72(rtl::OUString const & arg)
108         throw (com::sun::star::uno::RuntimeException)
109     { return rtl::OUString::createFromAscii("72") + arg; }
110 
111     virtual sal_Int32 SAL_CALL fn73()
112         throw (com::sun::star::uno::RuntimeException)
113     { return 73; }
114 
115 private:
116     double m_attribute1;
117     double m_attribute3;
118 };
119 
120 rtl::OUString testMulti(
121     com::sun::star::uno::Reference< test::testtools::bridgetest::XMulti >
122     const & multi);
123 
124 } }
125 
126 #endif
127