23 std::vector<SwContentControlListItem> aListItems =
m_pContentControl->GetListItems();
25 for (
const auto& rListItem : aListItems)
30 if (aListItems.empty())
50 OUString sSelection = rBox.get_selected_text();
51 if (sSelection ==
SwResId(STR_DROP_DOWN_EMPTY_LIST))
57 sal_Int32 nSelection = rBox.get_selected_index();
63 m_pContentControl->SetSelectedListItem(nSelection);
71 SwEditWin* pEditWin,
const std::shared_ptr<SwContentControl>& pContentControl)
81 "modules/swriter/ui/contentcontroldropdown.ui");
static const AllSettings & GetSettings()
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
This button is shown when the cursor is inside a content control with drop-down capability.
virtual void LaunchPopup()
std::shared_ptr< SwContentControl > m_pContentControl
std::unique_ptr< weld::Builder > m_xPopupBuilder
virtual void DestroyPopup()
std::unique_ptr< weld::Popover > m_xPopup
This button is shown when the cursor is inside a drop-down content control.
std::unique_ptr< weld::TreeView > m_xTreeView
virtual void DestroyPopup() override
virtual ~SwDropDownContentControlButton() override
SwDropDownContentControlButton(SwEditWin *pEditWin, const std::shared_ptr< SwContentControl > &pContentControl)
virtual void LaunchPopup() override
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
SwWrtShell & GetWrtShell() const
Used by the UI to modify the document model.
bool GotoContentControl(const SwFormatContentControl &rContentControl, bool bOnlyRefresh=false)
virtual Size GetSizePixel() const
weld::Window * GetFrameWeld() const
IMPL_LINK(SwDropDownContentControlButton, ListBoxHandler, weld::TreeView &, rBox, bool)
#define LINK(Instance, Class, Member)
OUString SwResId(TranslateId aId)