29#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
30#include <com/sun/star/ucb/ResultSetException.hpp>
31#include <osl/diagnose.h>
58ResultSetDataSupplier::ResultSetDataSupplier(
59 uno::Reference< uno::XComponentContext > xContext,
62 m_bCountFinal( false ), m_bThrowException( false )
67ResultSetDataSupplier::~ResultSetDataSupplier()
101uno::Reference< ucb::XContentIdentifier >
104 std::unique_lock aGuard(
m_aMutex );
108uno::Reference< ucb::XContentIdentifier >
113 uno::Reference< ucb::XContentIdentifier > xId
123 if ( !aId.isEmpty() )
125 uno::Reference< ucb::XContentIdentifier > xId
126 = new ::ucbhelper::ContentIdentifier( aId );
130 return uno::Reference< ucb::XContentIdentifier >();
134uno::Reference< ucb::XContent >
137 std::unique_lock aGuard(
m_aMutex );
141 uno::Reference< ucb::XContent > xContent
150 uno::Reference< ucb::XContentIdentifier > xId
156 uno::Reference< ucb::XContent > xContent
157 =
m_xContent->getProvider()->queryContent( xId );
162 catch ( ucb::IllegalIdentifierException
const & )
166 return uno::Reference< ucb::XContent >();
172 std::unique_lock aGuard(
m_aMutex );
196 for ( sal_uInt32
n = nOldCount;
197 n < sal::static_int_cast<sal_uInt32>(
201 const OUString & rName
204 if ( rName.isEmpty() )
206 OSL_FAIL(
"ResultDataSupplier::getResult - Empty name!" );
228 if ( xResultSet.is() )
234 xResultSet->rowCountChanged( nOldCount,
m_aResults.size() );
237 xResultSet->rowCountFinal();
248 std::unique_lock aGuard(
m_aMutex );
257 for ( sal_uInt32
n = nOldCount;
258 n < sal::static_int_cast<sal_uInt32>(
262 const OUString & rName
265 if ( rName.isEmpty() )
267 OSL_FAIL(
"ResultDataSupplier::getResult - Empty name!" );
281 if ( xResultSet.is() )
287 xResultSet->rowCountChanged( nOldCount,
m_aResults.size() );
289 xResultSet->rowCountFinal();
308uno::Reference< sdbc::XRow >
311 std::unique_lock aGuard(
m_aMutex );
334 return uno::Reference< sdbc::XRow >();
340 std::unique_lock aGuard(
m_aMutex );
355 throw ucb::ResultSetException();
362 uno::Sequence< OUString > aNamesOfChildren;
364 if ( !
m_xContent->getContentProvider()->queryNamesOfChildren(
365 m_xContent->getIdentifier()->getContentIdentifier(),
368 OSL_FAIL(
"Got no list of children!" );
384 =
m_xContent->getIdentifier()->getContentIdentifier();
385 OUString
aURL( aContURL );
387 sal_Int32 nUrlEnd =
aURL.lastIndexOf(
'/' );
388 if ( nUrlEnd !=
aURL.getLength() - 1 )
uno::Reference< ucb::XContent > m_xContent
Reference< XComponentContext > m_xContext
css::uno::Reference< css::sdbc::XRow > getPropertyValues(const css::uno::Sequence< css::beans::Property > &rProperties)
OUString assembleChildURL(std::u16string_view aName)
virtual void releasePropertyValues(sal_uInt32 nIndex) override
virtual OUString queryContentIdentifierString(sal_uInt32 nIndex) override
virtual bool getResult(sal_uInt32 nIndex) override
virtual css::uno::Reference< css::sdbc::XRow > queryPropertyValues(sal_uInt32 nIndex) override
virtual sal_uInt32 totalCount() override
std::vector< ResultListEntry > m_aResults
bool getResultImpl(std::unique_lock< std::mutex > &rGuard, sal_uInt32 nIndex)
bool queryNamesOfChildren(std::unique_lock< std::mutex > &rGuard)
rtl::Reference< Content > m_xContent
virtual void close() override
OUString queryContentIdentifierStringImpl(std::unique_lock< std::mutex > &rGuard, sal_uInt32 nIndex)
virtual void validate() override
virtual css::uno::Reference< css::ucb::XContent > queryContent(sal_uInt32 nIndex) override
css::uno::Reference< css::ucb::XContentIdentifier > queryContentIdentifierImpl(std::unique_lock< std::mutex > &rGuard, sal_uInt32 nIndex)
virtual css::uno::Reference< css::ucb::XContentIdentifier > queryContentIdentifier(sal_uInt32 nIndex) override
virtual bool isCountFinal() override
std::optional< css::uno::Sequence< OUString > > m_xNamesOfChildren
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual sal_uInt32 currentCount() override
rtl::Reference< ResultSet > getResultSet() const