Update ooo320-m1
[ooovba.git] / testtools / source / bridgetest / multi.hxx
bloba8a6cf0a310dc89607befa4b42e6be90bb86a306
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: multi.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_testtools_source_bridgetest_multi_hxx
32 #define INCLUDED_testtools_source_bridgetest_multi_hxx
34 #include "sal/config.h"
36 #include "com/sun/star/uno/Reference.hxx"
37 #include "com/sun/star/uno/RuntimeException.hpp"
38 #include "cppuhelper/implbase1.hxx"
39 #include "rtl/ustring.hxx"
40 #include "sal/types.h"
41 #include "test/testtools/bridgetest/XMulti.hpp"
43 namespace testtools { namespace bridgetest {
45 class Multi: public cppu::WeakImplHelper1< test::testtools::bridgetest::XMulti >
47 public:
48 Multi(): m_attribute1(0.0), m_attribute3(0.0) {}
50 virtual double SAL_CALL getatt1()
51 throw (com::sun::star::uno::RuntimeException)
52 { return m_attribute1; }
54 virtual void SAL_CALL setatt1(double value)
55 throw (com::sun::star::uno::RuntimeException)
56 { m_attribute1 = value; }
58 virtual sal_Int32 SAL_CALL fn11(sal_Int32 arg)
59 throw (com::sun::star::uno::RuntimeException)
60 { return 11 * arg; }
62 virtual rtl::OUString SAL_CALL fn12(rtl::OUString const & arg)
63 throw (com::sun::star::uno::RuntimeException)
64 { return rtl::OUString::createFromAscii("12") + arg; }
66 virtual sal_Int32 SAL_CALL fn21(sal_Int32 arg)
67 throw (com::sun::star::uno::RuntimeException)
68 { return 21 * arg; }
70 virtual rtl::OUString SAL_CALL fn22(rtl::OUString const & arg)
71 throw (com::sun::star::uno::RuntimeException)
72 { return rtl::OUString::createFromAscii("22") + arg; }
74 virtual double SAL_CALL getatt3()
75 throw (com::sun::star::uno::RuntimeException)
76 { return m_attribute3; }
78 virtual void SAL_CALL setatt3(double value)
79 throw (com::sun::star::uno::RuntimeException)
80 { m_attribute3 = value; }
82 virtual sal_Int32 SAL_CALL fn31(sal_Int32 arg)
83 throw (com::sun::star::uno::RuntimeException)
84 { return 31 * arg; }
86 virtual rtl::OUString SAL_CALL fn32(rtl::OUString const & arg)
87 throw (com::sun::star::uno::RuntimeException)
88 { return rtl::OUString::createFromAscii("32") + arg; }
90 virtual sal_Int32 SAL_CALL fn33()
91 throw (com::sun::star::uno::RuntimeException)
92 { return 33; }
94 virtual sal_Int32 SAL_CALL fn41(sal_Int32 arg)
95 throw (com::sun::star::uno::RuntimeException)
96 { return 41 * arg; }
98 virtual sal_Int32 SAL_CALL fn61(sal_Int32 arg)
99 throw (com::sun::star::uno::RuntimeException)
100 { return 61 * arg; }
102 virtual rtl::OUString SAL_CALL fn62(rtl::OUString const & arg)
103 throw (com::sun::star::uno::RuntimeException)
104 { return rtl::OUString::createFromAscii("62") + arg; }
106 virtual sal_Int32 SAL_CALL fn71(sal_Int32 arg)
107 throw (com::sun::star::uno::RuntimeException)
108 { return 71 * arg; }
110 virtual rtl::OUString SAL_CALL fn72(rtl::OUString const & arg)
111 throw (com::sun::star::uno::RuntimeException)
112 { return rtl::OUString::createFromAscii("72") + arg; }
114 virtual sal_Int32 SAL_CALL fn73()
115 throw (com::sun::star::uno::RuntimeException)
116 { return 73; }
118 private:
119 double m_attribute1;
120 double m_attribute3;
123 rtl::OUString testMulti(
124 com::sun::star::uno::Reference< test::testtools::bridgetest::XMulti >
125 const & multi);
129 #endif