24#include <svx/svxids.hrc>
37 svl::Items<SDRATTR_EDGE_FIRST, SDRATTR_EDGE_LAST>);
47 auto xPage = std::make_unique<SvxConnectionPage>(
get_content_area(),
this, rInAttrs);
49 xPage->SetView(pSdrView);
63 :
SfxTabPage(pPage, pController,
"cui/ui/connectortabpage.ui",
"ConnectorTabPage", &rInAttrs)
65 , aAttrSet(*rInAttrs.GetPool())
67 , m_xLbType(m_xBuilder->weld_combo_box(
"LB_TYPE"))
68 , m_xFtLine1(m_xBuilder->weld_label(
"FT_LINE_1"))
69 , m_xMtrFldLine1(m_xBuilder->weld_metric_spin_button(
"MTR_FLD_LINE_1",
FieldUnit::
CM))
70 , m_xFtLine2(m_xBuilder->weld_label(
"FT_LINE_2"))
71 , m_xMtrFldLine2(m_xBuilder->weld_metric_spin_button(
"MTR_FLD_LINE_2",
FieldUnit::
CM))
72 , m_xFtLine3(m_xBuilder->weld_label(
"FT_LINE_3"))
73 , m_xMtrFldLine3(m_xBuilder->weld_metric_spin_button(
"MTR_FLD_LINE_3",
FieldUnit::
CM))
74 , m_xMtrFldHorz1(m_xBuilder->weld_metric_spin_button(
"MTR_FLD_HORZ_1",
FieldUnit::
MM))
75 , m_xMtrFldVert1(m_xBuilder->weld_metric_spin_button(
"MTR_FLD_VERT_1",
FieldUnit::
MM))
76 , m_xMtrFldHorz2(m_xBuilder->weld_metric_spin_button(
"MTR_FLD_HORZ_2",
FieldUnit::
MM))
77 , m_xMtrFldVert2(m_xBuilder->weld_metric_spin_button(
"MTR_FLD_VERT_2",
FieldUnit::
MM))
78 , m_xCtlPreview(new
weld::CustomWeld(*m_xBuilder,
"CTL_PREVIEW", m_aCtlPreview))
94 if( eFUnit == FieldUnit::MM )
204 bool bModified =
false;
257 if (
m_xLbType->get_value_changed_from_saved())
285 return std::make_unique<SvxConnectionPage>(pPage, pController, *rAttrs);
290 int nPos = m_xLbType->get_active();
296 m_aCtlPreview.SetAttributes(aAttrSet);
299 sal_uInt16
nCount = m_aCtlPreview.GetLineDeltaCount();
301 m_xFtLine3->set_sensitive(
nCount > 2 );
302 m_xMtrFldLine3->set_sensitive(
nCount > 2 );
304 m_xMtrFldLine3->set_value(m_xMtrFldLine3->get_value(FieldUnit::NONE), FieldUnit::NONE);
306 m_xMtrFldLine3->set_text(
"");
308 m_xFtLine2->set_sensitive(
nCount > 1 );
309 m_xMtrFldLine2->set_sensitive(
nCount > 1 );
311 m_xMtrFldLine2->set_value(m_xMtrFldLine2->get_value(FieldUnit::NONE), FieldUnit::NONE);
313 m_xMtrFldLine2->set_text(
"");
315 m_xFtLine1->set_sensitive(
nCount > 0 );
316 m_xMtrFldLine1->set_sensitive(
nCount > 0 );
318 m_xMtrFldLine1->set_value(m_xMtrFldLine1->get_value(FieldUnit::NONE), FieldUnit::NONE);
320 m_xMtrFldLine1->set_text(
"");
325 if (&r == m_xMtrFldHorz1.get())
331 if (&r == m_xMtrFldHorz2.get())
337 if (&r == m_xMtrFldVert1.get())
343 if (&r == m_xMtrFldVert2.get())
349 if (&r == m_xMtrFldLine1.get())
355 if (&r == m_xMtrFldLine2.get())
361 if (&r == m_xMtrFldLine3.get())
367 m_aCtlPreview.SetAttributes(aAttrSet);
Reference< XExecutableDialog > m_xDialog
static OUString GetValueTextByPos(sal_uInt16 nPos)
virtual sal_uInt16 GetValueCount() const override
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
SfxItemPool * GetPool() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
T & StaticWhichCast(TypedWhichId< T > nId)
void SetTabPage(std::unique_ptr< SfxTabPage > xTabPage)
weld::Container * get_content_area()
static const SfxPoolItem * GetItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
SvxConnectionDialog(weld::Window *pParent, const SfxItemSet &rAttr, const SdrView *pView)
Dialog for changing connectors.
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldLine1
std::unique_ptr< weld::Label > m_xFtLine1
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldLine3
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHorz1
std::unique_ptr< weld::Label > m_xFtLine3
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldVert2
virtual bool FillItemSet(SfxItemSet *) override
std::unique_ptr< weld::Label > m_xFtLine2
void SetMetricValueAndSave(const SfxItemSet *rAttrs, weld::MetricSpinButton &rField, TypedWhichId< T > nWhich)
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHorz2
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldLine2
virtual void Reset(const SfxItemSet *) override
virtual void PageCreated(const SfxAllItemSet &aSet) override
std::unique_ptr< weld::CustomWeld > m_xCtlPreview
virtual ~SvxConnectionPage() override
SvxConnectionPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
static const WhichRangesContainer pRanges
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldVert1
void SetView(const SdrView *pSdrView)
std::unique_ptr< weld::ComboBox > m_xLbType
SvxXConnectionPreview m_aCtlPreview
const SfxItemSet & rOutAttrs
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
void SetView(const SdrView *pSdrView)
IMPL_LINK(SvxConnectionPage, ChangeAttrEditHdl_Impl, weld::MetricSpinButton &, r, void)
IMPL_LINK_NOARG(SvxConnectionPage, ChangeAttrListBoxHdl_Impl, weld::ComboBox &, void)
OUString CuiResId(TranslateId aKey)
#define DBG_ASSERT(sCon, aError)
SVXCORE_DLLPUBLIC FieldUnit GetModuleFieldUnit(const SfxItemSet &)
#define LINK(Instance, Class, Member)
constexpr TypedWhichId< SdrEdgeNode1HorzDistItem > SDRATTR_EDGENODE1HORZDIST(SDRATTR_EDGE_FIRST+1)
constexpr TypedWhichId< SdrEdgeLineDeltaCountItem > SDRATTR_EDGELINEDELTACOUNT(SDRATTR_EDGE_FIRST+7)
constexpr TypedWhichId< SdrEdgeKindItem > SDRATTR_EDGEKIND(SDRATTR_EDGE_FIRST+0)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_EDGELINE2DELTA(SDRATTR_EDGE_FIRST+9)
constexpr TypedWhichId< SdrEdgeNode1VertDistItem > SDRATTR_EDGENODE1VERTDIST(SDRATTR_EDGE_FIRST+2)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_EDGELINE3DELTA(SDRATTR_EDGE_FIRST+10)
constexpr TypedWhichId< SdrEdgeNode2HorzDistItem > SDRATTR_EDGENODE2HORZDIST(SDRATTR_EDGE_FIRST+3)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_EDGELINE1DELTA(SDRATTR_EDGE_FIRST+8)
constexpr TypedWhichId< SdrEdgeNode2VertDistItem > SDRATTR_EDGENODE2VERTDIST(SDRATTR_EDGE_FIRST+4)
SdrMetricItem makeSdrEdgeLine2DeltaItem(tools::Long nVal)
SdrMetricItem makeSdrEdgeLine1DeltaItem(tools::Long nVal)
SdrMetricItem makeSdrEdgeLine3DeltaItem(tools::Long nVal)
SVT_DLLPUBLIC sal_Int64 GetCoreValue(const weld::MetricSpinButton &rField, MapUnit eUnit)
SVT_DLLPUBLIC void SetMetricValue(weld::MetricSpinButton &rField, sal_Int64 nCoreValue, MapUnit eUnit)
SVT_DLLPUBLIC void SetFieldUnit(weld::MetricSpinButton &rCtrl, FieldUnit eUnit, bool bAll=false)