diff options
author | Malte Timmermann [mt] <malte.timmermann@oracle.com> | 2011-02-15 17:14:59 +0100 |
---|---|---|
committer | Malte Timmermann [mt] <malte.timmermann@oracle.com> | 2011-02-15 17:14:59 +0100 |
commit | f42f3b496a1d956f72fad8aaf37da790e89ed803 (patch) | |
tree | b6f9cea18fda9b1c8a0af9642958a9671de6f713 /cui/source/tabpages/tpgradnt.cxx | |
parent | de539c71865e6eec7b1db38031f661d7d8ad0714 (diff) | |
parent | 16680c16eb84b5315dbbeeb61b3693c4d567640a (diff) |
accfixes: merged to m100
Diffstat (limited to 'cui/source/tabpages/tpgradnt.cxx')
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index bb81be3196c5..3947a4d85aba 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -165,7 +165,7 @@ SvxGradientTabPage::SvxGradientTabPage aLbGradients.SetAccessibleRelationLabeledBy(&aLbGradients); // #i76307# always paint the preview in LTR, because this is what the document does - aCtlPreview.EnableRTL( FALSE ); + aCtlPreview.EnableRTL( sal_False ); } // ----------------------------------------------------------------------- @@ -184,12 +184,12 @@ void SvxGradientTabPage::Construct() void SvxGradientTabPage::ActivatePage( const SfxItemSet& ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -278,13 +278,13 @@ long SvxGradientTabPage::CheckChanges_Impl() aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { XGradient aGradient = pGradientList->GetGradient( nPos )->GetGradient(); @@ -328,7 +328,7 @@ long SvxGradientTabPage::CheckChanges_Impl() case RET_CANCEL: // return( -1L ); <-- wuerde die Seite nicht verlassen break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } @@ -343,15 +343,15 @@ long SvxGradientTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) { - if( *pDlgType == 0 && *pPageType == PT_GRADIENT && *pbAreaTP == FALSE ) + if( *pDlgType == 0 && *pPageType == PT_GRADIENT && *pbAreaTP == sal_False ) { // CheckChanges(); <-- doppelte Abfrage ? XGradient* pXGradient = NULL; String aString; - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { pXGradient = new XGradient( pGradientList->GetGradient( nPos )->GetGradient() ); @@ -365,11 +365,11 @@ BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); } DBG_ASSERT( pXGradient, "XGradient konnte nicht erzeugt werden" ); rSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); @@ -377,7 +377,7 @@ BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) delete pXGradient; } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -420,11 +420,11 @@ IMPL_LINK( SvxGradientTabPage, ModifiedHdl_Impl, void *, pControl ) aLbColorTo.GetSelectEntryColor(), eXGS, static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); // Enablen/Disablen von Controls if( pControl == &aLbGradientType || pControl == this ) @@ -450,18 +450,18 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pGradientList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pGradientList->GetGradient( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -469,17 +469,17 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 WarningBox* pWarnBox = NULL; - USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; while( pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pGradientList->GetGradient( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { @@ -508,11 +508,11 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); XGradientEntry* pEntry = new XGradientEntry( aXGradient, aName ); pGradientList->Insert( pEntry, nCount ); @@ -524,7 +524,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbGradients.GetPosPixel(), aLbGradients.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); //aLbGradients.Invalidate(); @@ -551,7 +551,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -567,33 +567,33 @@ IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 long nCount = pGradientList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pGradientList->GetGradient( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; XGradient aXGradient( aLbColorFrom.GetSelectEntryColor(), aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); XGradientEntry* pEntry = new XGradientEntry( aXGradient, aName ); @@ -623,7 +623,7 @@ IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -659,7 +659,7 @@ IMPL_LINK( SvxGradientTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnGradientListState & CT_MODIFIED ) { @@ -833,10 +833,10 @@ IMPL_LINK( SvxGradientTabPage, ChangeGradientHdl_Impl, void *, EMPTYARG ) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) ) { if( ( XFILL_GRADIENT == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) ) ) + ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True, &pPoolItem ) ) ) { pGradient = new XGradient( ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ); } @@ -855,7 +855,7 @@ IMPL_LINK( SvxGradientTabPage, ChangeGradientHdl_Impl, void *, EMPTYARG ) XGradientStyle eXGS = pGradient->GetGradientStyle(); aLbGradientType.SelectEntryPos( - sal::static_int_cast< USHORT >( eXGS ) ); + sal::static_int_cast< sal_uInt16 >( eXGS ) ); // Wenn der EIntrag nicht in der Listbox ist, werden die Farben // temporaer hinzugenommen aLbColorFrom.SetNoSelection(); |