Branch data Line data Source code
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 : : // no include protecttion
29 : : // this file is included from unoautopilot.hxx directly
30 : :
31 : : //=====================================================================
32 : : //= OUnoAutoPilot
33 : : //=====================================================================
34 : : template <class TYPE, class SERVICEINFO>
35 : 0 : OUnoAutoPilot<TYPE, SERVICEINFO>::OUnoAutoPilot(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
36 : 0 : :OUnoAutoPilot_Base(_rxORB)
37 : : {
38 : 0 : }
39 : :
40 : : //---------------------------------------------------------------------
41 : : template <class TYPE, class SERVICEINFO>
42 : 0 : ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL OUnoAutoPilot<TYPE, SERVICEINFO>::getImplementationId( ) throw(::com::sun::star::uno::RuntimeException)
43 : : {
44 : 0 : static ::cppu::OImplementationId aId;
45 : 0 : return aId.getImplementationId();
46 : : }
47 : :
48 : : //---------------------------------------------------------------------
49 : : template <class TYPE, class SERVICEINFO>
50 : 0 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL OUnoAutoPilot<TYPE, SERVICEINFO>::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
51 : : {
52 : 0 : return *(new OUnoAutoPilot<TYPE, SERVICEINFO>(_rxFactory));
53 : : }
54 : :
55 : : //---------------------------------------------------------------------
56 : : template <class TYPE, class SERVICEINFO>
57 : 0 : ::rtl::OUString SAL_CALL OUnoAutoPilot<TYPE, SERVICEINFO>::getImplementationName() throw(::com::sun::star::uno::RuntimeException)
58 : : {
59 : 0 : return getImplementationName_Static();
60 : : }
61 : :
62 : : //---------------------------------------------------------------------
63 : : template <class TYPE, class SERVICEINFO>
64 : 0 : ::rtl::OUString OUnoAutoPilot<TYPE, SERVICEINFO>::getImplementationName_Static() throw(::com::sun::star::uno::RuntimeException)
65 : : {
66 : 0 : return SERVICEINFO().getImplementationName();
67 : : }
68 : :
69 : : //---------------------------------------------------------------------
70 : : template <class TYPE, class SERVICEINFO>
71 : 0 : ::comphelper::StringSequence SAL_CALL OUnoAutoPilot<TYPE, SERVICEINFO>::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)
72 : : {
73 : 0 : return getSupportedServiceNames_Static();
74 : : }
75 : :
76 : : //---------------------------------------------------------------------
77 : : template <class TYPE, class SERVICEINFO>
78 : 0 : ::comphelper::StringSequence OUnoAutoPilot<TYPE, SERVICEINFO>::getSupportedServiceNames_Static() throw(::com::sun::star::uno::RuntimeException)
79 : : {
80 : 0 : return SERVICEINFO().getServiceNames();
81 : : }
82 : :
83 : : //---------------------------------------------------------------------
84 : : template <class TYPE, class SERVICEINFO>
85 : 0 : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OUnoAutoPilot<TYPE, SERVICEINFO>::getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException)
86 : : {
87 : 0 : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
88 : 0 : return xInfo;
89 : : }
90 : :
91 : : //---------------------------------------------------------------------
92 : : template <class TYPE, class SERVICEINFO>
93 : 0 : ::cppu::IPropertyArrayHelper& OUnoAutoPilot<TYPE, SERVICEINFO>::getInfoHelper()
94 : : {
95 : 0 : return *const_cast<OUnoAutoPilot*>(this)->getArrayHelper();
96 : : }
97 : :
98 : : //--------------------------------------------------------------------------
99 : : template <class TYPE, class SERVICEINFO>
100 : 0 : ::cppu::IPropertyArrayHelper* OUnoAutoPilot<TYPE, SERVICEINFO>::createArrayHelper( ) const
101 : : {
102 : 0 : ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > aProps;
103 : 0 : describeProperties(aProps);
104 : 0 : return new ::cppu::OPropertyArrayHelper(aProps);
105 : : }
106 : :
107 : : //--------------------------------------------------------------------------
108 : : template <class TYPE, class SERVICEINFO>
109 : 0 : Dialog* OUnoAutoPilot<TYPE, SERVICEINFO>::createDialog(Window* _pParent)
110 : : {
111 : 0 : return new TYPE(_pParent, m_xObjectModel, m_aContext.getLegacyServiceFactory());
112 : : }
113 : :
114 : : //--------------------------------------------------------------------------
115 : : template <class TYPE, class SERVICEINFO>
116 : 0 : void OUnoAutoPilot<TYPE, SERVICEINFO>::implInitialize(const com::sun::star::uno::Any& _rValue)
117 : : {
118 : 0 : ::com::sun::star::beans::PropertyValue aArgument;
119 : 0 : if (_rValue >>= aArgument)
120 : 0 : if (0 == aArgument.Name.compareToAscii("ObjectModel"))
121 : : {
122 : 0 : aArgument.Value >>= m_xObjectModel;
123 : 0 : return;
124 : : }
125 : :
126 : 0 : OUnoAutoPilot_Base::implInitialize(_rValue);
127 : : }
128 : :
129 : :
|