User: rt      
Date: 2008-06-06 14:08:27+0000
Modified:
   dba/dbaccess/source/ui/browser/genericcontroller.cxx

Log:
 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

File Changes:

Directory: /dba/dbaccess/source/ui/browser/
===========================================

File [changed]: genericcontroller.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/genericcontroller.cxx?r1=1.88&r2=1.89
Delta lines:  +29 -26
---------------------
--- genericcontroller.cxx       2008-05-05 15:53:19+0000        1.88
+++ genericcontroller.cxx       2008-06-06 14:08:24+0000        1.89
@@ -260,11 +260,6 @@
        return 0L;
 }
 // 
-----------------------------------------------------------------------------
-Reference< XWindow > OGenericUnoController::getComponentWindow() const
-{
-       return VCLUnoHelper::GetInterface( getView() );
-}
-// 
-----------------------------------------------------------------------------
 void OGenericUnoController::impl_initialize()
 {
 }
@@ -301,28 +296,26 @@
        }
        try
        {
-               if ( xFrame.is() )
-               {
+               if ( !xFrame.is() )
+            throw IllegalArgumentException( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "need a frame" ) ), *this, 1 );
+
                        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);
+                       throw IllegalArgumentException( 
::rtl::OUString::createFromAscii( "Parent window is null" ), *this, 1 );
                        }
 
             m_aInitParameters.assign( aArguments );
                        Construct( pParentWin );
-            if ( !getView() )
-                throw Exception(::rtl::OUString::createFromAscii("Window is 
null"),*this);
-               }
-               else
-               {
-                       OSL_ENSURE(0,"OGenericUnoController::initialize: Frame 
is null!");
-               }
+
                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 @@
                m_pView = NULL;
                throw e;
        }
-       if ( xFrame.is() )
-               xFrame->setComponent(getComponentWindow(), this);
 }
 
 
//------------------------------------------------------------------------------
@@ -386,6 +377,18 @@
        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() );




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to