LibreOffice Module sw (master)  1
AnnotationWin.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <AnnotationWin.hxx>
21 
22 #include "AnnotationMenuButton.hxx"
23 #include <PostItMgr.hxx>
24 
25 #include <strings.hrc>
26 
27 #include <uiobject.hxx>
28 
29 #include <vcl/fixed.hxx>
30 #include <vcl/menu.hxx>
31 #include <vcl/scrbar.hxx>
32 #include <vcl/settings.hxx>
33 #include <vcl/svapp.hxx>
34 #include <vcl/uitest/logger.hxx>
36 
37 #include <svl/undo.hxx>
39 #include <unotools/syslocale.hxx>
40 #include <svl/languageoptions.hxx>
41 
42 #include <editeng/eeitem.hxx>
43 #include <editeng/postitem.hxx>
44 #include <editeng/fhgtitem.hxx>
45 #include <editeng/langitem.hxx>
46 
47 #include <editeng/editview.hxx>
48 #include <editeng/outliner.hxx>
49 #include <editeng/editeng.hxx>
50 #include <editeng/editobj.hxx>
51 #include <editeng/outlobj.hxx>
52 
53 #include <comphelper/lok.hxx>
54 #include <docufld.hxx>
55 #include <txtfld.hxx>
56 #include <ndtxt.hxx>
57 #include <view.hxx>
58 #include <viewopt.hxx>
59 #include <wrtsh.hxx>
60 #include <docsh.hxx>
61 #include <doc.hxx>
62 #include <IDocumentUndoRedo.hxx>
63 #include <SwUndoField.hxx>
64 #include <edtwin.hxx>
65 #include "ShadowOverlayObject.hxx"
66 #include "AnchorOverlayObject.hxx"
67 #include "OverlayRanges.hxx"
68 #include "SidebarTxtControl.hxx"
69 
70 #include <memory>
71 
72 namespace{
73 
74 void collectUIInformation( const OUString& aevent , const OUString& aID )
75 {
76  EventDescription aDescription;
77  aDescription.aID = aID;
78  aDescription.aParameters = {{"" , ""}};
79  aDescription.aAction = aevent;
80  aDescription.aParent = "MainWindow";
81  aDescription.aKeyWord = "SwEditWinUIObject";
82  UITestLogger::getInstance().logEvent(aDescription);
83 }
84 
85 }
86 
87 namespace sw::annotation {
88 
90  SwPostItMgr& aMgr,
91  SwSidebarItem& rSidebarItem,
92  SwFormatField* aField )
93  : Window(&rEditWin)
94  , maBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/annotationmenu.ui", "")
95  , mrMgr(aMgr)
96  , mrView(rEditWin.GetView())
97  , mnEventId(nullptr)
98  , mpSidebarTextControl(nullptr)
99  , mpVScrollbar(nullptr)
100  , mpMetadataAuthor(nullptr)
101  , mpMetadataDate(nullptr)
102  , mpMenuButton(nullptr)
103  , mColorAnchor()
104  , mColorDark()
105  , mColorLight()
106  , mChangeColor()
107  , meSidebarPosition(sw::sidebarwindows::SidebarPosition::NONE)
108  , mPosSize()
109  , mAnchorRect()
110  , mPageBorder(0)
111  , mbAnchorRectChanged(false)
112  , mbResolvedStateUpdated(false)
113  , mbMouseOver(false)
114  , mLayoutStatus(SwPostItHelper::INVISIBLE)
115  , mbReadonly(false)
116  , mbIsFollow(false)
117  , mrSidebarItem(rSidebarItem)
118  , mpAnchorFrame(rSidebarItem.maLayoutInfo.mpAnchorFrame)
119  , mpFormatField(aField)
120  , mpField( static_cast<SwPostItField*>(aField->GetField()))
121  , mpButtonPopup(nullptr)
122 {
123  set_id("Comment"+OUString::number(mpField->GetPostItId()));
124 
126  if ( mpShadow )
127  {
128  mpShadow->setVisible(false);
129  }
130 
133  *this );
134 
136  // When double-buffering, allow parents to paint on our area. That's
137  // necessary when parents paint the complete buffer.
138  SetParentClipMode(ParentClipMode::NoClip);
139 }
140 
142 {
143  disposeOnce();
144 }
145 
147 {
150 
151  if (IsDisposed())
152  return;
153 
155  *this );
156 
157  Disable();
158 
159  if ( mpSidebarTextControl )
160  {
161  if ( mpOutlinerView )
162  {
163  mpOutlinerView->SetWindow( nullptr );
164  }
165  }
167 
168  mpOutlinerView.reset();
169  mpOutliner.reset();
170 
171  if (mpMetadataAuthor)
172  {
173  mpMetadataAuthor->RemoveEventListener( LINK( this, SwAnnotationWin, WindowEventListener ) );
174  }
176 
177  if (mpMetadataResolved)
178  {
179  mpMetadataResolved->RemoveEventListener( LINK( this, SwAnnotationWin, WindowEventListener ) );
180  }
182 
183  if (mpMetadataDate)
184  {
185  mpMetadataDate->RemoveEventListener( LINK( this, SwAnnotationWin, WindowEventListener ) );
186  }
188 
189  if (mpVScrollbar)
190  {
191  mpVScrollbar->RemoveEventListener( LINK( this, SwAnnotationWin, WindowEventListener ) );
192  }
194 
195  RemoveEventListener( LINK( this, SwAnnotationWin, WindowEventListener ) );
196 
197  mpAnchor.reset();
198  mpShadow.reset();
199 
200  mpTextRangeOverlay.reset();
201 
203 
204  if (mnEventId)
206 
208 }
209 
211 {
212  //If the cursor was visible, then make it visible again after
213  //changing text, e.g. fdo#33599
215  bool bCursorVisible = pCursor && pCursor->IsVisible();
216 
217  //If the new text is the same as the old text, keep the same insertion
218  //point .e.g. fdo#33599
219  mpField = static_cast<SwPostItField*>(mpFormatField->GetField());
220  OUString sNewText = mpField->GetPar2();
221  bool bTextUnchanged = sNewText == mpOutliner->GetEditEngine().GetText();
222  ESelection aOrigSelection(GetOutlinerView()->GetEditView().GetSelection());
223 
224  // get text from SwPostItField and insert into our textview
225  mpOutliner->SetModifyHdl( Link<LinkParamNone*,void>() );
226  mpOutliner->EnableUndo( false );
227  if( mpField->GetTextObject() )
228  mpOutliner->SetText( *mpField->GetTextObject() );
229  else
230  {
231  mpOutliner->Clear();
233  GetOutlinerView()->InsertText(sNewText);
234  }
235 
236  mpOutliner->ClearModifyFlag();
237  mpOutliner->GetUndoManager().Clear();
238  mpOutliner->EnableUndo( true );
239  mpOutliner->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
240  if (bTextUnchanged)
241  GetOutlinerView()->GetEditView().SetSelection(aOrigSelection);
242  if (bCursorVisible)
244  Invalidate();
245 }
246 
247 void SwAnnotationWin::SetResolved(bool resolved)
248 {
249  bool oldState = IsResolved();
250  static_cast<SwPostItField*>(mpFormatField->GetField())->SetResolved(resolved);
251  const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
253 
254  mpTextRangeOverlay.reset();
255 
256  if(IsResolved())
258  else
260 
261  if(IsResolved() != oldState)
262  mbResolvedStateUpdated = true;
263  UpdateData();
264  Invalidate();
265  collectUIInformation("SETRESOLVED",get_id());
266 }
267 
269 {
271 }
272 
274 {
278 }
279 
281 {
282  // Go to the top and delete each comment one by one
283  SwAnnotationWin *current, *topNote;
284  current = topNote = GetTopReplyNote();
286 
287  while(next && next->GetTopReplyNote() == topNote)
288  {
289  current->mnEventId = Application::PostUserEvent( LINK( current, SwAnnotationWin, DeleteHdl), nullptr, true );
290  current = next;
291  next = mrMgr.GetNextPostIt(KEY_PAGEDOWN, current);
292  }
293  current->mnEventId = Application::PostUserEvent( LINK( current, SwAnnotationWin, DeleteHdl), nullptr, true );
294 }
295 
297 {
298  return static_cast<SwPostItField*>(mpFormatField->GetField())->GetResolved();
299 }
300 
302 {
304  // then iterate downwards checking resolved status
305  SwAnnotationWin *pTopNote, *TopNote;
306  pTopNote = TopNote = GetTopReplyNote();
307  if (!pTopNote->IsResolved())
308  return false;
309 
310  SwAnnotationWin* pSidebarWin = mrMgr.GetNextPostIt(KEY_PAGEDOWN, pTopNote);
311 
312  while (pSidebarWin && pSidebarWin->GetTopReplyNote() == TopNote)
313  {
314  pTopNote = pSidebarWin;
315  if (!pTopNote->IsResolved())
316  return false;
317  pSidebarWin = mrMgr.GetNextPostIt(KEY_PAGEDOWN, pSidebarWin);
318  }
319  return true;
320 }
321 
323 {
324  if ( mpOutliner->IsModified() || mbResolvedStateUpdated )
325  {
326  IDocumentUndoRedo & rUndoRedo(
328  std::unique_ptr<SwField> pOldField;
329  if (rUndoRedo.DoesUndo())
330  {
331  pOldField = mpField->Copy();
332  }
333  mpField->SetPar2(mpOutliner->GetEditEngine().GetText());
334  mpField->SetTextObject(mpOutliner->CreateParaObject());
335  if (rUndoRedo.DoesUndo())
336  {
337  SwTextField *const pTextField = mpFormatField->GetTextField();
338  SwPosition aPosition( pTextField->GetTextNode() );
339  aPosition.nContent = pTextField->GetStart();
340  rUndoRedo.AppendUndo(
341  std::make_unique<SwUndoFieldFromDoc>(aPosition, *pOldField, *mpField, nullptr, true));
342  }
343  // so we get a new layout of notes (anchor position is still the same and we would otherwise not get one)
344  mrMgr.SetLayout();
345  // #i98686# if we have several views, all notes should update their text
348  else
351  }
352  mpOutliner->ClearModifyFlag();
353  mpOutliner->GetUndoManager().Clear();
354  mbResolvedStateUpdated = false;
355 }
356 
358 {
359  collectUIInformation("DELETE",get_id());
361  return;
362 
363  if ( mrMgr.GetActiveSidebarWin() == this)
364  {
365  mrMgr.SetActiveSidebarWin(nullptr);
366  // if the note is empty, the previous line will send a delete event, but we are already there
367  if (mnEventId)
368  {
370  mnEventId = nullptr;
371  }
372  }
373  // we delete the field directly, the Mgr cleans up the PostIt by listening
377 }
378 
380 {
382 }
383 
385 {
386  // if this is an answer, do not skip over all following ones, but insert directly behind the current one
387  // but when just leaving a note, skip all following ones as well to continue typing
388  return mrMgr.IsAnswer()
389  ? 1
390  : 1 + CountFollowing();
391 }
392 
393 // returns a non-zero postit parent id, if exists, otherwise 0 for root comments
395 {
396  SwTextField* pTextField = mpFormatField->GetTextField();
397  SwPosition aPosition( pTextField->GetTextNode() );
398  aPosition.nContent = pTextField->GetStart();
399  SwTextAttr * const pTextAttr =
400  pTextField->GetTextNode().GetTextAttrForCharAt(
401  aPosition.nContent.GetIndex() - 1,
403  const SwField* pField = pTextAttr ? pTextAttr->GetFormatField().GetField() : nullptr;
404  sal_uInt32 nParentId = 0;
405  if (pField && pField->Which() == SwFieldIds::Postit)
406  {
407  const SwPostItField* pPostItField = static_cast<const SwPostItField*>(pField);
408  nParentId = pPostItField->GetPostItId();
409  }
410  return nParentId;
411 }
412 
413 // counts how many SwPostItField we have right after the current one
415 {
416  sal_uInt32 aCount = 1; // we start with 1, so we have to subtract one at the end again
417  SwTextField* pTextField = mpFormatField->GetTextField();
418  SwPosition aPosition( pTextField->GetTextNode() );
419  aPosition.nContent = pTextField->GetStart();
420 
421  SwTextAttr * pTextAttr = pTextField->GetTextNode().GetTextAttrForCharAt(
422  aPosition.nContent.GetIndex() + 1,
424  SwField* pField = pTextAttr
425  ? const_cast<SwField*>(pTextAttr->GetFormatField().GetField())
426  : nullptr;
427  while ( pField && ( pField->Which()== SwFieldIds::Postit ) )
428  {
429  aCount++;
430  pTextAttr = pTextField->GetTextNode().GetTextAttrForCharAt(
431  aPosition.nContent.GetIndex() + aCount,
433  pField = pTextAttr
434  ? const_cast<SwField*>(pTextAttr->GetFormatField().GetField())
435  : nullptr;
436  }
437  return aCount - 1;
438 }
439 
441 {
442  mpButtonPopup = maBuilder.get_menu("menu");
443  sal_uInt16 nByAuthorId = mpButtonPopup->GetItemId("deleteby");
444  OUString aText = mpButtonPopup->GetItemText(nByAuthorId);
445  SwRewriter aRewriter;
446  aRewriter.AddRule(UndoArg1,GetAuthor());
447  aText = aRewriter.Apply(aText);
448  mpButtonPopup->SetItemText(nByAuthorId, aText);
449  VclPtrInstance<AnnotationMenuButton> pMenuButton( *this );
450  pMenuButton->SetPopupMenu( mpButtonPopup );
451  pMenuButton->Show();
452  return pMenuButton;
453 }
454 
456 {
457  // If tiled annotations is off in lok case, skip adding additional reply text.
459  return;
460 
461  //collect our old meta data
463  if (!pWin)
464  return;
465 
466  const SvtSysLocale aSysLocale;
467  const LocaleDataWrapper& rLocalData = aSysLocale.GetLocaleData();
468  SwRewriter aRewriter;
469  aRewriter.AddRule(UndoArg1, pWin->GetAuthor());
470  const OUString aText = aRewriter.Apply(SwResId(STR_REPLY))
471  + " (" + rLocalData.getDate( pWin->GetDate())
472  + ", " + rLocalData.getTime( pWin->GetTime(), false)
473  + "): \"";
474  GetOutlinerView()->InsertText(aText);
475 
476  // insert old, selected text or "..."
477  // TODO: iterate over all paragraphs, not only first one to find out if it is empty
478  if (!pText->GetTextObject().GetText(0).isEmpty())
480  else
481  GetOutlinerView()->InsertText("...");
482  GetOutlinerView()->InsertText("\"\n");
483 
485  SfxItemSet aAnswerSet( mrView.GetDocShell()->GetPool() );
486  aAnswerSet.Put(SvxFontHeightItem(200,80,EE_CHAR_FONTHEIGHT));
488  GetOutlinerView()->SetAttribs(aAnswerSet);
490 
491  //remove all attributes and reset our standard ones
494  // lets insert an undo step so the initial text can be easily deleted
495  // but do not use UpdateData() directly, would set modified state again and reentrance into Mgr
496  mpOutliner->SetModifyHdl( Link<LinkParamNone*,void>() );
497  IDocumentUndoRedo & rUndoRedo(
499  std::unique_ptr<SwField> pOldField;
500  if (rUndoRedo.DoesUndo())
501  {
502  pOldField = mpField->Copy();
503  }
504  mpField->SetPar2(mpOutliner->GetEditEngine().GetText());
505  mpField->SetTextObject(mpOutliner->CreateParaObject());
506  if (rUndoRedo.DoesUndo())
507  {
508  SwTextField *const pTextField = mpFormatField->GetTextField();
509  SwPosition aPosition( pTextField->GetTextNode() );
510  aPosition.nContent = pTextField->GetStart();
511  rUndoRedo.AppendUndo(
512  std::make_unique<SwUndoFieldFromDoc>(aPosition, *pOldField, *mpField, nullptr, true));
513  }
514  mpOutliner->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
515  mpOutliner->ClearModifyFlag();
516  mpOutliner->GetUndoManager().Clear();
517 }
518 
519 void SwAnnotationWin::UpdateText(const OUString& aText)
520 {
521  mpOutliner->Clear();
522  GetOutlinerView()->InsertText(aText);
523  UpdateData();
524 }
525 
527 {
528  // set initial language for outliner
530  sal_uInt16 nLangWhichId = 0;
531  switch (nScriptType)
532  {
533  case SvtScriptType::LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break;
534  case SvtScriptType::ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
535  case SvtScriptType::COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
536  default: OSL_FAIL("GetLanguage: wrong script type");
537  }
538  return SvxLanguageItem(mpField->GetLanguage(),nLangWhichId);
539 }
540 
542 {
543  return mbReadonly ||
546 }
547 
549 {
550  return mpField->GetPar1();
551 }
552 
554 {
555  return mpField->GetDate();
556 }
557 
559 {
560  return mpField->GetTime();
561 }
562 
564 {
566 }
567 
568 } // end of namespace sw::annotation
569 
570 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Date GetDate() const
Definition: docufld.hxx:474
VclPtr< FixedText > mpMetadataResolved
virtual void SetModified(bool=true) override
Definition: docsh2.cxx:1377
Marks a position in the document model.
Definition: pam.hxx:35
const SwField * GetField() const
Definition: fmtfld.hxx:111
void GetSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder)
void InsertText(const OUString &rNew, bool bSelect=false)
LanguageType GetLanguage() const
Language at field position.
Definition: fldbas.hxx:402
const SwFrame * mpAnchorFrame
VclPtr< MenuButton > mpMenuButton
SwPostItHelper::SwLayoutStatus GetLayoutStatus() const
static std::unique_ptr< ShadowOverlayObject > CreateShadowOverlayObject(SwView const &rDocView)
OutlinerParaObject * IsAnswer()
Definition: PostItMgr.hxx:255
bool IsProtect() const
Definition: atrfld.cxx:399
VclPtr< FixedText > mpMetadataDate
void ShowCursor(bool bGotoCursor=true, bool bActivate=false)
void disposeAndClear()
Base class of all fields.
Definition: fldbas.hxx:289
virtual void SetPar2(const OUString &rStr) override
set the PostIt's text
Definition: docufld.cxx:1804
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
tools::Time GetTime() const
Definition: docufld.hxx:475
std::unique_ptr< sw::sidebarwindows::ShadowOverlayObject > mpShadow
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
SwAnnotationWin(SwEditWin &rEditWin, SwPostItMgr &aMgr, SwSidebarItem &rSidebarItem, SwFormatField *aField)
virtual OUString GetPar1() const override
Author.
Definition: docufld.cxx:1798
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
void SetParentClipMode(ParentClipMode nMode=ParentClipMode::NONE)
void SetActiveSidebarWin(sw::annotation::SwAnnotationWin *p)
Definition: PostItMgr.cxx:2183
void SetTextObject(std::unique_ptr< OutlinerParaObject > pText)
Definition: docufld.cxx:1822
Dialog to specify the properties of date form field.
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:144
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
virtual void dispose() override
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(59)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
bool DelRight()
Definition: delete.cxx:292
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...
Definition: ndtxt.cxx:3022
static UITestLogger & getInstance()
SvxLanguageItem GetLanguage() const
void logEvent(const EventDescription &rDescription)
const LocaleDataWrapper & GetLocaleData() const
const OUString & get_id() const
NONE
std::unique_ptr< sw::overlay::OverlayRanges > mpTextRangeOverlay
void DisconnectSidebarWinFromFrame(const SwFrame &rFrame, sw::annotation::SwAnnotationWin &rSidebarWin)
Definition: PostItMgr.cxx:2423
VclPtr< FixedText > mpMetadataAuthor
SwIndex nContent
Definition: pam.hxx:38
const SwTextField * GetTextField() const
Definition: fmtfld.hxx:129
vcl::Cursor * GetCursor() const
constexpr sal_uInt16 KEY_PAGEUP
sal_Int32 GetStart() const
Definition: txatbase.hxx:82
const SwFormatField & GetFormatField() const
Definition: txatbase.hxx:191
static SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
OUString GetText(sal_Int32 nPara) const
EditView & GetEditView() const
SfxItemPool & GetPool() const
virtual FactoryFunction GetUITestFactory() const override
std::unique_ptr< Outliner > mpOutliner
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
virtual ~SwAnnotationWin() override
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
void ConnectSidebarWinToFrame(const SwFrame &rFrame, const SwFormatField &rFormatField, sw::annotation::SwAnnotationWin &rSidebarWin)
Definition: PostItMgr.cxx:2406
sal_uInt32 GetPostItId() const
Definition: docufld.hxx:476
const EditTextObject & GetTextObject() const
SvtScriptType
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:1779
std::unique_ptr< OutlinerView > mpOutlinerView
void SetAttribs(const SfxItemSet &)
SwAnnotationWin * GetTopReplyNote()
Find the first annotation for the thread which this annotation is in.
void InitAnswer(OutlinerParaObject const *pText)
#define EE_PARA_ALL
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Definition: uiobject.cxx:245
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:58
OUString Apply(const OUString &rStr) const
Definition: SwRewriter.cxx:41
bool IsResolvedPostIts() const
Definition: viewopt.hxx:275
sal_uInt16 GetItemId(sal_uInt16 nPos) const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
const SwFrame * mpAnchorFrame
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:27
constexpr sal_uInt16 KEY_PAGEDOWN
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
Definition: docsh.hxx:224
void GrabFocusToDocument()
void UpdateText(const OUString &aText)
const sal_Int16 mnEventId
void InsertText(const OUString &rNew, bool bSelect=false)
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
OUString GetItemText(sal_uInt16 nItemId) const
sal_uInt32 CalcParent()
Calculate parent postit id of current annotation window.
SwDocShell * GetDocShell()
Definition: view.cxx:1109
void Disable(bool bChild=true)
SwLayoutInfo maLayoutInfo
void LayoutPostIts()
Definition: PostItMgr.cxx:681
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
OUString getDate(const Date &rDate) const
void set_id(const OUString &rID)
void Broadcast(const SfxHint &rHint)
void SetSelection(const ESelection &)
const OutlinerParaObject * GetTextObject() const
Definition: docufld.hxx:490
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:400
bool GotoField(const SwFormatField &rField)
Definition: wrtsh3.cxx:65
void disposeBuilder()
SwFieldIds Which() const
ResId.
Definition: fldbas.cxx:243
std::unique_ptr< sw::sidebarwindows::AnchorOverlayObject > mpAnchor
ITALIC_NORMAL
VclPtr< sw::sidebarwindows::SidebarTextControl > mpSidebarTextControl
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:423
void SetLayout()
Definition: PostItMgr.hxx:199
SlideSorterView & mrView
void UpdateResolvedStatus(const sw::annotation::SwAnnotationWin *topNote)
Definition: PostItMgr.cxx:2486
#define EE_TEXTPOS_MAX_COUNT
PopupMenu * get_menu(const OString &sID)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
void ClearMark()
Definition: crsrsh.cxx:938
bool IsDisposed() const
bool IsVisible() const
sw::annotation::SwAnnotationWin * GetActiveSidebarWin()
Definition: PostItMgr.hxx:233
void SetSelection(const ESelection &rNewSel)
sw::annotation::SwAnnotationWin * GetNextPostIt(sal_uInt16 aDirection, sw::annotation::SwAnnotationWin *aPostIt)
Definition: PostItMgr.cxx:1791
VclPtr< ScrollBar > mpVScrollbar
virtual OUString GetPar2() const override
Text.
Definition: docufld.cxx:1810
void RemoveEventListener(const Link< VclWindowEvent &, void > &rEventListener)
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
std::map< OUString, OUString > aParameters
SwTextNode & GetTextNode() const
Definition: txtfld.hxx:53
#define EE_PARA_MAX_COUNT
bool SupportsDoubleBuffering() const
virtual const SwFormatField & GetFormatField() const =0
virtual void dispose() override
void RemoveAttribsKeepLanguages(bool bRemoveParaAttribs)
#define EE_TEXTPOS_ALL
VclPtr< PopupMenu > mpButtonPopup
VclPtr< MenuButton > CreateMenuButton()
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
void SetItemText(sal_uInt16 nItemId, const OUString &rStr)