merged tag ooo/DEV300_m102
[LibreOffice.git] / testtools / source / bridgetest / multi.hxx
blob14af118fe7da8cd86fc8f624f653940a235746be
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef INCLUDED_testtools_source_bridgetest_multi_hxx
29 #define INCLUDED_testtools_source_bridgetest_multi_hxx
31 #include "sal/config.h"
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"
40 namespace testtools { namespace bridgetest {
42 class Multi: public cppu::WeakImplHelper1< test::testtools::bridgetest::XMulti >
44 public:
45 Multi(): m_attribute1(0.0), m_attribute3(0.0) {}
47 virtual double SAL_CALL getatt1()
48 throw (com::sun::star::uno::RuntimeException)
49 { return m_attribute1; }
51 virtual void SAL_CALL setatt1(double value)
52 throw (com::sun::star::uno::RuntimeException)
53 { m_attribute1 = value; }
55 virtual sal_Int32 SAL_CALL fn11(sal_Int32 arg)
56 throw (com::sun::star::uno::RuntimeException)
57 { return 11 * arg; }
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; }
63 virtual sal_Int32 SAL_CALL fn21(sal_Int32 arg)
64 throw (com::sun::star::uno::RuntimeException)
65 { return 21 * arg; }
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; }
71 virtual double SAL_CALL getatt3()
72 throw (com::sun::star::uno::RuntimeException)
73 { return m_attribute3; }
75 virtual void SAL_CALL setatt3(double value)
76 throw (com::sun::star::uno::RuntimeException)
77 { m_attribute3 = value; }
79 virtual sal_Int32 SAL_CALL fn31(sal_Int32 arg)
80 throw (com::sun::star::uno::RuntimeException)
81 { return 31 * arg; }
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; }
87 virtual sal_Int32 SAL_CALL fn33()
88 throw (com::sun::star::uno::RuntimeException)
89 { return 33; }
91 virtual sal_Int32 SAL_CALL fn41(sal_Int32 arg)
92 throw (com::sun::star::uno::RuntimeException)
93 { return 41 * arg; }
95 virtual sal_Int32 SAL_CALL fn61(sal_Int32 arg)
96 throw (com::sun::star::uno::RuntimeException)
97 { return 61 * arg; }
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; }
103 virtual sal_Int32 SAL_CALL fn71(sal_Int32 arg)
104 throw (com::sun::star::uno::RuntimeException)
105 { return 71 * arg; }
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; }
111 virtual sal_Int32 SAL_CALL fn73()
112 throw (com::sun::star::uno::RuntimeException)
113 { return 73; }
115 private:
116 double m_attribute1;
117 double m_attribute3;
120 rtl::OUString testMulti(
121 com::sun::star::uno::Reference< test::testtools::bridgetest::XMulti >
122 const & multi);
126 #endif