summaryrefslogtreecommitdiff
path: root/forms/source/component/DatabaseForm.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-11-05 14:33:55 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-11-05 14:33:55 +0100
commitc96ff0d03940f6dc658f5bb77b95270da0808311 (patch)
tree745874589fd5b9668459cb5254f3c707b87669e7 /forms/source/component/DatabaseForm.cxx
parentb15a4c790be7aa5dd1bd7c2dbbeca341e0945971 (diff)
new test case catching issue #i105235# (note that the fix for this issue is not yet in here, so until we rebase to a milestone where CWS dba32h resp. dba32j are integrated, the test will fail)
Diffstat (limited to 'forms/source/component/DatabaseForm.cxx')
-rw-r--r--forms/source/component/DatabaseForm.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 6ad6a5c4f..47e597004 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -96,7 +96,6 @@
#include <ctype.h>
#include <hash_map>
-//#include <stdio.h>
// compatiblity: DatabaseCursorType is dead, but for compatiblity reasons we still have to write it ...
namespace com {
@@ -2630,16 +2629,15 @@ void ODatabaseForm::impl_createLoadTimer()
//------------------------------------------------------------------------------
void SAL_CALL ODatabaseForm::loaded(const EventObject& /*aEvent*/) throw( RuntimeException )
{
- // now start the rowset listening to recover cursor events
- load_impl(sal_True);
{
- ::osl::MutexGuard aGuard(m_aMutex);
- Reference<XRowSet> xParentRowSet(m_xParent, UNO_QUERY);
- if (xParentRowSet.is())
- xParentRowSet->addRowSetListener(this);
+ ::osl::MutexGuard aGuard( m_aMutex );
+ Reference< XRowSet > xParentRowSet( m_xParent, UNO_QUERY_THROW );
+ xParentRowSet->addRowSetListener( this );
impl_createLoadTimer();
}
+
+ load_impl( sal_True );
}
//------------------------------------------------------------------------------
@@ -2647,12 +2645,14 @@ void SAL_CALL ODatabaseForm::unloading(const EventObject& /*aEvent*/) throw( Run
{
{
// now stop the rowset listening if we are a subform
- ::osl::MutexGuard aGuard(m_aMutex);
- DELETEZ(m_pLoadTimer);
+ ::osl::MutexGuard aGuard( m_aMutex );
- Reference<XRowSet> xParentRowSet(m_xParent, UNO_QUERY);
- if (xParentRowSet.is())
- xParentRowSet->removeRowSetListener(this);
+ if ( m_pLoadTimer && m_pLoadTimer->IsActive() )
+ m_pLoadTimer->Stop();
+ DELETEZ( m_pLoadTimer );
+
+ Reference< XRowSet > xParentRowSet( m_xParent, UNO_QUERY_THROW );
+ xParentRowSet->removeRowSetListener( this );
}
unload();
@@ -2880,7 +2880,7 @@ sal_Bool ODatabaseForm::implEnsureConnection()
}
catch( Exception )
{
- DBG_ERROR( "ODatabaseForm::implEnsureConnection: caught an exception which I cannot handle!" );
+ DBG_UNHANDLED_EXCEPTION();
}
return sal_False;