diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-16 13:55:24 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-16 13:55:24 +0200 |
commit | 69929004c60c78e8022f89b002128f551dc0f8c7 (patch) | |
tree | 6d5c4439769b27f8c5fcbae0595bf20b09465542 /extensions/source | |
parent | 1b192bd38a3695cc2965ece438d47d6f74958289 (diff) | |
parent | 6c07c7cad453e4ebb447577c7313323764d50ea9 (diff) |
dba33f: merge with m76-branch
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/dbpilots/gridwizard.cxx | 30 | ||||
-rw-r--r-- | extensions/source/propctrlr/eventhandler.cxx | 14 | ||||
-rw-r--r-- | extensions/source/propctrlr/pcrstrings.hxx | 3 |
3 files changed, 24 insertions, 23 deletions
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 6e28567aef62..9e5d048eeab3 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -33,6 +33,7 @@ #include <comphelper/stl_types.hxx> #include <tools/string.hxx> #include <com/sun/star/form/XGridColumnFactory.hpp> +#include <com/sun/star/awt/MouseWheelBehavior.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <tools/debug.hxx> #include "dbptools.hxx" @@ -52,6 +53,7 @@ namespace dbp using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::form; + using namespace ::com::sun::star::awt; using namespace ::svt; //===================================================================== @@ -111,6 +113,7 @@ namespace dbp static const ::rtl::OUString s_sDataFieldProperty = ::rtl::OUString::createFromAscii("DataField"); static const ::rtl::OUString s_sLabelProperty = ::rtl::OUString::createFromAscii("Label"); static const ::rtl::OUString s_sWidthProperty = ::rtl::OUString::createFromAscii("Width"); + static const ::rtl::OUString s_sMouseWheelBehavior = ::rtl::OUString::createFromAscii("MouseWheelBehavior"); static const ::rtl::OUString s_sEmptyString; // collect "descriptors" for the to-be-created (grid)columns @@ -202,23 +205,24 @@ namespace dbp // create a (grid)column for the (resultset)column try { - Reference< XPropertySet > xColumn = xColumnFactory->createColumn(*pColumnServiceName); + Reference< XPropertySet > xColumn( xColumnFactory->createColumn(*pColumnServiceName), UNO_SET_THROW ); + Reference< XPropertySetInfo > xColumnPSI( xColumn->getPropertySetInfo(), UNO_SET_THROW ); ::rtl::OUString sColumnName(*pColumnServiceName); disambiguateName(xExistenceChecker, sColumnName); - if (xColumn.is()) - { - // the data field the column should be bound to - xColumn->setPropertyValue(s_sDataFieldProperty, makeAny(*pFormFieldName)); - // the label - xColumn->setPropertyValue(s_sLabelProperty, makeAny(::rtl::OUString(*pFormFieldName) += *pColumnLabelPostfix)); - // the width (<void/> => column will be auto-sized) - xColumn->setPropertyValue(s_sWidthProperty, Any()); - - // insert the column - xColumnContainer->insertByName(sColumnName, makeAny(xColumn)); - } + // the data field the column should be bound to + xColumn->setPropertyValue(s_sDataFieldProperty, makeAny(*pFormFieldName)); + // the label + xColumn->setPropertyValue(s_sLabelProperty, makeAny(::rtl::OUString(*pFormFieldName) += *pColumnLabelPostfix)); + // the width (<void/> => column will be auto-sized) + xColumn->setPropertyValue(s_sWidthProperty, Any()); + + if ( xColumnPSI->hasPropertyByName( s_sMouseWheelBehavior ) ) + xColumn->setPropertyValue( s_sMouseWheelBehavior, makeAny( MouseWheelBehavior::SCROLL_DISABLED ) ); + + // insert the column + xColumnContainer->insertByName(sColumnName, makeAny(xColumn)); } catch(Exception&) { diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 5c3fdba085c3..282130daea0b 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -594,7 +594,7 @@ namespace pcr } catch( const Exception& ) { - OSL_ENSURE( false, "EventHandler::EventHandler: caught an exception while classifying the component!" ); + DBG_UNHANDLED_EXCEPTION(); } } @@ -825,7 +825,7 @@ namespace pcr } catch( const Exception& ) { - DBG_ERROR( "EventHandler::getSupportedProperties: caught an exception !" ); + DBG_UNHANDLED_EXCEPTION(); } } @@ -1048,7 +1048,7 @@ namespace pcr } catch( const Exception& ) { - OSL_ENSURE( false, "EventHandler::impl_getFormComponentScriptEvents_nothrow: caught an exception!" ); + DBG_UNHANDLED_EXCEPTION(); } } @@ -1080,7 +1080,7 @@ namespace pcr } catch( const Exception& ) { - OSL_ENSURE( false, "EventHandler::impl_getCopmonentListenerTypes_nothrow: caught an exception!" ); + DBG_UNHANDLED_EXCEPTION(); } } @@ -1105,7 +1105,7 @@ namespace pcr } catch( const Exception& ) { - OSL_ENSURE( false, "EventHandler::impl_getDialogElementScriptEvents_nothrow: caught an exception!" ); + DBG_UNHANDLED_EXCEPTION(); } } @@ -1120,7 +1120,7 @@ namespace pcr { Reference< XTabControllerModel > xComponentAsTCModel( m_xComponent, UNO_QUERY_THROW ); Reference< XFormController > xController( - m_aContext.createComponent( (const rtl::OUString&)SERVICE_FORMCONTROLLER ), UNO_QUERY_THROW ); + m_aContext.createComponent( "com.sun.star.form.runtime.FormController" ), UNO_QUERY_THROW ); xController->setModel( xComponentAsTCModel ); xReturn = xController; @@ -1212,7 +1212,7 @@ namespace pcr } catch( const Exception& ) { - OSL_ENSURE( false, "EventHandler::impl_setFormComponentScriptEvent_nothrow: caught an exception!" ); + DBG_UNHANDLED_EXCEPTION(); } } diff --git a/extensions/source/propctrlr/pcrstrings.hxx b/extensions/source/propctrlr/pcrstrings.hxx index 9a611f5fce7f..e2a81c9920ca 100644 --- a/extensions/source/propctrlr/pcrstrings.hxx +++ b/extensions/source/propctrlr/pcrstrings.hxx @@ -38,9 +38,6 @@ namespace pcr // properties PCR_CONSTASCII_STRING( PROPERTY_TABBINGMODEL, "TabbingModel" ); - // services - PCR_CONSTASCII_STRING( SERVICE_FORMCONTROLLER, "com.sun.star.form.FormController" ); - //............................................................................ } // namespace pcr //............................................................................ |