Files
libreoffice/dbaccess/source/ui/inc/unodatbr.hxx

545 lines
27 KiB
C++
Raw Normal View History

2000-10-26 13:46:14 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-10-26 13:46:14 +00:00
*
* Copyright 2008 by Sun Microsystems, Inc.
2000-10-26 13:46:14 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-10-26 13:46:14 +00:00
*
* $RCSfile: unodatbr.hxx,v $
* $Revision: 1.74 $
2000-10-26 13:46:14 +00:00
*
* This file is part of OpenOffice.org.
2000-10-26 13:46:14 +00:00
*
* 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.
2000-10-26 13:46:14 +00:00
*
* 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).
2000-10-26 13:46:14 +00:00
*
* 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.
2000-10-26 13:46:14 +00:00
*
************************************************************************/
#ifndef _SBA_UNODATBR_HXX_
#define _SBA_UNODATBR_HXX_
#ifndef _SBA_BWRCTRLR_HXX
#include "brwctrlr.hxx"
#endif
#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
#endif
#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
#endif
#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
#include <com/sun/star/frame/XStatusListener.hpp>
#endif
#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
#include <com/sun/star/frame/XDispatch.hpp>
#endif
#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
#include <com/sun/star/container/XContainerListener.hpp>
#endif
#ifndef _COM_SUN_STAR_I18N_XCOLLATOR_HPP_
#include <com/sun/star/i18n/XCollator.hpp>
#endif
#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_
#include <com/sun/star/view/XSelectionSupplier.hpp>
#endif
#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
#include <com/sun/star/awt/XWindow.hpp>
#endif
#ifndef _COM_SUN_STAR_DOCUMENT_XSCRIPTINVOCATIONCONTEXT_HPP_
#include <com/sun/star/document/XScriptInvocationContext.hpp>
#endif
#ifndef _COM_SUN_STAR_UI_XCONTEXTMENUINTERCEPTION_HPP_
#include <com/sun/star/ui/XContextMenuInterception.hpp>
#endif
#ifndef _COM_SUN_STAR_SDB_APPLICATION_DATABASEOBJECT_HPP_
#include <com/sun/star/sdb/application/DatabaseObject.hpp>
#endif
#ifndef _COM_SUN_STAR_SDB_APPLICATION_DATABASEOBJECTCONTAINER_HPP_
#include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
#endif
#ifndef _COM_SUN_STAR_SDB_DATABASEOBJECTCONTAINER_HPP_
#include <com/sun/star/sdb/XDatabaseRegistrationsListener.hpp>
#endif
#ifndef _CPPUHELPER_IMPLBASE5_HXX_
#include <cppuhelper/implbase5.hxx>
#endif
#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#include "callbacks.hxx"
#endif
#ifndef _SV_TIMER_HXX
#include <vcl/timer.hxx>
#endif
#ifndef _TRANSFER_HXX
#include <svtools/transfer.hxx>
#endif
#ifndef _SVX_DATACCESSDESCRIPTOR_HXX_
#include <svx/dataaccessdescriptor.hxx>
#endif
2002-05-28 07:08:11 +00:00
#ifndef _SOT_STORAGE_HXX
#include <sot/storage.hxx>
#endif
#ifndef DBUI_TABLECOPYHELPER_HXX
#include "TableCopyHelper.hxx"
#endif
#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
#endif
2000-10-26 13:46:14 +00:00
// =========================================================================
class SvLBoxEntry;
class Splitter;
struct SvSortData;
2000-10-26 13:46:14 +00:00
namespace com { namespace sun{ namespace star { namespace container { class XNameContainer; } } } }
class SvLBoxTreeList;
// .........................................................................
2000-10-26 13:46:14 +00:00
namespace dbaui
{
// .........................................................................
2000-10-26 13:46:14 +00:00
class DBTreeView;
struct DBTreeEditedEntry;
class ImageProvider;
// =====================================================================
typedef ::cppu::ImplHelper5 < ::com::sun::star::frame::XStatusListener
, ::com::sun::star::view::XSelectionSupplier
, ::com::sun::star::document::XScriptInvocationContext
, ::com::sun::star::ui::XContextMenuInterception
, ::com::sun::star::sdb::XDatabaseRegistrationsListener
> SbaTableQueryBrowser_Base;
2000-10-26 13:46:14 +00:00
class SbaTableQueryBrowser
:public SbaXDataBrowserController
,public SbaTableQueryBrowser_Base
,public IControlActionListener
,public IContextMenuProvider
2000-10-26 13:46:14 +00:00
{
protected:
// ---------------------------
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > m_xCollator;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xCurrentFrameParent;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xMainToolbar;
// ---------------------------
struct ExternalFeature
{
::com::sun::star::util::URL aURL;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
xDispatcher;
sal_Bool bEnabled;
ExternalFeature() : bEnabled( sal_False ) { }
ExternalFeature( const ::com::sun::star::util::URL& _rURL ) : aURL( _rURL ), bEnabled( sal_False ) { }
};
typedef ::std::map< sal_uInt16, ExternalFeature, ::std::less< sal_uInt16 > > ExternalFeaturesMap;
ExternalFeaturesMap m_aExternalFeatures;
::svx::ODataAccessDescriptor m_aDocumentDataSource;
// if we're part of a document, this is the state of the DocumentDataSource slot
::cppu::OInterfaceContainerHelper m_aSelectionListeners;
::cppu::OInterfaceContainerHelper m_aContextMenuInterceptors;
OTableCopyHelper::DropDescriptor m_aAsyncDrop;
OTableCopyHelper m_aTableCopyHelper;
::rtl::OUString m_sQueryCommand; // the command of the query currently loaded (if any)
::rtl::OUString m_sToBeLoaded; // contains the element name which should be loaded if any
DBTreeView* m_pTreeView;
Splitter* m_pSplitter;
SvLBoxTreeList* m_pTreeModel; // contains the datasources of the registry
SvLBoxEntry* m_pCurrentlyDisplayed;
ULONG m_nAsyncDrop;
sal_Int16 m_nBorder; // TRUE when border should be shown
sal_Bool m_bQueryEscapeProcessing : 1; // the escape processing flag of the query currently loaded (if any)
sal_Bool m_bShowMenu; // if TRUE the menu should be visible otherwise not
sal_Bool m_bInSuspend;
sal_Bool m_bEnableBrowser;
::boost::optional< bool >
m_aDocScriptSupport; // relevant if and only if we are associated with exactly one DBDoc
virtual ::rtl::OUString getPrivateTitle( ) const;
2000-10-26 13:46:14 +00:00
// attribute access
public:
SbaTableQueryBrowser(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
~SbaTableQueryBrowser();
enum EntryType
{
// don't change the above definitions! There are places (in particular SbaTableQueryBrowser::getCurrentSelection)
// which rely on the fact that the EntryType values really equal the DatabaseObject(Container) values!
etDatasource = ::com::sun::star::sdb::application::DatabaseObjectContainer::DATA_SOURCE,
etQueryContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer::QUERIES,
etTableContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer::TABLES,
etQuery = ::com::sun::star::sdb::application::DatabaseObject::QUERY,
etTableOrView = ::com::sun::star::sdb::application::DatabaseObject::TABLE,
etUnknown = -1
};
/** returns a DatabaseObject value corresponding to the given EntryType
@param _eType
the entry type. Must not be etUnknown.
*/
static sal_Int32 getDatabaseObjectType( EntryType _eType );
2000-10-26 13:46:14 +00:00
// need by registration
static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
DECLARE_UNO3_DEFAULTS(SbaTableQueryBrowser,SbaXDataBrowserController);
2000-10-26 13:46:14 +00:00
// late construction
virtual sal_Bool Construct(Window* pParent);
// XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
// XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
2000-10-26 13:46:14 +00:00
// ::com::sun::star::beans::XPropertyChangeListener
2001-09-13 13:15:52 +00:00
virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
2000-10-26 13:46:14 +00:00
// ::com::sun::star::frame::XController
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( ::com::sun::star::uno::RuntimeException );
2000-11-06 16:38:57 +00:00
// ::com::sun::star::lang::XComponent
2001-03-01 14:17:55 +00:00
virtual void SAL_CALL disposing();
2000-11-06 16:38:57 +00:00
// XStatusListener
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
// XSelectionSupplier
virtual sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& aSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getSelection( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
2000-10-26 13:46:14 +00:00
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
// XContainerListener
virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::frame::XFrameActionListener
virtual void SAL_CALL frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
2002-04-29 07:23:25 +00:00
//IController
virtual void notifyHiContrastChanged();
// XScriptInvocationContext
virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > SAL_CALL getScriptContainer() throw (::com::sun::star::uno::RuntimeException);
// XContextMenuInterception
virtual void SAL_CALL registerContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
// XDatabaseRegistrationsListener
virtual void SAL_CALL registeredDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL revokedDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL changedDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
2000-10-26 13:46:14 +00:00
protected:
// SbaXDataBrowserController overridables
virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm);
virtual sal_Bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid);
virtual sal_Bool preReloadForm();
virtual void postReloadForm();
2000-10-26 13:46:14 +00:00
virtual void addModelListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel);
virtual void removeModelListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel);
virtual void AddColumnListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xCol);
virtual void RemoveColumnListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xCol);
2001-07-17 12:04:48 +00:00
virtual void LoadFinished(sal_Bool _bWasSynch);
virtual void criticalFail();
virtual void describeSupportedFeatures();
virtual FeatureState GetState(sal_uInt16 nId) const;
virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
// IControlActionListener overridables
virtual sal_Bool requestQuickHelp( const SvLBoxEntry* _pEntry, String& _rText ) const;
virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel );
virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors );
virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt );
// IContextMenuProvider
virtual PopupMenu* getContextMenu( Control& _rControl ) const;
virtual IController& getCommandController();
virtual ::cppu::OInterfaceContainerHelper*
getContextMenuInterceptors();
virtual ::com::sun::star::uno::Any
getCurrentSelection( Control& _rControl ) const;
virtual void impl_initialize();
// SbaGridListener overridables
virtual void RowChanged();
virtual void ColumnChanged();
virtual void SelectionChanged();
// methods for showing/hiding the explorer part
2000-12-08 20:16:38 +00:00
sal_Bool haveExplorer() const;
void hideExplorer();
void showExplorer();
void toggleExplorer() { if (haveExplorer()) hideExplorer(); else showExplorer(); }
// methods for handling the 'selection' (paintin them bold) of SvLBoxEntries
// returns <TRUE/> if the entry is selected (which means it's part of the selected path)
sal_Bool isSelected(SvLBoxEntry* _pEntry) const;
// select the entry (and only the entry, not the whole path)
void select(SvLBoxEntry* _pEntry, sal_Bool _bSelect = sal_True);
// select the path of the entry (which must be an entry without children)
void selectPath(SvLBoxEntry* _pEntry, sal_Bool _bSelect = sal_True);
virtual void loadMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame);
2000-10-26 13:46:14 +00:00
private:
// check the state of the external slot given, update any UI elements if necessary
void implCheckExternalSlot( sal_uInt16 _nId );
2000-10-26 13:46:14 +00:00
// connect to the external dispatchers (if any)
void connectExternalDispatches();
/** get the state of an external slot
<p>The slot is available if an external dispatcher is responsible for it, _and_ if this dispatcher
told us the slot is available.</p>
*/
sal_Bool getExternalSlotState( sal_uInt16 _nId ) const;
/** add an entry (including the subentries for queries/tables) to the list model
<p>The given names and images may be empty, in this case they're filled with the correct
values. This way they may be reused for the next call, which saves some resource manager calls.</p>
*/
void implAddDatasource(const String& _rDbName, Image& _rDbImage,
String& _rQueryName, Image& _rQueryImage,
String& _rTableName, Image& _rTableImage,
const SharedConnection& _rxConnection
);
void implAddDatasource( const String& _rDataSourceName, const SharedConnection& _rxConnection );
/// removes (and cleans up) the entry for the given data source
void impl_cleanupDataSourceEntry( const String& _rDataSourceName );
/// clears the tree list box
void clearTreeModel();
/** unloads the form, empties the grid model, cleans up anything related to the currently displayed object
@param _bDisposeConnection
<TRUE/> if the connection should be disposed
@param _bFlushData
<TRUE/> if the currently displayed object (if any) should be flushed
*/
void unloadAndCleanup( sal_Bool _bDisposeConnection = sal_True );
// disposes the connection associated with the given entry (which must represent a data source)
void disposeConnection( SvLBoxEntry* _pDSEntry );
/// flushs and disposes the given connection, and de-registers as listener
void impl_releaseConnection( SharedConnection& _rxConnection );
/** close the connection (and collapse the list entries) of the given list entries
*/
void closeConnection(SvLBoxEntry* _pEntry,sal_Bool _bDisposeConnection = sal_True);
void populateTree(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xNameAccess, SvLBoxEntry* _pParent, EntryType _eEntryType);
void initializeTreeModel();
2001-01-09 15:11:54 +00:00
/** search in the tree for query- or tablecontainer equal to this interface and return
this container entry
*/
SvLBoxEntry* getEntryFromContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxNameAccess);
2001-02-16 14:54:53 +00:00
// return true when there is connection available
sal_Bool ensureConnection(SvLBoxEntry* _pDSEntry, void * pDSData, SharedConnection& _rConnection );
sal_Bool ensureConnection(SvLBoxEntry* _pAnyEntry, SharedConnection& _rConnection );
sal_Bool getExistentConnectionFor( SvLBoxEntry* _pDSEntry, SharedConnection& _rConnection );
/** returns an image provider which works with the connection belonging to the given entry
*/
::std::auto_ptr< ImageProvider >
getImageProviderFor( SvLBoxEntry* _pAnyEntry );
void implAdministrate( SvLBoxEntry* _pApplyTo );
TransferableHelper*
implCopyObject( SvLBoxEntry* _pApplyTo, sal_Int32 _nCommandType, sal_Bool _bAllowConnection = sal_True );
EntryType getEntryType( SvLBoxEntry* _pEntry ) const;
2002-02-08 07:49:11 +00:00
EntryType getChildType( SvLBoxEntry* _pEntry ) const;
sal_Bool isObject( EntryType _eType ) const { return ( etTableOrView== _eType ) || ( etQuery == _eType ); }
sal_Bool isContainer( EntryType _eType ) const { return (etTableContainer == _eType) || (etQueryContainer == _eType); }
2002-02-08 07:49:11 +00:00
sal_Bool isContainer( SvLBoxEntry* _pEntry ) const { return isContainer( getEntryType( _pEntry ) ); }
// ensure that the xObject for the given entry is set on the user data
sal_Bool ensureEntryObject( SvLBoxEntry* _pEntry );
// get the display text of the entry given
String GetEntryText( SvLBoxEntry* _pEntry ) const;
2001-01-09 15:11:54 +00:00
2000-10-26 13:46:14 +00:00
// is called when a table or a query was selected
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
DECL_LINK( OnSelectionChange, void* );
DECL_LINK( OnExpandEntry, SvLBoxEntry* );
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
DECL_LINK( OnCopyEntry, void* );
DECL_LINK( OnTreeEntryCompare, const SvSortData* );
2001-03-07 07:19:13 +00:00
DECL_LINK( OnAsyncDrop, void* );
2001-03-07 07:19:13 +00:00
void implRemoveStatusListeners();
2001-06-01 10:23:46 +00:00
sal_Bool implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor,sal_Bool _bSelectDirect = sal_False);
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
bool implSelect( SvLBoxEntry* _pEntry );
/// selects the entry given and loads the grid control with the object's data
sal_Bool implSelect(
const ::rtl::OUString& _rDataSourceName,
const ::rtl::OUString& _rCommand,
const sal_Int32 _nCommandType,
const sal_Bool _bEscapeProcessing,
const SharedConnection& _rxConnection,
sal_Bool _bSelectDirect = sal_False
);
SvLBoxEntry* implGetConnectionEntry(SvLBoxEntry* _pEntry) const;
/// inserts an entry into the tree
SvLBoxEntry* implAppendEntry(
SvLBoxEntry* _pParent,
const String& _rName,
void* _pUserData,
EntryType _eEntryType
);
/// loads the grid control with the data object specified (which may be a table, a query or a command)
sal_Bool implLoadAnything(const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rCommand,
const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection = SharedConnection() );
/** retrieves the tree entry for the object described by <arg>_rDescriptor</arg>
@param _rDescriptor
the object descriptor
@param _ppDataSourceEntry
If not <NULL/>, the data source tree entry will be returned here
@param _ppContainerEntry
If not <NULL/>, the object container tree entry will be returned here
@param _bExpandAncestors
If <TRUE/>, all ancestor on the way to the entry will be expanded
*/
SvLBoxEntry* getObjectEntry(const ::svx::ODataAccessDescriptor& _rDescriptor,
SvLBoxEntry** _ppDataSourceEntry = NULL, SvLBoxEntry** _ppContainerEntry = NULL,
sal_Bool _bExpandAncestors = sal_True
);
/** retrieves the tree entry for the object described by data source name, command and command type
@param _rDataSource
the data source name
@param _rCommand
the command
@param _nCommandType
the command type
@param _rDescriptor
the object descriptor
@param _ppDataSourceEntry
If not <NULL/>, the data source tree entry will be returned here
@param _ppContainerEntry
If not <NULL/>, the object container tree entry will be returned here
@param _bExpandAncestors
If <TRUE/>, all ancestor on the way to the entry will be expanded
*/
SvLBoxEntry* getObjectEntry(
const ::rtl::OUString& _rDataSource, const ::rtl::OUString& _rCommand, sal_Int32 _nCommandType,
SvLBoxEntry** _ppDataSourceEntry = NULL, SvLBoxEntry** _ppContainerEntry = NULL,
sal_Bool _bExpandAncestors = sal_True,
const SharedConnection& _rxConnection = SharedConnection()
);
/// checks if m_aDocumentDataSource describes a known object
void checkDocumentDataSource();
void extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor,
::rtl::OUString& _rDataSource, ::rtl::OUString& _rCommand, sal_Int32& _rCommandType, sal_Bool& _rEscapeProcessing);
void transferChangedControlProperty(const ::rtl::OUString& _rProperty, const ::com::sun::star::uno::Any& _rNewValue);
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > connectWithStatus(
const ::rtl::OUString& _rDataSourceName,
void* _pTreeListUserData // in rela a DBTreeListUserData*, but we do not know this class here ....
);
#ifdef DBG_UTIL
// checks whether the given tree entry denotes a data source
bool impl_isDataSourceEntry( SvLBoxEntry* _pEntry ) const;
#endif
/// retrieves the data source URL/name for the given entry representing a data source
String getDataSourceAcessor( SvLBoxEntry* _pDataSourceEntry ) const;
/** get the signature (command/escape processing) of the query the form is based on
<p>If the for is not based on a query or not even loaded, nothing happens and <FALSE/> is returned.</p>
*/
sal_Bool implGetQuerySignature( ::rtl::OUString& _rCommand, sal_Bool& _bEscapeProcessing );
sal_Bool isEntryCopyAllowed(SvLBoxEntry* _pEntry) const;
void copyEntry(SvLBoxEntry* _pEntry);
// remove all grid columns and dispose them
void clearGridColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _xColContainer);
2002-04-29 07:23:25 +00:00
sal_Bool isHiContrast() const;
/** checks if the currently displayed entry changed
@param _sName
Name of the changed entry
@param _pContainer
The container of the displayed entry
@return
<TRUE/> if it is the currently displayed otherwise <FALSE/>
*/
sal_Bool isCurrentlyDisplayedChanged(const String& _sName,SvLBoxEntry* _pContainer);
/** called whenever the content of the browser is used for preview, as the very last action
of the load process
*/
void initializePreviewMode();
2000-10-26 13:46:14 +00:00
};
// .........................................................................
} // namespace dbaui
// .........................................................................
2000-10-26 13:46:14 +00:00
#endif // _SBA_UNODATBR_HXX_