summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser/dataview.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-01-05 22:32:38 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-01-05 22:32:38 +0100
commit845b04c98a87700e7443e5a16e66098103d43d46 (patch)
tree76cd089e83376c8ca1bc5974096dd0199e788e4b /dbaccess/source/ui/browser/dataview.cxx
parent1f3b28fe29a7e59d23f9f0cee9eff8e16370df4b (diff)
autorecovery: define a new css.document.XDocumentRecovery interface, implement it in both SFX and DBACCESS, and use it in the autorecovery
In this course, the auto recovery learned to restore multiple views of a document. Also, in the course of the change, the LoadDispatchListener became superfluous, and was removed. Also, the loader code in dbaccess was slightly adjusted, since now the connectController call is in the responsibility of the loader, and must not happen inside the XController::attachModel call anymore. This change made the ModelControllerConnector class superfluous, so it has been removed, too.
Diffstat (limited to 'dbaccess/source/ui/browser/dataview.cxx')
-rw-r--r--dbaccess/source/ui/browser/dataview.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx
index 538925125425..a66f6ec6d11a 100644
--- a/dbaccess/source/ui/browser/dataview.cxx
+++ b/dbaccess/source/ui/browser/dataview.cxx
@@ -40,6 +40,7 @@
#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
#endif
+#include <comphelper/namedvaluecollection.hxx>
#ifndef _SFXAPP_HXX //autogen wg. SFX_APP
#include <sfx2/app.hxx>
#endif
@@ -61,6 +62,7 @@
#ifndef _SVTOOLS_IMGDEF_HXX
#include <svtools/imgdef.hxx>
#endif
+#include <tools/diagnose_ex.h>
//.........................................................................
namespace dbaui
@@ -221,6 +223,27 @@ namespace dbaui
// Check if we need to get new images for normal/high contrast mode
m_rController.notifyHiContrastChanged();
}
+
+ if ( nType == STATE_CHANGE_INITSHOW )
+ {
+ // now that there's a view which is finally visible, remove the "Hidden" value from the
+ // model's arguments.
+ try
+ {
+ Reference< XController > xController( m_rController.getXController(), UNO_SET_THROW );
+ Reference< XModel > xModel( xController->getModel(), UNO_QUERY );
+ if ( xModel.is() )
+ {
+ ::comphelper::NamedValueCollection aArgs( xModel->getArgs() );
+ aArgs.remove( "Hidden" );
+ xModel->attachResource( xModel->getURL(), aArgs.getPropertyValues() );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
}
// -----------------------------------------------------------------------------
void ODataView::DataChanged( const DataChangedEvent& rDCEvt )