22#include <com/sun/star/sdbc/SQLException.hpp>
23#include <com/sun/star/text/XTextDocument.hpp>
24#include <com/sun/star/text/XTextTablesSupplier.hpp>
31 : OComponentDatabaseMetaData(pConnection)
46 const OUString& tableNamePattern,
const uno::Sequence<OUString>& types)
56 OUString aTable(
"TABLE");
58 bool bTableFound =
true;
59 sal_Int32
nLength = types.getLength();
64 const OUString* pIter = types.getConstArray();
65 const OUString* pEnd = pIter +
nLength;
66 for (; pIter != pEnd; ++pIter)
81 uno::Reference<text::XTextTablesSupplier> xDoc(aDocHolder.
getDoc(), uno::UNO_QUERY);
83 throw sdbc::SQLException();
84 uno::Reference<container::XNameAccess> xTables = xDoc->getTextTables();
86 throw sdbc::SQLException();
87 uno::Sequence<OUString> aTableNames = xTables->getElementNames();
90 sal_Int32 nTableCount = aTableNames.getLength();
91 for (sal_Int32 nTable = 0; nTable < nTableCount; nTable++)
93 const OUString& rName = aTableNames[nTable];
94 if (
match(tableNamePattern, rName,
'\0'))
101 aRows.push_back(aRow);
105 pResult->setRows(std::move(aRows));
ORowSetValueDecorator decorates an ORowSetValue so the value is "refcounted".
const css::uno::Reference< css::text::XTextDocument > & getDoc() const
mutable::osl::Mutex m_aMutex
bool match(const sal_Unicode *pWild, const sal_Unicode *pStr, const sal_Unicode cEscape)