Update ooo320-m1
[ooovba.git] / rsc / source / res / rscrange.cxx
blob589d638d1ae452ea734812b84b93b5e6477d51b7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: rscrange.cxx,v $
10 * $Revision: 1.11 $
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 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_rsc.hxx"
33 /****************** I N C L U D E S **************************************/
35 // C and C++ Includes.
36 #include <stdlib.h>
37 #include <stdio.h>
38 #include <string.h>
40 // Solar Definitionen
41 #include <tools/solar.h>
43 // Programmabh�ngige Includes.
44 #include <rscrange.hxx>
46 /****************** D E F I N E S ****************************************/
47 /****************** C O D E **********************************************/
48 /****************** R s c R a n g e **************************************/
49 /*************************************************************************
51 |* RscRange::RscRange()
53 |* Beschreibung
54 |* Ersterstellung MM 03.04.91
55 |* Letzte Aenderung MM 03.04.91
57 *************************************************************************/
58 RscRange::RscRange( Atom nId, sal_uInt32 nTypeId )
59 : RscTop( nId, nTypeId )
61 nMin = nMax = 0;
62 nSize = ALIGNED_SIZE( sizeof( RscRangeInst ) );
65 /*************************************************************************
67 |* RscRange::GetClassType()
69 |* Beschreibung
70 |* Ersterstellung MM 03.04.91
71 |* Letzte Aenderung MM 03.04.91
73 *************************************************************************/
74 RSCCLASS_TYPE RscRange::GetClassType() const
76 return RSCCLASS_NUMBER;
79 /*************************************************************************
81 |* RscRange::SetRange()
83 |* Beschreibung
84 |* Ersterstellung MM 03.04.91
85 |* Letzte Aenderung MM 03.04.91
87 *************************************************************************/
88 ERRTYPE RscRange::SetRange( INT32 nMinimum, INT32 nMaximum )
90 if( nMinimum > nMaximum )
92 nMin = nMaximum;
93 nMax = nMinimum;
95 else
97 nMax = nMaximum;
98 nMin = nMinimum;
101 return( ERR_OK );
104 /*************************************************************************
106 |* RscRange::IsValueDefault()
108 |* Beschreibung
109 |* Ersterstellung MM 15.02.92
110 |* Letzte Aenderung MM 15.02.92
112 *************************************************************************/
113 BOOL RscRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
115 if( pDef )
117 if( ((RscRangeInst*)rInst.pData)->nValue ==
118 ((RscRangeInst*)pDef)->nValue )
120 return TRUE;
124 return FALSE;
127 /*************************************************************************
129 |* RscRange::SetNumber()
131 |* Beschreibung
132 |* Ersterstellung MM 03.04.91
133 |* Letzte Aenderung MM 03.04.91
135 *************************************************************************/
136 ERRTYPE RscRange::SetNumber( const RSCINST & rInst, INT32 nValue )
138 if( nMax < nValue || nMin > nValue )
139 return( ERR_RSCRANGE_OUTDEFSET );
140 ((RscRangeInst *)rInst.pData)->nValue = (sal_uInt16)( nValue - nMin );
141 ((RscRangeInst *)rInst.pData)->bDflt = FALSE;
142 return( ERR_OK );
145 /*************************************************************************
147 |* RscRange::GetNumber()
149 |* Beschreibung
150 |* Ersterstellung MM 22.04.91
151 |* Letzte Aenderung MM 22.04.91
153 *************************************************************************/
154 ERRTYPE RscRange::GetNumber( const RSCINST & rInst, INT32 * pN )
156 *pN = ((RscRangeInst *)rInst.pData)->nValue + nMin;
157 return( ERR_OK );
160 /*************************************************************************
162 |* RscRange::Create()
164 |* Beschreibung
165 |* Ersterstellung MM 03.04.91
166 |* Letzte Aenderung MM 03.04.91
168 *************************************************************************/
169 RSCINST RscRange::Create( RSCINST * pInst, const RSCINST & rDflt,
170 BOOL bOwnClass )
172 RSCINST aInst;
174 if( !pInst )
176 aInst.pClass = this;
177 aInst.pData = (CLASS_DATA)
178 rtl_allocateMemory( sizeof( RscRangeInst ) );
180 else
181 aInst = *pInst;
182 if( !bOwnClass && rDflt.IsInst() )
183 bOwnClass = rDflt.pClass->InHierarchy( this );
185 if( bOwnClass )
186 memmove( aInst.pData, rDflt.pData, sizeof( RscRangeInst ) );
187 else
189 if( 0L >= nMin && 0L <= nMax )
190 ((RscRangeInst *)aInst.pData)->nValue = (sal_uInt16)(0L - nMin);
191 else
192 ((RscRangeInst *)aInst.pData)->nValue = 0;
193 ((RscRangeInst *)aInst.pData)->bDflt = TRUE;
196 return( aInst );
199 /*************************************************************************
201 |* RscRange::WriteSrc()
203 |* Beschreibung
204 |* Ersterstellung MM 08.04.91
205 |* Letzte Aenderung MM 08.04.91
207 *************************************************************************/
208 void RscRange::WriteSrc( const RSCINST & rInst, FILE * fOutput,
209 RscTypCont *, sal_uInt32, const char * )
211 fprintf( fOutput, "%ld", long( ((RscRangeInst *)rInst.pData)->nValue + nMin ) );
214 /*************************************************************************
216 |* RscRange::WriteRc()
218 |* Beschreibung
219 |* Ersterstellung MM 15.04.91
220 |* Letzte Aenderung MM 15.04.91
222 *************************************************************************/
223 ERRTYPE RscRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
224 RscTypCont *, sal_uInt32, BOOL )
226 if( nMin >= 0 )
228 sal_uInt16 n;
229 n = (sal_uInt16)(((RscRangeInst *)rInst.pData)->nValue + nMin);
230 aMem.Put( n );
232 else
234 sal_Int16 n;
235 n = (sal_Int16)(((RscRangeInst *)rInst.pData)->nValue + nMin);
236 aMem.Put( n );
239 return( ERR_OK );
242 //=======================================================================
243 void RscRange::WriteRcAccess
245 FILE * fOutput,
246 RscTypCont * /*pTC*/,
247 const char * pName
250 fprintf( fOutput, "\t\tSet%s( ", pName );
251 if( nMin >= 0 )
252 fprintf( fOutput, "*(sal_uInt32 *)(pResData+nOffset) );\n" );
253 else
254 fprintf( fOutput, "*(sal_Int32 *)(pResData+nOffset) );\n" );
255 fprintf( fOutput, "\t\tnOffset += sizeof( sal_uInt32 );\n" );
258 /****************** R s c L o n g R a n g e ******************************/
259 /*************************************************************************
261 |* RscLongRange::RscLongRange()
263 |* Beschreibung
264 |* Ersterstellung MM 18.07.94
265 |* Letzte Aenderung MM 18.07.94
267 *************************************************************************/
268 RscLongRange::RscLongRange( Atom nId, sal_uInt32 nTypeId )
269 : RscTop( nId, nTypeId )
271 nMin = nMax = 0;
272 nSize = ALIGNED_SIZE( sizeof( RscLongRangeInst ) );
275 /*************************************************************************
277 |* RscLongRange::GetClassType()
279 |* Beschreibung
280 |* Ersterstellung MM 18.07.94
281 |* Letzte Aenderung MM 18.07.94
283 *************************************************************************/
284 RSCCLASS_TYPE RscLongRange::GetClassType() const
286 return RSCCLASS_NUMBER;
289 /*************************************************************************
291 |* RscLongRange::SetRange()
293 |* Beschreibung
294 |* Ersterstellung MM 18.07.94
295 |* Letzte Aenderung MM 18.07.94
297 *************************************************************************/
298 ERRTYPE RscLongRange::SetRange( INT32 nMinimum, INT32 nMaximum )
300 if( nMinimum > nMaximum )
302 nMin = nMaximum;
303 nMax = nMinimum;
305 else
307 nMax = nMaximum;
308 nMin = nMinimum;
311 return( ERR_OK );
314 /*************************************************************************
316 |* RscLongRange::IsValueDefault()
318 |* Beschreibung
319 |* Ersterstellung MM 15.02.92
320 |* Letzte Aenderung MM 15.02.92
322 *************************************************************************/
323 BOOL RscLongRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
325 if( pDef )
326 return 0 == memcmp( &((RscLongRangeInst*)rInst.pData)->nValue,
327 &((RscLongRangeInst*)pDef)->nValue,
328 sizeof( INT32 ) );
330 return FALSE;
333 /*************************************************************************
335 |* RscLongRange::SetNumber()
337 |* Beschreibung
338 |* Ersterstellung MM 18.07.94
339 |* Letzte Aenderung MM 18.07.94
341 *************************************************************************/
342 ERRTYPE RscLongRange::SetNumber( const RSCINST & rInst, INT32 nValue )
344 if( nMax < nValue || nMin > nValue )
345 return( ERR_RSCRANGE_OUTDEFSET );
346 void * pData = &((RscLongRangeInst*)rInst.pData)->nValue;
347 memmove( pData, &nValue, sizeof( INT32 ) );
348 ((RscLongRangeInst *)rInst.pData)->bDflt = FALSE;
349 return( ERR_OK );
352 /*************************************************************************
354 |* RscLongRange::GetNumber()
356 |* Beschreibung
357 |* Ersterstellung MM 22.04.91
358 |* Letzte Aenderung MM 22.04.91
360 *************************************************************************/
361 ERRTYPE RscLongRange::GetNumber( const RSCINST & rInst, INT32 * pN )
363 memmove( pN, &((RscLongRangeInst*)rInst.pData)->nValue,
364 sizeof( INT32 ) );
365 return( ERR_OK );
368 /*************************************************************************
370 |* RscLongRange::Create()
372 |* Beschreibung
373 |* Ersterstellung MM 18.07.94
374 |* Letzte Aenderung MM 18.07.94
376 *************************************************************************/
377 RSCINST RscLongRange::Create( RSCINST * pInst, const RSCINST & rDflt,
378 BOOL bOwnClass )
380 RSCINST aInst;
382 if( !pInst )
384 aInst.pClass = this;
385 aInst.pData = (CLASS_DATA)
386 rtl_allocateMemory( sizeof( RscLongRangeInst ) );
388 else
389 aInst = *pInst;
390 if( !bOwnClass && rDflt.IsInst() )
391 bOwnClass = rDflt.pClass->InHierarchy( this );
393 if( bOwnClass )
394 memmove( aInst.pData, rDflt.pData, sizeof( RscLongRangeInst ) );
395 else
397 INT32 lDflt;
398 if( 0L >= nMin && 0L <= nMax )
399 lDflt = 0;
400 else
401 lDflt = nMin;
402 void * pData = &((RscLongRangeInst*)aInst.pData)->nValue;
403 memmove( pData, &lDflt, sizeof( INT32 ) );
404 ((RscLongRangeInst *)aInst.pData)->bDflt = TRUE;
407 return( aInst );
410 /*************************************************************************
412 |* RscLongRange::WriteSrc()
414 |* Beschreibung
415 |* Ersterstellung MM 18.07.94
416 |* Letzte Aenderung MM 18.07.94
418 *************************************************************************/
419 void RscLongRange::WriteSrc( const RSCINST & rInst, FILE * fOutput,
420 RscTypCont *, sal_uInt32, const char * )
422 INT32 lVal;
423 GetNumber( rInst, &lVal );
424 fprintf( fOutput, "%d", static_cast<int>(lVal) );
427 /*************************************************************************
429 |* RscLongRange::WriteRc()
431 |* Beschreibung
432 |* Ersterstellung MM 18.07.94
433 |* Letzte Aenderung MM 18.04.94
435 *************************************************************************/
436 ERRTYPE RscLongRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
437 RscTypCont *, sal_uInt32, BOOL )
439 INT32 lVal;
441 GetNumber( rInst, &lVal );
442 aMem.Put( (INT32)lVal );
444 return( ERR_OK );
447 //=======================================================================
448 void RscLongRange::WriteRcAccess
450 FILE * fOutput,
451 RscTypCont * /*pTC*/,
452 const char * pName
455 fprintf( fOutput, "\t\tSet%s( ", pName );
456 fprintf( fOutput, "GetLong( pResData+nOffset ) );\n" );
457 fprintf( fOutput, "\t\tnOffset += sizeof( INT32 );\n" );
460 /****************** R s c L o n g E n u m R a n g e *********************/
461 /*************************************************************************
462 |* RscLongEnumRange::RscLongEnumRange()
464 |* Beschreibung
465 *************************************************************************/
466 RscLongEnumRange::RscLongEnumRange( Atom nId, sal_uInt32 nTypeId )
467 : RscLongRange( nId, nTypeId )
471 /*************************************************************************
472 |* RscLongEnumRange::SetConst()
474 |* Beschreibung
475 *************************************************************************/
476 ERRTYPE RscLongEnumRange::SetConst( const RSCINST & rInst, Atom /*nConst*/,
477 INT32 nValue )
479 return SetNumber( rInst, nValue );
482 /****************** R s c I d R a n g e **********************************/
483 /*************************************************************************
485 |* RscIdRange::RscIdRange()
487 |* Beschreibung
488 |* Ersterstellung MM 03.04.91
489 |* Letzte Aenderung MM 03.04.91
491 *************************************************************************/
492 RscIdRange::RscIdRange( Atom nId, sal_uInt32 nTypeId )
493 : RscTop( nId, nTypeId )
495 nSize = ALIGNED_SIZE( sizeof( RscId ) );
496 nMin = nMax = 0;
499 /*************************************************************************
501 |* RscIdRange::RscIdRange()
503 |* Beschreibung
504 |* Ersterstellung MM 03.04.91
505 |* Letzte Aenderung MM 03.04.91
507 *************************************************************************/
508 RSCCLASS_TYPE RscIdRange::GetClassType() const
510 return RSCCLASS_NUMBER;
513 /*************************************************************************
515 |* RscIdRange::Create()
517 |* Beschreibung
518 |* Ersterstellung MM 03.04.91
519 |* Letzte Aenderung MM 03.04.91
521 *************************************************************************/
522 RSCINST RscIdRange::Create( RSCINST * pInst, const RSCINST & rDflt, BOOL bOwnClass ){
523 RSCINST aInst;
524 RscId * pClassData;
526 if( !pInst ){
527 aInst.pClass = this;
528 aInst.pData = (CLASS_DATA)rtl_allocateMemory( sizeof( RscId ) );
530 else
531 aInst = *pInst;
534 if( !bOwnClass && rDflt.IsInst() )
535 bOwnClass = rDflt.pClass->InHierarchy( this );
537 pClassData = (RscId *)aInst.pData;
539 pClassData->Create();
540 if( bOwnClass )
541 *pClassData = *(RscId *)rDflt.pData;
542 else{
543 *pClassData = RscId();
544 if( 0 >= nMin && 0 <= nMax )
545 *pClassData = RscId( (INT32)0 );
546 else
547 *pClassData = RscId( nMin );
548 //cUnused wird fuer Defaultkennung verwendet
549 ((RscId *)aInst.pData)->aExp.cUnused = TRUE;
552 return( aInst );
555 /*************************************************************************
557 |* RscIdRange::Destroy()
559 |* Beschreibung
560 |* Ersterstellung MM 22.11.91
561 |* Letzte Aenderung MM 22.11.91
563 *************************************************************************/
564 void RscIdRange :: Destroy( const RSCINST & rInst ){
565 ((RscId *)rInst.pData)->Destroy();
568 /*************************************************************************
570 |* RscIdRange::IsValueDefault()
572 |* Beschreibung
573 |* Ersterstellung MM 15.01.92
574 |* Letzte Aenderung MM 15.01.92
576 *************************************************************************/
577 BOOL RscIdRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
578 if( pDef ){
579 if( ((RscId*)rInst.pData)->aExp.IsNumber()
580 && ((RscId*)pDef)->aExp.IsNumber() )
582 if( ((RscId*)rInst.pData)->GetNumber() ==
583 ((RscId*)pDef)->GetNumber() )
585 return TRUE;
590 return FALSE;
593 /*************************************************************************
595 |* RscIdRange::SetNumber()
597 |* Beschreibung
598 |* Ersterstellung MM 25.11.91
599 |* Letzte Aenderung MM 25.11.91
601 *************************************************************************/
602 ERRTYPE RscIdRange::SetNumber( const RSCINST & rInst, INT32 nValue )
604 if( nMax < nValue || nMin > nValue )
605 return( ERR_RSCRANGE_OUTDEFSET );
607 *(RscId *)rInst.pData = RscId( nValue );
608 ((RscId *)rInst.pData)->aExp.cUnused = FALSE;
609 return( ERR_OK );
612 /*************************************************************************
614 |* RscIdRange::GetNumber()
616 |* Beschreibung
617 |* Ersterstellung MM 25.11.91
618 |* Letzte Aenderung MM 25.11.91
620 *************************************************************************/
621 ERRTYPE RscIdRange::GetNumber( const RSCINST & rInst, INT32 * plValue ){
622 *plValue = ((RscId *)rInst.pData)->GetNumber();
623 return( ERR_OK );
626 /*************************************************************************
628 |* RscIdRange::SetRef()
630 |* Beschreibung
631 |* Ersterstellung MM 22.11.91
632 |* Letzte Aenderung MM 22.11.91
634 *************************************************************************/
635 ERRTYPE RscIdRange::SetRef( const RSCINST & rInst, const RscId & rRscId ){
636 ERRTYPE aError;
637 if( rRscId.IsId() ){
638 aError = SetNumber( rInst, rRscId );
639 if( aError.IsOk() ){
640 *(RscId *)rInst.pData = rRscId;
641 ((RscId *)rInst.pData)->aExp.cUnused = FALSE;
644 else
645 aError = ERR_RSCRANGE_OUTDEFSET;
647 return( aError );
650 /*************************************************************************
652 |* RscIdRange::GetRef()
654 |* Beschreibung
655 |* Ersterstellung MM 22.11.91
656 |* Letzte Aenderung MM 22.11.91
658 *************************************************************************/
659 ERRTYPE RscIdRange::GetRef( const RSCINST & rInst, RscId * pRscId ){
660 *pRscId = *(RscId *)rInst.pData;
662 return( ERR_OK );
665 /*************************************************************************
667 |* RscIdRange::WriteSrc()
669 |* Beschreibung
670 |* Ersterstellung MM 22.11.91
671 |* Letzte Aenderung MM 25.11.91
673 *************************************************************************/
674 void RscIdRange::WriteSrc( const RSCINST & rInst, FILE * fOutput,
675 RscTypCont *, sal_uInt32, const char * )
677 fprintf( fOutput, "%s", ((RscId *)rInst.pData)->GetName().GetBuffer() );
680 /*************************************************************************
682 |* RscIdRange::WriteRc()
684 |* Beschreibung
685 |* Ersterstellung MM 25.11.91
686 |* Letzte Aenderung MM 25.11.91
688 *************************************************************************/
689 ERRTYPE RscIdRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
690 RscTypCont *, sal_uInt32, BOOL )
692 INT32 lVal = ((RscId*)rInst.pData)->GetNumber();
694 aMem.Put( (INT32)lVal );
696 return( ERR_OK );
699 //=======================================================================
700 void RscIdRange::WriteRcAccess
702 FILE * fOutput,
703 RscTypCont * /*pTC*/,
704 const char * pName
707 fprintf( fOutput, "\t\tSet%s( ", pName );
708 fprintf( fOutput, "GetLong( pResData+nOffset ) );\n" );
709 fprintf( fOutput, "\t\tnOffset += sizeof( INT32 );\n" );
712 /*************************************************************************
714 |* RscIdRange::IsConsistent()
716 |* Beschreibung
717 |* Ersterstellung MM 22.11.91
718 |* Letzte Aenderung MM 22.11.91
720 *************************************************************************/
721 BOOL RscIdRange::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
723 long nValue = ((RscId *)rInst.pData)->GetNumber();
724 if( (nMax >= nValue) && (nMin <= nValue) )
725 return TRUE;
726 else {
727 if( pList )
728 pList->Insert( new RscInconsistent(
729 *(RscId *)rInst.pData, *(RscId *)rInst.pData ) );
730 return FALSE;
734 /****************** R s c B o o l ****************************************/
735 /*************************************************************************
737 |* RscBool::RscBool()
739 |* Beschreibung
740 |* Ersterstellung MM 29.04.91
741 |* Letzte Aenderung MM 29.04.91
743 *************************************************************************/
744 RscBool::RscBool( Atom nId, sal_uInt32 nTypeId )
745 : RscRange( nId, nTypeId )
747 RscRange::SetRange( 0, 1 );
750 /*************************************************************************
752 |* RscBool::GetClassType()
754 |* Beschreibung
755 |* Ersterstellung MM 29.04.91
756 |* Letzte Aenderung MM 29.04.91
758 *************************************************************************/
759 RSCCLASS_TYPE RscBool::GetClassType() const
761 return RSCCLASS_BOOL;
764 /*************************************************************************
766 |* RscBool::WriteSrc()
768 |* Beschreibung
769 |* Ersterstellung MM 29.04.91
770 |* Letzte Aenderung MM 29.04.91
772 *************************************************************************/
773 void RscBool::WriteSrc( const RSCINST & rInst, FILE * fOutput,
774 RscTypCont *, sal_uInt32, const char * )
776 INT32 l;
778 GetNumber( rInst, &l );
779 if( l )
780 fprintf( fOutput, "TRUE" );
781 else
782 fprintf( fOutput, "FALSE" );
785 //=======================================================================
786 void RscBool::WriteRcAccess
788 FILE * fOutput,
789 RscTypCont * /*pTC*/,
790 const char * pName
793 fprintf( fOutput, "\t\tSet%s( ", pName );
794 fprintf( fOutput, "(BOOL)*(short *)(pResData+nOffset) );\n" );
795 fprintf( fOutput, "\t\tnOffset += sizeof( short );\n" );
798 /****************** R s c B r e a k R a n g e ****************************/
799 /*************************************************************************
801 |* RscBreakRange::SetNumber()
803 |* Beschreibung
804 |* Ersterstellung MM 24.06.91
805 |* Letzte Aenderung MM 24.06.91
807 *************************************************************************/
808 RscBreakRange :: RscBreakRange( Atom nId, sal_uInt32 nTypeId )
809 : RscRange( nId, nTypeId )
811 nOutRange = 0xFFFFFFFF;
814 /*************************************************************************
816 |* RscBreakRange::SetNumber()
818 |* Beschreibung
819 |* Ersterstellung MM 24.06.91
820 |* Letzte Aenderung MM 24.06.91
822 *************************************************************************/
823 ERRTYPE RscBreakRange::SetNumber( const RSCINST & rInst, INT32 nValue ){
824 if( nValue == nOutRange )
825 return( ERR_RSCRANGE_OUTDEFSET );
826 else
827 return( RscRange::SetNumber( rInst, nValue ) );
830 /*************************************************************************
832 |* RscBreakRange::Create()
834 |* Beschreibung
835 |* Ersterstellung MM 24.06.91
836 |* Letzte Aenderung MM 24.06.91
838 *************************************************************************/
839 RSCINST RscBreakRange::Create( RSCINST * pInst, const RSCINST & rDflt,
840 BOOL bOwnClass )
842 RSCINST aInst;
843 INT32 l;
845 aInst = RscRange::Create( pInst, rDflt, bOwnClass );
847 GetNumber( aInst, &l );
848 if( l == nOutRange )
849 ((RscRangeInst *)aInst.pData)->nValue++;
851 return( aInst );