diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2016-04-16 16:38:43 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-04-20 07:53:17 +0000 |
commit | ccaf108651ee7e477b09f496f33ea778307fe60b (patch) | |
tree | 11c22a3675a8ee06ab248d4879d582e6d1970c84 /svx/source/sidebar/text/TextCharacterSpacingControl.hxx | |
parent | f7aa4344e4fec0e8bb49d6ba210bc3a78b7e1365 (diff) |
character spacing control possible to use outside sidebar
Change-Id: Ic0c6458268b529bd0107d6ed5a35f49241cfb833
Reviewed-on: https://gerrit.libreoffice.org/24146
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'svx/source/sidebar/text/TextCharacterSpacingControl.hxx')
-rw-r--r-- | svx/source/sidebar/text/TextCharacterSpacingControl.hxx | 57 |
1 files changed, 20 insertions, 37 deletions
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx index db189051bee8..cd0cdd04a2a7 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx @@ -20,13 +20,12 @@ #define INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTCHARACTERSPACINGCONTROL_HXX #include "svx/sidebar/PopupControl.hxx" -#include "svx/sidebar/ValueSetWithTextControl.hxx" #include <sfx2/bindings.hxx> -#include "TextPropertyPanel.hxx" #include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include <sfx2/tbxctrl.hxx> - -namespace svx { namespace sidebar { +namespace svx { #define SPACING_NOCUSTOM 0 #define SPACING_CLOSE_BY_CLICK_ICON -1 #define SPACING_CLOSE_BY_CUS_EDIT 1 @@ -37,60 +36,44 @@ namespace svx { namespace sidebar { #define SIDEBAR_SPACE_EXPAND 1 #define SIDEBAR_SPACE_CONDENSED 2 -class TextCharacterSpacingControl:public svx::sidebar::PopupControl +class TextCharacterSpacingControl : public SfxPopupWindow { public: - TextCharacterSpacingControl ( - vcl::Window* pParent, - svx::sidebar::TextPropertyPanel& rPanel, - SfxBindings* pBindings); + TextCharacterSpacingControl(sal_uInt16 nId); virtual ~TextCharacterSpacingControl(); virtual void dispose() override; - void Rearrange(bool bLBAvailable,bool bAvailable, long nKerning); - //virtual void Paint(const Rectangle& rect); - //add short GetLastCustomState() { return mnLastCus;} long GetLastCustomValue() { return mnCustomKern;} - //add end private: - svx::sidebar::TextPropertyPanel& mrTextPropertyPanel; - SfxBindings* mpBindings; - - VclPtr<ValueSetWithTextControl> maVSSpacing; - - VclPtr<FixedText> maLastCus; - VclPtr<FixedText> maFTSpacing; VclPtr<ListBox> maLBKerning; VclPtr<FixedText> maFTBy; VclPtr<MetricField> maEditKerning; - Image* mpImg; - Image* mpImgSel; - OUString* mpStr; - OUString* mpStrTip; - - Image maImgCus; - Image maImgCusGrey; - OUString maStrCus; - OUString maStrCusE; - OUString maStrCusC; - OUString maStrCusN; - OUString maStrUnit; + VclPtr<PushButton> maNormal; + VclPtr<PushButton> maVeryTight; + VclPtr<PushButton> maTight; + VclPtr<PushButton> maVeryLoose; + VclPtr<PushButton> maLoose; + VclPtr<PushButton> maLastCustom; + sal_uInt16 mnId; long mnCustomKern; short mnLastCus; - bool mbCusEnable; - bool mbVS; - void initial(); - DECL_LINK_TYPED(VSSelHdl, ValueSet*, void); + void Initialize(); + void ExecuteCharacterSpacing(long nValue, bool bClose = true); + + DECL_LINK_TYPED(PredefinedValuesHdl, Button*, void); DECL_LINK_TYPED(KerningSelectHdl, ListBox&, void); DECL_LINK_TYPED(KerningModifyHdl, Edit&, void); + + SfxMapUnit GetCoreMetric() const; + long GetSelFontSize() const; }; -}} +} #endif |