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 .
22 #include <editeng/outliner.hxx>
23 #include <editeng/editeng.hxx>
25 typedef std::vector
<EENotify
> NotifyList
;
27 class OutlinerEditEng
: public EditEngine
33 // derived from EditEngine. Allows Outliner objetcs to provide
34 // bullet access to the EditEngine.
35 virtual const SvxNumberFormat
* GetNumberFormat( sal_Int32 nPara
) const;
38 OutlinerEditEng( Outliner
* pOwner
, SfxItemPool
* pPool
);
41 virtual void PaintingFirstLine( sal_Int32 nPara
, const Point
& rStartPos
, long nBaseLineY
, const Point
& rOrigin
, short nOrientation
, OutputDevice
* pOutDev
);
43 virtual void ParagraphInserted( sal_Int32 nNewParagraph
);
44 virtual void ParagraphDeleted( sal_Int32 nDeletedParagraph
);
45 virtual void ParagraphConnected( sal_Int32 nLeftParagraph
, sal_Int32 nRightParagraph
);
47 virtual void DrawingText(
48 const Point
& rStartPos
, const XubString
& rText
, sal_uInt16 nTextStart
, sal_uInt16 nTextLen
, const sal_Int32
* pDXArray
, const SvxFont
& rFont
,
49 sal_Int32 nPara
, sal_uInt16 nIndex
, sal_uInt8 nRightToLeft
,
50 const EEngineData::WrongSpellVector
* pWrongSpellVector
,
51 const SvxFieldData
* pFieldData
,
55 const ::com::sun::star::lang::Locale
* pLocale
,
56 const Color
& rOverlineColor
,
57 const Color
& rTextLineColor
);
59 virtual void DrawingTab(
60 const Point
& rStartPos
, long nWidth
, const String
& rChar
,
61 const SvxFont
& rFont
, sal_Int32 nPara
, xub_StrLen nIndex
, sal_uInt8 nRightToLeft
,
64 const Color
& rOverlineColor
,
65 const Color
& rTextLineColor
);
67 virtual void StyleSheetChanged( SfxStyleSheet
* pStyle
);
68 virtual void ParaAttribsChanged( sal_Int32 nPara
);
69 virtual sal_Bool
SpellNextDocument();
70 virtual XubString
GetUndoComment( sal_uInt16 nUndoId
) const;
72 // for text conversion
73 virtual sal_Bool
ConvertNextDocument();
75 virtual void FieldClicked( const SvxFieldItem
& rField
, sal_Int32 nPara
, sal_uInt16 nPos
);
76 virtual void FieldSelected( const SvxFieldItem
& rField
, sal_Int32 nPara
, sal_uInt16 nPos
);
77 virtual OUString
CalcFieldValue( const SvxFieldItem
& rField
, sal_Int32 nPara
, sal_uInt16 nPos
, Color
*& rTxtColor
, Color
*& rFldColor
);
79 virtual Rectangle
GetBulletArea( sal_Int32 nPara
);
81 virtual void SetParaAttribs( sal_Int32 nPara
, const SfxItemSet
& rSet
);
83 // belongs into class Outliner, move there before incompatible update!
84 Link aOutlinerNotifyHdl
;
85 NotifyList aNotifyCache
;
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */