Tag: cws_src680_asyncdialogs2 User: pb Date: 2008-05-27 07:59:38+0000 Removed: dba/dbaccess/source/ui/inc/dsntypes.hxx dba/dbaccess/util/defs/wntmsci11
Modified: dba/dbaccess/source/ui/app/AppController.cxx dba/dbaccess/source/ui/app/AppController.hxx dba/dbaccess/source/ui/dlg/ConnectionHelper.cxx dba/dbaccess/source/ui/dlg/ConnectionHelper.hxx Log: RESYNC: (1.56-1.60); FILE MERGED File Changes: Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppController.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.37.34.13&r2=1.37.34.14 Delta lines: +157 -99 ---------------------- --- AppController.cxx 2008-04-08 08:05:41+0000 1.37.34.13 +++ AppController.cxx 2008-05-27 07:58:07+0000 1.37.34.14 @@ -1,35 +1,30 @@ /************************************************************************* * + * 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$ - * * $Revision$ * - * last change: $Author$ $Date$ - * - * The Contents of this file are made available subject to - * the terms of GNU Lesser General Public License Version 2.1. - * + * This file is part of OpenOffice.org. * - * GNU Lesser General Public License Version 2.1 - * ============================================= - * Copyright 2005 by Sun Microsystems, Inc. - * 901 San Antonio Road, Palo Alto, CA 94303, USA + * 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. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, + * 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 for more details. + * 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 along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * 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. * ************************************************************************/ @@ -70,6 +65,15 @@ #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <com/sun/star/frame/XModel2.hpp> +#include <com/sun/star/container/XHierarchicalNameContainer.hpp> +#include <com/sun/star/util/XModifyBroadcaster.hpp> +#include <com/sun/star/util/XModifiable.hpp> +#include <com/sun/star/frame/XStorable.hpp> +#include <com/sun/star/frame/FrameSearchFlag.hpp> +#include <com/sun/star/util/XFlushable.hpp> +#include "com/sun/star/ui/dialogs/TemplateDescription.hpp" +#include "com/sun/star/beans/NamedValue.hpp" +#include <com/sun/star/awt/XTopWindow.hpp> /** === end UNO includes === **/ #ifndef _TOOLS_DEBUG_HXX @@ -99,6 +103,9 @@ #ifndef _CPPUHELPER_TYPEPROVIDER_HXX_ #include <cppuhelper/typeprovider.hxx> #endif +#ifndef _CPPUHELPER_EXC_HLP_HXX_ +#include <cppuhelper/exc_hlp.hxx> +#endif #ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include <connectivity/dbtools.hxx> #endif @@ -236,6 +243,7 @@ //........................................................................ using namespace ::dbtools; using namespace ::svx; +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::view; @@ -368,7 +376,7 @@ ::std::for_each(m_aCurrentContainers.begin(),m_aCurrentContainers.end(),XContainerFunctor(this)); m_aCurrentContainers.clear(); - + m_aSpecialSubFrames.clear(); m_aDocuments.clear(); if ( getView() ) @@ -520,6 +528,13 @@ ::std::compose1(::std::bind2nd(::std::equal_to<Reference<XComponent> >(),xComp),::std::select1st<TDocuments::value_type>())); if ( aFind != m_aDocuments.end() ) m_aDocuments.erase(aFind); + + TFrames::iterator aFind2 = ::std::find_if(m_aSpecialSubFrames.begin(),m_aSpecialSubFrames.end(), + ::std::compose1(::std::bind2nd(::std::equal_to<Reference<XComponent> >(),xComp), + ::std::compose1(::std::select2nd<TTypeFrame>(),::std::select2nd<TFrames::value_type>()))); + if ( aFind2 != m_aSpecialSubFrames.end() ) + m_aSpecialSubFrames.erase(aFind2); + } if ( xContainer.is() ) { @@ -804,10 +819,15 @@ { ::std::vector< ::rtl::OUString > aSelected; getSelectionElementNames( aSelected ); - OSL_ENSURE( aSelected.size() == 1, "OApplicationController::GetState: inconsistency!" ); - if ( aSelected.size() == 1 ) - if ( impl_isAlterableView_nothrow( aSelected[0] ) ) - aReturn.bEnabled = sal_True; + bool bAlterableViews = true; + for ( ::std::vector< ::rtl::OUString >::const_iterator selectedName = aSelected.begin(); + bAlterableViews && ( selectedName != aSelected.end() ) ; + ++selectedName + ) + { + bAlterableViews &= impl_isAlterableView_nothrow( *selectedName ); + } + aReturn.bEnabled = bAlterableViews; } break; default: @@ -1039,7 +1059,8 @@ ) sFolderNameToInsertInto = *aList.begin(); } - paste( eType, OComponentTransferable::extractComponentDescriptor( rTransferData ), sFolderNameToInsertInto ); + paste( eType, OComponentTransferable::extractComponentDescriptor( rTransferData ), + sFolderNameToInsertInto ); } break; } @@ -1245,32 +1266,35 @@ case SID_DB_APP_QUERY_EDIT: case SID_DB_APP_FORM_EDIT: case SID_DB_APP_REPORT_EDIT: - doAction(_nId,OLinkedDocumentsAccess::OPEN_DESIGN); + doAction( _nId, E_OPEN_DESIGN ); break; case SID_DB_APP_OPEN: case SID_DB_APP_TABLE_OPEN: case SID_DB_APP_QUERY_OPEN: case SID_DB_APP_FORM_OPEN: case SID_DB_APP_REPORT_OPEN: - doAction(_nId,OLinkedDocumentsAccess::OPEN_NORMAL); + doAction( _nId, E_OPEN_NORMAL ); break; case SID_DB_APP_CONVERTTOVIEW: - doAction(_nId,OLinkedDocumentsAccess::OPEN_NORMAL); + doAction( _nId, E_OPEN_NORMAL ); break; case SID_SELECTALL: getContainer()->selectAll(); InvalidateAll(); break; case SID_DB_APP_DSRELDESIGN: + if ( !impl_activateSubFrame_throw(::rtl::OUString(),SID_DB_APP_DSRELDESIGN,E_OPEN_DESIGN) ) { SharedConnection xConnection( ensureConnection() ); if ( xConnection.is() ) { - RelationDesigner aDesigner( getORB(), this, getFrame() ); + RelationDesigner aDesigner( getORB(), this, m_aCurrentFrame.getFrame() ); Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY ); Reference< XComponent > xComponent( aDesigner.createNew( xDataSource ), UNO_QUERY ); addDocumentListener( xComponent, NULL ); - } + m_aSpecialSubFrames.insert(TFrames::value_type(::rtl::OUString(), + TTypeFrame(TTypeOpenMode(SID_DB_APP_DSRELDESIGN,E_OPEN_DESIGN),xComponent))); + } // if ( xConnection.is() ) } break; case SID_DB_APP_DSUSERADMIN: @@ -1341,7 +1365,7 @@ } break; case SID_DB_APP_SENDREPORTASMAIL: - doAction(_nId,OLinkedDocumentsAccess::OPEN_FORMAIL); + doAction( _nId, E_OPEN_FOR_MAIL ); break; } } @@ -1367,7 +1391,7 @@ { xStore->storeAsURL(aURL.GetMainURL( INetURLObject::NO_DECODE ),Sequence<PropertyValue>()); m_sDatabaseName = ::rtl::OUString(); - updateTitle(); + /*updateTitle();*/ m_bCurrentlyModified = sal_False; InvalidateFeature(ID_BROWSER_SAVEDOC); if ( getContainer()->getElementType() == E_NONE ) @@ -1621,7 +1645,7 @@ } catch( Exception& ) { - OSL_ENSURE(0,"Exception catched"); + DBG_UNHANDLED_EXCEPTION(); } } } @@ -1726,7 +1750,7 @@ openElement( getContainer()->getQualifiedName( _pTree->GetHdlEntry() ), getContainer()->getElementType(), - OLinkedDocumentsAccess::OPEN_NORMAL + E_OPEN_NORMAL ); return true; // handled } @@ -1765,11 +1789,21 @@ // ----------------------------------------------------------------------------- Reference< XComponent > OApplicationController::openElement(const ::rtl::OUString& _sName, ElementType _eType, - OLinkedDocumentsAccess::EOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand ) + ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand ) { - OSL_ENSURE(getContainer(),"View is NULL! -> GPF"); + return openElementWithArguments( _sName, _eType, _eOpenMode, _nInstigatorCommand, ::comphelper::NamedValueCollection() ); +} + +// ----------------------------------------------------------------------------- +Reference< XComponent > OApplicationController::openElementWithArguments( const ::rtl::OUString& _sName, ElementType _eType, + ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand, const ::comphelper::NamedValueCollection& _rAdditionalArguments ) +{ + OSL_PRECOND( getContainer(), "OApplicationController::openElementWithArguments: no view!" ); + if ( !getContainer() ) + return NULL; + Reference< XComponent > xRet; - if ( _eOpenMode == OLinkedDocumentsAccess::OPEN_DESIGN ) + if ( _eOpenMode == E_OPEN_DESIGN ) { // OJ: http://www.openoffice.org/issues/show_bug.cgi?id=30382 getContainer()->showPreview(NULL); @@ -1780,12 +1814,15 @@ case E_REPORT: case E_FORM: { - ::std::auto_ptr<OLinkedDocumentsAccess> aHelper = getDocumentsAccess(_eType); + ::std::auto_ptr< OLinkedDocumentsAccess > aHelper = getDocumentsAccess( _eType ); + if ( !aHelper->isConnected() ) + break; + Reference< XComponent > xDefinition; - xRet.set(aHelper->open(_sName, xDefinition,_eOpenMode),UNO_QUERY); - if (_eOpenMode == OLinkedDocumentsAccess::OPEN_DESIGN || _eType == E_FORM ) + xRet = aHelper->open( _sName, xDefinition, _eOpenMode, _rAdditionalArguments ); + + if (_eOpenMode == E_OPEN_DESIGN || _eType == E_FORM ) { - // // LLA: close only if in EDIT mode addDocumentListener(xRet,xDefinition); } } @@ -1794,51 +1831,54 @@ case E_QUERY: case E_TABLE: { + if ( !impl_activateSubFrame_throw(_sName,_eType,_eOpenMode) ) + { + SharedConnection xConnection( ensureConnection() ); if ( !xConnection.is() ) break; ::std::auto_ptr< DatabaseObjectView > pDesigner; - Sequence < PropertyValue > aArgs; + ::comphelper::NamedValueCollection aArguments( _rAdditionalArguments ); + Any aDataSource; - if ( _eOpenMode == OLinkedDocumentsAccess::OPEN_DESIGN ) + if ( _eOpenMode == E_OPEN_DESIGN ) { sal_Bool bQuerySQLMode =( _nInstigatorCommand == SID_DB_APP_EDIT_SQL_VIEW ); if ( _eType == E_TABLE ) { if ( impl_isAlterableView_nothrow( _sName ) ) - pDesigner.reset( new QueryDesigner( getORB(), this, getFrame(), true, bQuerySQLMode ) ); + pDesigner.reset( new QueryDesigner( getORB(), this, m_aCurrentFrame.getFrame(), true, bQuerySQLMode ) ); else - pDesigner.reset( new TableDesigner( getORB(), this, getFrame() ) ); + pDesigner.reset( new TableDesigner( getORB(), this, m_aCurrentFrame.getFrame() ) ); } else if ( _eType == E_QUERY ) { - pDesigner.reset( new QueryDesigner( getORB(), this, getFrame(), false, bQuerySQLMode ) ); - } - else if ( _eType == E_REPORT ) - { - pDesigner.reset( new ReportDesigner( getORB(),this, getFrame() ) ); + pDesigner.reset( new QueryDesigner( getORB(), this, m_aCurrentFrame.getFrame(), false, bQuerySQLMode ) ); } aDataSource <<= m_xDataSource; } else { - pDesigner.reset( new ResultSetBrowser( getORB(), this, getFrame(), _eType == E_TABLE ) ); + pDesigner.reset( new ResultSetBrowser( getORB(), this, m_aCurrentFrame.getFrame(), _eType == E_TABLE ) ); - aArgs.realloc(1); - aArgs[0].Name = PROPERTY_SHOWMENU; - aArgs[0].Value <<= sal_True; + if ( !aArguments.has( (::rtl::OUString)PROPERTY_SHOWMENU ) ) + aArguments.put( (::rtl::OUString)PROPERTY_SHOWMENU, makeAny( (sal_Bool)sal_True ) ); aDataSource <<= getDatabaseName(); } - Reference< XComponent > xComponent( pDesigner->openExisting( aDataSource, _sName, aArgs ), UNO_QUERY ); + Reference< XComponent > xComponent( pDesigner->openExisting( aDataSource, _sName, aArguments.getPropertyValues() ), UNO_QUERY ); addDocumentListener( xComponent, NULL ); + m_aSpecialSubFrames.insert(TFrames::value_type(_sName, + TTypeFrame(TTypeOpenMode(_eType,_eOpenMode),xComponent))); + } } break; default: + OSL_ENSURE( false, "OApplicationController::openElement: illegal object type!" ); break; } return xRet; @@ -1884,9 +1924,9 @@ { Reference< XComponent > xComponent,xDefinition; if ( E_QUERY == _eType ) - xComponent = aHelper->newQueryWithPilot( ); + xComponent = aHelper->newQueryWithPilot(); else - xComponent = aHelper->newTableWithPilot( ); + xComponent = aHelper->newTableWithPilot(); addDocumentListener(xComponent,xDefinition); } } @@ -1916,7 +1956,6 @@ break; case E_QUERY: case E_TABLE: - { ::std::auto_ptr< DatabaseObjectView > pDesigner; SharedConnection xConnection( ensureConnection() ); @@ -1930,8 +1969,6 @@ { pDesigner.reset( new QueryDesigner( getORB(), this, getFrame(), false, _bSQLView ) ); } - else - pDesigner.reset( new ReportDesigner( getORB(), this, getFrame() ) ); Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY ); Reference< XComponent > xComponent( pDesigner->createNew( xDataSource ), UNO_QUERY ); @@ -1960,9 +1997,9 @@ } } } - catch(Exception&) + catch( const Exception& ) { - OSL_ENSURE(0,"Exception catched!"); + DBG_UNHANDLED_EXCEPTION(); } } // ----------------------------------------------------------------------------- @@ -2089,9 +2126,9 @@ bTryAgain = sal_False; } - catch(const SQLException& e) + catch(const SQLException& ) { - showError(SQLExceptionInfo(e)); + showError( SQLExceptionInfo( ::cppu::getCaughtException() ) ); } catch(const ElementExistException& e) @@ -2103,7 +2140,7 @@ } catch(const Exception& ) { - OSL_ENSURE(0,"Exception catched!"); + DBG_UNHANDLED_EXCEPTION(); } } else @@ -2114,7 +2151,7 @@ } catch(const Exception& ) { - OSL_ENSURE(0,"Exception catched!"); + DBG_UNHANDLED_EXCEPTION(); } } // ----------------------------------------------------------------------------- @@ -2185,13 +2222,13 @@ break; } } - catch(SQLException e) + catch( const SQLException& ) { - showError(e); + showError( SQLExceptionInfo( ::cppu::getCaughtException() ) ); } - catch(Exception) + catch(const Exception& ) { - OSL_ENSURE(0,"Exception catched while previewing!"); + DBG_UNHANDLED_EXCEPTION(); } pView->showPreview(xContent); @@ -2281,7 +2318,7 @@ } catch(const Exception& ) { - OSL_ENSURE(0,"Exception catched!"); + DBG_UNHANDLED_EXCEPTION(); } } @@ -2580,9 +2617,9 @@ m_ePreviewMode = static_cast<PreviewMode>(nValue); } } - catch(Exception) + catch( const Exception& ) { - OSL_ENSURE( false, "OApplicationController::attachModel: caught an exception while doing the property stuff!" ); + DBG_UNHANDLED_EXCEPTION(); } } @@ -2619,9 +2656,9 @@ sName = getContainer()->getQualifiedName( NULL ); OSL_ENSURE( sName.getLength(), "OApplicationController::newElementWithPilot: no name given!" ); } - catch(Exception) + catch( const Exception& ) { - OSL_ENSURE( 0, "OApplicationController::newElementWithPilot: Exception catched!" ); + DBG_UNHANDLED_EXCEPTION(); } } return sName; @@ -2688,7 +2725,6 @@ return makeAny(aCurrentSelection); } - // ----------------------------------------------------------------------------- void OApplicationController::impl_migrateScripts_nothrow() { @@ -2716,6 +2752,28 @@ } } +// ----------------------------------------------------------------------------- +bool OApplicationController::impl_activateSubFrame_throw(const ::rtl::OUString& _sName,const sal_Int32 _nKind,const ElementOpenMode _eOpenMode) const +{ + bool bFound = false; + TFrames::const_iterator aFind = m_aSpecialSubFrames.find(_sName); + for(;aFind != m_aSpecialSubFrames.end();++aFind) + { + if ( aFind->second.first.first == _nKind && aFind->second.first.second == _eOpenMode ) + { + const Reference< XFrame> xFrame(aFind->second.second,UNO_QUERY); + if ( xFrame.is() ) + { + Reference< awt::XTopWindow> xTopWindow(xFrame->getContainerWindow(),UNO_QUERY); + if ( xTopWindow.is() ) + xTopWindow->toFront(); + bFound = true; + } + break; + } // if ( aFind->second.first.first == _nKind && aFind->second.first.second == _eOpenMode ) + } // while ( aFind != m_aSpecialSubFrames.end() ) + return bFound; +} //........................................................................ } // namespace dbaui //........................................................................ Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppController.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.hxx?r1=1.15.38.9&r2=1.15.38.10 Delta lines: +63 -30 --------------------- --- AppController.hxx 2008-04-07 09:29:44+0000 1.15.38.9 +++ AppController.hxx 2008-05-27 07:58:11+0000 1.15.38.10 @@ -1,35 +1,30 @@ /************************************************************************* * + * 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$ - * * $Revision$ * - * last change: $Author$ $Date$ - * - * The Contents of this file are made available subject to - * the terms of GNU Lesser General Public License Version 2.1. - * - * - * GNU Lesser General Public License Version 2.1 - * ============================================= - * Copyright 2005 by Sun Microsystems, Inc. - * 901 San Antonio Road, Palo Alto, CA 94303, USA + * This file is part of OpenOffice.org. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software Foundation. + * 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. * - * This library is distributed in the hope that it will be useful, + * 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 for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * 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. * ************************************************************************/ @@ -55,6 +50,7 @@ /** === end UNO includes === **/ #include <comphelper/stl_types.hxx> +#include <comphelper/namedvaluecollection.hxx> #include <comphelper/uno3.hxx> #include <cppuhelper/implbase3.hxx> #include <sot/storage.hxx> @@ -110,6 +106,10 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > TComponent; typedef ::std::map< TComponent, TComponent > TDocuments; + typedef ::std::pair< sal_Int32, ElementOpenMode > TTypeOpenMode; + typedef ::std::pair< TTypeOpenMode , TComponent > TTypeFrame; + typedef ::std::multimap< ::rtl::OUString, TTypeFrame > TFrames; + private: OTableCopyHelper::DropDescriptor m_aAsyncDrop; @@ -129,6 +129,7 @@ m_aModelConnector; TContainerVector m_aCurrentContainers; // the containers where we are listener on TDocuments m_aDocuments; + TFrames m_aSpecialSubFrames; // contains the query, table and relation frame ODsnTypeCollection m_aTypeCollection; OTableCopyHelper m_aTableCopyHelper; TransferableClipboardListener* @@ -148,6 +149,12 @@ OApplicationView* getContainer() const; + + /** activates the current table, query or relation design frame when existing + @param _sName the name of the component + @param _nKind the kind of the component + */ + bool impl_activateSubFrame_throw(const ::rtl::OUString& _sName,const sal_Int32 _nKind,const ElementOpenMode _eOpenMode) const; /** returns the database name @return the database name @@ -180,10 +187,20 @@ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > openElement( const ::rtl::OUString& _sName, ElementType _eType, - OLinkedDocumentsAccess::EOpenMode _eOpenMode, + ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand = 0 ); + /** opens a new sub frame with a table/query/form/report/view, passing additional arguments + */ + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > openElementWithArguments( + const ::rtl::OUString& _sName, + ElementType _eType, + ElementOpenMode _eOpenMode, + sal_uInt16 _nInstigatorCommand, + const ::comphelper::NamedValueCollection& _rAdditionalArguments + ); + /** opens a new frame for creation or auto pilot @param _eType Defines the type to open @@ -267,8 +284,6 @@ /// returns the nameaccess ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getElements(ElementType _eType); - /// - /** returns the document access for the specific type @param _eType the type @@ -391,9 +406,9 @@ @param _nId The slot which should be executed. @param _eOpenMode - Defines the mode of opening. @see OLinkedDocumentsAccess::EOpenMode + Defines the mode of opening. @see ElementOpenMode */ - void doAction(sal_uInt16 _nId ,OLinkedDocumentsAccess::EOpenMode _eOpenMode); + void doAction(sal_uInt16 _nId ,ElementOpenMode _eOpenMode); /** returns the currently selected table or query name. * @@ -420,7 +435,19 @@ */ void impl_migrateScripts_nothrow(); + /** verifies the object type denotes a valid DatabaseObject, and the object name denotes an existing + object of this type. Throws if not. + */ + void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::rtl::OUString& _rObjectName ); + protected: + // ---------------------------------------------------------------- + // initalizing members + /** forces usage of a connection which we do not own + <p>To be used from within XInitialization::initialize only.</p> + */ + void initializeConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxForeignConn ); + // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot. virtual FeatureState GetState(sal_uInt16 nId) const; // execute a feature @@ -434,9 +461,13 @@ virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt ); // OGenericUnoController - virtual void updateTitle( ); virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getPrivateModel() const + { + return m_xModel; + } + virtual ~OApplicationController(); public: @@ -475,6 +506,8 @@ virtual ::sal_Bool SAL_CALL isConnected( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL connect( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL closeSubComponents( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponent( ::sal_Int32 ObjectType, const ::rtl::OUString& ObjectName, ::sal_Bool ForEditing ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponentWithArguments( ::sal_Int32 ObjectType, const ::rtl::OUString& ObjectName, ::sal_Bool ForEditing, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); // XSelectionSupplier virtual ::sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& xSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); Directory: /dba/dbaccess/source/ui/dlg/ ======================================= File [changed]: ConnectionHelper.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/ConnectionHelper.cxx?r1=1.11.48.7&r2=1.11.48.8 Delta lines: +23 -28 --------------------- --- ConnectionHelper.cxx 2007-12-10 09:25:26+0000 1.11.48.7 +++ ConnectionHelper.cxx 2008-05-27 07:58:15+0000 1.11.48.8 @@ -1,35 +1,30 @@ /************************************************************************* * + * 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$ - * * $Revision$ * - * last change: $Author$ $Date$ - * - * The Contents of this file are made available subject to - * the terms of GNU Lesser General Public License Version 2.1. + * 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. * - * GNU Lesser General Public License Version 2.1 - * ============================================= - * Copyright 2005 by Sun Microsystems, Inc. - * 901 San Antonio Road, Palo Alto, CA 94303, USA - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, + * 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 for more details. + * 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 along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * 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. * ************************************************************************/ @@ -328,9 +323,9 @@ SetRoadmapStateValue(sal_True); callModifiedHdl(); } - catch(const Exception&) + catch( const Exception& ) { - DBG_ERROR("OConnectionHelper::OnBrowseConnections: caught an exception while browsing for the path!"); + DBG_UNHANDLED_EXCEPTION(); } } break; Directory: /dba/dbaccess/source/ui/dlg/ ======================================= File [changed]: ConnectionHelper.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/ConnectionHelper.hxx?r1=1.4.232.3&r2=1.4.232.4 Delta lines: +25 -30 --------------------- --- ConnectionHelper.hxx 2007-06-26 06:33:18+0000 1.4.232.3 +++ ConnectionHelper.hxx 2008-05-27 07:58:18+0000 1.4.232.4 @@ -1,35 +1,30 @@ /************************************************************************* * + * 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$ - * * $Revision$ * - * last change: $Author$ $Date$ - * - * The Contents of this file are made available subject to - * the terms of GNU Lesser General Public License Version 2.1. + * 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. * - * GNU Lesser General Public License Version 2.1 - * ============================================= - * Copyright 2005 by Sun Microsystems, Inc. - * 901 San Antonio Road, Palo Alto, CA 94303, USA - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, + * 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 for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * 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. * ************************************************************************/ Directory: /dba/dbaccess/source/ui/inc/ ======================================= File [removed]: dsntypes.hxx Directory: /dba/dbaccess/util/defs/ =================================== File [removed]: wntmsci11 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
