summaryrefslogtreecommitdiff
path: root/dbaccess
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
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')
-rw-r--r--dbaccess/inc/documentcontroller.hxx133
-rw-r--r--dbaccess/inc/singledoccontroller.hxx1
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx30
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.hxx14
-rw-r--r--dbaccess/source/filter/xml/dbloader2.cxx18
-rw-r--r--dbaccess/source/ui/app/AppController.cxx27
-rw-r--r--dbaccess/source/ui/app/AppController.hxx8
-rw-r--r--dbaccess/source/ui/browser/dataview.cxx23
-rw-r--r--dbaccess/source/ui/misc/documentcontroller.cxx150
-rw-r--r--dbaccess/source/ui/misc/makefile.mk1
10 files changed, 93 insertions, 312 deletions
diff --git a/dbaccess/inc/documentcontroller.hxx b/dbaccess/inc/documentcontroller.hxx
deleted file mode 100644
index a16e4c645b06..000000000000
--- a/dbaccess/inc/documentcontroller.hxx
+++ /dev/null
@@ -1,133 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: documentcontroller.hxx,v $
- * $Revision: 1.3.2.2 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#ifndef DBACCESS_SOURCE_UI_INC_DOCUMENTCONTROLLER_HXX
-#define DBACCESS_SOURCE_UI_INC_DOCUMENTCONTROLLER_HXX
-
-/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
-#include <com/sun/star/frame/XController.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
-#include <com/sun/star/frame/XModel.hpp>
-#endif
-#include <cppuhelper/weakref.hxx>
-/** === end UNO includes === **/
-
-#ifndef INCLUDED_DBACCESSDLLAPI_H
-#include "dbaccessdllapi.h"
-#endif
-//........................................................................
-namespace dbaui
-{
-//........................................................................
-
- //====================================================================
- //= ModelControllerConnector
- //====================================================================
- /** a helper class for controllers associated with an ->XModel
-
- Instances of this class take an ->XModel, which they connect to at
- construction time (->XModel::connectController), and disconnect from
- at destruction time (->XModel::disconnectController).
-
- Additionally, they keep the controller alive (by being a CloseVetoListener)
- as long as they themself are alive.
- */
- class DBACCESS_DLLPUBLIC ModelControllerConnector
- {
- private:
- typedef ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XModel > Model;
- typedef ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > Controller;
-
- Model m_xModel;
- Controller m_xController;
-
- public:
- /** constructs the object, and connects the controller to the model
-
- @param _rxModel
- the model to which the controller should be connected
- @param _rxController
- the controller which should be connected to the model
- */
- ModelControllerConnector(
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxModel,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& _rxController
- );
-
- /** connects the controller to the model
-
- @param _rxModel
- the model to which the controller should be connected
- @param _rxController
- the controller which should be connected to the model
- */
- void connect(
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxModel,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& _rxController
- );
-
- /** destroys the object, and disconnects the controller from the model
- */
- ~ModelControllerConnector();
-
- /** determines whether the object is empty
- */
- inline bool empty() const { return !m_xController.is(); }
-
- /** clears the object
-
- The controller is disconnected from the model, and references to the model and the controller
- are released.
- */
- inline void clear()
- {
- connect( NULL, NULL );
- }
-
- public:
- ModelControllerConnector();
- ModelControllerConnector( const ModelControllerConnector& _rSource );
- ModelControllerConnector& operator=( const ModelControllerConnector& _rSource );
-
- private:
- void impl_connect();
- void impl_disconnect();
- void impl_copyFrom( const ModelControllerConnector& _rSource );
- };
-
-//........................................................................
-} // namespace dbaui
-//........................................................................
-
-#endif // DBACCESS_SOURCE_UI_INC_DOCUMENTCONTROLLER_HXX
-
diff --git a/dbaccess/inc/singledoccontroller.hxx b/dbaccess/inc/singledoccontroller.hxx
index f63d1c02fdf2..1c5017ff2013 100644
--- a/dbaccess/inc/singledoccontroller.hxx
+++ b/dbaccess/inc/singledoccontroller.hxx
@@ -31,7 +31,6 @@
#ifndef DBAUI_SINGLEDOCCONTROLLER_HXX
#define DBAUI_SINGLEDOCCONTROLLER_HXX
-#include "documentcontroller.hxx"
#include "genericcontroller.hxx"
#include "IEnvironment.hxx"
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 00dca6ea51c0..f6f25b4adde1 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -539,6 +539,26 @@ void SAL_CALL ODatabaseDocument::load( const Sequence< PropertyValue >& _Argumen
}
// -----------------------------------------------------------------------------
+void SAL_CALL ODatabaseDocument::doEmergencySave( const ::rtl::OUString& i_TargetLocation, const Sequence< PropertyValue >& i_MediaDescriptor ) throw ( RuntimeException, IOException, WrappedTargetException )
+{
+ // for the moment, just delegate this to our "storeToURL" method
+ storeToURL( i_TargetLocation, i_MediaDescriptor );
+}
+
+// -----------------------------------------------------------------------------
+void SAL_CALL ODatabaseDocument::recoverDocument( const ::rtl::OUString& i_SourceLocation, const ::rtl::OUString& i_SalvagedFile, const Sequence< PropertyValue >& i_MediaDescriptor ) throw ( RuntimeException, IOException, WrappedTargetException )
+{
+ // for the moment, just delegate this to our "load" method
+ ::comphelper::NamedValueCollection aMediaDescriptor( i_MediaDescriptor );
+
+ // our load implementation expects the SalvagedFile and URL to be in the media descriptor
+ aMediaDescriptor.put( "SalvagedFile", i_SalvagedFile );
+ aMediaDescriptor.put( "URL", i_SourceLocation );
+
+ load( aMediaDescriptor.getPropertyValues() );
+}
+
+// -----------------------------------------------------------------------------
// XModel
sal_Bool SAL_CALL ODatabaseDocument::attachResource( const ::rtl::OUString& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (RuntimeException)
{
@@ -594,6 +614,16 @@ void SAL_CALL ODatabaseDocument::connectController( const Reference< XController
{
DocumentGuard aGuard( *this );
+#if OSL_DEBUG_LEVEL > 0
+ for ( Controllers::const_iterator controller = m_aControllers.begin();
+ controller != m_aControllers.end();
+ ++controller
+ )
+ {
+ OSL_ENSURE( *controller != _xController, "ODatabaseDocument::connectController: this controller is already connected!" );
+ }
+#endif
+
m_aControllers.push_back( _xController );
m_aEventNotifier.notifyDocumentEventAsync( "OnViewCreated", Reference< XController2 >( _xController, UNO_QUERY ) );
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx
index 3430a60e037d..8cdccc3561f7 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -60,11 +60,12 @@
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/document/XEventBroadcaster.hpp>
#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
+#include <com/sun/star/document/XDocumentRecovery.hpp>
/** === end UNO includes === **/
-#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_16)
-#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_16
-#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 16
+#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_17)
+#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_17
+#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 17
#include <comphelper/implbase_var.hxx>
#endif
@@ -143,7 +144,7 @@ private:
//============================================================
//= ODatabaseDocument
//============================================================
-typedef ::comphelper::WeakComponentImplHelper16 < ::com::sun::star::frame::XModel2
+typedef ::comphelper::WeakComponentImplHelper17 < ::com::sun::star::frame::XModel2
, ::com::sun::star::util::XModifiable
, ::com::sun::star::frame::XStorable
, ::com::sun::star::document::XEventBroadcaster
@@ -159,6 +160,7 @@ typedef ::comphelper::WeakComponentImplHelper16 < ::com::sun::star::frame::XMo
, ::com::sun::star::script::provider::XScriptProviderSupplier
, ::com::sun::star::document::XEventsSupplier
, ::com::sun::star::frame::XLoadable
+ , ::com::sun::star::document::XDocumentRecovery
> ODatabaseDocument_OfficeDocument;
typedef ::cppu::ImplHelper3< ::com::sun::star::frame::XTitle
@@ -425,6 +427,10 @@ public:
virtual void SAL_CALL initNew( ) throw (::com::sun::star::frame::DoubleInitializationException, ::com::sun::star::io::IOException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL load( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments ) throw (::com::sun::star::frame::DoubleInitializationException, ::com::sun::star::io::IOException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ // css.document.XDocumentRecovery
+ virtual void SAL_CALL doEmergencySave( const ::rtl::OUString& i_TargetLocation, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_MediaDescriptor ) throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::io::IOException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void SAL_CALL recoverDocument( const ::rtl::OUString& i_SourceLocation, const ::rtl::OUString& i_SalvagedFile, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_MediaDescriptor ) throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::io::IOException, ::com::sun::star::lang::WrappedTargetException );
+
// XTitle
virtual ::rtl::OUString SAL_CALL getTitle( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index 7310c2ca10ec..7f6b8286f03d 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -547,22 +547,20 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
}
}
- Reference< XController2 > xController;
if ( bSuccess )
{
try
{
Reference< XModel2 > xModel2( xModel, UNO_QUERY_THROW );
- xController = xModel2->createViewController( sViewName, Sequence< PropertyValue >(), rFrame );
+ Reference< XController2 > xController( xModel2->createViewController( sViewName, Sequence< PropertyValue >(), rFrame ), UNO_QUERY_THROW );
- bSuccess = xController.is();
- if ( bSuccess )
- {
- xController->attachModel( xModel );
- rFrame->setComponent( xController->getComponentWindow(), xController.get() );
- xController->attachFrame( rFrame );
- xModel->setCurrentController( xController.get() );
- }
+ xController->attachModel( xModel );
+ xModel->connectController( xController.get() );
+ rFrame->setComponent( xController->getComponentWindow(), xController.get() );
+ xController->attachFrame( rFrame );
+ xModel->setCurrentController( xController.get() );
+
+ bSuccess = sal_True;
}
catch( const Exception& )
{
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index b87b7706d87f..91efd04e5daa 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -534,7 +534,8 @@ void SAL_CALL OApplicationController::disposing()
}
}
- m_aModelConnector.clear();
+ m_xModel->disconnectController( this );
+
m_xModel.clear();
}
}
@@ -614,7 +615,6 @@ void SAL_CALL OApplicationController::disposing(const EventObject& _rSource) thr
else if ( _rSource.Source == m_xModel )
{
m_xModel.clear();
- m_aModelConnector.clear();
}
else if ( _rSource.Source == m_xDataSource )
{
@@ -2675,7 +2675,7 @@ Reference< XModel > SAL_CALL OApplicationController::getModel(void) throw( Runt
}
// -----------------------------------------------------------------------------
-void OApplicationController::onConnectedModel()
+void OApplicationController::onAttachedFrame()
{
sal_Int32 nConnectedControllers( 0 );
try
@@ -2704,9 +2704,15 @@ void OApplicationController::onConnectedModel()
// -----------------------------------------------------------------------------
IMPL_LINK( OApplicationController, OnFirstControllerConnected, void*, /**/ )
{
+ ::osl::MutexGuard aGuard( getMutex() );
+
+ if ( !m_xModel.is() )
+ {
+ OSL_ENSURE( false, "OApplicationController::OnFirstControllerConnected: too late!" );
+ }
+
// if we have forms or reports which contain macros/scripts, then show a warning
// which suggests the user to migrate them to the database document
-
Reference< XEmbeddedScripts > xDocumentScripts( m_xModel, UNO_QUERY );
if ( xDocumentScripts.is() )
{
@@ -2752,6 +2758,14 @@ IMPL_LINK( OApplicationController, OnFirstControllerConnected, void*, /**/ )
}
// -----------------------------------------------------------------------------
+void SAL_CALL OApplicationController::attachFrame( const Reference< XFrame > & i_rxFrame ) throw( RuntimeException )
+{
+ OApplicationController_CBASE::attachFrame( i_rxFrame );
+ if ( getFrame().is() )
+ onAttachedFrame();
+}
+
+// -----------------------------------------------------------------------------
sal_Bool SAL_CALL OApplicationController::attachModel(const Reference< XModel > & _rxModel) throw( RuntimeException )
{
::osl::MutexGuard aGuard( getMutex() );
@@ -2767,16 +2781,13 @@ sal_Bool SAL_CALL OApplicationController::attachModel(const Reference< XModel >
// at least: remove as property change listener from the old model/data source
m_xModel = _rxModel;
- if ( _rxModel.is() )
+ if ( m_xModel.is() )
{
m_xDocumentModify.set( m_xModel, UNO_QUERY_THROW );
- m_aModelConnector.connect( _rxModel, this );
- onConnectedModel();
}
else
{
m_xDocumentModify.clear();
- m_aModelConnector.clear();
}
m_xDataSource.set(xOfficeDoc.is() ? xOfficeDoc->getDataSource() : Reference<XDataSource>(),UNO_QUERY);
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index 96ca58d6f428..669eb181d3e3 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -35,7 +35,6 @@
#include "AppElementType.hxx"
#include "callbacks.hxx"
#include "commontypes.hxx"
-#include "documentcontroller.hxx"
#include "dsntypes.hxx"
#include "genericcontroller.hxx"
#include "linkeddocuments.hxx"
@@ -123,8 +122,6 @@ namespace dbaui
::cppu::OInterfaceContainerHelper
m_aContextMenuInterceptors;
- ModelControllerConnector
- m_aModelConnector;
TContainerVector m_aCurrentContainers; // the containers where we are listener on
::rtl::Reference< SubComponentManager >
m_pSubComponentManager;
@@ -396,12 +393,12 @@ namespace dbaui
*/
void showPreviewFor( const ElementType _eType,const ::rtl::OUString& _sName );
- /** called when we just connected to a new, non-NULL model
+ /** called we were attached to a frame
In particular, this is called *after* the controller has been announced to the model
(XModel::connectController)
*/
- void onConnectedModel();
+ void onAttachedFrame();
/// determines whether the given table name denotes a view which can be altered
bool impl_isAlterableView_nothrow( const ::rtl::OUString& _rTableOrViewName ) const;
@@ -455,6 +452,7 @@ namespace dbaui
SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
// ::com::sun::star::frame::XController
+ virtual void SAL_CALL attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException );
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 )
diff --git a/dbaccess/source/ui/misc/documentcontroller.cxx b/dbaccess/source/ui/misc/documentcontroller.cxx
deleted file mode 100644
index 523307d55013..000000000000
--- a/dbaccess/source/ui/misc/documentcontroller.cxx
+++ /dev/null
@@ -1,150 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: documentcontroller.cxx,v $
- * $Revision: 1.5.178.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_dbaccess.hxx"
-
-#include "documentcontroller.hxx"
-
-/** === begin UNO includes === **/
-/** === end UNO includes === **/
-
-#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
-
-//........................................................................
-namespace dbaui
-{
-//........................................................................
-
- using namespace ::com::sun::star::uno;
- using namespace ::com::sun::star::frame;
-
- //====================================================================
- //= ModelControllerConnector
- //====================================================================
- DBG_NAME( ModelControllerConnector )
- //--------------------------------------------------------------------
- ModelControllerConnector::ModelControllerConnector()
- {
- DBG_CTOR( ModelControllerConnector, NULL );
- }
-
- //--------------------------------------------------------------------
- ModelControllerConnector::ModelControllerConnector( const Reference< XModel >& _rxModel, const Reference< XController >& _rxController )
- :m_xModel( _rxModel )
- ,m_xController( _rxController )
- {
- DBG_CTOR( ModelControllerConnector, NULL );
- DBG_ASSERT( _rxModel.is() && m_xController.is(), "ModelControllerConnector::ModelControllerConnector: invalid model or controller!" );
- impl_connect();
- }
-
- //--------------------------------------------------------------------
- ModelControllerConnector::ModelControllerConnector( const ModelControllerConnector& _rSource )
- {
- DBG_CTOR( ModelControllerConnector, NULL );
- impl_copyFrom( _rSource );
- }
-
- //--------------------------------------------------------------------
- ModelControllerConnector& ModelControllerConnector::operator=( const ModelControllerConnector& _rSource )
- {
- if ( this != &_rSource )
- impl_copyFrom( _rSource );
- return *this;
- }
-
- //--------------------------------------------------------------------
- void ModelControllerConnector::connect( const Reference< XModel >& _rxModel, const Reference< XController >& _rxController )
- {
- impl_disconnect();
-
- m_xModel = _rxModel;
- m_xController = _rxController;
-
- impl_connect();
- }
-
- //--------------------------------------------------------------------
- void ModelControllerConnector::impl_copyFrom( const ModelControllerConnector& _rSource )
- {
- Model aNewModel( _rSource.m_xModel );
- Controller aNewController( _rSource.m_xController );
-
- impl_disconnect();
-
- m_xModel = aNewModel;
- m_xController = aNewController;
-
- impl_connect();
- }
-
- //--------------------------------------------------------------------
- ModelControllerConnector::~ModelControllerConnector()
- {
- impl_disconnect();
- DBG_DTOR( ModelControllerConnector, NULL );
- }
-
- //--------------------------------------------------------------------
- void ModelControllerConnector::impl_connect()
- {
- try
- {
- Reference< XModel > xModel = m_xModel;
- if ( xModel.is() && m_xController.is() )
- xModel->connectController( m_xController );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- }
-
- //--------------------------------------------------------------------
- void ModelControllerConnector::impl_disconnect()
- {
- try
- {
- Reference< XModel > xModel = m_xModel;
- if ( xModel.is() && m_xController.is() )
- xModel->disconnectController( m_xController );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- }
-
-//........................................................................
-} // namespace dbaui
-//........................................................................
-
diff --git a/dbaccess/source/ui/misc/makefile.mk b/dbaccess/source/ui/misc/makefile.mk
index e5db6954ea4d..f0d2ad133fff 100644
--- a/dbaccess/source/ui/misc/makefile.mk
+++ b/dbaccess/source/ui/misc/makefile.mk
@@ -76,7 +76,6 @@ SLOFILES= \
$(SLO)$/WColumnSelect.obj \
$(SLO)$/WExtendPages.obj \
$(SLO)$/WNameMatch.obj \
- $(SLO)$/documentcontroller.obj \
$(SLO)$/ToolBoxHelper.obj \
$(SLO)$/stringlistitem.obj \
$(SLO)$/charsets.obj \