24#include <com/sun/star/i18n/WordType.hpp>
25#include <com/sun/star/i18n/ScriptType.hpp>
46#include <editeng/editrids.hrc>
54#include <com/sun/star/frame/XStorable.hpp>
55#include <com/sun/star/linguistic2/XDictionary.hpp>
56#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
60#include <LibreOfficeKit/LibreOfficeKitEnums.h>
63#include <osl/diagnose.h>
64#include <boost/property_tree/json_parser.hpp>
66#include <com/sun/star/lang/XServiceInfo.hpp>
75 const OUString &rText,
86 LanguageTag aGuessTag( xLangGuess->guessPrimaryLanguage( rText, 0, rText.getLength()) );
119 css::i18n::ScriptType::LATIN);
137 if (xSpell->hasLanguage(
static_cast<sal_uInt16
>(nTmpLang) ) &&
216 pEditViewCallbacks->EditViewInvalidate(bNegativeX ? lcl_negateRectX(rClipRect) : rClipRect);
234 pWin->Invalidate( bNegativeX ? lcl_negateRectX(rInvRect) : rInvRect );
277 pPortion =
pImpEditView->pEditEngine->GetPrevVisPortion( pPortion );
284 pPortion =
pImpEditView->pEditEngine->GetPrevVisPortion( pPortion );
354 pImpEditView->pEditEngine->pImpEditEngine->GetSelEngine().Reset();
371 return pWindow->GetInputLanguage();
378 auto found = std::find(rOutWindowSet.begin(), rOutWindowSet.end(), pWin);
379 return (found != rOutWindowSet.end());
393 auto found = std::find(rOutWindowSet.begin(), rOutWindowSet.end(), pWin);
394 if (found == rOutWindowSet.end())
396 rOutWindowSet.erase(found);
416 if (
pImpEditView->pEditEngine->pImpEditEngine->GetStatus().AutoPageSize() )
449 aPaM1 = aTmpSel.
Min();
470 return pImpEditView->PostKeyEvent( rKeyEvent, pFrameWin );
516 pImpEditView->ShowCursor( bGotoCursor, bForceVisCursor );
523 if (pParent && pParent->GetLOKWindowId() != 0)
526 static const OString aPayload = OString::boolean(
true);
527 pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, aPayload);
528 pImpEditView->mpViewShell->NotifyOtherViews(LOK_CALLBACK_VIEW_CURSOR_VISIBLE,
"visible", aPayload);
541 if (pParent && pParent->GetLOKWindowId() != 0)
544 OString aPayload = OString::boolean(
false);
545 pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, aPayload);
546 pImpEditView->mpViewShell->NotifyOtherViews(LOK_CALLBACK_VIEW_CURSOR_VISIBLE,
"visible", aPayload);
583 pImpEditView->pEditEngine->RemoveCharAttribs( aSelection, bRemoveParaAttribs, nWID );
610 pImpEditView->pEditEngine->RemoveCharAttribs( nPara, nWhich );
637 EditPaM aEndPaM =
pImpEditView->pEditEngine->pImpEditEngine->Read( rInput,
"", eFormat, aOldSel, pHTTPHeaderAttrs );
638 pImpEditView->pEditEngine->pImpEditEngine->UndoActionEnd();
661 uno::Reference< datatransfer::XTransferable > xData =
703 pImpEditView->pEditEngine->pImpEditEngine->MoveParagraphs( aParagraphs, nNewPos,
this );
704 pImpEditView->pEditEngine->pImpEditEngine->UndoActionEnd();
715 DBG_ASSERT( ( nDest >= 0 ) && ( nDest <= pImpEditView->pEditEngine->GetParagraphCount() ),
"MoveParagraphs - wrong Parameters!" );
716 MoveParagraphs( aRange, sal::static_int_cast< sal_Int32 >( nDest ) );
722 pImpEditView->pEditEngine->SetBackgroundColor( rColor );
763 aTextSel.
Min() = aTextSel.
Max();
769void EditView::InsertText( css::uno::Reference< css::datatransfer::XTransferable >
const & xDataObj,
const OUString& rBaseURL,
bool bUseSpecial )
777 aTextSel.
Min() = aTextSel.
Max();
785 return pImpEditView->pEditEngine->pImpEditEngine->SetUpdateLayout( bUpdate,
this );
790 pImpEditView->pEditEngine->pImpEditEngine->SetUpdateLayout(
true,
this,
true );
801 for ( sal_Int32
n = nStartPara;
n <= nEndPara;
n++ )
804 if ( (
n != nStartPara ) && ( pStyle != pTmpStyle ) )
840 if ( aNewSel != aOldSel )
864 if ( !
pImpEditView->pEditEngine->pImpEditEngine->GetSpeller().is() )
867 return pImpEditView->pEditEngine->pImpEditEngine->Spell(
this, pDialogParent, bMultipleDoc);
872 if ( !
pImpEditView->pEditEngine->pImpEditEngine->GetSpeller().is() )
875 return pImpEditView->pEditEngine->pImpEditEngine->StartThesaurus(
this, pDialogParent);
880 sal_Int32 nOptions,
bool bIsInteractive,
bool bMultipleDoc )
882 pImpEditView->pEditEngine->pImpEditEngine->Convert(
this, pDialogParent, nSrcLang, nDestLang, pDestFont, nOptions, bIsInteractive, bMultipleDoc);
887 return pImpEditView->pEditEngine->pImpEditEngine->StartSearchAndReplace(
this, rSearchItem );
892 bool bIsWrong =
false;
896 bIsWrong =
pImpEditView->IsWrongSpelledWord( aPaM,
false );
906 return pImpEditView->IsWrongSpelledWord( aPaM , bMarkIfWrong );
920 boost::property_tree::ptree aMenu;
922 boost::property_tree::ptree aItemTree;
925 for(
int i = 0;
i < nSuggestions; ++
i)
928 OUString sText = rMenu.
get_label(sItemId);
929 aItemTree.put(
"text", sText.toUtf8().getStr());
930 aItemTree.put(
"type",
"command");
931 OUString sCommandString =
".uno:SpellCheckApplySuggestion?ApplyRule:string=Spelling_" + sText;
932 aItemTree.put(
"command", sCommandString.toUtf8().getStr());
934 aMenu.push_back(std::make_pair(
"", aItemTree));
938 aItemTree.put(
"type",
"separator");
939 aMenu.push_back(std::make_pair(
"", aItemTree));
947 aItemTree.put(
"text", rMenu.
get_label(
"ignore").toUtf8().getStr());
948 aItemTree.put(
"type",
"command");
949 aItemTree.put(
"command",
".uno:SpellCheckIgnoreAll?Type:string=Spelling");
951 aMenu.push_back(std::make_pair(
"", aItemTree));
954 aItemTree.put(
"type",
"separator");
955 aMenu.push_back(std::make_pair(
"", aItemTree));
958 aItemTree.put(
"text", rMenu.
get_label(
"wordlanguage").toUtf8().getStr());
959 aItemTree.put(
"type",
"command");
960 OUString sCommandString =
".uno:LanguageStatus?Language:string=Current_" + aTmpWord;
961 aItemTree.put(
"command", sCommandString.toUtf8().getStr());
962 aItemTree.put(
"enabled", rMenu.
get_sensitive(
"wordlanguage"));
963 aMenu.push_back(std::make_pair(
"", aItemTree));
966 aItemTree.put(
"text", rMenu.
get_label(
"paralanguage").toUtf8().getStr());
967 aItemTree.put(
"type",
"command");
968 sCommandString =
".uno:LanguageStatus?Language:string=Paragraph_" + aTmpPara;
969 aItemTree.put(
"command", sCommandString.toUtf8().getStr());
970 aItemTree.put(
"enabled", rMenu.
get_sensitive(
"paralanguage"));
971 aMenu.push_back(std::make_pair(
"", aItemTree));
974 boost::property_tree::ptree aRoot;
975 aRoot.add_child(
"menu", aMenu);
977 std::stringstream aStream;
978 boost::property_tree::write_json(aStream, aRoot,
true);
990 if ( !(xSpeller.is() &&
pImpEditView->IsWrongSpelledWord( aPaM,
true )) )
1002 std::unique_ptr<weld::Menu> xPopupMenu(xBuilder->weld_menu(
"editviewspellmenu"));
1003 std::unique_ptr<weld::Menu> xInsertMenu(xBuilder->weld_menu(
"insertmenu"));
1004 std::unique_ptr<weld::Menu> xAutoMenu(xBuilder->weld_menu(
"automenu"));
1026 xSpeller->spell( aSelected,
static_cast<sal_uInt16
>(
pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 ).nLang), aPropVals );
1033 if (xSpellAlt.is() && xLangGuesser.is())
1043 OSL_FAIL(
"content node is NULL" );
1046 nGuessLangWord =
CheckLanguage( xSpellAlt->getWord(), xSpeller, xLangGuesser,
false );
1047 nGuessLangPara =
CheckLanguage( aParaText, xSpeller, xLangGuesser,
true );
1053 nGuessLangWord = nGuessLangPara;
1055 nGuessLangPara = nGuessLangWord;
1057 xPopupMenu->append_separator(
"separator1");
1060 OUString aWordStr(
EditResId( RID_STR_WORD ) );
1061 aWordStr = aWordStr.replaceFirst(
"%x", aTmpWord );
1062 OUString aParaStr(
EditResId( RID_STR_PARAGRAPH ) );
1063 aParaStr = aParaStr.replaceFirst(
"%x", aTmpPara );
1064 xPopupMenu->append(
"wordlanguage", aWordStr);
1065 xPopupMenu->append(
"paralanguage", aParaStr);
1071 aAlt = xSpellAlt->getAlternatives();
1072 const OUString *pAlt = aAlt.getConstArray();
1073 sal_uInt16 nWords =
static_cast<sal_uInt16
>(aAlt.getLength());
1076 for ( sal_uInt16 nW = 0; nW < nWords; nW++ )
1078 OUString aAlternate( pAlt[nW] );
1079 xPopupMenu->append(OUString::number(
MN_ALTSTART + nW), aAlternate);
1080 xAutoMenu->append(OUString::number(
MN_AUTOSTART + nW), aAlternate);
1082 xPopupMenu->append_separator(
"separator2");
1087 xPopupMenu->remove(
"autocorrect");
1102 xDic->setActive(
true );
1104 aDics = xDicList->getDictionaries();
1105 pDic = aDics.getConstArray();
1107 sal_uInt16 nDicCount =
static_cast<sal_uInt16
>(aDics.getLength());
1108 for (sal_uInt16
i = 0;
i < nDicCount;
i++)
1110 uno::Reference< linguistic2::XDictionary > xDicTmp = pDic[
i];
1114 uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY );
1116 if( xDicTmp->isActive()
1117 && xDicTmp->getDictionaryType() != linguistic2::DictionaryType_NEGATIVE
1118 && (nCheckedLanguage == nActLanguage ||
LANGUAGE_NONE == nActLanguage )
1119 && (!xStor.is() || !xStor->isReadonly()) )
1123 uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
1127 xSvcInfo->getImplementationName()) );
1128 if (!aDictionaryImageUrl.isEmpty() )
1129 sImage = aDictionaryImageUrl;
1132 if (sImage.isEmpty())
1134 xInsertMenu->append(OUString::number(
MN_DICTSTART +
i), xDicTmp->getName());
1138 Image aImage(sImage);
1141 xVirDev->SetOutputSizePixel(aSize);
1142 xVirDev->DrawImage(
Point(0, 0), aImage);
1143 xInsertMenu->append(OUString::number(
MN_DICTSTART +
i), xDicTmp->getName(), *xVirDev);
1150 if (xInsertMenu->n_children() != 1)
1151 xPopupMenu->remove(
"add");
1152 if (xInsertMenu->n_children() < 2)
1154 xInsertMenu.reset();
1155 xPopupMenu->remove(
"insert");
1167 xPopupMenu->remove(
"autocorrect");
1168 xPopupMenu->remove(
"autocorrectdlg");
1174 OUString
sId = xPopupMenu->popup_at_rect(pPopupParent, aTempRect);
1176 aPaM2 =
pImpEditView->pEditEngine->pImpEditEngine->CreateEditPaM(aP2);
1177 aPaM =
pImpEditView->pEditEngine->pImpEditEngine->CreateEditPaM(aP);
1179 if (
sId ==
"ignore")
1183 rCallBack.
Call(aInf);
1186 else if (
sId ==
"wordlanguage" ||
sId ==
"paralanguage")
1188 LanguageType nLangToUse = (
sId ==
"wordlanguage") ? nGuessLangWord : nGuessLangPara;
1192 if (nScriptType == SvtScriptType::LATIN)
1194 if (nScriptType == SvtScriptType::COMPLEX)
1196 if (nScriptType == SvtScriptType::ASIAN)
1198 if (
sId ==
"paralanguage")
1206 pImpEditView->pEditEngine->pImpEditEngine->StartOnlineSpellTimer();
1209 rCallBack.
Call(aInf);
1212 else if (
sId ==
"check")
1215 rCallBack.
Call(aInf);
1217 else if (
sId ==
"autocorrectdlg")
1220 rCallBack.
Call(aInf);
1227 assert(xInsertMenu &&
"this case only occurs when xInsertMenu exists");
1234 uno::Reference< linguistic2::XDictionary > xDic;
1236 xDic = xDicList->getDictionaryByName( aDicName );
1239 xDic->add( aSelected,
false, OUString() );
1246 pImpEditView->pEditEngine->pImpEditEngine->StartOnlineSpellTimer();
1249 rCallBack.
Call(aInf);
1258 pAutoCorrect->
PutText( aSelected, aWord,
pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 ).nLang );
1283 aCurSel =
pImpEditView->pEditEngine->SelectWord(aCurSel.
Max(), nWordType);
1329 aPos = pEditViewCallbacks->EditViewPointerPosPixel();
1331 aPos =
pImpEditView->GetWindow()->GetPointerPosPixel();
1349 const sal_Int32 nXPos = aPaM.
GetIndex();
1350 for (
size_t nAttr = rAttrs.size(); nAttr; )
1395 return pFieldItem ? pFieldItem->
GetField() :
nullptr;
1405 for (
int nCurrentPara = 0; nCurrentPara <= nPara; nCurrentPara++)
1407 int nFields =
pImpEditView->pEditEngine->GetFieldCount( nCurrentPara );
1408 for (
int nField = 0; nField < nFields; nField++)
1411 =
pImpEditView->pEditEngine->GetFieldInfo( nCurrentPara, nField );
1413 bool bLastPara = nCurrentPara == nPara;
1416 if (bLastPara && nFieldPos >=
nPos)
1419 sal_Int32 nFieldLen = aFieldInfo.
aCurrentText.getLength();
1422 if (!bCanOverflow && bLastPara && nFieldPos + nFieldLen >
nPos)
1423 nFieldLen =
nPos - nFieldPos;
1425 nOffset += nFieldLen - 1;
1435 assert(
nPos >= nOffset);
1436 return nPos - nOffset;
1442 return nPos + nOffset;
1481 aSel = rEditEngine.
GetWord( aSel, css::i18n::WordType::DICTIONARY_WORD );
1488 std::vector<sal_Int32> aPortions;
1491 if( aPortions.empty() )
1492 aPortions.push_back( rEditEngine.
GetTextLen(nPara) );
1497 for (
size_t nPos = 0;
nPos < aPortions.size(); ++
nPos )
1499 sal_Int32 nPortionEnd = aPortions[
nPos ];
1500 sal_Int32 nPortionStart =
nPos > 0 ? aPortions[
nPos - 1 ] : 0;
1502 if( (nPortionEnd < nBeginPos) || (nPortionStart > nEndPos) )
1505 if( nPortionStart < nBeginPos )
1506 nPortionStart = nBeginPos;
1507 if( nPortionEnd > nEndPos )
1508 nPortionEnd = nEndPos;
1510 if( nPortionStart == nPortionEnd )
1513 ESelection aPortionSel( nPara, nPortionStart, nPara, nPortionEnd );
1534 const sal_uInt16* pWhich = gFontSizeWichMap;
1548 if( *pAry > nHeight )
1558 nHeight += (nHeight + 5) / 10;
1559 if( nHeight > 9999 )
1566 bool bFound =
false;
1567 if( *pAry < nHeight )
1572 if( *pAry >= nHeight )
1584 nHeight -= (nHeight + 5) / 10;
1590 if( (nHeight >= 2) && (nHeight <= 9999 ) )
1616 if (
aStr.indexOf( 0x0A ) == -1 )
1641 if (
aStr.indexOf( 0x0A ) == -1 )
1679 aSelection.
Max() = aPaM;
1681 aSelection.
Min() = aPaM;
1700 const Point& rVisDocStartPos)
1702 pImpEditView->InitLOKSpecialPositioning(eUnit, rOutputArea, rVisDocStartPos);
const LanguageTag & GetLanguageTag() const
const LanguageTag & GetUILanguageTag() const
static const AllSettings & GetSettings()
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
AttribsType & GetAttribs()
std::vector< std::unique_ptr< EditCharAttrib > > AttribsType
CharAttribList & GetCharAttribs()
const OUString & GetString() const
WrongList * GetWrongList()
const SfxPoolItem * GetItem() const
void GetPortions(sal_Int32 nPara, std::vector< sal_Int32 > &rList)
OUString GetWord(sal_Int32 nPara, sal_Int32 nIndex)
EDITENG_DLLPRIVATE css::uno::Reference< css::datatransfer::XTransferable > CreateTransferable(const EditSelection &rSelection)
EditPaM InsertField(const EditSelection &rEditSelection, const SvxFieldItem &rFld)
sal_Int32 GetTextLen() const
EditSelection InsertText(css::uno::Reference< css::datatransfer::XTransferable > const &rxDataObj, const OUString &rBaseURL, const EditPaM &rPaM, bool bUseSpecial)
const SfxItemSet & GetEmptyItemSet() const
void UndoActionStart(sal_uInt16 nId)
void FormatAndLayout(EditView *pCurView, bool bCalledFromUndo=false)
void SetIndex(sal_Int32 n)
const ContentNode * GetNode() const
sal_Int32 GetIndex() const
bool DbgIsBuggy(EditDoc const &rDoc) const
void Adjust(const EditDoc &rNodes)
virtual ~EditViewCallbacks()
void MoveParagraphs(Range aParagraphs, sal_Int32 nNewPos)
bool IsCursorAtWrongSpelledWord()
const SvxFieldItem * GetField(const Point &rPos, sal_Int32 *pnPara=nullptr, sal_Int32 *pnPos=nullptr) const
void SetLOKSpecialVisArea(const tools::Rectangle &rVisArea)
bool IsSelectionAtPoint(const Point &rPointPixel)
void SetWindow(vcl::Window *pWin)
bool DeleteSurroundingText(const Selection &rRange)
void DrawSelectionXOR(OutlinerViewShell *pOtherShell)
Trigger selection drawing callback in pOtherShell based on our shell's selection state.
void SetControlWord(EVControlBits nWord)
OUString GetSurroundingText() const
void SetBroadcastLOKViewCursor(bool bSet)
bool IsWrongSpelledWordAtPos(const Point &rPosPixel, bool bMarkIfWrong=false)
void InvalidateOtherViewWindows(const tools::Rectangle &rInvRect)
bool MouseButtonUp(const MouseEvent &rMouseEvent)
void SetSelectionMode(EESelectionMode eMode)
void HideCursor(bool bDeactivate=false)
bool IsInsertMode() const
void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich)
bool ExecuteSpellPopup(const Point &rPosPixel, const Link< SpellCallbackInfo &, void > &rCallBack)
ESelection GetSelection() const
void SelectCurrentWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES)
void RegisterViewShell(OutlinerViewShell *pViewShell)
Informs this edit view about which view shell contains it.
std::unique_ptr< EditTextObject > CreateTextObject()
sal_uInt16 GetInvalidateMore() const
EESpellState StartSpeller(weld::Widget *pDialogParent, bool bMultipleDoc=false)
bool MouseButtonDown(const MouseEvent &rMouseEvent)
bool RemoveOtherViewWindow(vcl::Window *pWin)
void InvalidateWindow(const tools::Rectangle &rClipRect)
tools::Rectangle GetEditCursor() const
void ChangeFontSize(bool bGrow, const FontList *pList)
EESpellState StartThesaurus(weld::Widget *pDialogParent)
void SetReadOnly(bool bReadOnly)
Selection GetSurroundingTextSelection() const
void SetOutputArea(const tools::Rectangle &rRect)
css::uno::Reference< css::datatransfer::XTransferable > GetTransferable() const
void RemoveAttribs(bool bRemoveParaAttribs=false, sal_uInt16 nWhich=0)
void SetAnchorMode(EEAnchorMode eMode)
tools::Rectangle GetVisArea() const
void RegisterOtherShell(OutlinerViewShell *pOtherShell)
Informs this edit view about which other shell listens to it.
sal_Int32 GetPosNoField(sal_Int32 nPara, sal_Int32 nPos) const
Converts position in paragraph to logical position without unfolding fields.
ErrCode Read(SvStream &rInput, EETextFormat eFormat, SvKeyValueIterator *pHTTPHeaderAttrs)
void SetEditEngine(EditEngine *pEditEngine)
void SuppressLOKMessages(bool bSet)
bool HasSelection() const
void SelectFieldAtCursor()
void SetSelection(const ESelection &rNewSel)
const SfxStyleSheet * GetStyleSheet() const
Color const & GetBackgroundColor() const
OutputDevice & GetOutputDevice() const
void InsertText(const OUString &rNew, bool bSelect=false, bool bLOKShowSelect=true)
bool PostKeyEvent(const KeyEvent &rKeyEvent, vcl::Window const *pFrameWin=nullptr)
sal_Int32 GetPosWithField(sal_Int32 nPara, sal_Int32 nPos) const
Converts logical position in paragraph to position with unfolded fields.
void SetLOKSpecialFlags(LOKSpecialFlags eFlags)
bool HasLOKSpecialPositioning() const
EditViewCallbacks * getEditViewCallbacks() const
tools::Rectangle GetLOKSpecialVisArea() const
void ShowCursor(bool bGotoCursor=true, bool bForceVisCursor=true, bool bActivate=false)
void SetNegativeX(bool bSet)
To inform editeng that negated x document coordinates are in use.
vcl::Cursor * GetCursor() const
const SfxItemSet & GetEmptyItemSet() const
SvtScriptType GetSelectedScriptType() const
vcl::Window * GetWindow() const
PointerStyle GetPointer() const
void GetSelectionRectangles(std::vector< tools::Rectangle > &rLogicRects) const
Returns the rectangles of the current selection in TWIPs.
const SvxFieldData * GetFieldAtCursor() const
Select and return the field at the current cursor position.
bool HasOtherViewWindow(vcl::Window *pWin)
bool IsSuppressLOKMessages() const
OUString SpellIgnoreWord()
const SvxFieldItem * GetFieldAtSelection() const
EVControlBits GetControlWord() const
void RemoveAttribsKeepLanguages(bool bRemoveParaAttribs)
const SvxFieldItem * GetFieldUnderMousePointer() const
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard() const
bool MouseMove(const MouseEvent &rMouseEvent)
void SetBackgroundColor(const Color &rColor)
void SetCursorLogicPosition(const Point &rPosition, bool bPoint, bool bClearMark)
Allows adjusting the point or mark of the selection to a document coordinate.
void CompleteAutoCorrect(vcl::Window const *pFrameWin=nullptr)
LanguageType GetInputLanguage() const
bool Command(const CommandEvent &rCEvt)
EditEngine * GetEditEngine() const
const tools::Rectangle & GetOutputArea() const
void SetInsertMode(bool bInsert)
sal_Int32 StartSearchAndReplace(const SvxSearchItem &rSearchItem)
Point GetWindowPosTopLeft(sal_Int32 nParagraph)
sal_Int32 countFieldsOffsetSum(sal_Int32 nPara, sal_Int32 nPo, bool bCanOverflow) const
void SetInvalidateMore(sal_uInt16 nPixel)
void TransliterateText(TransliterationFlags nTransliterationMode)
void InsertField(const SvxFieldItem &rFld)
ImpEditEngine * GetImpEditEngine() const
OUString GetSelected() const
void SetLOKSpecialOutputArea(const tools::Rectangle &rOutputArea)
tools::Rectangle GetInvalidateRect() const
std::vector< VclPtr< vcl::Window > > OutWindowSet
void SetAttribs(const SfxItemSet &rSet)
void Paint(const tools::Rectangle &rRect, OutputDevice *pTargetDevice=nullptr)
bool AddOtherViewWindow(vcl::Window *pWin)
void setEditViewCallbacks(EditViewCallbacks *pEditViewCallbacks)
const tools::Rectangle & GetLOKSpecialOutputArea() const
void StartTextConversion(weld::Widget *pDialogParent, LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc)
void ForceLayoutCalculation()
EEAnchorMode GetAnchorMode() const
::Pair Scroll(tools::Long nHorzScroll, tools::Long nVertScroll, ScrollRangeCheck nRangeCheck=ScrollRangeCheck::NoNegative)
EditView(const EditView &)=delete
void InitLOKSpecialPositioning(MapUnit eUnit, const tools::Rectangle &rOutputArea, const Point &rVisDocStartPos)
This is meant for Calc(LOK), but there may be other use-cases.
void SetVisArea(const tools::Rectangle &rRect)
bool SetEditEngineUpdateLayout(bool bUpdate)
std::unique_ptr< ImpEditView > pImpEditView
static LanguageType CheckLanguage(const OUString &rText, const css::uno::Reference< css::linguistic2::XSpellChecker1 > &xSpell, const css::uno::Reference< css::linguistic2::XLanguageGuessing > &xLangGuess, bool bIsParaText)
Tries to determine the language of 'rText', returning a matching known locale if possible,...
static const int * GetStdSizeAry()
Size GetSizePixel() const
LanguageType getLanguageType(bool bResolveSystem=true) const
OUString getLanguage() const
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
LanguageTag & makeFallback()
OUString getCountry() const
static css::uno::Reference< css::linguistic2::XSearchableDictionaryList > GetDictionaryList()
static css::uno::Reference< css::linguistic2::XDictionary > GetIgnoreAllList()
static css::uno::Reference< css::linguistic2::XDictionary > GetStandardDic()
static LanguageType resolveSystemLanguageByScriptType(LanguageType nLang, sal_Int16 nType)
Interface class to not depend on SfxViewShell in editeng.
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
ContentNode * GetNode() const
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
SfxItemPool * GetPool() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
static OUString GetLanguageString(const LanguageType eType)
void GetOptions(SvtLinguOptions &rOptions) const
OUString GetSpellAndGrammarContextDictionaryImage(const OUString &rServiceImplName) const
SvxAutoCorrect * GetAutoCorrect()
static SvxAutoCorrCfg & Get()
virtual bool PutText(const css::uno::Reference< css::embed::XStorage > &rStg, const OUString &rFileName, const OUString &rShort, SfxObjectShell &, OUString &)
This item stores a field (SvxFieldData).
const SvxFieldData * GetField() const
sal_uInt32 GetHeight() const
void SetHeight(sal_uInt32 nNewHeight, const sal_uInt16 nNewProp=100, MapUnit eUnit=MapUnit::MapRelative)
void ResetInvalidRange(size_t nStart, size_t nEnd)
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
#define DBG_ASSERT(sCon, aError)
ESelection aNewSelection(GetSelection())
#define EDITUNDO_MOVEPARAS
#define EDITUNDO_RESETATTRIBS
static void LOKSendSpellPopupMenu(const weld::Menu &rMenu, LanguageType nGuessLangWord, LanguageType nGuessLangPara, sal_uInt16 nSuggestions)
static void ChangeFontSizeImpl(EditView *pEditView, bool bGrow, const ESelection &rSel, const FontList *pFontList)
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
constexpr sal_uInt16 EE_ITEMS_END(EE_FEATURE_END)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CTL(EE_CHAR_START+20)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
constexpr sal_uInt16 EE_ITEMS_START(OWN_ATTR_VALUE_END+1)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CJK(EE_CHAR_START+19)
OUString EditResId(TranslateId aId)
#define LANGUAGE_DONTKNOW
#define LANGUAGE_ENGLISH_US
constexpr OUStringLiteral UPN_MAX_NUMBER_OF_SUGGESTIONS
SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
LanguageType nDefaultLanguage