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