From 6c07c7cad453e4ebb447577c7313323764d50ea9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 15 Mar 2010 14:07:56 +0100 Subject: dba33f: #i110036#: when creating new controls or grid columns, set MouseWheelBehavior to NEVER --- forms/source/component/Columns.cxx | 20 +++++++++++++++----- forms/source/inc/componenttools.hxx | 6 ++++-- forms/source/misc/componenttools.cxx | 12 ++++++++++++ 3 files changed, 31 insertions(+), 7 deletions(-) (limited to 'forms') diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 29d6f1130509..ae685ef768fb 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -35,6 +35,7 @@ #include "property.hrc" #endif #include "property.hxx" +#include "componenttools.hxx" #include "ids.hxx" #include "findpos.hxx" #include @@ -172,11 +173,20 @@ Sequence SAL_CALL OGridColumn::getImplementationId() throw(RuntimeExce //------------------------------------------------------------------ Sequence SAL_CALL OGridColumn::getTypes() throw(RuntimeException) { - Reference xProv; - - if (query_aggregation(m_xAggregate, xProv)) - return concatSequences(OGridColumn_BASE::getTypes(), xProv->getTypes()); - return OGridColumn_BASE::getTypes(); + TypeBag aTypes( OGridColumn_BASE::getTypes() ); + // erase the types which we do not support + aTypes.removeType( XFormComponent::static_type() ); + aTypes.removeType( XServiceInfo::static_type() ); + aTypes.removeType( XBindableValue::static_type() ); + aTypes.removeType( XPropertyContainer::static_type() ); + // but re-add their base class(es) + aTypes.addType( XChild::static_type() ); + + Reference< XTypeProvider > xProv; + if ( query_aggregation( m_xAggregate, xProv )) + aTypes.addTypes( xProv->getTypes() ); + + return aTypes.getTypes(); } //------------------------------------------------------------------ diff --git a/forms/source/inc/componenttools.hxx b/forms/source/inc/componenttools.hxx index f15a4fc528dc..b9806bc5dc85 100644 --- a/forms/source/inc/componenttools.hxx +++ b/forms/source/inc/componenttools.hxx @@ -51,7 +51,7 @@ namespace frm typedef ::com::sun::star::uno::Type Type; public: - bool operator()( const Type& _rLHS, const Type& _rRHS ) + bool operator()( const Type& _rLHS, const Type& _rRHS ) const { return _rLHS.getTypeName() < _rRHS.getTypeName(); } @@ -88,7 +88,9 @@ namespace frm const TypeSequence& _rTypes3 ); - void addTypes( const TypeSequence& _rTypes ); + void addType( const Type& i_rType ); + void addTypes( const TypeSequence& _rTypes ); + void removeType( const Type& i_rType ); /** returns the types represented by this bag */ diff --git a/forms/source/misc/componenttools.cxx b/forms/source/misc/componenttools.cxx index 21740749d4d4..c0d0f5548294 100644 --- a/forms/source/misc/componenttools.cxx +++ b/forms/source/misc/componenttools.cxx @@ -86,6 +86,18 @@ namespace frm ); } + //-------------------------------------------------------------------- + void TypeBag::addType( const Type& i_rType ) + { + m_aTypes.insert( i_rType ); + } + + //-------------------------------------------------------------------- + void TypeBag::removeType( const TypeBag::Type& i_rType ) + { + m_aTypes.erase( i_rType ); + } + //-------------------------------------------------------------------- TypeBag::TypeSequence TypeBag::getTypes() const { -- cgit