2000-09-18 15:33:13 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 07:18:51 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 15:33:13 +00:00
|
|
|
*
|
2008-04-11 07:18:51 +00:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2000-09-18 15:33:13 +00:00
|
|
|
*
|
2008-04-11 07:18:51 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 15:33:13 +00:00
|
|
|
*
|
2008-04-11 07:18:51 +00:00
|
|
|
* $RCSfile: Pattern.hxx,v $
|
|
|
|
* $Revision: 1.10 $
|
2000-09-18 15:33:13 +00:00
|
|
|
*
|
2008-04-11 07:18:51 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 15:33:13 +00:00
|
|
|
*
|
2008-04-11 07:18:51 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 15:33:13 +00:00
|
|
|
*
|
2008-04-11 07:18:51 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 15:33:13 +00:00
|
|
|
*
|
2008-04-11 07:18:51 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 15:33:13 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _FORMS_PATTERN_HXX_
|
|
|
|
#define _FORMS_PATTERN_HXX_
|
|
|
|
|
|
|
|
#include "EditBase.hxx"
|
|
|
|
|
2007-11-01 13:55:55 +00:00
|
|
|
#include <connectivity/formattedcolumnvalue.hxx>
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
2000-09-18 15:33:13 +00:00
|
|
|
//.........................................................................
|
|
|
|
namespace frm
|
|
|
|
{
|
|
|
|
//.........................................................................
|
|
|
|
|
|
|
|
//==================================================================
|
|
|
|
//= OPatternModel
|
|
|
|
//==================================================================
|
|
|
|
class OPatternModel
|
|
|
|
:public OEditBaseModel
|
|
|
|
{
|
2003-10-21 07:59:57 +00:00
|
|
|
private:
|
2007-11-01 13:55:55 +00:00
|
|
|
::rtl::OUString m_aSaveValue;
|
|
|
|
::std::auto_ptr< ::dbtools::FormattedColumnValue >
|
|
|
|
m_pFormattedValue;
|
|
|
|
|
2000-09-18 15:33:13 +00:00
|
|
|
protected:
|
2000-11-23 07:48:15 +00:00
|
|
|
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
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);
|
|
|
|
virtual StringSequence SAL_CALL getSupportedServiceNames() throw();
|
|
|
|
|
2000-11-23 07:48:15 +00:00
|
|
|
// ::com::sun::star::io::XPersistObject
|
2001-09-12 16:46:54 +00:00
|
|
|
virtual ::rtl::OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException);
|
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
|
|
|
|
) const;
|
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
|
|
|
|
translateDbColumnToControlValue( );
|
|
|
|
virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset );
|
2007-11-01 13:55:55 +00:00
|
|
|
virtual void onConnectedDbColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxForm );
|
|
|
|
virtual void onDisconnectedDbColumn();
|
2003-10-21 07:59:57 +00:00
|
|
|
|
|
|
|
virtual ::com::sun::star::uno::Any
|
|
|
|
getDefaultForReset() const;
|
|
|
|
|
2002-12-02 08:56:36 +00:00
|
|
|
protected:
|
|
|
|
DECLARE_XCLONEABLE();
|
2000-09-18 15:33:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//==================================================================
|
|
|
|
//= OPatternControl
|
|
|
|
//==================================================================
|
|
|
|
class OPatternControl: public OBoundControl
|
|
|
|
{
|
|
|
|
protected:
|
2000-11-23 07:48:15 +00:00
|
|
|
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
2000-09-18 15:33:13 +00:00
|
|
|
|
|
|
|
public:
|
2000-11-23 07:48:15 +00:00
|
|
|
OPatternControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _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);
|
|
|
|
virtual StringSequence SAL_CALL getSupportedServiceNames() throw();
|
|
|
|
};
|
|
|
|
|
|
|
|
//.........................................................................
|
|
|
|
} // namespace frm
|
|
|
|
//.........................................................................
|
|
|
|
|
|
|
|
#endif // _FORMS_PATTERN_HXX_
|
|
|
|
|