LibreOffice Module sd (master) 1
|
#include <annotationmanagerimpl.hxx>
Public Member Functions | |
AnnotationManagerImpl (ViewShellBase &rViewShellBase) | |
void | init () |
virtual void | disposing (std::unique_lock< std::mutex > &) override |
virtual void SAL_CALL | notifyEvent (const css::document::EventObject &Event) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) override |
void | ExecuteAnnotation (SfxRequest const &rRequest) |
void | GetAnnotationState (SfxItemSet &rItemSet) |
void | ExecuteInsertAnnotation (SfxRequest const &rReq) |
void | ExecuteDeleteAnnotation (SfxRequest const &rReq) |
void | ExecuteEditAnnotation (SfxRequest const &rReq) |
void | ExecuteReplyToAnnotation (SfxRequest const &rReq) |
void | SelectNextAnnotation (bool bForward) |
void | SelectAnnotation (const css::uno::Reference< css::office::XAnnotation > &xAnnotation, bool bEdit=false) |
void | GetSelectedAnnotation (css::uno::Reference< css::office::XAnnotation > &xAnnotation) |
void | InsertAnnotation (const OUString &rText) |
void | DeleteAnnotation (const css::uno::Reference< css::office::XAnnotation > &xAnnotation) |
void | DeleteAnnotationsByAuthor (std::u16string_view sAuthor) |
void | DeleteAllAnnotations () |
void | ExecuteAnnotationTagContextMenu (const css::uno::Reference< css::office::XAnnotation > &xAnnotation, weld::Widget *pParent, const ::tools::Rectangle &rContextRect) |
void | onTagSelected (AnnotationTag const &rTag) |
void | onTagDeselected (AnnotationTag const &rTag) |
void | onSelectionChanged () |
void | addListener () |
void | removeListener () |
void | invalidateSlots () |
DECL_LINK (EventMultiplexerListener, tools::EventMultiplexerEvent &, void) | |
DECL_LINK (UpdateTagsHdl, void *, void) | |
void | UpdateTags (bool bSynchron=false) |
void | CreateTags () |
void | DisposeTags () |
SdPage * | GetNextPage (SdPage const *pPage, bool bForward) |
SdPage * | GetCurrentPage () |
SdDrawDocument * | GetDoc () |
void | ShowAnnotations (bool bShow) |
Public Member Functions inherited from comphelper::WeakComponentImplHelper< typename... Ifc > | |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual void SAL_CALL | dispose () noexcept final override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
Public Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
virtual | ~WeakComponentImplHelperBase () override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual void | disposing (std::unique_lock< std::mutex > &) |
Public Member Functions inherited from comphelper::UnoImplBase | |
virtual | ~UnoImplBase () |
Static Public Member Functions | |
static Color | GetColorDark (sal_uInt16 aAuthorIndex) |
static Color | GetColorLight (sal_uInt16 aAuthorIndex) |
static Color | GetColor (sal_uInt16 aAuthorIndex) |
Private Member Functions | |
css::uno::Reference< css::office::XAnnotation > | GetAnnotationById (sal_uInt32 nAnnotationId) |
Private Attributes | |
ViewShellBase & | mrBase |
SdDrawDocument * | mpDoc |
std::vector< rtl::Reference< AnnotationTag > > | maTagVector |
css::uno::Reference< css::drawing::XDrawView > | mxView |
css::uno::Reference< css::office::XAnnotationAccess > | mxCurrentPage |
css::uno::Reference< css::office::XAnnotation > | mxSelectedAnnotation |
bool | mbShowAnnotations |
ImplSVEvent * | mnUpdateTagsEvent |
vcl::Font | maFont |
Additional Inherited Members | |
Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
void | throwIfDisposed (std::unique_lock< std::mutex > &) |
Protected Attributes inherited from comphelper::WeakComponentImplHelperBase | |
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > | maEventListeners |
Protected Attributes inherited from comphelper::UnoImplBase | |
std::mutex | m_aMutex |
bool | m_bDisposed |
Definition at line 52 of file annotationmanagerimpl.hxx.
|
explicit |
Definition at line 162 of file annotationmanager.cxx.
References SdDrawDocument::GetDocumentType(), SdOptionsMisc::IsShowComments(), mbShowAnnotations, mpDoc, and SD_MOD.
void sd::AnnotationManagerImpl::addListener | ( | ) |
Definition at line 998 of file annotationmanager.cxx.
References sd::ViewShellBase::GetEventMultiplexer(), LINK, and mrBase.
Referenced by init().
void sd::AnnotationManagerImpl::CreateTags | ( | ) |
Definition at line 941 of file annotationmanager.cxx.
References Exception, SdDrawDocument::GetAnnotationAuthorIndex(), StyleSettings::GetAppFont(), GetColorLight(), sd::ViewShellBase::GetMainViewShell(), Application::GetSettings(), AllSettings::GetStyleSettings(), maFont, maTagVector, mpDoc, mrBase, mxCurrentPage, mxSelectedAnnotation, nIndex, and TOOLS_WARN_EXCEPTION.
sd::AnnotationManagerImpl::DECL_LINK | ( | EventMultiplexerListener | , |
tools::EventMultiplexerEvent & | , | ||
void | |||
) |
sd::AnnotationManagerImpl::DECL_LINK | ( | UpdateTagsHdl | , |
void * | , | ||
void | |||
) |
void sd::AnnotationManagerImpl::DeleteAllAnnotations | ( | ) |
Definition at line 664 of file annotationmanager.cxx.
References SdrModel::BegUndo(), SdrModel::EndUndo(), SdPage::getAnnotations(), GetNextPage(), SdrModel::IsUndoEnabled(), mpDoc, mxSelectedAnnotation, SdPage::removeAnnotation(), and SdResId().
Referenced by ExecuteDeleteAnnotation().
void sd::AnnotationManagerImpl::DeleteAnnotation | ( | const css::uno::Reference< css::office::XAnnotation > & | xAnnotation | ) |
Definition at line 617 of file annotationmanager.cxx.
References SdrModel::BegUndo(), SdrModel::EndUndo(), GetCurrentPage(), SdrModel::IsUndoEnabled(), mpDoc, SdPage::removeAnnotation(), SdResId(), and UpdateTags().
Referenced by ExecuteDeleteAnnotation(), and sd::AnnotationTag::KeyInput().
void sd::AnnotationManagerImpl::DeleteAnnotationsByAuthor | ( | std::u16string_view | sAuthor | ) |
Definition at line 635 of file annotationmanager.cxx.
References SdrModel::BegUndo(), SdrModel::EndUndo(), SdPage::getAnnotations(), GetNextPage(), SdrModel::IsUndoEnabled(), mpDoc, mxSelectedAnnotation, SdPage::removeAnnotation(), and SdResId().
Referenced by ExecuteDeleteAnnotation().
void sd::AnnotationManagerImpl::DisposeTags | ( | ) |
Definition at line 988 of file annotationmanager.cxx.
References maTagVector.
Referenced by disposing().
|
overridevirtual |
Definition at line 247 of file annotationmanager.cxx.
|
overridevirtual |
Reimplemented from comphelper::WeakComponentImplHelperBase.
Definition at line 198 of file annotationmanager.cxx.
References DisposeTags(), Exception, sd::ViewShellBase::GetDocShell(), SfxObjectShell::GetModel(), mnUpdateTagsEvent, mrBase, mxCurrentPage, mxView, removeListener(), Application::RemoveUserEvent(), and xModel.
void sd::AnnotationManagerImpl::ExecuteAnnotation | ( | SfxRequest const & | rRequest | ) |
Definition at line 288 of file annotationmanager.cxx.
References ExecuteDeleteAnnotation(), ExecuteEditAnnotation(), ExecuteInsertAnnotation(), ExecuteReplyToAnnotation(), SfxRequest::GetSlot(), mbShowAnnotations, SelectNextAnnotation(), and ShowAnnotations().
void sd::AnnotationManagerImpl::ExecuteAnnotationTagContextMenu | ( | const css::uno::Reference< css::office::XAnnotation > & | xAnnotation, |
weld::Widget * | pParent, | ||
const ::tools::Rectangle & | rContextRect | ||
) |
Definition at line 1034 of file annotationmanager.cxx.
References Any, aStr, bReadOnly, Application::CreateBuilder(), SfxDispatcher::Execute(), SfxDispatcher::ExecuteList(), sd::getDispatcher(), sd::ViewShellBase::GetDocShell(), SvtUserOptions::GetFullName(), SfxObjectShell::IsReadOnly(), mrBase, SdResId(), and sId.
Referenced by sd::AnnotationTag::Command().
void sd::AnnotationManagerImpl::ExecuteDeleteAnnotation | ( | SfxRequest const & | rReq | ) |
Definition at line 334 of file annotationmanager.cxx.
References DeleteAllAnnotations(), DeleteAnnotation(), DeleteAnnotationsByAuthor(), GetAnnotationById(), SfxRequest::GetArgs(), SfxItemSet::GetItemState(), GetSelectedAnnotation(), SfxRequest::GetSlot(), GetValue, nId, ShowAnnotations(), and UpdateTags().
Referenced by ExecuteAnnotation().
void sd::AnnotationManagerImpl::ExecuteEditAnnotation | ( | SfxRequest const & | rReq | ) |
Definition at line 382 of file annotationmanager.cxx.
References SdrModel::BegUndo(), convertTwipToMm100(), sd::CreateChangeUndo(), SdrModel::EndUndo(), GetAnnotationById(), SfxRequest::GetArgs(), SfxItemSet::GetItemIfSet(), SdrModel::IsUndoEnabled(), sd::LOKCommentNotifyAll(), sd::Modify, mpDoc, nId, SdResId(), and UpdateTags().
Referenced by ExecuteAnnotation().
void sd::AnnotationManagerImpl::ExecuteInsertAnnotation | ( | SfxRequest const & | rReq | ) |
Definition at line 316 of file annotationmanager.cxx.
References SfxRequest::GetArgs(), SfxItemSet::GetItemIfSet(), InsertAnnotation(), comphelper::LibreOfficeKit::isActive(), comphelper::LibreOfficeKit::isTiledAnnotations(), and ShowAnnotations().
Referenced by ExecuteAnnotation().
void sd::AnnotationManagerImpl::ExecuteReplyToAnnotation | ( | SfxRequest const & | rReq | ) |
Definition at line 531 of file annotationmanager.cxx.
References aStr, Outliner::CreateParaObject(), EE_CHAR_ITALIC(), EE_PARA_APPEND, GetAnnotationById(), sd::getAnnotationDateTimeString(), sd::GetAnnotationPool(), SfxRequest::GetArgs(), sd::getCurrentDateTime(), Outliner::GetEmptyItemSet(), SvtUserOptions::GetFullName(), SvtUserOptions::GetID(), SfxItemSet::GetItemState(), sd::ViewShellBase::GetMainViewShell(), Outliner::GetParagraph(), Outliner::GetParagraphCount(), SfxRequest::GetSlot(), sd::TextApiObject::GetText(), Outliner::GetText(), sd::getTextApiObject(), GetValue, Outliner::Insert(), comphelper::LibreOfficeKit::isActive(), ITALIC_NORMAL, sd::LOKCommentNotifyAll(), sd::Modify, mrBase, ESelection::nEndPara, ESelection::nEndPos, SfxItemSet::Put(), Outliner::QuickSetAttribs(), SdResId(), SelectAnnotation(), SdDrawDocument::SetCalcFieldValueHdl(), sd::TextApiObject::SetText(), Outliner::SetUpdateLayout(), sQuote, and UpdateTags().
Referenced by ExecuteAnnotation().
|
private |
Definition at line 251 of file annotationmanager.cxx.
References SdPage::getAnnotations(), and GetNextPage().
Referenced by ExecuteDeleteAnnotation(), ExecuteEditAnnotation(), and ExecuteReplyToAnnotation().
void sd::AnnotationManagerImpl::GetAnnotationState | ( | SfxItemSet & | rItemSet | ) |
Definition at line 692 of file annotationmanager.cxx.
References bReadOnly, SfxItemSet::DisableItem(), SdPage::getAnnotations(), GetCurrentPage(), sd::ViewShellBase::GetDocShell(), GetNextPage(), GetODFSaneDefaultVersion(), SdPage::GetPageKind(), GetSelectedAnnotation(), comphelper::LibreOfficeKit::isActive(), SfxObjectShell::IsReadOnly(), mbShowAnnotations, mrBase, SvtSaveOptions::ODFSVER_012, SfxItemSet::Put(), rSet, and Standard.
|
static |
Definition at line 1088 of file annotationmanager.cxx.
References COL_AUTHOR1_NORMAL(), COL_AUTHOR2_NORMAL(), COL_AUTHOR3_NORMAL(), COL_AUTHOR4_NORMAL(), COL_AUTHOR5_NORMAL(), COL_AUTHOR6_NORMAL(), COL_AUTHOR7_NORMAL(), COL_AUTHOR8_NORMAL(), COL_AUTHOR9_NORMAL(), COL_WHITE(), Application::GetSettings(), and SAL_N_ELEMENTS.
Referenced by sd::AnnotationWindow::SetColor().
|
static |
Definition at line 1118 of file annotationmanager.cxx.
References COL_AUTHOR1_DARK(), COL_AUTHOR2_DARK(), COL_AUTHOR3_DARK(), COL_AUTHOR4_DARK(), COL_AUTHOR5_DARK(), COL_AUTHOR6_DARK(), COL_AUTHOR7_DARK(), COL_AUTHOR8_DARK(), COL_AUTHOR9_DARK(), COL_WHITE(), Application::GetSettings(), and SAL_N_ELEMENTS.
Referenced by sd::AnnotationWindow::SetColor().
|
static |
Definition at line 1103 of file annotationmanager.cxx.
References COL_AUTHOR1_LIGHT(), COL_AUTHOR2_LIGHT(), COL_AUTHOR3_LIGHT(), COL_AUTHOR4_LIGHT(), COL_AUTHOR5_LIGHT(), COL_AUTHOR6_LIGHT(), COL_AUTHOR7_LIGHT(), COL_AUTHOR8_LIGHT(), COL_AUTHOR9_LIGHT(), COL_WHITE(), Application::GetSettings(), and SAL_N_ELEMENTS.
Referenced by CreateTags(), and sd::AnnotationWindow::SetColor().
SdPage * sd::AnnotationManagerImpl::GetCurrentPage | ( | ) |
Definition at line 1190 of file annotationmanager.cxx.
References sd::ViewShellBase::GetMainViewShell(), and mrBase.
Referenced by DeleteAnnotation(), GetAnnotationState(), InsertAnnotation(), and SelectNextAnnotation().
|
inline |
Definition at line 112 of file annotationmanagerimpl.hxx.
References mpDoc.
Referenced by sd::AnnotationTag::Move().
Definition at line 1133 of file annotationmanager.cxx.
References SdDrawDocument::GetDocumentType(), SdDrawDocument::GetMasterSdPage(), SdDrawDocument::GetMasterSdPageCount(), SdrPage::GetPageNum(), SdDrawDocument::GetSdPage(), SdDrawDocument::GetSdPageCount(), Impress, SdrPage::IsMasterPage(), mpDoc, and Standard.
Referenced by DeleteAllAnnotations(), DeleteAnnotationsByAuthor(), GetAnnotationById(), GetAnnotationState(), and SelectNextAnnotation().
void sd::AnnotationManagerImpl::GetSelectedAnnotation | ( | css::uno::Reference< css::office::XAnnotation > & | xAnnotation | ) |
Definition at line 869 of file annotationmanager.cxx.
References mxSelectedAnnotation.
Referenced by ExecuteDeleteAnnotation(), GetAnnotationState(), and SelectNextAnnotation().
void sd::AnnotationManagerImpl::init | ( | ) |
Definition at line 173 of file annotationmanager.cxx.
References addListener(), Exception, SfxViewShell::GetController(), sd::ViewShellBase::GetDocShell(), SfxObjectShell::GetModel(), mrBase, mxView, TOOLS_WARN_EXCEPTION, and xModel.
void sd::AnnotationManagerImpl::InsertAnnotation | ( | const OUString & | rText | ) |
Definition at line 437 of file annotationmanager.cxx.
References sd::Add, SdrModel::BegUndo(), SdPage::createAnnotation(), SdrModel::EndUndo(), SdPage::getAnnotations(), sd::getCurrentDateTime(), GetCurrentPage(), SvtUserOptions::GetFullName(), SvtUserOptions::GetID(), sd::ViewShellBase::GetMainViewShell(), SdrPage::GetSize(), comphelper::LibreOfficeKit::isActive(), SdrModel::IsUndoEnabled(), tools::Rectangle::Left(), sd::LOKCommentNotifyAll(), mpDoc, mrBase, tools::Rectangle::Overlaps(), SdResId(), SelectAnnotation(), tools::Rectangle::SetBottom(), tools::Rectangle::SetLeft(), tools::Rectangle::SetRight(), tools::Rectangle::SetTop(), tools::Rectangle::Top(), UpdateTags(), Size::Width(), x, and y.
Referenced by ExecuteInsertAnnotation().
void sd::AnnotationManagerImpl::invalidateSlots | ( | ) |
Definition at line 874 of file annotationmanager.cxx.
References sd::getBindings(), SfxBindings::Invalidate(), and mrBase.
Referenced by onTagDeselected(), and onTagSelected().
|
overridevirtual |
Definition at line 224 of file annotationmanager.cxx.
References aEvent, sd::LOKCommentNotify(), mrBase, sd::Remove, and UpdateTags().
void sd::AnnotationManagerImpl::onSelectionChanged | ( | ) |
Definition at line 889 of file annotationmanager.cxx.
References Exception, sd::ViewShellBase::GetDrawView(), mrBase, mxCurrentPage, mxView, TOOLS_WARN_EXCEPTION, and UpdateTags().
void sd::AnnotationManagerImpl::onTagDeselected | ( | AnnotationTag const & | rTag | ) |
Definition at line 846 of file annotationmanager.cxx.
References sd::AnnotationTag::GetAnnotation(), invalidateSlots(), and mxSelectedAnnotation.
Referenced by sd::AnnotationTag::deselect().
void sd::AnnotationManagerImpl::onTagSelected | ( | AnnotationTag const & | rTag | ) |
Definition at line 840 of file annotationmanager.cxx.
References sd::AnnotationTag::GetAnnotation(), invalidateSlots(), and mxSelectedAnnotation.
Referenced by sd::AnnotationTag::select().
void sd::AnnotationManagerImpl::removeListener | ( | ) |
Definition at line 1004 of file annotationmanager.cxx.
References sd::ViewShellBase::GetEventMultiplexer(), LINK, and mrBase.
Referenced by disposing().
void sd::AnnotationManagerImpl::SelectAnnotation | ( | const css::uno::Reference< css::office::XAnnotation > & | xAnnotation, |
bool | bEdit = false |
||
) |
Definition at line 855 of file annotationmanager.cxx.
References sd::ViewShellBase::GetMainViewShell(), maTagVector, mrBase, and mxSelectedAnnotation.
Referenced by ExecuteReplyToAnnotation(), InsertAnnotation(), and SelectNextAnnotation().
void sd::AnnotationManagerImpl::SelectNextAnnotation | ( | bool | bForward | ) |
Definition at line 741 of file annotationmanager.cxx.
References Application::CreateMessageDialog(), SfxDispatcher::Execute(), SdPage::getAnnotations(), GetCurrentPage(), sd::getDispatcher(), SdDrawDocument::GetDocumentType(), sd::ViewShellBase::GetMainViewShell(), GetNextPage(), SdrPage::GetPageNum(), GetSelectedAnnotation(), Impress, SdrPage::IsMasterPage(), MasterPage, mpDoc, mrBase, mxSelectedAnnotation, Page, RET_YES, SdResId(), SelectAnnotation(), and ShowAnnotations().
Referenced by ExecuteAnnotation(), and sd::AnnotationTag::KeyInput().
void sd::AnnotationManagerImpl::ShowAnnotations | ( | bool | bShow | ) |
Definition at line 273 of file annotationmanager.cxx.
References SdDrawDocument::GetDocumentType(), mbShowAnnotations, mpDoc, SD_MOD, SdOptionsMisc::SetShowComments(), and UpdateTags().
Referenced by ExecuteAnnotation(), ExecuteDeleteAnnotation(), ExecuteInsertAnnotation(), and SelectNextAnnotation().
void sd::AnnotationManagerImpl::UpdateTags | ( | bool | bSynchron = false | ) |
Definition at line 911 of file annotationmanager.cxx.
References LINK, mnUpdateTagsEvent, mxView, Application::PostUserEvent(), and Application::RemoveUserEvent().
Referenced by DeleteAnnotation(), ExecuteDeleteAnnotation(), ExecuteEditAnnotation(), ExecuteReplyToAnnotation(), InsertAnnotation(), notifyEvent(), onSelectionChanged(), and ShowAnnotations().
|
private |
Definition at line 128 of file annotationmanagerimpl.hxx.
Referenced by CreateTags().
|
private |
Definition at line 120 of file annotationmanagerimpl.hxx.
Referenced by CreateTags(), DisposeTags(), and SelectAnnotation().
|
private |
Definition at line 126 of file annotationmanagerimpl.hxx.
Referenced by AnnotationManagerImpl(), ExecuteAnnotation(), GetAnnotationState(), and ShowAnnotations().
|
private |
Definition at line 127 of file annotationmanagerimpl.hxx.
Referenced by disposing(), and UpdateTags().
|
private |
Definition at line 118 of file annotationmanagerimpl.hxx.
Referenced by AnnotationManagerImpl(), CreateTags(), DeleteAllAnnotations(), DeleteAnnotation(), DeleteAnnotationsByAuthor(), ExecuteEditAnnotation(), GetDoc(), GetNextPage(), InsertAnnotation(), SelectNextAnnotation(), and ShowAnnotations().
|
private |
Definition at line 117 of file annotationmanagerimpl.hxx.
Referenced by addListener(), CreateTags(), disposing(), ExecuteAnnotationTagContextMenu(), ExecuteReplyToAnnotation(), GetAnnotationState(), GetCurrentPage(), init(), InsertAnnotation(), invalidateSlots(), notifyEvent(), onSelectionChanged(), removeListener(), SelectAnnotation(), and SelectNextAnnotation().
|
private |
Definition at line 123 of file annotationmanagerimpl.hxx.
Referenced by CreateTags(), disposing(), and onSelectionChanged().
|
private |
Definition at line 124 of file annotationmanagerimpl.hxx.
Referenced by CreateTags(), DeleteAllAnnotations(), DeleteAnnotationsByAuthor(), GetSelectedAnnotation(), onTagDeselected(), onTagSelected(), SelectAnnotation(), and SelectNextAnnotation().
|
private |
Definition at line 122 of file annotationmanagerimpl.hxx.
Referenced by disposing(), init(), onSelectionChanged(), and UpdateTags().