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 Reference

#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 unsigned long aPage) const
bool HasNotes () const
bool ShowNotes () const
bool IsShowAnchor ()
unsigned long GetSidebarWidth (bool bPx=false) const
unsigned long 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 ExecuteFormatAllDialog (SwView &rView)
void FormatAll (const SfxItemSet &rNewAttr)
void Hide (const OUString &rAuthor)
void Hide ()
void Show ()
void Rescale ()
tools::Rectangle GetBottomScrollRect (const unsigned long aPage) const
tools::Rectangle GetTopScrollRect (const unsigned long 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, unsigned long 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)
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 (OutlinerParaObject *pAnswer)
OutlinerParaObjectIsAnswer ()
void RegisterAnswerText (const OUString &aAnswerText)
const OUString & GetAnswerText ()
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 long lScroll, const unsigned long aPage)
void AutoScroll (const sw::annotation::SwAnnotationWin *pPostIt, const unsigned long aPage)
bool ScrollbarHit (const unsigned long aPage, const Point &aPoint)
bool LayoutByPage (std::vector< sw::annotation::SwAnnotationWin * > &aVisiblePostItList, const tools::Rectangle &rBorder, long lNeededHeight)
void CheckForRemovedPostIts ()
bool ArrowEnabled (sal_uInt16 aDirection, unsigned long aPage) const
bool BorderOverPageBorder (unsigned long aPage) const
bool HasScrollbars () const
void Focus (SfxBroadcaster &rBC)
sal_Int32 GetInitialAnchorDistance () const
sal_Int32 GetScrollSize () const
sal_Int32 GetSpaceBetween () const
void SetReadOnlyState ()
 DECL_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
long mbLayoutHeight
bool mbLayouting
bool mbReadOnly
bool mbDeleteNote
FieldShadowState mShadowState
OUString maAnswerText
bool mbIsShowAnchor
std::unique_ptr< sw::sidebarwindows::SwFrameSidebarWinContainermpFrameSidebarWinContainer

Detailed Description

Definition at line 127 of file PostItMgr.hxx.

Member Typedef Documentation

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

Definition at line 181 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,
unsigned long  aPage 
) const

Definition at line 1092 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 unsigned long  aPage 
const_iterator SwPostItMgr::begin ( ) const

Definition at line 182 of file PostItMgr.hxx.

Referenced by SwContentType::FillMemberList(), and SwContentType::Init().

bool SwPostItMgr::BorderOverPageBorder ( unsigned long  aPage) const
bool SwPostItMgr::CalcRects ( )
void SwPostItMgr::CheckForRemovedPostIts ( )
void SwPostItMgr::CheckMetaText ( )

