1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dlgutil.cxx,v $
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_svx.hxx"
34 // include ---------------------------------------------------------------
37 #include <tools/shl.hxx>
38 #include <tools/urlobj.hxx>
39 #include <unolingu.hxx>
41 #include <svtools/langtab.hxx>
42 #include <svtools/itemset.hxx>
43 #include <sfx2/viewfrm.hxx>
44 #include <sfx2/objsh.hxx>
46 #ifndef _SFXENUMITEM_HXX
47 #include <svtools/eitem.hxx>
50 #include <svx/dialogs.hrc>
52 #include "dlgutil.hxx"
53 #include <svx/dialmgr.hxx>
55 // -----------------------------------------------------------------------
57 String
GetLanguageString( LanguageType eType
)
59 static const SvtLanguageTable aLangTable
;
60 return aLangTable
.GetString( eType
);
63 // -----------------------------------------------------------------------
65 String
GetDicInfoStr( const String
& rName
, const USHORT nLang
, const BOOL bNeg
)
67 INetURLObject aURLObj
;
68 aURLObj
.SetSmartProtocol( INET_PROT_FILE
);
69 aURLObj
.SetSmartURL( rName
, INetURLObject::ENCODE_ALL
);
70 String
aTmp( aURLObj
.GetBase() );
71 aTmp
+= sal_Unicode( ' ' );
75 sal_Char
const sTmp
[] = " (-) ";
76 aTmp
.AppendAscii( sTmp
);
79 if ( LANGUAGE_NONE
== nLang
)
80 aTmp
+= String( ResId( RID_SVXSTR_LANGUAGE_ALL
, DIALOG_MGR() ) );
83 aTmp
+= sal_Unicode( '[' );
84 aTmp
+= ::GetLanguageString( (LanguageType
)nLang
);
85 aTmp
+= sal_Unicode( ']' );
91 // -----------------------------------------------------------------------
93 void SetFieldUnit( MetricField
& rField
, FieldUnit eUnit
, BOOL bAll
)
95 sal_Int64 nFirst
= rField
.Denormalize( rField
.GetFirst( FUNIT_TWIP
) );
96 sal_Int64 nLast
= rField
.Denormalize( rField
.GetLast( FUNIT_TWIP
) );
97 sal_Int64 nMin
= rField
.Denormalize( rField
.GetMin( FUNIT_TWIP
) );
98 sal_Int64 nMax
= rField
.Denormalize( rField
.GetMax( FUNIT_TWIP
) );
113 default: ;//prevent warning
116 rField
.SetUnit( eUnit
);
119 // Amelia : sets the step of "char" and "line" unit , they are same as FUNIT_MM
123 rField
.SetSpinSize( 50 );
127 rField
.SetSpinSize( 2 );
131 rField
.SetSpinSize( 10 );
134 if ( FUNIT_POINT
== eUnit
)
136 if( rField
.GetDecimalDigits() > 1 )
137 rField
.SetDecimalDigits( 1 );
140 rField
.SetDecimalDigits( 2 );
144 rField
.SetFirst( rField
.Normalize( nFirst
), FUNIT_TWIP
);
145 rField
.SetLast( rField
.Normalize( nLast
), FUNIT_TWIP
);
146 rField
.SetMin( rField
.Normalize( nMin
), FUNIT_TWIP
);
147 rField
.SetMax( rField
.Normalize( nMax
), FUNIT_TWIP
);
151 // -----------------------------------------------------------------------
153 void SetFieldUnit( MetricBox
& rBox
, FieldUnit eUnit
, BOOL bAll
)
155 sal_Int64 nMin
= rBox
.Denormalize( rBox
.GetMin( FUNIT_TWIP
) );
156 sal_Int64 nMax
= rBox
.Denormalize( rBox
.GetMax( FUNIT_TWIP
) );
171 default: ;//prevent warning
174 rBox
.SetUnit( eUnit
);
176 if ( FUNIT_POINT
== eUnit
&& rBox
.GetDecimalDigits() > 1 )
177 rBox
.SetDecimalDigits( 1 );
179 rBox
.SetDecimalDigits( 2 );
183 rBox
.SetMin( rBox
.Normalize( nMin
), FUNIT_TWIP
);
184 rBox
.SetMax( rBox
.Normalize( nMax
), FUNIT_TWIP
);
188 // -----------------------------------------------------------------------
190 FieldUnit
GetModuleFieldUnit( const SfxItemSet
* pSet
)
192 FieldUnit eUnit
= FUNIT_INCH
;
193 const SfxPoolItem
* pItem
= NULL
;
194 if ( pSet
&& SFX_ITEM_SET
== pSet
->GetItemState( SID_ATTR_METRIC
, FALSE
, &pItem
) )
195 eUnit
= (FieldUnit
)( (const SfxUInt16Item
*)pItem
)->GetValue();
198 SfxViewFrame
* pFrame
= SfxViewFrame::Current();
199 SfxObjectShell
* pSh
= NULL
;
201 pSh
= pFrame
->GetObjectShell();
202 if ( pSh
) // #93209# the object shell is not always available during reload
204 SfxModule
* pModule
= pSh
->GetModule();
207 const SfxPoolItem
* _pItem
= pModule
->GetItem( SID_ATTR_METRIC
);
209 eUnit
= (FieldUnit
)( (SfxUInt16Item
*)_pItem
)->GetValue();
213 DBG_ERRORFILE( "GetModuleFieldUnit(): no module found" );
219 // -----------------------------------------------------------------------
220 BOOL
GetApplyCharUnit( const SfxItemSet
* pSet
)
222 BOOL bUseCharUnit
= FALSE
;
223 const SfxPoolItem
* pItem
= NULL
;
224 if ( pSet
&& SFX_ITEM_SET
== pSet
->GetItemState( SID_ATTR_APPLYCHARUNIT
, FALSE
, &pItem
) )
225 bUseCharUnit
= (BOOL
)( (const SfxBoolItem
*)pItem
)->GetValue();
228 SfxViewFrame
* pFrame
= SfxViewFrame::Current();
229 SfxObjectShell
* pSh
= NULL
;
231 pSh
= pFrame
->GetObjectShell();
232 if ( pSh
) // #93209# the object shell is not always available during reload
234 SfxModule
* pModule
= pSh
->GetModule();
237 const SfxPoolItem
* pItem
= pModule
->GetItem( SID_ATTR_APPLYCHARUNIT
);
239 bUseCharUnit
= (BOOL
)( (SfxBoolItem
*)pItem
)->GetValue();
243 DBG_ERRORFILE( "GetApplyCharUnit(): no module found" );
250 // -----------------------------------------------------------------------
251 void SetMetricValue( MetricField
& rField
, long nCoreValue
, SfxMapUnit eUnit
)
253 sal_Int64 nVal
= OutputDevice::LogicToLogic( nCoreValue
, (MapUnit
)eUnit
, MAP_100TH_MM
);
254 nVal
= rField
.Normalize( nVal
);
255 rField
.SetValue( nVal
, FUNIT_100TH_MM
);
258 if ( SFX_MAPUNIT_100TH_MM == eUnit )
260 FieldUnit eFUnit = ( (MetricField&)rField ).GetUnit();
261 USHORT nDigits = rField.GetDecimalDigits();
263 if ( FUNIT_MM == eFUnit )
267 else if ( 1 == nDigits )
269 else if ( nDigits > 2 )
271 DBG_ERROR( "too much decimal digits" );
274 rField.SetValue( lCoreValue, FUNIT_MM );
277 else if ( FUNIT_CM == eFUnit )
281 else if ( 1 == nDigits )
283 else if ( 2 == nDigits )
285 else if ( nDigits > 3 )
287 DBG_ERROR( "too much decimal digits" );
290 rField.SetValue( lCoreValue, FUNIT_CM );
294 rField.SetValue( rField.Normalize(
295 ConvertValueToUnit( lCoreValue, eUnit ) ), MapToFieldUnit( eUnit ) );
299 // -----------------------------------------------------------------------
301 long GetCoreValue( const MetricField
& rField
, SfxMapUnit eUnit
)
303 sal_Int64 nVal
= rField
.GetValue( FUNIT_100TH_MM
);
304 // avoid rounding issues
305 const sal_Int64 nSizeMask
= 0xffffffffff000000LL
;
306 bool bRoundBefore
= true;
309 if( (nVal
& nSizeMask
) == 0 )
310 bRoundBefore
= false;
314 if( ((-nVal
) & nSizeMask
) == 0 )
315 bRoundBefore
= false;
318 nVal
= rField
.Denormalize( nVal
);
319 sal_Int64 nUnitVal
= OutputDevice::LogicToLogic( static_cast<long>(nVal
), MAP_100TH_MM
, (MapUnit
)eUnit
);
321 nUnitVal
= rField
.Denormalize( nUnitVal
);
322 return static_cast<long>(nUnitVal
);
325 long nRet = rField.GetValue( MapToFieldUnit( eUnit ) );
326 FieldUnit eFUnit = ( (MetricField&)rField ).GetUnit();
327 USHORT nDigits = rField.GetDecimalDigits();
328 DBG_ASSERT( nDigits <= 2, "decimal digits > 2!" );
332 case SFX_MAPUNIT_100TH_MM:
336 else if ( 1 == nDigits )
342 case SFX_MAPUNIT_TWIP:
347 long nTmp = nRet % nMod;
353 else if ( 1 == nDigits )
356 long nTmp = nRet % nMod;
367 DBG_ERROR( "this unit is not implemented" );
373 return ConvertValueToMap( rField.Denormalize(
374 rField.GetValue( MapToFieldUnit( eUnit ) ) ), eUnit );
378 // -----------------------------------------------------------------------
380 long CalcToUnit( float nIn
, SfxMapUnit eUnit
)
384 DBG_ASSERT( eUnit
== SFX_MAPUNIT_TWIP
||
385 eUnit
== SFX_MAPUNIT_100TH_MM
||
386 eUnit
== SFX_MAPUNIT_10TH_MM
||
387 eUnit
== SFX_MAPUNIT_MM
||
388 eUnit
== SFX_MAPUNIT_CM
, "this unit is not implemented" );
392 if ( SFX_MAPUNIT_TWIP
!= eUnit
)
393 nTmp
= nIn
* 10 / 567;
397 case SFX_MAPUNIT_100TH_MM
: nTmp
*= 100; break;
398 case SFX_MAPUNIT_10TH_MM
: nTmp
*= 10; break;
399 case SFX_MAPUNIT_MM
: break;
400 case SFX_MAPUNIT_CM
: nTmp
/= 10; break;
401 default: ;//prevent warning
405 long nRet
= (long)nTmp
;
407 //! return (long)(nTmp * 20);
410 // -----------------------------------------------------------------------
412 long ItemToControl( long nIn
, SfxMapUnit eItem
, SfxFieldUnit eCtrl
)
418 case SFX_MAPUNIT_100TH_MM
:
419 case SFX_MAPUNIT_10TH_MM
:
422 if ( eItem
== SFX_MAPUNIT_10TH_MM
)
424 else if ( eItem
== SFX_MAPUNIT_100TH_MM
)
426 nOut
= TransformMetric( nIn
, FUNIT_MM
, (FieldUnit
)eCtrl
);
432 nOut
= TransformMetric( nIn
, FUNIT_CM
, (FieldUnit
)eCtrl
);
436 case SFX_MAPUNIT_1000TH_INCH
:
437 case SFX_MAPUNIT_100TH_INCH
:
438 case SFX_MAPUNIT_10TH_INCH
:
439 case SFX_MAPUNIT_INCH
:
441 if ( eItem
== SFX_MAPUNIT_10TH_INCH
)
443 else if ( eItem
== SFX_MAPUNIT_100TH_INCH
)
445 else if ( eItem
== SFX_MAPUNIT_1000TH_INCH
)
447 nOut
= TransformMetric( nIn
, FUNIT_INCH
, (FieldUnit
)eCtrl
);
451 case SFX_MAPUNIT_POINT
:
453 nOut
= TransformMetric( nIn
, FUNIT_POINT
, (FieldUnit
)eCtrl
);
457 case SFX_MAPUNIT_TWIP
:
459 nOut
= TransformMetric( nIn
, FUNIT_TWIP
, (FieldUnit
)eCtrl
);
462 default: ;//prevent warning
467 // -----------------------------------------------------------------------
469 long ControlToItem( long nIn
, SfxFieldUnit eCtrl
, SfxMapUnit eItem
)
471 return ItemToControl( nIn
, eItem
, eCtrl
);
474 // -----------------------------------------------------------------------
476 FieldUnit
MapToFieldUnit( const SfxMapUnit eUnit
)
480 case SFX_MAPUNIT_100TH_MM
:
481 case SFX_MAPUNIT_10TH_MM
:
488 case SFX_MAPUNIT_1000TH_INCH
:
489 case SFX_MAPUNIT_100TH_INCH
:
490 case SFX_MAPUNIT_10TH_INCH
:
491 case SFX_MAPUNIT_INCH
:
494 case SFX_MAPUNIT_POINT
:
497 case SFX_MAPUNIT_TWIP
:
499 default: ;//prevent warning
504 // -----------------------------------------------------------------------
506 MapUnit
FieldToMapUnit( const SfxFieldUnit
/*eUnit*/ )
511 // -----------------------------------------------------------------------
513 long ConvertValueToMap( long nVal
, SfxMapUnit eUnit
)
519 case SFX_MAPUNIT_10TH_MM
:
520 case SFX_MAPUNIT_10TH_INCH
:
524 case SFX_MAPUNIT_100TH_MM
:
525 case SFX_MAPUNIT_100TH_INCH
:
529 case SFX_MAPUNIT_1000TH_INCH
:
531 default: ;//prevent warning
536 // -----------------------------------------------------------------------
538 long ConvertValueToUnit( long nVal
, SfxMapUnit eUnit
)
544 case SFX_MAPUNIT_10TH_MM
:
545 case SFX_MAPUNIT_10TH_INCH
:
549 case SFX_MAPUNIT_100TH_MM
:
550 case SFX_MAPUNIT_100TH_INCH
:
554 case SFX_MAPUNIT_1000TH_INCH
:
557 default: ;//prevent warning
562 // -----------------------------------------------------------------------
564 long CalcToPoint( long nIn
, SfxMapUnit eUnit
, USHORT nFaktor
)
566 DBG_ASSERT( eUnit
== SFX_MAPUNIT_TWIP
||
567 eUnit
== SFX_MAPUNIT_100TH_MM
||
568 eUnit
== SFX_MAPUNIT_10TH_MM
||
569 eUnit
== SFX_MAPUNIT_MM
||
570 eUnit
== SFX_MAPUNIT_CM
, "this unit is not implemented" );
574 if ( SFX_MAPUNIT_TWIP
== eUnit
)
581 case SFX_MAPUNIT_100TH_MM
: nRet
/= 100; break;
582 case SFX_MAPUNIT_10TH_MM
: nRet
/= 10; break;
583 case SFX_MAPUNIT_MM
: break;
584 case SFX_MAPUNIT_CM
: nRet
*= 10; break;
585 default: ;//prevent warning
589 if ( SFX_MAPUNIT_TWIP
!= eUnit
)
592 long nTmp
= nRet
% nMod
;
598 return nRet
* nFaktor
/ 20;
601 // -----------------------------------------------------------------------
603 long CMToTwips( long nIn
)
607 if ( nIn
<= ( LONG_MAX
/ 567 ) && nIn
>= ( LONG_MIN
/ 567 ) )
612 // -----------------------------------------------------------------------
614 long MMToTwips( long nIn
)
618 if ( nIn
<= ( LONG_MAX
/ 567 ) && nIn
>= ( LONG_MIN
/ 567 ) )
619 nRet
= nIn
* 567 / 10;
623 // -----------------------------------------------------------------------
625 long InchToTwips( long nIn
)
629 if ( nIn
<= ( LONG_MAX
/ 1440 ) && nIn
>= ( LONG_MIN
/ 1440 ) )
634 // -----------------------------------------------------------------------
636 long PointToTwips( long nIn
)
640 if ( nIn
<= ( LONG_MAX
/ 20 ) && nIn
>= ( LONG_MIN
/ 20 ) )
645 // -----------------------------------------------------------------------
647 long PicaToTwips( long nIn
)
651 if ( nIn
<= ( LONG_MAX
/ 240 ) && nIn
>= ( LONG_MIN
/ 240 ) )
656 // -----------------------------------------------------------------------
658 long TwipsToCM( long nIn
)
660 long nRet
= nIn
/ 567;
664 // -----------------------------------------------------------------------
666 long InchToCM( long nIn
)
670 if ( nIn
<= ( LONG_MAX
/ 254 ) && nIn
>= ( LONG_MIN
/ 254 ) )
671 nRet
= nIn
* 254 / 100;
675 // -----------------------------------------------------------------------
677 long MMToCM( long nIn
)
679 long nRet
= nIn
/ 10;
683 // -----------------------------------------------------------------------
685 long PointToCM( long nIn
)
689 if ( nIn
<= ( LONG_MAX
/ 20 ) && nIn
>= ( LONG_MIN
/ 20 ) )
690 nRet
= nIn
* 20 / 567;
694 // -----------------------------------------------------------------------
696 long PicaToCM( long nIn
)
700 if ( nIn
<= ( LONG_MAX
/ 12 / 20 ) && nIn
>= ( LONG_MIN
/ 12 / 20 ) )
701 nRet
= nIn
* 12 * 20 / 567;
705 // -----------------------------------------------------------------------
707 long TwipsToMM( long nIn
)
711 if ( nIn
<= ( LONG_MAX
/ 10 ) && nIn
>= ( LONG_MIN
/ 10 ) )
712 nRet
= nIn
* 10 / 566;
716 // -----------------------------------------------------------------------
718 long CMToMM( long nIn
)
722 if ( nIn
<= ( LONG_MAX
/ 10 ) && nIn
>= ( LONG_MIN
/ 10 ) )
727 // -----------------------------------------------------------------------
729 long InchToMM( long nIn
)
733 if ( nIn
<= ( LONG_MAX
/ 254 ) && nIn
>= ( LONG_MIN
/ 254 ) )
734 nRet
= nIn
* 254 / 10;
738 // -----------------------------------------------------------------------
740 long PointToMM( long nIn
)
744 if ( nIn
<= ( LONG_MAX
/ 200 ) && nIn
>= ( LONG_MIN
/ 200 ) )
745 nRet
= nIn
* 200 / 567;
749 // -----------------------------------------------------------------------
751 long PicaToMM( long nIn
)
755 if ( nIn
<= ( LONG_MAX
/ 12 / 200 ) && nIn
>= ( LONG_MIN
/ 12 / 200 ) )
756 nRet
= nIn
* 12 * 200 / 567;
760 // -----------------------------------------------------------------------
762 long TwipsToInch( long nIn
)
764 long nRet
= nIn
/ 1440;
768 // -----------------------------------------------------------------------
770 long CMToInch( long nIn
)
774 if ( nIn
<= ( LONG_MAX
/ 100 ) && nIn
>= ( LONG_MIN
/ 100 ) )
775 nRet
= nIn
* 100 / 254;
779 // -----------------------------------------------------------------------
781 long MMToInch( long nIn
)
785 if ( nIn
<= ( LONG_MAX
/ 10 ) && nIn
>= ( LONG_MIN
/ 10 ) )
786 nRet
= nIn
* 10 / 254;
790 // -----------------------------------------------------------------------
792 long PointToInch( long nIn
)
794 long nRet
= nIn
/ 72;
798 // -----------------------------------------------------------------------
800 long PicaToInch( long nIn
)
806 // -----------------------------------------------------------------------
808 long TwipsToPoint( long nIn
)
810 long nRet
= nIn
/ 20;
814 // -----------------------------------------------------------------------
816 long InchToPoint( long nIn
)
820 if ( nIn
<= ( LONG_MAX
/ 72 ) && nIn
>= ( LONG_MIN
/ 72 ) )
825 // -----------------------------------------------------------------------
827 long CMToPoint( long nIn
)
831 if ( nIn
<= ( LONG_MAX
/ 567 ) && nIn
>= ( LONG_MIN
/ 567 ) )
832 nRet
= nIn
* 567 / 20;
836 // -----------------------------------------------------------------------
838 long MMToPoint( long nIn
)
842 if ( nIn
<= ( LONG_MAX
/ 567 ) && nIn
>= ( LONG_MIN
/ 567 ) )
843 nRet
= nIn
* 567 / 200;
847 // -----------------------------------------------------------------------
849 long PicaToPoint( long nIn
)
851 long nRet
= nIn
/ 12;
855 // -----------------------------------------------------------------------
857 long TwipsToPica( long nIn
)
859 long nRet
= nIn
/ 240;
863 // -----------------------------------------------------------------------
865 long InchToPica( long nIn
)
869 if ( nIn
<= ( LONG_MAX
/ 6 ) && nIn
>= ( LONG_MIN
/ 6 ) )
874 // -----------------------------------------------------------------------
876 long PointToPica( long nIn
)
880 if ( nIn
<= ( LONG_MAX
/ 12 ) && nIn
>= ( LONG_MIN
/ 12 ) )
885 // -----------------------------------------------------------------------
887 long CMToPica( long nIn
)
891 if ( nIn
<= ( LONG_MAX
/ 567 ) && nIn
>= ( LONG_MIN
/ 567 ) )
892 nRet
= nIn
* 567 / 20 / 12;
896 // -----------------------------------------------------------------------
898 long MMToPica( long nIn
)
902 if ( nIn
<= ( LONG_MAX
/ 567 ) && nIn
>= ( LONG_MIN
/ 567 ) )
903 nRet
= nIn
* 567 / 200 / 12;
907 // -----------------------------------------------------------------------
909 long Nothing( long nIn
)
915 FUNC_CONVERT ConvertTable
[6][6] =
917 // CM, MM INCH POINT PICAS=32 TWIPS
918 { Nothing
, CMToMM
, CMToInch
, CMToPoint
, CMToPica
, CMToTwips
},
919 { MMToCM
, Nothing
, MMToInch
, MMToPoint
, MMToPica
, MMToTwips
},
920 { InchToCM
, InchToMM
, Nothing
, InchToPoint
, InchToPica
, InchToTwips
},
921 { PointToCM
, PointToMM
, PointToInch
, Nothing
, PointToPica
, PointToTwips
},
922 { PicaToCM
, PicaToMM
, PicaToInch
, PicaToPoint
, Nothing
, PicaToTwips
},
923 { TwipsToCM
, TwipsToMM
, TwipsToInch
, TwipsToPoint
,TwipsToPica
, Nothing
}
926 // -----------------------------------------------------------------------
928 long TransformMetric( long nVal
, FieldUnit aOld
, FieldUnit aNew
)
930 if ( aOld
== FUNIT_NONE
|| aNew
== FUNIT_NONE
||
931 aOld
== FUNIT_CUSTOM
|| aNew
== FUNIT_CUSTOM
)
953 default: ;//prevent warning
970 default: ;//prevent warning
972 return ConvertTable
[nOld
][nNew
]( nVal
);
975 String
ConvertPosSizeToIniString( const Point
& rPos
, const Size
& rSize
)
977 String aRet
= String::CreateFromInt32( rPos
.X() );
979 aRet
+= String::CreateFromInt32( rPos
.Y() );
981 aRet
+= String::CreateFromInt32( rSize
.Width() );
983 aRet
+= String::CreateFromInt32( rSize
.Height() );
987 sal_Bool
ConvertIniStringToPosSize( const String
& rIniStr
, Point
& rPos
, Size
& rSize
)
989 if ( rIniStr
.GetTokenCount('/') != 4 )
993 rPos
.X() = rIniStr
.GetToken( 0, '/', nIdx
).ToInt32();
994 rPos
.Y() = rIniStr
.GetToken( 0, '/', nIdx
).ToInt32();
995 rSize
.Width() = rIniStr
.GetToken( 0, '/', nIdx
).ToInt32();
996 rSize
.Height() = rIniStr
.GetToken( 0, '/', nIdx
).ToInt32();
998 // negative sizes are invalid
999 if ( rSize
.Width() < 0 || rSize
.Height() < 0 )