LibreOffice Module basctl (master) 1
documentenumeration.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 <com/sun/star/frame/XController.hpp>
23#include <memory>
24#include <vector>
25
26namespace com::sun::star::uno { class XComponentContext; }
27
28
29namespace basctl::docs {
30
31
32 typedef std::vector< css::uno::Reference< css::frame::XController > > Controllers;
33
35 {
36 css::uno::Reference< css::frame::XModel > xModel;
38 };
39
40 typedef std::vector< DocumentDescriptor > Documents;
41
42
45 {
46 public:
47 virtual bool includeDocument( const DocumentDescriptor& _rDocument ) const = 0;
48
49 protected:
51 };
52
53
67 {
68 public:
69 DocumentEnumeration( css::uno::Reference< css::uno::XComponentContext > const & _rContext, const IDocumentDescriptorFilter* _pFilter );
71
78 void getDocuments(
79 Documents& _out_rDocuments
80 ) const;
81
82 private:
83 css::uno::Reference< css::uno::XComponentContext > m_xContext;
85 };
86
87
88} // namespace basctl::docs
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
is a helper class for enumerating documents in OOo
css::uno::Reference< css::uno::XComponentContext > m_xContext
void getDocuments(Documents &_out_rDocuments) const
retrieves a list of all currently known documents in the application
const IDocumentDescriptorFilter * m_pFilter
DocumentEnumeration(css::uno::Reference< css::uno::XComponentContext > const &_rContext, const IDocumentDescriptorFilter *_pFilter)
allows pre-filtering when enumerating document descriptors
virtual bool includeDocument(const DocumentDescriptor &_rDocument) const =0
std::vector< css::uno::Reference< css::frame::XController > > Controllers
std::vector< DocumentDescriptor > Documents
css::uno::Reference< css::frame::XModel > xModel
#define SAL_NO_VTABLE