2009-08-26 13:11:27 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2009-08-26 13:11:27 +00:00
|
|
|
*
|
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
|
|
*
|
|
|
|
* This file is part of OpenOffice.org.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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).
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_toolkit.hxx"
|
2010-02-15 14:45:34 +01:00
|
|
|
#include "defaultgriddatamodel.hxx"
|
2009-08-26 13:11:27 +00:00
|
|
|
#include <comphelper/sequence.hxx>
|
|
|
|
#include <toolkit/helper/servicenames.hxx>
|
|
|
|
#include <rtl/ref.hxx>
|
|
|
|
|
|
|
|
using ::rtl::OUString;
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::awt;
|
|
|
|
using namespace ::com::sun::star::awt::grid;
|
|
|
|
using namespace ::com::sun::star::lang;
|
|
|
|
|
|
|
|
#define ROWHEADERS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeaders" ))
|
2010-04-23 17:41:32 +02:00
|
|
|
#define CELLUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CellUpdated" ))
|
|
|
|
#define ROWUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowUpdated" ))
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//......................................................................................................................
|
2009-08-26 13:11:27 +00:00
|
|
|
namespace toolkit
|
2011-01-03 23:14:55 +01:00
|
|
|
//......................................................................................................................
|
2009-08-26 13:11:27 +00:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
/** === begin UNO using === **/
|
|
|
|
using ::com::sun::star::uno::Reference;
|
|
|
|
using ::com::sun::star::uno::RuntimeException;
|
|
|
|
using ::com::sun::star::uno::Sequence;
|
|
|
|
using ::com::sun::star::uno::UNO_QUERY_THROW;
|
|
|
|
using ::com::sun::star::uno::UNO_QUERY;
|
|
|
|
using ::com::sun::star::uno::XInterface;
|
|
|
|
using ::com::sun::star::lang::XComponent;
|
|
|
|
using ::com::sun::star::lang::EventObject;
|
|
|
|
using ::com::sun::star::uno::Exception;
|
|
|
|
using ::com::sun::star::util::XCloneable;
|
|
|
|
/** === end UNO using === **/
|
|
|
|
|
|
|
|
//==================================================================================================================
|
|
|
|
//= DefaultGridDataModel
|
|
|
|
//==================================================================================================================
|
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
DefaultGridDataModel::DefaultGridDataModel()
|
2011-01-04 15:09:05 +01:00
|
|
|
:DefaultGridDataModel_Base()
|
|
|
|
,MutexAndBroadcastHelper()
|
2011-01-03 23:14:55 +01:00
|
|
|
,m_aRowHeaders()
|
|
|
|
{
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
DefaultGridDataModel::DefaultGridDataModel( DefaultGridDataModel const & i_copySource )
|
2011-01-04 15:09:05 +01:00
|
|
|
:DefaultGridDataModel_Base()
|
|
|
|
,MutexAndBroadcastHelper()
|
2011-01-03 23:14:55 +01:00
|
|
|
,m_aData( i_copySource.m_aData )
|
|
|
|
,m_aRowHeaders( i_copySource.m_aRowHeaders )
|
|
|
|
{
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
DefaultGridDataModel::~DefaultGridDataModel()
|
|
|
|
{
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void DefaultGridDataModel::broadcast( broadcast_type eType, const GridDataEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException)
|
2009-08-26 13:11:27 +00:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( XGridDataListener::static_type() );
|
|
|
|
if( pIter )
|
2009-08-26 13:11:27 +00:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
::cppu::OInterfaceIteratorHelper aListIter(*pIter);
|
|
|
|
while(aListIter.hasMoreElements())
|
2009-08-26 13:11:27 +00:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
XGridDataListener* pListener = static_cast<XGridDataListener*>(aListIter.next());
|
|
|
|
switch( eType )
|
|
|
|
{
|
|
|
|
case row_added: pListener->rowAdded(aEvent); break;
|
|
|
|
case row_removed: pListener->rowRemoved(aEvent); break;
|
|
|
|
case data_changed: pListener->dataChanged(aEvent); break;
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void DefaultGridDataModel::broadcast_changed( ::rtl::OUString name, sal_Int32 index, Any oldValue, Any newValue) throw (::com::sun::star::uno::RuntimeException)
|
|
|
|
{
|
|
|
|
Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
|
|
|
|
GridDataEvent aEvent( xSource, name, oldValue, newValue, index, ::rtl::OUString(), Sequence< Any >());
|
|
|
|
broadcast( data_changed, aEvent);
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void DefaultGridDataModel::broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName,
|
|
|
|
::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException)
|
|
|
|
{
|
|
|
|
Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
|
|
|
|
GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, (const ::com::sun::star::uno::Sequence< Any >&)rowData );
|
|
|
|
broadcast( row_added, aEvent);
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void DefaultGridDataModel::broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName,
|
|
|
|
::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException)
|
|
|
|
{
|
|
|
|
Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
|
|
|
|
GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, rowData );
|
|
|
|
broadcast( row_removed, aEvent);
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
::sal_Int32 SAL_CALL DefaultGridDataModel::getRowCount() throw (::com::sun::star::uno::RuntimeException)
|
|
|
|
{
|
|
|
|
return m_aData.size();
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-06 16:28:45 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
::sal_Int32 SAL_CALL DefaultGridDataModel::getColumnCount() throw (::com::sun::star::uno::RuntimeException)
|
|
|
|
{
|
|
|
|
if ( m_aData.empty() )
|
|
|
|
return 0;
|
|
|
|
return m_aData[0].size();
|
|
|
|
}
|
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
2011-01-07 15:52:55 +01:00
|
|
|
::rtl::OUString SAL_CALL DefaultGridDataModel::getRowTitle( ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException)
|
2011-01-03 23:14:55 +01:00
|
|
|
{
|
2011-01-07 15:52:55 +01:00
|
|
|
::osl::MutexGuard aGuard( GetMutex() );
|
|
|
|
|
|
|
|
if ( ( i_row < 0 ) || ( size_t( i_row ) >= m_aRowHeaders.size() ) )
|
|
|
|
throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
|
|
|
|
|
|
|
|
return m_aRowHeaders[ i_row ];
|
2011-01-03 23:14:55 +01:00
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & i_rowHeaders ) throw (::com::sun::star::uno::RuntimeException)
|
|
|
|
{
|
|
|
|
::com::sun::star::uno::Sequence< ::rtl::OUString > oldValue( comphelper::containerToSequence( m_aRowHeaders ) );
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
const sal_Int32 sequenceSize = i_rowHeaders.getLength();
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
sal_Int32 i = 0;
|
|
|
|
for ( std::vector< rtl::OUString >::iterator iterator = m_aRowHeaders.begin();
|
|
|
|
iterator != m_aRowHeaders.end();
|
|
|
|
++iterator, ++i
|
|
|
|
)
|
|
|
|
{
|
|
|
|
if ( sequenceSize > i )
|
|
|
|
*iterator = i_rowHeaders[i];
|
|
|
|
else
|
|
|
|
*iterator = ::rtl::OUString();
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
broadcast_changed( ROWHEADERS, 0, Any( oldValue ), Any( comphelper::containerToSequence( m_aRowHeaders ) ) );
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & rRowdata) throw (::com::sun::star::uno::RuntimeException)
|
|
|
|
{
|
|
|
|
// store header name
|
|
|
|
m_aRowHeaders.push_back(headername);
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
// store row m_aData
|
|
|
|
std::vector< Any > newRow;
|
|
|
|
for ( int i = 0; i < rRowdata.getLength();i++)
|
|
|
|
{
|
|
|
|
newRow.push_back(rRowdata[i]);
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
m_aData.push_back( newRow );
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
broadcast_add( m_aData.size()-1, headername, comphelper::containerToSequence(newRow));
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException)
|
2009-08-26 13:11:27 +00:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
if ( index >= 0 && index <= getRowCount()-1)
|
|
|
|
{
|
|
|
|
::rtl::OUString headerName( (::rtl::OUString) m_aRowHeaders[index] );
|
|
|
|
m_aRowHeaders.erase(m_aRowHeaders.begin() + index);
|
|
|
|
|
|
|
|
Sequence< Any >& rowData ( (Sequence< Any >&)m_aData[index] );
|
|
|
|
m_aData.erase(m_aData.begin() + index);
|
|
|
|
broadcast_remove( index, headerName, rowData);
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
else
|
2011-01-03 23:14:55 +01:00
|
|
|
return;
|
2009-08-26 13:11:27 +00:00
|
|
|
}
|
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
2011-01-06 16:28:45 +01:00
|
|
|
Any SAL_CALL DefaultGridDataModel::getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException)
|
2010-02-12 17:05:02 +01:00
|
|
|
{
|
2011-01-06 16:28:45 +01:00
|
|
|
::osl::MutexGuard aGuard( GetMutex() );
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-06 16:28:45 +01:00
|
|
|
if ( ( i_row < 0 ) || ( size_t( i_row ) > m_aData.size() ) )
|
|
|
|
throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-06 16:28:45 +01:00
|
|
|
::std::vector< Any > const & rRow( m_aData[ i_row ] );
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-06 16:28:45 +01:00
|
|
|
if ( ( i_column < 0 ) || ( size_t( i_column ) > rRow.size() ) )
|
|
|
|
throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-06 16:28:45 +01:00
|
|
|
return rRow[ i_column ];
|
2011-01-03 23:14:55 +01:00
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException)
|
2009-08-26 13:11:27 +00:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
BrdcstHelper.addListener( XGridDataListener::static_type(), xListener );
|
2009-08-26 13:11:27 +00:00
|
|
|
}
|
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::removeGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException)
|
2009-08-26 13:11:27 +00:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
BrdcstHelper.removeListener( XGridDataListener::static_type(), xListener );
|
2009-08-26 13:11:27 +00:00
|
|
|
}
|
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::removeAll() throw (RuntimeException)
|
|
|
|
{
|
|
|
|
m_aRowHeaders.clear();
|
|
|
|
m_aData.clear();
|
|
|
|
broadcast_remove( -1, ::rtl::OUString(), 0);
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::updateCell(::sal_Int32 row, ::sal_Int32 column, const Any& value) throw (::com::sun::star::uno::RuntimeException)
|
2010-04-23 17:41:32 +02:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
if(row >= 0 && row < (signed)m_aData.size())
|
2010-04-23 17:41:32 +02:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
if(column >= 0 && column < (signed)m_aData[0].size())
|
|
|
|
{
|
|
|
|
m_aData[row][column] = value;
|
|
|
|
Sequence< Any >dataSeq(comphelper::containerToSequence(m_aData[row]));
|
|
|
|
broadcast_changed( CELLUPDATED, row, Any(column), value );
|
|
|
|
}
|
2010-04-23 17:41:32 +02:00
|
|
|
}
|
|
|
|
}
|
2011-01-03 23:14:55 +01:00
|
|
|
|
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::updateRow(::sal_Int32 row, const ::com::sun::star::uno::Sequence< ::sal_Int32 > & columns, const ::com::sun::star::uno::Sequence< Any > & values) throw (::com::sun::star::uno::RuntimeException)
|
2010-04-23 17:41:32 +02:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
if(row >= 0 && row < (signed)m_aData.size())
|
2010-04-23 17:41:32 +02:00
|
|
|
{
|
2011-01-03 23:14:55 +01:00
|
|
|
if(columns.getLength() == values.getLength())
|
|
|
|
{
|
|
|
|
for(int i = 0; i < columns.getLength(); i++)
|
|
|
|
m_aData[row][i] = values[i];
|
|
|
|
Sequence< Any >dataSeq(comphelper::containerToSequence(m_aData[row]));
|
|
|
|
broadcast_changed( ROWUPDATED, row, Any(columns), Any(values) );
|
|
|
|
}
|
2010-04-23 17:41:32 +02:00
|
|
|
}
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::dispose() throw (RuntimeException)
|
|
|
|
{
|
|
|
|
::com::sun::star::lang::EventObject aEvent;
|
|
|
|
aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) );
|
|
|
|
BrdcstHelper.aLC.disposeAndClear( aEvent );
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
BrdcstHelper.addListener( XEventListener::static_type(), xListener );
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL DefaultGridDataModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
BrdcstHelper.removeListener( XEventListener::static_type(), xListener );
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
::rtl::OUString SAL_CALL DefaultGridDataModel::getImplementationName( ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridDataModel" ) );
|
|
|
|
return aImplName;
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
sal_Bool SAL_CALL DefaultGridDataModel::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
return ServiceName.equalsAscii( szServiceName_DefaultGridDataModel );
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getSupportedServiceNames( ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridDataModel ) );
|
|
|
|
static const Sequence< OUString > aSeq( &aServiceName, 1 );
|
|
|
|
return aSeq;
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
|
|
Reference< XCloneable > SAL_CALL DefaultGridDataModel::createClone( ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
return new DefaultGridDataModel( *this );
|
|
|
|
}
|
2009-08-26 13:11:27 +00:00
|
|
|
|
2011-01-03 23:14:55 +01:00
|
|
|
//......................................................................................................................
|
|
|
|
} // namespace toolkit
|
|
|
|
//......................................................................................................................
|
2009-08-26 13:11:27 +00:00
|
|
|
|
|
|
|
Reference< XInterface > SAL_CALL DefaultGridDataModel_CreateInstance( const Reference< XMultiServiceFactory >& )
|
|
|
|
{
|
2010-02-12 17:05:02 +01:00
|
|
|
return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridDataModel() );
|
2009-08-26 13:11:27 +00:00
|
|
|
}
|