diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-06-06 13:08:24 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-06-06 13:08:24 +0000 |
commit | 98b466188702bb5c21e5e5ed9059c1c62ae3ef7b (patch) | |
tree | 62b0c8e2c0e42aec8854c53ef1cc8c3d2b272d31 /dbaccess/source | |
parent | c2838a5035c80e0d0e6c7658423bbae1546465b0 (diff) |
INTEGRATION: CWS dba30c (1.88.2); FILE MERGED
2008/05/13 08:57:09 fs 1.88.2.1: joining changes from CWS odbmacros3 to CWS dba30c:
2008/04/13 19:29:16 fs 1.84.6.1: diagnostics
2008/04/15 13:12:03 fs 1.84.6.2: RESYNC: (1.84-1.87); FILE MERGED
2008/05/07 08:35:25 fs 1.84.6.3: #i49133# XController2 implementation, now used by our loader
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 909450521c84..1052a2fa3505 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: genericcontroller.cxx,v $ - * $Revision: 1.88 $ + * $Revision: 1.89 $ * * This file is part of OpenOffice.org. * @@ -260,11 +260,6 @@ IMPL_LINK(OGenericUnoController, OnAsyncInvalidateAll, void*, EMPTYARG) return 0L; } // ----------------------------------------------------------------------------- -Reference< XWindow > OGenericUnoController::getComponentWindow() const -{ - return VCLUnoHelper::GetInterface( getView() ); -} -// ----------------------------------------------------------------------------- void OGenericUnoController::impl_initialize() { } @@ -301,28 +296,26 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen } try { - if ( xFrame.is() ) - { - xParent = xFrame->getContainerWindow(); - VCLXWindow* pParentComponent = VCLXWindow::GetImplementation(xParent); - Window* pParentWin = pParentComponent ? pParentComponent->GetWindow() : NULL; - if (!pParentWin) - { - throw Exception(::rtl::OUString::createFromAscii("Parent window is null"),*this); - } + if ( !xFrame.is() ) + throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "need a frame" ) ), *this, 1 ); - m_aInitParameters.assign( aArguments ); - Construct( pParentWin ); - if ( !getView() ) - throw Exception(::rtl::OUString::createFromAscii("Window is null"),*this); - } - else + xParent = xFrame->getContainerWindow(); + VCLXWindow* pParentComponent = VCLXWindow::GetImplementation(xParent); + Window* pParentWin = pParentComponent ? pParentComponent->GetWindow() : NULL; + if (!pParentWin) { - OSL_ENSURE(0,"OGenericUnoController::initialize: Frame is null!"); + throw IllegalArgumentException( ::rtl::OUString::createFromAscii( "Parent window is null" ), *this, 1 ); } + + m_aInitParameters.assign( aArguments ); + Construct( pParentWin ); + ODataView* pView = getView(); - if ( (m_bReadOnly || m_bPreview) && pView ) - pView->EnableInput(FALSE); + if ( !pView ) + throw RuntimeException( ::rtl::OUString::createFromAscii( "unable to create a view" ), *this ); + + if ( m_bReadOnly || m_bPreview ) + pView->EnableInput( FALSE ); impl_initialize(); } @@ -333,8 +326,6 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen m_pView = NULL; throw e; } - if ( xFrame.is() ) - xFrame->setComponent(getComponentWindow(), this); } //------------------------------------------------------------------------------ @@ -386,6 +377,18 @@ void OGenericUnoController::modified(const EventObject& aEvent) throw( RuntimeEx InvalidateFeature(ID_BROWSER_UNDO); } // ----------------------------------------------------------------------- +Reference< XWindow > SAL_CALL OGenericUnoController::getComponentWindow() throw (RuntimeException) +{ + return VCLUnoHelper::GetInterface( getView() ); +} + +// ----------------------------------------------------------------------- +::rtl::OUString SAL_CALL OGenericUnoController::getViewControllerName() throw (::com::sun::star::uno::RuntimeException) +{ + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Default" ) ); +} + +// ----------------------------------------------------------------------- void OGenericUnoController::attachFrame( const Reference< XFrame >& _rxFrame ) throw( RuntimeException ) { vos::OGuard aSolarGuard( Application::GetSolarMutex() ); |