OUString m_sQueryCommand; // the command of the query currently loaded (if any) //OUString m_sToBeLoaded; // contains the element name which should be loaded if any
VclPtr<InterimDBTreeListBox> m_pTreeView; // contains the datasources of the registry
VclPtr<Splitter> m_pSplitter;
std::unique_ptr<weld::TreeIter> m_xCurrentlyDisplayed;
ImplSVEvent * m_nAsyncDrop;
bool m_bQueryEscapeProcessing : 1; // the escape processing flag of the query currently loaded (if any) bool m_bShowMenu; // if sal_True the menu should be visible otherwise not bool m_bInSuspend; bool m_bEnableBrowser;
::std::optional< bool >
m_aDocScriptSupport; // relevant if and only if we are associated with exactly one DBDoc
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 = css::sdb::application::DatabaseObjectContainer::DATA_SOURCE,
etQueryContainer = css::sdb::application::DatabaseObjectContainer::QUERIES,
etTableContainer = css::sdb::application::DatabaseObjectContainer::TABLES,
etQuery = css::sdb::application::DatabaseObject::QUERY,
etTableOrView = css::sdb::application::DatabaseObject::TABLE,
etUnknown = -1
};
/** returns a DatabaseObject value corresponding to the given EntryType @param_eType theentrytype.MustnotbeetUnknown.
*/ static sal_Int32 getDatabaseObjectType( EntryType _eType );
DECLARE_UNO3_DEFAULTS(SbaTableQueryBrowser,SbaXDataBrowserController) // late construction virtualbool Construct(vcl::Window* pParent) override; // XInterface virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
// methods for showing/hiding the explorer part bool haveExplorer() const; void hideExplorer(); void showExplorer(); void toggleExplorer() { if (haveExplorer()) hideExplorer(); else showExplorer(); }
// methods for handling the 'selection' (painting them bold) of SvLBoxEntries // returns <TRUE/> if the entry is selected (which means it's part of the selected path) bool isSelected(const weld::TreeIter& rEntry) const; // select the entry (and only the entry, not the whole path) void select(const weld::TreeIter* pEntry, bool bSelect); // select the path of the entry (which must be an entry without children) void selectPath(const weld::TreeIter* pEntry, bool bSelect = true);
// check the state of the external slot given, update any UI elements if necessary void implCheckExternalSlot( sal_uInt16 _nId );
// connect to the external dispatchers (if any) void connectExternalDispatches();
/** get the state of an external slot <p>Theslotisavailableifanexternaldispatcherisresponsibleforit,_and_ifthisdispatcher toldustheslotisavailable.</p>
*/ bool getExternalSlotState( sal_uInt16 _nId ) const;
/** add an entry (including the subentries for queries/tables) to the list model
/// removes (and cleans up) the entry for the given data source void impl_cleanupDataSourceEntry( std::u16string_view _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/>iftheconnectionshouldbedisposed @param_bFlushData <TRUE/>ifthecurrentlydisplayedobject(ifany)shouldbeflushed
*/ void unloadAndCleanup( bool _bDisposeConnection = true );
// disposes the connection associated with the given entry (which must represent a data source) void disposeConnection(const weld::TreeIter* xpDSEntry);
/// flushes 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(const weld::TreeIter& rEntry, bool bDisposeConnection = true);
/** search in the tree for query- or tablecontainer equal to this interface and return thiscontainerentry
*/
std::unique_ptr<weld::TreeIter> getEntryFromContainer(const css::uno::Reference<css::container::XNameAccess>& rxNameAccess);
// return true when there is connection available bool ensureConnection(const weld::TreeIter* pDSEntry, void * pDSData, SharedConnection& rConnection); bool ensureConnection(const weld::TreeIter* pAnyEntry, SharedConnection& rConnection);
bool getExistentConnectionFor(const weld::TreeIter* pDSEntry, SharedConnection& rConnection); /** returns an image provider which works with the connection belonging to the given entry
*/
std::unique_ptr<ImageProvider> getImageProviderFor(const weld::TreeIter* pAnyEntry);
// ensure that the xObject for the given entry is set on the user data bool ensureEntryObject(const weld::TreeIter& rEntry);
// get the display text of the entry given
OUString GetEntryText(const weld::TreeIter& rEntry) const;
// is called when a table or a query was selected
DECL_LINK( OnSelectionChange, LinkParamNone*, void );
DECL_LINK( OnExpandEntry, const weld::TreeIter&, bool );
DECL_LINK( OnCopyEntry, LinkParamNone*, void );
int OnTreeEntryCompare(const weld::TreeIter& rLHS, const weld::TreeIter& rRHS);
/// selects the entry given and loads the grid control with the object's data bool implSelect( const OUString& _rDataSourceName, const OUString& _rCommand, const sal_Int32 _nCommandType, constbool _bEscapeProcessing, const SharedConnection& _rxConnection, bool _bSelectDirect
);
std::unique_ptr<weld::TreeIter> implGetConnectionEntry(const weld::TreeIter& rEntry) const; /// inserts an entry into the tree
std::unique_ptr<weld::TreeIter> implAppendEntry( const weld::TreeIter* pParent, const OUString& rName, const DBTreeListUserData* pUserData);
/// loads the grid control with the data object specified (which may be a table, a query or a command) bool implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand, const sal_Int32 _nCommandType, constbool _bEscapeProcessing, const SharedConnection& _rxConnection );
/** retrieves the tree entry for the object described by <arg>_rDescriptor</arg> @paramrDescriptor theobjectdescriptor @paramppDataSourceEntry Ifnot<NULL/>,thedatasourcetreeentrywillbereturnedhere @paramppContainerEntry Ifnot<NULL/>,theobjectcontainertreeentrywillbereturnedhere
*/
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 data source name, command and command type @paramrDataSource thedatasourcename @paramrCommand thecommand @paramnCommandType thecommandtype @paramrDescriptor theobjectdescriptor @paramppDataSourceEntry Ifnot<NULL/>,thedatasourcetreeentrywillbereturnedhere @paramppContainerEntry Ifnot<NULL/>,theobjectcontainertreeentrywillbereturnedhere @parambExpandAncestors If<TRUE/>,allancestoronthewaytotheentrywillbeexpanded
*/
std::unique_ptr<weld::TreeIter> getObjectEntry( const OUString& rDataSource, const OUString& rCommand, sal_Int32 nCommandType,
std::unique_ptr<weld::TreeIter>* ppDataSourceEntry, std::unique_ptr<weld::TreeIter>* ppContainerEntry, bool _bExpandAncestors = true, const SharedConnection& rxConnection = SharedConnection()
);
/// checks if m_aDocumentDataSource describes a known object void checkDocumentDataSource();
// checks whether the given tree entry denotes a data source bool impl_isDataSourceEntry(const weld::TreeIter* pEntry) const;
/// retrieves the data source URL/name for the given entry representing a data source
OUString getDataSourceAccessor(const weld::TreeIter& rDataSourceEntry) const;
/** get the signature (command/escape processing) of the query the form is based on <p>Iftheforisnotbasedonaqueryornotevenloaded,nothinghappensand<FALSE/>isreturned.</p>
*/ bool implGetQuerySignature( OUString& _rCommand, bool& _bEscapeProcessing );
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.