20#include <config_wasm_strip.h>
28#include <uiobject.hxx>
38#include <osl/diagnose.h>
47#include <editeng/editeng.hxx>
74void collectUIInformation(
const OUString& aevent ,
const OUString& aID )
77 aDescription.
aID = aID;
80 aDescription.
aParent =
"MainWindow";
81 aDescription.
aKeyWord =
"SwEditWinUIObject";
96 ,
mrView(rEditWin.GetView())
97 , mnDeleteEventId(nullptr)
100 , mbAnchorRectChanged(false)
101 , mbResolvedStateUpdated(false)
106 , mrSidebarItem(rSidebarItem)
108 , mpFormatField(aField)
121#if !ENABLE_WASM_STRIP_ACCESSIBILITY
140#if !ENABLE_WASM_STRIP_ACCESSIBILITY
175 bool bCursorVisible = pCursor && pCursor->
IsVisible();
181 bool bTextUnchanged = sNewText ==
mpOutliner->GetEditEngine().GetText();
213 const SwViewOption* pVOpt = pWrtShell->GetViewOptions();
228 collectUIInformation(
"SETRESOLVED",
get_id());
253 pField->SetParaId(nParaId);
297 pTopNote = pSidebarWin;
309 IDocumentUndoRedo & rUndoRedo(
311 std::unique_ptr<SwField> pOldField;
312 if (rUndoRedo.DoesUndo())
318 if (rUndoRedo.DoesUndo())
322 rUndoRedo.AppendUndo(
323 std::make_unique<SwUndoFieldFromDoc>(aPosition, *pOldField, *
mpField,
true));
341 collectUIInformation(
"DELETE",
get_id());
386 sal_uInt32 nParentId = 0;
398 sal_uInt32 aCount = 1;
436 const OUString aText = aRewriter.
Apply(
SwResId(STR_REPLY))
463 IDocumentUndoRedo & rUndoRedo(
465 std::unique_ptr<SwField> pOldField;
466 if (rUndoRedo.DoesUndo())
472 if (rUndoRedo.DoesUndo())
476 rUndoRedo.AppendUndo(
477 std::make_unique<SwUndoFieldFromDoc>(aPosition, *pOldField, *
mpField,
true));
495 sal_uInt16 nLangWhichId = 0;
501 default: OSL_FAIL(
"GetLanguage: wrong script type");
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
virtual OUString GetText(sal_Int32 nPara) const=0
void SetSelection(const ESelection &rNewSel)
void InsertText(const OUString &rNew, bool bSelect=false, bool bLOKShowSelect=true)
vcl::Cursor * GetCursor() const
void RemoveAttribsKeepLanguages(bool bRemoveParaAttribs)
virtual void dispose() override
std::unique_ptr< weld::Container > m_xContainer
OUString getDate(const Date &rDate) const
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
const EditTextObject & GetTextObject() const
void SetSelection(const ESelection &)
void InsertText(const OUString &rNew, bool bSelect=false)
void SetAttribs(const SfxItemSet &)
EditView & GetEditView() const
void ShowCursor(bool bGotoCursor=true, bool bActivate=false)
void Broadcast(const SfxHint &rHint)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SfxItemPool & GetPool() const
const LocaleDataWrapper & GetLocaleData() const
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
virtual void SetModified(bool=true) override
SwDoc * GetDoc()
returns Doc. But be careful!
IDocumentUndoRedo & GetIDocumentUndoRedo()
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Base class of all fields.
SwFieldIds Which() const
ResId.
LanguageType GetLanguage() const
Language at field position.
sal_uInt32 GetPostItId() const
virtual OUString GetPar1() const override
Author.
sal_uInt32 GetParaId() const
virtual std::unique_ptr< SwField > Copy() const override
const OutlinerParaObject * GetTextObject() const
tools::Time GetTime() const
void SetTextObject(std::optional< OutlinerParaObject > pText)
virtual void SetPar2(const OUString &rStr) override
set the PostIt's text
virtual OUString GetPar2() const override
Text.
void ConnectSidebarWinToFrame(const SwFrame &rFrame, const SwFormatField &rFormatField, sw::annotation::SwAnnotationWin &rSidebarWin)
OutlinerParaObject * IsAnswer()
void SetActiveSidebarWin(sw::annotation::SwAnnotationWin *p)
sw::annotation::SwAnnotationWin * GetNextPostIt(sal_uInt16 aDirection, sw::annotation::SwAnnotationWin *aPostIt)
void DisconnectSidebarWinFromFrame(const SwFrame &rFrame, sw::annotation::SwAnnotationWin &rSidebarWin)
sw::annotation::SwAnnotationWin * GetActiveSidebarWin()
void UpdateResolvedStatus(const sw::annotation::SwAnnotationWin *topNote)
void AddRule(SwUndoArg eWhat, const OUString &rWith)
OUString Apply(const OUString &rStr) const
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
sal_Int32 GetStart() const
const SwFormatField & GetFormatField() const
SwTextNode & GetTextNode() const
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
bool IsResolvedPostIts() const
SwWrtShell * GetWrtShellPtr() const
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
bool GotoField(const SwFormatField &rField)
bool DelRight(bool isReplaceHeuristic=false)
static UITestLogger & getInstance()
void logEvent(const EventDescription &rDescription)
SwPostItHelper::SwLayoutStatus GetLayoutStatus() const
std::unique_ptr< sw::overlay::OverlayRanges > mpTextRangeOverlay
virtual void dispose() override
std::unique_ptr< weld::Label > mxMetadataResolved
void UpdateText(const OUString &aText)
bool IsReadOnlyOrProtected() const
std::unique_ptr< Outliner > mpOutliner
SwAnnotationWin * GetTopReplyNote()
Find the first annotation for the thread which this annotation is in.
std::unique_ptr< sw::sidebarwindows::AnchorOverlayObject > mpAnchor
std::unique_ptr< OutlinerView > mpOutlinerView
bool mbResolvedStateUpdated
SwFormatField * mpFormatField
OUString GetAuthor() const
std::unique_ptr< weld::CustomWeld > mxSidebarTextControlWin
sal_uInt32 CountFollowing()
void ToggleResolvedForThread()
static sal_uInt32 CreateUniqueParaId()
sal_uInt32 CalcParent()
Calculate parent postit id of current annotation window.
std::unique_ptr< weld::MenuButton > mxMenuButton
std::unique_ptr< sw::sidebarwindows::ShadowOverlayObject > mpShadow
void SetResolved(bool resolved)
SwAnnotationWin(SwEditWin &rEditWin, SwPostItMgr &aMgr, SwSidebarItem &rSidebarItem, SwFormatField *aField)
virtual ~SwAnnotationWin() override
ImplSVEvent * mnDeleteEventId
std::unique_ptr< weld::ScrolledWindow > mxVScrollbar
SvxLanguageItem GetLanguage() const
OutlinerView * GetOutlinerView()
tools::Time GetTime() const
std::unique_ptr< weld::Label > mxMetadataDate
std::unique_ptr< sw::sidebarwindows::SidebarTextControl > mxSidebarTextControl
std::unique_ptr< weld::Label > mxMetadataAuthor
virtual FactoryFunction GetUITestFactory() const override
void InitAnswer(OutlinerParaObject const &rText)
SwSidebarItem & mrSidebarItem
const OUString & get_id() const
bool SupportsDoubleBuffering() const
void SetParentClipMode(ParentClipMode nMode=ParentClipMode::NONE)
void set_id(const OUString &rID)
void Disable(bool bChild=true)
void GrabFocusToDocument()
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
#define EE_TEXTPOS_MAX_COUNT
#define EE_PARA_MAX_COUNT
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(60)
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_PAGEUP
#define LINK(Instance, Class, Member)
SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
bool isTiledAnnotations()
unsigned int uniform_uint_distribution(unsigned int a, unsigned int b)
Dialog to specify the properties of date form field.
std::map< OUString, OUString > aParameters
const SwFrame * mpAnchorFrame
Marks a position in the document model.
sal_Int32 GetContentIndex() const
OUString SwResId(TranslateId aId)
void GetSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept