Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2989_MovingPeaksBenchmark/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/4.0.3/EPPlus-4.0.3/Style/StyleBase.cs

Last change on this file was 12074, checked in by sraggl, 10 years ago

#2341: Added EPPlus-4.0.3 to ExtLibs

File size: 5.5 KB
Line 
1/*******************************************************************************
2 * You may amend and distribute as you like, but don't remove this header!
3 *
4 * EPPlus provides server-side generation of Excel 2007/2010 spreadsheets.
5 * See http://www.codeplex.com/EPPlus for details.
6 *
7 * Copyright (C) 2011  Jan Källman
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
17 * See the GNU Lesser General Public License for more details.
18 *
19 * The GNU Lesser General Public License can be viewed at http://www.opensource.org/licenses/lgpl-license.php
20 * If you unfamiliar with this license or have questions about it, here is an http://www.gnu.org/licenses/gpl-faq.html
21 *
22 * All code and executables are provided "as is" with no warranty either express or implied.
23 * The author accepts no liability for any damage or loss of business that this product may cause.
24 *
25 * Code change notes:
26 *
27 * Author             Change            Date
28 * ******************************************************************************
29 * Jan Källman                    Initial Release           2009-10-01
30 * Jan Källman    License changed GPL-->LGPL 2011-12-16
31 *******************************************************************************/
32using System;
33using System.Collections.Generic;
34using System.Text;
35
36namespace OfficeOpenXml.Style
37{
38    /// <summary>
39    /// Border line style
40    /// </summary>
41    public enum ExcelBorderStyle
42    {
43        None,
44        Hair,
45        Dotted,
46        DashDot,
47        Thin,
48        DashDotDot,
49        Dashed,
50        MediumDashDotDot,
51        MediumDashed,
52        MediumDashDot,
53        Thick,
54        Medium,
55        Double
56    };
57    /// <summary>
58    /// Horizontal text alignment
59    /// </summary>
60    public enum ExcelHorizontalAlignment
61    {
62        General,
63        Left,
64        Center,
65        CenterContinuous,
66        Right,
67        Fill,
68        Distributed,
69        Justify
70    }
71    /// <summary>
72    /// Vertical text alignment
73    /// </summary>
74    public enum ExcelVerticalAlignment
75    {
76        Top,
77        Center,
78        Bottom,
79        Distributed,
80        Justify
81    }
82    /// <summary>
83    /// Font-Vertical Align
84    /// </summary>
85    public enum ExcelVerticalAlignmentFont
86    {
87        None,
88        Subscript,
89        Superscript
90    }
91    /// <summary>
92    /// Font-Underlinestyle for
93    /// </summary>
94    public enum ExcelUnderLineType
95    {
96        None,
97        Single,
98        Double,
99        SingleAccounting,
100        DoubleAccounting
101    }
102    /// <summary>
103    /// Fill pattern
104    /// </summary>
105    public enum ExcelFillStyle
106    {
107        None,
108        Solid,
109        DarkGray,
110        MediumGray,
111        LightGray,
112        Gray125,
113        Gray0625,
114        DarkVertical,
115        DarkHorizontal,
116        DarkDown,
117        DarkUp,
118        DarkGrid,
119        DarkTrellis,
120        LightVertical,
121        LightHorizontal,
122        LightDown,
123        LightUp,
124        LightGrid,
125        LightTrellis
126    }
127    /// <summary>
128    /// Type of gradient fill
129    /// </summary>
130    public enum ExcelFillGradientType
131    {
132        /// <summary>
133        /// No gradient fill.
134        /// </summary>
135        None,
136        /// <summary>
137        /// This gradient fill is of linear gradient type. Linear gradient type means that the transition from one color to the next is along a line (e.g., horizontal, vertical,diagonal, etc.)
138        /// </summary>
139        Linear,
140        /// <summary>
141        /// This gradient fill is of path gradient type. Path gradient type means the that the boundary of transition from one color to the next is a rectangle, defined by top,bottom, left, and right attributes on the gradientFill element.
142        /// </summary>
143        Path
144    }
145    /// <summary>
146    /// The reading order
147    /// </summary>
148    public enum ExcelReadingOrder
149    {
150        /// <summary>
151        /// Reading order is determined by scanning the text for the first non-whitespace character: if it is a strong right-to-left character, the reading order is right-to-left; otherwise, the reading order left-to-right.
152        /// </summary>
153        ContextDependent=0,
154        /// <summary>
155        /// Left to Right
156        /// </summary>
157        LeftToRight=1,
158        /// <summary>
159        /// Right to Left
160        /// </summary>
161        RightToLeft=2
162    }
163    public abstract class StyleBase
164    {
165        protected ExcelStyles _styles;
166        internal OfficeOpenXml.XmlHelper.ChangedEventHandler _ChangedEvent;
167        protected int _positionID;
168        protected string _address;
169        internal StyleBase(ExcelStyles styles, OfficeOpenXml.XmlHelper.ChangedEventHandler ChangedEvent, int PositionID, string Address)
170        {
171            _styles = styles;
172            _ChangedEvent = ChangedEvent;
173            _address = Address;
174            _positionID = PositionID;
175        }
176        internal int Index { get; set;}
177        internal abstract string Id {get;}
178
179        internal virtual void SetIndex(int index)
180        {
181            Index = index;
182        }
183    }
184}
Note: See TracBrowser for help on using the repository browser.