27#include <tmplctrl.hxx>
54 if( eState != SfxItemState::DEFAULT || pState->
IsVoidItem() )
56 else if (
auto pStringItem =
dynamic_cast< const SfxStringItem *
>( pState ) )
83 std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu(
"menu"));
87 for (sal_uInt16 nPage = 0; nPage < nMasterCount; ++nPage)
92 xPopup->append(OUString::number(nPage), pMaster->
GetName());
97 OUString sResult = xPopup->popup_at_rect(pParent, aRect);
98 if (!sResult.isEmpty())
100 sal_uInt16 nCurrId = sResult.toUInt32();
104 SID_PRESENTATION_LAYOUT, SfxCallMode::SLOT, { &aStyle });
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
sal_uInt16 GetMasterSdPageCount(PageKind ePgKind) const
SdPage * GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind)
const OUString & GetName() const
SdTemplateControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb)
virtual void Command(const CommandEvent &rCEvt) override
virtual void Paint(const UserDrawEvent &rEvt) override
virtual ~SdTemplateControl() override
virtual void StateChangedAtStatusBarControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
void Invalidate(sal_uInt16 nId)
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()
SfxBindings & GetBindings()
SfxDispatcher * GetDispatcher()
void SetItemText(sal_uInt16 nItemId, const OUString &rText, int nCharsWidth=-1)
void SetQuickHelpText(sal_uInt16 nItemId, const OUString &rText)
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
static ViewShellBase * GetViewShellBase(SfxViewFrame const *pFrame)
When given a view frame this static method returns the corresponding sd::ViewShellBase object.
SdDrawDocument * GetDocument() const
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)
OUString SdResId(TranslateId aId)
SFX_IMPL_STATUSBAR_CONTROL(SdTemplateControl, SfxStringItem)