40 bool bSwitchedFocus = SetActiveSidebarWin();
42 if (rIdent ==
"reply")
44 if (rIdent ==
"resolve" || rIdent ==
"unresolve")
46 else if (rIdent ==
"resolvethread" || rIdent ==
"unresolvethread")
48 else if (rIdent ==
"delete")
50 else if (rIdent ==
"deletethread")
52 else if (rIdent ==
"deleteby")
54 else if (rIdent ==
"deleteall")
56 else if (rIdent ==
"formatall")
60 UnsetActiveSidebarWin();
61 GrabFocusToDocument();
66 if (!mxMenuButton->get_active())
72 mxMenuButton->set_item_visible(
"resolve",
false);
73 mxMenuButton->set_item_visible(
"unresolve",
false);
74 mxMenuButton->set_item_visible(
"resolvethread",
false);
75 mxMenuButton->set_item_visible(
"unresolvethread",
false);
76 mxMenuButton->set_item_visible(
"delete",
false );
80 mxMenuButton->set_item_visible(
"resolve", !IsResolved());
81 mxMenuButton->set_item_visible(
"unresolve", IsResolved());
82 mxMenuButton->set_item_visible(
"resolvethread", !IsThreadResolved());
83 mxMenuButton->set_item_visible(
"unresolvethread", IsThreadResolved());
84 mxMenuButton->set_item_visible(
"delete", !IsReadOnlyOrProtected());
87 mxMenuButton->set_item_visible(
"deletethread", !
bReadOnly);
88 mxMenuButton->set_item_visible(
"deleteby", !
bReadOnly);
89 mxMenuButton->set_item_visible(
"deleteall", !
bReadOnly);
90 mxMenuButton->set_item_visible(
"formatall", !
bReadOnly);
92 bool bReplyVis =
true;
95 if (IsReadOnlyOrProtected())
97 mxMenuButton->set_item_visible(
"reply",
false);
106 if ((sAuthor = aUserOpt.
GetID()).isEmpty())
108 sAuthor =
SwResId(STR_REDLINE_UNKNOWN_AUTHOR);
112 bReplyVis = sAuthor != GetAuthor();
114 mxMenuButton->set_item_visible(
"reply", bReplyVis);
115 mxMenuButton->set_item_visible(
"sep1", bReplyVis);
OUString GetFullName() const
sal_uInt16 GetCode() const
#define FN_DELETE_NOTE_AUTHOR
#define FN_DELETE_ALL_NOTES
#define FN_DELETE_COMMENT
#define FN_DELETE_COMMENT_THREAD
#define FN_RESOLVE_NOTE_THREAD
#define FN_FORMAT_ALL_NOTES
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
constexpr sal_uInt16 KEY_TAB
IMPL_LINK(SwAnnotationWin, SelectHdl, const OUString &, rIdent, void)
IMPL_LINK_NOARG(SwAnnotationWin, ToggleHdl, weld::Toggleable &, void)
OUString SwResId(TranslateId aId)