• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DomCR / ACadSharp / 29143042407

11 Jul 2026 06:34AM UTC coverage: 2.912% (-73.0%) from 75.918%
29143042407

push

github

web-flow
Merge pull request #1146 from ilCosmico/acds-read-payload-anchor

Read the AcDs payload area offset from the data segment header

264 of 12999 branches covered (2.03%)

Branch coverage included in aggregate %.

0 of 30 new or added lines in 1 file covered. (0.0%)

31243 existing lines in 465 files now uncovered.

1337 of 41984 relevant lines covered (3.18%)

5.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/ACadSharp/Objects/TableStyle.CellStyle.cs
1
using ACadSharp.Attributes;
2

3
namespace ACadSharp.Objects;
4

5
public partial class TableStyle
6
{
7
        /// <summary>
8
        /// Represents the cell style of a table cell. Cell styles are defined at the table level and can be overridden at the cell level.
9
        /// </summary>
10
        /// <remarks>
11
        /// A <see cref="CellStyle"/> defines visual and layout properties such as colors, margins, borders, and text alignment
12
        /// for cells in a <see cref="TableStyle"/>. Default cell styles are provided for data, header, and title cells.
13
        /// </remarks>
14
        public class CellStyle : ContentFormat
15
        {
16
                /// <summary>
17
                /// Gets the default cell style used for data cells.
18
                /// </summary>
19
                public static CellStyle DefaultDataCellStyle
20
                {
21
                        get
UNCOV
22
                        {
×
UNCOV
23
                                var data = new CellStyle
×
UNCOV
24
                                {
×
UNCOV
25
                                        Name = DataCellStyleName,
×
UNCOV
26
                                        StyleClass = CellStyleClass.Label,
×
UNCOV
27
                                        Id = 3,
×
UNCOV
28
                                        HasData = true,
×
UNCOV
29
                                };
×
30

UNCOV
31
                                return data;
×
UNCOV
32
                        }
×
33
                }
34

35
                /// <summary>
36
                /// Gets the default cell style used for header cells.
37
                /// </summary>
38
                public static CellStyle DefaultHeaderCellStyle
39
                {
40
                        get
UNCOV
41
                        {
×
UNCOV
42
                                var data = new CellStyle
×
UNCOV
43
                                {
×
UNCOV
44
                                        Name = HeaderCellStyleName,
×
UNCOV
45
                                        StyleClass = CellStyleClass.Data,
×
UNCOV
46
                                        Id = 2,
×
UNCOV
47
                                        HasData = true,
×
UNCOV
48
                                };
×
49

UNCOV
50
                                return data;
×
UNCOV
51
                        }
×
52
                }
53

54
                /// <summary>
55
                /// Gets the default cell style used for title cells.
56
                /// </summary>
57
                public static CellStyle DefaultTitleCellStyle
58
                {
59
                        get
UNCOV
60
                        {
×
UNCOV
61
                                var data = new CellStyle
×
UNCOV
62
                                {
×
UNCOV
63
                                        Name = TitleCellStyleName,
×
UNCOV
64
                                        StyleClass = CellStyleClass.Data,
×
UNCOV
65
                                        Id = 1,
×
UNCOV
66
                                        HasData = true,
×
UNCOV
67
                                };
×
68

UNCOV
69
                                return data;
×
UNCOV
70
                        }
×
71
                }
72

73
                /// <summary>
74
                /// Gets the default cell style used as the table's overall ("Table") style.
75
                /// </summary>
76
                public static CellStyle DefaultTableCellStyle
77
                {
78
                        get
UNCOV
79
                        {
×
UNCOV
80
                                var data = new CellStyle
×
UNCOV
81
                                {
×
UNCOV
82
                                        Name = TableCellStyleName,
×
UNCOV
83
                                        StyleClass = CellStyleClass.Label,
×
UNCOV
84
                                        Id = 4,
×
UNCOV
85
                                        HasData = true,
×
UNCOV
86
                                };
×
87

UNCOV
88
                                return data;
×
UNCOV
89
                        }
×
90
                }
91

92
                /// <summary>
93
                /// The name constant for the default table-level cell style.
94
                /// </summary>
95
                public const string TableCellStyleName = "Table";
96

97
                /// <summary>
98
                /// Gets or sets the background (fill) color of the cell content.
99
                /// Override applied at the cell level.
100
                /// </summary>
101
                [DxfCodeValue(63)]
UNCOV
102
                public Color BackgroundColor { get; set; }
×
103

104
                /// <summary>
105
                /// Gets or sets the bottom border style of the cell.
106
                /// </summary>
UNCOV
107
                public CellBorder BottomBorder { get; set; } = new(CellEdgeFlags.Bottom);
×
108

109
                /// <summary>
110
                /// Gets or sets the bottom margin of the cell.
111
                /// </summary>
UNCOV
112
                public double BottomMargin { get; set; }
×
113

114
                /// <summary>
115
                /// Gets or sets the alignment of the content within a cell.
116
                /// </summary>
117
                [DxfCodeValue(170)]
UNCOV
118
                public TableStyle.CellAlignmentType CellAlignment { get; set; }
×
119

120
                /// <summary>
121
                /// Gets or sets the color of cell content.
122
                /// Override applied at the cell level.
123
                /// </summary>
124
                [DxfCodeValue(64)]
UNCOV
125
                public Color ContentColor { get; internal set; }
×
126

127
                /// <summary>
128
                /// Gets or sets the layout flags that control how content is arranged within the cell.
129
                /// </summary>
UNCOV
130
                public CellContentLayoutFlags ContentLayoutFlags { get; set; }
×
131

132
                /// <summary>
133
                /// Gets or sets the horizontal inside border style of the cell.
134
                /// </summary>
UNCOV
135
                public CellBorder HorizontalInsideBorder { get; set; } = new(CellEdgeFlags.InsideHorizontal);
×
136

137
                /// <summary>
138
                /// Gets or sets the horizontal margin of the cell. Default is <c>0.06</c>.
139
                /// </summary>
UNCOV
140
                public double HorizontalMargin { get; set; } = 0.06d;
×
141

142
                /// <summary>
143
                /// Gets or sets a value indicating whether the fill color is enabled.
144
                /// Override applied at the cell level.
145
                /// </summary>
146
                [DxfCodeValue(283)]
UNCOV
147
                public bool IsFillColorOn { get; set; }
×
148

149
                /// <summary>
150
                /// Gets or sets the left border style of the cell.
151
                /// </summary>
UNCOV
152
                public CellBorder LeftBorder { get; set; } = new(CellEdgeFlags.Left);
×
153

154
                /// <summary>
155
                /// Gets or sets the horizontal spacing between cell margins.
156
                /// </summary>
UNCOV
157
                public double MarginHorizontalSpacing { get; set; }
×
158

159
                /// <summary>
160
                /// Gets or sets the flags that indicate which margin overrides are applied.
161
                /// </summary>
162
                [DxfCodeValue(171)]
UNCOV
163
                public MarginFlags MarginOverrideFlags { get; set; }
×
164

165
                /// <summary>
166
                /// Gets or sets the vertical spacing between cell margins.
167
                /// </summary>
UNCOV
168
                public double MarginVerticalSpacing { get; set; }
×
169

170
                /// <summary>
171
                /// Gets or sets the name of the cell style.
172
                /// </summary>
173
                [DxfCodeValue(300)]
UNCOV
174
                public string Name { get; set; }
×
175

176
                /// <summary>
177
                /// Gets or sets the right border style of the cell.
178
                /// </summary>
UNCOV
179
                public CellBorder RightBorder { get; set; } = new(CellEdgeFlags.Right);
×
180

181
                /// <summary>
182
                /// Gets or sets the right margin of the cell.
183
                /// </summary>
UNCOV
184
                public double RightMargin { get; set; }
×
185

186
                /// <summary>
187
                /// Gets or sets the class of the cell style, which categorizes the style type.
188
                /// </summary>
189
                [DxfCodeValue(91)]
UNCOV
190
                public CellStyleClass StyleClass { get; set; }
×
191

192
                /// <summary>
193
                /// Gets or sets the property flags that define which table cell style properties are applied.
194
                /// </summary>
195
                [DxfCodeValue(92)]
UNCOV
196
                public CellStylePropertyFlags TableCellStylePropertyFlags { get; set; }
×
197

198
                /// <summary>
199
                /// Gets or sets the text color of the cell content.
200
                /// </summary>
201
                [DxfCodeValue(62)]
UNCOV
202
                public Color TextColor { get; set; }
×
203

204
                /// <summary>
205
                /// Gets or sets the top border style of the cell.
206
                /// </summary>
UNCOV
207
                public CellBorder TopBorder { get; set; } = new(CellEdgeFlags.Right);
×
208

209
                /// <summary>
210
                /// Gets or sets the type of the cell style.
211
                /// </summary>
212
                [DxfCodeValue(90)]
UNCOV
213
                public CellStyleType Type { get; set; }
×
214

215
                /// <summary>
216
                /// Gets or sets the vertical inside border style of the cell.
217
                /// </summary>
UNCOV
218
                public CellBorder VerticalInsideBorder { get; set; } = new(CellEdgeFlags.InsideVertical);
×
219

220
                /// <summary>
221
                /// Gets or sets the vertical margin of the cell. Default is <c>0.06</c>.
222
                /// </summary>
UNCOV
223
                public double VerticalMargin { get; set; } = 0.06d;
×
224

225
                /// <summary>
226
                /// Gets or sets the internal identifier of the cell style.
227
                /// </summary>
UNCOV
228
                internal int Id { get; set; }
×
229

230
                /// <summary>
231
                /// The name constant for the default data cell style.
232
                /// </summary>
233
                public const string DataCellStyleName = "_DATA";
234

235
                /// <summary>
236
                /// The name constant for the default header cell style.
237
                /// </summary>
238
                public const string HeaderCellStyleName = "_HEADER";
239

240
                /// <summary>
241
                /// The name constant for the default title cell style.
242
                /// </summary>
243
                public const string TitleCellStyleName = "_TITLE";
244

245
                /// <inheritdoc/>
246
                public override string ToString()
247
                {
×
248
                        return $"{Id}|{Name}";
×
249
                }
×
250
        }
251
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc