1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_UNODATBR_HXX
21 #define INCLUDED_DBACCESS_SOURCE_UI_INC_UNODATBR_HXX
23 #include "brwctrlr.hxx"
24 #include <com/sun/star/sdbc/XConnection.hpp>
25 #include <com/sun/star/frame/XStatusListener.hpp>
26 #include <com/sun/star/frame/XDispatch.hpp>
27 #include <com/sun/star/container/XContainerListener.hpp>
28 #include <com/sun/star/i18n/XCollator.hpp>
29 #include <com/sun/star/view/XSelectionSupplier.hpp>
30 #include <com/sun/star/awt/XWindow.hpp>
31 #include <com/sun/star/document/XScriptInvocationContext.hpp>
32 #include <com/sun/star/ui/XContextMenuInterception.hpp>
33 #include <com/sun/star/sdb/application/DatabaseObject.hpp>
34 #include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
35 #include <com/sun/star/sdb/XDatabaseRegistrationsListener.hpp>
36 #include <cppuhelper/implbase5.hxx>
37 #include "callbacks.hxx"
38 #include <vcl/timer.hxx>
39 #include <svtools/transfer.hxx>
40 #include <svx/dataaccessdescriptor.hxx>
41 #include <sot/storage.hxx>
42 #include "TableCopyHelper.hxx"
43 #include "commontypes.hxx"
45 class SvTreeListEntry
;
49 namespace com
{ namespace sun
{ namespace star
{ namespace container
{ class XNameContainer
; } } } }
56 struct DBTreeEditedEntry
;
59 typedef ::cppu::ImplHelper5
< ::com::sun::star::frame::XStatusListener
60 , ::com::sun::star::view::XSelectionSupplier
61 , ::com::sun::star::document::XScriptInvocationContext
62 , ::com::sun::star::ui::XContextMenuInterception
63 , ::com::sun::star::sdb::XDatabaseRegistrationsListener
64 > SbaTableQueryBrowser_Base
;
65 class SbaTableQueryBrowser
66 :public SbaXDataBrowserController
67 ,public SbaTableQueryBrowser_Base
68 ,public IControlActionListener
69 ,public IContextMenuProvider
73 ::com::sun::star::uno::Reference
< ::com::sun::star::i18n::XCollator
> m_xCollator
;
74 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
> m_xCurrentFrameParent
;
75 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> m_xMainToolbar
;
77 struct ExternalFeature
79 ::com::sun::star::util::URL aURL
;
80 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatch
>
84 ExternalFeature() : bEnabled( false ) { }
85 ExternalFeature( const ::com::sun::star::util::URL
& _rURL
) : aURL( _rURL
), bEnabled( false ) { }
88 typedef ::std::map
< sal_uInt16
, ExternalFeature
, ::std::less
< sal_uInt16
> > ExternalFeaturesMap
;
89 ExternalFeaturesMap m_aExternalFeatures
;
91 svx::ODataAccessDescriptor m_aDocumentDataSource
;
92 // if we're part of a document, this is the state of the DocumentDataSource slot
94 ::cppu::OInterfaceContainerHelper m_aSelectionListeners
;
95 ::cppu::OInterfaceContainerHelper m_aContextMenuInterceptors
;
97 OTableCopyHelper::DropDescriptor m_aAsyncDrop
;
98 OTableCopyHelper m_aTableCopyHelper
;
100 OUString m_sQueryCommand
; // the command of the query currently loaded (if any)
101 //OUString m_sToBeLoaded; // contains the element name which should be loaded if any
103 VclPtr
<DBTreeView
> m_pTreeView
;
104 VclPtr
<Splitter
> m_pSplitter
;
105 SvTreeList
* m_pTreeModel
; // contains the datasources of the registry
106 SvTreeListEntry
* m_pCurrentlyDisplayed
;
107 ImplSVEvent
* m_nAsyncDrop
;
109 sal_Int16 m_nBorder
; // sal_True when border should be shown
111 bool m_bQueryEscapeProcessing
: 1; // the escape processing flag of the query currently loaded (if any)
112 bool m_bShowMenu
; // if sal_True the menu should be visible otherwise not
114 bool m_bEnableBrowser
;
115 ::boost::optional
< bool >
116 m_aDocScriptSupport
; // relevant if and only if we are associated with exactly one DBDoc
118 virtual OUString
getPrivateTitle( ) const SAL_OVERRIDE
;
121 SbaTableQueryBrowser(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rM
);
122 virtual ~SbaTableQueryBrowser();
126 // don't change the above definitions! There are places (in particular SbaTableQueryBrowser::getCurrentSelection)
127 // which rely on the fact that the EntryType values really equal the DatabaseObject(Container) values!
128 etDatasource
= ::com::sun::star::sdb::application::DatabaseObjectContainer::DATA_SOURCE
,
129 etQueryContainer
= ::com::sun::star::sdb::application::DatabaseObjectContainer::QUERIES
,
130 etTableContainer
= ::com::sun::star::sdb::application::DatabaseObjectContainer::TABLES
,
131 etQuery
= ::com::sun::star::sdb::application::DatabaseObject::QUERY
,
132 etTableOrView
= ::com::sun::star::sdb::application::DatabaseObject::TABLE
,
136 /** returns a DatabaseObject value corresponding to the given EntryType
138 the entry type. Must not be etUnknown.
140 static sal_Int32
getDatabaseObjectType( EntryType _eType
);
142 // need by registration
143 static OUString
getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException
);
144 static ::com::sun::star::uno::Sequence
< OUString
> getSupportedServiceNames_Static() throw( ::com::sun::star::uno::RuntimeException
);
145 static ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>
146 SAL_CALL
Create(const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>&);
148 DECLARE_UNO3_DEFAULTS(SbaTableQueryBrowser
,SbaXDataBrowserController
)
150 virtual bool Construct(vcl::Window
* pParent
) SAL_OVERRIDE
;
152 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(const ::com::sun::star::uno::Type
& _rType
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
155 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
156 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
158 // ::com::sun::star::beans::XPropertyChangeListener
159 virtual void SAL_CALL
propertyChange(const ::com::sun::star::beans::PropertyChangeEvent
& evt
) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
161 // ::com::sun::star::frame::XController
162 virtual sal_Bool SAL_CALL
suspend(sal_Bool bSuspend
) throw( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
163 virtual void SAL_CALL
attachFrame(const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
> & xFrame
) throw( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
165 // ::com::sun::star::lang::XComponent
166 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
169 virtual void SAL_CALL
statusChanged( const ::com::sun::star::frame::FeatureStateEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
172 virtual void SAL_CALL
disposing( const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
174 // XSelectionSupplier
175 virtual sal_Bool SAL_CALL
select( const ::com::sun::star::uno::Any
& aSelection
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
176 virtual ::com::sun::star::uno::Any SAL_CALL
getSelection( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
177 virtual void SAL_CALL
addSelectionChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
178 virtual void SAL_CALL
removeSelectionChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
181 virtual OUString SAL_CALL
getImplementationName() throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
182 virtual ::comphelper::StringSequence SAL_CALL
getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
184 // XContainerListener
185 virtual void SAL_CALL
elementInserted( const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
186 virtual void SAL_CALL
elementRemoved( const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
187 virtual void SAL_CALL
elementReplaced( const ::com::sun::star::container::ContainerEvent
& Event
) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
188 // ::com::sun::star::frame::XFrameActionListener
189 virtual void SAL_CALL
frameAction(const ::com::sun::star::frame::FrameActionEvent
& aEvent
) throw( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
192 virtual void notifyHiContrastChanged() SAL_OVERRIDE
;
194 // XScriptInvocationContext
195 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::document::XEmbeddedScripts
> SAL_CALL
getScriptContainer() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
197 // XContextMenuInterception
198 virtual void SAL_CALL
registerContextMenuInterceptor( const ::com::sun::star::uno::Reference
< ::com::sun::star::ui::XContextMenuInterceptor
>& Interceptor
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
199 virtual void SAL_CALL
releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference
< ::com::sun::star::ui::XContextMenuInterceptor
>& Interceptor
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
201 // XDatabaseRegistrationsListener
202 virtual void SAL_CALL
registeredDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent
& Event
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
203 virtual void SAL_CALL
revokedDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent
& Event
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
204 virtual void SAL_CALL
changedDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent
& Event
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
207 // SbaXDataBrowserController overridables
208 virtual bool InitializeForm( const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& i_formProperties
) SAL_OVERRIDE
;
209 virtual bool InitializeGridModel(const ::com::sun::star::uno::Reference
< ::com::sun::star::form::XFormComponent
> & xGrid
) SAL_OVERRIDE
;
211 virtual bool preReloadForm() SAL_OVERRIDE
;
212 virtual void postReloadForm() SAL_OVERRIDE
;
214 virtual void addModelListeners(const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XControlModel
> & _xGridControlModel
) SAL_OVERRIDE
;
215 virtual void removeModelListeners(const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XControlModel
> & _xGridControlModel
) SAL_OVERRIDE
;
217 virtual void AddColumnListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & xCol
) SAL_OVERRIDE
;
218 virtual void RemoveColumnListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & xCol
) SAL_OVERRIDE
;
220 virtual void LoadFinished(bool _bWasSynch
) SAL_OVERRIDE
;
222 virtual void criticalFail() SAL_OVERRIDE
;
224 virtual void describeSupportedFeatures() SAL_OVERRIDE
;
225 virtual FeatureState
GetState(sal_uInt16 nId
) const SAL_OVERRIDE
;
226 virtual void Execute(sal_uInt16 nId
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& aArgs
) SAL_OVERRIDE
;
228 // IControlActionListener overridables
229 virtual bool requestQuickHelp( const SvTreeListEntry
* _pEntry
, OUString
& _rText
) const SAL_OVERRIDE
;
230 virtual bool requestDrag( sal_Int8 _nAction
, const Point
& _rPosPixel
) SAL_OVERRIDE
;
231 virtual sal_Int8
queryDrop( const AcceptDropEvent
& _rEvt
, const DataFlavorExVector
& _rFlavors
) SAL_OVERRIDE
;
232 virtual sal_Int8
executeDrop( const ExecuteDropEvent
& _rEvt
) SAL_OVERRIDE
;
234 // IContextMenuProvider
235 virtual PopupMenu
* getContextMenu( Control
& _rControl
) const SAL_OVERRIDE
;
236 virtual IController
& getCommandController() SAL_OVERRIDE
;
237 virtual ::cppu::OInterfaceContainerHelper
*
238 getContextMenuInterceptors() SAL_OVERRIDE
;
239 virtual ::com::sun::star::uno::Any
240 getCurrentSelection( Control
& _rControl
) const SAL_OVERRIDE
;
242 virtual void impl_initialize() SAL_OVERRIDE
;
244 // SbaGridListener overridables
245 virtual void RowChanged() SAL_OVERRIDE
;
246 virtual void ColumnChanged() SAL_OVERRIDE
;
247 virtual void SelectionChanged() SAL_OVERRIDE
;
249 // methods for showing/hiding the explorer part
250 bool haveExplorer() const;
253 void toggleExplorer() { if (haveExplorer()) hideExplorer(); else showExplorer(); }
255 // methods for handling the 'selection' (paintin them bold) of SvLBoxEntries
256 // returns <TRUE/> if the entry is selected (which means it's part of the selected path)
257 static bool isSelected(SvTreeListEntry
* _pEntry
);
258 // select the entry (and only the entry, not the whole path)
259 void select(SvTreeListEntry
* _pEntry
, bool _bSelect
= true);
260 // select the path of the entry (which must be an entry without children)
261 void selectPath(SvTreeListEntry
* _pEntry
, bool _bSelect
= true);
263 virtual void loadMenu(const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& _xFrame
) SAL_OVERRIDE
;
266 // check the state of the external slot given, update any UI elements if necessary
267 void implCheckExternalSlot( sal_uInt16 _nId
);
269 // connect to the external dispatchers (if any)
270 void connectExternalDispatches();
272 /** get the state of an external slot
273 <p>The slot is available if an external dispatcher is responsible for it, _and_ if this dispatcher
274 told us the slot is available.</p>
276 bool getExternalSlotState( sal_uInt16 _nId
) const;
278 /** add an entry (including the subentries for queries/tables) to the list model
280 <p>The given names and images may be empty, in this case they're filled with the correct
281 values. This way they may be reused for the next call, which saves some resource manager calls.</p>
283 void implAddDatasource(const OUString
& _rDbName
, Image
& _rDbImage
,
284 OUString
& _rQueryName
, Image
& _rQueryImage
,
285 OUString
& _rTableName
, Image
& _rTableImage
,
286 const SharedConnection
& _rxConnection
289 void implAddDatasource( const OUString
& _rDataSourceName
, const SharedConnection
& _rxConnection
);
291 /// removes (and cleans up) the entry for the given data source
292 void impl_cleanupDataSourceEntry( const OUString
& _rDataSourceName
);
294 /// clears the tree list box
295 void clearTreeModel();
297 /** unloads the form, empties the grid model, cleans up anything related to the currently displayed object
298 @param _bDisposeConnection
299 <TRUE/> if the connection should be disposed
301 <TRUE/> if the currently displayed object (if any) should be flushed
303 void unloadAndCleanup( bool _bDisposeConnection
= true );
305 // disposes the connection associated with the given entry (which must represent a data source)
306 void disposeConnection( SvTreeListEntry
* _pDSEntry
);
308 /// flushs and disposes the given connection, and de-registers as listener
309 void impl_releaseConnection( SharedConnection
& _rxConnection
);
311 /** close the connection (and collapse the list entries) of the given list entries
313 void closeConnection(SvTreeListEntry
* _pEntry
, bool _bDisposeConnection
= true);
315 void populateTree(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
>& _xNameAccess
, SvTreeListEntry
* _pParent
, EntryType _eEntryType
);
316 void initializeTreeModel();
318 /** search in the tree for query- or tablecontainer equal to this interface and return
321 SvTreeListEntry
* getEntryFromContainer(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
>& _rxNameAccess
);
322 // return true when there is connection available
323 bool ensureConnection(SvTreeListEntry
* _pDSEntry
, void * pDSData
, SharedConnection
& _rConnection
);
324 bool ensureConnection(SvTreeListEntry
* _pAnyEntry
, SharedConnection
& _rConnection
);
326 bool getExistentConnectionFor( SvTreeListEntry
* _pDSEntry
, SharedConnection
& _rConnection
);
327 /** returns an image provider which works with the connection belonging to the given entry
329 ::std::unique_ptr
< ImageProvider
>
330 getImageProviderFor( SvTreeListEntry
* _pAnyEntry
);
332 void implAdministrate( SvTreeListEntry
* _pApplyTo
);
335 implCopyObject( SvTreeListEntry
* _pApplyTo
, sal_Int32 _nCommandType
, bool _bAllowConnection
= true );
337 EntryType
getEntryType( const SvTreeListEntry
* _pEntry
) const;
338 EntryType
getChildType( SvTreeListEntry
* _pEntry
) const;
339 static bool isObject( EntryType _eType
) { return ( etTableOrView
== _eType
) || ( etQuery
== _eType
); }
340 static bool isContainer( EntryType _eType
) { return (etTableContainer
== _eType
) || (etQueryContainer
== _eType
); }
341 bool isContainer( const SvTreeListEntry
* _pEntry
) const { return isContainer( getEntryType( _pEntry
) ); }
343 // ensure that the xObject for the given entry is set on the user data
344 bool ensureEntryObject( SvTreeListEntry
* _pEntry
);
346 // get the display text of the entry given
347 OUString
GetEntryText( SvTreeListEntry
* _pEntry
) const;
349 // is called when a table or a query was selected
350 DECL_LINK( OnSelectionChange
, void* );
351 DECL_LINK( OnExpandEntry
, SvTreeListEntry
* );
353 DECL_LINK( OnCopyEntry
, void* );
355 DECL_LINK( OnTreeEntryCompare
, const SvSortData
* );
357 DECL_LINK( OnAsyncDrop
, void* );
359 void implRemoveStatusListeners();
361 bool implSelect(const svx::ODataAccessDescriptor
& _rDescriptor
, bool _bSelectDirect
= false);
362 bool implSelect( SvTreeListEntry
* _pEntry
);
364 /// selects the entry given and loads the grid control with the object's data
366 const OUString
& _rDataSourceName
,
367 const OUString
& _rCommand
,
368 const sal_Int32 _nCommandType
,
369 const bool _bEscapeProcessing
,
370 const SharedConnection
& _rxConnection
,
371 bool _bSelectDirect
= false
374 SvTreeListEntry
* implGetConnectionEntry(SvTreeListEntry
* _pEntry
) const;
375 /// inserts an entry into the tree
376 SvTreeListEntry
* implAppendEntry(
377 SvTreeListEntry
* _pParent
,
378 const OUString
& _rName
,
380 EntryType _eEntryType
383 /// loads the grid control with the data object specified (which may be a table, a query or a command)
384 bool implLoadAnything(const OUString
& _rDataSourceName
, const OUString
& _rCommand
,
385 const sal_Int32 _nCommandType
, const bool _bEscapeProcessing
, const SharedConnection
& _rxConnection
= SharedConnection() );
387 /** retrieves the tree entry for the object described by <arg>_rDescriptor</arg>
389 the object descriptor
390 @param _ppDataSourceEntry
391 If not <NULL/>, the data source tree entry will be returned here
392 @param _ppContainerEntry
393 If not <NULL/>, the object container tree entry will be returned here
394 @param _bExpandAncestors
395 If <TRUE/>, all ancestor on the way to the entry will be expanded
397 SvTreeListEntry
* getObjectEntry(const svx::ODataAccessDescriptor
& _rDescriptor
,
398 SvTreeListEntry
** _ppDataSourceEntry
= NULL
, SvTreeListEntry
** _ppContainerEntry
= NULL
,
399 bool _bExpandAncestors
= true
401 /** retrieves the tree entry for the object described by data source name, command and command type
409 the object descriptor
410 @param _ppDataSourceEntry
411 If not <NULL/>, the data source tree entry will be returned here
412 @param _ppContainerEntry
413 If not <NULL/>, the object container tree entry will be returned here
414 @param _bExpandAncestors
415 If <TRUE/>, all ancestor on the way to the entry will be expanded
417 SvTreeListEntry
* getObjectEntry(
418 const OUString
& _rDataSource
, const OUString
& _rCommand
, sal_Int32 _nCommandType
,
419 SvTreeListEntry
** _ppDataSourceEntry
= NULL
, SvTreeListEntry
** _ppContainerEntry
= NULL
,
420 bool _bExpandAncestors
= true,
421 const SharedConnection
& _rxConnection
= SharedConnection()
424 /// checks if m_aDocumentDataSource describes a known object
425 void checkDocumentDataSource();
427 static void extractDescriptorProps(const svx::ODataAccessDescriptor
& _rDescriptor
,
428 OUString
& _rDataSource
, OUString
& _rCommand
, sal_Int32
& _rCommandType
, bool& _rEscapeProcessing
);
430 void transferChangedControlProperty(const OUString
& _rProperty
, const ::com::sun::star::uno::Any
& _rNewValue
);
432 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> connectWithStatus(
433 const OUString
& _rDataSourceName
,
434 void* _pTreeListUserData
// in reality a DBTreeListUserData*, but we do not know this class here...
437 #if OSL_DEBUG_LEVEL > 0
438 // checks whether the given tree entry denotes a data source
439 bool impl_isDataSourceEntry( SvTreeListEntry
* _pEntry
) const;
442 /// retrieves the data source URL/name for the given entry representing a data source
443 OUString
getDataSourceAcessor( SvTreeListEntry
* _pDataSourceEntry
) const;
445 /** get the signature (command/escape processing) of the query the form is based on
446 <p>If the for is not based on a query or not even loaded, nothing happens and <FALSE/> is returned.</p>
448 bool implGetQuerySignature( OUString
& _rCommand
, bool& _bEscapeProcessing
);
450 bool isEntryCopyAllowed(SvTreeListEntry
* _pEntry
) const;
452 void copyEntry(SvTreeListEntry
* _pEntry
);
454 // remove all grid columns and dispose them
455 static void clearGridColumns(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>& _xColContainer
);
457 /** checks if the currently displayed entry changed
459 Name of the changed entry
461 The container of the displayed entry
463 <TRUE/> if it is the currently displayed otherwise <FALSE/>
465 bool isCurrentlyDisplayedChanged(const OUString
& _sName
, SvTreeListEntry
* _pContainer
);
467 /** called whenever the content of the browser is used for preview, as the very last action
470 void initializePreviewMode();
472 /** checks whether the Order/Filter clauses set at our row set are valid, removes them if not so
474 void impl_sanitizeRowSetClauses_nothrow();
479 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_UNODATBR_HXX
481 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */