1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: File.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _FORMS_FILE_HXX_
32 #define _FORMS_FILE_HXX_
34 #include "FormComponent.hxx"
36 //.........................................................................
39 //.........................................................................
41 //==================================================================
43 //==================================================================
44 class OFileControlModel
46 ,public ::com::sun::star::form::XReset
48 ::cppu::OInterfaceContainerHelper m_aResetListeners
;
49 ::rtl::OUString m_sDefaultValue
;
52 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> _getTypes();
55 DECLARE_DEFAULT_LEAF_XTOR( OFileControlModel
);
57 DECLARE_UNO3_AGG_DEFAULTS(OFileControlModel
, OControlModel
);
58 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation(const ::com::sun::star::uno::Type
& _rType
) throw(::com::sun::star::uno::RuntimeException
);
61 IMPLEMENTATION_NAME(OFileControlModel
);
62 virtual StringSequence SAL_CALL
getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException
);
65 virtual void SAL_CALL
disposing();
67 // XPropertySet and friends
68 virtual void SAL_CALL
getFastPropertyValue(::com::sun::star::uno::Any
& rValue
, sal_Int32 nHandle
) const;
69 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast(sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
) throw ( ::com::sun::star::uno::Exception
);
71 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
)
72 throw(::com::sun::star::lang::IllegalArgumentException
);
74 virtual ::com::sun::star::uno::Any
getPropertyDefaultByHandle( sal_Int32 _nHandle
) const;
77 virtual ::rtl::OUString SAL_CALL
getServiceName() throw ( ::com::sun::star::uno::RuntimeException
);
78 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
);
79 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
);
82 virtual void SAL_CALL
reset() throw ( ::com::sun::star::uno::RuntimeException
);
83 virtual void SAL_CALL
addResetListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XResetListener
>& _rxListener
) throw ( ::com::sun::star::uno::RuntimeException
);
84 virtual void SAL_CALL
removeResetListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XResetListener
>& _rxListener
) throw ( ::com::sun::star::uno::RuntimeException
);
86 // OControlModel's property handling
87 virtual void describeFixedProperties(
88 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::Property
>& /* [out] */ _rProps
91 // prevent method hiding
92 using OControlModel::disposing
;
93 using OControlModel::getFastPropertyValue
;
96 virtual void _reset();
101 //.........................................................................
103 //.........................................................................
105 #endif // _FORMS_FILE_HXX_