23#include <com/sun/star/sdb/DatabaseContext.hpp>
34 uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext());
35 uno::Reference<sdb::XDatabaseContext> xDBContext = sdb::DatabaseContext::create(xContext);
36 std::vector<SwFormatField*> vFields;
37 for (
const auto& pFieldType : *pFieldTypes)
40 pFieldType->GatherFields(vFields);
49 return xDBContext->getByName(rData.
sDataSource).hasValue();
51 catch (uno::Exception
const&)
virtual const SwFieldTypes * GetFieldTypes() const =0
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
bool IsFieldDataSourceAvailable(OUString &rUsedDataSource) const
Check whether DB fields point to an available data source and returns it.
SwDBData const & GetDBData() const
Database information.
bool IsUsed(const sw::BroadcastingModify &) const
Query if the paragraph-/character-/frame-/page-style is used.
@ Database
For old documents the Field-Which IDs must be preserved !!!