xref: /aoo42x/main/forms/source/component/File.hxx (revision 2d785d7e)
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 #ifndef _FORMS_FILE_HXX_
25 #define _FORMS_FILE_HXX_
26 
27 #include "FormComponent.hxx"
28 
29 //.........................................................................
30 namespace frm
31 {
32 //.........................................................................
33 
34 //==================================================================
35 // OFileControlModel
36 //==================================================================
37 class OFileControlModel
38 				:public OControlModel
39 				,public ::com::sun::star::form::XReset
40 {
41 	::cppu::OInterfaceContainerHelper		m_aResetListeners;
42 	::rtl::OUString							m_sDefaultValue;
43 
44 protected:
45 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
46 
47 public:
48 	DECLARE_DEFAULT_LEAF_XTOR( OFileControlModel );
49 
50 	DECLARE_UNO3_AGG_DEFAULTS(OFileControlModel, OControlModel);
51 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException);
52 
53     // XServiceInfo
54 	IMPLEMENTATION_NAME(OFileControlModel);
55 	virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
56 
57     // OComponentHelper
58 	virtual void SAL_CALL disposing();
59 
60     // XPropertySet and friends
61 	virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue, sal_Int32 nHandle) const;
62 	virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue) throw ( ::com::sun::star::uno::Exception);
63 
64 	virtual sal_Bool SAL_CALL convertFastPropertyValue(::com::sun::star::uno::Any& rConvertedValue, ::com::sun::star::uno::Any& rOldValue, sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
65 		throw(::com::sun::star::lang::IllegalArgumentException);
66 
67     virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle( sal_Int32 _nHandle ) const;
68 
69     // XPersistObject
70 	virtual ::rtl::OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException);
71 	virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw ( ::com ::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
72 	virtual void SAL_CALL read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream) throw ( ::com ::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
73 
74     // XReset
75 	virtual void SAL_CALL reset() throw ( ::com::sun::star::uno::RuntimeException);
76 	virtual void SAL_CALL addResetListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XResetListener>& _rxListener) throw ( ::com::sun::star::uno::RuntimeException);
77 	virtual void SAL_CALL removeResetListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XResetListener>& _rxListener) throw ( ::com::sun::star::uno::RuntimeException);
78 
79     // OControlModel's property handling
80 	virtual void describeFixedProperties(
81 		::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps
82     ) const;
83 
84     // prevent method hiding
85     using OControlModel::disposing;
86     using OControlModel::getFastPropertyValue;
87 
88 protected:
89 	virtual void _reset();
90 
91 	DECLARE_XCLONEABLE();
92 };
93 
94 //.........................................................................
95 }	// namespace frm
96 //.........................................................................
97 
98 #endif // _FORMS_FILE_HXX_
99 
100