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
|
|
|
|
{
|
|
|
|
|
|
|
|
class OPatternModel
|
|
|
|
:public OEditBaseModel
|
|
|
|
{
|
2003-10-21 07:59:57 +00:00
|
|
|
private:
|
2015-10-01 15:32:00 +02:00
|
|
|
css::uno::Any m_aLastKnownValue;
|
2014-09-30 12:26:55 +02:00
|
|
|
::std::unique_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
|
|
|
public:
|
2002-12-02 08:56:36 +00:00
|
|
|
DECLARE_DEFAULT_LEAF_XTOR( OPatternModel );
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2015-10-01 15:32:00 +02:00
|
|
|
// css::lang::XServiceInfo
|
2015-03-17 12:25:11 +01:00
|
|
|
OUString SAL_CALL getImplementationName()
|
2015-10-12 16:04:04 +02:00
|
|
|
throw (css::uno::RuntimeException, std::exception) override
|
2015-03-17 12:25:11 +01:00
|
|
|
{ return OUString("com.sun.star.form.OPatternModel"); }
|
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw(std::exception) override;
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2015-10-01 15:32:00 +02:00
|
|
|
// css::io::XPersistObject
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual OUString SAL_CALL getServiceName() throw ( css::uno::RuntimeException, std::exception) override;
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2007-03-09 12:31:07 +00:00
|
|
|
// OControlModel's property handling
|
|
|
|
virtual void describeFixedProperties(
|
2015-10-01 15:32:00 +02:00
|
|
|
css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps
|
2015-10-12 16:04:04 +02:00
|
|
|
) const override;
|
2002-12-02 08:56:36 +00:00
|
|
|
|
2003-10-21 07:59:57 +00:00
|
|
|
protected:
|
|
|
|
// OBoundControlModel overridables
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual css::uno::Any translateDbColumnToControlValue( ) override;
|
|
|
|
virtual bool commitControlValueToDbColumn( bool _bPostReset ) override;
|
|
|
|
virtual void onConnectedDbColumn( const css::uno::Reference< css::uno::XInterface >& _rxForm ) override;
|
|
|
|
virtual void onDisconnectedDbColumn() override;
|
2003-10-21 07:59:57 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual css::uno::Any getDefaultForReset() const override;
|
|
|
|
virtual void resetNoBroadcast() override;
|
2003-10-21 07:59:57 +00:00
|
|
|
|
2002-12-02 08:56:36 +00:00
|
|
|
protected:
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) throw (css::uno::RuntimeException, std::exception) override;
|
2000-09-18 15:33:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class OPatternControl: public OBoundControl
|
|
|
|
{
|
|
|
|
public:
|
2015-10-07 14:36:11 +01:00
|
|
|
explicit OPatternControl(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory);
|
2000-09-18 15:33:13 +00:00
|
|
|
|
2015-10-01 15:32:00 +02:00
|
|
|
// css::lang::XServiceInfo
|
2015-03-17 12:25:11 +01:00
|
|
|
OUString SAL_CALL getImplementationName()
|
2015-10-12 16:04:04 +02:00
|
|
|
throw (css::uno::RuntimeException, std::exception) override
|
2015-03-17 12:25:11 +01:00
|
|
|
{ return OUString("com.sun.star.form.OPatternControl"); }
|
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw(std::exception) 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: */
|