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 .
21 #include <editeng/outliner.hxx>
22 #include <editeng/editeng.hxx>
24 enum class SdrCompatibilityFlag
;
26 typedef std::vector
<EENotify
> NotifyList
;
28 class OutlinerEditEng
: public EditEngine
34 // derived from EditEngine. Allows Outliner objects to provide
35 // bullet access to the EditEngine.
36 virtual const SvxNumberFormat
* GetNumberFormat( sal_Int32 nPara
) const override
;
39 OutlinerEditEng( Outliner
* pOwner
, SfxItemPool
* pPool
);
40 virtual ~OutlinerEditEng() override
;
42 virtual void PaintingFirstLine(sal_Int32 nPara
, const Point
& rStartPos
, const Point
& rOrigin
, Degree10 nOrientation
, OutputDevice
& rOutDev
) override
;
44 virtual void ParagraphInserted( sal_Int32 nNewParagraph
) override
;
45 virtual void ParagraphDeleted( sal_Int32 nDeletedParagraph
) override
;
46 virtual void ParagraphConnected( sal_Int32 nLeftParagraph
, sal_Int32 nRightParagraph
) override
;
48 virtual void DrawingText( const Point
& rStartPos
, const OUString
& rText
, sal_Int32 nTextStart
,
49 sal_Int32 nTextLen
, o3tl::span
<const sal_Int32
> pDXArray
,
50 o3tl::span
<const sal_Bool
> pKashidaArray
, const SvxFont
& rFont
,
51 sal_Int32 nPara
, sal_uInt8 nRightToLeft
,
52 const EEngineData::WrongSpellVector
* pWrongSpellVector
,
53 const SvxFieldData
* pFieldData
,
56 const css::lang::Locale
* pLocale
,
57 const Color
& rOverlineColor
,
58 const Color
& rTextLineColor
) override
;
60 virtual void DrawingTab(
61 const Point
& rStartPos
, tools::Long nWidth
, const OUString
& rChar
,
62 const SvxFont
& rFont
, sal_Int32 nPara
, sal_uInt8 nRightToLeft
,
65 const Color
& rOverlineColor
,
66 const Color
& rTextLineColor
) override
;
68 virtual void StyleSheetChanged( SfxStyleSheet
* pStyle
) override
;
69 virtual void ParaAttribsChanged( sal_Int32 nPara
) override
;
70 virtual bool SpellNextDocument() override
;
71 virtual OUString
GetUndoComment( sal_uInt16 nUndoId
) const override
;
73 // for text conversion
74 virtual bool ConvertNextDocument() override
;
76 virtual OUString
CalcFieldValue( const SvxFieldItem
& rField
, sal_Int32 nPara
, sal_Int32 nPos
, std::optional
<Color
>& rTxtColor
, std::optional
<Color
>& rFldColor
) override
;
78 virtual tools::Rectangle
GetBulletArea( sal_Int32 nPara
) override
;
80 /// @returns state of the SdrCompatibilityFlag
81 std::optional
<bool> GetCompatFlag(SdrCompatibilityFlag eFlag
) const;
83 virtual void SetParaAttribs( sal_Int32 nPara
, const SfxItemSet
& rSet
) override
;
85 // belongs into class Outliner, move there before incompatible update!
86 Link
<EENotify
&,void> aOutlinerNotifyHdl
;
87 NotifyList aNotifyCache
;
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */