1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: border.hxx,v $
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>
40 #ifndef _FIELD_HXX //autogen
41 #include <vcl/field.hxx>
43 #ifndef _FIXED_HXX //autogen
44 #include <vcl/fixed.hxx>
46 #include <svtools/valueset.hxx>
47 #include <sfx2/tabdlg.hxx>
48 #include <svx/frmsel.hxx>
49 // forward ---------------------------------------------------------------
54 // class SvxBorderTabPage ------------------------------------------------
56 {k:\svx\prototyp\dialog\border.bmp}
58 TabPage zur Einstellung der Umrandung (Staerke, Farbe, Schatten, ...)
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
;
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
86 virtual int DeactivatePage( SfxItemSet
* pSet
= 0 );
87 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
90 SvxBorderTabPage( Window
* pParent
, const SfxItemSet
& rCoreAttrs
);
98 svx::FrameSelector aFrameSel
;
103 LineListBox aLbLineStyle
;
105 ColorListBox aLbLineColor
;
108 FixedLine aDistanceFL
;
112 MetricField aRightMF
;
116 MetricField aBottomMF
;
117 CheckBox aSynchronizeCB
;
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
;
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
;
150 #ifdef _SVX_BORDER_CXX
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;
165 void FillValueSets();
168 void FillLineListBox_Impl();
170 // Setzen von einzelnen Frame-/Core-Linien
171 void ResetFrameLine_Impl( svx::FrameBorderType eBorder
,
172 const SvxBorderLine
* pCurLine
,