From 27a1e85b656bad222f113f650b03397aa3bc59d3 Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Wed, 26 Aug 2009 13:11:27 +0000 Subject: CWS-TOOLING: integrate CWS gridcontrol_01 2009-08-13 07:53:28 +0200 tkr r274919 : #103210# remove mixed-line-endings 2009-08-13 07:36:19 +0200 tkr r274918 : #103210# remove mixed-line-endings 2009-08-06 14:02:11 +0200 tkr r274725 : #103210# build issues fixed 2009-08-06 12:11:52 +0200 tkr r274711 : #103210# build issues fixed 2009-08-06 12:03:32 +0200 tkr r274710 : #103210# add grid directory to d.lst 2009-08-05 17:00:11 +0200 misheto r274689 : CWS-TOOLING: rebase CWS gridcontrol_01 to trunk@274622 (milestone: DEV300:m54) 2009-08-05 14:31:42 +0200 tkr r274668 : #103210# remove add/removeMouseListener from XGridControl and use XWindow 2009-08-05 14:30:06 +0200 tkr r274667 : #103210# remove add/removeMouseListener from XGridControl and use XWindow 2009-08-05 14:29:09 +0200 tkr r274666 : #103210# remove add/removeMouseListener from XGridControl and use XWindow 2009-08-05 12:02:15 +0200 misheto r274649 : fox for HScroll problem 2009-08-05 11:37:22 +0200 misheto r274644 : CWS-TOOLING: rebase CWS gridcontrol_01 to trunk@274203 (milestone: DEV300:m53) 2009-08-03 10:12:50 +0200 tkr r274568 : #103210# Method getItemIndexPos() added 2009-07-31 18:25:42 +0200 misheto r274547 : fixed bug no cursor with NONE-selection, arrow keys cause selection disappear 2009-07-31 16:36:34 +0200 tkr r274541 : #103210# MouseListener added 2009-07-31 16:35:48 +0200 tkr r274540 : #103210# MouseListener added 2009-07-31 14:37:45 +0200 misheto r274533 : event handlers 2009-07-31 09:43:52 +0200 tkr r274513 : #103210# MouseListener added 2009-07-31 09:42:46 +0200 tkr r274512 : #103210# MouseListenerMultiplexer exported 2009-07-30 18:19:55 +0200 misheto r274501 : 2009-07-30 18:15:00 +0200 misheto r274500 : mouselistener changes 2009-07-30 15:23:03 +0200 tkr r274491 : #i103210# remove XItemListener and add XMouseListener 2009-07-30 15:22:01 +0200 tkr r274490 : #i103210# remove XItemListener and add XMouseListener 2009-07-28 16:47:37 +0200 misheto r274415 : fixed text left intented, removeAllScroll mode, selection mode, single selection 2009-07-28 16:45:32 +0200 misheto r274413 : 2009-07-28 14:56:33 +0200 tkr r274407 : #i103210# build issue fixed 2009-07-28 12:49:23 +0200 tkr r274397 : #i103210# use HScroll and VScroll for Scrolbarmode 2009-07-28 12:24:14 +0200 tkr r274396 : #i103210# use HScroll and VScroll for Scrolbarmode 2009-07-28 11:33:46 +0200 tkr r274393 : ##i103210# api changes 2009-07-28 11:32:48 +0200 tkr r274392 : ##i103210# add ItemListener 2009-07-28 11:31:49 +0200 tkr r274391 : ##i103210# add ItemListener 2009-07-28 08:30:30 +0200 tkr r274388 : #i103210# paint background color 2009-07-24 17:22:10 +0200 misheto r274314 : focus problem solved, single selection with keys UP DOWN 2009-07-22 11:43:24 +0200 misheto r274226 : removed vclxcontrol dependencies 2009-07-22 10:23:34 +0200 misheto r274220 : 2009-07-21 15:04:26 +0200 misheto r274200 : tablecontrol added items 2009-07-21 15:00:44 +0200 misheto r274198 : tablecontrol 2009-07-17 09:58:59 +0200 misheto r274082 : changes mihaela 2009-07-15 11:04:27 +0200 tkr r273999 : #i103210# api documentation added 2009-07-15 11:03:18 +0200 tkr r273998 : #i103210# adapt idl changes 2009-07-14 08:47:32 +0200 tkr r273959 : #i103210# Method removeRow added 2009-07-14 08:46:52 +0200 tkr r273958 : #i103210# Method removeRow added 2009-07-13 08:20:11 +0200 tkr r273914 : #i103210# XGridSelectionModel removed 2009-07-10 13:50:01 +0200 tkr r273888 : #i103210# selection support and listener added 2009-07-10 13:42:17 +0200 tkr r273887 : #i103210# selection support added 2009-07-06 10:21:51 +0200 tkr r273724 : #i103210# implement listener 2009-07-06 10:13:25 +0200 tkr r273723 : #i103210# remove wrong interfaces 2009-07-06 10:11:47 +0200 tkr r273722 : #i103210# interface changes 2009-07-02 15:28:50 +0200 tkr r273659 : #i103210# create new services 2009-07-02 15:26:21 +0200 tkr r273658 : #i103210# create new services 2009-07-02 12:00:39 +0200 tkr r273633 : #i103210# defaultgriddatamodel works now 2009-07-02 11:59:24 +0200 tkr r273631 : #i103210# now XGridDataModel inherits XComponent 2009-07-01 14:07:31 +0200 tkr r273579 : #i103210# initial implementation of the grid control data model 2009-07-01 13:14:21 +0200 tkr r273571 : #i103210# adding new service and some methods 2009-06-30 12:15:13 +0200 tkr r273500 : #i103210# change attribute names 2009-06-30 10:55:07 +0200 tkr r273496 : #i103210# create services and interfaces for the grid control 2009-06-30 10:47:26 +0200 tkr r273495 : #i103210# create services and interfaces for the grid control --- toolkit/inc/toolkit/helper/listenermultiplexer.hxx | 2 +- toolkit/inc/toolkit/helper/property.hxx | 8 +- toolkit/inc/toolkit/helper/servicenames.hxx | 6 + toolkit/prj/build.lst | 3 +- toolkit/source/controls/dialogcontrol.cxx | 4 + .../controls/grid/defaultgridcolumnmodel.cxx | 242 ++++++++++++++++ .../controls/grid/defaultgridcolumnmodel.hxx | 96 +++++++ .../source/controls/grid/defaultgriddatamodel.cxx | 310 +++++++++++++++++++++ .../source/controls/grid/defaultgriddatamodel.hxx | 99 +++++++ toolkit/source/controls/grid/gridcolumn.cxx | 166 +++++++++++ toolkit/source/controls/grid/gridcolumn.hxx | 85 ++++++ toolkit/source/controls/grid/gridcontrol.cxx | 273 ++++++++++++++++++ toolkit/source/controls/grid/gridcontrol.hxx | 124 +++++++++ toolkit/source/controls/grid/makefile.mk | 54 ++++ toolkit/source/helper/property.cxx | 9 +- toolkit/source/helper/registerservices.cxx | 17 ++ toolkit/source/helper/servicenames.cxx | 6 +- toolkit/util/makefile.mk | 1 + toolkit/util/toolkit.xml | 46 +++ 19 files changed, 1546 insertions(+), 5 deletions(-) create mode 100644 toolkit/source/controls/grid/defaultgridcolumnmodel.cxx create mode 100644 toolkit/source/controls/grid/defaultgridcolumnmodel.hxx create mode 100644 toolkit/source/controls/grid/defaultgriddatamodel.cxx create mode 100644 toolkit/source/controls/grid/defaultgriddatamodel.hxx create mode 100644 toolkit/source/controls/grid/gridcolumn.cxx create mode 100644 toolkit/source/controls/grid/gridcolumn.hxx create mode 100644 toolkit/source/controls/grid/gridcontrol.cxx create mode 100644 toolkit/source/controls/grid/gridcontrol.hxx create mode 100644 toolkit/source/controls/grid/makefile.mk (limited to 'toolkit') diff --git a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx index 24a16d5868dd..543c8a85c401 100644 --- a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx +++ b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx @@ -129,7 +129,7 @@ DECL_LISTENERMULTIPLEXER_END // ---------------------------------------------------- // class MouseListenerMultiplexer // ---------------------------------------------------- -DECL_LISTENERMULTIPLEXER_START( MouseListenerMultiplexer, ::com::sun::star::awt::XMouseListener ) +DECL_LISTENERMULTIPLEXER_START_DLLPUB( MouseListenerMultiplexer, ::com::sun::star::awt::XMouseListener ) void SAL_CALL mousePressed( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL mouseReleased( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL mouseEntered( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index f5e1b4ea3770..fbfe90494279 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -191,7 +191,13 @@ namespace rtl { #define BASEPROPERTY_IMAGE_SCALE_MODE 137 #define BASEPROPERTY_WRITING_MODE 138 #define BASEPROPERTY_CONTEXT_WRITING_MODE 139 -#define BASEPROPERTY_ENABLEVISIBLE 140 // sal_Bool +#define BASEPROPERTY_GRID_SHOWROWHEADER 140 +#define BASEPROPERTY_GRID_SHOWCOLUMNHEADER 141 +#define BASEPROPERTY_GRID_DATAMODEL 142 +#define BASEPROPERTY_GRID_COLUMNMODEL 143 +#define BASEPROPERTY_GRID_SELECTIONMODE 144 +#define BASEPROPERTY_ENABLEVISIBLE 145 // sal_Bool + // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen. #define BASEPROPERTY_FONTDESCRIPTORPART_START 1000 diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx index 31513f0f2358..89810ae69482 100644 --- a/toolkit/inc/toolkit/helper/servicenames.hxx +++ b/toolkit/inc/toolkit/helper/servicenames.hxx @@ -95,6 +95,12 @@ extern const sal_Char __FAR_DATA szServiceName_TreeControl[]; extern const sal_Char __FAR_DATA szServiceName_TreeControlModel[]; extern const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[]; +extern const sal_Char __FAR_DATA szServiceName_GridControl[]; +extern const sal_Char __FAR_DATA szServiceName_GridControlModel[]; +extern const sal_Char __FAR_DATA szServiceName_DefaultGridDataModel[]; +extern const sal_Char __FAR_DATA szServiceName_DefaultGridColumnModel[]; +extern const sal_Char __FAR_DATA szServiceName_GridColumn[]; + extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szServiceName_UnoSimpleAnimationControlModel[]; extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceName_UnoThrobberControlModel[]; extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[]; diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst index 7fa0efaded53..304d0e7c978f 100644 --- a/toolkit/prj/build.lst +++ b/toolkit/prj/build.lst @@ -7,6 +7,7 @@ ti toolkit\source\helper nmake - all ti_helper ti_inc NULL ti toolkit\source\awt nmake - all ti_awt ti_inc NULL ti toolkit\source\controls nmake - all ti_controls ti_inc NULL ti toolkit\source\controls\tree nmake - all ti_tree NULL +ti toolkit\source\controls\grid nmake - all ti_grid NULL ti toolkit\source\layout\core nmake - all ti_layout_core NULL ti toolkit\source\layout\vcl nmake - all ti_layout_vcl NULL -ti toolkit\util nmake - all ti_util ti_awt ti_controls ti_layout_core ti_helper ti_tree ti_layout_vcl NULL +ti toolkit\util nmake - all ti_util ti_awt ti_controls ti_layout_core ti_helper ti_tree ti_grid ti_layout_vcl NULL diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 47028cc8e071..07d459a6111a 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -66,6 +66,7 @@ #include #include "tree/treecontrol.hxx" +#include "grid/gridcontrol.hxx" #include #include @@ -453,6 +454,8 @@ Reference< XInterface > UnoControlDialogModel::createInstance( const ::rtl::OUSt pNewModel = new OGeometryControlModel< UnoControlRoadmapModel >; else if ( aServiceSpecifier.compareToAscii( szServiceName_TreeControlModel ) == 0 ) pNewModel = new OGeometryControlModel< UnoTreeModel >; + else if ( aServiceSpecifier.compareToAscii( szServiceName_GridControlModel ) == 0 ) + pNewModel = new OGeometryControlModel< UnoGridModel >; if ( !pNewModel ) { @@ -515,6 +518,7 @@ Sequence< ::rtl::OUString > UnoControlDialogModel::getAvailableServiceNames() th pNames[18] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel ); pNames[19] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlRoadmapModel ); pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_TreeControlModel ); + pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel ); } return *pNamesSeq; diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx new file mode 100644 index 000000000000..bdd7fb475afe --- /dev/null +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -0,0 +1,242 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: treedatamodel.cxx,v $ + * $Revision: 1.4 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_toolkit.hxx" +#include "defaultgridcolumnmodel.hxx" +#include +#include +#include + +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 COLUMNSELECTIONALLOWED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColumnSelectionAllowed" )) + +namespace toolkit +{ + +/////////////////////////////////////////////////////////////////////// +// class DefaultGridColumnModel +/////////////////////////////////////////////////////////////////////// + +DefaultGridColumnModel::DefaultGridColumnModel() +: columns(std::vector< Reference< XGridColumn > >()) +{ +} + +//--------------------------------------------------------------------- + +DefaultGridColumnModel::~DefaultGridColumnModel() +{ +} + +//--------------------------------------------------------------------- + +void DefaultGridColumnModel::broadcast( broadcast_type eType, const GridColumnEvent& aEvent ) +{ + ::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( XGridColumnListener::static_type() ); + if( pIter ) + { + ::cppu::OInterfaceIteratorHelper aListIter(*pIter); + while(aListIter.hasMoreElements()) + { + XGridColumnListener* pListener = static_cast(aListIter.next()); + switch( eType ) + { + case column_added: pListener->columnAdded(aEvent); break; + case column_removed: pListener->columnRemoved(aEvent); break; + case column_changed: pListener->columnChanged(aEvent); break; + } + } + } +} + +//--------------------------------------------------------------------- + +void DefaultGridColumnModel::broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue ) +{ + Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridColumnEvent aEvent( xSource, name, oldValue, newValue, 0, NULL ); + broadcast( column_changed, aEvent); +} + +//--------------------------------------------------------------------- + +void DefaultGridColumnModel::broadcast_add( sal_Int32 index, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn ) +{ + Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridColumnEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, rColumn ); + broadcast( column_added, aEvent); +} + +//--------------------------------------------------------------------- + +void DefaultGridColumnModel::broadcast_remove( sal_Int32 index, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn ) +{ + Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridColumnEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, rColumn ); + broadcast( column_changed, aEvent); +} + +//--------------------------------------------------------------------- +// XDefaultGridColumnModel +//--------------------------------------------------------------------- +::sal_Bool SAL_CALL DefaultGridColumnModel::getColumnSelectionAllowed() throw (::com::sun::star::uno::RuntimeException) +{ + return selectionAllowed; +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridColumnModel::setColumnSelectionAllowed(::sal_Bool value) throw (::com::sun::star::uno::RuntimeException) +{ + sal_Bool oldValue = selectionAllowed; + selectionAllowed = value; + broadcast_changed( COLUMNSELECTIONALLOWED, Any(oldValue) , Any(selectionAllowed)); +} + +//--------------------------------------------------------------------- + +::sal_Int32 SAL_CALL DefaultGridColumnModel::getColumnCount() throw (::com::sun::star::uno::RuntimeException) +{ + return columns.size(); +} + +//--------------------------------------------------------------------- + +::sal_Int32 SAL_CALL DefaultGridColumnModel::addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + + columns.push_back(column); + + sal_Int32 index = columns.size() - 1; + broadcast_add(index, column ); + return index; +} + +//--------------------------------------------------------------------- + +::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > SAL_CALL DefaultGridColumnModel::getColumns() throw (::com::sun::star::uno::RuntimeException) +{ + return comphelper::containerToSequence(columns); +} + +//--------------------------------------------------------------------- + +::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL DefaultGridColumnModel::getColumn(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) +{ + if ( index >=0 && index < ((sal_Int32)columns.size())) + return columns[index]; + else + return Reference< XGridColumn >(); +} + +void SAL_CALL DefaultGridColumnModel::addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException) +{ + BrdcstHelper.addListener( XGridColumnListener::static_type(), xListener ); +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridColumnModel::removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException) +{ + BrdcstHelper.removeListener( XGridColumnListener::static_type(), xListener ); +} + +//--------------------------------------------------------------------- +// XComponent +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridColumnModel::dispose() throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + + ::com::sun::star::lang::EventObject aEvent; + aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) ); + BrdcstHelper.aLC.disposeAndClear( aEvent ); + +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridColumnModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) +{ + BrdcstHelper.addListener( XEventListener::static_type(), xListener ); +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridColumnModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) +{ + BrdcstHelper.removeListener( XEventListener::static_type(), xListener ); +} + +//--------------------------------------------------------------------- +// XServiceInfo +//--------------------------------------------------------------------- + +::rtl::OUString SAL_CALL DefaultGridColumnModel::getImplementationName( ) throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridColumnModel" ) ); + return aImplName; +} + +//--------------------------------------------------------------------- + +sal_Bool SAL_CALL DefaultGridColumnModel::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + return ServiceName.equalsAscii( szServiceName_DefaultGridColumnModel ); +} + +//--------------------------------------------------------------------- + +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridColumnModel::getSupportedServiceNames( ) throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridColumnModel ) ); + static const Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +} + +Reference< XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const Reference< XMultiServiceFactory >& ) +{ + return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridColumnModel ); +} + diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx new file mode 100644 index 000000000000..b230188f9107 --- /dev/null +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: griddatamodel.hxx,v $ + * $Revision: 1.4 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_toolkit.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +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; + +namespace toolkit +{ + +enum broadcast_type { column_added, column_removed, column_changed}; + +class DefaultGridColumnModel : public ::cppu::WeakImplHelper2< XGridColumnModel, XServiceInfo >, + public MutexAndBroadcastHelper +{ +public: + DefaultGridColumnModel(); + virtual ~DefaultGridColumnModel(); + + // XGridColumnModel + + virtual ::sal_Bool SAL_CALL getColumnSelectionAllowed() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setColumnSelectionAllowed(::sal_Bool the_value) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > SAL_CALL getColumns() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL getColumn(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException); + virtual void SAL_CALL removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException); + + // XComponent + virtual void SAL_CALL dispose( ) throw (RuntimeException); + virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException); + virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (RuntimeException); + virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException); + +private: + + void broadcast( broadcast_type eType, const GridColumnEvent& aEvent ); + void broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue ); + void broadcast_add( sal_Int32 index,const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn ); + void broadcast_remove( sal_Int32 index, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn ); + + std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > columns; + sal_Bool selectionAllowed; +}; + +} diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx new file mode 100644 index 000000000000..865be80f55a7 --- /dev/null +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -0,0 +1,310 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: treedatamodel.cxx,v $ + * $Revision: 1.4 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_toolkit.hxx" +#include "defaultgriddatamodel.hxx" +#include +#include +#include + +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 ROWHEIGHT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeight" )) +#define ROWHEADERS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeaders" )) + +namespace toolkit +{ + +/////////////////////////////////////////////////////////////////////// +// class DefaultGridDataModel +/////////////////////////////////////////////////////////////////////// + +DefaultGridDataModel::DefaultGridDataModel() +: rowHeight(0), + rowHeaders(std::vector< ::rtl::OUString >()) +{ +} + +//--------------------------------------------------------------------- + +DefaultGridDataModel::~DefaultGridDataModel() +{ +} + +void DefaultGridDataModel::broadcast( broadcast_type eType, const GridDataEvent& aEvent ) +{ + ::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( XGridDataListener::static_type() ); + if( pIter ) + { + ::cppu::OInterfaceIteratorHelper aListIter(*pIter); + while(aListIter.hasMoreElements()) + { + XGridDataListener* pListener = static_cast(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; + } + } + } +} + +//--------------------------------------------------------------------- + +void DefaultGridDataModel::broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue ) +{ + Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridDataEvent aEvent( xSource, name, oldValue, newValue, 0, ::rtl::OUString(), Sequence< ::rtl::OUString>() ); + broadcast( data_changed, aEvent); +} + +//--------------------------------------------------------------------- + +void DefaultGridDataModel::broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rowData ) +{ + Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, rowData ); + broadcast( row_added, aEvent); +} + +//--------------------------------------------------------------------- + +void DefaultGridDataModel::broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rowData ) +{ + Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, rowData ); + broadcast( row_removed, aEvent); +} + +//--------------------------------------------------------------------- + +//--------------------------------------------------------------------- +// XDefaultGridDataModel +//--------------------------------------------------------------------- +::sal_Int32 SAL_CALL DefaultGridDataModel::getRowHeight() throw (::com::sun::star::uno::RuntimeException) +{ + return rowHeight; +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridDataModel::setRowHeight(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) +{ + sal_Int32 oldValue = rowHeight; + rowHeight = value; + + broadcast_changed( ROWHEIGHT, Any(oldValue), Any(value) ); +} + +//--------------------------------------------------------------------- + +::sal_Int32 SAL_CALL DefaultGridDataModel::getRowCount() throw (::com::sun::star::uno::RuntimeException) +{ + return data.size(); +} + +//--------------------------------------------------------------------- + +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getRowHeaders() throw (::com::sun::star::uno::RuntimeException) +{ + return comphelper::containerToSequence(rowHeaders); +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridDataModel::setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & value) throw (::com::sun::star::uno::RuntimeException) +{ + ::com::sun::star::uno::Sequence< ::rtl::OUString > oldValue( comphelper::containerToSequence(rowHeaders) ); + + std::vector< rtl::OUString>::iterator iterator; + int i = 0; + int sequenceSize = value.getLength(); + + for(iterator = rowHeaders.begin(); iterator != rowHeaders.end(); iterator++) + { + if ( sequenceSize > i ) + *iterator = value[i]; + else + *iterator = ::rtl::OUString(); + i++; + } + + broadcast_changed( ROWHEADERS, Any(oldValue), Any(comphelper::containerToSequence(rowHeaders)) ); +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridDataModel::addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rRowdata) throw (::com::sun::star::uno::RuntimeException) +{ + // store header name + rowHeaders.push_back(headername); + + + // store row data + std::vector< rtl::OUString > newRow( + comphelper::sequenceToContainer< std::vector >(rRowdata)); + + data.push_back( newRow ); + + broadcast_add( data.size()-1, headername, rRowdata); + +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridDataModel::removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) +{ + if ( index >= 0 && index <= getRowCount()-1) + { + /* if(Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->isSelectedIndex( index )) + { + ::com::sun::star::uno::Sequence<::sal_Int32> selectedRows = Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getSelection(); + selectedRow.erase(selectedRows.begin()+index); + }*/ + + ::rtl::OUString headerName( (::rtl::OUString) rowHeaders[index] ); + rowHeaders.erase(rowHeaders.begin() + index); + + Sequence< ::rtl::OUString >& rowData ( (Sequence< ::rtl::OUString >&)data[index] ); + data.erase(data.begin() + index); + broadcast_remove( index, headerName, rowData); + } + else + return; +} +//--------------------------------------------------------------------- +::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL DefaultGridDataModel::getData() throw (::com::sun::star::uno::RuntimeException) +{ + + std::vector< std::vector< ::rtl::OUString > >::iterator iterator; + std::vector< Sequence< ::rtl::OUString > > dummyContainer(0); + + + for(iterator = data.begin(); iterator != data.end(); iterator++) + { + Sequence< ::rtl::OUString > cols(comphelper::containerToSequence(*iterator)); + dummyContainer.push_back( cols ); + } + Sequence< Sequence< ::rtl::OUString > > dataSequence(comphelper::containerToSequence(dummyContainer)); + + return dataSequence; +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridDataModel::addDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) +{ + BrdcstHelper.addListener( XGridDataListener::static_type(), xListener ); +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridDataModel::removeDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) +{ + BrdcstHelper.removeListener( XGridDataListener::static_type(), xListener ); +} + +void SAL_CALL DefaultGridDataModel::removeAll() throw (RuntimeException) +{ + rowHeaders.clear(); + data.clear(); + broadcast_remove( -1, ::rtl::OUString(), 0); +} + +//--------------------------------------------------------------------- +// XComponent +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridDataModel::dispose() throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + + ::com::sun::star::lang::EventObject aEvent; + aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) ); + BrdcstHelper.aLC.disposeAndClear( aEvent ); + +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridDataModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) +{ + BrdcstHelper.addListener( XEventListener::static_type(), xListener ); +} + +//--------------------------------------------------------------------- + +void SAL_CALL DefaultGridDataModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) +{ + BrdcstHelper.removeListener( XEventListener::static_type(), xListener ); +} +//--------------------------------------------------------------------- +// XServiceInfo +//--------------------------------------------------------------------- + +::rtl::OUString SAL_CALL DefaultGridDataModel::getImplementationName( ) throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridDataModel" ) ); + return aImplName; +} + +//--------------------------------------------------------------------- + +sal_Bool SAL_CALL DefaultGridDataModel::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + return ServiceName.equalsAscii( szServiceName_DefaultGridDataModel ); +} + +//--------------------------------------------------------------------- + +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getSupportedServiceNames( ) throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridDataModel ) ); + static const Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +} + +Reference< XInterface > SAL_CALL DefaultGridDataModel_CreateInstance( const Reference< XMultiServiceFactory >& ) +{ + return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridDataModel ); +} + diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx new file mode 100644 index 000000000000..18000c9f5a71 --- /dev/null +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: griddatamodel.hxx,v $ + * $Revision: 1.4 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_toolkit.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +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; + +namespace toolkit +{ + +enum broadcast_type { row_added, row_removed, data_changed}; + +class DefaultGridDataModel : public ::cppu::WeakImplHelper2< XGridDataModel, XServiceInfo >, + public MutexAndBroadcastHelper +{ +public: + DefaultGridDataModel(); + virtual ~DefaultGridDataModel(); + + // XGridDataModel + virtual ::sal_Int32 SAL_CALL getRowHeight() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRowHeight(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getRowCount() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowHeaders() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & value) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< ::rtl::OUString > & data) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); + virtual void SAL_CALL removeDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); + virtual void SAL_CALL removeAll() throw (RuntimeException); + + // XComponent + virtual void SAL_CALL dispose( ) throw (RuntimeException); + virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException); + virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (RuntimeException); + virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException); + +private: + + void broadcast( broadcast_type eType, const GridDataEvent& aEvent ); + void broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue ); + void broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rowData ); + void broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rowData ); + + sal_Int32 rowHeight; + std::vector< std::vector < ::rtl::OUString > > data; + std::vector< ::rtl::OUString > rowHeaders; +}; + +} diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx new file mode 100644 index 000000000000..8b398b4aed58 --- /dev/null +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -0,0 +1,166 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: treedatamodel.cxx,v $ + * $Revision: 1.4 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_toolkit.hxx" +#include "gridcolumn.hxx" +#include +#include +#include + +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; + +namespace toolkit +{ + +/////////////////////////////////////////////////////////////////////// +// class GridColumn +/////////////////////////////////////////////////////////////////////// + +GridColumn::GridColumn() +: identifier(Any()) +{ +} + +//--------------------------------------------------------------------- + +GridColumn::~GridColumn() +{ +} + +//--------------------------------------------------------------------- + +//--------------------------------------------------------------------- +// XGridColumn +//--------------------------------------------------------------------- + +::com::sun::star::uno::Any SAL_CALL GridColumn::getIdentifier() throw (::com::sun::star::uno::RuntimeException) +{ + return identifier; +} + +//--------------------------------------------------------------------- + +void SAL_CALL GridColumn::setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException) +{ + value >>= identifier; +} + +//-------------------------------------------------------------------- + +::sal_Int32 SAL_CALL GridColumn::getColumnWidth() throw (::com::sun::star::uno::RuntimeException) +{ + return columnWidth; +} + +//-------------------------------------------------------------------- + +void SAL_CALL GridColumn::setColumnWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) +{ + columnWidth = value; +} + +//-------------------------------------------------------------------- + +::rtl::OUString SAL_CALL GridColumn::getTitle() throw (::com::sun::star::uno::RuntimeException) +{ + return title; +} + +//-------------------------------------------------------------------- + +void SAL_CALL GridColumn::setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException) +{ + title = value; +} + +//--------------------------------------------------------------------- +// XComponent +//--------------------------------------------------------------------- + +void SAL_CALL GridColumn::dispose() throw (RuntimeException) +{ +} + +//--------------------------------------------------------------------- + +void SAL_CALL GridColumn::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) +{ + (void) xListener; +} + +//--------------------------------------------------------------------- + +void SAL_CALL GridColumn::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) +{ + (void) xListener; +} + +//--------------------------------------------------------------------- +// XServiceInfo +//--------------------------------------------------------------------- + +::rtl::OUString SAL_CALL GridColumn::getImplementationName( ) throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.GridColumn" ) ); + return aImplName; +} + +//--------------------------------------------------------------------- + +sal_Bool SAL_CALL GridColumn::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + return ServiceName.equalsAscii( szServiceName_GridColumn ); +} + +//--------------------------------------------------------------------- + +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL GridColumn::getSupportedServiceNames( ) throw (RuntimeException) +{ + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + static const OUString aServiceName( OUString::createFromAscii( szServiceName_GridColumn ) ); + static const Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +} + +Reference< XInterface > SAL_CALL GridColumn_CreateInstance( const Reference< XMultiServiceFactory >& ) +{ + return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::GridColumn ); +} + diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx new file mode 100644 index 000000000000..a451054ce93f --- /dev/null +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -0,0 +1,85 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: griddatamodel.hxx,v $ + * $Revision: 1.4 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_toolkit.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +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; + +namespace toolkit +{ + +class GridColumn : public ::cppu::WeakImplHelper2< XGridColumn, XServiceInfo >, + public MutexAndBroadcastHelper +{ +public: + GridColumn(); + virtual ~GridColumn(); + + // XGridColumn + virtual ::com::sun::star::uno::Any SAL_CALL getIdentifier() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getColumnWidth() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setColumnWidth(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose( ) throw (RuntimeException); + virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException); + virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (RuntimeException); + virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException); + + +private: + Any identifier; + sal_Int32 columnWidth; + ::rtl::OUString title; +}; + +} diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx new file mode 100644 index 000000000000..c642d8a0dcce --- /dev/null +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -0,0 +1,273 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: gridcontrol.cxx,v $ + * $Revision: 1.4 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_toolkit.hxx" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using ::rtl::OUString; +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::awt::grid; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::container; +using namespace ::com::sun::star::view; + +namespace toolkit +{ +// ---------------------------------------------------- +// class UnoGridModel +// ---------------------------------------------------- +UnoGridModel::UnoGridModel() +{ + ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); + ImplRegisterProperty( BASEPROPERTY_BORDER ); + ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR ); + ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); + ImplRegisterProperty( BASEPROPERTY_ENABLED ); + ImplRegisterProperty( BASEPROPERTY_FILLCOLOR ); + ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); + ImplRegisterProperty( BASEPROPERTY_HELPURL ); + ImplRegisterProperty( BASEPROPERTY_PRINTABLE ); + ImplRegisterProperty( BASEPROPERTY_SIZEABLE ); // resizeable + ImplRegisterProperty( BASEPROPERTY_HSCROLL ); + ImplRegisterProperty( BASEPROPERTY_VSCROLL ); + ImplRegisterProperty( BASEPROPERTY_GRID_SHOWROWHEADER ); + ImplRegisterProperty( BASEPROPERTY_GRID_SHOWCOLUMNHEADER ); + ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL ); + ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL ); + ImplRegisterProperty( BASEPROPERTY_GRID_SELECTIONMODE ); + +} + +UnoGridModel::UnoGridModel( const UnoGridModel& rModel ) +: UnoControlModel( rModel ) +{ +} + +UnoControlModel* UnoGridModel::Clone() const +{ + return new UnoGridModel( *this ); +} + +OUString UnoGridModel::getServiceName() throw(RuntimeException) +{ + return OUString::createFromAscii( szServiceName_GridControlModel ); +} + +Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const +{ + switch( nPropId ) + { + case BASEPROPERTY_DEFAULTCONTROL: + return uno::makeAny( ::rtl::OUString::createFromAscii( szServiceName_GridControl ) ); + case BASEPROPERTY_GRID_SELECTIONMODE: + return uno::makeAny( SelectionType(1) ); + default: + return UnoControlModel::ImplGetDefaultValue( nPropId ); + } + +} + +::cppu::IPropertyArrayHelper& UnoGridModel::getInfoHelper() +{ + static UnoPropertyArrayHelper* pHelper = NULL; + if ( !pHelper ) + { + Sequence aIDs = ImplGetPropertyIds(); + pHelper = new UnoPropertyArrayHelper( aIDs ); + } + return *pHelper; +} + +// XMultiPropertySet +Reference< XPropertySetInfo > UnoGridModel::getPropertySetInfo( ) throw(RuntimeException) +{ + static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); + return xInfo; +} + + +// ---------------------------------------------------- +// class UnoGridControl +// ---------------------------------------------------- +UnoGridControl::UnoGridControl() +: mSelectionMode(SelectionType(1)) +{ +} + +OUString UnoGridControl::GetComponentServiceName() +{ + return OUString::createFromAscii( "Grid" ); +} + +void SAL_CALL UnoGridControl::dispose( ) throw(RuntimeException) +{ + UnoControl::dispose(); +} + +void UnoGridControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException) +{ + UnoControlBase::createPeer( rxToolkit, rParentPeer ); + + Reference< XGridControl > xGrid( getPeer(), UNO_QUERY_THROW ); + + Reference xListener ( getPeer(), UNO_QUERY_THROW ); + Reference xPropSet ( getModel(), UNO_QUERY_THROW ); + + Reference xGridDataModel ( xPropSet->getPropertyValue(OUString::createFromAscii( "GridDataModel" )), UNO_QUERY_THROW ); + xGridDataModel->addDataListener(xListener); +} + + +// ------------------------------------------------------------------- +// XGridControl +// ------------------------------------------------------------------- + +::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > SAL_CALL UnoGridControl::getColumnModel() throw (::com::sun::star::uno::RuntimeException) +{ + Reference xPropSet ( getModel(), UNO_QUERY_THROW ); + Reference xGridColumnModel ( xPropSet->getPropertyValue(OUString::createFromAscii( "ColumnModel" )), UNO_QUERY_THROW ); + + return xGridColumnModel; +} + +void SAL_CALL UnoGridControl::setColumnModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > & model) throw (::com::sun::star::uno::RuntimeException) +{ + Reference xPropSet ( getModel(), UNO_QUERY_THROW ); + xPropSet->setPropertyValue(OUString::createFromAscii( "ColumnModel" ), Any (model)); +} + +::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > SAL_CALL UnoGridControl::getDataModel() throw (::com::sun::star::uno::RuntimeException) +{ + Reference xPropSet ( getModel(), UNO_QUERY_THROW ); + Reference xGridDataModel ( xPropSet->getPropertyValue(OUString::createFromAscii( "GridDataModel" )), UNO_QUERY_THROW ); + + return xGridDataModel; +} + +void SAL_CALL UnoGridControl::setDataModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > & model) throw (::com::sun::star::uno::RuntimeException) +{ + Reference xPropSet ( getModel(), UNO_QUERY_THROW ); + xPropSet->setPropertyValue(OUString::createFromAscii( "GridDataModel" ), Any(model)); +} + +::sal_Int32 UnoGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) +{ + return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getItemIndexAtPoint( x, y ); +} + +/* +void SAL_CALL UnoGridControl::addMouseListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener > & listener) throw (::com::sun::star::uno::RuntimeException) +{ + Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->addMouseListener( listener ); +} + +void SAL_CALL UnoGridControl::removeMouseListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener > & listener) throw (::com::sun::star::uno::RuntimeException) +{ + Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->removeMouseListener( listener ); +} +*/ +// ------------------------------------------------------------------- +// XGridSelection +// ------------------------------------------------------------------- + +::sal_Int32 SAL_CALL UnoGridControl::getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException) +{ + return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getMinSelectionIndex(); +} + +::sal_Int32 SAL_CALL UnoGridControl::getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException) +{ + return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getMaxSelectionIndex(); +} + +void SAL_CALL UnoGridControl::insertIndexIntervall(::sal_Int32 start, ::sal_Int32 length) throw (::com::sun::star::uno::RuntimeException) +{ + Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->insertIndexIntervall( start, length); +} + +void SAL_CALL UnoGridControl::removeIndexIntervall(::sal_Int32 start, ::sal_Int32 length) throw (::com::sun::star::uno::RuntimeException) +{ + Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->removeIndexIntervall( start, length ); +} + +::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL UnoGridControl::getSelection() throw (::com::sun::star::uno::RuntimeException) +{ + return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getSelection(); +} + +::sal_Bool SAL_CALL UnoGridControl::isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException) +{ + return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->isSelectionEmpty(); +} + +::sal_Bool SAL_CALL UnoGridControl::isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) +{ + return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->isSelectedIndex( index ); +} + +void SAL_CALL UnoGridControl::selectRow(::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) +{ + Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectRow( y ); +} + +void SAL_CALL UnoGridControl::addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException) +{ + Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->addSelectionListener( listener ); +} + +void SAL_CALL UnoGridControl::removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException) +{ + Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->removeSelectionListener( listener ); +} +} + +Reference< XInterface > SAL_CALL GridControl_CreateInstance( const Reference< XMultiServiceFactory >& ) +{ + return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridControl ); +} + +Reference< XInterface > SAL_CALL GridControlModel_CreateInstance( const Reference< XMultiServiceFactory >& ) +{ + return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridModel ); +} diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx new file mode 100644 index 000000000000..5648c812fbff --- /dev/null +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: gridcontrol.hxx,v $ + * $Revision: 1.3 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef TOOLKIT_GRID_CONTROL_HXX +#define TOOLKIT_GRID_CONTROL_HXX + +#include +#include +#include +#include +#include +#include + +#include + +namespace toolkit { + +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::awt; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::container; + +// =================================================================== +// = UnoGridModel +// =================================================================== +class UnoGridModel : public UnoControlModel +{ +protected: + Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + +public: + UnoGridModel(); + UnoGridModel( const UnoGridModel& rModel ); + + UnoControlModel* Clone() const; + + // ::com::sun::star::beans::XMultiPropertySet + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::io::XPersistObject + ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + DECLIMPL_SERVICEINFO_DERIVED( UnoGridModel, UnoControlModel, szServiceName_GridControlModel ) +}; + + +// =================================================================== +// = UnoGridControl +// =================================================================== +class UnoGridControl : public ::cppu::ImplInheritanceHelper1< UnoControlBase, ::com::sun::star::awt::grid::XGridControl > +{ +public: + UnoGridControl(); + ::rtl::OUString GetComponentServiceName(); + + // ::com::sun::star::lang::XComponent + void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XControl + void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::grid::XGridControl + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > SAL_CALL getColumnModel() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setColumnModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > & model) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > SAL_CALL getDataModel() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDataModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > & model) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); + //virtual void SAL_CALL addMouseListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener > & listener) throw (::com::sun::star::uno::RuntimeException); + //virtual void SAL_CALL removeMouseListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener > & listener) throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::grid::XGridSelection + + virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertIndexIntervall(::sal_Int32 start, ::sal_Int32 length) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeIndexIntervall(::sal_Int32 start, ::sal_Int32 length) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL getSelection() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL selectRow(::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XServiceInfo + DECLIMPL_SERVICEINFO_DERIVED( UnoGridControl, UnoControlBase, szServiceName_GridControl ) + + using UnoControl::getPeer; +private: + ::com::sun::star::view::SelectionType mSelectionMode; +}; + +} // toolkit + +#endif // _TOOLKIT_TREE_CONTROL_HXX diff --git a/toolkit/source/controls/grid/makefile.mk b/toolkit/source/controls/grid/makefile.mk new file mode 100644 index 000000000000..7c904b3ef02e --- /dev/null +++ b/toolkit/source/controls/grid/makefile.mk @@ -0,0 +1,54 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.3 $ +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=toolkit +TARGET=grid + +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# --- Files -------------------------------------------------------- + +SLOFILES= \ + $(SLO)$/gridcontrol.obj\ + $(SLO)$/defaultgriddatamodel.obj\ + $(SLO)$/defaultgridcolumnmodel.obj\ + $(SLO)$/gridcolumn.obj + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index 0560afbd835f..e71c03bae47d 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -48,6 +48,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -252,7 +255,6 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "ValueStep", VALUESTEP_DOUBLE, double, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "VerticalAlign", VERTICALALIGN, VerticalAlignment, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_DEP_PROP_3 ( "VisibleSize", VISIBLESIZE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), - DECL_PROP_2 ( "Activated", ACTIVATED, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "Complete", COMPLETE, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "CurrentItemID", CURRENTITEMID, sal_Int16, BOUND, MAYBEDEFAULT ), @@ -273,6 +275,11 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "URL", URL, ::rtl::OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "WritingMode", WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "ContextWritingMode", CONTEXT_WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT ), + DECL_PROP_2 ( "ShowRowHeader", GRID_SHOWROWHEADER, sal_Bool, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "ShowColumnHeader", GRID_SHOWCOLUMNHEADER, sal_Bool, BOUND, MAYBEDEFAULT ), + DECL_PROP_3 ( "GridDataModel", GRID_DATAMODEL, Reference< ::com::sun::star::awt::grid::XGridDataModel >, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_3 ( "ColumnModel", GRID_COLUMNMODEL, Reference< ::com::sun::star::awt::grid::XGridColumnModel >, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_3 ( "SelectionModel", GRID_SELECTIONMODE, ::com::sun::star::view::SelectionType, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "EnableVisible", ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT ) }; pPropertyInfos = aImplPropertyInfos; diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index d9264f22cb51..ea29c9810beb 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -202,6 +202,12 @@ IMPL_CREATEINSTANCE( UnoThrobberControlModel ) extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControl_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControlModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL MutableTreeDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); +extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridControl_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); +extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridControlModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); +extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); +extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); +extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); + extern sal_Bool SAL_CALL comp_AsyncCallback_component_writeInfo( void * serviceManager, void * registryKey ); extern void * SAL_CALL comp_AsyncCallback_component_getFactory( const char * implName, void * serviceManager, void * registryKey ); @@ -287,6 +293,11 @@ TOOLKIT_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( void* _pServiceManager, registerServices( xRegistryKey, "UnoThrobberControl", szServiceName_UnoThrobberControl ); registerServices( xRegistryKey, "UnoFixedHyperlinkControl", szServiceName_UnoControlFixedHyperlink ); registerServices( xRegistryKey, "UnoControlFixedHyperlinkModel", szServiceName_UnoControlFixedHyperlinkModel ); + registerServices( xRegistryKey, "GridControl", szServiceName_GridControl ); + registerServices( xRegistryKey, "GridControlModel", szServiceName_GridControlModel ); + registerServices( xRegistryKey, "DefaultGridDataModel", szServiceName_DefaultGridDataModel ); + registerServices( xRegistryKey, "DefaultGridColumnModel", szServiceName_DefaultGridColumnModel ); + registerServices( xRegistryKey, "GridColumn", szServiceName_GridColumn ); comp_AsyncCallback_component_writeInfo( _pServiceManager, _pRegistryKey ); comp_Layout_component_writeInfo( _pServiceManager, _pRegistryKey ); @@ -369,6 +380,12 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen CHECKANDCREATEFACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, NULL ) CHECKANDCREATEFACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL ) CHECKANDCREATEFACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL ) + CHECKANDCREATEFACTORY( GridControl, szServiceName_GridControl, NULL ); + CHECKANDCREATEFACTORY( GridControlModel, szServiceName_GridControlModel, NULL ); + CHECKANDCREATEFACTORY( DefaultGridDataModel, szServiceName_DefaultGridDataModel, NULL ); + CHECKANDCREATEFACTORY( DefaultGridColumnModel, szServiceName_DefaultGridColumnModel, NULL ); + CHECKANDCREATEFACTORY( GridColumn, szServiceName_GridColumn, NULL ); + if ( rtl_str_compare( sImplementationName, "com.sun.star.awt.comp.AsyncCallback" ) == 0 ) return comp_AsyncCallback_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey ); diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx index 903f18f95eae..f00e7a2b09fa 100644 --- a/toolkit/source/helper/servicenames.cxx +++ b/toolkit/source/helper/servicenames.cxx @@ -101,4 +101,8 @@ const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[] = "com.sun.sta const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl"; const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[] = "com.sun.star.awt.UnoControlFixedHyperlink"; const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlinkModel[] = "com.sun.star.awt.UnoControlFixedHyperlinkModel"; - +const sal_Char __FAR_DATA szServiceName_GridControl[] = "com.sun.star.awt.grid.UnoControlGrid"; +const sal_Char __FAR_DATA szServiceName_GridControlModel[] = "com.sun.star.awt.grid.UnoControlGridModel"; +const sal_Char __FAR_DATA szServiceName_DefaultGridDataModel[] = "com.sun.star.awt.grid.DefaultGridDataModel"; +const sal_Char __FAR_DATA szServiceName_DefaultGridColumnModel[] = "com.sun.star.awt.grid.DefaultGridColumnModel"; +const sal_Char __FAR_DATA szServiceName_GridColumn[] = "com.sun.star.awt.grid.GridColumn"; diff --git a/toolkit/util/makefile.mk b/toolkit/util/makefile.mk index d6a1e5f15c65..a04bdcbdf801 100644 --- a/toolkit/util/makefile.mk +++ b/toolkit/util/makefile.mk @@ -52,6 +52,7 @@ USE_DEFFILE=TRUE LIB1TARGET= $(SLB)$/$(TARGET).lib LIB1FILES= $(SLB)$/awt.lib \ $(SLB)$/tree.lib \ + $(SLB)$/grid.lib \ $(SLB)$/controls.lib \ $(SLB)$/helper.lib\ $(SLB)$/layout-core.lib \ diff --git a/toolkit/util/toolkit.xml b/toolkit/util/toolkit.xml index 8ec1a48d440d..2fb4588550bc 100644 --- a/toolkit/util/toolkit.xml +++ b/toolkit/util/toolkit.xml @@ -701,4 +701,50 @@ com.sun.star.awt.tree.MutableTreeNode + + Tobias Krause + stardiv.Toolkit.UnoGridModel + specifies the model of a grid control + com.sun.star.loader.SharedLibrary + c++ + + com.sun.star.awt.grid.UnoControlGridModel + + + Tobias Krause + stardiv.Toolkit.UnoGridControl + specifies a grid control + com.sun.star.loader.SharedLibrary + c++ + + com.sun.star.awt.grid.UnoControlGrid + + + Tobias Krause + stardiv.Toolkit.DefaultGridDataModel + specifies the grid control default data model + com.sun.star.loader.SharedLibrary + c++ + + com.sun.star.awt.grid.DefaultGridDataModel + + + Tobias Krause + stardiv.Toolkit.DefaultGridColumnModel + specifies the grid control default column model + com.sun.star.loader.SharedLibrary + c++ + + com.sun.star.awt.grid.DefaultGridColumnModel + + + Tobias Krause + stardiv.Toolkit.GridColumn + specifies the grid coloumn model + com.sun.star.loader.SharedLibrary + c++ + + com.sun.star.awt.grid.GridColumn + + \ No newline at end of file -- cgit From 0f5a6721731d28f0b5a7a3b3e5e274ec99e20e27 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Wed, 26 Aug 2009 13:37:34 +0000 Subject: CWS-TOOLING: integrate CWS swa11y32_2nd 2009-08-13 13:04:09 +0200 mav r274936 : #i104204# remove support for Ctrl-Tab 2009-08-13 09:59:22 +0200 od r274924 : #i93269# method - emit also object:state-changed:focus, if cursor is inside object 2009-08-11 12:15:11 +0200 tl r274851 : CWS-TOOLING: rebase CWS swa11y32_2nd to trunk@274622 (milestone: DEV300:m54) 2009-07-14 17:35:03 +0200 tl r273982 : 2009-07-10 10:46:39 +0200 tl r273879 : CWS-TOOLING: rebase CWS swa11y32 to trunk@273468 (milestone: DEV300:m51) 2009-07-01 14:00:25 +0200 mav r273577 : #i102879# the text of the button should not change 2009-07-01 13:16:19 +0200 od r273574 : #159496# method - do not release the solar mutex 2009-06-29 15:29:10 +0200 od r273476 : #i95042# method - return instance for instance of type . note: is inherited from 2009-06-23 15:49:32 +0200 mav r273283 : #i101967# fix tab-control implementation 2009-06-22 13:56:22 +0200 od r273229 : #i100938# method - always provide start_offset and end_offset - do _not_ increment the end_offset provide by instance 2009-06-02 12:09:03 +0200 mav r272492 : #i101959# Let the additional dialog window add its childred to the parents tab-hierarchy 2009-06-02 09:55:39 +0200 mav r272484 : #i102015# allow to have indirect child windows in tab-hierarchy 2009-06-02 09:49:42 +0200 mav r272482 : #i102015# Let the windows containing the extension dialog controls add controls to the tab hierarchy 2009-05-27 15:45:33 +0200 od r272354 : #i101012# method - emit vcl event LISTBOX_SELECT only in case that the given entry is selected. 2009-05-27 09:54:36 +0200 od r272333 : #i92103# map UNO-API accessible events list box entry expanded/collapsed to corresponding atk events. 2009-05-27 09:52:15 +0200 od r272331 : #i92103# process list box entry expanded/collapsed events 2009-05-27 09:49:19 +0200 od r272330 : #i92103# emit vcl event list box entry expanded/collapsed 2009-05-26 10:42:05 +0200 od r272283 : #i93269# correct fix: check success of call 2009-05-04 15:52:04 +0200 od r271469 : #i92103# new vcl event ids VCLEVENT_LISTBOX_ENTRY_EXPANDED and VCLEVENT_LISTBOX_ENTRY_COLLAPSED 2009-05-04 15:10:20 +0200 od r271460 : #i92103# refine definition of new constants 2009-05-04 14:36:44 +0200 od r271454 : #i92103# new constants for indicating that a list box entry is expanded respectively collapsed. 2009-04-30 16:09:40 +0200 od r271421 : #i93269# method - emit text_caret_moved event for object, if cursor is inside the object. 2009-04-22 14:00:10 +0200 tl r271105 : warning-free code 2009-04-22 09:17:30 +0200 tl r271073 : CWS-TOOLING: rebase CWS swa11y32 to trunk@270723 (milestone: DEV300:m46) 2009-04-20 12:53:03 +0200 cd r270974 : #i83639# Check extendedhelp state to provide correct tool tip text 2009-04-03 13:07:13 +0200 tl r270471 : #i63983# changed accessible object names to empty strings 2009-04-01 15:52:09 +0200 tl r270336 : #i90991# accessible names and description for paragraphs should be empty 2009-04-01 15:12:42 +0200 tl r270333 : #i90991# accessible names and description for paragraphs should be empty 2009-04-01 15:10:34 +0200 tl r270331 : warning-free code 2009-04-01 12:54:44 +0200 tl r270319 : #i89176# Implementation of XAccessibleMultiLineText in EditEngine 2009-04-01 12:52:56 +0200 tl r270318 : #i89176# Implementation of XAccessibleMultiLineText in EditEngine 2009-03-27 18:31:01 +0100 tbe r270166 : #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells 2009-03-13 13:43:54 +0100 tl r269476 : #i94322# ImpEditView::ShowCursor and nPara == USHRT_MAX problem fixed 2009-03-12 10:27:30 +0100 tl r269366 : warning-free code; unresolved external dbg_out when compiling with debug=t 2009-03-11 12:40:31 +0100 tl r269312 : warning-free code Solaris x86 2009-03-10 15:49:01 +0100 tl r269279 : #i86443# handle GetColumnCount() == 0 2009-03-10 10:48:32 +0100 cl r269254 : #i91742# name cells for accessibility 2009-03-09 17:06:33 +0100 cl r269203 : #i91742# call init on accessible cells --- toolkit/source/helper/unowrapper.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'toolkit') diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index a652d493e653..96b8908558a7 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -65,6 +65,13 @@ using namespace ::com::sun::star; case WINDOW_OKBUTTON: case WINDOW_CANCELBUTTON: return new VCLXButton; case WINDOW_CHECKBOX: return new VCLXCheckBox; + // --> OD 2009-06-29 #i95042# + // A Window of type is inherited from type . + // Thus, it does make more sense to return a instance + // instead of only a instance, especially regarding its + // corresponding accessibility API. + case WINDOW_METRICBOX: + // <-- case WINDOW_COMBOBOX: return new VCLXComboBox; case WINDOW_SPINFIELD: case WINDOW_NUMERICFIELD: @@ -109,7 +116,6 @@ using namespace ::com::sun::star; // case WINDOW_DATEBOX: // case WINDOW_GROUPBOX: // case WINDOW_LONGCURRENCYBOX: - // case WINDOW_METRICBOX: // case WINDOW_SPLITTER: // case WINDOW_STATUSBAR: // case WINDOW_TABCONTROL: -- cgit From f4967ff057d7b1534fd0bc71fb8cbb4c6f4f5f0f Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Tue, 8 Sep 2009 08:54:47 +0000 Subject: CWS-TOOLING: integrate CWS dba32f 2009-08-31 10:43:51 +0200 msc r275590 : #no issuezilla available# make the testcase more error proof 2009-08-31 10:43:28 +0200 msc r275589 : #no issuezilla available# make the testcase more error proof 2009-08-31 10:40:33 +0200 msc r275588 : i85993 remove bugid 2009-08-31 10:38:28 +0200 msc r275587 : i100000 2009-08-27 13:27:32 +0200 fs r275476 : #i103882# 2009-08-27 12:47:54 +0200 fs r275474 : #i104544# do not allow re-entrance for impl_ensureControl_nothrow Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from the grid control implementation), but to ensure it won't happen, again, I added some safety herein. 2009-08-27 12:47:16 +0200 fs r275473 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble 2009-08-27 10:18:05 +0200 mav r275461 : #i103266# do not allow any stream operation on package streams while commiting the package 2009-08-20 15:25:48 +0200 fs r275184 : #i104362# fall back to a ViewObjectContactOfSdrObj in case we don't have a page view 2009-08-20 15:25:06 +0200 fs r275183 : AUGMENT_LIBRARY_PATH 2009-08-20 15:10:34 +0200 fs r275182 : AUGMENT_LIBRARY_PATH 2009-08-20 09:50:36 +0200 oj r275167 : #i104266# notify propertyforward when new dest was created 2009-08-19 08:01:28 +0200 mav r275133 : #i103266# fix the typo 2009-08-18 22:45:34 +0200 fs r275131 : #i10000# 2009-08-18 13:53:07 +0200 oj r275105 : #i104266# set column settings after alter columns 2009-08-18 13:41:49 +0200 fs r275103 : #i102550# do not interpret names of existing data sources as system path 2009-08-18 13:13:05 +0200 oj r275097 : #i103882# use correct number Format 2009-08-18 12:59:13 +0200 fs r275094 : #i104181# 2009-08-18 09:07:48 +0200 fs r275079 : updated readme to refer to proper 1.1.14 2009-08-18 08:32:31 +0200 oj r275077 : #i104187# wrong default for FirstCellAsLabel corrected 2009-08-18 08:10:00 +0200 oj r275076 : #i104187# dispose status controller to avoid access of dead statusBar in sfx 2009-08-17 21:56:19 +0200 fs r275074 : merge fix for issue #102564# from dba32e 2009-08-17 15:34:40 +0200 fs r275058 : don't set MaxFieldSize to 0 unconditionally 2009-08-17 14:33:57 +0200 oj r275054 : #i103528# patch for bitxtor 2009-08-17 14:12:26 +0200 oj r275051 : #i104160# fix VerticalAlignment 2009-08-17 14:11:47 +0200 oj r275050 : #i104160# fix VerticalAlignment 2009-08-14 15:54:04 +0200 mav r274989 : #i103266# avoid possibility for race condition 2009-08-13 13:52:43 +0200 fs r274939 : improved diagnostics 2009-08-13 13:52:28 +0200 fs r274938 : typo 2009-08-13 12:51:03 +0200 fs r274934 : #i103763# provided by cloph: correct libIDL check when compiling Mozilla 2009-08-13 12:43:23 +0200 fs r274933 : #i103763# provided by cloph: allow to cross-compile prebuilt zips on Mac 2009-08-13 12:41:15 +0200 fs r274932 : #i103371# fire PREPARECLOSEDOC even for embedded objects (why not?) 2009-08-13 12:24:49 +0200 fs r274930 : #i99890# remove 'Insert Control' from the popup menu 2009-08-13 12:23:38 +0200 fs r274929 : #i99890# DoToolboxAction: assert unknown/unimplemented actions 2009-08-13 09:32:07 +0200 fs r274923 : #i103721# 2009-08-13 09:26:32 +0200 fs r274922 : #i99894# provided by dtardon: xforms_nowFunction: use proper memory allocation function 2009-08-13 09:20:21 +0200 fs r274921 : #i103938# provided by cmc: pass proper arguments to OUString::intern 2009-08-12 22:34:28 +0200 fs r274916 : #i104139# when executing a PopupMenu, pass the POPUPMENU_NOMOUSEUPCLOSE flag --- toolkit/source/awt/vclxmenu.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolkit') diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index c8e5e1bd3853..5200849d66ed 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -578,7 +578,7 @@ sal_Int16 VCLXMenu::execute( const ::com::sun::star::uno::Reference< ::com::sun: sal_Int16 nRet = 0; if ( mpMenu && IsPopupMenu() ) - nRet = ((PopupMenu*)mpMenu)->Execute( VCLUnoHelper::GetWindow( rxWindowPeer ), VCLRectangle(rArea), nFlags ); + nRet = ((PopupMenu*)mpMenu)->Execute( VCLUnoHelper::GetWindow( rxWindowPeer ), VCLRectangle(rArea), nFlags | POPUPMENU_NOMOUSEUPCLOSE ); return nRet; } -- cgit From 7a937d5265517dc6711e16ef75c6032d380292bd Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Mon, 14 Sep 2009 11:18:01 +0000 Subject: CWS-TOOLING: integrate CWS dba32g 2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength 2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed 2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang 2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance 2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control 2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance 2009-09-05 00:11:40 +0200 fs r275835 : #i10000# 2009-09-04 23:25:50 +0200 fs r275834 : #i10000# 2009-09-04 23:23:47 +0200 fs r275833 : #i10000# 2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution 2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57) 2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0 2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore 2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56) 2009-09-02 13:48:12 +0200 fs r275708 : removed useless include 2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi 2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries 2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting 2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack. 2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag 2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required 2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page 2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends 2009-08-31 15:52:34 +0200 fs r275612 : #i104410# 2009-08-31 12:29:05 +0200 fs r275596 : #i104364# 2009-08-31 12:28:56 +0200 fs r275595 : #i104364# 2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting 2009-08-31 11:41:37 +0200 fs r275592 : #i104649# 2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI 2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option 2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI 2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI 2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option 2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column 2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings 2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked) 2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings 2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data 2009-08-28 11:00:31 +0200 fs r275521 : #i104580# 2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed 2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI 2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents 2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT 2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein 2009-08-27 13:23:07 +0200 fs r275475 : #i103882# 2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble 2009-08-27 11:55:34 +0200 fs r275465 : #i104544# do not allow re-entrance for impl_ensureControl_nothrow Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from the grid control implementation), but to ensure it won't happen, again, I added some safety herein. 2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo 2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo 2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations 2009-08-26 14:18:13 +0200 fs r275422 : #i10000# 2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths 2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver 2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later) 2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource 2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost 2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error 2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException 2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2 2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL 2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL 2009-08-24 14:49:07 +0200 fs r275318 : #i10000# 2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character 2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled 2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns 2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells 2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns 2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells 2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation 2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK 2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming 2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners 2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper 2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting 2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells 2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring: If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT). However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE. 2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird 2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from) 2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios 2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come. 2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models 2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f 2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here --- toolkit/inc/toolkit/helper/vclunohelper.hxx | 16 ++++++ toolkit/source/awt/vclxwindow.cxx | 76 +++++------------------------ toolkit/source/helper/vclunohelper.cxx | 55 +++++++++++++++++++++ 3 files changed, 82 insertions(+), 65 deletions(-) (limited to 'toolkit') diff --git a/toolkit/inc/toolkit/helper/vclunohelper.hxx b/toolkit/inc/toolkit/helper/vclunohelper.hxx index 1c5d89a3cc64..e29b7237abb8 100644 --- a/toolkit/inc/toolkit/helper/vclunohelper.hxx +++ b/toolkit/inc/toolkit/helper/vclunohelper.hxx @@ -36,6 +36,7 @@ #include #include +#include namespace com { namespace sun { namespace star { namespace uno { @@ -59,6 +60,7 @@ namespace com { namespace sun { namespace star { namespace awt { struct SimpleFontMetric; struct FontDescriptor; struct Rectangle; + struct KeyEvent; }}}} @@ -71,6 +73,8 @@ namespace com { namespace sun { namespace star { namespace awt { class Window; class OutputDevice; +class MouseEvent; +class KeyEvent; // ---------------------------------------------------- // class VclUnoHelper @@ -144,6 +148,18 @@ public: static ::Rectangle ConvertToVCLRect( ::com::sun::star::awt::Rectangle const & _rRect ); static ::com::sun::star::awt::Rectangle ConvertToAWTRect( ::Rectangle const & _rRect ); + + static ::com::sun::star::awt::MouseEvent + createMouseEvent( + const ::MouseEvent& _rVclEvent, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext + ); + + static ::com::sun::star::awt::KeyEvent + createKeyEvent( + const ::KeyEvent& _rVclEvent, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext + ); }; diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 337400c08713..a8c0912a583e 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -554,48 +554,6 @@ void ImplInitWindowEvent( ::com::sun::star::awt::WindowEvent& rEvent, Window* pW pWindow->GetBorder( rEvent.LeftInset, rEvent.TopInset, rEvent.RightInset, rEvent.BottomInset ); } -void ImplInitKeyEvent( ::com::sun::star::awt::KeyEvent& rEvent, const KeyEvent& rEvt ) -{ - rEvent.Modifiers = 0; - if ( rEvt.GetKeyCode().IsShift() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::SHIFT; - if ( rEvt.GetKeyCode().IsMod1() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD1; - if ( rEvt.GetKeyCode().IsMod2() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD2; - if ( rEvt.GetKeyCode().IsMod3() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD3; - - rEvent.KeyCode = rEvt.GetKeyCode().GetCode(); - rEvent.KeyChar = rEvt.GetCharCode(); - rEvent.KeyFunc = sal::static_int_cast< sal_Int16 >( - rEvt.GetKeyCode().GetFunction()); -} - -void ImplInitMouseEvent( awt::MouseEvent& rEvent, const MouseEvent& rEvt ) -{ - rEvent.Modifiers = 0; - if ( rEvt.IsShift() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::SHIFT; - if ( rEvt.IsMod1() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD1; - if ( rEvt.IsMod2() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD2; - - rEvent.Buttons = 0; - if ( rEvt.IsLeft() ) - rEvent.Buttons |= ::com::sun::star::awt::MouseButton::LEFT; - if ( rEvt.IsRight() ) - rEvent.Buttons |= ::com::sun::star::awt::MouseButton::RIGHT; - if ( rEvt.IsMiddle() ) - rEvent.Buttons |= ::com::sun::star::awt::MouseButton::MIDDLE; - - rEvent.X = rEvt.GetPosPixel().X(); - rEvent.Y = rEvt.GetPosPixel().Y(); - rEvent.ClickCount = rEvt.GetClicks(); - rEvent.PopupTrigger = sal_False; -} - // ---------------------------------------------------- // class VCLXWindow // ---------------------------------------------------- @@ -890,9 +848,9 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { if ( mpImpl->getKeyListeners().getLength() ) { - ::com::sun::star::awt::KeyEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; - ImplInitKeyEvent( aEvent, *(KeyEvent*)rVclWindowEvent.GetData() ); + ::com::sun::star::awt::KeyEvent aEvent( VCLUnoHelper::createKeyEvent( + *(KeyEvent*)rVclWindowEvent.GetData(), *this + ) ); mpImpl->getKeyListeners().keyPressed( aEvent ); } } @@ -901,9 +859,9 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { if ( mpImpl->getKeyListeners().getLength() ) { - ::com::sun::star::awt::KeyEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; - ImplInitKeyEvent( aEvent, *(KeyEvent*)rVclWindowEvent.GetData() ); + ::com::sun::star::awt::KeyEvent aEvent( VCLUnoHelper::createKeyEvent( + *(KeyEvent*)rVclWindowEvent.GetData(), *this + ) ); mpImpl->getKeyListeners().keyReleased( aEvent ); } } @@ -925,9 +883,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } MouseEvent aMEvt( aWhere, 1, MOUSE_SIMPLECLICK, MOUSE_LEFT, 0 ); - awt::MouseEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; - ImplInitMouseEvent( aEvent, aMEvt ); + awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( aMEvt, *this ) ); aEvent.PopupTrigger = sal_True; mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_PRESSED ); } @@ -938,10 +894,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) MouseEvent* pMouseEvt = (MouseEvent*)rVclWindowEvent.GetData(); if ( mpImpl->getMouseListeners().getLength() && ( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() ) ) { - awt::MouseEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; - ImplInitMouseEvent( aEvent, *pMouseEvt ); - + awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *pMouseEvt, *this ) ); mpImpl->notifyMouseEvent( aEvent, pMouseEvt->IsEnterWindow() ? EVENT_MOUSE_ENTERED : EVENT_MOUSE_EXITED @@ -950,11 +903,8 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getMouseMotionListeners().getLength() && !pMouseEvt->IsEnterWindow() && !pMouseEvt->IsLeaveWindow() ) { - awt::MouseEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; - ImplInitMouseEvent( aEvent, *pMouseEvt ); + awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *pMouseEvt, *this ) ); aEvent.ClickCount = 0; // #92138# - if ( pMouseEvt->GetMode() & MOUSE_SIMPLEMOVE ) mpImpl->getMouseMotionListeners().mouseMoved( aEvent ); else @@ -966,9 +916,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { if ( mpImpl->getMouseListeners().getLength() ) { - awt::MouseEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; - ImplInitMouseEvent( aEvent, *(MouseEvent*)rVclWindowEvent.GetData() ); + awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *(MouseEvent*)rVclWindowEvent.GetData(), *this ) ); mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_PRESSED ); } } @@ -977,9 +925,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { if ( mpImpl->getMouseListeners().getLength() ) { - awt::MouseEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; - ImplInitMouseEvent( aEvent, *(MouseEvent*)rVclWindowEvent.GetData() ); + awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *(MouseEvent*)rVclWindowEvent.GetData(), *this ) ); mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_RELEASED ); } } diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 029e520baca6..89bde88d018e 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -45,6 +45,8 @@ #include #include #include +#include +#include #include #include @@ -67,6 +69,8 @@ #include #include +using namespace ::com::sun::star; + // ---------------------------------------------------- // class VCLUnoHelper // ---------------------------------------------------- @@ -745,3 +749,54 @@ com::sun::star::awt::Point VCLUnoHelper::ConvertToAWTPoint(::Point /* VCLPoint * { return ::com::sun::star::awt::Rectangle( _rRect.Left(), _rRect.Top(), _rRect.GetWidth(), _rRect.GetHeight() ); } + +awt::MouseEvent VCLUnoHelper::createMouseEvent( const ::MouseEvent& _rVclEvent, const uno::Reference< uno::XInterface >& _rxContext ) +{ + awt::MouseEvent aMouseEvent; + aMouseEvent.Source = _rxContext; + + aMouseEvent.Modifiers = 0; + if ( _rVclEvent.IsShift() ) + aMouseEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::SHIFT; + if ( _rVclEvent.IsMod1() ) + aMouseEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD1; + if ( _rVclEvent.IsMod2() ) + aMouseEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD2; + + aMouseEvent.Buttons = 0; + if ( _rVclEvent.IsLeft() ) + aMouseEvent.Buttons |= ::com::sun::star::awt::MouseButton::LEFT; + if ( _rVclEvent.IsRight() ) + aMouseEvent.Buttons |= ::com::sun::star::awt::MouseButton::RIGHT; + if ( _rVclEvent.IsMiddle() ) + aMouseEvent.Buttons |= ::com::sun::star::awt::MouseButton::MIDDLE; + + aMouseEvent.X = _rVclEvent.GetPosPixel().X(); + aMouseEvent.Y = _rVclEvent.GetPosPixel().Y(); + aMouseEvent.ClickCount = _rVclEvent.GetClicks(); + aMouseEvent.PopupTrigger = sal_False; + + return aMouseEvent; +} + +awt::KeyEvent VCLUnoHelper::createKeyEvent( const ::KeyEvent& _rVclEvent, const uno::Reference< uno::XInterface >& _rxContext ) +{ + awt::KeyEvent aKeyEvent; + aKeyEvent.Source = _rxContext; + + aKeyEvent.Modifiers = 0; + if ( _rVclEvent.GetKeyCode().IsShift() ) + aKeyEvent.Modifiers |= awt::KeyModifier::SHIFT; + if ( _rVclEvent.GetKeyCode().IsMod1() ) + aKeyEvent.Modifiers |= awt::KeyModifier::MOD1; + if ( _rVclEvent.GetKeyCode().IsMod2() ) + aKeyEvent.Modifiers |= awt::KeyModifier::MOD2; + if ( _rVclEvent.GetKeyCode().IsMod3() ) + aKeyEvent.Modifiers |= awt::KeyModifier::MOD3; + + aKeyEvent.KeyCode = _rVclEvent.GetKeyCode().GetCode(); + aKeyEvent.KeyChar = _rVclEvent.GetCharCode(); + aKeyEvent.KeyFunc = ::sal::static_int_cast< sal_Int16 >( _rVclEvent.GetKeyCode().GetFunction()); + + return aKeyEvent; +} -- cgit From e66e25555bc9d6c95144d349235216db4420c099 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 16 Sep 2009 14:49:32 +0000 Subject: CWS-TOOLING: integrate CWS cloph13 2009-09-01 #i104566# also use syslibroot/isysroot for external components 2009-08-28 #i104568# clean up duplicated definitions of OBJCXXFLAGS 2009-08-28 #i104567# add ccache-detection to configure (to skip to objcxx-flags) 2009-08-28 #i104566# use Mac OS X 10.4-SDK to ensure backwards compatibility use MACOSX_DEPLOYMENT_TARGET and sysroot/syslibroot switches ignore "-isysroot /Developer/..." arguments for OOo's cpp --- toolkit/source/awt/makefile.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'toolkit') diff --git a/toolkit/source/awt/makefile.mk b/toolkit/source/awt/makefile.mk index 86953691ad27..406386c5723e 100644 --- a/toolkit/source/awt/makefile.mk +++ b/toolkit/source/awt/makefile.mk @@ -44,7 +44,6 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- .IF "$(GUIBASE)"=="aqua" -OBJCXXFLAGS=-x objective-c++ -fobjc-exceptions CFLAGSCXX+=$(OBJCXXFLAGS) .ENDIF # "$(GUIBASE)"=="aqua" -- cgit From d6e3a5bb1f118cbce7cc1723c6ed99d285d3c885 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 17 Sep 2009 17:24:45 +0000 Subject: CWS-TOOLING: integrate CWS a11y32 2009-09-08 11:46:26 +0200 tl r275921 : #i74816# use hi-contrast for all but for printer; namely use it for virtual devices as well 2009-08-25 10:14:46 +0200 tl r275337 : CWS-TOOLING: rebase CWS a11y32 to trunk@274622 (milestone: DEV300:m54) 2009-08-17 11:13:19 +0200 ab r275036 : #i71360# Added attribute support for misspelled 2009-07-24 14:28:11 +0200 tl r274306 : #i48354# fixed hierarchy order in SvHeaderTabListBox 2009-07-24 13:47:40 +0200 mav r274305 : #i102870# let roadmap control behave as a monolite tabstop control 2009-07-24 13:47:06 +0200 mav r274304 : #i102870# let roadmap control behave as a monolite tabstop control 2009-07-24 13:46:33 +0200 mav r274303 : #i102870# let roadmap control behave as a monolite tabstop control 2009-07-24 09:41:16 +0200 tl r274289 : #i74816# fixed evaluation of high-contrast-mode 2009-07-22 15:46:50 +0200 tl r274246 : warning-free-code fix when build with debug=t 2009-07-22 15:28:59 +0200 tl r274243 : #i74816# fixed evaluation of high-contrast-mode --- toolkit/source/controls/roadmapcontrol.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'toolkit') diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx index 724421da5f3c..da3a265130b8 100644 --- a/toolkit/source/controls/roadmapcontrol.cxx +++ b/toolkit/source/controls/roadmapcontrol.cxx @@ -104,6 +104,7 @@ static void lcl_throwIndexOutOfBoundsException( ) ImplRegisterProperty( BASEPROPERTY_COMPLETE ); ImplRegisterProperty( BASEPROPERTY_ACTIVATED ); ImplRegisterProperty( BASEPROPERTY_CURRENTITEMID ); + ImplRegisterProperty( BASEPROPERTY_TABSTOP ); ImplRegisterProperty( BASEPROPERTY_TEXT ); } -- cgit From 92582c4776c8a447fe7290f1918c5d723550c359 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Fri, 18 Sep 2009 11:54:06 +0000 Subject: CWS-TOOLING: integrate CWS dtrans2vcl 2009-09-09 19:47:56 +0200 pl r276016 : merge fix for #i104390# into moved code 2009-09-07 12:50:47 +0200 pl r275891 : remove nonexistant header 2009-09-04 16:47:05 +0200 pl r275819 : forgot calling convention for Windoze 2009-09-04 13:27:36 +0200 pl r275800 : #150926# remove X11 dependency 2009-09-04 13:19:08 +0200 pl r275799 : #150926# move mac dtrans service to vcl to be used in service implementation 2009-09-03 21:19:01 +0200 pl r275774 : fix warning, adjust comment 2009-09-03 18:36:01 +0200 pl r275768 : no more sjlib 2009-09-03 17:56:49 +0200 pl r275767 : remove unused X11 link dependency 2009-09-03 17:43:35 +0200 pl r275766 : headless not used in X11 case 2009-09-03 17:34:36 +0200 pl r275765 : #150926# bye bye sj2 2009-09-03 16:19:04 +0200 pl r275761 : #150926# bye bye sj2, x11 dependenices removed where not necessary 2009-09-01 17:22:54 +0200 pl r275674 : #150926# step 1: move X11 code from dtrans to vcl, adapt glue code --- toolkit/util/makefile.mk | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'toolkit') diff --git a/toolkit/util/makefile.mk b/toolkit/util/makefile.mk index a04bdcbdf801..3c5da82d0dd9 100644 --- a/toolkit/util/makefile.mk +++ b/toolkit/util/makefile.mk @@ -80,22 +80,6 @@ DEF1DEPN =$(LIB1TARGET) DEF1DES =TK DEFLIB1NAME =tk -.IF "$(OS)"=="MACOSX" - -# [ed] 6/16/02 Add in X libraries if we're building X - -.IF "$(GUIBASE)"=="unx" -SHL1STDLIBS +=\ - -lX11 -lXt -lXmu -.ENDIF - -.ELSE -.IF "$(GUI)"=="UNX" -SHL1STDLIBS +=\ - -lX11 -.ENDIF -.ENDIF - RESLIB1IMAGES=$(PRJ)$/source$/awt RES1FILELIST=$(SRS)$/awt.srs RESLIB1NAME=$(TARGET) -- cgit