36#include <tmplctrl.hxx>
55 if (SfxItemState::DEFAULT == eState && (pItem =
dynamic_cast<const SfxStringItem*
>(pState)))
74 if ( rCEvt.
GetCommand() != CommandEventId::ContextMenu ||
81 if (
nullptr != pWrtShell &&
82 !pWrtShell->SwCursorShell::HasSelection()&&
89 if (xIter->Count() > 1)
92 std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu(
"menu"));
98 xPopup->append(OUString::number(++
nCount), pStyle->
GetName());
99 pStyle = xIter->Next();
104 OUString sResult = xPopup->popup_at_rect(pParent, aRect);
105 if (!sResult.isEmpty())
107 sal_uInt32 nCurrId = sResult.toUInt32();
109 pStyle = xIter->operator[]( nCurrId - 1 );
113 SfxCallMode::SLOT|SfxCallMode::RECORD,
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
const OUString & GetValue() const
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
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 * >())
StatusBar & GetStatusBar() const
virtual std::unique_ptr< SfxStyleSheetIterator > CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
const OUString & GetName() const
SfxDispatcher * GetDispatcher()
SfxViewFrame & GetViewFrame() const
void SetItemText(sal_uInt16 nItemId, const OUString &rText, int nCharsWidth=-1)
void SetQuickHelpText(sal_uInt16 nItemId, const OUString &rText)
size_t IsObjSelected() const
virtual void Paint(const UserDrawEvent &rEvt) override
virtual ~SwTemplateControl() override
SwTemplateControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb)
virtual void Command(const CommandEvent &rCEvt) override
virtual void StateChangedAtStatusBarControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
SwWrtShell * GetWrtShellPtr() const
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
bool IsSelFrameMode() const
const SwView & GetView() const
#define FN_SET_PAGE_STYLE
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)
OUString SwResId(TranslateId aId)
SFX_IMPL_STATUSBAR_CONTROL(SwTemplateControl, SfxStringItem)