LibreOffice Module dbaccess (master) 1
myucp_datasupplier.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <rtl/ref.hxx>
25#include "documentcontainer.hxx"
26#include <memory>
27
28namespace dbaccess
29{
31{
32 OUString aId;
33 css::uno::Reference<css::ucb::XContentIdentifier> xId;
35 css::uno::Reference<css::sdbc::XRow> xRow;
37
38 explicit ResultListEntry(const ContentProperties& rEntry)
39 : rData(rEntry)
40 {
41 }
42};
43
45{
46 osl::Mutex m_aMutex;
47 std::vector<std::unique_ptr<ResultListEntry>> m_aResults;
49 bool m_bCountFinal = false;
50
51public:
52 explicit DataSupplier(const rtl::Reference<ODocumentContainer>& rxContent);
53 virtual ~DataSupplier() override;
54
55 virtual OUString queryContentIdentifierString(sal_uInt32 nIndex) override;
56 virtual css::uno::Reference<css::ucb::XContentIdentifier>
57 queryContentIdentifier(sal_uInt32 nIndex) override;
58 virtual css::uno::Reference<css::ucb::XContent> queryContent(sal_uInt32 nIndex) override;
59
60 virtual bool getResult(sal_uInt32 nIndex) override;
61
62 virtual sal_uInt32 totalCount() override;
63 virtual sal_uInt32 currentCount() override;
64 virtual bool isCountFinal() override;
65
66 virtual css::uno::Reference<css::sdbc::XRow> queryPropertyValues(sal_uInt32 nIndex) override;
67 virtual void releasePropertyValues(sal_uInt32 nIndex) override;
68
69 virtual void close() override;
70
71 virtual void validate() override;
72};
73}
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DataSupplier(const rtl::Reference< ODocumentContainer > &rxContent)
virtual void validate() override
virtual css::uno::Reference< css::ucb::XContent > queryContent(sal_uInt32 nIndex) override
virtual css::uno::Reference< css::sdbc::XRow > queryPropertyValues(sal_uInt32 nIndex) override
rtl::Reference< ODocumentContainer > m_xContent
virtual OUString queryContentIdentifierString(sal_uInt32 nIndex) override
virtual sal_uInt32 currentCount() override
virtual bool isCountFinal() override
virtual sal_uInt32 totalCount() override
std::vector< std::unique_ptr< ResultListEntry > > m_aResults
virtual bool getResult(sal_uInt32 nIndex) override
virtual ~DataSupplier() override
virtual void close() override
virtual void releasePropertyValues(sal_uInt32 nIndex) override
virtual css::uno::Reference< css::ucb::XContentIdentifier > queryContentIdentifier(sal_uInt32 nIndex) override
css::uno::Reference< css::ucb::XContentIdentifier > xId
const ContentProperties & rData
::rtl::Reference< OContentHelper > xContent
css::uno::Reference< css::sdbc::XRow > xRow
ResultListEntry(const ContentProperties &rEntry)