22 #include <com/sun/star/drawing/LineStyle.hpp>
29 #include <bitmaps.hlst>
62 return pToolBoxLineStyleControl;
67 LinePropertyPanelBase::LinePropertyPanelBase(
69 const uno::Reference<css::frame::XFrame>& rxFrame)
70 :
PanelLayout(pParent,
"LinePropertyPanel",
"svx/ui/sidebarline.ui"),
71 mxTBColor(m_xBuilder->weld_toolbar(
"color")),
73 mxLineStyleTB(m_xBuilder->weld_toolbar(
"linestyle")),
76 mxFTWidth(m_xBuilder->weld_label(
"widthlabel")),
77 mxTBWidth(m_xBuilder->weld_toolbar(
"width")),
78 mxFTTransparency(m_xBuilder->weld_label(
"translabel")),
79 mxMFTransparent(m_xBuilder->weld_metric_spin_button(
"linetransparency",
FieldUnit::
PERCENT)),
80 mxFTEdgeStyle(m_xBuilder->weld_label(
"cornerlabel")),
81 mxLBEdgeStyle(m_xBuilder->weld_combo_box(
"edgestyle")),
82 mxFTCapStyle(m_xBuilder->weld_label(
"caplabel")),
83 mxLBCapStyle(m_xBuilder->weld_combo_box(
"linecapstyle")),
84 mxGridLineProps(m_xBuilder->weld_widget(
"lineproperties")),
85 mxBoxArrowProps(m_xBuilder->weld_widget(
"arrowproperties")),
90 maIMGNone(BMP_NONE_ICON),
91 mbWidthValuable(true),
92 mbArrowSupported(true),
93 mbNoneLineStyle(false)
187 if (
const XLineWidthItem* pItem = dynamic_cast<const XLineWidthItem*>(pState))
216 if (
const XLineJointItem* pItem = dynamic_cast<const XLineJointItem*>(pState))
218 sal_Int32 nEntryPos(0);
220 switch(pItem->GetValue())
222 case drawing::LineJoint_ROUND:
227 case drawing::LineJoint_NONE:
232 case drawing::LineJoint_MIDDLE:
233 case drawing::LineJoint_MITER:
238 case drawing::LineJoint_BEVEL:
275 if (
const XLineCapItem* pItem = dynamic_cast<const XLineCapItem*>(pState))
277 sal_Int32 nEntryPos(0);
279 switch(pItem->GetValue())
281 case drawing::LineCap_BUTT:
286 case drawing::LineCap_ROUND:
291 case drawing::LineCap_SQUARE:
314 const sal_Int32
nPos(mxLBEdgeStyle->get_active());
316 if (
nPos == -1 || !mxLBEdgeStyle->get_value_changed_from_saved())
319 std::unique_ptr<XLineJointItem> pItem;
345 setLineJoint(pItem.get());
350 const sal_Int32
nPos(mxLBCapStyle->get_active());
352 if (!(
nPos != -1 && mxLBCapStyle->get_value_changed_from_saved()))
355 std::unique_ptr<XLineCapItem> pItem;
376 setLineCap(pItem.get());
391 sal_uInt16 nVal =
static_cast<sal_uInt16
>(mxMFTransparent->get_value(FieldUnit::PERCENT));
394 setLineTransparency(aItem);
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
#define LINK(Instance, Class, Member)
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
constexpr OUStringLiteral PERCENT(u"Percent")
Reference< XController > xController
constexpr OStringLiteral SELECTWIDTH