diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:34:26 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:34:26 +0200 |
commit | 09727e4dbf46c3cb0dcd5de27b2b3c648425ac8b (patch) | |
tree | caba50518b9f6a5818c8fa5869524c0f33c0c08d /forms | |
parent | gnumake4: move classpath to build system in wizards (diff) | |
parent | Do not use macros from comphelper's componentmodule.hxx (diff) | |
download | core-09727e4dbf46c3cb0dcd5de27b2b3c648425ac8b.tar.gz core-09727e4dbf46c3cb0dcd5de27b2b3c648425ac8b.zip |
resyncing to master
Diffstat (limited to 'forms')
-rw-r--r-- | forms/Library_frm.mk | 7 | ||||
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 89 | ||||
-rw-r--r-- | forms/source/component/Edit.cxx | 4 | ||||
-rw-r--r-- | forms/source/misc/services.cxx | 6 | ||||
-rw-r--r-- | forms/source/resource/frm_resource.cxx | 4 | ||||
-rw-r--r-- | forms/util/frm.dxp | 1 |
6 files changed, 56 insertions, 55 deletions
diff --git a/forms/Library_frm.mk b/forms/Library_frm.mk index 6804d6195853..02c4987c1b3e 100644 --- a/forms/Library_frm.mk +++ b/forms/Library_frm.mk @@ -35,7 +35,6 @@ $(eval $(call gb_Library_set_include,frm,\ -I$(realpath $(SRCDIR)/forms/source/inc) \ -I$(realpath $(SRCDIR)/forms/source/solar/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \ )) @@ -43,6 +42,12 @@ $(eval $(call gb_Library_add_defs,frm,\ $(if $(filter YES,$(SYSTEM_LIBXML)),-DSYSTEM_LIBXML $(filter-out -I%,$(LIBXML_CFLAGS))) \ )) +$(eval $(call gb_Library_add_api,frm,\ + offapi \ + oovbaapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,frm,\ comphelper \ cppu \ diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index fbde5883ebcf..9ac10191d04d 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -163,7 +163,7 @@ private: if ( m_xDocumentModify.is() ) _enable ? m_xDocumentModify->enableSetModified() : m_xDocumentModify->disableSetModified(); } - catch( const Exception& ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -410,7 +410,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource ) setPropertyValue( pSourceProperty->Name, xSourceProps->getPropertyValue( pSourceProperty->Name ) ); } } - catch( const Exception& ) + catch(const Exception&) { throw WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Could not clone the given database form." ) ), @@ -1173,7 +1173,7 @@ bool ODatabaseForm::hasValidParent() const // the parent form is loaded and on a "virtual" row -> not valid return false; } - catch(Exception&) + catch(const Exception&) { // parent could be forwardonly? return false; @@ -1261,11 +1261,10 @@ sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNot m_xAggregateAsRowSet->execute(); bSuccess = sal_True; } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { _rClearForNotifies.clear(); if (m_sCurrentErrorContext.getLength()) @@ -1307,7 +1306,7 @@ sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNot xUpdate->moveToInsertRow(); } } - catch(SQLException& eDB) + catch(const SQLException& eDB) { _rClearForNotifies.clear(); if (m_sCurrentErrorContext.getLength()) @@ -1750,7 +1749,9 @@ void ODatabaseForm::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const A { m_xAggregateSet->setPropertyValue(PROPERTY_DATASOURCE, rValue); } - catch(Exception&) { } + catch(const Exception&) + { + } } break; case PROPERTY_ID_TARGET_URL: @@ -2051,7 +2052,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) if ( aDefault.hasValue() ) xColUpdate->updateObject( aDefault ); } - catch(Exception&) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -2059,7 +2060,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) } } } - catch(Exception&) + catch(const Exception&) { } @@ -2419,7 +2420,7 @@ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com Reference< XPropertySet > xParentProperties( xParentForm, UNO_QUERY_THROW ); xParentProperties->removePropertyChangeListener( PROPERTY_ISNEW, this ); } - catch( const Exception& ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -2441,7 +2442,7 @@ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com Reference< XPropertySet > xParentProperties( xParentForm, UNO_QUERY_THROW ); xParentProperties->addPropertyChangeListener( PROPERTY_ISNEW, this ); } - catch( const Exception& ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -2871,11 +2872,11 @@ sal_Bool ODatabaseForm::implEnsureConnection() return xConnection.is(); } } - catch(SQLException& eDB) + catch(const SQLException& eDB) { onError(eDB, FRM_RES_STRING(RID_STR_CONNECTERROR)); } - catch( Exception ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -2962,9 +2963,8 @@ void SAL_CALL ODatabaseForm::unload() throw( RuntimeException ) if (xCloseable.is()) xCloseable->close(); } - catch( const SQLException& e ) + catch(const SQLException&) { - (void)e; } aGuard.reset(); } @@ -3020,10 +3020,9 @@ void ODatabaseForm::reload_impl(sal_Bool bMoveToFirst, const Reference< XInterac m_sCurrentErrorContext = FRM_RES_STRING(RID_ERR_REFRESHING_FORM); bSuccess = executeRowSet(aGuard, bMoveToFirst, _rxCompletionHandler); } - catch( const SQLException& e ) + catch(const SQLException&) { OSL_FAIL("ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?"); - (void)e; } if (bSuccess) @@ -3122,19 +3121,22 @@ bool ODatabaseForm::impl_approveRowChange_throw( const EventObject& _rEvent, con if ( !xListener->approveRowSetChange( _rEvent ) ) return false; } - catch ( const DisposedException& e ) + catch (const DisposedException& e) { if ( e.Context == xListener ) aIter.remove(); } - catch ( const RuntimeException& ) { throw; } - catch ( const SQLException& ) + catch (const RuntimeException&) + { + throw; + } + catch (const SQLException&) { if ( _bAllowSQLException ) throw; DBG_UNHANDLED_EXCEPTION(); } - catch ( const Exception& ) + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -3163,13 +3165,16 @@ sal_Bool SAL_CALL ODatabaseForm::approveCursorMove(const EventObject& event) thr if ( !xListener->approveCursorMove( event ) ) return sal_False; } - catch ( const DisposedException& e ) + catch (const DisposedException& e) { if ( e.Context == xListener ) aIter.remove(); } - catch ( const RuntimeException& ) { throw; } - catch ( const Exception& ) + catch (const RuntimeException&) + { + throw; + } + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -3209,13 +3214,16 @@ sal_Bool SAL_CALL ODatabaseForm::approveRowChange(const RowChangeEvent& event) t if ( !xListener->approveRowChange( event ) ) return false; } - catch ( const DisposedException& e ) + catch (const DisposedException& e) { if ( e.Context == xListener ) aIter.remove(); } - catch ( const RuntimeException& ) { throw; } - catch ( const Exception& ) + catch (const RuntimeException&) + { + throw; + } + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -3499,12 +3507,11 @@ void SAL_CALL ODatabaseForm::insertRow() throw( SQLException, RuntimeException ) if (query_aggregation( m_xAggregate, xUpdate)) xUpdate->insertRow(); } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; throw; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { onError(eDb, FRM_RES_STRING(RID_STR_ERR_INSERTRECORD)); throw; @@ -3520,12 +3527,11 @@ void SAL_CALL ODatabaseForm::updateRow() throw( SQLException, RuntimeException ) if (query_aggregation( m_xAggregate, xUpdate)) xUpdate->updateRow(); } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; throw; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { onError(eDb, FRM_RES_STRING(RID_STR_ERR_UPDATERECORD)); throw; @@ -3541,12 +3547,11 @@ void SAL_CALL ODatabaseForm::deleteRow() throw( SQLException, RuntimeException ) if (query_aggregation( m_xAggregate, xUpdate)) xUpdate->deleteRow(); } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; throw; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { onError(eDb, FRM_RES_STRING(RID_STR_ERR_DELETERECORD)); throw; @@ -3562,12 +3567,11 @@ void SAL_CALL ODatabaseForm::cancelRowUpdates() throw( SQLException, RuntimeExce if (query_aggregation( m_xAggregate, xUpdate)) xUpdate->cancelRowUpdates(); } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; throw; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { onError(eDb, FRM_RES_STRING(RID_STR_ERR_INSERTRECORD)); throw; @@ -3627,12 +3631,11 @@ Sequence<sal_Int32> SAL_CALL ODatabaseForm::deleteRows(const Sequence<Any>& rows if (query_aggregation( m_xAggregate, xDelete)) return xDelete->deleteRows(rows); } - catch( const RowSetVetoException& eVeto ) + catch(const RowSetVetoException&) { - (void)eVeto; // make compiler happy throw; } - catch(SQLException& eDb) + catch(const SQLException& eDb) { onError(eDb, FRM_RES_STRING(RID_STR_ERR_DELETERECORDS)); throw; diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index 260acf5d97cb..7d2fa43756f5 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -485,7 +485,7 @@ namespace { _rxDest->setPropertyValue( pSourceProps->Name, _rxSource->getPropertyValue( pSourceProps->Name ) ); } - catch( IllegalArgumentException e ) + catch(const IllegalArgumentException& e) { #if OSL_DEBUG_LEVEL > 0 ::rtl::OString sMessage( "could not transfer the property named '" ); @@ -497,6 +497,8 @@ namespace sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); } OSL_FAIL( sMessage.getStr() ); +#else + (void)e; #endif } diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx index 25cb3f797e39..988d5efde488 100644 --- a/forms/source/misc/services.cxx +++ b/forms/source/misc/services.cxx @@ -321,12 +321,6 @@ void SAL_CALL createRegistryInfo_FORMS() } //--------------------------------------------------------------------------------------- -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char** _ppEnvTypeName, uno_Environment** /*_ppEnv*/) -{ - *_ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -//--------------------------------------------------------------------------------------- SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplName, XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/) { if (!_pServiceManager || !_pImplName) diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx index 93746147f3cd..c89a2001e057 100644 --- a/forms/source/resource/frm_resource.cxx +++ b/forms/source/resource/frm_resource.cxx @@ -59,9 +59,7 @@ namespace frm if (m_pImpl) return; - ByteString sFileName("frm"); - - m_pImpl = SimpleResMgr::Create(sFileName.GetBuffer(), Application::GetSettings().GetUILocale()); + m_pImpl = SimpleResMgr::Create("frm", Application::GetSettings().GetUILocale()); if (m_pImpl) { diff --git a/forms/util/frm.dxp b/forms/util/frm.dxp index f0e1c69934bc..70033078921a 100644 --- a/forms/util/frm.dxp +++ b/forms/util/frm.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory |