22#include <editeng/editids.hrc>
31#include <com/sun/star/beans/NamedValue.hpp>
33#define SPACING_VERY_TIGHT -30
34#define SPACING_TIGHT -15
35#define SPACING_NORMAL 0
36#define SPACING_LOOSE 30
37#define SPACING_VERY_LOOSE 60
42 :
WeldToolbarPopup(pControl->getFrameInterface(), pParent,
"svx/ui/textcharacterspacingcontrol.ui",
"TextCharacterSpacingControl")
45 , mxEditKerning(m_xBuilder->weld_metric_spin_button(
"kerning",
FieldUnit::
POINT))
46 , mxTight(m_xBuilder->weld_button(
"tight"))
47 , mxVeryTight(m_xBuilder->weld_button(
"very_tight"))
48 , mxNormal(m_xBuilder->weld_button(
"normal"))
49 , mxLoose(m_xBuilder->weld_button(
"loose"))
50 , mxVeryLoose(m_xBuilder->weld_button(
"very_loose"))
51 , mxLastCustom(m_xBuilder->weld_button(
"last_custom"))
60 mxTight->connect_clicked(aLink);
62 mxLoose->connect_clicked(aLink);
101 css::uno::Sequence<css::beans::NamedValue>
aSeq
102 { {
"Spacing", css::uno::Any(OUString::number(
mnCustomKern)) } };
116 nKerning = pKerningItem->GetValue();
121 css::uno::Sequence<css::beans::NamedValue>
aSeq = aWinOpt.
GetUserData();
123 if(
aSeq.hasElements())
124 aSeq[0].Value >>= aTmp;
126 OUString aWinData(aTmp);
135 if(eState >= SfxItemState::DEFAULT)
143 else if(SfxItemState::DISABLED == eState)
169 pViewFrm->GetBindings().GetDispatcher()->ExecuteList(SID_ATTR_CHAR_KERNING,
170 SfxCallMode::RECORD, { &aKernItem });
181 if (&rControl == mxNormal.get())
185 else if (&rControl == mxVeryTight.get())
189 else if (&rControl == mxTight.get())
193 else if (&rControl == mxVeryLoose.get())
197 else if (&rControl == mxLoose.get())
201 else if (&rControl == mxLastCustom.get())
203 ExecuteCharacterSpacing(mnCustomKern);
210 mnCustomKern = mxEditKerning->get_value(FieldUnit::NONE);
212 ExecuteCharacterSpacing(mnCustomKern,
false);
218 sal_uInt16 nWhich = rPool.
GetWhich(SID_ATTR_CHAR_KERNING);
#define SPACING_VERY_TIGHT
#define SPACING_VERY_LOOSE
#define SPACING_CLOSE_BY_CLICK_ICON
#define SPACING_CLOSE_BY_CUS_EDIT
SfxApplication * SfxGetpApp()
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
SfxDispatcher * GetDispatcher() const
SfxItemState QueryState(sal_uInt16 nSID, const SfxPoolItem *&rpState)
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
SfxItemPool & GetPool() const
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
SfxBindings & GetBindings()
void SetUserData(const css::uno::Sequence< css::beans::NamedValue > &lData)
css::uno::Sequence< css::beans::NamedValue > GetUserData() const
std::unique_ptr< weld::Button > mxVeryLoose
virtual void GrabFocus() override
std::unique_ptr< weld::MetricSpinButton > mxEditKerning
void ExecuteCharacterSpacing(tools::Long nValue, bool bClose=true)
TextCharacterSpacingControl(TextCharacterSpacingPopup *pControl, weld::Widget *pParent)
std::unique_ptr< weld::Button > mxTight
rtl::Reference< TextCharacterSpacingPopup > mxControl
std::unique_ptr< weld::Button > mxLastCustom
std::unique_ptr< weld::Button > mxNormal
std::unique_ptr< weld::Button > mxVeryTight
std::unique_ptr< weld::Button > mxLoose
virtual ~TextCharacterSpacingControl() override
static MapUnit GetCoreMetric()
constexpr OUStringLiteral HID_SPACING_MB_KERN
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq
IMPL_LINK(HangulHanjaConversionDialog, ClickByCharacterHdl, weld::Toggleable &, rBox, void)
constexpr OUStringLiteral SIDEBAR_SPACING_GLOBAL_VALUE
IMPL_LINK_NOARG(SuggestionDisplay, SelectSuggestionValueSetHdl, ValueSet *, void)