20#ifndef INCLUDED_EDITENG_EDITENG_HXX 
   21#define INCLUDED_EDITENG_EDITENG_HXX 
   28#include <com/sun/star/uno/Reference.h> 
   29#include <com/sun/star/i18n/WordType.hpp> 
   30#include <com/sun/star/i18n/CharacterIteratorMode.hpp> 
   52template <
typename Arg, 
typename Ret> 
class Link;
 
   55  namespace linguistic2 {
 
   59  namespace datatransfer {
 
   73namespace basegfx { 
class B2DPolyPolygon; }
 
   75    struct MisspellRanges;
 
  156        css::uno::Reference<css::datatransfer::XTransferable > 
const & rxDataObj,
 
  157        const OUString& rBaseURL, 
const EditPaM& rPaM, 
bool bUseSpecial);
 
  174        css::datatransfer::XTransferable>
 
  183        sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES);
 
  186        const ParaPortion* pParaPortion, 
const EditLine* pLine, sal_Int32 nIndex, 
bool bPreferPortionStart = 
false) 
const;
 
  208    void            SetDefTab( sal_uInt16 nDefTab );
 
  213    void            SetRefMapMode( 
const MapMode& rMapMode );
 
  214    MapMode const & GetRefMapMode() 
const;
 
  221    bool            SetUpdateLayout(
bool bUpdate, 
bool bRestoring = 
false);
 
  222    bool            IsUpdateLayout() 
const;
 
  224    void            SetBackgroundColor( 
const Color& rColor );
 
  225    Color const &   GetBackgroundColor() 
const;
 
  226    Color           GetAutoColor() 
const;
 
  227    void            EnableAutoColor( 
bool b );
 
  228    void            ForceAutoColor( 
bool b );
 
  229    bool            IsForceAutoColor() 
const;
 
  233    void            RemoveView(
size_t nIndex);
 
  234    EditView*       GetView(
size_t nIndex = 0) 
const;
 
  235    size_t          GetViewCount() 
const;
 
  236    bool            HasView( 
EditView* pView ) 
const;
 
  238    void SetActiveView(
EditView* pView);
 
  241    const Size&     GetPaperSize() 
const;
 
  243    void            SetVertical( 
bool bVertical );
 
  244    bool            IsEffectivelyVertical() 
const;
 
  245    bool            IsTopToBottom() 
const;
 
  246    bool            GetVertical() 
const;
 
  250    void SetTextColumns(sal_Int16 nColumns, sal_Int32 nSpacing);
 
  252    void            SetFixedCellHeight( 
bool bUseFixedCellHeight );
 
  266    void            SetKernAsianPunctuation( 
bool bEnabled );
 
  268    void            SetAddExtLeading( 
bool b );
 
  274    const Size&     GetMinAutoPaperSize() 
const;
 
  275    void            SetMinAutoPaperSize( 
const Size& rSz );
 
  277    const Size&     GetMaxAutoPaperSize() 
const;
 
  278    void            SetMaxAutoPaperSize( 
const Size& rSz );
 
  282    OUString        GetText( 
LineEnd eEnd = LINEEND_LF ) 
const;
 
  283    OUString        GetText( 
const ESelection& rSelection ) 
const;
 
  284    sal_Int32       GetTextLen() 
const;
 
  285    sal_uInt32      GetTextHeight() 
const;
 
  286    sal_uInt32      GetTextHeightNTP() 
const;
 
  287    sal_uInt32      CalcTextWidth();
 
  289    OUString        GetText( sal_Int32 nParagraph ) 
const;
 
  290    sal_Int32       GetTextLen( sal_Int32 nParagraph ) 
const;
 
  291    sal_uInt32      GetTextHeight( sal_Int32 nParagraph ) 
const;
 
  293    sal_Int32       GetParagraphCount() 
const;
 
  295    sal_Int32       GetLineCount( sal_Int32 nParagraph ) 
const;
 
  296    sal_Int32       GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) 
const;
 
  297    void            GetLineBoundaries( sal_Int32& rStart, sal_Int32& rEnd, sal_Int32 nParagraph, sal_Int32 nLine ) 
const;
 
  298    sal_Int32       GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) 
const;
 
  299    sal_uInt32      GetLineHeight( sal_Int32 nParagraph );
 
  306    OUString        
GetWord(sal_Int32 nPara, sal_Int32 nIndex);
 
  311    void            SetText( 
const OUString& rStr );
 
  313    std::unique_ptr<EditTextObject> CreateTextObject();
 
  314    std::unique_ptr<EditTextObject> GetEmptyTextObject() 
const;
 
  315    std::unique_ptr<EditTextObject> CreateTextObject( sal_Int32 nPara, sal_Int32 nParas = 1 );
 
  316    std::unique_ptr<EditTextObject> CreateTextObject( 
const ESelection& rESelection );
 
  319    void            RemoveParagraph(sal_Int32 nPara);
 
  320    void            InsertParagraph(sal_Int32 nPara, 
const EditTextObject& rTxtObj, 
const bool bAppend = 
false);
 
  321    void            InsertParagraph(sal_Int32 nPara, 
const OUString& rText);
 
  323    void            SetText(sal_Int32 nPara, 
const OUString& rText);
 
  325    virtual void        SetParaAttribs( sal_Int32 nPara, 
const SfxItemSet& rSet );
 
  326    const SfxItemSet&   GetParaAttribs( sal_Int32 nPara ) 
const;
 
  329    void SetCharAttribs(sal_Int32 nPara, 
const SfxItemSet& rSet);
 
  330    void            GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) 
const;
 
  335    bool            HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) 
const;
 
  336    const SfxPoolItem&  GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) 
const;
 
  340        return static_cast<const T&
>(GetParaAttrib(nPara, sal_uInt16(nWhich)));
 
  343    vcl::Font       GetStandardFont( sal_Int32 nPara );
 
  344    SvxFont         GetStandardSvxFont( sal_Int32 nPara );
 
  346    void            RemoveAttribs( 
const ESelection& rSelection, 
bool bRemoveParaAttribs, sal_uInt16 nWhich );
 
  348    void            ShowParagraph( sal_Int32 nParagraph, 
bool bShow );
 
  352    void            UndoActionStart( sal_uInt16 nId );
 
  353    void            UndoActionStart(sal_uInt16 nId, 
const ESelection& rSel);
 
  354    void            UndoActionEnd();
 
  355    bool            IsInUndo() 
const;
 
  357    void            EnableUndo( 
bool bEnable );
 
  358    bool            IsUndoEnabled() 
const;
 
  363    bool            HasTriedMergeOnLastAddUndo() 
const;
 
  365    void            ClearModifyFlag();
 
  367    bool            IsModified() 
const;
 
  371    bool            IsInSelectionMode() 
const;
 
  373    void            StripPortions();
 
  374    void            GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList );
 
  376    tools::Long            GetFirstLineStartX( sal_Int32 nParagraph );
 
  377    Point           GetDocPosTopLeft( sal_Int32 nParagraph );
 
  378    Point           GetDocPos( 
const Point& rPaperPos ) 
const;
 
  379    bool            IsTextPos( 
const Point& rPaperPos, sal_uInt16 nBorder );
 
  403    bool            IsFlatMode() 
const;
 
  404    void            SetFlatMode( 
bool bFlat );
 
  406    void            SetSingleLine( 
bool bValue );
 
  412    void            QuickMarkInvalid( 
const ESelection& rSel );
 
  413    void            QuickFormatDoc( 
bool bFull = 
false );
 
  415    void            QuickInsertLineBreak( 
const ESelection& rSel );
 
  416    void            QuickInsertText(
const OUString& rText, 
const ESelection& rSel);
 
  418    void            QuickMarkToBeRepainted( sal_Int32 nPara );
 
  420    void setGlobalScale(
double fFontScaleX, 
double fFontScaleY, 
double fSpacingScaleX, 
double fSpacingScaleY);
 
  422    void getGlobalSpacingScale(
double& rX, 
double& rY) 
const;
 
  424    void getGlobalFontScale(
double& rX, 
double& rY) 
const;
 
  427    void setRoundFontSizeToPt(
bool bRound) 
const;
 
  436    void                 SetStyleSheet( sal_Int32 nPara, 
SfxStyleSheet* pStyle );
 
  440    void            SetWordDelimiters( 
const OUString& rDelimiters );
 
  441    const OUString& GetWordDelimiters() 
const;
 
  443    void            EraseVirtualDevice();
 
  445    void            SetSpeller( css::uno::Reference<
 
  446                            css::linguistic2::XSpellChecker1 > 
const &xSpeller );
 
  448        css::linguistic2::XSpellChecker1 > 
const &
 
  450    void            SetHyphenator( css::uno::Reference<
 
  451                            css::linguistic2::XHyphenator > 
const & xHyph );
 
  453    void GetAllMisspellRanges( std::vector<editeng::MisspellRanges>& rRanges ) 
const;
 
  454    void SetAllMisspellRanges( 
const std::vector<editeng::MisspellRanges>& rRanges );
 
  456    static void     SetForbiddenCharsTable(
const std::shared_ptr<SvxForbiddenCharactersTable>& xForbiddenChars);
 
  461    bool            HasOnlineSpellErrors() 
const;
 
  462    void            CompleteOnlineSpelling();
 
  464    bool            ShouldCreateBigTextObject() 
const;
 
  468    void ClearSpellErrors();
 
  474    void            PutSpellingToSentenceStart( 
EditView const & rEditView );
 
  480    virtual bool    ConvertNextDocument();
 
  483    bool            UpdateFieldsOnly();
 
  484    void            RemoveFields( 
const std::function<
bool ( 
const SvxFieldData* )>& isFieldData = [] (
const SvxFieldData* ){
return true;} );
 
  486    sal_uInt16      GetFieldCount( sal_Int32 nPara ) 
const;
 
  487    EFieldInfo      GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) 
const;
 
  489    bool            IsRightToLeft( sal_Int32 nPara ) 
const;
 
  491    css::uno::Reference< css::datatransfer::XTransferable >
 
  492                    CreateTransferable( 
const ESelection& rSelection ) 
const;
 
  501    virtual void    ParagraphInserted( sal_Int32 nNewParagraph );
 
  502    virtual void    ParagraphDeleted( sal_Int32 nDeletedParagraph );
 
  503    virtual void    ParagraphConnected( sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph );
 
  504    virtual void    ParaAttribsChanged( sal_Int32 nParagraph );
 
  506    void            ParagraphHeightChanged( sal_Int32 nPara );
 
  508    virtual void DrawingText( 
const Point& rStartPos, 
const OUString& rText,
 
  509                              sal_Int32 nTextStart, sal_Int32 nTextLen,
 
  517                              bool bEndOfParagraph,
 
  518                              const css::lang::Locale* pLocale,
 
  519                              const Color& rOverlineColor,
 
  520                              const Color& rTextLineColor);
 
  522    virtual void DrawingTab( 
const Point& rStartPos, 
tools::Long nWidth, 
const OUString& rChar,
 
  525                             bool bEndOfParagraph,
 
  526                             const Color& rOverlineColor,
 
  527                             const Color& rTextLineColor);
 
  529    virtual bool    SpellNextDocument();
 
  531    virtual bool    FieldClicked( 
const SvxFieldItem& rField );
 
  532    virtual OUString CalcFieldValue( 
const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rTxtColor, std::optional<Color>& rFldColor, std::optional<FontLineStyle>& rFldLineStyle );
 
  535    virtual const SvxNumberFormat * GetNumberFormat( sal_Int32 nPara ) 
const;
 
  541    static bool     DoesKeyChangeText( 
const KeyEvent& rKeyEvent );
 
  542    static bool     DoesKeyMoveCursor( 
const KeyEvent& rKeyEvent );
 
  543    static bool     IsSimpleCharInput( 
const KeyEvent& rKeyEvent );
 
  549    static bool     HasValidData( 
const css::uno::Reference< css::datatransfer::XTransferable >& rTransferable );
 
  559    void            SetFirstWordCapitalization( 
bool bCapitalize );
 
  563    void            SetReplaceLeadingSingleQuotationMark( 
bool bReplace );
 
  566    const EditDoc& GetEditDoc() 
const;
 
  572    bool IsFormatted() 
const;
 
  573    bool IsHtmlImportHandlerSet() 
const;
 
  574    bool IsRtfImportHandlerSet() 
const;
 
  575    bool IsImportRTFStyleSheetsSet() 
const;
 
  593        const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = css::i18n::CharacterIteratorMode::SKIPCELL);
 
  595        const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = css::i18n::CharacterIteratorMode::SKIPCELL);
 
  604    const SfxItemSet& GetBaseParaAttribs(sal_Int32 nPara) 
const;
 
  605    void SetParaAttribsOnly(sal_Int32 nPara, 
const SfxItemSet& rSet);
 
  613    void RemoveParaPortion(sal_Int32 nNode);
 
  615    void SetCallParaInsertedOrDeleted(
bool b);
 
  616    bool IsCallParaInsertedOrDeleted() 
const;
 
  619    void UpdateSelections();
 
  621    void InsertContent(
ContentNode* pNode, sal_Int32 nPos);
 
  622    EditPaM SplitContent(sal_Int32 nNode, sal_Int32 nSepPos);
 
  623    EditPaM ConnectContents(sal_Int32 nLeftNode, 
bool bBackward);
 
  629    void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich = 0, 
bool bRemoveFeatures = 
false);
 
  630    void RemoveCharAttribs(
const EditSelection& rSel, 
bool bRemoveParaAttribs, sal_uInt16 nWhich);
 
  633    ViewsType& GetEditViews();
 
  634    const ViewsType& GetEditViews() 
const;
 
  636    void SetUndoMode(
bool b);
 
  637    void FormatAndLayout(
EditView* pCurView, 
bool bCalledFromUndo = 
false);
 
  642    sal_Int32 GetOverflowingParaNum() 
const;
 
  643    sal_Int32 GetOverflowingLineNum() 
const;
 
  644    void ClearOverflowingParaNum();
 
  645    bool IsPageOverflow();
 
  650    void DisableAttributeExpanding();
 
  654    void EnableSkipOutsideFormat(
bool set);
 
  656    void SetLOKSpecialPaperSize(
const Size& rSize);
 
  657    const Size& GetLOKSpecialPaperSize() 
const;
 
  660    static void DumpData(
const EditEngine* pEE, 
bool bInfoBox);
 
static bool IsPrintable(sal_Unicode c)
 
EditEngine(const EditEngine &)=delete
 
EditEngine & operator=(const EditEngine &)=delete
 
EditSelection InsertText(css::uno::Reference< css::datatransfer::XTransferable > const &rxDataObj, const OUString &rBaseURL, const EditPaM &rPaM, bool bUseSpecial)
 
std::vector< EditView * > ViewsType
 
std::unique_ptr< ImpEditEngine > pImpEditEngine
 
const T & GetParaAttrib(sal_Int32 nPara, TypedWhichId< T > nWhich) const
 
This item stores a field (SvxFieldData).
 
virtual OUString GetWord() override
 
virtual void SetText(const OUString &rStr) override
 
EEHorizontalTextDirection
 
#define EDITENG_DLLPRIVATE
 
#define EDITENG_DLLPUBLIC
 
struct _xmlTextWriter * xmlTextWriterPtr
 
GetAttribsFlags
values for: SfxItemSet GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd,...
 
EditEngineAttribs
values for: SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEn...
 
@ OnlyHard
returns all attributes even when they are not set
 
std::vector< WrongSpellClass > WrongSpellVector
 
void Clear(EHistoryType eHistory)
 
LanguageType GetLanguage(SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
 
std::vector< SpellPortion > SpellPortions
 
SW_DLLPUBLIC SwView * GetActiveView()
 
OUString GetUndoComment(SwUndoId eId)