bump product version to 5.0.4.1
[LibreOffice.git] / include / editeng / unoforou.hxx
blob5403ef68e7ff6f444fe4feaa20d3aecb25947999
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 .
20 #ifndef INCLUDED_EDITENG_UNOFOROU_HXX
21 #define INCLUDED_EDITENG_UNOFOROU_HXX
23 #include <editeng/unoedsrc.hxx>
24 #include <editeng/editengdllapi.h>
26 #include <editeng/editdata.hxx>
28 class Outliner;
30 // SvxOutlinerForwarder - SvxTextForwarder for Outliner
32 class EDITENG_DLLPUBLIC SvxOutlinerForwarder : public SvxTextForwarder
34 private:
35 Outliner& rOutliner;
36 bool bOutlinerText;
38 /** this pointer may be null or point to an item set for the attribs of
39 the selection maAttribsSelection */
40 mutable SfxItemSet* mpAttribsCache;
42 /** if we have a chached attribute item set, this is the selection of it */
43 mutable ESelection maAttribCacheSelection;
45 /** this pointer may be null or point to an item set for the paragraph
46 mnParaAttribsCache */
47 mutable SfxItemSet* mpParaAttribsCache;
49 /** if we have a cached para attribute item set, this is the paragraph of it */
50 mutable sal_Int32 mnParaAttribsCache;
52 public:
53 SvxOutlinerForwarder( Outliner& rOutl, bool bOutlText = false );
54 virtual ~SvxOutlinerForwarder();
56 virtual sal_Int32 GetParagraphCount() const SAL_OVERRIDE;
57 virtual sal_Int32 GetTextLen( sal_Int32 nParagraph ) const SAL_OVERRIDE;
58 virtual OUString GetText( const ESelection& rSel ) const SAL_OVERRIDE;
59 virtual SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const SAL_OVERRIDE;
60 virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const SAL_OVERRIDE;
61 virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) SAL_OVERRIDE;
62 virtual void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) SAL_OVERRIDE;
63 virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const SAL_OVERRIDE;
65 virtual SfxItemState GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
66 virtual SfxItemState GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
68 virtual void QuickInsertText( const OUString& rText, const ESelection& rSel ) SAL_OVERRIDE;
69 virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) SAL_OVERRIDE;
70 virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) SAL_OVERRIDE;
71 virtual void QuickInsertLineBreak( const ESelection& rSel ) SAL_OVERRIDE;
73 virtual SfxItemPool* GetPool() const SAL_OVERRIDE;
75 virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rpTxtColor, Color*& rpFldColor ) SAL_OVERRIDE;
76 virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos ) SAL_OVERRIDE;
78 virtual bool IsValid() const SAL_OVERRIDE;
80 Outliner& GetOutliner() const { return rOutliner; }
82 virtual LanguageType GetLanguage( sal_Int32, sal_Int32 ) const SAL_OVERRIDE;
83 virtual sal_Int32 GetFieldCount( sal_Int32 nPara ) const SAL_OVERRIDE;
84 virtual EFieldInfo GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const SAL_OVERRIDE;
85 virtual EBulletInfo GetBulletInfo( sal_Int32 nPara ) const SAL_OVERRIDE;
86 virtual Rectangle GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const SAL_OVERRIDE;
87 virtual Rectangle GetParaBounds( sal_Int32 nPara ) const SAL_OVERRIDE;
88 virtual MapMode GetMapMode() const SAL_OVERRIDE;
89 virtual OutputDevice* GetRefDevice() const SAL_OVERRIDE;
90 virtual bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const SAL_OVERRIDE;
91 virtual bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const SAL_OVERRIDE;
92 virtual bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell = false ) const SAL_OVERRIDE;
93 virtual sal_Int32 GetLineCount( sal_Int32 nPara ) const SAL_OVERRIDE;
94 virtual sal_Int32 GetLineLen( sal_Int32 nPara, sal_Int32 nLine ) const SAL_OVERRIDE;
95 virtual void GetLineBoundaries( /*out*/sal_Int32& rStart, /*out*/sal_Int32& rEnd, sal_Int32 nPara, sal_Int32 nLine ) const SAL_OVERRIDE;
96 virtual sal_Int32 GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) const SAL_OVERRIDE;
97 virtual bool Delete( const ESelection& ) SAL_OVERRIDE;
98 virtual bool InsertText( const OUString&, const ESelection& ) SAL_OVERRIDE;
99 virtual bool QuickFormatDoc( bool bFull = false ) SAL_OVERRIDE;
100 virtual sal_Int16 GetDepth( sal_Int32 nPara ) const SAL_OVERRIDE;
101 virtual bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) SAL_OVERRIDE;
102 virtual sal_Int32 GetNumberingStartValue( sal_Int32 nPara ) SAL_OVERRIDE;
103 virtual void SetNumberingStartValue( sal_Int32 nPara, sal_Int32 nNumberingStartValue ) SAL_OVERRIDE;
105 virtual bool IsParaIsNumberingRestart( sal_Int32 nPara ) SAL_OVERRIDE;
106 virtual void SetParaIsNumberingRestart( sal_Int32 nPara, bool bParaIsNumberingRestart ) SAL_OVERRIDE;
108 /* this method flushes internal caches for this forwarder */
109 void flushCache();
111 virtual const SfxItemSet* GetEmptyItemSetPtr() SAL_OVERRIDE;
113 // implementation functions for XParagraphAppend and XTextPortionAppend
114 virtual void AppendParagraph() SAL_OVERRIDE;
115 virtual sal_Int32 AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ) SAL_OVERRIDE;
116 //XTextCopy
117 virtual void CopyText(const SvxTextForwarder& rSource) SAL_OVERRIDE;
120 #endif
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */