LibreOffice Module dbaccess (master) 1
unodatbr.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <memory>
23#include "brwctrlr.hxx"
24#include <com/sun/star/frame/XStatusListener.hpp>
25#include <com/sun/star/frame/XDispatch.hpp>
26#include <com/sun/star/i18n/XCollator.hpp>
27#include <com/sun/star/view/XSelectionSupplier.hpp>
28#include <com/sun/star/awt/XWindow.hpp>
29#include <com/sun/star/document/XScriptInvocationContext.hpp>
30#include <com/sun/star/ui/XContextMenuInterception.hpp>
31#include <com/sun/star/sdb/application/DatabaseObject.hpp>
32#include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
33#include <com/sun/star/sdb/XDatabaseRegistrationsListener.hpp>
36#include "callbacks.hxx"
37#include <utility>
38#include <vcl/transfer.hxx>
40#include "TableCopyHelper.hxx"
41#include "commontypes.hxx"
42
43class Splitter;
44class ODataClipboard;
45
46namespace com::sun::star::container { class XNameContainer; }
47
48namespace dbaui
49{
50 struct DBTreeEditedEntry;
51 struct DBTreeListUserData;
52 class ImageProvider;
53
54 typedef ::cppu::ImplHelper5 < css::frame::XStatusListener
55 , css::view::XSelectionSupplier
56 , css::document::XScriptInvocationContext
57 , css::ui::XContextMenuInterception
58 , css::sdb::XDatabaseRegistrationsListener
65 {
66 css::uno::Reference< css::i18n::XCollator > m_xCollator;
67 css::uno::Reference< css::frame::XFrame > m_xCurrentFrameParent;
68 css::uno::Reference< css::awt::XWindow > m_xMainToolbar;
69
71 {
72 css::util::URL aURL;
73 css::uno::Reference< css::frame::XDispatch >
76
77 ExternalFeature() : bEnabled( false ) { }
78 ExternalFeature( css::util::URL _aURL ) : aURL(std::move( _aURL )), bEnabled( false ) { }
79 };
80
81 typedef std::map< sal_uInt16, ExternalFeature > ExternalFeaturesMap;
83
85 // if we're part of a document, this is the state of the DocumentDataSource slot
86
89
92
93 OUString m_sQueryCommand; // the command of the query currently loaded (if any)
94 //OUString m_sToBeLoaded; // contains the element name which should be loaded if any
95
96 VclPtr<InterimDBTreeListBox> m_pTreeView; // contains the datasources of the registry
98 std::unique_ptr<weld::TreeIter> m_xCurrentlyDisplayed;
100
101 bool m_bQueryEscapeProcessing : 1; // the escape processing flag of the query currently loaded (if any)
102 bool m_bShowMenu; // if sal_True the menu should be visible otherwise not
105 ::std::optional< bool >
106 m_aDocScriptSupport; // relevant if and only if we are associated with exactly one DBDoc
107
108 virtual OUString getPrivateTitle( ) const override;
109 // attribute access
110 public:
111 SbaTableQueryBrowser(const css::uno::Reference< css::uno::XComponentContext >& _rM);
112 virtual ~SbaTableQueryBrowser() override;
113
115 {
116 // don't change the above definitions! There are places (in particular SbaTableQueryBrowser::getCurrentSelection)
117 // which rely on the fact that the EntryType values really equal the DatabaseObject(Container) values!
118 etDatasource = css::sdb::application::DatabaseObjectContainer::DATA_SOURCE,
119 etQueryContainer = css::sdb::application::DatabaseObjectContainer::QUERIES,
120 etTableContainer = css::sdb::application::DatabaseObjectContainer::TABLES,
123 etUnknown = -1
124 };
125
130 static sal_Int32 getDatabaseObjectType( EntryType _eType );
131
133 // late construction
134 virtual bool Construct(vcl::Window* pParent) override;
135 // XInterface
136 virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
137
138 // XTypeProvider
139 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
140 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
141
142 // css::beans::XPropertyChangeListener
143 virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& evt) override;
144
145 // css::frame::XController
146 virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) override;
147 virtual void SAL_CALL attachFrame(const css::uno::Reference< css::frame::XFrame > & xFrame) override;
148
149 // css::lang::XComponent
150 virtual void SAL_CALL disposing() override;
151
152 // XStatusListener
153 virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) override;
154
155 // XEventListener
156 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
157
158 // XSelectionSupplier
159 virtual sal_Bool SAL_CALL select( const css::uno::Any& aSelection ) override;
160 virtual css::uno::Any SAL_CALL getSelection( ) override;
161 virtual void SAL_CALL addSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
162 virtual void SAL_CALL removeSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
163
164 // XServiceInfo
165 virtual OUString SAL_CALL getImplementationName() override;
166 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
167
168 // XContainerListener
169 virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
170 virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
171 virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
172 // css::frame::XFrameActionListener
173 virtual void SAL_CALL frameAction(const css::frame::FrameActionEvent& aEvent) override;
174
175 // XScriptInvocationContext
176 virtual css::uno::Reference< css::document::XEmbeddedScripts > SAL_CALL getScriptContainer() override;
177
178 // XContextMenuInterception
179 virtual void SAL_CALL registerContextMenuInterceptor( const css::uno::Reference< css::ui::XContextMenuInterceptor >& Interceptor ) override;
180 virtual void SAL_CALL releaseContextMenuInterceptor( const css::uno::Reference< css::ui::XContextMenuInterceptor >& Interceptor ) override;
181
182 // XDatabaseRegistrationsListener
183 virtual void SAL_CALL registeredDatabaseLocation( const css::sdb::DatabaseRegistrationEvent& Event ) override;
184 virtual void SAL_CALL revokedDatabaseLocation( const css::sdb::DatabaseRegistrationEvent& Event ) override;
185 virtual void SAL_CALL changedDatabaseLocation( const css::sdb::DatabaseRegistrationEvent& Event ) override;
186
187 private:
188 // SbaXDataBrowserController overridable
189 virtual bool InitializeForm( const css::uno::Reference< css::beans::XPropertySet >& i_formProperties ) override;
190
191 void InitializeGridModel(const css::uno::Reference< css::form::XFormComponent > & xGrid);
192
193 virtual bool preReloadForm() override;
194 virtual void postReloadForm() override;
195
196 virtual void addModelListeners(const css::uno::Reference< css::awt::XControlModel > & _xGridControlModel) override;
197 virtual void removeModelListeners(const css::uno::Reference< css::awt::XControlModel > & _xGridControlModel) override;
198
199 virtual void AddColumnListener(const css::uno::Reference< css::beans::XPropertySet > & xCol) override;
200 virtual void RemoveColumnListener(const css::uno::Reference< css::beans::XPropertySet > & xCol) override;
201
202 virtual void LoadFinished(bool _bWasSynch) override;
203
204 virtual void criticalFail() override;
205
206 virtual void describeSupportedFeatures() override;
207 virtual FeatureState GetState(sal_uInt16 nId) const override;
208 virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) override;
209
210 // IControlActionListener overridables
211 virtual bool requestQuickHelp(const void* pUserData, OUString& rText) const override;
212 virtual bool requestDrag(const weld::TreeIter& rEntry) override;
213 virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) override;
214 virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt ) override;
215
216 // IContextMenuProvider
217 virtual OUString getContextMenuResourceName() const override;
218 virtual IController& getCommandController() override;
219 virtual ::comphelper::OInterfaceContainerHelper2*
221 virtual css::uno::Any getCurrentSelection(weld::TreeView& rControl) const override;
222 virtual vcl::Window* getMenuParent() const override;
223 virtual void adjustMenuPosition(const weld::TreeView& rControl, ::Point& rPos) const override;
224
225 virtual void impl_initialize() override;
226
227 // SbaGridListener overridables
228 virtual void RowChanged() override;
229 virtual void ColumnChanged() override;
230 virtual void SelectionChanged() override;
231
232 // methods for showing/hiding the explorer part
233 bool haveExplorer() const;
234 void hideExplorer();
235 void showExplorer();
237
238 // methods for handling the 'selection' (painting them bold) of SvLBoxEntries
239 // returns <TRUE/> if the entry is selected (which means it's part of the selected path)
240 bool isSelected(const weld::TreeIter& rEntry) const;
241 // select the entry (and only the entry, not the whole path)
242 void select(const weld::TreeIter* pEntry, bool bSelect);
243 // select the path of the entry (which must be an entry without children)
244 void selectPath(const weld::TreeIter* pEntry, bool bSelect = true);
245
246 virtual void loadMenu(const css::uno::Reference< css::frame::XFrame >& _xFrame) override;
247
248 // check the state of the external slot given, update any UI elements if necessary
249 void implCheckExternalSlot( sal_uInt16 _nId );
250
251 // connect to the external dispatchers (if any)
253
258 bool getExternalSlotState( sal_uInt16 _nId ) const;
259
265 void implAddDatasource(const OUString& _rDbName, OUString& _rDbImage,
266 OUString& _rQueryName, OUString& _rQueryImage,
267 OUString& _rTableName, OUString& _rTableImage,
268 const SharedConnection& _rxConnection
269 );
270
271 void implAddDatasource( const OUString& _rDataSourceName, const SharedConnection& _rxConnection );
272
274 void impl_cleanupDataSourceEntry( std::u16string_view _rDataSourceName );
275
277 void clearTreeModel();
278
285 void unloadAndCleanup( bool _bDisposeConnection = true );
286
287 // disposes the connection associated with the given entry (which must represent a data source)
288 void disposeConnection(const weld::TreeIter* xpDSEntry);
289
291 void impl_releaseConnection( SharedConnection& _rxConnection );
292
295 void closeConnection(const weld::TreeIter& rEntry, bool bDisposeConnection = true);
296
297 void populateTree(const css::uno::Reference< css::container::XNameAccess>& xNameAccess, const weld::TreeIter& rParent, EntryType eEntryType);
298 void initializeTreeModel();
299
303 std::unique_ptr<weld::TreeIter> getEntryFromContainer(const css::uno::Reference<css::container::XNameAccess>& rxNameAccess);
304
305 // return true when there is connection available
306 bool ensureConnection(const weld::TreeIter* pDSEntry, void * pDSData, SharedConnection& rConnection);
307 bool ensureConnection(const weld::TreeIter* pAnyEntry, SharedConnection& rConnection);
308
309 bool getExistentConnectionFor(const weld::TreeIter* pDSEntry, SharedConnection& rConnection);
312 std::unique_ptr<ImageProvider> getImageProviderFor(const weld::TreeIter* pAnyEntry);
313
314 void implAdministrate(const weld::TreeIter& rApplyTo);
315
316 bool implCopyObject(ODataClipboard& rExchange, const weld::TreeIter& rApplyTo, sal_Int32 nCommandType);
317
318 EntryType getEntryType(const weld::TreeIter& rEntry) const;
319 EntryType getChildType(const weld::TreeIter& rEntry) const;
320 static bool isObject( EntryType _eType ) { return ( etTableOrView== _eType ) || ( etQuery == _eType ); }
321 static bool isContainer( EntryType _eType ) { return (etTableContainer == _eType) || (etQueryContainer == _eType); }
322 bool isContainer(const weld::TreeIter& rEntry) const { return isContainer(getEntryType(rEntry)); }
323
324 // ensure that the xObject for the given entry is set on the user data
325 bool ensureEntryObject(const weld::TreeIter& rEntry);
326
327 // get the display text of the entry given
328 OUString GetEntryText(const weld::TreeIter& rEntry) const;
329
330 // is called when a table or a query was selected
331 DECL_LINK( OnSelectionChange, LinkParamNone*, void );
332 DECL_LINK( OnExpandEntry, const weld::TreeIter&, bool );
333
334 DECL_LINK( OnCopyEntry, LinkParamNone*, void );
335
336 int OnTreeEntryCompare(const weld::TreeIter& rLHS, const weld::TreeIter& rRHS);
337
338 DECL_LINK( OnAsyncDrop, void*, void );
339
341
342 bool implSelect(const svx::ODataAccessDescriptor& _rDescriptor, bool _bSelectDirect = false);
343 bool implSelect(const weld::TreeIter* pEntry);
344
346 bool implSelect(
347 const OUString& _rDataSourceName,
348 const OUString& _rCommand,
349 const sal_Int32 _nCommandType,
350 const bool _bEscapeProcessing,
351 const SharedConnection& _rxConnection,
352 bool _bSelectDirect
353 );
354
355 std::unique_ptr<weld::TreeIter> implGetConnectionEntry(const weld::TreeIter& rEntry) const;
357 std::unique_ptr<weld::TreeIter> implAppendEntry(
358 const weld::TreeIter* pParent,
359 const OUString& rName,
360 const DBTreeListUserData* pUserData);
361
363 bool implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand,
364 const sal_Int32 _nCommandType, const bool _bEscapeProcessing, const SharedConnection& _rxConnection );
365
374 std::unique_ptr<weld::TreeIter> getObjectEntry(const svx::ODataAccessDescriptor& rDescriptor,
375 std::unique_ptr<weld::TreeIter>* ppDataSourceEntry, std::unique_ptr<weld::TreeIter>* ppContainerEntry
376 );
393 std::unique_ptr<weld::TreeIter> getObjectEntry(
394 const OUString& rDataSource, const OUString& rCommand, sal_Int32 nCommandType,
395 std::unique_ptr<weld::TreeIter>* ppDataSourceEntry, std::unique_ptr<weld::TreeIter>* ppContainerEntry,
396 bool _bExpandAncestors = true,
397 const SharedConnection& rxConnection = SharedConnection()
398 );
399
402
403 static void extractDescriptorProps(const svx::ODataAccessDescriptor& _rDescriptor,
404 OUString& _rDataSource, OUString& _rCommand, sal_Int32& _rCommandType, bool& _rEscapeProcessing);
405
406 void transferChangedControlProperty(const OUString& _rProperty, const css::uno::Any& _rNewValue);
407
408 // checks whether the given tree entry denotes a data source
409 bool impl_isDataSourceEntry(const weld::TreeIter* pEntry) const;
410
412 OUString getDataSourceAccessor(const weld::TreeIter& rDataSourceEntry) const;
413
417 bool implGetQuerySignature( OUString& _rCommand, bool& _bEscapeProcessing );
418
419 bool isEntryCopyAllowed(const weld::TreeIter& rEntry) const;
420
421 void copyEntry(const weld::TreeIter& rEntry);
422
423 // remove all grid columns and dispose them
424 static void clearGridColumns(const css::uno::Reference< css::container::XNameContainer >& _xColContainer);
425
434 bool isCurrentlyDisplayedChanged(std::u16string_view rName, const weld::TreeIter& rContainer);
435
440
444 };
445
446} // namespace dbaui
447
448/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual IController & getCommandController() override
returns the controller which is responsible for providing states of certain features,...
Definition: unodatbr.cxx:3501
css::uno::Reference< css::i18n::XCollator > m_xCollator
Definition: unodatbr.hxx:66
void transferChangedControlProperty(const OUString &_rProperty, const css::uno::Any &_rNewValue)
Definition: unodatbr.cxx:776
void clearTreeModel()
clears the tree list box
virtual void criticalFail() override
Definition: unodatbr.cxx:1565
DECL_LINK(OnAsyncDrop, void *, void)
void checkDocumentDataSource()
checks if m_aDocumentDataSource describes a known object
Definition: unodatbr.cxx:968
::comphelper::OInterfaceContainerHelper2 m_aSelectionListeners
Definition: unodatbr.hxx:87
void impl_cleanupDataSourceEntry(std::u16string_view _rDataSourceName)
removes (and cleans up) the entry for the given data source
Definition: unodatbr.cxx:3755
virtual sal_Int8 executeDrop(const ExecuteDropEvent &_rEvt) override
execute a drop request
virtual void addModelListeners(const css::uno::Reference< css::awt::XControlModel > &_xGridControlModel) override
Definition: unodatbr.cxx:1494
svx::ODataAccessDescriptor m_aDocumentDataSource
Definition: unodatbr.hxx:84
void impl_sanitizeRowSetClauses_nothrow()
checks whether the Order/Filter clauses set at our row set are valid, removes them if not so
Definition: unodatbr.cxx:355
void InitializeGridModel(const css::uno::Reference< css::form::XFormComponent > &xGrid)
Definition: unodatbr.cxx:533
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
Definition: unodatbr.cxx:2748
void initializePreviewMode()
called whenever the content of the browser is used for preview, as the very last action of the load p...
Definition: unodatbr.cxx:516
VclPtr< Splitter > m_pSplitter
Definition: unodatbr.hxx:97
void closeConnection(const weld::TreeIter &rEntry, bool bDisposeConnection=true)
close the connection (and collapse the list entries) of the given list entries
Definition: unodatbr.cxx:2977
std::map< sal_uInt16, ExternalFeature > ExternalFeaturesMap
Definition: unodatbr.hxx:81
void populateTree(const css::uno::Reference< css::container::XNameAccess > &xNameAccess, const weld::TreeIter &rParent, EntryType eEntryType)
Definition: unodatbr.cxx:2086
DECL_LINK(OnSelectionChange, LinkParamNone *, void)
css::uno::Reference< css::awt::XWindow > m_xMainToolbar
Definition: unodatbr.hxx:68
void disposeConnection(const weld::TreeIter *xpDSEntry)
Definition: unodatbr.cxx:2963
void implAdministrate(const weld::TreeIter &rApplyTo)
Definition: unodatbr.cxx:3439
EntryType getChildType(const weld::TreeIter &rEntry) const
::comphelper::OInterfaceContainerHelper2 m_aContextMenuInterceptors
Definition: unodatbr.hxx:88
virtual ~SbaTableQueryBrowser() override
Definition: unodatbr.cxx:178
bool ensureConnection(const weld::TreeIter *pDSEntry, void *pDSData, SharedConnection &rConnection)
Definition: unodatbr.cxx:3346
void selectPath(const weld::TreeIter *pEntry, bool bSelect=true)
virtual FeatureState GetState(sal_uInt16 nId) const override
Definition: unodatbr.cxx:1600
virtual bool Construct(vcl::Window *pParent) override
Definition: unodatbr.cxx:272
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unodatbr.cxx:158
void implAddDatasource(const OUString &_rDbName, OUString &_rDbImage, OUString &_rQueryName, OUString &_rQueryImage, OUString &_rTableName, OUString &_rTableImage, const SharedConnection &_rxConnection)
add an entry (including the subentries for queries/tables) to the list model
Definition: unodatbr.cxx:2008
virtual css::uno::Any SAL_CALL getSelection() override
Definition: unodatbr.cxx:1415
virtual void SAL_CALL attachFrame(const css::uno::Reference< css::frame::XFrame > &xFrame) override
Definition: unodatbr.cxx:1451
virtual void AddColumnListener(const css::uno::Reference< css::beans::XPropertySet > &xCol) override
Definition: unodatbr.cxx:1547
bool isCurrentlyDisplayedChanged(std::u16string_view rName, const weld::TreeIter &rContainer)
checks if the currently displayed entry changed
Definition: unodatbr.cxx:2790
std::unique_ptr< weld::TreeIter > getObjectEntry(const svx::ODataAccessDescriptor &rDescriptor, std::unique_ptr< weld::TreeIter > *ppDataSourceEntry, std::unique_ptr< weld::TreeIter > *ppContainerEntry)
retrieves the tree entry for the object described by <arg>_rDescriptor</arg>
Definition: unodatbr.cxx:1208
static bool isObject(EntryType _eType)
Definition: unodatbr.hxx:320
virtual sal_Bool SAL_CALL select(const css::uno::Any &aSelection) override
VclPtr< InterimDBTreeListBox > m_pTreeView
Definition: unodatbr.hxx:96
virtual void SAL_CALL disposing() override
Definition: unodatbr.cxx:232
virtual OUString getContextMenuResourceName() const override
returns the context menu resource name for the control
Definition: unodatbr.cxx:3496
virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &Event) override
Definition: unodatbr.cxx:920
bool isEntryCopyAllowed(const weld::TreeIter &rEntry) const
int OnTreeEntryCompare(const weld::TreeIter &rLHS, const weld::TreeIter &rRHS)
Definition: unodatbr.cxx:3381
static void clearGridColumns(const css::uno::Reference< css::container::XNameContainer > &_xColContainer)
Definition: unodatbr.cxx:3621
bool getExternalSlotState(sal_uInt16 _nId) const
get the state of an external slot
Definition: unodatbr.cxx:1591
virtual void removeModelListeners(const css::uno::Reference< css::awt::XControlModel > &_xGridControlModel) override
Definition: unodatbr.cxx:1510
static sal_Int32 getDatabaseObjectType(EntryType _eType)
returns a DatabaseObject value corresponding to the given EntryType
bool ensureEntryObject(const weld::TreeIter &rEntry)
Definition: unodatbr.cxx:2250
std::unique_ptr< weld::TreeIter > getEntryFromContainer(const css::uno::Reference< css::container::XNameAccess > &rxNameAccess)
search in the tree for query- or tablecontainer equal to this interface and return this container ent...
Definition: unodatbr.cxx:2714
DECL_LINK(OnCopyEntry, LinkParamNone *, void)
bool implSelect(const svx::ODataAccessDescriptor &_rDescriptor, bool _bSelectDirect=false)
Definition: unodatbr.cxx:2330
bool getExistentConnectionFor(const weld::TreeIter *pDSEntry, SharedConnection &rConnection)
Definition: unodatbr.cxx:3324
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) override
Definition: unodatbr.cxx:897
virtual void SAL_CALL addSelectionChangeListener(const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
Definition: unodatbr.cxx:1441
virtual bool preReloadForm() override
Definition: unodatbr.cxx:3681
DECL_LINK(OnExpandEntry, const weld::TreeIter &, bool)
virtual bool InitializeForm(const css::uno::Reference< css::beans::XPropertySet > &i_formProperties) override
Definition: unodatbr.cxx:464
virtual void SAL_CALL changedDatabaseLocation(const css::sdb::DatabaseRegistrationEvent &Event) override
Definition: unodatbr.cxx:3807
virtual ::comphelper::OInterfaceContainerHelper2 * getContextMenuInterceptors() override
returns the container of registered context menu interceptors, or NULL if the implementation does not...
Definition: unodatbr.cxx:3506
SbaTableQueryBrowser(const css::uno::Reference< css::uno::XComponentContext > &_rM)
Definition: unodatbr.cxx:163
virtual void SAL_CALL revokedDatabaseLocation(const css::sdb::DatabaseRegistrationEvent &Event) override
Definition: unodatbr.cxx:3797
std::unique_ptr< ImageProvider > getImageProviderFor(const weld::TreeIter *pAnyEntry)
returns an image provider which works with the connection belonging to the given entry
Definition: unodatbr.cxx:3315
virtual css::uno::Reference< css::document::XEmbeddedScripts > SAL_CALL getScriptContainer() override
Definition: unodatbr.cxx:3712
void impl_releaseConnection(SharedConnection &_rxConnection)
flushes and disposes the given connection, and de-registers as listener
Definition: unodatbr.cxx:2936
OTableCopyHelper::DropDescriptor m_aAsyncDrop
Definition: unodatbr.hxx:90
bool impl_isDataSourceEntry(const weld::TreeIter *pEntry) const
Definition: unodatbr.cxx:3337
::std::optional< bool > m_aDocScriptSupport
Definition: unodatbr.hxx:106
virtual void loadMenu(const css::uno::Reference< css::frame::XFrame > &_xFrame) override
Definition: unodatbr.cxx:3634
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
Definition: unodatbr.cxx:2803
virtual vcl::Window * getMenuParent() const override
Definition: unodatbr.cxx:3550
virtual bool requestQuickHelp(const void *pUserData, OUString &rText) const override
requests a quick help text to display
Definition: unodatbr.cxx:3485
virtual void SAL_CALL frameAction(const css::frame::FrameActionEvent &aEvent) override
Definition: unodatbr.cxx:3607
std::unique_ptr< weld::TreeIter > m_xCurrentlyDisplayed
Definition: unodatbr.hxx:98
virtual void describeSupportedFeatures() override
bool implCopyObject(ODataClipboard &rExchange, const weld::TreeIter &rApplyTo, sal_Int32 nCommandType)
OUString getDataSourceAccessor(const weld::TreeIter &rDataSourceEntry) const
retrieves the data source URL/name for the given entry representing a data source
Definition: unodatbr.cxx:1055
std::unique_ptr< weld::TreeIter > implGetConnectionEntry(const weld::TreeIter &rEntry) const
Definition: unodatbr.cxx:2482
virtual sal_Int8 queryDrop(const AcceptDropEvent &_rEvt, const DataFlavorExVector &_rFlavors) override
check whether or not a drop request should be accepted
css::uno::Reference< css::frame::XFrame > m_xCurrentFrameParent
Definition: unodatbr.hxx:67
virtual bool requestDrag(const weld::TreeIter &rEntry) override
handler for StartDrag requests
OUString GetEntryText(const weld::TreeIter &rEntry) const
ImplSVEvent * m_nAsyncDrop
Definition: unodatbr.hxx:99
virtual void SAL_CALL registerContextMenuInterceptor(const css::uno::Reference< css::ui::XContextMenuInterceptor > &Interceptor) override
Definition: unodatbr.cxx:3737
static void extractDescriptorProps(const svx::ODataAccessDescriptor &_rDescriptor, OUString &_rDataSource, OUString &_rCommand, sal_Int32 &_rCommandType, bool &_rEscapeProcessing)
Definition: unodatbr.cxx:1008
virtual void SAL_CALL releaseContextMenuInterceptor(const css::uno::Reference< css::ui::XContextMenuInterceptor > &Interceptor) override
Definition: unodatbr.cxx:3743
std::unique_ptr< weld::TreeIter > implAppendEntry(const weld::TreeIter *pParent, const OUString &rName, const DBTreeListUserData *pUserData)
inserts an entry into the tree
Definition: unodatbr.cxx:2124
static bool isContainer(EntryType _eType)
Definition: unodatbr.hxx:321
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
Definition: unodatbr.cxx:789
virtual void ColumnChanged() override
Definition: unodatbr.cxx:1536
virtual OUString getPrivateTitle() const override
Definition: unodatbr.cxx:3655
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
Definition: unodatbr.cxx:2859
ExternalFeaturesMap m_aExternalFeatures
Definition: unodatbr.hxx:82
void copyEntry(const weld::TreeIter &rEntry)
bool isContainer(const weld::TreeIter &rEntry) const
Definition: unodatbr.hxx:322
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unodatbr.cxx:227
virtual void SelectionChanged() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unodatbr.cxx:208
bool implGetQuerySignature(OUString &_rCommand, bool &_bEscapeProcessing)
get the signature (command/escape processing) of the query the form is based on
Definition: unodatbr.cxx:3559
virtual OUString SAL_CALL getImplementationName() override
Definition: unodatbr.cxx:153
virtual void impl_initialize() override
Definition: unodatbr.cxx:3098
EntryType getEntryType(const weld::TreeIter &rEntry) const
virtual void postReloadForm() override
Definition: unodatbr.cxx:3706
virtual void adjustMenuPosition(const weld::TreeView &rControl, ::Point &rPos) const override
adjust rPos which is initially relative to rControl to be relative to the window of getMenuParent
Definition: unodatbr.cxx:3555
void implCheckExternalSlot(sal_uInt16 _nId)
Definition: unodatbr.cxx:1283
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &_rType) override
Definition: unodatbr.cxx:192
bool isSelected(const weld::TreeIter &rEntry) const
bool implLoadAnything(const OUString &_rDataSourceName, const OUString &_rCommand, const sal_Int32 _nCommandType, const bool _bEscapeProcessing, const SharedConnection &_rxConnection)
loads the grid control with the data object specified (which may be a table, a query or a command)
Definition: unodatbr.cxx:2343
virtual void SAL_CALL removeSelectionChangeListener(const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
Definition: unodatbr.cxx:1446
void unloadAndCleanup(bool _bDisposeConnection=true)
unloads the form, empties the grid model, cleans up anything related to the currently displayed objec...
Definition: unodatbr.cxx:3025
virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
Definition: unodatbr.cxx:1800
virtual void RowChanged() override
Definition: unodatbr.cxx:1525
virtual css::uno::Any getCurrentSelection(weld::TreeView &rControl) const override
returns the current selection in the given control
Definition: unodatbr.cxx:3511
OTableCopyHelper m_aTableCopyHelper
Definition: unodatbr.hxx:91
virtual void SAL_CALL registeredDatabaseLocation(const css::sdb::DatabaseRegistrationEvent &Event) override
Definition: unodatbr.cxx:3749
virtual void RemoveColumnListener(const css::uno::Reference< css::beans::XPropertySet > &xCol) override
Definition: unodatbr.cxx:1556
virtual void LoadFinished(bool _bWasSynch) override
Definition: unodatbr.cxx:1571
::std::vector< DataFlavorEx > DataFlavorExVector
EntryType
::cppu::ImplHelper5< css::frame::XStatusListener, css::view::XSelectionSupplier, css::document::XScriptInvocationContext, css::ui::XContextMenuInterception, css::sdb::XDatabaseRegistrationsListener > SbaTableQueryBrowser_Base
Definition: unodatbr.hxx:52
::utl::SharedUNOComponent< css::sdbc::XConnection > SharedConnection
Definition: commontypes.hxx:35
describes the state of a feature
css::uno::Reference< css::frame::XDispatch > xDispatcher
Definition: unodatbr.hxx:74
Reference< XFrame > xFrame
the frame which the component resides in. Must not be <NULL>
unsigned char sal_Bool
signed char sal_Int8
#define DECLARE_UNO3_DEFAULTS(classname, baseclass)