1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 _SVX_BORDER_HXX
20 #define _SVX_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>
30 // forward ---------------------------------------------------------------
37 #include <svx/flagsdef.hxx>
39 class SvxBorderTabPage
: public SfxTabPage
41 using TabPage::DeactivatePage
;
44 static SfxTabPage
* Create( Window
* pParent
,
45 const SfxItemSet
& rAttrSet
);
46 static sal_uInt16
* GetRanges();
48 virtual sal_Bool
FillItemSet( SfxItemSet
& rCoreAttrs
);
49 virtual void Reset( const SfxItemSet
& );
51 void HideShadowControls();
52 virtual void PageCreated (SfxAllItemSet aSet
);
54 virtual int DeactivatePage( SfxItemSet
* pSet
= 0 );
55 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
58 SvxBorderTabPage( Window
* pParent
, const SfxItemSet
& rCoreAttrs
);
66 svx::FrameSelector aFrameSel
;
71 LineListBox aLbLineStyle
;
73 ColorListBox aLbLineColor
;
75 MetricField aLineWidthMF
;
78 FixedLine aDistanceFL
;
86 MetricField aBottomMF
;
87 CheckBox aSynchronizeCB
;
90 FixedText aFtShadowPos
;
92 FixedText aFtShadowSize
;
93 MetricField aEdShadowSize
;
94 FixedText aFtShadowColor
;
95 ColorListBox aLbShadowColor
;
98 FixedLine aPropertiesFL
;///< properties - "Merge with next paragraph" in Writer
99 CheckBox aMergeWithNextCB
;
101 CheckBox aMergeAdjacentBordersCB
;
103 ImageList aShadowImgLstH
;
104 ImageList aShadowImgLst
;
105 ImageList aBorderImgLstH
;
106 ImageList aBorderImgLst
;
108 long nMinValue
; ///< minimum distance
109 int nSWMode
; ///< table, textframe, paragraph
111 bool mbHorEnabled
; ///< true = Inner horizontal border enabled.
112 bool mbVerEnabled
; ///< true = Inner vertical border enabled.
113 bool mbTLBREnabled
; ///< true = Top-left to bottom-right border enabled.
114 bool mbBLTREnabled
; ///< true = Bottom-left to top-right border enabled.
115 bool mbUseMarginItem
;
118 #ifdef _SVX_BORDER_CXX
120 DECL_LINK( SelStyleHdl_Impl
, ListBox
* pLb
);
121 DECL_LINK( SelColHdl_Impl
, ListBox
* pLb
);
122 DECL_LINK( SelPreHdl_Impl
, void* );
123 DECL_LINK( SelSdwHdl_Impl
, void* );
124 DECL_LINK( LinesChanged_Impl
, void* );
125 DECL_LINK( ModifyDistanceHdl_Impl
, MetricField
*);
126 DECL_LINK( ModifyWidthHdl_Impl
, void*);
127 DECL_LINK( SyncHdl_Impl
, CheckBox
*);
129 sal_uInt16
GetPresetImageId( sal_uInt16 nValueSetIdx
) const;
130 sal_uInt16
GetPresetStringId( sal_uInt16 nValueSetIdx
) const;
134 void FillValueSets();
137 void FillLineListBox_Impl();
139 /// share for individual Frame-/Core-Line
140 void ResetFrameLine_Impl( svx::FrameBorderType eBorder
,
141 const editeng::SvxBorderLine
* pCurLine
,
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */