20#ifndef INCLUDED_EDITENG_EDITVIEW_HXX
21#define INCLUDED_EDITENG_EDITVIEW_HXX
24#include <com/sun/star/i18n/WordType.hpp>
35#include <com/sun/star/uno/Reference.h>
66namespace datatransfer {
75namespace linguistic2 {
77 class XLanguageGuessing;
81template <
typename Arg,
typename Ret>
class Link;
143 virtual css::uno::Reference<css::datatransfer::clipboard::XClipboard>
GetClipboard()
const = 0;
146 virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget>
GetDropTarget()
166 std::unique_ptr<ImpEditView>
175 sal_Int32 countFieldsOffsetSum(sal_Int32 nPara, sal_Int32 nPo,
bool bCanOverflow)
const;
185 void SetEditEngine(
EditEngine* pEditEngine );
205 void SetBroadcastLOKViewCursor(
bool bSet);
207 void ShowCursor(
bool bGotoCursor =
true,
bool bForceVisCursor =
true,
bool bActivate =
false );
208 void HideCursor(
bool bDeactivate =
false );
212 void SetReadOnly(
bool bReadOnly );
215 bool HasSelection()
const;
217 void SetSelection(
const ESelection& rNewSel );
219 void SelectCurrentWord( sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
221 void GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects)
const;
223 bool IsInsertMode()
const;
224 void SetInsertMode(
bool bInsert );
226 OUString GetSelected()
const;
227 void DeleteSelected();
245 void InsertText(
const OUString& rNew,
bool bSelect =
false ,
bool bLOKShowSelect =
true);
246 void InsertParaBreak();
265 Point GetWindowPosTopLeft( sal_Int32 nParagraph );
266 void MoveParagraphs(
Range aParagraphs, sal_Int32 nNewPos );
272 void RemoveAttribs(
bool bRemoveParaAttribs =
false, sal_uInt16 nWhich = 0 );
274 void RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich );
275 void RemoveAttribsKeepLanguages(
bool bRemoveParaAttribs );
279 void SetBackgroundColor(
const Color& rColor );
280 Color const & GetBackgroundColor()
const;
290 std::unique_ptr<EditTextObject> CreateTextObject();
292 void InsertText( css::uno::Reference< css::datatransfer::XTransferable >
const & xDataObj,
const OUString& rBaseURL,
bool bUseSpecial );
294 css::uno::Reference<css::datatransfer::clipboard::XClipboard> GetClipboard()
const;
295 css::uno::Reference<css::datatransfer::XTransferable> GetTransferable()
const;
299 bool SetEditEngineUpdateLayout(
bool bUpdate );
300 void ForceLayoutCalculation();
308 void CompleteAutoCorrect(
vcl::Window const * pFrameWin =
nullptr );
312 sal_Int32 StartSearchAndReplace(
const SvxSearchItem& rSearchItem );
319 bool IsCursorAtWrongSpelledWord();
320 bool IsWrongSpelledWordAtPos(
const Point& rPosPixel,
bool bMarkIfWrong =
false );
322 OUString SpellIgnoreWord();
326 const SvxFieldItem* GetFieldUnderMousePointer( sal_Int32& nPara, sal_Int32& nPos )
const;
327 const SvxFieldItem* GetField(
const Point& rPos, sal_Int32* pnPara =
nullptr, sal_Int32* pnPos =
nullptr )
const;
332 void SelectFieldAtCursor();
334 sal_Int32 GetPosNoField(sal_Int32 nPara, sal_Int32 nPos)
const;
336 sal_Int32 GetPosWithField(sal_Int32 nPara, sal_Int32 nPos)
const;
338 void SetInvalidateMore( sal_uInt16 nPixel );
339 sal_uInt16 GetInvalidateMore()
const;
342 void ChangeFontSize(
bool bGrow,
const FontList* pList );
344 static bool ChangeFontSize(
bool bGrow,
SfxItemSet& rSet,
const FontList* pFontList );
346 OUString GetSurroundingText()
const;
347 Selection GetSurroundingTextSelection()
const;
348 bool DeleteSurroundingText(
const Selection& rRange);
365 const OUString &rText,
366 const css::uno::Reference< css::linguistic2::XSpellChecker1 >& xSpell,
367 const css::uno::Reference< css::linguistic2::XLanguageGuessing >& xLangGuess,
370 void SetCursorLogicPosition(
const Point& rPosition,
bool bPoint,
bool bClearMark);
383 const Point& rVisDocStartPos);
388 bool HasLOKSpecialPositioning()
const;
392 void SuppressLOKMessages(
bool bSet);
393 bool IsSuppressLOKMessages()
const;
396 void SetNegativeX(
bool bSet);
397 bool IsNegativeX()
const;
virtual bool IsSelectionAtPoint(const Point &rPointPixel) override
virtual weld::Widget * EditViewPopupParent() const
virtual void EditViewInputContext(const InputContext &rInputContext)=0
virtual void EditViewScrollStateChange()
virtual css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget()
virtual void EditViewCursorRect(const tools::Rectangle &rRect, int nExtTextInputWidth)=0
virtual OutputDevice & EditViewOutputDevice() const =0
virtual void EditViewInvalidate(const tools::Rectangle &rRect)=0
virtual void EditViewSelectionChange()=0
virtual Point EditViewPointerPosPixel() const =0
virtual css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard() const =0
ImpEditView * GetImpEditView() const
std::vector< VclPtr< vcl::Window > > OutWindowSet
EditView & operator=(const EditView &)=delete
EditView(const EditView &)=delete
std::unique_ptr< ImpEditView > pImpEditView
Interface class to not depend on SfxViewShell in editeng.
This item stores a field (SvxFieldData).
#define EDITENG_DLLPUBLIC
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
void GetSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept