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); 52 53 // XServiceInfo 54 IMPLEMENTATION_NAME(OFileControlModel); 55 virtual StringSequence SAL_CALL getSupportedServiceNames(); 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); 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 66 virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle( sal_Int32 _nHandle ) const; 67 68 // XPersistObject 69 virtual ::rtl::OUString SAL_CALL getServiceName(); 70 virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream); 71 virtual void SAL_CALL read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream); 72 73 // XReset 74 virtual void SAL_CALL reset(); 75 virtual void SAL_CALL addResetListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XResetListener>& _rxListener); 76 virtual void SAL_CALL removeResetListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XResetListener>& _rxListener); 77 78 // OControlModel's property handling 79 virtual void describeFixedProperties( 80 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps 81 ) const; 82 83 // prevent method hiding 84 using OControlModel::disposing; 85 using OControlModel::getFastPropertyValue; 86 87 protected: 88 virtual void _reset(); 89 90 DECLARE_XCLONEABLE(); 91 }; 92 93 //......................................................................... 94 } // namespace frm 95 //......................................................................... 96 97 #endif // _FORMS_FILE_HXX_ 98