Branch libreoffice-5-0-4
[LibreOffice.git] / include / editeng / unofored.hxx
blob1910bcde3406f10eca3d4c6a0107219a0a994d19
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_UNOFORED_HXX
21 #define INCLUDED_EDITENG_UNOFORED_HXX
23 #include <editeng/editeng.hxx>
24 #include <editeng/unoedsrc.hxx>
25 #include <editeng/editengdllapi.h>
27 // SvxEditEngineForwarder - SvxTextForwarder for EditEngine
29 class EDITENG_DLLPUBLIC SvxEditEngineForwarder : public SvxTextForwarder
31 private:
32 EditEngine& rEditEngine;
34 public:
35 SvxEditEngineForwarder( EditEngine& rEngine );
36 virtual ~SvxEditEngineForwarder();
38 virtual sal_Int32 GetParagraphCount() const SAL_OVERRIDE;
39 virtual sal_Int32 GetTextLen( sal_Int32 nParagraph ) const SAL_OVERRIDE;
40 virtual OUString GetText( const ESelection& rSel ) const SAL_OVERRIDE;
41 virtual SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const SAL_OVERRIDE;
42 virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const SAL_OVERRIDE;
43 virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) SAL_OVERRIDE;
44 virtual void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) SAL_OVERRIDE;
45 virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const SAL_OVERRIDE;
47 virtual SfxItemState GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
48 virtual SfxItemState GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
50 virtual void QuickInsertText( const OUString& rText, const ESelection& rSel ) SAL_OVERRIDE;
51 virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) SAL_OVERRIDE;
52 virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) SAL_OVERRIDE;
53 virtual void QuickInsertLineBreak( const ESelection& rSel ) SAL_OVERRIDE;
55 virtual SfxItemPool* GetPool() const SAL_OVERRIDE;
57 virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rpTxtColor, Color*& rpFldColor ) SAL_OVERRIDE;
58 virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos ) SAL_OVERRIDE;
59 virtual bool IsValid() const SAL_OVERRIDE;
61 virtual LanguageType GetLanguage( sal_Int32, sal_Int32 ) const SAL_OVERRIDE;
62 virtual sal_Int32 GetFieldCount( sal_Int32 nPara ) const SAL_OVERRIDE;
63 virtual EFieldInfo GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const SAL_OVERRIDE;
64 virtual EBulletInfo GetBulletInfo( sal_Int32 nPara ) const SAL_OVERRIDE;
65 virtual Rectangle GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const SAL_OVERRIDE;
66 virtual Rectangle GetParaBounds( sal_Int32 nPara ) const SAL_OVERRIDE;
67 virtual MapMode GetMapMode() const SAL_OVERRIDE;
68 virtual OutputDevice* GetRefDevice() const SAL_OVERRIDE;
69 virtual bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const SAL_OVERRIDE;
70 virtual bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const SAL_OVERRIDE;
71 virtual bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell = false ) const SAL_OVERRIDE;
72 virtual sal_Int32 GetLineCount( sal_Int32 nPara ) const SAL_OVERRIDE;
73 virtual sal_Int32 GetLineLen( sal_Int32 nPara, sal_Int32 nLine ) const SAL_OVERRIDE;
74 virtual void GetLineBoundaries( /*out*/sal_Int32 &rStart, /*out*/sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine ) const SAL_OVERRIDE;
75 virtual sal_Int32 GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) const SAL_OVERRIDE;
76 virtual bool Delete( const ESelection& ) SAL_OVERRIDE;
77 virtual bool InsertText( const OUString&, const ESelection& ) SAL_OVERRIDE;
78 virtual bool QuickFormatDoc( bool bFull = false ) SAL_OVERRIDE;
79 virtual sal_Int16 GetDepth( sal_Int32 nPara ) const SAL_OVERRIDE;
80 virtual bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) SAL_OVERRIDE;
82 virtual const SfxItemSet* GetEmptyItemSetPtr() SAL_OVERRIDE;
84 // implementation functions for XParagraphAppend and XTextPortionAppend
85 virtual void AppendParagraph() SAL_OVERRIDE;
86 virtual sal_Int32 AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ) SAL_OVERRIDE;
87 //XTextCopy
88 virtual void CopyText(const SvxTextForwarder& rSource) SAL_OVERRIDE;
91 #endif
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */