Debian Codegraph @

sw/inc/unoredlines.hxx

raw symbols SCIP
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 #ifndef INCLUDED_SW_INC_UNOREDLINES_HXX
20 #define INCLUDED_SW_INC_UNOREDLINES_HXX
21
22 #include <sal/config.h>
23
24 #include "docary.hxx"
25 #include "unocoll.hxx"
26 #include "unobaseclass.hxx"
27 #include <svl/listener.hxx>
28 #include <com/sun/star/container/XEnumerationAccess.hpp>
29
30 class SwRangeRedline;
31 namespace com::sun::star::beans { class XPropertySet; }
32
33 typedef
34 cppu::WeakImplHelper
35 <
36 css::container::XIndexAccess,
37 css::container::XEnumerationAccess,
38 css::lang::XServiceInfo
39 >
40 SwRedlinesBaseClass;
41 class SW_DLLPUBLIC SwXRedlines final : public SwRedlinesBaseClass,
42 public SwUnoCollection
43 {
44 virtual ~SwXRedlines() override;
45 public:
46 SwXRedlines(SwDoc* pDoc);
47
48 //XIndexAccess
49 virtual sal_Int32 SAL_CALL getCount( ) override;
50 virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override;
51
52 //XEnumerationAccess - was: XParagraphEnumerationAccess
53 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
54
55 //XElementAccess
56 virtual css::uno::Type SAL_CALL getElementType( ) override;
57 virtual sal_Bool SAL_CALL hasElements( ) override;
58
59 //XServiceInfo
60 virtual OUString SAL_CALL getImplementationName() override;
61 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
62 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
63
64 static css::uno::Reference<css::beans::XPropertySet> GetObject(SwRangeRedline& rRedline);
65 };
66
67 class SwXRedlineEnumeration final
68 : public SwSimpleEnumeration_Base
69 , public SvtListener
70 {
71 SwDoc* m_pDoc;
72 SwRedlineTable::size_type m_nCurrentIndex;
73
74 virtual ~SwXRedlineEnumeration() override;
75 public:
76 SwXRedlineEnumeration(SwDoc& rDoc);
77
78 //XEnumeration
79 virtual sal_Bool SAL_CALL hasMoreElements() override;
80 virtual css::uno::Any SAL_CALL nextElement() override;
81
82 //XServiceInfo
83 virtual OUString SAL_CALL getImplementationName() override;
84 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
85 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
86
87 virtual void Notify( const SfxHint& ) override;
88 };
89
90 #endif
91
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */