class EditTextObject; class EditEngine; class ImpEditEngine; class ImpEditView; class OutlinerViewShell; class SvxSearchItem; class SvxFieldItem; namespace vcl { class Window; } namespace weld { class Widget; } class KeyEvent; class MouseEvent; class CommandEvent; class SvStream; class SvKeyValueIterator; class SfxStyleSheet; class SfxItemSet; namespace vcl { class Cursor; } namespace vcl { class Font; } class FontList; class InputContext; class OutputDevice; enumclass TransliterationFlags; enumclass PointerStyle;
namespace com { namespace sun { namespace star { namespace datatransfer { class XTransferable; namespace clipboard { class XClipboard;
} namespace dnd { class XDropTarget;
}
} namespace linguistic2 { class XSpellChecker1; class XLanguageGuessing;
}
}}}
template <typename Arg, typename Ret> class Link;
enumclass ScrollRangeCheck
{
NoNegative = 1, // No negative VisArea when scrolling
PaperWidthTextSize = 2, // VisArea must be within paper width, Text Size
};
// Helper class that allows to set a callback at the EditView. When // set, Invalidates and repaints are suppressed at the EditView, but // EditViewInvalidate() will be triggered to allow the consumer to // react itself as needed. // Also Selection visualization is suppressed and EditViewSelectionChange // is triggered when Selection changes and needs reaction. class EDITENG_DLLPUBLIC EditViewCallbacks
{ public: virtual ~EditViewCallbacks();
// call this when text visualization changed in any way. It // will also update selection, so no need to call this self // additionally (but will also do no harm) virtualvoid EditViewInvalidate(const tools::Rectangle& rRect) = 0;
// call this when only selection is changed. Text change will // then *not* be checked and not be reacted on. Still, when // only the selection is changed, this is useful and faster virtualvoid EditViewSelectionChange() = 0;
// return the OutputDevice that the EditView will draw to virtual OutputDevice& EditViewOutputDevice() const = 0;
// return the Mouse Position virtual Point EditViewPointerPosPixel() const = 0;
// Triggered to update InputEngine context information virtualvoid EditViewInputContext(const InputContext& rInputContext) = 0;
// Triggered to update InputEngine cursor position virtualvoid EditViewCursorRect(const tools::Rectangle& rRect, int nExtTextInputWidth) = 0;
// Triggered if scroll bar state should change virtualvoid EditViewScrollStateChange()
{
}
// Access to clipboard virtual css::uno::Reference<css::datatransfer::clipboard::XClipboard> GetClipboard() const = 0;
// implemented if drag and drop support is wanted virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget> GetDropTarget()
{ return nullptr;
}
};
class EDITENG_DLLPUBLIC EditView final
{ friendclass EditEngine; friendclass ImpEditEngine; friendclass EditSelFunctionSet;
// counts how many characters take unfolded fields // bCanOverflow - count field length without trim to the selected pos
SAL_DLLPRIVATE sal_Int32 countFieldsOffsetSum(sal_Int32 nPara, sal_Int32 nPo, bool bCanOverflow) const;
// set EditViewCallbacks for external handling of Repaints/Visualization void setEditViewCallbacks(EditViewCallbacks* pEditViewCallbacks);
EditViewCallbacks* getEditViewCallbacks() const;
// VisArea position of the Output window. // A size change also affects the VisArea void SetOutputArea( const tools::Rectangle& rRect ); const tools::Rectangle& GetOutputArea() const;
// Document position. // A size change also affects the VisArea void SetVisArea( const tools::Rectangle& rRect );
tools::Rectangle GetVisArea() const;
// especially for Oliver Specht
Point GetWindowPosTopLeft( sal_Int32 nParagraph );
SAL_DLLPRIVATE void MoveParagraphs( Range aParagraphs, sal_Int32 nNewPos );
SAL_DLLPRIVATE void MoveParagraphs( tools::Long nDiff );
/// Informs this edit view about which view shell contains it. void RegisterViewShell(OutlinerViewShell* pViewShell); /// Informs this edit view about which other shell listens to it. void RegisterOtherShell(OutlinerViewShell* pOtherShell);
// An EditView, so that when TRUE the update will be free from flickering: // @return the previous bUpdateLayout state bool SetEditEngineUpdateLayout( bool bUpdate ); void ForceLayoutCalculation();
/// return the selected field or the field immediately after (or before) the current cursor const SvxFieldItem* GetFieldAtSelection(bool bAlsoCheckBeforeCursor = false) const;
SAL_DLLPRIVATE const SvxFieldItem* GetFieldAtSelection(bool* pIsBeforeCursor) const;
/// return field under mouse, at selection, or immediately after (or before) the current cursor const SvxFieldData* GetFieldUnderMouseOrInSelectionOrAtCursor(bool bAlsoCheckBeforeCursor = false) const; /// if no selection, select the field immediately after or before the current cursor void SelectFieldAtCursor(); /// Converts position in paragraph to logical position without unfolding fields
sal_Int32 GetPosNoField(sal_Int32 nPara, sal_Int32 nPos) const; /// Converts logical position in paragraph to position with unfolded fields
sal_Int32 GetPosWithField(sal_Int32 nPara, sal_Int32 nPos) const;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.