20#include <config_wasm_strip.h>
23#include <com/sun/star/accessibility/AccessibleRole.hpp>
24#include <com/sun/star/accessibility/AccessibleStateType.hpp>
25#include <com/sun/star/accessibility/XAccessible.hpp>
26#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
27#include <com/sun/star/accessibility/XAccessibleContext.hpp>
28#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
29#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
30#include <com/sun/star/lang/XServiceInfo.hpp>
42#include <osl/diagnose.h>
82 pEditView->DeleteSelected();
104 : m_bAcceptsTab(false)
125 pItemPool->SetPoolDefaultItem(
127 pItemPool->SetPoolDefaultItem(
129 pItemPool->SetPoolDefaultItem(
144 pEditView->ShowCursor();
147 = pEditView->GetEditEngine()->GetTextHeight() - aOutputSize.
Height();
149 if (aVisArea.
Top() > nMaxVisAreaStart)
151 aVisArea.
SetTop(std::max<tools::Long>(nMaxVisAreaStart, 0));
153 pEditView->SetVisArea(aVisArea);
154 pEditView->ShowCursor();
164 DoPaint(rRenderContext, rRect);
172 std::vector<tools::Rectangle> aLogicRects;
182 pEditView->ShowCursor(
false);
188 pEditView->GetSelectionRectangles(aLogicRects);
191 if (!aLogicRects.empty())
193 std::vector<basegfx::B2DRange> aLogicRanges;
194 aLogicRanges.reserve(aLogicRects.size());
197 for (
const auto& aRect : aLogicRects)
199 nMinX = std::min(nMinX, aRect.Left());
200 nMinY = std::min(nMinY, aRect.Top());
201 nMaxX = std::max(nMaxX, aRect.Right());
202 nMaxY = std::max(nMaxY, aRect.Bottom());
206 for (
const auto& aRect : aLogicRects)
212 auto nTop = aRect.Top();
214 nTop -= aLogicPixel.
Height();
215 auto nBottom = aRect.Bottom();
217 nBottom += aLogicPixel.
Height();
218 auto nLeft = aRect.Left();
220 nLeft -= aLogicPixel.
Width();
221 auto nRight = aRect.Right();
223 nRight += aLogicPixel.
Width();
225 aLogicRanges.emplace_back(nLeft, nTop, nRight, nBottom);
232 aHighlight, std::move(aLogicRanges),
true);
238 std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D>
xProcessor(
240 aViewInformation2D));
245 rRenderContext.
Pop();
251 return pEditView && pEditView->
MouseMove(rMEvt);
294 sal_Int32 nLen = pEditEngine->
GetTextLen(nPar - 1);
312 return pEditView->
Command(rCEvt);
328 WeldViewForwarder(
const WeldViewForwarder&) =
delete;
329 WeldViewForwarder& operator=(
const WeldViewForwarder&) =
delete;
337 virtual bool IsValid()
const override;
353 WeldEditSource& m_rEditSource;
357 WeldTextForwarder(
const WeldTextForwarder&) =
delete;
358 WeldTextForwarder& operator=(
const WeldTextForwarder&) =
delete;
362 virtual ~WeldTextForwarder()
override;
365 virtual sal_Int32
GetTextLen(sal_Int32 nParagraph)
const override;
368 = EditEngineAttribs::All)
const override;
372 virtual void GetPortions(sal_Int32 nPara, std::vector<sal_Int32>& rList)
const override;
374 virtual OUString
GetStyleSheet(sal_Int32 nPara)
const override;
375 virtual void SetStyleSheet(sal_Int32 nPara,
const OUString& rStyleName)
override;
388 std::optional<Color>& rpTxtColor,
389 std::optional<Color>& rpFldColor,
390 std::optional<FontLineStyle>& rpFldLineStyle)
override;
392 virtual bool IsValid()
const override;
395 virtual sal_Int32
GetFieldCount(sal_Int32 nPara)
const override;
403 virtual bool GetWordIndices(sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart,
404 sal_Int32& nEnd)
const override;
405 virtual bool GetAttributeRun(sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara,
406 sal_Int32 nIndex,
bool bInCell =
false)
const override;
407 virtual sal_Int32
GetLineCount(sal_Int32 nPara)
const override;
408 virtual sal_Int32
GetLineLen(sal_Int32 nPara, sal_Int32 nLine)
const override;
410 sal_Int32 nParagraph, sal_Int32 nLine)
const override;
416 virtual sal_Int16
GetDepth(sal_Int32 nPara)
const override;
417 virtual bool SetDepth(sal_Int32 nPara, sal_Int16 nNewDepth)
override;
433 WeldEditViewForwarder(
const WeldEditViewForwarder&) =
delete;
434 WeldEditViewForwarder& operator=(
const WeldEditViewForwarder&) =
delete;
439 virtual bool IsValid()
const override;
446 virtual bool Copy()
override;
447 virtual bool Cut()
override;
448 virtual bool Paste()
override;
454 WeldViewForwarder m_aViewFwd;
455 WeldTextForwarder m_aTextFwd;
456 WeldEditViewForwarder m_aEditViewFwd;
459 WeldEditSource(
const WeldEditSource& rSrc)
461 , m_aViewFwd(rSrc.m_rEditAcc)
462 , m_aTextFwd(rSrc.m_rEditAcc, *this)
463 , m_aEditViewFwd(rSrc.m_rEditAcc)
464 , m_rEditAcc(rSrc.m_rEditAcc)
468 WeldEditSource& operator=(
const WeldEditSource&) =
delete;
473 , m_aTextFwd(rAcc, *this)
474 , m_aEditViewFwd(rAcc)
479 virtual std::unique_ptr<SvxEditSource>
Clone()
const override
481 return std::unique_ptr<SvxEditSource>(
new WeldEditSource(*
this));
484 virtual SvxTextForwarder* GetTextForwarder()
override {
return &m_aTextFwd; }
486 virtual SvxViewForwarder* GetViewForwarder()
override {
return &m_aViewFwd; }
490 return &m_aEditViewFwd;
493 virtual void UpdateData()
override
500 return const_cast<WeldEditSource*
>(
this)->m_aBroadCaster;
505typedef cppu::WeakImplHelper<css::lang::XServiceInfo, css::accessibility::XAccessible,
506 css::accessibility::XAccessibleComponent,
507 css::accessibility::XAccessibleContext,
508 css::accessibility::XAccessibleEventBroadcaster>
533 new ::accessibility::AccessibleTextHelper(std::make_unique<WeldEditSource>(*
this)));
551 m_xTextHelper->SetEditSource(::std::unique_ptr<SvxEditSource>());
560 virtual css::uno::Reference<css::accessibility::XAccessibleContext>
573 throw css::uno::RuntimeException();
576 return rPoint.X >= 0 && rPoint.Y >= 0 && rPoint.X < aSz.
Width() && rPoint.Y < aSz.
Height();
579 virtual css::uno::Reference<css::accessibility::XAccessible>
584 throw css::uno::RuntimeException();
589 virtual css::awt::Rectangle SAL_CALL
getBounds()
override
593 throw css::uno::RuntimeException();
597 css::awt::Rectangle aRet;
599 aRet.X = aOutPos.
X();
600 aRet.Y = aOutPos.
Y();
601 aRet.Width = aOutSize.
Width();
602 aRet.Height = aOutSize.
Height();
611 throw css::uno::RuntimeException();
613 const css::awt::Rectangle aRect(
getBounds());
614 css::awt::Point aRet;
626 throw css::uno::RuntimeException();
628 css::awt::Point aScreenLoc(0, 0);
632 Point aPos = pDrawingArea->get_accessible_location_on_screen();
633 aScreenLoc.
X = aPos.
X();
634 aScreenLoc.Y = aPos.
Y();
640 virtual css::awt::Size SAL_CALL
getSize()
override
644 throw css::uno::RuntimeException();
656 throw css::uno::RuntimeException();
659 return static_cast<sal_Int32
>(nCol);
666 throw css::uno::RuntimeException();
669 return static_cast<sal_Int32
>(nCol);
680 virtual css::uno::Reference<css::accessibility::XAccessible>
685 throw css::lang::IndexOutOfBoundsException();
688 virtual css::uno::Reference<css::accessibility::XAccessible>
693 throw css::uno::RuntimeException();
702 throw css::uno::RuntimeException();
713 css::uno::Reference<css::accessibility::XAccessibleContext> xParentContext(
714 xParent->getAccessibleContext());
717 if (xParentContext.is())
719 sal_Int64 nChildCount = xParentContext->getAccessibleChildCount();
720 for (sal_Int64 nChild = 0; (nChild < nChildCount) && (-1 == nRet); ++nChild)
722 css::uno::Reference<css::accessibility::XAccessible> xChild(
723 xParentContext->getAccessibleChild(nChild));
724 if (xChild.get() ==
this)
729 catch (
const css::uno::Exception&)
739 return css::accessibility::AccessibleRole::TEXT_FRAME;
770 virtual css::uno::Reference<css::accessibility::XAccessibleRelationSet>
775 throw css::uno::RuntimeException();
783 sal_Int64 nStateSet = 0;
786 nStateSet |= css::accessibility::AccessibleStateType::DEFUNC;
789 nStateSet |= css::accessibility::AccessibleStateType::MULTI_LINE;
790 nStateSet |= css::accessibility::AccessibleStateType::ENABLED;
791 nStateSet |= css::accessibility::AccessibleStateType::EDITABLE;
792 nStateSet |= css::accessibility::AccessibleStateType::FOCUSABLE;
793 nStateSet |= css::accessibility::AccessibleStateType::SELECTABLE;
795 nStateSet |= css::accessibility::AccessibleStateType::FOCUSED;
797 nStateSet |= css::accessibility::AccessibleStateType::ACTIVE;
799 nStateSet |= css::accessibility::AccessibleStateType::SHOWING;
801 nStateSet |= css::accessibility::AccessibleStateType::VISIBLE;
803 nStateSet |= css::accessibility::AccessibleStateType::OPAQUE;
817 const css::uno::Reference<css::accessibility::XAccessibleEventListener>& rListener)
override
825 const css::uno::Reference<css::accessibility::XAccessibleEventListener>& rListener)
override
841 return {
"css::accessibility::Accessible",
"css::accessibility::AccessibleComponent",
842 "css::accessibility::AccessibleContext" };
848#if !ENABLE_WASM_STRIP_ACCESSIBILITY
857#if !ENABLE_WASM_STRIP_ACCESSIBILITY
866bool WeldViewForwarder::IsValid()
const {
return m_rEditAcc.GetEditView() !=
nullptr; }
868Point WeldViewForwarder::LogicToPixel(
const Point& rPoint,
const MapMode& rMapMode)
const
870 EditView* pEditView = m_rEditAcc.GetEditView();
876 aMapMode.SetOrigin(
Point());
880Point WeldViewForwarder::PixelToLogic(
const Point& rPoint,
const MapMode& rMapMode)
const
882 EditView* pEditView = m_rEditAcc.GetEditView();
887 aMapMode.SetOrigin(
Point());
892WeldTextForwarder::WeldTextForwarder(
WeldEditAccessible& rAcc, WeldEditSource& rSource)
894 , m_rEditSource(rSource)
896 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
901WeldTextForwarder::~WeldTextForwarder()
903 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
910 if (
EditEngine* pEditEngine = m_rEditAcc.GetEditEngine())
925 m_rEditSource.GetBroadcaster().Broadcast(*aHint);
928sal_Int32 WeldTextForwarder::GetParagraphCount()
const
930 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
934sal_Int32 WeldTextForwarder::GetTextLen(sal_Int32 nParagraph)
const
936 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
937 return pEditEngine ? pEditEngine->
GetTextLen(nParagraph) : 0;
940OUString WeldTextForwarder::GetText(
const ESelection& rSel)
const
942 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
945 aRet = pEditEngine->
GetText(rSel);
952 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
953 assert(pEditEngine &&
"EditEngine missing");
957 switch (nOnlyHardAttrib)
959 case EditEngineAttribs::All:
960 nFlags = GetAttribsFlags::ALL;
962 case EditEngineAttribs::OnlyHard:
963 nFlags = GetAttribsFlags::CHARATTRIBS;
966 SAL_WARN(
"svx",
"unknown flags for WeldTextForwarder::GetAttribs");
973 return pEditEngine->
GetAttribs(rSel, nOnlyHardAttrib);
977SfxItemSet WeldTextForwarder::GetParaAttribs(sal_Int32 nPara)
const
979 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
980 assert(pEditEngine &&
"EditEngine missing");
985 while (nWhich <= EE_PARA_END)
987 if (aSet.GetItemState(nWhich) != SfxItemState::SET)
998void WeldTextForwarder::SetParaAttribs(sal_Int32 nPara,
const SfxItemSet& rSet)
1000 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1007 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1011void WeldTextForwarder::RemoveAttribs(
const ESelection& rSelection)
1013 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1018void WeldTextForwarder::GetPortions(sal_Int32 nPara, std::vector<sal_Int32>& rList)
const
1020 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1025OUString WeldTextForwarder::GetStyleSheet(sal_Int32 nPara)
const
1027 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1028 if (
auto pStyle = pEditEngine ? pEditEngine->
GetStyleSheet(nPara) :
nullptr)
1029 return pStyle->GetName();
1033void WeldTextForwarder::SetStyleSheet(sal_Int32 nPara,
const OUString& rStyleName)
1035 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1036 auto pStyleSheetPool = pEditEngine ? pEditEngine->
GetStyleSheetPool() :
nullptr;
1038 = pStyleSheetPool ? pStyleSheetPool->Find(rStyleName, SfxStyleFamily::Para) :
nullptr)
1042void WeldTextForwarder::QuickInsertText(
const OUString& rText,
const ESelection& rSel)
1044 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1049void WeldTextForwarder::QuickInsertLineBreak(
const ESelection& rSel)
1051 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1058 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1065 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1070bool WeldTextForwarder::IsValid()
const
1072 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1078OUString WeldTextForwarder::CalcFieldValue(
const SvxFieldItem& rField, sal_Int32 nPara,
1079 sal_Int32 nPos, std::optional<Color>& rpTxtColor,
1080 std::optional<Color>& rpFldColor,
1081 std::optional<FontLineStyle>& rpFldLineStyle)
1083 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1084 return pEditEngine ? pEditEngine->
CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor,
1089void WeldTextForwarder::FieldClicked(
const SvxFieldItem&) {}
1094 std::vector<EECharAttrib> aAttribs;
1110 sal_Int32 nEndPos = rSel.
nEndPos;
1119 sal_Int32 nLastEnd =
nPos;
1123 for (
const auto& rAttrib : aAttribs)
1125 OSL_ENSURE(rAttrib.pAttr,
"GetCharAttribs gives corrupt data");
1127 const bool bEmptyPortion = (rAttrib.nStart == rAttrib.nEnd);
1128 if ((!bEmptyPortion && (rAttrib.nStart >= nEndPos))
1129 || (bEmptyPortion && (rAttrib.nStart > nEndPos)))
1132 if ((!bEmptyPortion && (rAttrib.nEnd <=
nPos))
1133 || (bEmptyPortion && (rAttrib.nEnd <
nPos)))
1136 if (rAttrib.pAttr->Which() != nWhich)
1143 if (*pParaItem != *(rAttrib.pAttr))
1144 return SfxItemState::DONTCARE;
1148 pParaItem = rAttrib.pAttr;
1154 if (!bGaps && rAttrib.nStart > nLastEnd)
1157 nLastEnd = rAttrib.nEnd;
1160 if (!bEmpty && !bGaps && nLastEnd < (nEndPos - 1))
1163 eParaState = SfxItemState::DEFAULT;
1165 eParaState = SfxItemState::DONTCARE;
1167 eParaState = SfxItemState::SET;
1172 if ((pParaItem ==
nullptr) || (*pLastItem != *pParaItem))
1173 return SfxItemState::DONTCARE;
1177 pLastItem = pParaItem;
1178 eState = eParaState;
1188 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1194SfxItemState WeldTextForwarder::GetItemState(sal_Int32 nPara, sal_uInt16 nWhich)
const
1197 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1206LanguageType WeldTextForwarder::GetLanguage(sal_Int32 nPara, sal_Int32 nIndex)
const
1208 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1212sal_Int32 WeldTextForwarder::GetFieldCount(sal_Int32 nPara)
const
1214 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1218EFieldInfo WeldTextForwarder::GetFieldInfo(sal_Int32 nPara, sal_uInt16 nField)
const
1220 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1226tools::Rectangle WeldTextForwarder::GetCharBounds(sal_Int32 nPara, sal_Int32 nIndex)
const
1229 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1234 if (nIndex >= pEditEngine->
GetTextLen(nPara))
1239 aRect.
Move(aRect.Right() - aRect.Left(), 0);
1253 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1259 const sal_Int32 nHeight = pEditEngine->
GetTextHeight(nPara);
1266MapMode WeldTextForwarder::GetMapMode()
const
1268 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1274 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1275 return pEditEngine ? pEditEngine->
GetRefDevice() :
nullptr;
1278bool WeldTextForwarder::GetIndexAtPoint(
const Point& rPos, sal_Int32& nPara,
1279 sal_Int32& nIndex)
const
1282 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1286 nPara = aDocPos.
nPara;
1293bool WeldTextForwarder::GetWordIndices(sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart,
1294 sal_Int32& nEnd)
const
1297 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1301 css::i18n::WordType::DICTIONARY_WORD);
1315bool WeldTextForwarder::GetAttributeRun(sal_Int32& nStartIndex, sal_Int32& nEndIndex,
1316 sal_Int32 nPara, sal_Int32 nIndex,
bool bInCell)
const
1318 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1326sal_Int32 WeldTextForwarder::GetLineCount(sal_Int32 nPara)
const
1328 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1329 return pEditEngine ? pEditEngine->
GetLineCount(nPara) : 0;
1332sal_Int32 WeldTextForwarder::GetLineLen(sal_Int32 nPara, sal_Int32 nLine)
const
1334 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1335 return pEditEngine ? pEditEngine->
GetLineLen(nPara, nLine) : 0;
1338void WeldTextForwarder::GetLineBoundaries( sal_Int32& rStart, sal_Int32& rEnd,
1339 sal_Int32 nPara, sal_Int32 nLine)
const
1341 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1348sal_Int32 WeldTextForwarder::GetLineNumberAtIndex(sal_Int32 nPara, sal_Int32 nIndex)
const
1350 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1354bool WeldTextForwarder::QuickFormatDoc(
bool )
1357 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1366sal_Int16 WeldTextForwarder::GetDepth(sal_Int32 )
const
1372bool WeldTextForwarder::SetDepth(sal_Int32 , sal_Int16 nNewDepth)
1375 return -1 == nNewDepth;
1378bool WeldTextForwarder::Delete(
const ESelection& rSelection)
1381 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1391bool WeldTextForwarder::InsertText(
const OUString& rStr,
const ESelection& rSelection)
1394 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1404const SfxItemSet* WeldTextForwarder::GetEmptyItemSetPtr()
1407 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1415void WeldTextForwarder::AppendParagraph()
1418 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1426sal_Int32 WeldTextForwarder::AppendTextPortion(sal_Int32 nPara,
const OUString& rText,
1429 sal_uInt16 nRes = 0;
1430 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1431 if (pEditEngine && nPara < pEditEngine->GetParagraphCount())
1438 nRes = aSel.nEndPos = pEditEngine->
GetTextLen(nPara);
1446 const WeldTextForwarder* pSourceForwarder =
dynamic_cast<const WeldTextForwarder*
>(&rSource);
1447 if (!pSourceForwarder)
1449 EditEngine* pSourceEditEngine = pSourceForwarder->m_rEditAcc.GetEditEngine();
1450 EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
1451 if (pEditEngine && pSourceEditEngine)
1453 std::unique_ptr<EditTextObject> pNewTextObject = pSourceEditEngine->
CreateTextObject();
1454 pEditEngine->
SetText(*pNewTextObject);
1463bool WeldEditViewForwarder::IsValid()
const {
return m_rEditAcc.GetEditView() !=
nullptr; }
1465Point WeldEditViewForwarder::LogicToPixel(
const Point& rPoint,
const MapMode& rMapMode)
const
1467 EditView* pEditView = m_rEditAcc.GetEditView();
1473 aMapMode.SetOrigin(
Point());
1477Point WeldEditViewForwarder::PixelToLogic(
const Point& rPoint,
const MapMode& rMapMode)
const
1479 EditView* pEditView = m_rEditAcc.GetEditView();
1484 aMapMode.SetOrigin(
Point());
1489bool WeldEditViewForwarder::GetSelection(
ESelection& rSelection)
const
1492 EditView* pEditView = m_rEditAcc.GetEditView();
1501bool WeldEditViewForwarder::SetSelection(
const ESelection& rSelection)
1504 EditView* pEditView = m_rEditAcc.GetEditView();
1513bool WeldEditViewForwarder::Copy()
1516 EditView* pEditView = m_rEditAcc.GetEditView();
1525bool WeldEditViewForwarder::Cut()
1528 EditView* pEditView = m_rEditAcc.GetEditView();
1537bool WeldEditViewForwarder::Paste()
1540 EditView* pEditView = m_rEditAcc.GetEditView();
1552 if (aSize.
Width() == -1)
1554 if (aSize.
Height() == -1)
1588 pDrawingArea->
set_cursor(PointerStyle::Text);
1590#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1595#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1631#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1647#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1688 return std::unique_ptr<UIObject>(
new WeldEditViewUIObject(pWindow));
1699 virtual OUString
get_name()
const override {
return "WeldEditViewUIObject"; }
::rtl::Reference< IEventProcessor > xProcessor
std::map< OUString, OUString > StringMap
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Color const & GetBackgroundColor() const
void GetPortions(sal_Int32 nPara, std::vector< sal_Int32 > &rList)
OUString GetWord(sal_Int32 nPara, sal_Int32 nIndex)
void QuickFormatDoc(bool bFull=false)
OUString GetText(LineEnd eEnd=LINEEND_LF) const
virtual OUString CalcFieldValue(const SvxFieldItem &rField, sal_Int32 nPara, sal_Int32 nPos, std::optional< Color > &rTxtColor, std::optional< Color > &rFldColor, std::optional< FontLineStyle > &rFldLineStyle)
std::unique_ptr< EditTextObject > CreateTextObject()
void SetText(const OUString &rStr)
EPosition FindDocPosition(const Point &rDocPos) const
editeng::LanguageSpan GetLanguage(const EditPaM &rPaM) const
void QuickInsertLineBreak(const ESelection &rSel)
sal_Int32 GetParagraphCount() const
MapMode const & GetRefMapMode() const
OutputDevice * GetRefDevice() const
void RemoveAttribs(const ESelection &rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich)
void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)
sal_uInt32 GetTextHeight() const
void QuickDelete(const ESelection &rSel)
SfxItemSet GetAttribs(sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags=GetAttribsFlags::ALL) const
EFieldInfo GetFieldInfo(sal_Int32 nPara, sal_uInt16 nField) const
sal_Int32 GetTextLen() const
void InsertParagraph(sal_Int32 nPara, const EditTextObject &rTxtObj, const bool bAppend=false)
bool HasParaAttrib(sal_Int32 nPara, sal_uInt16 nWhich) const
void SetStyleSheet(const EditSelection &aSel, SfxStyleSheet *pStyle)
tools::Rectangle GetCharacterBounds(const EPosition &rPos) const
sal_Int32 GetLineNumberAtIndex(sal_Int32 nPara, sal_Int32 nIndex) const
static rtl::Reference< SfxItemPool > CreatePool()
sal_Int32 GetLineLen(sal_Int32 nParagraph, sal_Int32 nLine) const
sal_uInt32 CalcTextWidth()
const SfxPoolItem & GetParaAttrib(sal_Int32 nPara, sal_uInt16 nWhich) const
bool IsUpdateLayout() const
const SfxItemSet & GetEmptyItemSet() const
void GetLineBoundaries(sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine) const
SfxStyleSheetPool * GetStyleSheetPool()
sal_Int32 GetLineCount(sal_Int32 nParagraph) const
sal_uInt16 GetFieldCount(sal_Int32 nPara) const
void SetPaperSize(const Size &rSize)
void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel)
void QuickInsertText(const OUString &rText, const ESelection &rSel)
Color GetAutoColor() const
void SetNotifyHdl(const Link< EENotify &, void > &rLink)
LanguageType GetDefaultLanguage() const
const SfxStyleSheet * GetStyleSheet(sal_Int32 nPara) const
void SetModifyHdl(const Link< LinkParamNone *, void > &rLink)
virtual void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &rSet)
void GetCharAttribs(sal_Int32 nPara, std::vector< EECharAttrib > &rLst) const
const SfxItemSet & GetParaAttribs(sal_Int32 nPara) const
Point GetDocPosTopLeft(sal_Int32 nParagraph)
virtual void EditViewScrollStateChange()
bool DeleteSurroundingText(const Selection &rRange)
OUString GetSurroundingText() const
bool MouseButtonUp(const MouseEvent &rMouseEvent)
ESelection GetSelection() const
bool MouseButtonDown(const MouseEvent &rMouseEvent)
Selection GetSurroundingTextSelection() const
bool HasSelection() const
void SetSelection(const ESelection &rNewSel)
OutputDevice & GetOutputDevice() const
bool PostKeyEvent(const KeyEvent &rKeyEvent, vcl::Window const *pFrameWin=nullptr)
void ShowCursor(bool bGotoCursor=true, bool bForceVisCursor=true, bool bActivate=false)
bool MouseMove(const MouseEvent &rMouseEvent)
bool Command(const CommandEvent &rCEvt)
const vcl::KeyCode & GetKeyCode() const
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
basegfx::B2DHomMatrix GetViewTransformation() const
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
const MapMode & GetMapMode() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
constexpr tools::Long Y() const
constexpr tools::Long X() const
SfxItemPool * GetPool() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetWindowColor() const
static void GetAttributeRun(sal_Int32 &nStartIndex, sal_Int32 &nEndIndex, const EditEngine &rEE, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell=false)
static ::std::unique_ptr< SfxHint > EENotification2Hint(EENotify const *aNotify)
virtual bool SetSelection(const ESelection &rSelection)=0
virtual bool GetSelection(ESelection &rSelection) const=0
virtual bool IsValid() const=0
virtual void QuickInsertText(const OUString &rText, const ESelection &rSel)=0
virtual MapMode GetMapMode() const=0
virtual void QuickInsertLineBreak(const ESelection &rSel)=0
virtual void SetStyleSheet(sal_Int32 nPara, const OUString &rStyleName)=0
virtual void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel)=0
virtual bool GetAttributeRun(sal_Int32 &nStartIndex, sal_Int32 &nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell=false) const=0
virtual OutputDevice * GetRefDevice() const=0
virtual LanguageType GetLanguage(sal_Int32 nPara, sal_Int32 nIndex) const=0
virtual OUString GetStyleSheet(sal_Int32 nPara) const=0
virtual bool SetDepth(sal_Int32 nPara, sal_Int16 nNewDepth)=0
virtual const SfxItemSet * GetEmptyItemSetPtr()=0
virtual SfxItemSet GetAttribs(const ESelection &rSel, EditEngineAttribs nOnlyHardAttrib=EditEngineAttribs::All) const=0
virtual void GetPortions(sal_Int32 nPara, std::vector< sal_Int32 > &rList) const=0
virtual void CopyText(const SvxTextForwarder &rSource)=0
virtual sal_Int32 GetFieldCount(sal_Int32 nPara) const=0
virtual bool QuickFormatDoc(bool bFull=false)=0
virtual void FieldClicked(const SvxFieldItem &rField)=0
virtual void RemoveAttribs(const ESelection &rSelection)=0
virtual sal_Int16 GetDepth(sal_Int32 nPara) const=0
virtual bool Delete(const ESelection &rSelection)=0
virtual SfxItemSet GetParaAttribs(sal_Int32 nPara) const=0
virtual EBulletInfo GetBulletInfo(sal_Int32 nPara) const=0
virtual void AppendParagraph()=0
virtual EFieldInfo GetFieldInfo(sal_Int32 nPara, sal_uInt16 nField) const=0
virtual SfxItemPool * GetPool() const=0
virtual OUString CalcFieldValue(const SvxFieldItem &rField, sal_Int32 nPara, sal_Int32 nPos, std::optional< Color > &rpTxtColor, std::optional< Color > &rpFldColor, std::optional< FontLineStyle > &rpFldLineStyle)=0
virtual tools::Rectangle GetParaBounds(sal_Int32 nPara) const=0
virtual tools::Rectangle GetCharBounds(sal_Int32 nPara, sal_Int32 nIndex) const=0
virtual sal_Int32 AppendTextPortion(sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet)=0
virtual sal_Int32 GetTextLen(sal_Int32 nParagraph) const=0
virtual sal_Int32 GetLineCount(sal_Int32 nPara) const=0
virtual OUString GetText(const ESelection &rSel) const=0
virtual void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &rSet)=0
virtual bool GetIndexAtPoint(const Point &rPoint, sal_Int32 &rPara, sal_Int32 &rIndex) const=0
virtual void GetLineBoundaries(sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine) const=0
virtual sal_Int32 GetParagraphCount() const=0
virtual bool GetWordIndices(sal_Int32 nPara, sal_Int32 nIndex, sal_Int32 &rStart, sal_Int32 &rEnd) const=0
virtual sal_Int32 GetLineLen(sal_Int32 nPara, sal_Int32 nLine) const=0
virtual sal_Int32 GetLineNumberAtIndex(sal_Int32 nPara, sal_Int32 nIndex) const=0
virtual void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)=0
virtual bool InsertText(const OUString &rText, const ESelection &rSel)=0
virtual SfxItemState GetItemState(const ESelection &rSel, sal_uInt16 nWhich) const=0
virtual Point LogicToPixel(const Point &rPoint, const MapMode &rMapMode) const=0
virtual bool IsValid() const=0
virtual Point PixelToLogic(const Point &rPoint, const MapMode &rMapMode) const=0
virtual sal_Int16 SAL_CALL getAccessibleRole() override
virtual OUString SAL_CALL getAccessibleName() override
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &rPoint) override
virtual css::lang::Locale SAL_CALL getLocale() override
virtual void SAL_CALL grabFocus() override
virtual css::awt::Point SAL_CALL getLocationOnScreen() override
weld::CustomWidgetController * m_pController
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL removeAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &rListener) override
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
void Init(EditEngine *pEditEngine, EditView *pEditView)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &rPoint) override
WeldEditAccessible(weld::CustomWidgetController *pController)
EditEngine * m_pEditEngine
virtual css::awt::Point SAL_CALL getLocation() override
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
EditEngine * GetEditEngine()
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual void SAL_CALL addAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &rListener) override
virtual sal_Int32 SAL_CALL getForeground() override
virtual css::awt::Size SAL_CALL getSize() override
virtual css::awt::Rectangle SAL_CALL getBounds() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
std::unique_ptr<::accessibility::AccessibleTextHelper > m_xTextHelper
::accessibility::AccessibleTextHelper * GetTextHelper()
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual OUString SAL_CALL getAccessibleDescription() override
virtual bool DeleteSurroundingText(const Selection &rRange) override
std::unique_ptr< EditEngine > m_xEditEngine
virtual void Resize() override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
std::unique_ptr< EditView > m_xEditView
void DoPaint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
virtual bool Command(const CommandEvent &rCEvt) override
virtual css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget() override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
css::uno::Reference< css::datatransfer::dnd::XDropTarget > m_xDropTarget
bool GetAcceptsTab() const
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual Point EditViewPointerPosPixel() const override
virtual ~WeldEditView() override
virtual EditView * GetEditView() const
virtual bool MouseMove(const MouseEvent &rMEvt) override
rtl::Reference< WeldEditAccessible > m_xAccessible
virtual void makeEditEngine()
virtual css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard() const override
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
virtual int GetSurroundingText(OUString &rSurrounding) override
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
void SetText(const OUString &rStr)
virtual EditEngine * GetEditEngine() const
void SetModifyHdl(const Link< LinkParamNone *, void > &rLink)
virtual void GetFocus() override
virtual bool KeyInput(const KeyEvent &rKEvt) override
virtual void LoseFocus() override
virtual bool CanFocus() const
bool HasSelection() const
virtual FactoryFunction GetUITestFactory() const override
virtual StringMap get_state() override
virtual OUString get_name() const
Helper class for objects containing EditEngine/Outliner text.
void SetFocus(bool bHaveFocus=true)
Set the focus state of the accessibility object.
virtual drawinglayer::primitive2d::Primitive2DContainer getOverlayObjectPrimitive2DSequence() const override
override to check conditions for last createOverlayObjectPrimitive2DSequence
void DrawToDevice(OutputDevice &rRenderContext)
tools::Long GetFontHeight() const
FontFamily GetFamilyType()
const OUString & GetFamilyName() const
sal_uInt16 GetCode() const
virtual OutputDevice & get_ref_device()=0
virtual a11yrelationset get_accessible_relation_set()=0
virtual Point get_pointer_position() const=0
virtual a11yref get_accessible_parent()=0
virtual void set_cursor(PointerStyle ePointerStyle)=0
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define TOOLS_WARN_EXCEPTION(area, stream)
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
EE_NOTIFY_PROCESSNOTIFICATIONS
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CJK(EE_CHAR_START+17)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr sal_uInt16 EE_PARA_START(EE_ITEMS_START+0)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CTL(EE_CHAR_START+20)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CTL(EE_CHAR_START+18)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CJK(EE_CHAR_START+19)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_A
LineEnd GetSystemLineEnd()
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
std::unique_ptr< BaseProcessor2D > createProcessor2DFromOutputDevice(OutputDevice &rTargetOutDev, const drawinglayer::geometry::ViewInformation2D &rViewInformation2D)
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
HashMap_OWString_Interface aMap
SvxTableController * mpController
cppu::WeakImplHelper< css::lang::XServiceInfo, css::accessibility::XAccessible, css::accessibility::XAccessibleComponent, css::accessibility::XAccessibleContext, css::accessibility::XAccessibleEventBroadcaster > WeldEditAccessibleBaseClass
IMPL_LINK(WeldTextForwarder, NotifyHdl, EENotify &, rNotify, void)
static SfxItemState GetSvxEditEngineItemState(EditEngine const &rEditEngine, const ESelection &rSel, sal_uInt16 nWhich)