LCOV - code coverage report
Current view: top level - libreoffice/dbaccess/source/ui/inc - unodatbr.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 8 0.0 %
Date: 2012-12-27 Functions: 0 11 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef _SBA_UNODATBR_HXX_
      21             : #define _SBA_UNODATBR_HXX_
      22             : 
      23             : #include "brwctrlr.hxx"
      24             : #include <com/sun/star/sdbc/XConnection.hpp>
      25             : #include <comphelper/stl_types.hxx>
      26             : #include <com/sun/star/frame/XStatusListener.hpp>
      27             : #include <com/sun/star/frame/XDispatch.hpp>
      28             : #include <com/sun/star/container/XContainerListener.hpp>
      29             : #include <com/sun/star/i18n/XCollator.hpp>
      30             : #include <com/sun/star/view/XSelectionSupplier.hpp>
      31             : #include <com/sun/star/awt/XWindow.hpp>
      32             : #include <com/sun/star/document/XScriptInvocationContext.hpp>
      33             : #include <com/sun/star/ui/XContextMenuInterception.hpp>
      34             : #include <com/sun/star/sdb/application/DatabaseObject.hpp>
      35             : #include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
      36             : #include <com/sun/star/sdb/XDatabaseRegistrationsListener.hpp>
      37             : #include <cppuhelper/implbase5.hxx>
      38             : #include "callbacks.hxx"
      39             : #include <vcl/timer.hxx>
      40             : #include <svtools/transfer.hxx>
      41             : #include <svx/dataaccessdescriptor.hxx>
      42             : #include <sot/storage.hxx>
      43             : #include "TableCopyHelper.hxx"
      44             : #include "commontypes.hxx"
      45             : 
      46             : // =========================================================================
      47             : class SvTreeListEntry;
      48             : class Splitter;
      49             : struct SvSortData;
      50             : 
      51             : namespace com { namespace sun{ namespace star { namespace container { class XNameContainer; } } } }
      52             : 
      53             : class SvTreeList;
      54             : // .........................................................................
      55             : namespace dbaui
      56             : {
      57             : // .........................................................................
      58             : 
      59             :     class DBTreeView;
      60             :     struct DBTreeEditedEntry;
      61             :     class ImageProvider;
      62             : 
      63             :     // =====================================================================
      64             :     typedef ::cppu::ImplHelper5 <   ::com::sun::star::frame::XStatusListener
      65             :                                 ,   ::com::sun::star::view::XSelectionSupplier
      66             :                                 ,   ::com::sun::star::document::XScriptInvocationContext
      67             :                                 ,   ::com::sun::star::ui::XContextMenuInterception
      68             :                                 ,   ::com::sun::star::sdb::XDatabaseRegistrationsListener
      69             :                                 >   SbaTableQueryBrowser_Base;
      70             :     class SbaTableQueryBrowser
      71             :                 :public SbaXDataBrowserController
      72             :                 ,public SbaTableQueryBrowser_Base
      73             :                 ,public IControlActionListener
      74             :                 ,public IContextMenuProvider
      75             :     {
      76             :     protected:
      77             : 
      78             :         // ---------------------------
      79             :         ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator >   m_xCollator;
      80             :         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >     m_xCurrentFrameParent;
      81             :         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >      m_xMainToolbar;
      82             : 
      83             :         // ---------------------------
      84           0 :         struct ExternalFeature
      85             :         {
      86             :             ::com::sun::star::util::URL     aURL;
      87             :             ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
      88             :                                             xDispatcher;
      89             :             sal_Bool                        bEnabled;
      90             : 
      91           0 :             ExternalFeature() : bEnabled( sal_False ) { }
      92           0 :             ExternalFeature( const ::com::sun::star::util::URL& _rURL ) : aURL( _rURL ), bEnabled( sal_False ) { }
      93             :         };
      94             : 
      95             :         typedef ::std::map< sal_uInt16, ExternalFeature, ::std::less< sal_uInt16 > >  ExternalFeaturesMap;
      96             :         ExternalFeaturesMap     m_aExternalFeatures;
      97             : 
      98             :         ::svx::ODataAccessDescriptor    m_aDocumentDataSource;
      99             :             // if we're part of a document, this is the state of the DocumentDataSource slot
     100             : 
     101             :         ::cppu::OInterfaceContainerHelper   m_aSelectionListeners;
     102             :         ::cppu::OInterfaceContainerHelper   m_aContextMenuInterceptors;
     103             : 
     104             :         OTableCopyHelper::DropDescriptor    m_aAsyncDrop;
     105             :         OTableCopyHelper                    m_aTableCopyHelper;
     106             : 
     107             :         ::rtl::OUString         m_sQueryCommand;    // the command of the query currently loaded (if any)
     108             :         //::rtl::OUString         m_sToBeLoaded;      // contains the element name which should be loaded if any
     109             : 
     110             :         DBTreeView*             m_pTreeView;
     111             :         Splitter*               m_pSplitter;
     112             :         SvTreeList*         m_pTreeModel;           // contains the datasources of the registry
     113             :         SvTreeListEntry*            m_pCurrentlyDisplayed;
     114             :         sal_uLong                   m_nAsyncDrop;
     115             : 
     116             :         sal_Int16               m_nBorder;              // sal_True when border should be shown
     117             : 
     118             :         sal_Bool                m_bQueryEscapeProcessing : 1;   // the escape processing flag of the query currently loaded (if any)
     119             :         sal_Bool                m_bShowMenu;            // if sal_True the menu should be visible otherwise not
     120             :         sal_Bool                m_bInSuspend;
     121             :         sal_Bool                m_bEnableBrowser;
     122             :         ::boost::optional< bool >
     123             :                                 m_aDocScriptSupport;    // relevant if and only if we are associated with exactly one DBDoc
     124             : 
     125             : 
     126             :         virtual ::rtl::OUString getPrivateTitle( ) const;
     127             :     // attribute access
     128             :     public:
     129             :         SbaTableQueryBrowser(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
     130             :         ~SbaTableQueryBrowser();
     131             : 
     132             :         enum EntryType
     133             :         {
     134             :             // don't change the above definitions! There are places (in particular SbaTableQueryBrowser::getCurrentSelection)
     135             :             // which rely on the fact that the EntryType values really equal the DatabaseObject(Container) values!
     136             :             etDatasource     = ::com::sun::star::sdb::application::DatabaseObjectContainer::DATA_SOURCE,
     137             :             etQueryContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer::QUERIES,
     138             :             etTableContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer::TABLES,
     139             :             etQuery          = ::com::sun::star::sdb::application::DatabaseObject::QUERY,
     140             :             etTableOrView    = ::com::sun::star::sdb::application::DatabaseObject::TABLE,
     141             :             etUnknown        = -1
     142             :         };
     143             : 
     144             :         /** returns a DatabaseObject value corresponding to the given EntryType
     145             :             @param _eType
     146             :                 the entry type. Must not be etUnknown.
     147             :         */
     148             :         static sal_Int32    getDatabaseObjectType( EntryType _eType );
     149             : 
     150             :         // need by registration
     151             :         static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
     152             :         static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
     153             :         static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
     154             :                 SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
     155             : 
     156           0 :         DECLARE_UNO3_DEFAULTS(SbaTableQueryBrowser,SbaXDataBrowserController);
     157             :         // late construction
     158             :         virtual sal_Bool Construct(Window* pParent);
     159             :         // XInterface
     160             :         virtual ::com::sun::star::uno::Any  SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
     161             : 
     162             :         // XTypeProvider
     163             :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw (::com::sun::star::uno::RuntimeException);
     164             :         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw (::com::sun::star::uno::RuntimeException);
     165             : 
     166             :         // ::com::sun::star::beans::XPropertyChangeListener
     167             :         virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
     168             : 
     169             :         // ::com::sun::star::frame::XController
     170             :         virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
     171             :         virtual void SAL_CALL attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( ::com::sun::star::uno::RuntimeException );
     172             : 
     173             :         // ::com::sun::star::lang::XComponent
     174             :         virtual void        SAL_CALL disposing();
     175             : 
     176             :         // XStatusListener
     177             :         virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
     178             : 
     179             :         // XEventListener
     180             :         virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
     181             : 
     182             :         // XSelectionSupplier
     183             :         virtual sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& aSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
     184             :         virtual ::com::sun::star::uno::Any SAL_CALL getSelection(  ) throw (::com::sun::star::uno::RuntimeException);
     185             :         virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
     186             :         virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
     187             : 
     188             :         // XServiceInfo
     189             :         virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
     190             :         virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
     191             : 
     192             :         // XContainerListener
     193             :         virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
     194             :         virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
     195             :         virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
     196             :         // ::com::sun::star::frame::XFrameActionListener
     197             :         virtual void SAL_CALL frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
     198             : 
     199             :         //IController
     200             :         virtual void notifyHiContrastChanged();
     201             : 
     202             :         // XScriptInvocationContext
     203             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > SAL_CALL getScriptContainer() throw (::com::sun::star::uno::RuntimeException);
     204             : 
     205             :         // XContextMenuInterception
     206             :         virtual void SAL_CALL registerContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
     207             :         virtual void SAL_CALL releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
     208             : 
     209             :         // XDatabaseRegistrationsListener
     210             :         virtual void SAL_CALL registeredDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
     211             :         virtual void SAL_CALL revokedDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
     212             :         virtual void SAL_CALL changedDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
     213             : 
     214             :     protected:
     215             :         // SbaXDataBrowserController overridables
     216             :         virtual sal_Bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties );
     217             :         virtual sal_Bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid);
     218             : 
     219             :         virtual sal_Bool preReloadForm();
     220             :         virtual void     postReloadForm();
     221             : 
     222             :         virtual void addModelListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel);
     223             :         virtual void removeModelListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel);
     224             : 
     225             :         virtual void AddColumnListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xCol);
     226             :         virtual void RemoveColumnListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xCol);
     227             : 
     228             :         virtual void LoadFinished(sal_Bool _bWasSynch);
     229             : 
     230             :         virtual void criticalFail();
     231             : 
     232             :         virtual void            describeSupportedFeatures();
     233             :         virtual FeatureState    GetState(sal_uInt16 nId) const;
     234             :         virtual void            Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
     235             : 
     236             :         // IControlActionListener overridables
     237             :         virtual sal_Bool    requestQuickHelp( const SvTreeListEntry* _pEntry, String& _rText ) const;
     238             :         virtual sal_Bool    requestDrag( sal_Int8 _nAction, const Point& _rPosPixel );
     239             :         virtual sal_Int8    queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors );
     240             :         virtual sal_Int8    executeDrop( const ExecuteDropEvent& _rEvt );
     241             : 
     242             :         // IContextMenuProvider
     243             :         virtual PopupMenu*      getContextMenu( Control& _rControl ) const;
     244             :         virtual IController&    getCommandController();
     245             :         virtual ::cppu::OInterfaceContainerHelper*
     246             :                                 getContextMenuInterceptors();
     247             :         virtual ::com::sun::star::uno::Any
     248             :                                 getCurrentSelection( Control& _rControl ) const;
     249             : 
     250             :         virtual void impl_initialize();
     251             : 
     252             :         // SbaGridListener overridables
     253             :         virtual void RowChanged();
     254             :         virtual void ColumnChanged();
     255             :         virtual void SelectionChanged();
     256             : 
     257             :         // methods for showing/hiding the explorer part
     258             :         sal_Bool    haveExplorer() const;
     259             :         void        hideExplorer();
     260             :         void        showExplorer();
     261           0 :         void        toggleExplorer() { if (haveExplorer()) hideExplorer(); else showExplorer(); }
     262             : 
     263             :         // methods for handling the 'selection' (paintin them bold) of SvLBoxEntries
     264             :         // returns <TRUE/> if the entry is selected (which means it's part of the selected path)
     265             :         sal_Bool    isSelected(SvTreeListEntry* _pEntry) const;
     266             :         // select the entry (and only the entry, not the whole path)
     267             :         void        select(SvTreeListEntry* _pEntry, sal_Bool _bSelect = sal_True);
     268             :         // select the path of the entry (which must be an entry without children)
     269             :         void        selectPath(SvTreeListEntry* _pEntry, sal_Bool _bSelect = sal_True);
     270             : 
     271             :         virtual void loadMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame);
     272             : 
     273             :     private:
     274             :         // check the state of the external slot given, update any UI elements if necessary
     275             :         void implCheckExternalSlot( sal_uInt16 _nId );
     276             : 
     277             :         // connect to the external dispatchers (if any)
     278             :         void connectExternalDispatches();
     279             : 
     280             :         /** get the state of an external slot
     281             :             <p>The slot is available if an external dispatcher is responsible for it, _and_ if this dispatcher
     282             :             told us the slot is available.</p>
     283             :         */
     284             :         sal_Bool    getExternalSlotState( sal_uInt16 _nId ) const;
     285             : 
     286             :         /** add an entry (including the subentries for queries/tables) to the list model
     287             : 
     288             :             <p>The given names and images may be empty, in this case they're filled with the correct
     289             :             values. This way they may be reused for the next call, which saves some resource manager calls.</p>
     290             :         */
     291             :         void implAddDatasource(const String& _rDbName, Image& _rDbImage,
     292             :                 String& _rQueryName, Image& _rQueryImage,
     293             :                 String& _rTableName, Image& _rTableImage,
     294             :                 const SharedConnection& _rxConnection
     295             :             );
     296             : 
     297             :         void    implAddDatasource( const String& _rDataSourceName, const SharedConnection& _rxConnection );
     298             : 
     299             :         /// removes (and cleans up) the entry for the given data source
     300             :         void        impl_cleanupDataSourceEntry( const String& _rDataSourceName );
     301             : 
     302             :         /// clears the tree list box
     303             :         void clearTreeModel();
     304             : 
     305             :         /** unloads the form, empties the grid model, cleans up anything related to the currently displayed object
     306             :             @param _bDisposeConnection
     307             :                 <TRUE/> if the connection should be disposed
     308             :             @param _bFlushData
     309             :                 <TRUE/> if the currently displayed object (if any) should be flushed
     310             :         */
     311             :         void unloadAndCleanup( sal_Bool _bDisposeConnection = sal_True );
     312             : 
     313             :         // disposes the connection associated with the given entry (which must represent a data source)
     314             :         void        disposeConnection( SvTreeListEntry* _pDSEntry );
     315             : 
     316             :         /// flushs and disposes the given connection, and de-registers as listener
     317             :         void        impl_releaseConnection( SharedConnection& _rxConnection );
     318             : 
     319             :         /** close the connection (and collapse the list entries) of the given list entries
     320             :         */
     321             :         void        closeConnection(SvTreeListEntry* _pEntry,sal_Bool _bDisposeConnection = sal_True);
     322             : 
     323             :         void        populateTree(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xNameAccess, SvTreeListEntry* _pParent, EntryType _eEntryType);
     324             :         void        initializeTreeModel();
     325             : 
     326             :         /** search in the tree for query- or tablecontainer equal to this interface and return
     327             :             this container entry
     328             :         */
     329             :         SvTreeListEntry* getEntryFromContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxNameAccess);
     330             :         // return true when there is connection available
     331             :         sal_Bool ensureConnection(SvTreeListEntry* _pDSEntry, void * pDSData, SharedConnection& _rConnection );
     332             :         sal_Bool ensureConnection(SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection );
     333             : 
     334             :         sal_Bool getExistentConnectionFor( SvTreeListEntry* _pDSEntry, SharedConnection& _rConnection );
     335             :         /** returns an image provider which works with the connection belonging to the given entry
     336             :         */
     337             :         ::std::auto_ptr< ImageProvider >
     338             :                 getImageProviderFor( SvTreeListEntry* _pAnyEntry );
     339             : 
     340             :         void    implAdministrate( SvTreeListEntry* _pApplyTo );
     341             : 
     342             :         TransferableHelper*
     343             :                 implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, sal_Bool _bAllowConnection = sal_True );
     344             : 
     345             :         EntryType getEntryType( const SvTreeListEntry* _pEntry ) const;
     346             :         EntryType   getChildType( SvTreeListEntry* _pEntry ) const;
     347           0 :         sal_Bool    isObject( EntryType _eType ) const { return ( etTableOrView== _eType ) || ( etQuery == _eType ); }
     348           0 :         sal_Bool    isContainer( EntryType _eType ) const { return (etTableContainer == _eType) || (etQueryContainer == _eType); }
     349           0 :         bool isContainer( const SvTreeListEntry* _pEntry ) const { return isContainer( getEntryType( _pEntry ) ); }
     350             : 
     351             :         // ensure that the xObject for the given entry is set on the user data
     352             :         sal_Bool    ensureEntryObject( SvTreeListEntry* _pEntry );
     353             : 
     354             :         // get the display text of the entry given
     355             :         String      GetEntryText( SvTreeListEntry* _pEntry ) const;
     356             : 
     357             :         // is called when a table or a query was selected
     358             :         DECL_LINK( OnSelectionChange, void* );
     359             :         DECL_LINK( OnExpandEntry, SvTreeListEntry* );
     360             : 
     361             :         DECL_LINK( OnCopyEntry, void* );
     362             : 
     363             :         DECL_LINK( OnTreeEntryCompare, const SvSortData* );
     364             : 
     365             :         DECL_LINK( OnAsyncDrop, void* );
     366             : 
     367             :         void implRemoveStatusListeners();
     368             : 
     369             :         sal_Bool implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor,sal_Bool _bSelectDirect = sal_False);
     370             :         bool implSelect( SvTreeListEntry* _pEntry );
     371             : 
     372             :         /// selects the entry given and loads the grid control with the object's data
     373             :         sal_Bool implSelect(
     374             :             const ::rtl::OUString& _rDataSourceName,
     375             :             const ::rtl::OUString& _rCommand,
     376             :             const sal_Int32 _nCommandType,
     377             :             const sal_Bool _bEscapeProcessing,
     378             :             const SharedConnection& _rxConnection,
     379             :             sal_Bool _bSelectDirect = sal_False
     380             :         );
     381             : 
     382             :         SvTreeListEntry* implGetConnectionEntry(SvTreeListEntry* _pEntry) const;
     383             :         /// inserts an entry into the tree
     384             :         SvTreeListEntry* implAppendEntry(
     385             :             SvTreeListEntry* _pParent,
     386             :             const String& _rName,
     387             :             void* _pUserData,
     388             :             EntryType _eEntryType
     389             :         );
     390             : 
     391             :         /// loads the grid control with the data object specified (which may be a table, a query or a command)
     392             :         sal_Bool implLoadAnything(const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rCommand,
     393             :             const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection = SharedConnection() );
     394             : 
     395             :         /** retrieves the tree entry for the object described by <arg>_rDescriptor</arg>
     396             :             @param _rDescriptor
     397             :                 the object descriptor
     398             :             @param _ppDataSourceEntry
     399             :                 If not <NULL/>, the data source tree entry will be returned here
     400             :             @param _ppContainerEntry
     401             :                 If not <NULL/>, the object container tree entry will be returned here
     402             :             @param _bExpandAncestors
     403             :                 If <TRUE/>, all ancestor on the way to the entry will be expanded
     404             :         */
     405             :         SvTreeListEntry* getObjectEntry(const ::svx::ODataAccessDescriptor& _rDescriptor,
     406             :             SvTreeListEntry** _ppDataSourceEntry = NULL, SvTreeListEntry** _ppContainerEntry = NULL,
     407             :             sal_Bool _bExpandAncestors = sal_True
     408             :         );
     409             :         /** retrieves the tree entry for the object described by data source name, command and command type
     410             :             @param _rDataSource
     411             :                 the data source name
     412             :             @param _rCommand
     413             :                 the command
     414             :             @param _nCommandType
     415             :                 the command type
     416             :             @param _rDescriptor
     417             :                 the object descriptor
     418             :             @param _ppDataSourceEntry
     419             :                 If not <NULL/>, the data source tree entry will be returned here
     420             :             @param _ppContainerEntry
     421             :                 If not <NULL/>, the object container tree entry will be returned here
     422             :             @param _bExpandAncestors
     423             :                 If <TRUE/>, all ancestor on the way to the entry will be expanded
     424             :         */
     425             :         SvTreeListEntry* getObjectEntry(
     426             :             const ::rtl::OUString& _rDataSource, const ::rtl::OUString& _rCommand, sal_Int32 _nCommandType,
     427             :             SvTreeListEntry** _ppDataSourceEntry = NULL, SvTreeListEntry** _ppContainerEntry = NULL,
     428             :             sal_Bool _bExpandAncestors = sal_True,
     429             :             const SharedConnection& _rxConnection = SharedConnection()
     430             :         );
     431             : 
     432             :         /// checks if m_aDocumentDataSource describes a known object
     433             :         void checkDocumentDataSource();
     434             : 
     435             :         void extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor,
     436             :             ::rtl::OUString& _rDataSource, ::rtl::OUString& _rCommand, sal_Int32& _rCommandType, sal_Bool& _rEscapeProcessing);
     437             : 
     438             :         void transferChangedControlProperty(const ::rtl::OUString& _rProperty, const ::com::sun::star::uno::Any& _rNewValue);
     439             : 
     440             :         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > connectWithStatus(
     441             :             const ::rtl::OUString& _rDataSourceName,
     442             :             void* _pTreeListUserData    // in rela a DBTreeListUserData*, but we do not know this class here ....
     443             :         );
     444             : 
     445             : #if OSL_DEBUG_LEVEL > 0
     446             :         // checks whether the given tree entry denotes a data source
     447             :         bool impl_isDataSourceEntry( SvTreeListEntry* _pEntry ) const;
     448             : #endif
     449             : 
     450             :         /// retrieves the data source URL/name for the given entry representing a data source
     451             :         String  getDataSourceAcessor( SvTreeListEntry* _pDataSourceEntry ) const;
     452             : 
     453             :         /** get the signature (command/escape processing) of the query the form is based on
     454             :             <p>If the for is not based on a query or not even loaded, nothing happens and <FALSE/> is returned.</p>
     455             :         */
     456             :         sal_Bool implGetQuerySignature( ::rtl::OUString& _rCommand, sal_Bool& _bEscapeProcessing );
     457             : 
     458             :         sal_Bool isEntryCopyAllowed(SvTreeListEntry* _pEntry) const;
     459             : 
     460             :         void copyEntry(SvTreeListEntry* _pEntry);
     461             : 
     462             :         // remove all grid columns and dispose them
     463             :         void clearGridColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _xColContainer);
     464             : 
     465             :         /** checks if the currently displayed entry changed
     466             :             @param  _sName
     467             :                     Name of the changed entry
     468             :             @param  _pContainer
     469             :                     The container of the displayed entry
     470             :             @return
     471             :                     <TRUE/> if it is the currently displayed otherwise <FALSE/>
     472             :         */
     473             :         sal_Bool isCurrentlyDisplayedChanged(const String& _sName,SvTreeListEntry* _pContainer);
     474             : 
     475             :         /** called whenever the content of the browser is used for preview, as the very last action
     476             :             of the load process
     477             :         */
     478             :         void initializePreviewMode();
     479             : 
     480             :         /** checks whether the Order/Filter clauses set at our row set are valid, removes them if not so
     481             :         */
     482             :         void    impl_sanitizeRowSetClauses_nothrow();
     483             :     };
     484             : 
     485             : // .........................................................................
     486             : }   // namespace dbaui
     487             : // .........................................................................
     488             : 
     489             : #endif // _SBA_UNODATBR_HXX_
     490             : 
     491             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10