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_PATTERN_HXX
|
|
|
|
#define INCLUDED_FORMS_SOURCE_COMPONENT_PATTERN_HXX
|
2000-09-18 15:33:13 +00:00
|
|
|
|
|
|
|
#include "EditBase.hxx"
|
|
|
|
|
2007-11-01 13:55:55 +00:00
|
|
|
#include <connectivity/formattedcolumnvalue.hxx>
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
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
|
|
|
//= OPatternModel
|
2014-02-25 18:50:02 +01:00
|
|
|
|
2000-09-18 15:33:13 +00:00
|
|
|
class OPatternModel
|
|
|
|
:public OEditBaseModel
|
|
|
|
{
|
2003-10-21 07:59:57 +00:00
|
|
|
private:
|
2008-12-01 12:31:27 +00:00
|
|
|
::com::sun::star::uno::Any m_aLastKnownValue;
|
2007-11-01 13:55:55 +00:00
|
|
|
::std::auto_ptr< ::dbtools::FormattedColumnValue >
|
2008-12-01 12:31:27 +00:00
|
|
|
m_pFormattedValue;
|
2007-11-01 13:55:55 +00:00
|
|
|
|
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( OPatternModel );
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2000-11-23 07:48:15 +00:00
|
|
|
// ::com::sun::star::lang::XServiceInfo
|
2000-09-18 15:33:13 +00:00
|
|
|
IMPLEMENTATION_NAME(OPatternModel);
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE;
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2000-11-23 07:48:15 +00:00
|
|
|
// ::com::sun::star::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
|
|
|
|
2007-03-09 12:31:07 +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
|
|
|
|
2003-10-21 07:59:57 +00:00
|
|
|
protected:
|
|
|
|
// OBoundControlModel overridables
|
|
|
|
virtual ::com::sun::star::uno::Any
|
2014-03-27 18:12:18 +01:00
|
|
|
translateDbColumnToControlValue( ) SAL_OVERRIDE;
|
|
|
|
virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE;
|
|
|
|
virtual void onConnectedDbColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxForm ) SAL_OVERRIDE;
|
|
|
|
virtual void onDisconnectedDbColumn() SAL_OVERRIDE;
|
2003-10-21 07:59:57 +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 07:59:57 +00:00
|
|
|
|
2002-12-02 08:56:36 +00:00
|
|
|
protected:
|
|
|
|
DECLARE_XCLONEABLE();
|
2000-09-18 15:33:13 +00:00
|
|
|
};
|
|
|
|
|
2014-02-25 18:50:02 +01:00
|
|
|
|
2000-09-18 15:33:13 +00:00
|
|
|
//= OPatternControl
|
2014-02-25 18:50:02 +01:00
|
|
|
|
2000-09-18 15:33:13 +00:00
|
|
|
class OPatternControl: 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
|
|
|
OPatternControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2000-11-23 07:48:15 +00:00
|
|
|
// ::com::sun::star::lang::XServiceInfo
|
2000-09-18 15:33:13 +00:00
|
|
|
IMPLEMENTATION_NAME(OPatternControl);
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual StringSequence 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_PATTERN_HXX
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2010-10-27 12:45:03 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|