bump product version to 5.0.4.1
[LibreOffice.git] / cui / source / inc / border.hxx
blobff7780403bbbb7e466b92209dd85845957b6c91c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_CUI_SOURCE_INC_BORDER_HXX
20 #define INCLUDED_CUI_SOURCE_INC_BORDER_HXX
22 #include <svtools/ctrlbox.hxx>
23 #include <vcl/group.hxx>
24 #include <vcl/field.hxx>
25 #include <vcl/fixed.hxx>
26 #include <svtools/valueset.hxx>
27 #include <sfx2/tabdlg.hxx>
28 #include <svx/frmsel.hxx>
29 #include <svx/flagsdef.hxx>
31 #include <set>
33 // forward ---------------------------------------------------------------
35 namespace editeng
37 class SvxBorderLine;
41 class SvxBorderTabPage : public SfxTabPage
43 friend class VclPtr<SvxBorderTabPage>;
44 using TabPage::DeactivatePage;
46 static const sal_uInt16 pRanges[];
48 public:
49 virtual ~SvxBorderTabPage();
50 virtual void dispose() SAL_OVERRIDE;
51 static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
52 const SfxItemSet* rAttrSet);
53 static const sal_uInt16* GetRanges() { return pRanges; }
55 virtual bool FillItemSet( SfxItemSet* rCoreAttrs ) SAL_OVERRIDE;
56 virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
58 void HideShadowControls();
59 virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
60 void SetTableMode();
61 protected:
62 virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
63 virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
65 private:
66 SvxBorderTabPage( vcl::Window* pParent, const SfxItemSet& rCoreAttrs );
68 // Controls
69 VclPtr<ValueSet> m_pWndPresets;
70 VclPtr<FixedText> m_pUserDefFT;
71 VclPtr<svx::FrameSelector> m_pFrameSel;
73 VclPtr<LineListBox> m_pLbLineStyle;
74 VclPtr<ColorListBox> m_pLbLineColor;
75 VclPtr<MetricField> m_pLineWidthMF;
77 VclPtr<VclContainer> m_pSpacingFrame;
78 VclPtr<FixedText> m_pLeftFT;
79 VclPtr<MetricField> m_pLeftMF;
80 VclPtr<FixedText> m_pRightFT;
81 VclPtr<MetricField> m_pRightMF;
82 VclPtr<FixedText> m_pTopFT;
83 VclPtr<MetricField> m_pTopMF;
84 VclPtr<FixedText> m_pBottomFT;
85 VclPtr<MetricField> m_pBottomMF;
86 VclPtr<CheckBox> m_pSynchronizeCB;
88 VclPtr<VclContainer> m_pShadowFrame;
89 VclPtr<ValueSet> m_pWndShadows;
90 VclPtr<FixedText> m_pFtShadowSize;
91 VclPtr<MetricField> m_pEdShadowSize;
92 VclPtr<FixedText> m_pFtShadowColor;
93 VclPtr<ColorListBox> m_pLbShadowColor;
96 VclPtr<VclContainer> m_pPropertiesFrame;///< properties - "Merge with next paragraph" in Writer
97 VclPtr<CheckBox> m_pMergeWithNextCB;
98 // #i29550#
99 VclPtr<CheckBox> m_pMergeAdjacentBordersCB;
101 ImageList aShadowImgLstH;
102 ImageList aShadowImgLst;
103 ImageList aBorderImgLstH;
104 ImageList aBorderImgLst;
106 long nMinValue; ///< minimum distance
107 SwBorderModes nSWMode; ///< table, textframe, paragraph
109 bool mbHorEnabled; ///< true = Inner horizontal border enabled.
110 bool mbVerEnabled; ///< true = Inner vertical border enabled.
111 bool mbTLBREnabled; ///< true = Top-left to bottom-right border enabled.
112 bool mbBLTREnabled; ///< true = Bottom-left to top-right border enabled.
113 bool mbUseMarginItem;
114 bool mbSync;
116 std::set<sal_Int16> maUsedBorderStyles;
118 // Handler
119 DECL_LINK( SelStyleHdl_Impl, ListBox* );
120 DECL_LINK( SelColHdl_Impl, ListBox* );
121 DECL_LINK( SelPreHdl_Impl, void* );
122 DECL_LINK( SelSdwHdl_Impl, void* );
123 DECL_LINK( LinesChanged_Impl, void* );
124 DECL_LINK( ModifyDistanceHdl_Impl, MetricField*);
125 DECL_LINK( ModifyWidthHdl_Impl, void*);
126 DECL_LINK( SyncHdl_Impl, CheckBox*);
128 sal_uInt16 GetPresetImageId( sal_uInt16 nValueSetIdx ) const;
129 sal_uInt16 GetPresetStringId( sal_uInt16 nValueSetIdx ) const;
131 void FillPresetVS();
132 void FillShadowVS();
133 void FillValueSets();
135 // Filler
136 void FillLineListBox_Impl();
138 /// share for individual Frame-/Core-Line
139 void ResetFrameLine_Impl( svx::FrameBorderType eBorder,
140 const editeng::SvxBorderLine* pCurLine,
141 bool bValid );
143 bool IsBorderLineStyleAllowed( sal_Int16 nStyle ) const;
147 #endif
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */