diff options
Diffstat (limited to 'cui/source/tabpages/measure.cxx')
-rw-r--r-- | cui/source/tabpages/measure.cxx | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 7192cd64e..041d2cc74 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -52,7 +52,7 @@ #include <sfx2/request.hxx> //add CHINA001 #include "svx/ofaitem.hxx" //add CHINA001 -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST, @@ -128,7 +128,7 @@ SvxMeasurePage::SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ) : aAttrSet ( *rInAttrs.GetPool() ), pView( 0 ), - bPositionModified ( FALSE ) + bPositionModified ( sal_False ) { FillUnitLB(); @@ -273,7 +273,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbBelowRefEdge.SetState( ( ( const SdrMeasureBelowRefEdgeItem& )rAttrs.Get( SDRATTR_MEASUREBELOWREFEDGE ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbBelowRefEdge.EnableTriState( FALSE ); + aTsbBelowRefEdge.EnableTriState( sal_False ); } else { @@ -287,7 +287,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREDECIMALPLACES ); if( pItem ) { - INT16 nValue = ( ( const SdrMeasureDecimalPlacesItem* )pItem )->GetValue(); + sal_Int16 nValue = ( ( const SdrMeasureDecimalPlacesItem* )pItem )->GetValue(); aMtrFldDecimalPlaces.SetValue( nValue ); } else @@ -302,7 +302,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbParallel.SetState( ( ( const SdrMeasureTextRota90Item& )rAttrs.Get( SDRATTR_MEASURETEXTROTA90 ) ). GetValue() ? STATE_NOCHECK : STATE_CHECK ); - aTsbParallel.EnableTriState( FALSE ); + aTsbParallel.EnableTriState( sal_False ); } else { @@ -315,7 +315,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbShowUnit.SetState( ( ( const SdrMeasureShowUnitItem& )rAttrs.Get( SDRATTR_MEASURESHOWUNIT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbShowUnit.EnableTriState( FALSE ); + aTsbShowUnit.EnableTriState( sal_False ); } else { @@ -329,7 +329,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) long nFieldUnit = (long) ( ( const SdrMeasureUnitItem& )rAttrs. Get( SDRATTR_MEASUREUNIT ) ).GetValue(); - for( USHORT i = 0; i < aLbUnit.GetEntryCount(); ++i ) + for( sal_uInt16 i = 0; i < aLbUnit.GetEntryCount(); ++i ) { if ( (long)aLbUnit.GetEntryData( i ) == nFieldUnit ) { @@ -352,8 +352,8 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) { - aTsbAutoPosV.EnableTriState( FALSE ); - aTsbAutoPosH.EnableTriState( FALSE ); + aTsbAutoPosV.EnableTriState( sal_False ); + aTsbAutoPosH.EnableTriState( sal_False ); SdrMeasureTextHPos eHPos = (SdrMeasureTextHPos) ( ( const SdrMeasureTextHPosItem& )rAttrs.Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue(); @@ -431,7 +431,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) ChangeAttrHdl_Impl( &aTsbShowUnit ); aCtlPreview.SetAttributes( rAttrs ); - bPositionModified = FALSE; + bPositionModified = sal_False; } /************************************************************************* @@ -440,86 +440,86 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - INT32 nValue; + sal_Bool bModified = sal_False; + sal_Int32 nValue; TriState eState; if( aMtrFldLineDist.GetText() != aMtrFldLineDist.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLineDist, eUnit ); rAttrs.Put( SdrMeasureLineDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelplineOverhang.GetText() != aMtrFldHelplineOverhang.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); rAttrs.Put( SdrMeasureHelplineOverhangItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelplineDist.GetText() != aMtrFldHelplineDist.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); rAttrs.Put( SdrMeasureHelplineDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelpline1Len.GetText() != aMtrFldHelpline1Len.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); rAttrs.Put( SdrMeasureHelpline1LenItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelpline2Len.GetText() != aMtrFldHelpline2Len.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); rAttrs.Put( SdrMeasureHelpline2LenItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } eState = aTsbBelowRefEdge.GetState(); if( eState != aTsbBelowRefEdge.GetSavedValue() ) { - rAttrs.Put( SdrMeasureBelowRefEdgeItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } if( aMtrFldDecimalPlaces.GetText() != aMtrFldDecimalPlaces.GetSavedValue() ) { - nValue = static_cast<INT32>(aMtrFldDecimalPlaces.GetValue()); + nValue = static_cast<sal_Int32>(aMtrFldDecimalPlaces.GetValue()); rAttrs.Put( SdrMeasureDecimalPlacesItem( - sal::static_int_cast< INT16 >( nValue ) ) ); - bModified = TRUE; + sal::static_int_cast< sal_Int16 >( nValue ) ) ); + bModified = sal_True; } eState = aTsbParallel.GetState(); if( eState != aTsbParallel.GetSavedValue() ) { - rAttrs.Put( SdrMeasureTextRota90Item( (BOOL) STATE_NOCHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureTextRota90Item( (sal_Bool) STATE_NOCHECK == eState ) ); + bModified = sal_True; } eState = aTsbShowUnit.GetState(); if( eState != aTsbShowUnit.GetSavedValue() ) { - rAttrs.Put( SdrMeasureShowUnitItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureShowUnitItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } - USHORT nPos = aLbUnit.GetSelectEntryPos(); + sal_uInt16 nPos = aLbUnit.GetSelectEntryPos(); if( nPos != aLbUnit.GetSavedValue() ) { if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nFieldUnit = (USHORT)(long)aLbUnit.GetEntryData( nPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbUnit.GetEntryData( nPos ); FieldUnit _eUnit = (FieldUnit) nFieldUnit; rAttrs.Put( SdrMeasureUnitItem( _eUnit ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -568,13 +568,13 @@ BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) if( eOldVPos != eVPos ) { rAttrs.Put( SdrMeasureTextVPosItem( eVPos ) ); - bModified = TRUE; + bModified = sal_True; } } else { rAttrs.Put( SdrMeasureTextVPosItem( eVPos ) ); - bModified = TRUE; + bModified = sal_True; } if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) @@ -584,13 +584,13 @@ BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) if( eOldHPos != eHPos ) { rAttrs.Put( SdrMeasureTextHPosItem( eHPos ) ); - bModified = TRUE; + bModified = sal_True; } } else { rAttrs.Put( SdrMeasureTextHPosItem( eHPos ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -630,7 +630,7 @@ SfxTabPage* SvxMeasurePage::Create( Window* pWindow, |* \************************************************************************/ -USHORT* SvxMeasurePage::GetRanges() +sal_uInt16* SvxMeasurePage::GetRanges() { return( pRanges ); } @@ -712,31 +712,31 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) if( p == &aMtrFldLineDist ) { - INT32 nValue = GetCoreValue( aMtrFldLineDist, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLineDist, eUnit ); aAttrSet.Put( SdrMeasureLineDistItem( nValue ) ); } if( p == &aMtrFldHelplineOverhang ) { - INT32 nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); aAttrSet.Put( SdrMeasureHelplineOverhangItem( nValue) ); } if( p == &aMtrFldHelplineDist ) { - INT32 nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); aAttrSet.Put( SdrMeasureHelplineDistItem( nValue) ); } if( p == &aMtrFldHelpline1Len ) { - INT32 nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); aAttrSet.Put( SdrMeasureHelpline1LenItem( nValue ) ); } if( p == &aMtrFldHelpline2Len ) { - INT32 nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); aAttrSet.Put( SdrMeasureHelpline2LenItem( nValue ) ); } @@ -744,12 +744,12 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) { TriState eState = aTsbBelowRefEdge.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (BOOL) STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) STATE_CHECK == eState ) ); } if( p == &aMtrFldDecimalPlaces ) { - INT16 nValue = sal::static_int_cast< INT16 >( + sal_Int16 nValue = sal::static_int_cast< sal_Int16 >( aMtrFldDecimalPlaces.GetValue() ); aAttrSet.Put( SdrMeasureDecimalPlacesItem( nValue ) ); } @@ -758,22 +758,22 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) { TriState eState = aTsbParallel.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureTextRota90Item( (BOOL) !STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureTextRota90Item( (sal_Bool) !STATE_CHECK == eState ) ); } if( p == &aTsbShowUnit ) { TriState eState = aTsbShowUnit.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureShowUnitItem( (BOOL) STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureShowUnitItem( (sal_Bool) STATE_CHECK == eState ) ); } if( p == &aLbUnit ) { - USHORT nPos = aLbUnit.GetSelectEntryPos(); + sal_uInt16 nPos = aLbUnit.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nFieldUnit = (USHORT)(long)aLbUnit.GetEntryData( nPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbUnit.GetEntryData( nPos ); FieldUnit _eUnit = (FieldUnit) nFieldUnit; aAttrSet.Put( SdrMeasureUnitItem( _eUnit ) ); } @@ -781,7 +781,7 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) if( p == &aTsbAutoPosV || p == &aTsbAutoPosH || p == &aCtlPosition ) { - bPositionModified = TRUE; + bPositionModified = sal_True; // Position RECT_POINT eRP = aCtlPosition.GetActualRP(); @@ -851,10 +851,10 @@ void SvxMeasurePage::FillUnitLB() long nUnit = FUNIT_NONE; String aStrMetric( CUI_RES( STR_MEASURE_AUTOMATIC ) ); - USHORT nPos = aLbUnit.InsertEntry( aStrMetric ); + sal_uInt16 nPos = aLbUnit.InsertEntry( aStrMetric ); aLbUnit.SetEntryData( nPos, (void*)nUnit ); - for( USHORT i = 0; i < aMetricArr.Count(); ++i ) + for( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i ) { aStrMetric = aMetricArr.GetStringByPos( i ); nUnit = aMetricArr.GetValue( i ); |