summaryrefslogtreecommitdiff
path: root/forms/source/component
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 11:46:56 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 11:46:56 +0000
commit22c7ab9fc3dfeebbc2db49ee46d0a57fbb6c5997 (patch)
tree4e4ca74d8cb02ca8692605ffdd170b9970adde9e /forms/source/component
parent38162053e0b15450c439cb52a476d4ee0ba91732 (diff)
INTEGRATION: CWS warnings01 (1.72.38); FILE MERGED
2006/03/14 15:20:25 fs 1.72.38.1: #i57457# warning-free code
Diffstat (limited to 'forms/source/component')
-rw-r--r--forms/source/component/DatabaseForm.cxx104
1 files changed, 51 insertions, 53 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index cb38bcb5b75a..37f1d7750ea5 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: DatabaseForm.cxx,v $
*
- * $Revision: 1.72 $
+ * $Revision: 1.73 $
*
- * last change: $Author: obo $ $Date: 2005-12-21 13:20:23 $
+ * last change: $Author: hr $ $Date: 2006-06-19 12:46:56 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -140,9 +140,6 @@
#ifndef _FRM_SERVICES_HXX_
#include "services.hxx"
#endif
-#ifndef _FRM_IDS_HXX_
-#include "ids.hxx"
-#endif
#ifndef _FSYS_HXX
#include <tools/fsys.hxx>
@@ -400,27 +397,28 @@ ODatabaseForm::ODatabaseForm(const Reference<XMultiServiceFactory>& _rxFactory)
,m_aLoadListeners(m_aMutex)
,m_aRowSetApproveListeners(m_aMutex)
,m_aRowSetListeners(m_aMutex)
- ,m_aResetListeners( *this, m_aMutex )
,m_aSubmitListeners(m_aMutex)
,m_aErrorListeners(m_aMutex)
- ,m_bLoaded(sal_False)
- ,m_bSubForm(sal_False)
- ,m_eNavigation(NavigationBarMode_CURRENT)
- ,m_nPrivileges(0)
+ ,m_aResetListeners( *this, m_aMutex )
+ ,m_pAggregatePropertyMultiplexer(NULL)
+ ,m_pGroupManager( NULL )
,m_aParameterManager( m_aMutex, _rxFactory )
,m_aFilterManager( _rxFactory )
+ ,m_pLoadTimer(NULL)
,m_pThread(NULL)
+ ,m_nResetsPending(0)
+ ,m_nPrivileges(0)
+ ,m_bInsertOnly( sal_False )
,m_eSubmitMethod(FormSubmitMethod_GET)
,m_eSubmitEncoding(FormSubmitEncoding_URL)
- ,m_bAllowDelete(sal_True)
- ,m_bAllowUpdate(sal_True)
+ ,m_eNavigation(NavigationBarMode_CURRENT)
,m_bAllowInsert(sal_True)
- ,m_pLoadTimer(NULL)
- ,m_nResetsPending(0)
+ ,m_bAllowUpdate(sal_True)
+ ,m_bAllowDelete(sal_True)
+ ,m_bLoaded(sal_False)
+ ,m_bSubForm(sal_False)
,m_bForwardingConnection(sal_False)
- ,m_pAggregatePropertyMultiplexer(NULL)
,m_bSharingConnection( sal_False )
- ,m_bInsertOnly( sal_False )
{
DBG_CTOR(ODatabaseForm,NULL);
@@ -1286,9 +1284,9 @@ sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNot
m_xAggregateAsRowSet->execute();
bSuccess = sal_True;
}
- catch(RowSetVetoException& eVeto)
+ catch( const RowSetVetoException& eVeto )
{
- eVeto;
+ (void)eVeto;
}
catch(SQLException& eDb)
{
@@ -1796,7 +1794,7 @@ void SAL_CALL ODatabaseForm::forwardingPropertyValue( sal_Int32 _nHandle )
}
//------------------------------------------------------------------
-void SAL_CALL ODatabaseForm::forwardedPropertyValue( sal_Int32 _nHandle, bool _bSuccess )
+void SAL_CALL ODatabaseForm::forwardedPropertyValue( sal_Int32 _nHandle, bool /*_bSuccess*/ )
{
OSL_ENSURE( _nHandle == PROPERTY_ID_ACTIVE_CONNECTION, "ODatabaseForm::forwardedPropertyValue: unexpected property!" );
if ( _nHandle == PROPERTY_ID_ACTIVE_CONNECTION )
@@ -2082,13 +2080,13 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners)
//-----------------------------------------------------------------------------
void SAL_CALL ODatabaseForm::addResetListener(const Reference<XResetListener>& _rListener) throw( RuntimeException )
{
- m_aResetListeners.addListener( _rListener );
+ m_aResetListeners.addTypedListener( _rListener );
}
//-----------------------------------------------------------------------------
void SAL_CALL ODatabaseForm::removeResetListener(const Reference<XResetListener>& _rListener) throw( RuntimeException )
{
- m_aResetListeners.removeListener( _rListener );
+ m_aResetListeners.removeTypedListener( _rListener );
}
//==============================================================================
@@ -2493,12 +2491,12 @@ void SAL_CALL ODatabaseForm::setGroup( const Sequence<Reference<XControlModel> >
// Die Controls werden gruppiert, indem ihr Name dem Namen des ersten
// Controls der Sequenz angepasst wird
const Reference<XControlModel>* pControls = _rGroup.getConstArray();
- Reference<XPropertySet> xSet;
- ::rtl::OUString sGroupName;
+ Reference< XPropertySet > xSet;
+ ::rtl::OUString sGroupName( Name );
for( sal_Int32 i=0; i<_rGroup.getLength(); ++i, ++pControls )
{
- Reference< XPropertySet > xSet(*pControls, UNO_QUERY);
+ xSet = xSet.query( *pControls );
if ( !xSet.is() )
{
// can't throw an exception other than a RuntimeException (which would not be appropriate),
@@ -2576,7 +2574,7 @@ void SAL_CALL ODatabaseForm::disposing(const EventObject& Source) throw( Runtime
//==============================================================================
// com::sun::star::form::XLoadListener
//------------------------------------------------------------------------------
-void SAL_CALL ODatabaseForm::loaded(const EventObject& aEvent) throw( RuntimeException )
+void SAL_CALL ODatabaseForm::loaded(const EventObject& /*aEvent*/) throw( RuntimeException )
{
// now start the rowset listening to recover cursor events
load_impl(sal_True);
@@ -2593,7 +2591,7 @@ void SAL_CALL ODatabaseForm::loaded(const EventObject& aEvent) throw( RuntimeExc
}
//------------------------------------------------------------------------------
-void SAL_CALL ODatabaseForm::unloading(const EventObject& aEvent) throw( RuntimeException )
+void SAL_CALL ODatabaseForm::unloading(const EventObject& /*aEvent*/) throw( RuntimeException )
{
{
// now stop the rowset listening if we are a subform
@@ -2609,13 +2607,13 @@ void SAL_CALL ODatabaseForm::unloading(const EventObject& aEvent) throw( Runtime
}
//------------------------------------------------------------------------------
-void SAL_CALL ODatabaseForm::unloaded(const EventObject& aEvent) throw( RuntimeException )
+void SAL_CALL ODatabaseForm::unloaded(const EventObject& /*aEvent*/) throw( RuntimeException )
{
// nothing to do
}
//------------------------------------------------------------------------------
-void SAL_CALL ODatabaseForm::reloading(const EventObject& aEvent) throw( RuntimeException )
+void SAL_CALL ODatabaseForm::reloading(const EventObject& /*aEvent*/) throw( RuntimeException )
{
// now stop the rowset listening if we are a subform
::osl::MutexGuard aGuard(m_aMutex);
@@ -2628,7 +2626,7 @@ void SAL_CALL ODatabaseForm::reloading(const EventObject& aEvent) throw( Runtime
}
//------------------------------------------------------------------------------
-void SAL_CALL ODatabaseForm::reloaded(const EventObject& aEvent) throw( RuntimeException )
+void SAL_CALL ODatabaseForm::reloaded(const EventObject& /*aEvent*/) throw( RuntimeException )
{
reload_impl(sal_True);
{
@@ -2715,7 +2713,7 @@ void ODatabaseForm::doShareConnection( const Reference< XPropertySet >& _rxParen
// get the conneciton of the parent
Reference< XConnection > xParentConn;
_rxParentProps->getPropertyValue( PROPERTY_ACTIVE_CONNECTION ) >>= xParentConn;
- OSL_ENSURE( xParentConn.is(), "ODatabaseForm::doShareConnection: we're a valid sub-form, but the parent has no connection??!!!" );
+ OSL_ENSURE( xParentConn.is(), "ODatabaseForm::doShareConnection: we're a valid sub-form, but the parent has no connection?!" );
if ( xParentConn.is() )
{
@@ -2736,7 +2734,7 @@ void ODatabaseForm::doShareConnection( const Reference< XPropertySet >& _rxParen
}
//------------------------------------------------------------------------------
-void ODatabaseForm::disposingSharedConnection( const Reference< XConnection >& _rxConn )
+void ODatabaseForm::disposingSharedConnection( const Reference< XConnection >& /*_rxConn*/ )
{
stopSharingConnection();
@@ -2915,9 +2913,9 @@ void SAL_CALL ODatabaseForm::unload() throw( RuntimeException )
if (xCloseable.is())
xCloseable->close();
}
- catch(SQLException& eDB)
+ catch( const SQLException& e )
{
- eDB;
+ (void)e;
}
aGuard.reset();
}
@@ -2969,10 +2967,10 @@ 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(SQLException& e)
+ catch( const SQLException& e )
{
- DBG_ERROR("ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception ?");
- e;
+ DBG_ERROR("ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?");
+ (void)e;
}
if (bSuccess)
@@ -3021,7 +3019,7 @@ void SAL_CALL ODatabaseForm::close() throw( SQLException, RuntimeException )
//==============================================================================
// com::sun::star::sdbc::XRowSetListener
//------------------------------------------------------------------------------
-void SAL_CALL ODatabaseForm::cursorMoved(const EventObject& event) throw( RuntimeException )
+void SAL_CALL ODatabaseForm::cursorMoved(const EventObject& /*event*/) throw( RuntimeException )
{
// reload the subform with the new parameters of the parent
// do this handling delayed to provide of execute too many SQL Statements
@@ -3034,13 +3032,13 @@ void SAL_CALL ODatabaseForm::cursorMoved(const EventObject& event) throw( Runtim
}
//------------------------------------------------------------------------------
-void SAL_CALL ODatabaseForm::rowChanged(const EventObject& event) throw( RuntimeException )
+void SAL_CALL ODatabaseForm::rowChanged(const EventObject& /*event*/) throw( RuntimeException )
{
// ignore it
}
//------------------------------------------------------------------------------
-void SAL_CALL ODatabaseForm::rowSetChanged(const EventObject& event) throw( RuntimeException )
+void SAL_CALL ODatabaseForm::rowSetChanged(const EventObject& /*event*/) throw( RuntimeException )
{
// not interested in :
// if our parent is an ODatabaseForm, too, then after this rowSetChanged we'll get a "reloaded"
@@ -3378,9 +3376,9 @@ void SAL_CALL ODatabaseForm::insertRow() throw( SQLException, RuntimeException )
if (query_aggregation( m_xAggregate, xUpdate))
xUpdate->insertRow();
}
- catch(RowSetVetoException& eVeto)
+ catch( const RowSetVetoException& eVeto )
{
- eVeto;
+ (void)eVeto;
throw;
}
catch(SQLException& eDb)
@@ -3399,9 +3397,9 @@ void SAL_CALL ODatabaseForm::updateRow() throw( SQLException, RuntimeException )
if (query_aggregation( m_xAggregate, xUpdate))
xUpdate->updateRow();
}
- catch(RowSetVetoException& eVeto)
+ catch( const RowSetVetoException& eVeto )
{
- eVeto;
+ (void)eVeto;
throw;
}
catch(SQLException& eDb)
@@ -3420,9 +3418,9 @@ void SAL_CALL ODatabaseForm::deleteRow() throw( SQLException, RuntimeException )
if (query_aggregation( m_xAggregate, xUpdate))
xUpdate->deleteRow();
}
- catch(RowSetVetoException& eVeto)
+ catch( const RowSetVetoException& eVeto )
{
- eVeto;
+ (void)eVeto;
throw;
}
catch(SQLException& eDb)
@@ -3441,9 +3439,9 @@ void SAL_CALL ODatabaseForm::cancelRowUpdates() throw( SQLException, RuntimeExce
if (query_aggregation( m_xAggregate, xUpdate))
xUpdate->cancelRowUpdates();
}
- catch(RowSetVetoException& eVeto)
+ catch( const RowSetVetoException& eVeto )
{
- eVeto;
+ (void)eVeto;
throw;
}
catch(SQLException& eDb)
@@ -3508,9 +3506,9 @@ Sequence<sal_Int32> SAL_CALL ODatabaseForm::deleteRows(const Sequence<Any>& rows
if (query_aggregation( m_xAggregate, xDelete))
return xDelete->deleteRows(rows);
}
- catch(RowSetVetoException& eVeto)
+ catch( const RowSetVetoException& eVeto )
{
- eVeto; // make compiler happy
+ (void)eVeto; // make compiler happy
throw;
}
catch(SQLException& eDb)
@@ -3863,9 +3861,9 @@ void SAL_CALL ODatabaseForm::write(const Reference<XObjectOutputStream>& _rxOutS
if (nAnyMask & CYCLE)
{
- sal_Int32 nCycle;
- ::cppu::enum2int(nCycle, m_aCycle);
- _rxOutStream->writeShort((sal_Int16)nCycle);
+ sal_Int32 nRealCycle;
+ ::cppu::enum2int(nRealCycle, m_aCycle);
+ _rxOutStream->writeShort((sal_Int16)nRealCycle);
}
}
@@ -3912,7 +3910,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre
m_xAggregateSet->setPropertyValue(PROPERTY_COMMANDTYPE, makeAny(nCommandType));
// obsolete
- sal_Int16 nDummy = _rxInStream->readShort();
+ _rxInStream->readShort();
// navigation mode was a boolean in version 1
// war in der version 1 ein sal_Bool