diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-05-27 14:07:06 +0200 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-05-27 14:07:06 +0200 |
commit | 0d7df1fe0b10b3fd3415ed58403c21535f658555 (patch) | |
tree | 208c39896c20140691ab115ba1f62d0fa92cb23c | |
parent | aa9ff28ea9237d6098d59b7608f64111174a9cdd (diff) | |
parent | de97051d7f82dc7e870c9eaaf009c79609b9c82f (diff) |
CWS-TOOLING: integrate CWS sb120
-rw-r--r-- | extensions/prj/build.lst | 1 | ||||
-rw-r--r-- | forms/prj/build.lst | 2 | ||||
-rw-r--r-- | forms/qa/makefile.mk | 12 | ||||
-rw-r--r-- | forms/qa/unoapi/forms.sce | 6 | ||||
-rw-r--r-- | forms/qa/unoapi/knownissues.xcl | 11 | ||||
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 10 | ||||
-rw-r--r-- | forms/source/inc/InterfaceContainer.hxx | 2 | ||||
-rw-r--r-- | forms/source/misc/InterfaceContainer.cxx | 117 | ||||
-rw-r--r-- | wizards/prj/build.lst | 2 |
9 files changed, 84 insertions, 79 deletions
diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst index 0885b3021c61..1489e2a4e0e4 100644 --- a/extensions/prj/build.lst +++ b/extensions/prj/build.lst @@ -34,4 +34,3 @@ ex extensions\source\update\feed nmake - all ex_updchkfeed ex ex extensions\source\update\check nmake - all ex_updchk ex_inc NULL ex extensions\source\update\ui nmake - all ex_updchkui ex_inc NULL ex extensions\util nmake - all ex_util ex_preload ex_abpilot ex_dbpilots ex_logging ex_ldap ex_propctrlr ex_bib ex_plutil ex_oooimprovecore NULL -ex extensions\qa\unoapi nmake - all ex_qa_unoapi NULL diff --git a/forms/prj/build.lst b/forms/prj/build.lst index 99f6b29d208b..cc71868b734d 100644 --- a/forms/prj/build.lst +++ b/forms/prj/build.lst @@ -1,4 +1,4 @@ -fm forms : l10n oovbaapi svx sfx2 QADEVOOO:qadevOOo NULL +fm forms : l10n oovbaapi svx sfx2 qadevOOo NULL fm forms usr1 - all fm_mkofrm NULL fm forms\inc nmake - all fm_inc NULL fm forms\source\inc get - all fm_sinc NULL diff --git a/forms/qa/makefile.mk b/forms/qa/makefile.mk index 1f12a8cf4a74..afafcca427aa 100644 --- a/forms/qa/makefile.mk +++ b/forms/qa/makefile.mk @@ -32,8 +32,6 @@ PRJNAME = forms # --- Settings ----------------------------------------------------- .INCLUDE: settings.mk - -.IF "$(BUILD_QADEVOOO)" == "YES" #----- compile .java files ----------------------------------------- JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar ConnectivityTools.jar @@ -54,7 +52,6 @@ JARCOMPRESS = TRUE # classpath and argument list RUNNER_CLASSPATH = -cp "$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/OOoRunner.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/ConnectivityTools.jar" RUNNER_ARGS = org.openoffice.Runner -TestBase java_complex -.END # --- Targets ------------------------------------------------------ @@ -72,7 +69,6 @@ ALL: ALLDEP test: echo $(SOLARBINDIR) -.IF "$(BUILD_QADEVOOO)" == "YES" show_targets: +@$(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) complexlib.ShowTargets $(foreach,i,$(JAVAFILES) $(i:s/.\$///:s/.java//)) @@ -81,11 +77,3 @@ run: run_%: +$(COPY) integration$/forms$/*.props $(CLASSDIR)$/$(PACKAGE) && $(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -o integration.$(PRJNAME).$(@:s/run_//) - -.ELSE -run: show_targets - -show_targets: - +@echo "Built without qadevOOo, no QA tests" - -.ENDIF diff --git a/forms/qa/unoapi/forms.sce b/forms/qa/unoapi/forms.sce index 97e9c7422f35..073472f03126 100644 --- a/forms/qa/unoapi/forms.sce +++ b/forms/qa/unoapi/forms.sce @@ -1,5 +1,5 @@ -o forms.OButtonControl --o forms.OButtonModel +#i111285 -o forms.OButtonModel -o forms.OCheckBoxControl -o forms.OCheckBoxModel -o forms.OComboBoxControl @@ -11,10 +11,10 @@ -o forms.ODateModel -o forms.OEditControl -o forms.OEditModel --o forms.OFileControlModel +#i109939 -o forms.OFileControlModel -o forms.OFixedTextModel -o forms.OFormattedControl --o forms.OFormattedFieldWrapper +#i109939 -o forms.OFormattedFieldWrapper # LSST EIN DOKUMENT OFFEN -o forms.OFormsCollection -o forms.OGridControlModel -o forms.OGroupBoxControl diff --git a/forms/qa/unoapi/knownissues.xcl b/forms/qa/unoapi/knownissues.xcl index 1cec8ac106a2..2e10a269c681 100644 --- a/forms/qa/unoapi/knownissues.xcl +++ b/forms/qa/unoapi/knownissues.xcl @@ -116,3 +116,14 @@ forms.OListBoxModel::com::sun::star::form::XUpdateBroadcaster forms.OFormattedFieldWrapper::com::sun::star::form::XUpdateBroadcaster forms.ODateModel::com::sun::star::form::XUpdateBroadcaster forms.OComboBoxModel::com::sun::star::form::XUpdateBroadcaster + +### i111006 ### +forms.OFileControlModel::com::sun::star::beans::XFastPropertySet +forms.OFileControlModel::com::sun::star::form::FormControlModel + +### i111148 ### +forms.OImageControlModel::com::sun::star::beans::XMultiPropertySet +forms.OImageControlModel::com::sun::star::beans::XPropertySet + +### i111333 ### +forms.OImageControlControl::com::sun::star::awt::XControl diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 5f3f04d45618..154ed4b00272 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -2403,6 +2403,7 @@ void ODatabaseForm::_propertyChanged(const PropertyChangeEvent& evt) throw( Runt //------------------------------------------------------------------------------ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException) { + // SYNCHRONIZED -----> ::osl::ResettableMutexGuard aGuard(m_aMutex); Reference<XForm> xParentForm(getParent(), UNO_QUERY); @@ -2447,14 +2448,15 @@ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com } } + Reference< XPropertySet > xAggregateProperties( m_xAggregateSet ); + aGuard.clear(); + // <----- SYNCHRONIZED + Reference< XConnection > xOuterConnection; sal_Bool bIsEmbedded = ::dbtools::isEmbeddedInDatabase( Parent, xOuterConnection ); - // clear the guard before setting property values, because of the notifications - // which are triggered there - aGuard.clear(); if ( bIsEmbedded ) - m_xAggregateSet->setPropertyValue( PROPERTY_DATASOURCE, makeAny( ::rtl::OUString() ) ); + xAggregateProperties->setPropertyValue( PROPERTY_DATASOURCE, makeAny( ::rtl::OUString() ) ); } //============================================================================== diff --git a/forms/source/inc/InterfaceContainer.hxx b/forms/source/inc/InterfaceContainer.hxx index 427d0c6ed190..90e508f43ca8 100644 --- a/forms/source/inc/InterfaceContainer.hxx +++ b/forms/source/inc/InterfaceContainer.hxx @@ -273,7 +273,7 @@ protected: private: // hack for Vba Events - void fakeVbaEventsHack( sal_Int32 _nIndex ); + void impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIndex ); // the runtime event format has changed from version SO5.2 to OOo enum EventFormat diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index b594df158d17..e494406f87ef 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -31,6 +31,7 @@ #include "frm_resource.hrc" #include "frm_resource.hxx" #include "InterfaceContainer.hxx" +#include "componenttools.hxx" #include "property.hrc" #include "services.hxx" @@ -40,6 +41,7 @@ #include <com/sun/star/io/XMarkableStream.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/util/XCloneable.hpp> +#include <com/sun/star/form/XForm.hpp> #include <comphelper/container.hxx> #include <comphelper/enumhelper.hxx> @@ -119,54 +121,52 @@ lcl_stripVbaEvents( const Sequence< ScriptEventDescriptor >& sEvents ) return sStripped; } -void -OInterfaceContainer::fakeVbaEventsHack( sal_Int32 _nIndex ) +void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIndex ) { // we are dealing with form controls try { - Reference< XFormComponent > xForm( static_cast< XContainer* >(this), UNO_QUERY_THROW ); - // grand-parent should be the model, no parent ? if not - // we'll ignore, we'll get called back here anyway ) - Reference< XChild > xChild( xForm->getParent(), UNO_QUERY_THROW ); - Reference< XModel > xDocOwner( xChild->getParent(), UNO_QUERY ); - OSL_TRACE(" Is DOC ????? %s", xDocOwner.is() ? "true" : "false" ); - if ( xDocOwner.is() ) + do { - bool hasVBABindings = lcl_hasVbaEvents( m_xEventAttacher->getScriptEvents( _nIndex ) ); + Reference< XModel > xDoc( getXModel( static_cast< XContainer *> ( this ) ) ); + if ( !xDoc.is() ) + break; + + Reference< XMultiServiceFactory > xDocFac( xDoc, UNO_QUERY_THROW ); + Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance( rtl::OUString::createFromAscii( "ooo.vba.VBACodeNameProvider" ) ), UNO_QUERY ); + if ( !xNameQuery.is() ) + break; + + ::osl::MutexGuard aGuard( m_rMutex ); + bool hasVBABindings = lcl_hasVbaEvents( m_xEventAttacher->getScriptEvents( i_nIndex ) ); if ( hasVBABindings ) - { - OSL_TRACE("Has VBA bindings already, returning "); - return; - } - Reference< XMultiServiceFactory > xFac( comphelper::getProcessServiceFactory(), UNO_QUERY ); - Reference< XMultiServiceFactory > xDocFac( xDocOwner, UNO_QUERY ); - if ( xFac.is() && xDocFac.is() ) - { - try - { - Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( xFac->createInstance( rtl::OUString::createFromAscii( "ooo.vba.VBAToOOEventDesc" ) ), UNO_QUERY_THROW ); - Reference< XInterface > xIf( getByIndex( _nIndex ) , UNO_QUERY_THROW ); - Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance( rtl::OUString::createFromAscii( "ooo.vba.VBACodeNameProvider" ) ), UNO_QUERY_THROW ); - - rtl::OUString sCodeName; - sCodeName = xNameQuery->getCodeNameForObject( xIf ); - Reference< XPropertySet > xProps( xIf, UNO_QUERY ); - rtl::OUString sServiceName; - xProps->getPropertyValue( rtl::OUString::createFromAscii("DefaultControl" ) ) >>= sServiceName; - - Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( xFac->createInstance( sServiceName ), sCodeName ); - // register the vba script events - if ( m_xEventAttacher.is() ) - m_xEventAttacher->registerScriptEvents( _nIndex, vbaEvents ); - } - catch( Exception& ){ OSL_TRACE("lcl_fakevbaevents - Caught Exception trying to create control eventstuff "); } - } + break; + + Reference< XInterface > xElement( getByIndex( i_nIndex ) , UNO_QUERY_THROW ); + Reference< XForm > xElementAsForm( xElement, UNO_QUERY ); + if ( xElementAsForm.is() ) + break; + ::rtl::OUString sCodeName( xNameQuery->getCodeNameForObject( xElement ) ); + + Reference< XPropertySet > xProps( xElement, UNO_QUERY_THROW ); + ::rtl::OUString sServiceName; + xProps->getPropertyValue( rtl::OUString::createFromAscii("DefaultControl" ) ) >>= sServiceName; + + Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( m_xServiceFactory->createInstance( rtl::OUString::createFromAscii( "ooo.vba.VBAToOOEventDesc" ) ), UNO_QUERY_THROW ); + Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( m_xServiceFactory->createInstance( sServiceName ), sCodeName ); + // register the vba script events + m_xEventAttacher->registerScriptEvents( i_nIndex, vbaEvents ); } + while ( false ); + } + catch ( const ServiceNotRegisteredException& ) + { + // silence this, not all document types support the ooo.vba.VBACodeNameProvider service } - catch( Exception& ) + catch( const Exception& ) { + DBG_UNHANDLED_EXCEPTION(); } } @@ -827,8 +827,9 @@ void OInterfaceContainer::approveNewElement( const Reference< XPropertySet >& _r void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XPropertySet >& _rxElement, sal_Bool _bEvents, ElementDescription* _pApprovalResult, sal_Bool _bFire ) throw( IllegalArgumentException ) { - RTL_LOGFILE_CONTEXT( aLogger, "forms::OInterfaceContainer::implInsert" ); + const bool bHandleEvents = _bEvents && m_xEventAttacher.is(); + // SYNCHRONIZED -----> ::osl::ClearableMutexGuard aGuard( m_rMutex ); ::std::auto_ptr< ElementDescription > aAutoDeleteMetaData; @@ -866,17 +867,24 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper m_aMap.insert( ::std::pair< const ::rtl::OUString, InterfaceRef >( sName, pElementMetaData->xInterface ) ); // announce ourself as parent to the new element - { - RTL_LOGFILE_CONTEXT( aLogger, "forms::OInterfaceContainer::implInsert::settingParent" ); - pElementMetaData->xChild->setParent(static_cast<XContainer*>(this)); - } + pElementMetaData->xChild->setParent(static_cast<XContainer*>(this)); // handle the events - if ( _bEvents && m_xEventAttacher.is() ) + if ( bHandleEvents ) { m_xEventAttacher->insertEntry(_nIndex); m_xEventAttacher->attach( _nIndex, pElementMetaData->xInterface, makeAny( _rxElement ) ); - // insert fake events? + } + + // notify derived classes + implInserted( pElementMetaData ); + + aGuard.clear(); + // <----- SYNCHRONIZED + + // insert faked VBA events? + if ( bHandleEvents ) + { Reference< XEventAttacherManager > xMgr ( pElementMetaData->xInterface, UNO_QUERY ); if ( xMgr.is() ) { @@ -885,19 +893,16 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper for ( sal_Int32 i = 0; (i < nLen) && pIfcMgr ; ++i ) { // add fake events to the control at index i - pIfcMgr->fakeVbaEventsHack( i ); + pIfcMgr->impl_addVbEvents_nolck_nothrow( i ); } } else { // add fake events to the control at index i - fakeVbaEventsHack( _nIndex ); + impl_addVbEvents_nolck_nothrow( _nIndex ); } } - // notify derived classes - implInserted( pElementMetaData ); - // fire the notification about the change if ( _bFire ) { @@ -1187,29 +1192,30 @@ void SAL_CALL OInterfaceContainer::removeByName(const ::rtl::OUString& Name) thr //------------------------------------------------------------------------ void SAL_CALL OInterfaceContainer::registerScriptEvent( sal_Int32 nIndex, const ScriptEventDescriptor& aScriptEvent ) throw(IllegalArgumentException, RuntimeException) { - OSL_TRACE("*** registerScriptEvent %d", nIndex); + ::osl::ClearableMutexGuard aGuard( m_rMutex ); if ( m_xEventAttacher.is() ) { m_xEventAttacher->registerScriptEvent( nIndex, aScriptEvent ); - fakeVbaEventsHack( nIndex ); // add fake vba events + aGuard.clear(); + impl_addVbEvents_nolck_nothrow( nIndex ); // add fake vba events } } //------------------------------------------------------------------------ void SAL_CALL OInterfaceContainer::registerScriptEvents( sal_Int32 nIndex, const Sequence< ScriptEventDescriptor >& aScriptEvents ) throw(IllegalArgumentException, RuntimeException) { - OSL_TRACE("*** registerScriptEvent(s) %d", nIndex); + ::osl::ClearableMutexGuard aGuard( m_rMutex ); if ( m_xEventAttacher.is() ) { m_xEventAttacher->registerScriptEvents( nIndex, aScriptEvents ); - fakeVbaEventsHack( nIndex ); // add fake vba events + aGuard.clear(); + impl_addVbEvents_nolck_nothrow( nIndex ); // add fake vba events } } //------------------------------------------------------------------------ void SAL_CALL OInterfaceContainer::revokeScriptEvent( sal_Int32 nIndex, const ::rtl::OUString& aListenerType, const ::rtl::OUString& aEventMethod, const ::rtl::OUString& aRemoveListenerParam ) throw(IllegalArgumentException, RuntimeException) { - OSL_TRACE("*** revokeScriptEvent %d listenertype %s, eventMethod %s", nIndex, rtl::OUStringToOString( aListenerType, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( aEventMethod, RTL_TEXTENCODING_UTF8 ).getStr()); if ( m_xEventAttacher.is() ) m_xEventAttacher->revokeScriptEvent( nIndex, aListenerType, aEventMethod, aRemoveListenerParam ); } @@ -1238,7 +1244,6 @@ void SAL_CALL OInterfaceContainer::removeEntry( sal_Int32 nIndex ) throw(Illegal //------------------------------------------------------------------------ Sequence< ScriptEventDescriptor > SAL_CALL OInterfaceContainer::getScriptEvents( sal_Int32 nIndex ) throw(IllegalArgumentException, RuntimeException) { - OSL_TRACE("getScriptEvents"); Sequence< ScriptEventDescriptor > aReturn; if ( m_xEventAttacher.is() ) { diff --git a/wizards/prj/build.lst b/wizards/prj/build.lst index c98f4561577c..c4d635a921a8 100644 --- a/wizards/prj/build.lst +++ b/wizards/prj/build.lst @@ -1,4 +1,4 @@ -wz wizards : l10n rsc javaunohelper unoil QADEVOOO:qadevOOo NULL +wz wizards : l10n rsc javaunohelper unoil NULL wz wizards\util nmake - all wz_util NULL wz wizards\source\config nmake - all wz_config NULL wz wizards\source\configshare nmake - all wz_configshare NULL |