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