summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/cmis/cmis_datasupplier.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'ucb/source/ucp/cmis/cmis_datasupplier.cxx')
-rw-r--r--ucb/source/ucp/cmis/cmis_datasupplier.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
index 19754f84c216..14b3385ec712 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
@@ -68,18 +68,20 @@ namespace cmis
OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
{
- return queryContentIdentifier( nIndex )->getContentIdentifier( );
+ auto const xTemp(queryContentIdentifier(nIndex));
+ return (xTemp.is()) ? xTemp->getContentIdentifier() : OUString();
}
uno::Reference< ucb::XContentIdentifier > DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
{
- return queryContent( nIndex )->getIdentifier( );
+ auto const xTemp(queryContent(nIndex));
+ return (xTemp.is()) ? xTemp->getIdentifier() : uno::Reference<ucb::XContentIdentifier>();
}
uno::Reference< ucb::XContent > DataSupplier::queryContent( sal_uInt32 nIndex )
{
- if ( nIndex > maResults.size() )
- getData( );
+ if (!getResult(nIndex))
+ return uno::Reference<ucb::XContent>();
return maResults[ nIndex ]->xContent;
}