summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-06-04 14:23:34 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2010-06-04 14:23:34 +0200
commit3a9fa417bcc24977c9db13b9f8b9103f94942974 (patch)
treed2c2c66df8d2ec70e5aa4998faff1a975e1519a6 /extensions
parent9e515931a710a1f350494d7b99cfd1ec0add3471 (diff)
parent516ced09925f589873d65cbb9571294dddbe7af8 (diff)
CWS-TOOLING: integrate CWS dba33f
Notes
Notes: split repo tag: components_ooo/DEV300_m81
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx30
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx14
-rw-r--r--extensions/source/propctrlr/pcrstrings.hxx3
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
//............................................................................