Bump for 3.6-28
[LibreOffice.git] / extensions / source / propctrlr / pcrunodialogs.cxx
blob0f15f84b6d60f947e02f09df8e22d10db28d256f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include "pcrunodialogs.hxx"
30 #include "formstrings.hxx"
31 #include "pcrstrings.hxx"
32 #include "taborder.hxx"
33 #include "pcrcommon.hxx"
35 extern "C" void SAL_CALL createRegistryInfo_OTabOrderDialog()
37 ::pcr::OAutoRegistration< ::pcr::OTabOrderDialog > aAutoRegistration;
40 //........................................................................
41 namespace pcr
43 //........................................................................
45 using namespace ::com::sun::star::uno;
46 using namespace ::com::sun::star::lang;
47 using namespace ::com::sun::star::beans;
49 //====================================================================
50 //= OTabOrderDialog
51 //====================================================================
52 //---------------------------------------------------------------------
53 OTabOrderDialog::OTabOrderDialog( const Reference< XComponentContext >& _rxContext )
54 :OGenericUnoDialog( _rxContext )
56 registerProperty( PROPERTY_CONTROLCONTEXT, OWN_PROPERTY_ID_CONTROLCONTEXT,
57 PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT,
58 &m_xControlContext, ::getCppuType( &m_xControlContext ) );
60 registerProperty( PROPERTY_TABBINGMODEL, OWN_PROPERTY_ID_TABBINGMODEL,
61 PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT,
62 &m_xTabbingModel, ::getCppuType( &m_xTabbingModel ) );
65 //---------------------------------------------------------------------
66 OTabOrderDialog::~OTabOrderDialog()
68 if ( m_pDialog )
70 ::osl::MutexGuard aGuard( m_aMutex );
71 if ( m_pDialog )
72 destroyDialog();
76 //---------------------------------------------------------------------
77 Sequence<sal_Int8> SAL_CALL OTabOrderDialog::getImplementationId( ) throw(RuntimeException)
79 static ::cppu::OImplementationId aId;
80 return aId.getImplementationId();
83 //---------------------------------------------------------------------
84 Reference< XInterface > SAL_CALL OTabOrderDialog::Create( const Reference< XComponentContext >& _rxContext )
86 return *( new OTabOrderDialog( _rxContext ) );
89 //---------------------------------------------------------------------
90 ::rtl::OUString SAL_CALL OTabOrderDialog::getImplementationName() throw(RuntimeException)
92 return getImplementationName_static();
95 //---------------------------------------------------------------------
96 ::rtl::OUString OTabOrderDialog::getImplementationName_static() throw(RuntimeException)
98 return ::rtl::OUString("org.openoffice.comp.form.ui.OTabOrderDialog");
101 //---------------------------------------------------------------------
102 ::comphelper::StringSequence SAL_CALL OTabOrderDialog::getSupportedServiceNames() throw(RuntimeException)
104 return getSupportedServiceNames_static();
107 //---------------------------------------------------------------------
108 ::comphelper::StringSequence OTabOrderDialog::getSupportedServiceNames_static() throw(RuntimeException)
110 ::comphelper::StringSequence aSupported(1);
111 aSupported.getArray()[0] = ::rtl::OUString( "com.sun.star.form.ui.TabOrderDialog" );
112 return aSupported;
115 //---------------------------------------------------------------------
116 Reference<XPropertySetInfo> SAL_CALL OTabOrderDialog::getPropertySetInfo() throw(RuntimeException)
118 Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
119 return xInfo;
122 //---------------------------------------------------------------------
123 ::cppu::IPropertyArrayHelper& OTabOrderDialog::getInfoHelper()
125 return *const_cast< OTabOrderDialog* >( this )->getArrayHelper();
128 //--------------------------------------------------------------------------
129 ::cppu::IPropertyArrayHelper* OTabOrderDialog::createArrayHelper( ) const
131 Sequence< Property > aProps;
132 describeProperties( aProps );
133 return new ::cppu::OPropertyArrayHelper( aProps );
136 //--------------------------------------------------------------------------
137 Dialog* OTabOrderDialog::createDialog( Window* _pParent )
139 return new TabOrderDialog( _pParent, m_xTabbingModel, m_xControlContext, m_aContext.getLegacyServiceFactory() );
142 //........................................................................
143 } // namespace pcr
144 //........................................................................
146 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */