1 /************************************************************************/
2 /* */
3 /* Buffer administration routines. */
4 /* */
5 /************************************************************************/
6
7 # include "docBaseConfig.h"
8
9 # include <appDebugon.h>
10
11 # include "docCellProperties.h"
12 # include "docPropVal.h"
13
14 /************************************************************************/
15 /* */
16 /* Initialise Cell properties. */
17 /* */
18 /************************************************************************/
19
docInitCellProperties(CellProperties * cp)20 void docInitCellProperties( CellProperties * cp )
21 {
22 cp->cpRightBoundaryTwips= 0;
23
24 cp->cpTopBorderNumber= 0;
25 cp->cpLeftBorderNumber= 0;
26 cp->cpRightBorderNumber= 0;
27 cp->cpBottomBorderNumber= 0;
28
29 cp->cpShadingNumber= 0;
30
31 /**/
32 cp->cpPreferredWidth= 0;
33 cp->cpPreferredWidthUnit= TRautoNONE;
34
35 cp->cpTopPadding= 0;
36 cp->cpBottomPadding= 0;
37 cp->cpLeftPadding= 0;
38 cp->cpRightPadding= 0;
39
40 cp->cpTopPaddingUnit= TRautoNONE;
41 cp->cpBottomPaddingUnit= TRautoNONE;
42 cp->cpLeftPaddingUnit= TRautoNONE;
43 cp->cpRightPaddingUnit= TRautoNONE;
44
45 cp->cpHorizontalMerge= CELLmergeNONE;
46 cp->cpVerticalMerge= CELLmergeNONE;
47 cp->cpNoWrap= 0;
48 cp->cpNoShading= 0;
49
50 cp->cpValign= DOCtvaTOP;
51 cp->cpTextFlow= TXflowTXLRTB;
52 }
53
54 /************************************************************************/
55 /* */
56 /* Change cell properties and tell what has been changed. */
57 /* */
58 /************************************************************************/
59
docUpdCellProperties(PropertyMask * pCpDonePask,CellProperties * cpTo,const PropertyMask * cpSetMask,const CellProperties * cpFrom,const DocumentAttributeMap * dam)60 int docUpdCellProperties( PropertyMask * pCpDonePask,
61 CellProperties * cpTo,
62 const PropertyMask * cpSetMask,
63 const CellProperties * cpFrom,
64 const DocumentAttributeMap * dam )
65 {
66 PropertyMask cpDoneMask;
67
68 utilPropMaskClear( &cpDoneMask );
69
70 if ( PROPmaskISSET( cpSetMask, CLpropCELLX ) )
71 {
72 if ( cpTo->cpRightBoundaryTwips != cpFrom->cpRightBoundaryTwips )
73 {
74 cpTo->cpRightBoundaryTwips= cpFrom->cpRightBoundaryTwips;
75 PROPmaskADD( &cpDoneMask, CLpropCELLX );
76 }
77 }
78
79 /**/
80 if ( PROPmaskISSET( cpSetMask, CLpropTOP_BORDER ) )
81 {
82 int fromNumber= cpFrom->cpTopBorderNumber;
83
84 if ( fromNumber >= 0 && dam && dam->damBorderMap )
85 { fromNumber= dam->damBorderMap[fromNumber]; }
86
87 if ( cpTo->cpTopBorderNumber != fromNumber )
88 {
89 cpTo->cpTopBorderNumber= fromNumber;
90 PROPmaskADD( &cpDoneMask, CLpropTOP_BORDER );
91 }
92 }
93
94 if ( PROPmaskISSET( cpSetMask, CLpropBOTTOM_BORDER ) )
95 {
96 int fromNumber= cpFrom->cpBottomBorderNumber;
97
98 if ( fromNumber >= 0 && dam && dam->damBorderMap )
99 { fromNumber= dam->damBorderMap[fromNumber]; }
100
101 if ( cpTo->cpBottomBorderNumber != fromNumber )
102 {
103 cpTo->cpBottomBorderNumber= fromNumber;
104 PROPmaskADD( &cpDoneMask, CLpropBOTTOM_BORDER );
105 }
106 }
107
108 if ( PROPmaskISSET( cpSetMask, CLpropLEFT_BORDER ) )
109 {
110 int fromNumber= cpFrom->cpLeftBorderNumber;
111
112 if ( fromNumber >= 0 && dam && dam->damBorderMap )
113 { fromNumber= dam->damBorderMap[fromNumber]; }
114
115 if ( cpTo->cpLeftBorderNumber != fromNumber )
116 {
117 cpTo->cpLeftBorderNumber= fromNumber;
118 PROPmaskADD( &cpDoneMask, CLpropLEFT_BORDER );
119 }
120 }
121
122 if ( PROPmaskISSET( cpSetMask, CLpropRIGHT_BORDER ) )
123 {
124 int fromNumber= cpFrom->cpRightBorderNumber;
125
126 if ( fromNumber >= 0 && dam && dam->damBorderMap )
127 { fromNumber= dam->damBorderMap[fromNumber]; }
128
129 if ( cpTo->cpRightBorderNumber != fromNumber )
130 {
131 cpTo->cpRightBorderNumber= fromNumber;
132 PROPmaskADD( &cpDoneMask, CLpropRIGHT_BORDER );
133 }
134 }
135
136 if ( PROPmaskISSET( cpSetMask, CLpropSHADING ) )
137 {
138 int fromNumber= cpFrom->cpShadingNumber;
139
140 if ( fromNumber >= 0 && dam && dam->damShadingMap )
141 { fromNumber= dam->damShadingMap[fromNumber]; }
142
143 if ( cpTo->cpShadingNumber != fromNumber )
144 {
145 cpTo->cpShadingNumber= fromNumber;
146 PROPmaskADD( &cpDoneMask, CLpropSHADING );
147 }
148 }
149
150 /**/
151 if ( PROPmaskISSET( cpSetMask, CLpropCLW_WIDTH ) )
152 {
153 if ( cpTo->cpPreferredWidth != cpFrom->cpPreferredWidth )
154 {
155 cpTo->cpPreferredWidth= cpFrom->cpPreferredWidth;
156 PROPmaskADD( &cpDoneMask, CLpropCLW_WIDTH );
157 }
158 }
159
160 if ( PROPmaskISSET( cpSetMask, CLpropCLFTS_WIDTH ) )
161 {
162 if ( cpTo->cpPreferredWidthUnit != cpFrom->cpPreferredWidthUnit )
163 {
164 cpTo->cpPreferredWidthUnit= cpFrom->cpPreferredWidthUnit;
165 PROPmaskADD( &cpDoneMask, CLpropCLFTS_WIDTH );
166 }
167 }
168
169 /**/
170 if ( PROPmaskISSET( cpSetMask, CLpropHOR_MERGE ) )
171 {
172 if ( cpTo->cpHorizontalMerge != cpFrom->cpHorizontalMerge )
173 {
174 cpTo->cpHorizontalMerge= cpFrom->cpHorizontalMerge;
175 PROPmaskADD( &cpDoneMask, CLpropHOR_MERGE );
176 }
177 }
178
179 if ( PROPmaskISSET( cpSetMask, CLpropVERT_MERGE ) )
180 {
181 if ( cpTo->cpVerticalMerge != cpFrom->cpVerticalMerge )
182 {
183 cpTo->cpVerticalMerge= cpFrom->cpVerticalMerge;
184 PROPmaskADD( &cpDoneMask, CLpropVERT_MERGE );
185 }
186 }
187
188 /**/
189 if ( PROPmaskISSET( cpSetMask, CLpropVALIGN ) )
190 {
191 if ( cpTo->cpValign != cpFrom->cpValign )
192 {
193 cpTo->cpValign= cpFrom->cpValign;
194 PROPmaskADD( &cpDoneMask, CLpropVALIGN );
195 }
196 }
197
198 if ( PROPmaskISSET( cpSetMask, CLpropTEXT_FLOW ) )
199 {
200 if ( cpTo->cpTextFlow != cpFrom->cpTextFlow )
201 {
202 cpTo->cpTextFlow= cpFrom->cpTextFlow;
203 PROPmaskADD( &cpDoneMask, CLpropTEXT_FLOW );
204 }
205 }
206
207 if ( PROPmaskISSET( cpSetMask, CLpropTOP_PADDING ) )
208 {
209 if ( cpTo->cpTopPadding != cpFrom->cpTopPadding )
210 {
211 cpTo->cpTopPadding= cpFrom->cpTopPadding;
212 PROPmaskADD( &cpDoneMask, CLpropTOP_PADDING );
213 }
214 }
215
216 if ( PROPmaskISSET( cpSetMask, CLpropBOTTOM_PADDING ) )
217 {
218 if ( cpTo->cpBottomPadding != cpFrom->cpBottomPadding )
219 {
220 cpTo->cpBottomPadding= cpFrom->cpBottomPadding;
221 PROPmaskADD( &cpDoneMask, CLpropBOTTOM_PADDING );
222 }
223 }
224
225 if ( PROPmaskISSET( cpSetMask, CLpropLEFT_PADDING ) )
226 {
227 if ( cpTo->cpLeftPadding != cpFrom->cpLeftPadding )
228 {
229 cpTo->cpLeftPadding= cpFrom->cpLeftPadding;
230 PROPmaskADD( &cpDoneMask, CLpropLEFT_PADDING );
231 }
232 }
233
234 if ( PROPmaskISSET( cpSetMask, CLpropRIGHT_PADDING ) )
235 {
236 if ( cpTo->cpRightPadding != cpFrom->cpRightPadding )
237 {
238 cpTo->cpRightPadding= cpFrom->cpRightPadding;
239 PROPmaskADD( &cpDoneMask, CLpropRIGHT_PADDING );
240 }
241 }
242
243 if ( PROPmaskISSET( cpSetMask, CLpropTOP_PADDING_UNIT ) )
244 {
245 if ( cpTo->cpTopPaddingUnit != cpFrom->cpTopPaddingUnit )
246 {
247 cpTo->cpTopPaddingUnit= cpFrom->cpTopPaddingUnit;
248 PROPmaskADD( &cpDoneMask, CLpropTOP_PADDING_UNIT );
249 }
250 }
251
252 if ( PROPmaskISSET( cpSetMask, CLpropBOTTOM_PADDING_UNIT ) )
253 {
254 if ( cpTo->cpBottomPaddingUnit != cpFrom->cpBottomPaddingUnit )
255 {
256 cpTo->cpBottomPaddingUnit= cpFrom->cpBottomPaddingUnit;
257 PROPmaskADD( &cpDoneMask, CLpropBOTTOM_PADDING_UNIT );
258 }
259 }
260
261 if ( PROPmaskISSET( cpSetMask, CLpropLEFT_PADDING_UNIT ) )
262 {
263 if ( cpTo->cpLeftPaddingUnit != cpFrom->cpLeftPaddingUnit )
264 {
265 cpTo->cpLeftPaddingUnit= cpFrom->cpLeftPaddingUnit;
266 PROPmaskADD( &cpDoneMask, CLpropLEFT_PADDING_UNIT );
267 }
268 }
269
270 if ( PROPmaskISSET( cpSetMask, CLpropRIGHT_PADDING_UNIT ) )
271 {
272 if ( cpTo->cpRightPaddingUnit != cpFrom->cpRightPaddingUnit )
273 {
274 cpTo->cpRightPaddingUnit= cpFrom->cpRightPaddingUnit;
275 PROPmaskADD( &cpDoneMask, CLpropRIGHT_PADDING_UNIT );
276 }
277 }
278
279 if ( pCpDonePask )
280 { utilPropMaskOr( pCpDonePask, pCpDonePask, &cpDoneMask ); }
281
282 return 0;
283 }
284
285 /************************************************************************/
286 /* */
287 /* Compare cell properties. */
288 /* */
289 /************************************************************************/
290
docCellPropertyDifference(PropertyMask * pCpDifPask,const CellProperties * cpTo,const PropertyMask * cpCmpMask,const CellProperties * cpFrom,const DocumentAttributeMap * dam)291 void docCellPropertyDifference( PropertyMask * pCpDifPask,
292 const CellProperties * cpTo,
293 const PropertyMask * cpCmpMask,
294 const CellProperties * cpFrom,
295 const DocumentAttributeMap * dam )
296 {
297 PropertyMask cpDifMask;
298
299 utilPropMaskClear( &cpDifMask );
300
301 if ( PROPmaskISSET( cpCmpMask, CLpropCELLX ) )
302 {
303 if ( cpTo->cpRightBoundaryTwips != cpFrom->cpRightBoundaryTwips )
304 { PROPmaskADD( &cpDifMask, CLpropCELLX ); }
305 }
306
307 /**/
308 if ( PROPmaskISSET( cpCmpMask, CLpropTOP_BORDER ) )
309 {
310 int fromNumber= cpFrom->cpTopBorderNumber;
311
312 if ( fromNumber >= 0 && dam && dam->damBorderMap )
313 { fromNumber= dam->damBorderMap[fromNumber]; }
314
315 if ( cpTo->cpTopBorderNumber != fromNumber )
316 { PROPmaskADD( &cpDifMask, CLpropTOP_BORDER ); }
317 }
318
319 if ( PROPmaskISSET( cpCmpMask, CLpropBOTTOM_BORDER ) )
320 {
321 int fromNumber= cpFrom->cpBottomBorderNumber;
322
323 if ( fromNumber >= 0 && dam && dam->damBorderMap )
324 { fromNumber= dam->damBorderMap[fromNumber]; }
325
326 if ( cpTo->cpBottomBorderNumber != fromNumber )
327 { PROPmaskADD( &cpDifMask, CLpropBOTTOM_BORDER ); }
328 }
329
330 if ( PROPmaskISSET( cpCmpMask, CLpropLEFT_BORDER ) )
331 {
332 int fromNumber= cpFrom->cpLeftBorderNumber;
333
334 if ( fromNumber >= 0 && dam && dam->damBorderMap )
335 { fromNumber= dam->damBorderMap[fromNumber]; }
336
337 if ( cpTo->cpLeftBorderNumber != fromNumber )
338 { PROPmaskADD( &cpDifMask, CLpropLEFT_BORDER ); }
339 }
340
341 if ( PROPmaskISSET( cpCmpMask, CLpropRIGHT_BORDER ) )
342 {
343 int fromNumber= cpFrom->cpRightBorderNumber;
344
345 if ( fromNumber >= 0 && dam && dam->damBorderMap )
346 { fromNumber= dam->damBorderMap[fromNumber]; }
347
348 if ( cpTo->cpRightBorderNumber != fromNumber )
349 { PROPmaskADD( &cpDifMask, CLpropRIGHT_BORDER ); }
350 }
351
352 /**/
353 if ( PROPmaskISSET( cpCmpMask, CLpropSHADING ) )
354 {
355 int fromNumber= cpFrom->cpShadingNumber;
356
357 if ( fromNumber >= 0 && dam && dam->damShadingMap )
358 { fromNumber= dam->damShadingMap[fromNumber]; }
359
360 if ( cpTo->cpShadingNumber != fromNumber )
361 { PROPmaskADD( &cpDifMask, CLpropSHADING ); }
362 }
363
364 /**/
365 if ( PROPmaskISSET( cpCmpMask, CLpropCLW_WIDTH ) )
366 {
367 if ( cpTo->cpPreferredWidth != cpFrom->cpPreferredWidth )
368 { PROPmaskADD( &cpDifMask, CLpropCLW_WIDTH ); }
369 }
370
371 if ( PROPmaskISSET( cpCmpMask, CLpropCLFTS_WIDTH ) )
372 {
373 if ( cpTo->cpPreferredWidthUnit != cpFrom->cpPreferredWidthUnit )
374 { PROPmaskADD( &cpDifMask, CLpropCLFTS_WIDTH ); }
375 }
376
377 if ( PROPmaskISSET( cpCmpMask, CLpropHOR_MERGE ) )
378 {
379 if ( cpTo->cpHorizontalMerge != cpFrom->cpHorizontalMerge )
380 { PROPmaskADD( &cpDifMask, CLpropHOR_MERGE ); }
381 }
382
383 /**/
384 if ( PROPmaskISSET( cpCmpMask, CLpropVERT_MERGE ) )
385 {
386 if ( cpTo->cpVerticalMerge != cpFrom->cpVerticalMerge )
387 { PROPmaskADD( &cpDifMask, CLpropVERT_MERGE ); }
388 }
389
390 /**/
391 if ( PROPmaskISSET( cpCmpMask, CLpropVALIGN ) )
392 {
393 if ( cpTo->cpValign != cpFrom->cpValign )
394 { PROPmaskADD( &cpDifMask, CLpropVALIGN ); }
395 }
396
397 if ( PROPmaskISSET( cpCmpMask, CLpropTEXT_FLOW ) )
398 {
399 if ( cpTo->cpTextFlow != cpFrom->cpTextFlow )
400 { PROPmaskADD( &cpDifMask, CLpropTEXT_FLOW ); }
401 }
402
403 if ( PROPmaskISSET( cpCmpMask, CLpropTOP_PADDING ) )
404 {
405 if ( cpTo->cpTopPadding != cpFrom->cpTopPadding )
406 { PROPmaskADD( &cpDifMask, CLpropTOP_PADDING ); }
407 }
408
409 if ( PROPmaskISSET( cpCmpMask, CLpropBOTTOM_PADDING ) )
410 {
411 if ( cpTo->cpBottomPadding != cpFrom->cpBottomPadding )
412 { PROPmaskADD( &cpDifMask, CLpropBOTTOM_PADDING ); }
413 }
414
415 if ( PROPmaskISSET( cpCmpMask, CLpropLEFT_PADDING ) )
416 {
417 if ( cpTo->cpLeftPadding != cpFrom->cpLeftPadding )
418 { PROPmaskADD( &cpDifMask, CLpropLEFT_PADDING ); }
419 }
420
421 if ( PROPmaskISSET( cpCmpMask, CLpropRIGHT_PADDING ) )
422 {
423 if ( cpTo->cpRightPadding != cpFrom->cpRightPadding )
424 { PROPmaskADD( &cpDifMask, CLpropRIGHT_PADDING ); }
425 }
426
427 if ( PROPmaskISSET( cpCmpMask, CLpropTOP_PADDING_UNIT ) )
428 {
429 if ( cpTo->cpTopPaddingUnit != cpFrom->cpTopPaddingUnit )
430 { PROPmaskADD( &cpDifMask, CLpropTOP_PADDING_UNIT ); }
431 }
432
433 if ( PROPmaskISSET( cpCmpMask, CLpropBOTTOM_PADDING_UNIT ) )
434 {
435 if ( cpTo->cpBottomPaddingUnit != cpFrom->cpBottomPaddingUnit )
436 { PROPmaskADD( &cpDifMask, CLpropBOTTOM_PADDING_UNIT ); }
437 }
438
439 if ( PROPmaskISSET( cpCmpMask, CLpropLEFT_PADDING_UNIT ) )
440 {
441 if ( cpTo->cpLeftPaddingUnit != cpFrom->cpLeftPaddingUnit )
442 { PROPmaskADD( &cpDifMask, CLpropLEFT_PADDING_UNIT ); }
443 }
444
445 if ( PROPmaskISSET( cpCmpMask, CLpropRIGHT_PADDING_UNIT ) )
446 {
447 if ( cpTo->cpRightPaddingUnit != cpFrom->cpRightPaddingUnit )
448 { PROPmaskADD( &cpDifMask, CLpropRIGHT_PADDING_UNIT ); }
449 }
450
451 if ( pCpDifPask )
452 { utilPropMaskOr( pCpDifPask, pCpDifPask, &cpDifMask ); }
453
454 return;
455 }
456
docCopyCellProperties(CellProperties * cpTo,const CellProperties * cpFrom,const DocumentAttributeMap * dam)457 int docCopyCellProperties( CellProperties * cpTo,
458 const CellProperties * cpFrom,
459 const DocumentAttributeMap * dam )
460 {
461 PropertyMask cpDoneMask;
462 PropertyMask cpSetMask;
463
464 utilPropMaskClear( &cpDoneMask );
465 utilPropMaskClear( &cpSetMask );
466
467 utilPropMaskFill( &cpSetMask, CLprop_COUNT );
468
469 docUpdCellProperties( &cpDoneMask, cpTo, &cpSetMask, cpFrom, dam );
470
471 return 0;
472 }
473
docSetCellProperty(CellProperties * cp,int prop,int arg)474 int docSetCellProperty( CellProperties * cp,
475 int prop,
476 int arg )
477 {
478 switch( prop )
479 {
480 case CLpropCELLX:
481 cp->cpRightBoundaryTwips= arg;
482 break;
483
484 case CLpropTOP_BORDER:
485 cp->cpTopBorderNumber= arg;
486 break;
487 case CLpropBOTTOM_BORDER:
488 cp->cpBottomBorderNumber= arg;
489 break;
490 case CLpropLEFT_BORDER:
491 cp->cpLeftBorderNumber= arg;
492 break;
493 case CLpropRIGHT_BORDER:
494 cp->cpRightBorderNumber= arg;
495 break;
496
497 case CLpropSHADING:
498 cp->cpShadingNumber= arg;
499 break;
500 case CLpropCLW_WIDTH:
501 cp->cpPreferredWidth= arg;
502 break;
503 case CLpropCLFTS_WIDTH:
504 cp->cpPreferredWidthUnit= arg;
505 break;
506
507 case CLpropHOR_MERGE:
508 cp->cpHorizontalMerge= arg;
509 break;
510 case CLpropVERT_MERGE:
511 cp->cpVerticalMerge= arg;
512 break;
513 case CLpropNO_WRAP:
514 cp->cpNoWrap= ( arg != 0 );
515 break;
516
517 case CLpropVALIGN:
518 cp->cpValign= arg;
519 break;
520 case CLpropTEXT_FLOW:
521 cp->cpTextFlow= arg;
522 break;
523
524 case CLpropTOP_PADDING:
525 cp->cpTopPadding= arg;
526 break;
527 case CLpropBOTTOM_PADDING:
528 cp->cpBottomPadding= arg;
529 break;
530 case CLpropLEFT_PADDING:
531 cp->cpLeftPadding= arg;
532 break;
533 case CLpropRIGHT_PADDING:
534 cp->cpRightPadding= arg;
535 break;
536
537 case CLpropTOP_PADDING_UNIT:
538 cp->cpTopPaddingUnit= arg;
539 break;
540 case CLpropBOTTOM_PADDING_UNIT:
541 cp->cpBottomPaddingUnit= arg;
542 break;
543 case CLpropLEFT_PADDING_UNIT:
544 cp->cpLeftPaddingUnit= arg;
545 break;
546 case CLpropRIGHT_PADDING_UNIT:
547 cp->cpRightPaddingUnit= arg;
548 break;
549
550 case CLpropNO_SHADING:
551 cp->cpNoShading= ( arg != 0 );
552 break;
553
554 default:
555 LDEB(prop); return -1;
556 }
557
558 return 0;
559 }
560
docGetCellProperty(const CellProperties * cp,int prop)561 int docGetCellProperty( const CellProperties * cp,
562 int prop )
563 {
564 switch( prop )
565 {
566 case CLpropCELLX:
567 return cp->cpRightBoundaryTwips;
568 break;
569
570 case CLpropTOP_BORDER:
571 return cp->cpTopBorderNumber;
572 case CLpropBOTTOM_BORDER:
573 return cp->cpBottomBorderNumber;
574 case CLpropLEFT_BORDER:
575 return cp->cpLeftBorderNumber;
576 case CLpropRIGHT_BORDER:
577 return cp->cpRightBorderNumber;
578
579 case CLpropSHADING:
580 return cp->cpShadingNumber;
581 case CLpropCLW_WIDTH:
582 return cp->cpPreferredWidth;
583 case CLpropCLFTS_WIDTH:
584 return cp->cpPreferredWidthUnit;
585
586 case CLpropHOR_MERGE:
587 return cp->cpHorizontalMerge;
588 case CLpropVERT_MERGE:
589 return cp->cpVerticalMerge;
590 case CLpropNO_WRAP:
591 return cp->cpNoWrap;
592
593 case CLpropVALIGN:
594 return cp->cpValign;
595 case CLpropTEXT_FLOW:
596 return cp->cpTextFlow;
597
598 case CLpropTOP_PADDING:
599 return cp->cpTopPadding;
600 case CLpropBOTTOM_PADDING:
601 return cp->cpBottomPadding;
602 case CLpropLEFT_PADDING:
603 return cp->cpLeftPadding;
604 case CLpropRIGHT_PADDING:
605 return cp->cpRightPadding;
606
607 case CLpropTOP_PADDING_UNIT:
608 return cp->cpTopPaddingUnit;
609 case CLpropBOTTOM_PADDING_UNIT:
610 return cp->cpBottomPaddingUnit;
611 case CLpropLEFT_PADDING_UNIT:
612 return cp->cpLeftPaddingUnit;
613 case CLpropRIGHT_PADDING_UNIT:
614 return cp->cpRightPaddingUnit;
615
616 case CLpropNO_SHADING:
617 return cp->cpNoShading;
618
619 default:
620 LDEB(prop); return -1;
621 }
622 }
623