2010-10-27 12:45:03 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2013-11-05 02:31:05 +01:00
|
|
|
#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_TIME_HXX
|
|
|
|
#define INCLUDED_FORMS_SOURCE_COMPONENT_TIME_HXX
|
2000-09-18 15:33:13 +00:00
|
|
|
|
|
|
|
#include "EditBase.hxx"
|
2001-05-18 13:44:07 +00:00
|
|
|
#include "limitedformats.hxx"
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2014-02-25 18:50:02 +01:00
|
|
|
|
2000-09-18 15:33:13 +00:00
|
|
|
namespace frm
|
|
|
|
{
|
|
|
|
|
|
|
|
class OTimeModel
|
|
|
|
:public OEditBaseModel
|
2001-05-18 13:44:07 +00:00
|
|
|
,public OLimitedFormats
|
2000-09-18 15:33:13 +00:00
|
|
|
{
|
2003-10-21 08:00:46 +00:00
|
|
|
private:
|
2000-11-23 07:48:15 +00:00
|
|
|
::com::sun::star::uno::Any m_aSaveValue;
|
2014-05-06 12:37:38 +02:00
|
|
|
bool m_bDateTimeField;
|
2000-09-18 15:33:13 +00:00
|
|
|
|
|
|
|
protected:
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes() SAL_OVERRIDE;
|
2000-09-18 15:33:13 +00:00
|
|
|
|
|
|
|
public:
|
2002-12-02 08:56:36 +00:00
|
|
|
DECLARE_DEFAULT_LEAF_XTOR( OTimeModel );
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2014-08-20 14:49:41 +02:00
|
|
|
// css::io::XPersistObject
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2001-05-18 13:44:07 +00:00
|
|
|
// ::com::sun::star::beans::XPropertySet
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const SAL_OVERRIDE;
|
2001-05-18 13:44:07 +00:00
|
|
|
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 )
|
2014-03-27 18:12:18 +01:00
|
|
|
throw(::com::sun::star::lang::IllegalArgumentException) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue) throw ( ::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE;
|
2001-05-18 13:44:07 +00:00
|
|
|
|
2000-11-23 07:48:15 +00:00
|
|
|
// ::com::sun::star::lang::XServiceInfo
|
2015-03-17 12:25:11 +01:00
|
|
|
OUString SAL_CALL getImplementationName()
|
|
|
|
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
|
|
|
|
{ return OUString("com.sun.star.form.OTimeModel"); }
|
|
|
|
|
2015-08-19 13:34:43 +02:00
|
|
|
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE;
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2007-03-09 12:32:11 +00:00
|
|
|
// OControlModel's property handling
|
|
|
|
virtual void describeFixedProperties(
|
|
|
|
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps
|
2014-03-27 18:12:18 +01:00
|
|
|
) const SAL_OVERRIDE;
|
2002-12-02 08:56:36 +00:00
|
|
|
|
2006-06-19 11:53:25 +00:00
|
|
|
// prevent method hiding
|
|
|
|
using OBoundControlModel::getFastPropertyValue;
|
|
|
|
|
2003-10-21 08:00:46 +00:00
|
|
|
protected:
|
|
|
|
// OBoundControlModel overridables
|
|
|
|
virtual ::com::sun::star::uno::Any
|
2014-03-27 18:12:18 +01:00
|
|
|
translateDbColumnToControlValue( ) SAL_OVERRIDE;
|
2014-05-06 12:37:38 +02:00
|
|
|
virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE;
|
2003-10-21 08:00:46 +00:00
|
|
|
|
2008-06-25 11:02:03 +00:00
|
|
|
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
|
2014-03-27 18:12:18 +01:00
|
|
|
getSupportedBindingTypes() SAL_OVERRIDE;
|
2004-04-02 09:55:58 +00:00
|
|
|
virtual ::com::sun::star::uno::Any
|
2014-03-27 18:12:18 +01:00
|
|
|
translateControlValueToExternalValue( ) const SAL_OVERRIDE;
|
2005-03-23 10:31:19 +00:00
|
|
|
virtual ::com::sun::star::uno::Any
|
2014-03-27 18:12:18 +01:00
|
|
|
translateExternalValueToControlValue( const ::com::sun::star::uno::Any& _rExternalValue ) const SAL_OVERRIDE;
|
2004-04-02 09:55:58 +00:00
|
|
|
|
2006-03-15 08:23:35 +00:00
|
|
|
virtual ::com::sun::star::uno::Any
|
2014-03-27 18:12:18 +01:00
|
|
|
translateControlValueToValidatableValue( ) const SAL_OVERRIDE;
|
2006-03-15 08:23:35 +00:00
|
|
|
|
2003-10-21 08:00:46 +00:00
|
|
|
virtual ::com::sun::star::uno::Any
|
2014-03-27 18:12:18 +01:00
|
|
|
getDefaultForReset() const SAL_OVERRIDE;
|
|
|
|
virtual void resetNoBroadcast() SAL_OVERRIDE;
|
2003-10-21 08:00:46 +00:00
|
|
|
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void onConnectedDbColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxForm ) SAL_OVERRIDE;
|
2003-10-21 08:00:46 +00:00
|
|
|
|
2002-12-02 08:56:36 +00:00
|
|
|
protected:
|
2014-06-03 23:01:07 +02:00
|
|
|
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2000-09-18 15:33:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class OTimeControl: public OBoundControl
|
|
|
|
{
|
|
|
|
protected:
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes() SAL_OVERRIDE;
|
2000-09-18 15:33:13 +00:00
|
|
|
|
|
|
|
public:
|
2013-06-03 08:34:09 +02:00
|
|
|
OTimeControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
2014-04-07 17:26:06 +02:00
|
|
|
DECLARE_UNO3_AGG_DEFAULTS(OTimeControl, OBoundControl)
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2000-11-23 07:48:15 +00:00
|
|
|
// ::com::sun::star::lang::XServiceInfo
|
2015-03-17 12:25:11 +01:00
|
|
|
OUString SAL_CALL getImplementationName()
|
|
|
|
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
|
|
|
|
{ return OUString("com.sun.star.form.OTimeControl"); }
|
|
|
|
|
2015-08-19 13:34:43 +02:00
|
|
|
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE;
|
2000-09-18 15:33:13 +00:00
|
|
|
};
|
|
|
|
|
2014-02-25 18:50:02 +01:00
|
|
|
|
2000-09-18 15:33:13 +00:00
|
|
|
} // namespace frm
|
2014-02-25 18:50:02 +01:00
|
|
|
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2013-11-05 02:31:05 +01:00
|
|
|
#endif // INCLUDED_FORMS_SOURCE_COMPONENT_TIME_HXX
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2010-10-27 12:45:03 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|