1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
20 #ifndef INCLUDED_SW_SOURCE_CORE_INC_UNOLINEBREAK_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_UNOLINEBREAK_HXX
23 #include <cppuhelper/implbase.hxx>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <com/sun/star/text/XTextContent.hpp>
28 #include <unobaseclass.hxx>
31 class SwFormatLineBreak
;
33 /// UNO API wrapper around an SwFormatLineBreak, exposed as the com.sun.star.text.LineBreak service.
34 class SwXLineBreak final
35 : public cppu::WeakImplHelper
<css::beans::XPropertySet
, css::lang::XServiceInfo
,
36 css::text::XTextContent
>
39 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
41 SwXLineBreak(SwFormatLineBreak
& rFormat
);
44 ~SwXLineBreak() override
;
47 static rtl::Reference
<SwXLineBreak
> CreateXLineBreak(SwFormatLineBreak
* pLineBreakFormat
);
50 css::uno::Reference
<css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo() override
;
51 void SAL_CALL
setPropertyValue(const OUString
& rPropertyName
,
52 const css::uno::Any
& rValue
) override
;
53 css::uno::Any SAL_CALL
getPropertyValue(const OUString
& rPropertyName
) override
;
54 void SAL_CALL
addPropertyChangeListener(
55 const OUString
& rPropertyName
,
56 const css::uno::Reference
<css::beans::XPropertyChangeListener
>& xListener
) override
;
57 void SAL_CALL
removePropertyChangeListener(
58 const OUString
& rPropertyName
,
59 const css::uno::Reference
<css::beans::XPropertyChangeListener
>& xListener
) override
;
60 void SAL_CALL
addVetoableChangeListener(
61 const OUString
& rPropertyName
,
62 const css::uno::Reference
<css::beans::XVetoableChangeListener
>& xListener
) override
;
63 void SAL_CALL
removeVetoableChangeListener(
64 const OUString
& rPropertyName
,
65 const css::uno::Reference
<css::beans::XVetoableChangeListener
>& xListener
) override
;
68 OUString SAL_CALL
getImplementationName() override
;
69 sal_Bool SAL_CALL
supportsService(const OUString
& rServiceName
) override
;
70 css::uno::Sequence
<OUString
> SAL_CALL
getSupportedServiceNames() override
;
73 void SAL_CALL
attach(const css::uno::Reference
<css::text::XTextRange
>& xTextRange
) override
;
74 css::uno::Reference
<css::text::XTextRange
> SAL_CALL
getAnchor() override
;
76 // XComponent, via XTextContent
77 void SAL_CALL
dispose() override
;
79 addEventListener(const css::uno::Reference
<css::lang::XEventListener
>& xListener
) override
;
81 removeEventListener(const css::uno::Reference
<css::lang::XEventListener
>& xListener
) override
;
84 #endif // INCLUDED_SW_SOURCE_CORE_INC_UNOLINEBREAK_HXX
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */