51 if( eState != SfxItemState::DEFAULT || pState->
IsVoidItem() )
58 const std::vector<OUString>& rStringList(pStringListItem->GetList());
70 if ( rCEvt.
GetCommand() != CommandEventId::ContextMenu ||
83 std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu(
"menu"));
87 sal_uInt32 nPopupId = 1;
88 std::map<sal_Int32, sal_uInt16> aBookmarkIdx;
95 xPopup->append(OUString::number(nPopupId), (*ppBookmark)->GetName());
96 aBookmarkIdx[nPopupId] = o3tl::narrowing<sal_uInt16>(ppBookmark - ppBookmarkStart);
102 OUString sResult = xPopup->popup_at_rect(pParent, aRect);
103 if (!sResult.isEmpty())
107 SfxCallMode::ASYNCHRON|SfxCallMode::RECORD,
SFX_IMPL_STATUSBAR_CONTROL(SwBookmarkControl, SfxStringListItem)
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
Provides access to the marks of a document.
virtual const_iterator_t getBookmarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence the IBookmarks.
virtual sal_Int32 getAllMarksCount() const =0
returns the number of marks.
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
virtual const_iterator_t getBookmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of IBookmarks.
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
virtual bool IsVoidItem() const
StatusBar & GetStatusBar() const
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
SfxDispatcher * GetDispatcher()
void SetItemText(sal_uInt16 nItemId, const OUString &rText, int nCharsWidth=-1)
void SetQuickHelpText(sal_uInt16 nItemId, const OUString &rText)
virtual void StateChangedAtStatusBarControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
SwBookmarkControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb)
virtual ~SwBookmarkControl() override
virtual void Paint(const UserDrawEvent &rEvt) override
virtual void Command(const CommandEvent &rCEvt) override
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
Used by the UI to modify the document model.
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)
SwWrtShell * GetActiveWrtShell()