LibreOffice Module sw (master)  1
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwPostItMgr Class Referencefinal

#include <PostItMgr.hxx>

Inheritance diagram for SwPostItMgr:
Collaboration diagram for SwPostItMgr:

Public Types

typedef std::vector< std::unique_ptr< SwSidebarItem > >::const_iterator const_iterator

Public Member Functions

 SwPostItMgr (SwView *aDoc)
virtual ~SwPostItMgr () override
const_iterator begin () const
const_iterator end () const
void Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override
void LayoutPostIts ()
bool CalcRects ()
void MakeVisible (const sw::annotation::SwAnnotationWin *pPostIt)
bool ShowScrollbar (const tools::ULong aPage) const
bool HasNotes () const
bool ShowNotes () const
bool IsShowAnchor () const
tools::ULong GetSidebarWidth (bool bPx=false) const
tools::ULong GetSidebarBorderWidth (bool bPx=false) const
void PrepareView (bool bIgnoreCount=false)
void CorrectPositions ()
void SetLayout ()
void Delete (const OUString &aAuthor)
void Delete (sal_uInt32 nPostItId)
void Delete ()
void DeleteCommentThread (sal_uInt32 nPostItId)
void ToggleResolved (sal_uInt32 nPostItId)
void ToggleResolvedForThread (sal_uInt32 nPostItId)
void ExecuteFormatAllDialog (SwView &rView)
void FormatAll (const SfxItemSet &rNewAttr)
void Hide (std::u16string_view rAuthor)
void Hide ()
void Show ()
void UpdateResolvedStatus (const sw::annotation::SwAnnotationWin *topNote)
void ShowHideResolvedNotes (bool visible)
void Rescale ()
tools::Rectangle GetBottomScrollRect (const tools::ULong aPage) const
tools::Rectangle GetTopScrollRect (const tools::ULong aPage) const
bool IsHit (const Point &aPointPixel)
vcl::WindowIsHitSidebarWindow (const Point &rPointLogic)
 Get the matching window that is responsible for handling mouse events of rPointLogic, if any. More...
Color GetArrowColor (sal_uInt16 aDirection, tools::ULong aPage) const
sw::annotation::SwAnnotationWinGetAnnotationWin (const SwPostItField *pField) const
sw::annotation::SwAnnotationWinGetAnnotationWin (const sal_uInt32 nPostItId) const
sw::annotation::SwAnnotationWinGetNextPostIt (sal_uInt16 aDirection, sw::annotation::SwAnnotationWin *aPostIt)
tools::Long GetNextBorder ()
sw::annotation::SwAnnotationWinGetActiveSidebarWin ()
void SetActiveSidebarWin (sw::annotation::SwAnnotationWin *p)
SW_DLLPUBLIC bool HasActiveSidebarWin () const
bool HasActiveAnnotationWin () const
void GrabFocusOnActiveSidebarWin ()
SW_DLLPUBLIC void UpdateDataOnActiveSidebarWin ()
void DeleteActiveSidebarWin ()
void HideActiveSidebarWin ()
void ToggleInsModeOnActiveSidebarWin ()
sal_Int32 GetMinimumSizeWithMeta () const
sal_Int32 GetSidebarScrollerHeight () const
void SetShadowState (const SwPostItField *pField, bool bCursor=true)
void SetSpellChecking ()
void RegisterAnswer (const OutlinerParaObject *pAnswer)
OutlinerParaObjectIsAnswer ()
void RegisterAnswerText (const OUString &aAnswerText)
const OUString & GetAnswerText () const
void CheckMetaText ()
sal_uInt16 Replace (SvxSearchItem const *pItem)
sal_uInt16 SearchReplace (const SwFormatField &pField, const i18nutil::SearchOptions2 &rSearchOptions, bool bSrchForward)
sal_uInt16 FinishSearchReplace (const i18nutil::SearchOptions2 &rSearchOptions, bool bSrchForward)
void AssureStdModeAtShell ()
void ConnectSidebarWinToFrame (const SwFrame &rFrame, const SwFormatField &rFormatField, sw::annotation::SwAnnotationWin &rSidebarWin)
void DisconnectSidebarWinFromFrame (const SwFrame &rFrame, sw::annotation::SwAnnotationWin &rSidebarWin)
bool HasFrameConnectedSidebarWins (const SwFrame &rFrame)
vcl::WindowGetSidebarWinForFrameByIndex (const SwFrame &rFrame, const sal_Int32 nIndex)
void GetAllSidebarWinForFrame (const SwFrame &rFrame, std::vector< vcl::Window * > *pChildren)
void DrawNotesForPage (OutputDevice *pOutDev, sal_uInt32 nPage)
void PaintTile (OutputDevice &rRenderContext)
- Public Member Functions inherited from SfxListener
 SfxListener ()
 SfxListener (const SfxListener &rCopy)
virtual ~SfxListener () COVERITY_NOEXCEPT_FALSE
void StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
void EndListeningAll ()
bool IsListening (SfxBroadcaster &rBroadcaster) const
sal_uInt16 GetBroadcasterCount () const
SfxBroadcasterGetBroadcasterJOE (sal_uInt16 nNo) const
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)

Static Public Member Functions

static Color GetColorDark (std::size_t aAuthorIndex)
static Color GetColorLight (std::size_t aAuthorIndex)
static Color GetColorAnchor (std::size_t aAuthorIndex)

Private Member Functions

void AddPostIts (bool bCheckExistence=true, bool bFocus=true)
void RemoveSidebarWin ()
void PreparePageContainer ()
void Scroll (const tools::Long lScroll, const tools::ULong aPage)
void AutoScroll (const sw::annotation::SwAnnotationWin *pPostIt, const tools::ULong aPage)
bool ScrollbarHit (const tools::ULong aPage, const Point &aPoint)
bool LayoutByPage (std::vector< sw::annotation::SwAnnotationWin * > &aVisiblePostItList, const tools::Rectangle &rBorder, tools::Long lNeededHeight)
bool CheckForRemovedPostIts ()
bool ArrowEnabled (sal_uInt16 aDirection, tools::ULong aPage) const
bool BorderOverPageBorder (tools::ULong aPage) const
bool HasScrollbars () const
void Focus (const SfxBroadcaster &rBC)
sal_Int32 GetInitialAnchorDistance () const
sal_Int32 GetScrollSize () const
sal_Int32 GetSpaceBetween () const
void SetReadOnlyState ()
 DECL_DLLPRIVATE_LINK (CalcHdl, void *, void)
sw::annotation::SwAnnotationWinGetSidebarWin (const SfxBroadcaster *pBroadcaster) const
SwSidebarItemInsertItem (SfxBroadcaster *pItem, bool bCheckExistence, bool bFocus)
void RemoveItem (SfxBroadcaster *pBroadcast)

Private Attributes

VclPtr< SwEditWinmpEditWin
std::vector< std::unique_ptr< SwSidebarItem > > mvPostItFields
std::vector< std::unique_ptr< SwPostItPageItem > > mPages
bool mbWaitingForCalcRects
VclPtr< sw::annotation::SwAnnotationWinmpActivePostIt
bool mbLayout
tools::Long mbLayoutHeight
bool mbLayouting
bool mbReadOnly
bool mbDeleteNote
FieldShadowState mShadowState
std::optional< OutlinerParaObjectmpAnswer
OUString maAnswerText
bool mbIsShowAnchor
std::unique_ptr< sw::sidebarwindows::SwFrameSidebarWinContainermpFrameSidebarWinContainer

Detailed Description

Definition at line 124 of file PostItMgr.hxx.

Member Typedef Documentation

typedef std::vector< std::unique_ptr<SwSidebarItem> >::const_iterator SwPostItMgr::const_iterator

Definition at line 179 of file PostItMgr.hxx.

Constructor & Destructor Documentation

SwPostItMgr::SwPostItMgr ( SwView aDoc)
SwPostItMgr::~SwPostItMgr ( )

Member Function Documentation

void SwPostItMgr::AddPostIts ( bool  bCheckExistence = true,
bool  bFocus = true 
bool SwPostItMgr::ArrowEnabled ( sal_uInt16  aDirection,
tools::ULong  aPage 
) const

Definition at line 1106 of file PostItMgr.cxx.

References BorderOverPageBorder(), KEY_PAGEDOWN, KEY_PAGEUP, and mPages.

Referenced by GetArrowColor(), and Scroll().

void SwPostItMgr::AssureStdModeAtShell ( )
void SwPostItMgr::AutoScroll ( const sw::annotation::SwAnnotationWin pPostIt,
const tools::ULong  aPage 
const_iterator SwPostItMgr::begin ( ) const

Definition at line 180 of file PostItMgr.hxx.

Referenced by SwContentType::FillMemberList().

bool SwPostItMgr::BorderOverPageBorder ( tools::ULong  aPage) const
bool SwPostItMgr::CalcRects ( )
bool SwPostItMgr::CheckForRemovedPostIts ( )
void SwPostItMgr::CheckMetaText ( )

Definition at line 2286 of file PostItMgr.cxx.

References mvPostItFields.

Referenced by SwView::ExecViewOptions().

void SwPostItMgr::ConnectSidebarWinToFrame ( const SwFrame rFrame,
const SwFormatField rFormatField,
sw::annotation::SwAnnotationWin rSidebarWin 
void SwPostItMgr::CorrectPositions ( )
void ,
void SwPostItMgr::Delete ( const OUString &  aAuthor)
void SwPostItMgr::Delete ( sal_uInt32  nPostItId)
void SwPostItMgr::Delete ( )
void SwPostItMgr::DeleteActiveSidebarWin ( )
void SwPostItMgr::DeleteCommentThread ( sal_uInt32  nPostItId)
void SwPostItMgr::DisconnectSidebarWinFromFrame ( const SwFrame rFrame,
sw::annotation::SwAnnotationWin rSidebarWin 
void SwPostItMgr::DrawNotesForPage ( OutputDevice pOutDev,
sal_uInt32  nPage 
const_iterator SwPostItMgr::end ( ) const

Definition at line 181 of file PostItMgr.hxx.

Referenced by SwContentType::FillMemberList().

void SwPostItMgr::ExecuteFormatAllDialog ( SwView rView)
sal_uInt16 SwPostItMgr::FinishSearchReplace ( const i18nutil::SearchOptions2 rSearchOptions,
bool  bSrchForward 
void SwPostItMgr::Focus ( const SfxBroadcaster rBC)
void SwPostItMgr::FormatAll ( const SfxItemSet rNewAttr)
sw::annotation::SwAnnotationWin* SwPostItMgr::GetActiveSidebarWin ( )
void SwPostItMgr::GetAllSidebarWinForFrame ( const SwFrame rFrame,
std::vector< vcl::Window * > *  pChildren 
sw::annotation::SwAnnotationWin * SwPostItMgr::GetAnnotationWin ( const SwPostItField pField) const

Definition at line 1782 of file PostItMgr.cxx.

References mvPostItFields.

Referenced by SetShadowState().

sw::annotation::SwAnnotationWin * SwPostItMgr::GetAnnotationWin ( const sal_uInt32  nPostItId) const

Definition at line 1792 of file PostItMgr.cxx.

References mvPostItFields.

const OUString& SwPostItMgr::GetAnswerText ( ) const

Definition at line 259 of file PostItMgr.hxx.

Referenced by SwWrtShell::InsertPostIt().

Color SwPostItMgr::GetArrowColor ( sal_uInt16  aDirection,
tools::ULong  aPage 
) const
tools::Rectangle SwPostItMgr::GetBottomScrollRect ( const tools::ULong  aPage) const
Color SwPostItMgr::GetColorAnchor ( std::size_t  aAuthorIndex)
Color SwPostItMgr::GetColorDark ( std::size_t  aAuthorIndex)
Color SwPostItMgr::GetColorLight ( std::size_t  aAuthorIndex)
sal_Int32 SwPostItMgr::GetInitialAnchorDistance ( ) const
sal_Int32 SwPostItMgr::GetMinimumSizeWithMeta ( ) const
tools::Long SwPostItMgr::GetNextBorder ( )
SwAnnotationWin * SwPostItMgr::GetNextPostIt ( sal_uInt16  aDirection,
sw::annotation::SwAnnotationWin aPostIt 
sal_Int32 SwPostItMgr::GetScrollSize ( ) const
tools::ULong SwPostItMgr::GetSidebarBorderWidth ( bool  bPx = false) const
sal_Int32 SwPostItMgr::GetSidebarScrollerHeight ( ) const
tools::ULong SwPostItMgr::GetSidebarWidth ( bool  bPx = false) const
SwAnnotationWin * SwPostItMgr::GetSidebarWin ( const SfxBroadcaster pBroadcaster) const
vcl::Window * SwPostItMgr::GetSidebarWinForFrameByIndex ( const SwFrame rFrame,
const sal_Int32  nIndex 
sal_Int32 SwPostItMgr::GetSpaceBetween ( ) const
tools::Rectangle SwPostItMgr::GetTopScrollRect ( const tools::ULong  aPage) const
void SwPostItMgr::GrabFocusOnActiveSidebarWin ( )

Definition at line 2377 of file PostItMgr.cxx.

References vcl::Window::GrabFocus(), HasActiveSidebarWin(), and mpActivePostIt.

Referenced by SwEditWin::GetFocus().

bool SwPostItMgr::HasActiveAnnotationWin ( ) const

Definition at line 2371 of file PostItMgr.cxx.

References HasActiveSidebarWin(), and mpActivePostIt.

Referenced by SwAnnotationShell::GetNoteState().

bool SwPostItMgr::HasActiveSidebarWin ( ) const
bool SwPostItMgr::HasFrameConnectedSidebarWins ( const SwFrame rFrame)
bool SwPostItMgr::HasNotes ( ) const
bool SwPostItMgr::HasScrollbars ( ) const

Definition at line 657 of file PostItMgr.cxx.

References mvPostItFields.

Referenced by CalcRects().

void SwPostItMgr::Hide ( std::u16string_view  rAuthor)
void SwPostItMgr::Hide ( )

Definition at line 1753 of file PostItMgr.cxx.

References mvPostItFields.

void SwPostItMgr::HideActiveSidebarWin ( )

Definition at line 2401 of file PostItMgr.cxx.

References HasActiveSidebarWin(), vcl::Window::Hide(), and mpActivePostIt.

SwSidebarItem * SwPostItMgr::InsertItem ( SfxBroadcaster pItem,
bool  bCheckExistence,
bool  bFocus 

Definition at line 283 of file PostItMgr.cxx.

References mbLayout, mvPostItFields, and SfxListener::StartListening().

Referenced by AddPostIts(), and Notify().

OutlinerParaObject* SwPostItMgr::IsAnswer ( )
bool SwPostItMgr::IsHit ( const Point aPointPixel)
vcl::Window * SwPostItMgr::IsHitSidebarWindow ( const Point rPointLogic)

Get the matching window that is responsible for handling mouse events of rPointLogic, if any.

Definition at line 1972 of file PostItMgr.cxx.

References vcl::Window::EnableMapMode(), HasNotes(), sw::annotation::SwAnnotationWin::IsHitWindow(), vcl::Window::IsMapModeEnabled(), mpEditWin, SwSidebarItem::mpPostIt, mvPostItFields, and ShowNotes().

bool SwPostItMgr::IsShowAnchor ( ) const

Definition at line 193 of file PostItMgr.hxx.

bool SwPostItMgr::LayoutByPage ( std::vector< sw::annotation::SwAnnotationWin * > &  aVisiblePostItList,
const tools::Rectangle rBorder,
tools::Long  lNeededHeight 
void SwPostItMgr::LayoutPostIts ( )

Definition at line 695 of file PostItMgr.cxx.

References SwRect::Bottom(), BROWSE_MODE, sw::annotation::SwAnnotationWin::CalcParent(), sw::annotation::SwAnnotationWin::ChangeSidebarItem(), CheckForRemovedPostIts(), vcl::Window::EnableMapMode(), IDocumentSettingAccess::get(), GetColorAnchor(), SwView::GetEditWin(), SwViewShell::getIDocumentRedlineAccess(), SwViewShell::getIDocumentSettingAccess(), GetInitialAnchorDistance(), SwViewShell::GetLayout(), sw::annotation::SwAnnotationWin::GetMetaHeight(), sw::annotation::SwAnnotationWin::GetMinimumSizeWithoutMeta(), sw::annotation::SwAnnotationWin::GetPostItTextHeight(), GetScrollSize(), GetSidebarBorderWidth(), GetSidebarScrollerHeight(), GetSidebarWidth(), SwSidebarItem::GetSidebarWindow(), GetSpaceBetween(), vcl::Window::GrabFocus(), sw::annotation::SwAnnotationWin::HideNote(), sw::annotation::SwAnnotationWin::InitAnswer(), sw::annotation::SwAnnotationWin::InitControls(), vcl::Window::Invalidate(), comphelper::LibreOfficeKit::isActive(), sw::annotation::SwAnnotationWin::IsFollow(), vcl::Window::IsMapModeEnabled(), comphelper::LibreOfficeKit::isTiledAnnotations(), comphelper::LibreOfficeKit::isTiledPainting(), LayoutByPage(), sw::sidebarwindows::LEFT, SwRect::Left(), vcl::Window::LogicToPixel(), SwSidebarItem::maLayoutInfo, SwSidebarItem::mbFocus, mbLayout, mbLayouting, mbReadOnly, SwSidebarItem::mbShow, mbWaitingForCalcRects, SwSidebarItem::mLayoutStatus, SwLayoutInfo::mPagePrtArea, mPages, mpAnswer, mpEditWin, SwLayoutInfo::mPosition, SwSidebarItem::mpPostIt, mpView, mpWrtShell, SwLayoutInfo::mRedlineAuthor, mvPostItFields, vcl::Window::PixelToLogic(), Point, std::optional< OutlinerParaObject >::reset(), sw::sidebarwindows::RIGHT, SwRect::Right(), SetActiveSidebarWin(), sw::annotation::SwAnnotationWin::SetChangeTracking(), sw::annotation::SwAnnotationWin::SetFollow(), sw::annotation::SwAnnotationWin::SetPosSizePixelRect(), sw::annotation::SwAnnotationWin::SetReadonly(), sw::annotation::SwAnnotationWin::SetSidebarPosition(), comphelper::LibreOfficeKit::setTiledPainting(), ShowNotes(), and Y.

Referenced by Delete(), DeleteCommentThread(), FormatAll(), Hide(), SwViewShell::PrintOrPDFExport(), Show(), ShowHideResolvedNotes(), ToggleResolved(), sw::annotation::SwAnnotationWin::ToggleResolvedForThread(), ToggleResolvedForThread(), and SwViewShell::VisPortChgd().

void SwPostItMgr::MakeVisible ( const sw::annotation::SwAnnotationWin pPostIt)
void SwPostItMgr::Notify ( SfxBroadcaster rBC,
const SfxHint rHint 
void SwPostItMgr::PaintTile ( OutputDevice rRenderContext)
void SwPostItMgr::PreparePageContainer ( )
void SwPostItMgr::PrepareView ( bool  bIgnoreCount = false)
void SwPostItMgr::RegisterAnswer ( const OutlinerParaObject pAnswer)

Definition at line 256 of file PostItMgr.hxx.

References std::optional< OutlinerParaObject >::reset().

void SwPostItMgr::RegisterAnswerText ( const OUString &  aAnswerText)

Definition at line 258 of file PostItMgr.hxx.

Referenced by SwWrtShell::InsertPostIt().

void SwPostItMgr::RemoveItem ( SfxBroadcaster pBroadcast)
void SwPostItMgr::RemoveSidebarWin ( )

Definition at line 1323 of file PostItMgr.cxx.

References SfxListener::EndListening(), mvPostItFields, and PreparePageContainer().

Referenced by ~SwPostItMgr().

sal_uInt16 SwPostItMgr::Replace ( SvxSearchItem const *  pItem)
void SwPostItMgr::Rescale ( )

Definition at line 2235 of file PostItMgr.cxx.

References mvPostItFields.

Referenced by SwViewShell::VisPortChgd().

void SwPostItMgr::Scroll ( const tools::Long  lScroll,
const tools::ULong  aPage 
bool SwPostItMgr::ScrollbarHit ( const tools::ULong  aPage,
const Point aPoint 
sal_uInt16 SwPostItMgr::SearchReplace ( const SwFormatField pField,
const i18nutil::SearchOptions2 rSearchOptions,
bool  bSrchForward 
void SwPostItMgr::SetActiveSidebarWin ( sw::annotation::SwAnnotationWin p)
void SwPostItMgr::SetLayout ( )
void SwPostItMgr::SetReadOnlyState ( )

Definition at line 2279 of file PostItMgr.cxx.

References mbReadOnly, and mvPostItFields.

Referenced by Notify().

void SwPostItMgr::SetShadowState ( const SwPostItField pField,
bool  bCursor = true 
void SwPostItMgr::SetSpellChecking ( )

Definition at line 2272 of file PostItMgr.cxx.

References mvPostItFields.

Referenced by SwView::ExecViewOptions().

void SwPostItMgr::Show ( )

Definition at line 1763 of file PostItMgr.cxx.

References LayoutPostIts(), and mvPostItFields.

Referenced by SwContentTree::ExecuteContextMenuAction().

void SwPostItMgr::ShowHideResolvedNotes ( bool  visible)

Definition at line 2484 of file PostItMgr.cxx.

References LayoutPostIts(), and mPages.

Referenced by SwView::ExecViewOptions().

bool SwPostItMgr::ShowNotes ( ) const
bool SwPostItMgr::ShowScrollbar ( const tools::ULong  aPage) const

Definition at line 1935 of file PostItMgr.cxx.

References mbWaitingForCalcRects, and mPages.

void SwPostItMgr::ToggleInsModeOnActiveSidebarWin ( )
void SwPostItMgr::ToggleResolved ( sal_uInt32  nPostItId)
void SwPostItMgr::ToggleResolvedForThread ( sal_uInt32  nPostItId)
void SwPostItMgr::UpdateDataOnActiveSidebarWin ( )
void SwPostItMgr::UpdateResolvedStatus ( const sw::annotation::SwAnnotationWin topNote)

Member Data Documentation

OUString SwPostItMgr::maAnswerText

Definition at line 142 of file PostItMgr.hxx.

bool SwPostItMgr::mbDeleteNote

Definition at line 139 of file PostItMgr.hxx.

Referenced by Notify().

bool SwPostItMgr::mbIsShowAnchor

Definition at line 143 of file PostItMgr.hxx.

Referenced by SwPostItMgr().

bool SwPostItMgr::mbLayout
tools::Long SwPostItMgr::mbLayoutHeight

Definition at line 136 of file PostItMgr.hxx.

Referenced by CalcRects().

bool SwPostItMgr::mbLayouting

Definition at line 137 of file PostItMgr.hxx.

Referenced by CorrectPositions(), and LayoutPostIts().

bool SwPostItMgr::mbReadOnly

Definition at line 138 of file PostItMgr.hxx.

Referenced by LayoutPostIts(), Notify(), and SetReadOnlyState().

bool SwPostItMgr::mbWaitingForCalcRects
ImplSVEvent* SwPostItMgr::mnEventId

Definition at line 132 of file PostItMgr.hxx.

Referenced by CalcRects(), Notify(), SwPostItMgr(), and ~SwPostItMgr().

VclPtr<sw::annotation::SwAnnotationWin> SwPostItMgr::mpActivePostIt
std::vector<std::unique_ptr<SwPostItPageItem> > SwPostItMgr::mPages
std::optional<OutlinerParaObject> SwPostItMgr::mpAnswer

Definition at line 141 of file PostItMgr.hxx.

Referenced by LayoutPostIts().

VclPtr<SwEditWin> SwPostItMgr::mpEditWin
std::unique_ptr<sw::sidebarwindows::SwFrameSidebarWinContainer> SwPostItMgr::mpFrameSidebarWinContainer
SwView* SwPostItMgr::mpView
SwWrtShell* SwPostItMgr::mpWrtShell
FieldShadowState SwPostItMgr::mShadowState

Definition at line 140 of file PostItMgr.hxx.

Referenced by SetActiveSidebarWin(), and SetShadowState().

std::vector<std::unique_ptr<SwSidebarItem> > SwPostItMgr::mvPostItFields

The documentation for this class was generated from the following files: