22#include <editeng/editids.hrc>
32#include <com/sun/star/lang/IllegalArgumentException.hpp>
38 const css::uno::Reference< css::frame::XFrame >& rxFrame,
41 if (pParent ==
nullptr)
42 throw css::lang::IllegalArgumentException(
"no parent Window given to WrapPropertyPanel::Create",
nullptr, 0);
44 throw css::lang::IllegalArgumentException(
"no XFrame given to WrapPropertyPanel::Create",
nullptr, 1);
45 if (pBindings ==
nullptr)
46 throw css::lang::IllegalArgumentException(
"no SfxBindings given to WrapPropertyPanel::Create",
nullptr, 2);
48 return std::make_unique<WrapPropertyPanel>(pParent, rxFrame, pBindings);
53 const css::uno::Reference< css::frame::XFrame >& rxFrame,
55 :
PanelLayout(pParent,
"WrapPropertyPanel",
"modules/swriter/ui/sidebarwrap.ui")
56 , mpBindings(pBindings)
63 , m_aCustomEntry(
SwResId(STR_WRAP_PANEL_CUSTOM_STR))
65 , maSwLRSpacingControl(SID_ATTR_LRSPACE, *pBindings, *this)
66 , maSwULSpacingControl(SID_ATTR_ULSPACE, *pBindings, *this)
67 , mxWrapOptions(m_xBuilder->weld_toolbar(
"wrapoptions"))
69 , mxSpacingLB(m_xBuilder->weld_combo_box(
"spacingLB"))
106 if (nCustomEntry != -1)
120 sal_uInt16 nVal = rBox.get_active_id().toUInt32();
125 m_nTop = m_nBottom = m_nLeft = m_nRight = nVal;
126 mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_LRSPACE,
127 SfxCallMode::RECORD, { &aLRItem });
128 mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_ULSPACE,
129 SfxCallMode::RECORD, { &aULItem });
133 const sal_uInt16 nSId,
139 case SID_ATTR_LRSPACE:
141 if(eState >= SfxItemState::DEFAULT)
154 case SID_ATTR_ULSPACE:
156 if(eState >= SfxItemState::DEFAULT)
void Update(sal_uInt16 nId)
tools::Long GetRight() const
tools::Long GetLeft() const
sal_uInt16 GetUpper() const
sal_uInt16 GetLower() const
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
#define LINK(Instance, Class, Member)
void Fill(SpacingType eType, weld::ComboBox &rComboBox)
OUString SwResId(TranslateId aId)