summaryrefslogtreecommitdiff
path: root/dbaccess/source/core/dataaccess/databasedocument.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/core/dataaccess/databasedocument.cxx')
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx38
1 files changed, 18 insertions, 20 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 00dca6ea51c0..7f74aa3a5f34 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -40,18 +40,10 @@
#include "documenteventexecutor.hxx"
#include "databasecontext.hxx"
#include "documentcontainer.hxx"
-
-#include <comphelper/documentconstants.hxx>
-#include <comphelper/namedvaluecollection.hxx>
-#include <comphelper/enumhelper.hxx>
-#include <comphelper/numberedcollection.hxx>
-#include <comphelper/genericpropertyset.hxx>
-#include <comphelper/property.hxx>
-#include <svtools/saveopt.hxx>
-
-#include <framework/titlehelper.hxx>
+#include "sdbcoretools.hxx"
/** === begin UNO includes === **/
+#include <com/sun/star/beans/Optional.hpp>
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
@@ -71,14 +63,17 @@
/** === end UNO includes === **/
#include <comphelper/documentconstants.hxx>
-#include <comphelper/interaction.hxx>
#include <comphelper/enumhelper.hxx>
+#include <comphelper/genericpropertyset.hxx>
+#include <comphelper/interaction.hxx>
#include <comphelper/mediadescriptor.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/numberedcollection.hxx>
+#include <comphelper/property.hxx>
#include <comphelper/storagehelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <framework/titlehelper.hxx>
+#include <svtools/saveopt.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include <tools/errcode.hxx>
@@ -175,6 +170,7 @@ ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>&
,m_bAllowDocumentScripting( false )
{
DBG_CTOR(ODatabaseDocument,NULL);
+ OSL_TRACE( "DD: ctor: %p: %p", this, m_pImpl.get() );
osl_incrementInterlockedCount( &m_refCount );
{
@@ -201,6 +197,7 @@ ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>&
{
// if the previous incarnation of the DatabaseDocument already had an URL, then creating this incarnation
// here is effectively loading the document.
+ // #i105505# / 2009-10-01 / frank.schoenheit@sun.com
m_aViewMonitor.onLoadedDocument();
}
}
@@ -209,6 +206,7 @@ ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>&
//--------------------------------------------------------------------------
ODatabaseDocument::~ODatabaseDocument()
{
+ OSL_TRACE( "DD: dtor: %p: %p", this, m_pImpl.get() );
DBG_DTOR(ODatabaseDocument,NULL);
if ( !ODatabaseDocument_OfficeDocument::rBHelper.bInDispose && !ODatabaseDocument_OfficeDocument::rBHelper.bDisposed )
{
@@ -815,13 +813,11 @@ void ODatabaseDocument::impl_storeAs_throw( const ::rtl::OUString& _rURL, const
throw;
}
- Exception aExcept;
- aError >>= aExcept;
-
- ::rtl::OUString sErrorMessage = ResourceManager::loadString(
+ ::rtl::OUString sErrorMessage = extractExceptionMessage( m_pImpl->m_aContext, aError );
+ sErrorMessage = ResourceManager::loadString(
RID_STR_ERROR_WHILE_SAVING,
- "$except$", aError.getValueTypeName(),
- "$message$", aExcept.Message
+ "$location$", _rURL,
+ "$message$", sErrorMessage
);
throw IOException( sErrorMessage, *this );
}
@@ -979,10 +975,11 @@ void SAL_CALL ODatabaseDocument::storeToURL( const ::rtl::OUString& _rURL, const
Exception aExcept;
aError >>= aExcept;
- ::rtl::OUString sErrorMessage = ResourceManager::loadString(
+ ::rtl::OUString sErrorMessage = extractExceptionMessage( m_pImpl->m_aContext, aError );
+ sErrorMessage = ResourceManager::loadString(
RID_STR_ERROR_WHILE_SAVING,
- "$except$", aError.getValueTypeName(),
- "$message$", aExcept.Message
+ "$location$", _rURL,
+ "$message$", sErrorMessage
);
throw IOException( sErrorMessage, *this );
}
@@ -1462,6 +1459,7 @@ void ODatabaseDocument::impl_notifyStorageChange_nolck_nothrow( const Reference<
//------------------------------------------------------------------------------
void ODatabaseDocument::disposing()
{
+ OSL_TRACE( "DD: disp: %p: %p", this, m_pImpl.get() );
if ( !m_pImpl.is() )
{
// this means that we're already disposed