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 #ifndef PROPCTRLR_MASTERDETAILLINKDIALOG_HXX
24 #define PROPCTRLR_MASTERDETAILLINKDIALOG_HXX
25 #include <svtools/genericunodialog.hxx>
26 #include "modulepcr.hxx"
27 //........................................................................
28 namespace pcr
29 {
30 //........................................................................
31 
32     class MasterDetailLinkDialog;
33     typedef ::svt::OGenericUnoDialog										    MasterDetailLinkDialog_DBase;
34 	typedef ::comphelper::OPropertyArrayUsageHelper< MasterDetailLinkDialog >	MasterDetailLinkDialog_PBase;
35 
36     //========================================================================
37     //= MasterDetailLinkDialog
38     //========================================================================
39     class MasterDetailLinkDialog :   public MasterDetailLinkDialog_DBase
40 				                    ,public MasterDetailLinkDialog_PBase
41 				                    ,public PcrClient
42 	{
43     public:
44 		MasterDetailLinkDialog(const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& _rxContext);
45 
46         // XServiceInfo - static methods
47 		static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static(void) throw( ::com::sun::star::uno::RuntimeException );
48 		static ::rtl::OUString getImplementationName_static(void) throw( ::com::sun::star::uno::RuntimeException );
49 		static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
50 				SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >&);
51     private:
52 		// XTypeProvider
53 		virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
54 
55 		// XServiceInfo
56 		virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
57 		virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
58 
59 		// XPropertySet
60 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo>  SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
61 		virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
62 
63 		// OPropertyArrayUsageHelper
64 		virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
65 
66         // OGenericUnoDialog overridables
67 		virtual Dialog*	createDialog(Window* _pParent);
68         virtual void implInitialize(const com::sun::star::uno::Any& _rValue);
69 
70         ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xDetail;
71         ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xMaster;
72         ::rtl::OUString m_sExplanation;
73         ::rtl::OUString m_sDetailLabel;
74         ::rtl::OUString m_sMasterLabel;
75 	};
76 
77 //........................................................................
78 }	// namespace pcr
79 //........................................................................
80 #endif // PROPCTRLR_MASTERDETAILLINKDIALOG_HXX
81