25#include <svx/strings.hrc>
37#include <svx/svxids.hrc>
38#include <bitmaps.hlst>
67 case SID_FORMTEXT_STYLE:
71 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextStyleItem expected");
75 case SID_FORMTEXT_ADJUST:
79 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextAdjustItem expected");
83 case SID_FORMTEXT_DISTANCE:
87 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextDistanceItem expected");
91 case SID_FORMTEXT_START:
95 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextStartItem expected");
99 case SID_FORMTEXT_MIRROR:
103 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextMirrorItem expected");
107 case SID_FORMTEXT_HIDEFORM:
111 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextHideFormItem expected");
115 case SID_FORMTEXT_OUTLINE:
119 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextOutlineItem expected");
123 case SID_FORMTEXT_SHADOW:
127 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextShadowItem expected");
131 case SID_FORMTEXT_SHDWCOLOR:
135 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextShadowColorItem expected");
139 case SID_FORMTEXT_SHDWXVAL:
143 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextShadowXValItem expected");
147 case SID_FORMTEXT_SHDWYVAL:
151 DBG_ASSERT(pStateItem || pItem ==
nullptr,
"XFormTextShadowYValItem expected");
172 pDlg->Initialize( pInfo );
179 :
SfxDockingWindow(pBindinx, pCW, _pParent,
"DockingFontwork",
"svx/ui/dockingfontwork.ui")
180 , rBindings(*pBindinx)
181 , aInputIdle(
"SvxFontWorkDialog Input")
184 , nSaveShadowAngle(450)
185 , nSaveShadowSize (100)
186 , m_xTbxStyle(m_xBuilder->weld_toolbar(
"style"))
187 , m_xTbxAdjust(m_xBuilder->weld_toolbar(
"adjust"))
188 , m_xMtrFldDistance(m_xBuilder->weld_metric_spin_button(
"distance",
FieldUnit::
CM))
189 , m_xMtrFldTextStart(m_xBuilder->weld_metric_spin_button(
"indent",
FieldUnit::
CM))
190 , m_xTbxShadow(m_xBuilder->weld_toolbar(
"shadow"))
191 , m_xFbShadowX(m_xBuilder->weld_image(
"shadowx"))
192 , m_xMtrFldShadowX(m_xBuilder->weld_metric_spin_button(
"distancex",
FieldUnit::
CM))
193 , m_xFbShadowY(m_xBuilder->weld_image(
"shadowy"))
194 , m_xMtrFldShadowY(m_xBuilder->weld_metric_spin_button(
"distancey",
FieldUnit::
CM))
229 if( eDlgUnit == FieldUnit::MM )
260 pCtrlItem->dispose();
281 case SfxChildAlignment::TOP:
282 case SfxChildAlignment::HIGHESTTOP:
283 case SfxChildAlignment::LOWESTTOP:
284 case SfxChildAlignment::BOTTOM:
285 case SfxChildAlignment::LOWESTBOTTOM:
286 case SfxChildAlignment::HIGHESTBOTTOM:
288 eAlignment = eActAlign;
292 case SfxChildAlignment::LEFT:
293 case SfxChildAlignment::RIGHT:
294 case SfxChildAlignment::FIRSTLEFT:
295 case SfxChildAlignment::LASTLEFT:
296 case SfxChildAlignment::FIRSTRIGHT:
297 case SfxChildAlignment::LASTRIGHT:
318 OUString
sId =
"off";
473 if( eDlgUnit == FieldUnit::MM )
482 if( eDlgUnit == FieldUnit::MM )
488 if ( bRestoreValues )
497 SID_FORMTEXT_SHDWXVAL, SfxCallMode::RECORD,
498 { &aXItem, &aYItem });
517 if ( bRestoreValues )
524 SID_FORMTEXT_SHDWXVAL, SfxCallMode::RECORD,
525 { &aXItem, &aYItem });
609 if (rId !=
"off" && rId == m_sLastStyleTbxId)
616 else if (rId ==
"upright")
618 else if (rId ==
"hori")
620 else if (rId ==
"vert")
625 SfxCallMode::RECORD, { &aItem });
626 SetStyle_Impl( &aItem );
627 m_sLastStyleTbxId = rId;
632 if (rId ==
"orientation")
636 SfxCallMode::SLOT, { &aItem });
638 else if (rId != m_sLastAdjustTbxId)
644 else if (rId ==
"center")
646 else if (rId ==
"right")
651 SfxCallMode::RECORD, { &aItem });
652 SetAdjust_Impl(&aItem);
653 m_sLastAdjustTbxId = rId;
659 if (rId ==
"contour")
663 SfxCallMode::RECORD, { &aItem });
665 else if (rId ==
"textcontour")
669 SfxCallMode::RECORD, { &aItem });
671 else if (rId != m_sLastShadowTbxId)
675 if (m_sLastShadowTbxId ==
"vertical")
677 nSaveShadowX =
GetCoreValue(*m_xMtrFldShadowX, MapUnit::Map100thMM);
678 nSaveShadowY =
GetCoreValue(*m_xMtrFldShadowY, MapUnit::Map100thMM);
680 else if (m_sLastShadowTbxId ==
"slant")
682 nSaveShadowAngle = m_xMtrFldShadowX->get_value(FieldUnit::NONE);
683 nSaveShadowSize = m_xMtrFldShadowY->get_value(FieldUnit::NONE);
685 m_sLastShadowTbxId = rId;
692 SfxCallMode::RECORD, { &aItem });
693 SetShadow_Impl(&aItem,
true);
707 const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
708 if( eDlgUnit != m_xMtrFldDistance->get_unit() )
712 if (eDlgUnit == FieldUnit::MM)
714 m_xMtrFldDistance->set_increments(50, 500, FieldUnit::NONE);
715 m_xMtrFldTextStart->set_increments(50, 500, FieldUnit::NONE);
719 m_xMtrFldDistance->set_increments(10, 100, FieldUnit::NONE);
720 m_xMtrFldTextStart->set_increments(10, 100, FieldUnit::NONE);
723 if( eDlgUnit != m_xMtrFldShadowX->get_unit() &&
724 m_xTbxShadow->get_item_active(
"vertical") )
729 if (eDlgUnit == FieldUnit::MM)
731 m_xMtrFldShadowX->set_increments(50, 500, FieldUnit::NONE);
732 m_xMtrFldShadowY->set_increments(50, 500, FieldUnit::NONE);
736 m_xMtrFldShadowX->set_increments(10, 100, FieldUnit::NONE);
737 m_xMtrFldShadowY->set_increments(10, 100, FieldUnit::NONE);
746 sal_Int32 nValueX(0);
747 sal_Int32 nValueY(0);
753 if (m_sLastShadowTbxId ==
"vertical")
755 nValueX =
GetCoreValue(*m_xMtrFldShadowX, MapUnit::Map100thMM);
756 nValueY =
GetCoreValue(*m_xMtrFldShadowY, MapUnit::Map100thMM);
758 else if (m_sLastShadowTbxId ==
"slant")
760 nValueX = m_xMtrFldShadowX->get_value(FieldUnit::NONE);
761 nValueY = m_xMtrFldShadowY->get_value(FieldUnit::NONE);
770 { &aDistItem, &aStartItem, &aShadowXItem, &aShadowYItem });
777 SfxCallMode::RECORD, { &aItem });
784 m_xFbShadowX->set_from_icon_name(RID_SVXBMP_SHADOW_ANGLE);
785 m_xFbShadowY->set_from_icon_name(RID_SVXBMP_SHADOW_SIZE);
789 m_xFbShadowX->set_from_icon_name(RID_SVXBMP_SHADOW_XDIST);
790 m_xFbShadowY->set_from_icon_name(RID_SVXBMP_SHADOW_YDIST);
sal_Int32 GetValue() const
SfxDispatcher * GetDispatcher() const
void SetWindow(const VclPtr< vcl::Window > &p)
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 * >())
SfxModule * GetModule() const
SfxBindings & GetBindings() const
virtual void dispose() override
FieldUnit GetFieldUnit() const
Derived from SfxChildWindow as "container" for fontwork dialog.
SvxFontWorkChildWindow(vcl::Window *, sal_uInt16, SfxBindings *, SfxChildWinInfo *)
virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
SvxFontWorkDialog & rFontWorkDlg
SvxFontWorkControllerItem(sal_uInt16 nId, SvxFontWorkDialog &, SfxBindings &)
Floating window for setting attributes of text effects.
void SetShadowYVal_Impl(const XFormTextShadowYValItem *)
void SetShadowXVal_Impl(const XFormTextShadowXValItem *)
void SetOutline_Impl(const XFormTextOutlineItem *)
void SetShadowColor_Impl(const XFormTextShadowColorItem *)
std::unique_ptr< weld::Image > m_xFbShadowY
void SetAdjust_Impl(const XFormTextAdjustItem *)
OUString m_sLastAdjustTbxId
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldShadowX
std::unique_ptr< ColorListBox > m_xShadowColorLB
void SetMirror_Impl(const XFormTextMirrorItem *)
OUString m_sLastStyleTbxId
OUString m_sLastShadowTbxId
void SetStyle_Impl(const XFormTextStyleItem *)
void SetShadow_Impl(const XFormTextShadowItem *, bool bRestoreValues=false)
void SetShowForm_Impl(const XFormTextHideFormItem *)
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldTextStart
virtual void dispose() override
friend class SvxFontWorkControllerItem
std::unique_ptr< weld::Image > m_xFbShadowX
void SetStart_Impl(const XFormTextStartItem *)
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldDistance
virtual SfxChildAlignment CheckAlignment(SfxChildAlignment eActAlign, SfxChildAlignment eAlign) override
std::unique_ptr< weld::Toolbar > m_xTbxStyle
tools::Long nSaveShadowAngle
std::unique_ptr< weld::Toolbar > m_xTbxAdjust
virtual ~SvxFontWorkDialog() override
std::unique_ptr< weld::Toolbar > m_xTbxShadow
SvxFontWorkDialog(SfxBindings *pBinding, SfxChildWindow *pCW, vcl::Window *pParent)
tools::Long nSaveShadowSize
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldShadowY
SvxFontWorkControllerItem * pCtrlItems[CONTROLLER_COUNT]
void SetDistance_Impl(const XFormTextDistanceItem *)
void SetPriority(TaskPriority ePriority)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
const Color & GetColorValue() const
#define DBG_ASSERT(sCon, aError)
OUString SvxResId(TranslateId aId)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
virtual void SetText(const OUString &rStr) override
virtual SfxBindings & GetBindings() override
IMPL_LINK_NOARG(SvxFontWorkDialog, ModifyInputHdl_Impl, weld::MetricSpinButton &, void)
SFX_IMPL_DOCKINGWINDOW_WITHID(SvxFontWorkChildWindow, SID_FONTWORK)
IMPL_LINK(SvxFontWorkDialog, SelectStyleHdl_Impl, const OUString &, rId, void)
#define LINK(Instance, Class, Member)
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)