diff options
Diffstat (limited to 'cui/source/inc/align.hxx')
-rw-r--r-- | cui/source/inc/align.hxx | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx index d88fc28dce29..a1761607cfd8 100644 --- a/cui/source/inc/align.hxx +++ b/cui/source/inc/align.hxx @@ -19,20 +19,24 @@ #pragma once // list box indexes -#define ALIGNDLG_HORALIGN_STD 0 -#define ALIGNDLG_HORALIGN_LEFT 1 -#define ALIGNDLG_HORALIGN_CENTER 2 -#define ALIGNDLG_HORALIGN_RIGHT 3 -#define ALIGNDLG_HORALIGN_BLOCK 4 -#define ALIGNDLG_HORALIGN_FILL 5 -#define ALIGNDLG_HORALIGN_DISTRIBUTED 6 - -#define ALIGNDLG_VERALIGN_STD 0 -#define ALIGNDLG_VERALIGN_TOP 1 -#define ALIGNDLG_VERALIGN_MID 2 -#define ALIGNDLG_VERALIGN_BOTTOM 3 -#define ALIGNDLG_VERALIGN_BLOCK 4 -#define ALIGNDLG_VERALIGN_DISTRIBUTED 5 +enum HorizontalAlign { + ALIGNDLG_HORALIGN_STD = 0, + ALIGNDLG_HORALIGN_LEFT = 1, + ALIGNDLG_HORALIGN_CENTER = 2, + ALIGNDLG_HORALIGN_RIGHT = 3, + ALIGNDLG_HORALIGN_BLOCK = 4, + ALIGNDLG_HORALIGN_FILL = 5, + ALIGNDLG_HORALIGN_DISTRIBUTED = 6 +}; + +enum VerticalAlign { + ALIGNDLG_VERALIGN_STD = 0, + ALIGNDLG_VERALIGN_TOP = 1, + ALIGNDLG_VERALIGN_MID = 2, + ALIGNDLG_VERALIGN_BOTTOM = 3, + ALIGNDLG_VERALIGN_BLOCK = 4, + ALIGNDLG_VERALIGN_DISTRIBUTED = 5 +}; #include <sfx2/tabdlg.hxx> #include <svtools/valueset.hxx> @@ -40,19 +44,21 @@ #include <svx/frmdirlbox.hxx> #include <vcl/weld.hxx> +class SfxEnumItemInterface; + namespace svx { class AlignmentTabPage : public SfxTabPage { - static const sal_uInt16 s_pRanges[]; + static const WhichRangesContainer s_pRanges; public: virtual ~AlignmentTabPage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet ); explicit AlignmentTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet); - static const sal_uInt16* GetRanges() { return s_pRanges; } + static WhichRangesContainer GetRanges() { return s_pRanges; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; @@ -62,14 +68,14 @@ private: void InitVsRefEgde(); void UpdateEnableControls(); - bool HasAlignmentChanged( const SfxItemSet& rNew, sal_uInt16 nWhich ) const; + bool HasAlignmentChanged( const SfxItemSet& rNew, TypedWhichId<SfxEnumItemInterface> nWhich ) const; DECL_LINK(UpdateEnableHdl, weld::ComboBox&, void); - DECL_LINK(StackedClickHdl, weld::ToggleButton&, void); - DECL_LINK(AsianModeClickHdl, weld::ToggleButton&, void); - DECL_LINK(WrapClickHdl, weld::ToggleButton&, void); - DECL_LINK(HyphenClickHdl, weld::ToggleButton&, void); - DECL_LINK(ShrinkClickHdl, weld::ToggleButton&, void); + DECL_LINK(StackedClickHdl, weld::Toggleable&, void); + DECL_LINK(AsianModeClickHdl, weld::Toggleable&, void); + DECL_LINK(WrapClickHdl, weld::Toggleable&, void); + DECL_LINK(HyphenClickHdl, weld::Toggleable&, void); + DECL_LINK(ShrinkClickHdl, weld::Toggleable&, void); private: weld::TriStateEnabled m_aStackedState; @@ -92,7 +98,6 @@ private: std::unique_ptr<weld::CheckButton> m_xCbStacked; std::unique_ptr<weld::CheckButton> m_xCbAsianMode; - std::unique_ptr<weld::Widget> m_xBoxDirection; std::unique_ptr<weld::CheckButton> m_xBtnWrap; std::unique_ptr<weld::CheckButton> m_xBtnHyphen; std::unique_ptr<weld::CheckButton> m_xBtnShrink; |