summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-10 11:29:34 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-10 11:29:34 +0100
commit4f8f578855d93e0821ade20218ec8269e4cb8b8c (patch)
tree2d5c11e930f1fe8958bec38953e2ea6d11c41795 /dbaccess
parent876b084e800056097a71f75fe134511ccacce227 (diff)
autorecovery: when saving to a new location, dispose the forms/reports container after disposing the storages they're based on
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 33ecdf3311ce..c4355d5bdc1b 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1023,6 +1023,12 @@ void ODatabaseDocument::impl_storeAs_throw( const ::rtl::OUString& _rURL, const
m_pImpl->disposeStorages();
+ // each and every document definition obtained via m_xForms and m_xReports depends
+ // on the sub storages which we just disposed. So, dispose the forms/reports collections, too.
+ // This ensures that they're re-created when needed.
+ clearObjectContainer( m_xForms );
+ clearObjectContainer( m_xReports );
+
xNewRootStorage = m_pImpl->switchToStorage( xTargetStorage );
m_pImpl->m_bDocumentReadOnly = sal_False;