Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / sw / inc / unoredlines.hxx
blob9fe86311ca3843fd10578f87a0375eff395cfc97
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SW_INC_UNOREDLINES_HXX
20 #define INCLUDED_SW_INC_UNOREDLINES_HXX
22 #include <sal/config.h>
24 #include <docary.hxx>
25 #include <unocoll.hxx>
26 #include <unobaseclass.hxx>
27 #include <com/sun/star/container/XEnumerationAccess.hpp>
29 class SwRangeRedline;
30 namespace com{ namespace sun{ namespace star{
31 namespace beans{
32 class XPropertySet;
34 }}}
35 typedef
36 cppu::WeakImplHelper
38 css::container::XIndexAccess,
39 css::container::XEnumerationAccess,
40 css::lang::XServiceInfo
42 SwRedlinesBaseClass;
43 class SwXRedlines : public SwRedlinesBaseClass,
44 public SwUnoCollection
46 protected:
47 virtual ~SwXRedlines() override;
48 public:
49 SwXRedlines(SwDoc* pDoc);
51 //XIndexAccess
52 virtual sal_Int32 SAL_CALL getCount( ) override;
53 virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override;
55 //XEnumerationAccess - was: XParagraphEnumerationAccess
56 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
58 //XElementAccess
59 virtual css::uno::Type SAL_CALL getElementType( ) override;
60 virtual sal_Bool SAL_CALL hasElements( ) override;
62 //XServiceInfo
63 virtual OUString SAL_CALL getImplementationName() override;
64 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
65 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
67 static css::beans::XPropertySet* GetObject( SwRangeRedline& rRedline, SwDoc& rDoc );
70 class SwXRedlineEnumeration
71 : public SwSimpleEnumeration_Base
72 , public SwClient
74 SwDoc* pDoc;
75 SwRedlineTable::size_type nCurrentIndex;
76 protected:
77 virtual ~SwXRedlineEnumeration() override;
78 public:
79 SwXRedlineEnumeration(SwDoc& rDoc);
81 //XEnumeration
82 virtual sal_Bool SAL_CALL hasMoreElements() override;
83 virtual css::uno::Any SAL_CALL nextElement() override;
85 //XServiceInfo
86 virtual OUString SAL_CALL getImplementationName() override;
87 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
88 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
89 protected:
90 //SwClient
91 virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
94 #endif
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */