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());
239 pTop->ToggleResolved();
254 pField->SetParaId(nParaId);
290 if (!current->IsResolved())
293 if (!current || current->GetTopReplyNote() != topNote)
302 IDocumentUndoRedo & rUndoRedo(
304 std::unique_ptr<SwField> pOldField;
305 if (rUndoRedo.DoesUndo())
311 if (rUndoRedo.DoesUndo())
315 rUndoRedo.AppendUndo(
316 std::make_unique<SwUndoFieldFromDoc>(aPosition, *pOldField, *
mpField,
true));
334 collectUIInformation(
"DELETE",
get_id());
377 if (
const SwField* pField = pTextAttr->GetFormatField().GetField())
379 return static_cast<const SwPostItField*
>(pField)->GetPostItId();
389 for (sal_Int32
n = 1;; ++
n)
417 const OUString aText = aRewriter.
Apply(
SwResId(STR_REPLY))
443 IDocumentUndoRedo & rUndoRedo(
445 std::unique_ptr<SwField> pOldField;
446 if (rUndoRedo.DoesUndo())
452 if (rUndoRedo.DoesUndo())
456 rUndoRedo.AppendUndo(
457 std::make_unique<SwUndoFieldFromDoc>(aPosition, *pOldField, *
mpField,
true));
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 SetStyleSheet(const OUString &rStyleName)
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.
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
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()
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< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
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)
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