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
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_testtools_source_bridgetest_multi_hxx
25 #define INCLUDED_testtools_source_bridgetest_multi_hxx
26 
27 #include "sal/config.h"
28 
29 #include "com/sun/star/uno/Reference.hxx"
30 #include "com/sun/star/uno/RuntimeException.hpp"
31 #include "cppuhelper/implbase1.hxx"
32 #include "rtl/ustring.hxx"
33 #include "sal/types.h"
34 #include "test/testtools/bridgetest/XMulti.hpp"
35 
36 namespace testtools { namespace bridgetest {
37 
38 class Multi: public cppu::WeakImplHelper1< test::testtools::bridgetest::XMulti >
39 {
40 public:
Multi()41     Multi(): m_attribute1(0.0), m_attribute3(0.0) {}
42 
getatt1()43     virtual double SAL_CALL getatt1()
44         throw (com::sun::star::uno::RuntimeException)
45     { return m_attribute1; }
46 
setatt1(double value)47     virtual void SAL_CALL setatt1(double value)
48         throw (com::sun::star::uno::RuntimeException)
49     { m_attribute1 = value; }
50 
fn11(sal_Int32 arg)51     virtual sal_Int32 SAL_CALL fn11(sal_Int32 arg)
52         throw (com::sun::star::uno::RuntimeException)
53     { return 11 * arg; }
54 
fn12(rtl::OUString const & arg)55     virtual rtl::OUString SAL_CALL fn12(rtl::OUString const & arg)
56         throw (com::sun::star::uno::RuntimeException)
57     { return rtl::OUString::createFromAscii("12") + arg; }
58 
fn21(sal_Int32 arg)59     virtual sal_Int32 SAL_CALL fn21(sal_Int32 arg)
60         throw (com::sun::star::uno::RuntimeException)
61     { return 21 * arg; }
62 
fn22(rtl::OUString const & arg)63     virtual rtl::OUString SAL_CALL fn22(rtl::OUString const & arg)
64         throw (com::sun::star::uno::RuntimeException)
65     { return rtl::OUString::createFromAscii("22") + arg; }
66 
getatt3()67     virtual double SAL_CALL getatt3()
68         throw (com::sun::star::uno::RuntimeException)
69     { return m_attribute3; }
70 
setatt3(double value)71     virtual void SAL_CALL setatt3(double value)
72         throw (com::sun::star::uno::RuntimeException)
73     { m_attribute3 = value; }
74 
fn31(sal_Int32 arg)75     virtual sal_Int32 SAL_CALL fn31(sal_Int32 arg)
76         throw (com::sun::star::uno::RuntimeException)
77     { return 31 * arg; }
78 
fn32(rtl::OUString const & arg)79     virtual rtl::OUString SAL_CALL fn32(rtl::OUString const & arg)
80         throw (com::sun::star::uno::RuntimeException)
81     { return rtl::OUString::createFromAscii("32") + arg; }
82 
fn33()83     virtual sal_Int32 SAL_CALL fn33()
84         throw (com::sun::star::uno::RuntimeException)
85     { return 33; }
86 
fn41(sal_Int32 arg)87     virtual sal_Int32 SAL_CALL fn41(sal_Int32 arg)
88         throw (com::sun::star::uno::RuntimeException)
89     { return 41 * arg; }
90 
fn61(sal_Int32 arg)91     virtual sal_Int32 SAL_CALL fn61(sal_Int32 arg)
92         throw (com::sun::star::uno::RuntimeException)
93     { return 61 * arg; }
94 
fn62(rtl::OUString const & arg)95     virtual rtl::OUString SAL_CALL fn62(rtl::OUString const & arg)
96         throw (com::sun::star::uno::RuntimeException)
97     { return rtl::OUString::createFromAscii("62") + arg; }
98 
fn71(sal_Int32 arg)99     virtual sal_Int32 SAL_CALL fn71(sal_Int32 arg)
100         throw (com::sun::star::uno::RuntimeException)
101     { return 71 * arg; }
102 
fn72(rtl::OUString const & arg)103     virtual rtl::OUString SAL_CALL fn72(rtl::OUString const & arg)
104         throw (com::sun::star::uno::RuntimeException)
105     { return rtl::OUString::createFromAscii("72") + arg; }
106 
fn73()107     virtual sal_Int32 SAL_CALL fn73()
108         throw (com::sun::star::uno::RuntimeException)
109     { return 73; }
110 
111 private:
112     double m_attribute1;
113     double m_attribute3;
114 };
115 
116 rtl::OUString testMulti(
117     com::sun::star::uno::Reference< test::testtools::bridgetest::XMulti >
118     const & multi);
119 
120 } }
121 
122 #endif
123