update dev300-m58
[ooovba.git] / svx / source / cui / border.hxx
blob3ac644685de252939fa83bbe9929441e459f6982
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: border.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_BORDER_HXX
31 #define _SVX_BORDER_HXX
33 // include ---------------------------------------------------------------
36 #include <svtools/ctrlbox.hxx>
37 #ifndef _GROUP_HXX //autogen
38 #include <vcl/group.hxx>
39 #endif
40 #ifndef _FIELD_HXX //autogen
41 #include <vcl/field.hxx>
42 #endif
43 #ifndef _FIXED_HXX //autogen
44 #include <vcl/fixed.hxx>
45 #endif
46 #include <svtools/valueset.hxx>
47 #include <sfx2/tabdlg.hxx>
48 #include <svx/frmsel.hxx>
49 // forward ---------------------------------------------------------------
51 class SvxBorderLine;
52 class XColorTable;
54 // class SvxBorderTabPage ------------------------------------------------
56 {k:\svx\prototyp\dialog\border.bmp}
57 [Beschreibung]
58 TabPage zur Einstellung der Umrandung (Staerke, Farbe, Schatten, ...)
59 [Items]
60 <SvxBoxItem><SID_ATTR_BORDER_OUTER>
61 <SvxBoxInfoItem><SID_ATTR_BORDER_INNER>
62 <SvxShadowItem><SID_ATTR_BORDER_SHADOW>
65 // Border-Modes for paragraphs, textframes and tables
66 //CHINA001 #define SW_BORDER_MODE_PARA 0x01
67 //CHINA001 #define SW_BORDER_MODE_TABLE 0x02
68 //CHINA001 #define SW_BORDER_MODE_FRAME 0x04
69 #include "flagsdef.hxx"//CHINA001
71 class SvxBorderTabPage : public SfxTabPage
73 using TabPage::DeactivatePage;
75 public:
76 static SfxTabPage* Create( Window* pParent,
77 const SfxItemSet& rAttrSet);
78 static USHORT* GetRanges();
80 virtual BOOL FillItemSet( SfxItemSet& rCoreAttrs );
81 virtual void Reset( const SfxItemSet& );
83 void HideShadowControls();
84 virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
85 protected:
86 virtual int DeactivatePage( SfxItemSet* pSet = 0 );
87 virtual void DataChanged( const DataChangedEvent& rDCEvt );
89 private:
90 SvxBorderTabPage( Window* pParent, const SfxItemSet& rCoreAttrs );
91 ~SvxBorderTabPage();
93 // Controls
94 FixedLine aFlBorder;
95 FixedText aDefaultFT;
96 ValueSet aWndPresets;
97 FixedText aUserDefFT;
98 svx::FrameSelector aFrameSel;
100 FixedLine aFlSep1;
101 FixedLine aFlLine;
102 FixedText aStyleFT;
103 LineListBox aLbLineStyle;
104 FixedText aColorFT;
105 ColorListBox aLbLineColor;
107 FixedLine aFlSep2;
108 FixedLine aDistanceFL;
109 FixedText aLeftFT;
110 MetricField aLeftMF;
111 FixedText aRightFT;
112 MetricField aRightMF;
113 FixedText aTopFT;
114 MetricField aTopMF;
115 FixedText aBottomFT;
116 MetricField aBottomMF;
117 CheckBox aSynchronizeCB;
119 FixedLine aFlShadow;
120 FixedText aFtShadowPos;
121 ValueSet aWndShadows;
122 FixedText aFtShadowSize;
123 MetricField aEdShadowSize;
124 FixedText aFtShadowColor;
125 ColorListBox aLbShadowColor;
127 //properties - "Merge with next paragraph" in Writer
128 FixedLine aPropertiesFL;
129 CheckBox aMergeWithNextCB;
130 // --> collapsing table borders FME 2005-05-27 #i29550#
131 CheckBox aMergeAdjacentBordersCB;
132 // <--
134 ImageList aShadowImgLstH;
135 ImageList aShadowImgLst;
136 ImageList aBorderImgLstH;
137 ImageList aBorderImgLst;
139 long nMinValue; // minimum distance
140 int nSWMode; // table, textframe, paragraph
142 bool mbHorEnabled; /// true = Inner horizontal border enabled.
143 bool mbVerEnabled; /// true = Inner vertical border enabled.
144 bool mbTLBREnabled; /// true = Top-left to bottom-right border enabled.
145 bool mbBLTREnabled; /// true = Bottom-left to top-right border enabled.
146 bool mbUseMarginItem;
148 static BOOL bSync;
150 #ifdef _SVX_BORDER_CXX
151 // Handler
152 DECL_LINK( SelStyleHdl_Impl, ListBox* pLb );
153 DECL_LINK( SelColHdl_Impl, ListBox* pLb );
154 DECL_LINK( SelPreHdl_Impl, void* );
155 DECL_LINK( SelSdwHdl_Impl, void* );
156 DECL_LINK( LinesChanged_Impl, void* );
157 DECL_LINK( ModifyDistanceHdl_Impl, MetricField*);
158 DECL_LINK( SyncHdl_Impl, CheckBox*);
160 USHORT GetPresetImageId( USHORT nValueSetIdx ) const;
161 USHORT GetPresetStringId( USHORT nValueSetIdx ) const;
163 void FillPresetVS();
164 void FillShadowVS();
165 void FillValueSets();
167 // Filler
168 void FillLineListBox_Impl();
170 // Setzen von einzelnen Frame-/Core-Linien
171 void ResetFrameLine_Impl( svx::FrameBorderType eBorder,
172 const SvxBorderLine* pCurLine,
173 bool bValid );
174 #endif
178 #endif