Definition at line 2204 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 ( )
SwPostItMgr::DECL_LINK ( CalcHdl  ,
void ,
void SwPostItMgr::Delete ( const OUString &  aAuthor)
void SwPostItMgr::Delete ( sal_uInt32  nPostItId)
void SwPostItMgr::Delete ( )
void SwPostItMgr::DeleteActiveSidebarWin ( )
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 183 of file PostItMgr.hxx.

Referenced by SwContentType::FillMemberList(), and SwContentType::Init().

void SwPostItMgr::ExecuteFormatAllDialog ( SwView rView)
sal_uInt16 SwPostItMgr::FinishSearchReplace ( const i18nutil::SearchOptions2 rSearchOptions,
bool  bSrchForward 
void SwPostItMgr::Focus ( 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 1700 of file PostItMgr.cxx.

References mvPostItFields.

Referenced by SetShadowState().

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

Definition at line 1710 of file PostItMgr.cxx.

References mvPostItFields.

const OUString& SwPostItMgr::GetAnswerText ( )

Definition at line 256 of file PostItMgr.hxx.

References maAnswerText.

Color SwPostItMgr::GetArrowColor ( sal_uInt16  aDirection,
unsigned long  aPage 
) const
tools::Rectangle SwPostItMgr::GetBottomScrollRect ( const unsigned long  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
long SwPostItMgr::GetNextBorder ( )
SwAnnotationWin * SwPostItMgr::GetNextPostIt ( sal_uInt16  aDirection,
sw::annotation::SwAnnotationWin aPostIt 

Definition at line 1720 of file PostItMgr.cxx.

References i, KEY_PAGEUP, and mvPostItFields.

Referenced by sw::annotation::SwAnnotationWin::InitAnswer().

sal_Int32 SwPostItMgr::GetScrollSize ( ) const
unsigned long SwPostItMgr::GetSidebarBorderWidth ( bool  bPx = false) const
sal_Int32 SwPostItMgr::GetSidebarScrollerHeight ( ) const
unsigned long SwPostItMgr::GetSidebarWidth ( bool  bPx = false) const
SwAnnotationWin * SwPostItMgr::GetSidebarWin ( const SfxBroadcaster pBroadcaster) const

Definition at line 1690 of file PostItMgr.cxx.

References mvPostItFields.

Referenced by SearchReplace().

vcl::Window * SwPostItMgr::GetSidebarWinForFrameByIndex ( const SwFrame rFrame,
const sal_Int32  nIndex 
sal_Int32 SwPostItMgr::GetSpaceBetween ( ) const
tools::Rectangle SwPostItMgr::GetTopScrollRect ( const unsigned long  aPage) const
void SwPostItMgr::GrabFocusOnActiveSidebarWin ( )

Definition at line 2295 of file PostItMgr.cxx.

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

Referenced by SwEditWin::GetFocus().

bool SwPostItMgr::HasActiveAnnotationWin ( ) const

Definition at line 2289 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 638 of file PostItMgr.cxx.

References mvPostItFields.

Referenced by CalcRects().

void SwPostItMgr::Hide ( const OUString &  rAuthor)
void SwPostItMgr::Hide ( )

Definition at line 1672 of file PostItMgr.cxx.

References mvPostItFields.

void SwPostItMgr::HideActiveSidebarWin ( )

Definition at line 2319 of file PostItMgr.cxx.

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

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

Definition at line 279 of file PostItMgr.cxx.

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

Referenced by AddPostIts(), and Notify().

OutlinerParaObject* SwPostItMgr::IsAnswer ( )

Definition at line 254 of file PostItMgr.hxx.

References mpAnswer.

Referenced by sw::annotation::SwAnnotationWin::MoveCaret().

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 1890 of file PostItMgr.cxx.

References OutputDevice::EnableMapMode(), HasNotes(), sw::annotation::SwAnnotationWin::IsHitWindow(), OutputDevice::IsMapModeEnabled(), mpEditWin, mvPostItFields, SwSidebarItem::pPostIt, and ShowNotes().

bool SwPostItMgr::IsShowAnchor ( )

Definition at line 195 of file PostItMgr.hxx.

References mbIsShowAnchor.

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

Definition at line 676 of file PostItMgr.cxx.

References SwSidebarItem::bFocus, SwRect::Bottom(), BROWSE_MODE, SwSidebarItem::bShow, sw::annotation::SwAnnotationWin::CalcParent(), sw::annotation::SwAnnotationWin::ChangeSidebarItem(), CheckForRemovedPostIts(), OutputDevice::EnableMapMode(), VclPtr< reference_type >::get(), 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(), OutputDevice::IsMapModeEnabled(), comphelper::LibreOfficeKit::isTiledAnnotations(), comphelper::LibreOfficeKit::isTiledPainting(), LayoutByPage(), sw::sidebarwindows::LEFT, SwRect::Left(), OutputDevice::LogicToPixel(), SwSidebarItem::maLayoutInfo, mbLayout, mbLayouting, mbReadOnly, mbWaitingForCalcRects, SwSidebarItem::mLayoutStatus, SwLayoutInfo::mPagePrtArea, mPages, mpAnswer, mpEditWin, SwLayoutInfo::mPosition, mpView, mpWrtShell, SwLayoutInfo::mRedlineAuthor, mvPostItFields, OutputDevice::PixelToLogic(), SwSidebarItem::pPostIt, 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(), Point::X(), Point::Y(), and Y.

Referenced by Delete(), FormatAll(), Hide(), SwViewShell::PrintOrPDFExport(), Show(), 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 ( OutlinerParaObject pAnswer)

Definition at line 253 of file PostItMgr.hxx.

void SwPostItMgr::RegisterAnswerText ( const OUString &  aAnswerText)

Definition at line 255 of file PostItMgr.hxx.

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

Definition at line 1321 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 2153 of file PostItMgr.cxx.

References mvPostItFields.

Referenced by SwViewShell::VisPortChgd().

void SwPostItMgr::Scroll ( const long  lScroll,
const unsigned long  aPage 
bool SwPostItMgr::ScrollbarHit ( const unsigned long  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 2197 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 2190 of file PostItMgr.cxx.

References mvPostItFields.

Referenced by SwView::ExecViewOptions().

void SwPostItMgr::Show ( )

Definition at line 1681 of file PostItMgr.cxx.

References LayoutPostIts(), and mvPostItFields.

Referenced by SwContentTree::ExecuteContextMenuAction().

bool SwPostItMgr::ShowNotes ( ) const
bool SwPostItMgr::ShowScrollbar ( const unsigned long  aPage) const

Definition at line 1853 of file PostItMgr.cxx.

References mbWaitingForCalcRects, and mPages.

void SwPostItMgr::ToggleInsModeOnActiveSidebarWin ( )
void SwPostItMgr::UpdateDataOnActiveSidebarWin ( )

Member Data Documentation

OUString SwPostItMgr::maAnswerText

Definition at line 145 of file PostItMgr.hxx.

Referenced by GetAnswerText().

bool SwPostItMgr::mbDeleteNote

Definition at line 142 of file PostItMgr.hxx.

Referenced by Notify().

bool SwPostItMgr::mbIsShowAnchor

Definition at line 146 of file PostItMgr.hxx.

Referenced by IsShowAnchor(), and SwPostItMgr().

bool SwPostItMgr::mbLayout

Definition at line 138 of file PostItMgr.hxx.

Referenced by Delete(), FormatAll(), InsertItem(), LayoutPostIts(), Notify(), and RemoveItem().

long SwPostItMgr::mbLayoutHeight

Definition at line 139 of file PostItMgr.hxx.

Referenced by CalcRects().

bool SwPostItMgr::mbLayouting

Definition at line 140 of file PostItMgr.hxx.

Referenced by CorrectPositions(), and LayoutPostIts().

bool SwPostItMgr::mbReadOnly

Definition at line 141 of file PostItMgr.hxx.

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

bool SwPostItMgr::mbWaitingForCalcRects
ImplSVEvent* SwPostItMgr::mnEventId

Definition at line 135 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
OutlinerParaObject* SwPostItMgr::mpAnswer

Definition at line 144 of file PostItMgr.hxx.

Referenced by IsAnswer(), and 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 143 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: