diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-03-15 14:07:56 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-03-15 14:07:56 +0100 |
commit | 6c07c7cad453e4ebb447577c7313323764d50ea9 (patch) | |
tree | 7410c4e721b8d15b4cdb48ad109c1a93caed0a86 /forms | |
parent | 839c7d708a3acbbf52b5ce03f91196884c0dc258 (diff) |
dba33f: #i110036#: when creating new controls or grid columns, set MouseWheelBehavior to NEVER
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/Columns.cxx | 20 | ||||
-rw-r--r-- | forms/source/inc/componenttools.hxx | 6 | ||||
-rw-r--r-- | forms/source/misc/componenttools.cxx | 12 |
3 files changed, 31 insertions, 7 deletions
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 <com/sun/star/io/XPersistObject.hpp> @@ -172,11 +173,20 @@ Sequence<sal_Int8> SAL_CALL OGridColumn::getImplementationId() throw(RuntimeExce //------------------------------------------------------------------ Sequence<Type> SAL_CALL OGridColumn::getTypes() throw(RuntimeException) { - Reference<XTypeProvider> 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 @@ -87,6 +87,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 { TypeSequence aTypes( m_aTypes.size() ); |