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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_extensions.hxx"
26 #include "pcrunodialogs.hxx"
27 #include "formstrings.hxx"
28 #include "pcrstrings.hxx"
29 #include "taborder.hxx"
30 #include "pcrcommon.hxx"
31 
createRegistryInfo_OTabOrderDialog()32 extern "C" void SAL_CALL createRegistryInfo_OTabOrderDialog()
33 {
34 	::pcr::OAutoRegistration< ::pcr::OTabOrderDialog > aAutoRegistration;
35 }
36 
37 //........................................................................
38 namespace pcr
39 {
40 //........................................................................
41 
42     using namespace ::com::sun::star::uno;
43 	using namespace ::com::sun::star::lang;
44 	using namespace ::com::sun::star::beans;
45 
46 	//====================================================================
47 	//= OTabOrderDialog
48 	//====================================================================
49 	//---------------------------------------------------------------------
OTabOrderDialog(const Reference<XComponentContext> & _rxContext)50 	OTabOrderDialog::OTabOrderDialog( const Reference< XComponentContext >& _rxContext )
51 		:OGenericUnoDialog( _rxContext )
52 	{
53 		registerProperty( PROPERTY_CONTROLCONTEXT, OWN_PROPERTY_ID_CONTROLCONTEXT,
54 			PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT,
55 			&m_xControlContext, ::getCppuType( &m_xControlContext ) );
56 
57         registerProperty( PROPERTY_TABBINGMODEL, OWN_PROPERTY_ID_TABBINGMODEL,
58 			PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT,
59 			&m_xTabbingModel, ::getCppuType( &m_xTabbingModel ) );
60 	}
61 
62 	//---------------------------------------------------------------------
~OTabOrderDialog()63 	OTabOrderDialog::~OTabOrderDialog()
64 	{
65 		if ( m_pDialog )
66 		{
67 			::osl::MutexGuard aGuard( m_aMutex );
68 			if ( m_pDialog )
69 				destroyDialog();
70 		}
71 	}
72 
73 	//---------------------------------------------------------------------
getImplementationId()74 	Sequence<sal_Int8> SAL_CALL OTabOrderDialog::getImplementationId(  ) throw(RuntimeException)
75 	{
76 		static ::cppu::OImplementationId aId;
77 		return aId.getImplementationId();
78 	}
79 
80 	//---------------------------------------------------------------------
Create(const Reference<XComponentContext> & _rxContext)81 	Reference< XInterface > SAL_CALL OTabOrderDialog::Create( const Reference< XComponentContext >& _rxContext )
82 	{
83 		return *( new OTabOrderDialog( _rxContext ) );
84 	}
85 
86 	//---------------------------------------------------------------------
getImplementationName()87 	::rtl::OUString SAL_CALL OTabOrderDialog::getImplementationName() throw(RuntimeException)
88 	{
89 		return getImplementationName_static();
90 	}
91 
92 	//---------------------------------------------------------------------
getImplementationName_static()93 	::rtl::OUString OTabOrderDialog::getImplementationName_static() throw(RuntimeException)
94 	{
95 		return ::rtl::OUString::createFromAscii( "org.openoffice.comp.form.ui.OTabOrderDialog" );
96 	}
97 
98 	//---------------------------------------------------------------------
getSupportedServiceNames()99 	::comphelper::StringSequence SAL_CALL OTabOrderDialog::getSupportedServiceNames() throw(RuntimeException)
100 	{
101 		return getSupportedServiceNames_static();
102 	}
103 
104 	//---------------------------------------------------------------------
getSupportedServiceNames_static()105 	::comphelper::StringSequence OTabOrderDialog::getSupportedServiceNames_static() throw(RuntimeException)
106 	{
107 		::comphelper::StringSequence aSupported(1);
108 		aSupported.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.ui.TabOrderDialog" ) );
109 		return aSupported;
110 	}
111 
112 	//---------------------------------------------------------------------
getPropertySetInfo()113 	Reference<XPropertySetInfo>  SAL_CALL OTabOrderDialog::getPropertySetInfo() throw(RuntimeException)
114 	{
115 		Reference<XPropertySetInfo>  xInfo( createPropertySetInfo( getInfoHelper() ) );
116 		return xInfo;
117 	}
118 
119 	//---------------------------------------------------------------------
getInfoHelper()120 	::cppu::IPropertyArrayHelper& OTabOrderDialog::getInfoHelper()
121 	{
122 		return *const_cast< OTabOrderDialog* >( this )->getArrayHelper();
123 	}
124 
125 	//--------------------------------------------------------------------------
createArrayHelper() const126 	::cppu::IPropertyArrayHelper* OTabOrderDialog::createArrayHelper( ) const
127 	{
128 		Sequence< Property > aProps;
129 		describeProperties( aProps );
130 		return new ::cppu::OPropertyArrayHelper( aProps );
131 	}
132 
133 	//--------------------------------------------------------------------------
createDialog(Window * _pParent)134 	Dialog*	OTabOrderDialog::createDialog( Window* _pParent )
135 	{
136         return new TabOrderDialog( _pParent, m_xTabbingModel, m_xControlContext, m_aContext.getLegacyServiceFactory() );
137 	}
138 
139 //........................................................................
140 }   // namespace pcr
141 //........................................................................
142 
143