diff options
author | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-15 09:16:51 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-15 09:16:51 +0100 |
commit | 864084394bdd34c577cee805c0023638bbb8d796 (patch) | |
tree | fc959d8e2fd99d6adc7132bea42273b71ea7dd56 /forms/source/component/DatabaseForm.cxx | |
parent | 8a5b59989048d67b567819ee2038d4bff54ca184 (diff) | |
parent | 79910a6627d892d5fb5af063dbeedadaafe72fbe (diff) |
dba33b: merge m69
Diffstat (limited to 'forms/source/component/DatabaseForm.cxx')
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 154 |
1 files changed, 77 insertions, 77 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 081b971fcceb..54225d6095a6 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -31,72 +31,71 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_forms.hxx" -#include "componenttools.hxx"
-#include "DatabaseForm.hxx"
-#include "EventThread.hxx"
-#include "frm_module.hxx"
-#include "frm_resource.hrc"
-#include "frm_resource.hxx"
-#include "GroupManager.hxx"
-#include "property.hrc"
-#include "property.hxx"
-#include "services.hxx"
-
-#include <com/sun/star/awt/XControlContainer.hpp>
-#include <com/sun/star/awt/XTextComponent.hpp>
-#include <com/sun/star/form/DataSelectionType.hpp>
-#include <com/sun/star/form/FormComponentType.hpp>
-#include <com/sun/star/form/TabulatorCycle.hpp>
-#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/io/XObjectInputStream.hpp>
-#include <com/sun/star/io/XObjectOutputStream.hpp>
-#include <com/sun/star/sdb/CommandType.hpp>
-#include <com/sun/star/sdb/RowSetVetoException.hpp>
-#include <com/sun/star/sdb/SQLContext.hpp>
-#include <com/sun/star/sdb/XColumnUpdate.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/XRowSet.hpp>
-#include <com/sun/star/sdbcx/Privilege.hpp>
-#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/util/XCancellable.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
+#include "componenttools.hxx" +#include "DatabaseForm.hxx" +#include "EventThread.hxx" +#include "frm_module.hxx" +#include "frm_resource.hrc" +#include "frm_resource.hxx" +#include "GroupManager.hxx" +#include "property.hrc" +#include "property.hxx" +#include "services.hxx" + +#include <com/sun/star/awt/XControlContainer.hpp> +#include <com/sun/star/awt/XTextComponent.hpp> +#include <com/sun/star/form/DataSelectionType.hpp> +#include <com/sun/star/form/FormComponentType.hpp> +#include <com/sun/star/form/TabulatorCycle.hpp> +#include <com/sun/star/frame/FrameSearchFlag.hpp> +#include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/frame/XDispatchProvider.hpp> +#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/io/XObjectInputStream.hpp> +#include <com/sun/star/io/XObjectOutputStream.hpp> +#include <com/sun/star/sdb/CommandType.hpp> +#include <com/sun/star/sdb/RowSetVetoException.hpp> +#include <com/sun/star/sdb/SQLContext.hpp> +#include <com/sun/star/sdb/XColumnUpdate.hpp> +#include <com/sun/star/sdbc/DataType.hpp> +#include <com/sun/star/sdbc/ResultSetConcurrency.hpp> +#include <com/sun/star/sdbc/ResultSetType.hpp> +#include <com/sun/star/sdbc/XRowSet.hpp> +#include <com/sun/star/sdbcx/Privilege.hpp> +#include <com/sun/star/sdbcx/XColumnsSupplier.hpp> +#include <com/sun/star/util/XCancellable.hpp> +#include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/util/XModifiable2.hpp> -
-#include <comphelper/basicio.hxx>
-#include <comphelper/container.hxx>
-#include <comphelper/enumhelper.hxx>
-#include <comphelper/extract.hxx>
-#include <comphelper/seqstream.hxx>
-#include <comphelper/sequence.hxx>
-#include <comphelper/stl_types.hxx>
-#include <comphelper/uno3.hxx>
-#include <connectivity/dbtools.hxx>
-#include <cppuhelper/exc_hlp.hxx>
-#include <cppuhelper/implbase2.hxx>
-#include <osl/mutex.hxx>
-#include <rtl/math.hxx>
-#include <rtl/tencinfo.h>
-#include <svl/inetstrm.hxx>
-#include <svl/inettype.hxx>
-#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <tools/fsys.hxx>
-#include <tools/inetmsg.hxx>
-#include <tools/urlobj.hxx>
-#include <unotools/ucblockbytes.hxx>
-#include <unotools/ucbstreamhelper.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/timer.hxx>
-#include <vos/mutex.hxx>
- -#include <ctype.h>
-#include <hash_map>
-//#include <stdio.h>
+ +#include <comphelper/basicio.hxx> +#include <comphelper/container.hxx> +#include <comphelper/enumhelper.hxx> +#include <comphelper/extract.hxx> +#include <comphelper/seqstream.hxx> +#include <comphelper/sequence.hxx> +#include <comphelper/stl_types.hxx> +#include <comphelper/uno3.hxx> +#include <connectivity/dbtools.hxx> +#include <cppuhelper/exc_hlp.hxx> +#include <cppuhelper/implbase2.hxx> +#include <osl/mutex.hxx> +#include <rtl/math.hxx> +#include <rtl/tencinfo.h> +#include <svl/inetstrm.hxx> +#include <svl/inettype.hxx> +#include <tools/debug.hxx> +#include <tools/diagnose_ex.h> +#include <tools/fsys.hxx> +#include <tools/inetmsg.hxx> +#include <tools/urlobj.hxx> +#include <unotools/ucblockbytes.hxx> +#include <unotools/ucbstreamhelper.hxx> +#include <vcl/svapp.hxx> +#include <vcl/timer.hxx> +#include <vos/mutex.hxx> + +#include <ctype.h> +#include <hash_map> // compatiblity: DatabaseCursorType is dead, but for compatiblity reasons we still have to write it ... namespace com { @@ -2629,16 +2628,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 ); } //------------------------------------------------------------------------------ @@ -2646,12 +2644,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(); @@ -2879,7 +2879,7 @@ sal_Bool ODatabaseForm::implEnsureConnection() } catch( Exception ) { - DBG_ERROR( "ODatabaseForm::implEnsureConnection: caught an exception which I cannot handle!" ); + DBG_UNHANDLED_EXCEPTION(); } return sal_False; |