class SwView; class SwWrtShell; class SvNumberFormatter; class SwXMailMerge; class SwMailMergeConfigItem; class SwCalc; class INetURLObject; class SwDocShell;
enum DBManagerOptions
{
DBMGR_MERGE, ///< Data records in fields.
DBMGR_MERGE_PRINTER, ///< Print mail merge.
DBMGR_MERGE_EMAIL, ///< Send mail merge as email.
DBMGR_MERGE_FILE, ///< Save mail merge as files.
DBMGR_MERGE_SHELL ///< Create merge doc and keep the doc shell.
};
class SwDBManager
{ struct SwDBManager_Impl; class ConnectionDisposedListener_Impl; class MailDispatcherListener_Impl;
enumclass MergeStatus
{
Ok = 0, Cancel, Error
};
MergeStatus m_aMergeStatus; ///< current / last merge status bool m_bInitDBFields : 1; bool m_bInMerge : 1; ///< merge process active bool m_bMergeSilent : 1; ///< suppress display of dialogs/boxes (used when called over API)
SwDSParams_t m_DataSourceParams;
std::unique_ptr<SwDBManager_Impl> m_pImpl; const SwXMailMerge* m_pMergeEvtSrc; ///< != 0 if mail merge events are to be send /// Name of the embedded database that's included in the current document.
OUString m_sEmbeddedName;
/// Store last registrations to revoke or commit static std::vector<std::pair<SwDocShell*, OUString>> s_aUncommittedRegistrations;
/// Not used connections.
std::vector<OUString> m_aNotUsedConnections;
/// Set connection as used. void SetAsUsed(const OUString& rName);
/// The document that owns this manager.
SwDoc* m_pDoc;
/// Initialize data fields that lack name of database. bool IsInitDBFields() const { return m_bInitDBFields; } void SetInitDBFields(bool b) { m_bInitDBFields = b; }
/// Fill listbox with all table names of a database.
SW_DLLPUBLIC bool GetTableNames(weld::ComboBox& rBox, const OUString& rDBName);
/// Fill listbox with all column names of a database table.
SW_DLLPUBLIC void GetColumnNames(weld::ComboBox& rBox, const OUString& rDBName, const OUString& rTableName);
SW_DLLPUBLIC staticvoid GetColumnNames(weld::ComboBox& rBox,
css::uno::Reference< css::sdbc::XConnection> const & xConnection, const OUString& rTableName);
/// check if a data source is open bool IsDataSourceOpen(const OUString& rDataSource, const OUString& rTableOrQuery, bool bMergeShell);
/// open the source while fields are updated - for the calculator only! bool OpenDataSource(const OUString& rDataSource, const OUString& rTableOrQuery);
sal_uInt32 GetSelectedRecordId(const OUString& rDataSource, const OUString& rTableOrQuery, sal_Int32 nCommandType = -1); bool GetColumnCnt(const OUString& rSourceName, const OUString& rTableName, const OUString& rColumnName, sal_uInt32 nAbsRecordId, LanguageType nLanguage,
OUString& rResult, double* pNumber); /** create and store or find an already stored connection to a data source for use
in SwFieldMgr and SwDBTreeList */
css::uno::Reference< css::sdbc::XConnection> const &
RegisterConnection(OUString const& rSource);
/// Load the embedded data source of the document and also register it. void LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, const SwDocShell& rDocShell);
/// Unregister a data source.
SW_DLLPUBLIC staticvoid RevokeDataSource(const OUString& rName);
/** try to get the data source from the given connection through the XChild interface. Ifthisisnotpossible,thedatasourcewillbecreatedthroughitsname. @param_xConnection TheconnectionwhichshouldsupporttheXChildinterface.(notamust) @param_sDataSourceName Thedatasourcenamewillbeusedtocreatethedatasourcewhentheconnectioncannotbeusedforit. @return Thedatasource.
*/ static css::uno::Reference< css::sdbc::XDataSource>
getDataSourceAsParent(const css::uno::Reference< css::sdbc::XConnection>& _xConnection,const OUString& _sDataSourceName);
/** creates a RowSet, which must be disposed after use. @param_sDataSourceName Thedatasourcename @param_sCommand Thecommand. @param_nCommandType Thetypeofthecommand. @param_xConnection Theactiveconnectionwhichmaybe<NULL/>. @return ThenewcreatedRowSet.
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.