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 | 15b95702ce49ff2427c1840e92ea6600d2d9e1e7 (patch) | |
tree | d7d89c8ce27612f230048e8e2f5d24c23d787f28 /cui/source/tabpages/backgrnd.cxx | |
parent | bea3e72005e86cdde5bd8fa848f75e2901d69c44 (diff) | |
parent | 9648a577f081b0468702fb7f0db69b2582b96e72 (diff) |
accfixes: merged to m100
Diffstat (limited to 'cui/source/tabpages/backgrnd.cxx')
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 256 |
1 files changed, 128 insertions, 128 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 39717e543..48a06af8b 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -70,7 +70,7 @@ using namespace ::com::sun::star; // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_VIEW_FLD_PIC, SID_VIEW_FLD_PIC, SID_ATTR_BRUSH, SID_ATTR_BRUSH, @@ -83,10 +83,10 @@ struct SvxBackgroundTable_Impl SvxBrushItem* pCellBrush; SvxBrushItem* pRowBrush; SvxBrushItem* pTableBrush; - USHORT nCellWhich; - USHORT nRowWhich; - USHORT nTableWhich; - USHORT nActPos; + sal_uInt16 nCellWhich; + sal_uInt16 nRowWhich; + sal_uInt16 nTableWhich; + sal_uInt16 nActPos; SvxBackgroundTable_Impl() : pCellBrush(NULL), pRowBrush(NULL), pTableBrush(NULL), @@ -98,7 +98,7 @@ struct SvxBackgroundPara_Impl SvxBrushItem* pParaBrush; SvxBrushItem* pCharBrush; - USHORT nActPos; + sal_uInt16 nActPos; SvxBackgroundPara_Impl() : pParaBrush(NULL), pCharBrush(NULL) {} @@ -107,20 +107,20 @@ struct SvxBackgroundPara_Impl struct SvxBackgroundPage_Impl { Timer* pLoadTimer; - BOOL bIsImportDlgInExecute; + sal_Bool bIsImportDlgInExecute; SvxBackgroundPage_Impl() : - pLoadTimer(NULL), bIsImportDlgInExecute(FALSE) {} + pLoadTimer(NULL), bIsImportDlgInExecute(sal_False) {} }; /* -----------------------------15.08.2002 12:21------------------------------ ---------------------------------------------------------------------------*/ -inline BYTE lcl_PercentToTransparency(long nPercent) +inline sal_uInt8 lcl_PercentToTransparency(long nPercent) { //0xff must not be returned! - return BYTE(nPercent ? (50 + 0xfe * nPercent) / 100 : 0); + return sal_uInt8(nPercent ? (50 + 0xfe * nPercent) / 100 : 0); } -inline BYTE lcl_TransparencyToPercent(BYTE nTrans) +inline sal_uInt8 lcl_TransparencyToPercent(sal_uInt8 nTrans) { return (nTrans * 100 + 127) / 254; } @@ -136,11 +136,11 @@ void lcl_SetTransparency(SvxBrushItem& rBrush, long nTransparency) */ -USHORT GetItemId_Impl( ValueSet& rValueSet, const Color& rCol ) +sal_uInt16 GetItemId_Impl( ValueSet& rValueSet, const Color& rCol ) { - BOOL bFound = FALSE; - USHORT nCount = rValueSet.GetItemCount(); - USHORT n = 1; + sal_Bool bFound = sal_False; + sal_uInt16 nCount = rValueSet.GetItemCount(); + sal_uInt16 n = 1; while ( !bFound && n <= nCount ) { @@ -167,7 +167,7 @@ class BackgroundPreviewImpl : public Window { public: BackgroundPreviewImpl( Window* pParent, - const ResId& rResId, BOOL bIsBmpPreview ); + const ResId& rResId, sal_Bool bIsBmpPreview ); ~BackgroundPreviewImpl(); void NotifyChange( const Color& rColor ); @@ -178,12 +178,12 @@ protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ); private: - const BOOL bIsBmp; + const sal_Bool bIsBmp; Bitmap* pBitmap; Point aDrawPos; Size aDrawSize; Rectangle aDrawRect; - BYTE nTransparency; + sal_uInt8 nTransparency; }; //----------------------------------------------------------------------- @@ -192,7 +192,7 @@ BackgroundPreviewImpl::BackgroundPreviewImpl ( Window* pParent, const ResId& rResId, - BOOL bIsBmpPreview + sal_Bool bIsBmpPreview ) : /* [Beschreibung] @@ -374,12 +374,12 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, this, CUI_RES( WIN_PREVIEW2 ), TRUE ) ), nHtmlMode ( 0 ), - bAllowShowSelector ( TRUE ), - bIsGraphicValid ( FALSE ), - bLinkOnly ( FALSE ), - bResized ( FALSE ), - bColTransparency ( FALSE ), - bGraphTransparency ( FALSE ), + bAllowShowSelector ( sal_True ), + bIsGraphicValid ( sal_False ), + bLinkOnly ( sal_False ), + bResized ( sal_False ), + bColTransparency ( sal_False ), + bGraphTransparency ( sal_False ), pPageImpl ( new SvxBackgroundPage_Impl ), pImportDlg ( NULL ), @@ -393,7 +393,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, const SfxPoolItem* pItem; SfxObjectShell* pShell; - if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_HTML_MODE, FALSE, &pItem ) + if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_HTML_MODE, sal_False, &pItem ) || ( 0 != ( pShell = SfxObjectShell::Current()) && 0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) ) { @@ -444,7 +444,7 @@ SvxBackgroundTabPage::~SvxBackgroundTabPage() //------------------------------------------------------------------------ -USHORT* SvxBackgroundTabPage::GetRanges() +sal_uInt16* SvxBackgroundTabPage::GetRanges() /* [Beschreibung] @@ -482,7 +482,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) // es muss aber im rSet vorhanden sein! // const SfxPoolItem* pX = GetOldItem( rSet, SID_VIEW_FLD_PIC ); // if( pX && pX->ISA(SfxWallpaperItem)) - if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), FALSE)) + if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), sal_False)) { ResetFromWallpaperItem( rSet ); return; @@ -493,17 +493,17 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) aBtnPreview.Check( aUserData.Len() && sal_Unicode('1') == aUserData.GetChar( 0 ) ); // nach Reset kein ShowSelector() mehr aufrufen d"urfen - bAllowShowSelector = FALSE; + bAllowShowSelector = sal_False; // Input-BrushItem besorgen und auswerten const SvxBrushItem* pBgdAttr = NULL; - USHORT nSlot = SID_ATTR_BRUSH; + sal_uInt16 nSlot = SID_ATTR_BRUSH; const SfxPoolItem* pItem; - USHORT nDestValue = USHRT_MAX; + sal_uInt16 nDestValue = USHRT_MAX; if ( SFX_ITEM_SET == rSet.GetItemState( SID_BACKGRND_DESTINATION, - FALSE, &pItem ) ) + sal_False, &pItem ) ) { nDestValue = ((const SfxUInt16Item*)pItem)->GetValue(); aTblLBox.SelectEntryPos(nDestValue); @@ -522,11 +522,11 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) } } else if( SFX_ITEM_SET == rSet.GetItemState( - SID_PARA_BACKGRND_DESTINATION, FALSE, &pItem ) ) + SID_PARA_BACKGRND_DESTINATION, sal_False, &pItem ) ) { nDestValue = ((const SfxUInt16Item*)pItem)->GetValue(); // ist gerade Zeichen aktiviert? - USHORT nParaSel = aParaLBox.GetSelectEntryPos(); + sal_uInt16 nParaSel = aParaLBox.GetSelectEntryPos(); if(1 == nParaSel) { // dann war das ein "Standard" - Aufruf @@ -547,9 +547,9 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) //#111173# the destination item is missing when the parent style has been changed if(USHRT_MAX == nDestValue && (aParaLBox.IsVisible()||aTblLBox.IsVisible())) nDestValue = 0; - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); aBtnTile.Check(); @@ -576,7 +576,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) { if(aTblLBox.IsVisible()) { - USHORT nValue = aTblLBox.GetSelectEntryPos(); + sal_uInt16 nValue = aTblLBox.GetSelectEntryPos(); if ( pTableBck_Impl ) { @@ -590,21 +590,21 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) pTableBck_Impl->nActPos = nValue; nWhich = GetWhich( SID_ATTR_BRUSH ); - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); pTableBck_Impl->pCellBrush = new SvxBrushItem(*pBgdAttr); } pTableBck_Impl->nCellWhich = nWhich; - if ( rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( SID_ATTR_BRUSH_ROW ) ); pTableBck_Impl->pRowBrush = new SvxBrushItem(*pBgdAttr); } pTableBck_Impl->nRowWhich = SID_ATTR_BRUSH_ROW; - if ( rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( SID_ATTR_BRUSH_TABLE ) ); pTableBck_Impl->pTableBrush = new SvxBrushItem(*pBgdAttr); @@ -616,7 +616,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) } else { - USHORT nValue = aParaLBox.GetSelectEntryPos(); + sal_uInt16 nValue = aParaLBox.GetSelectEntryPos(); if ( pParaBck_Impl ) { @@ -629,16 +629,16 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) pParaBck_Impl->nActPos = nValue; nWhich = GetWhich( SID_ATTR_BRUSH ); - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); pParaBck_Impl->pParaBrush = new SvxBrushItem(*pBgdAttr); } nWhich = GetWhich( SID_ATTR_BRUSH_CHAR ); - SfxItemState eState = rSet.GetItemState( nWhich, TRUE ); - eState = rSet.GetItemState( nWhich, FALSE ); - if ( rSet.GetItemState( nWhich, TRUE ) > SFX_ITEM_AVAILABLE ) + SfxItemState eState = rSet.GetItemState( nWhich, sal_True ); + eState = rSet.GetItemState( nWhich, sal_False ); + if ( rSet.GetItemState( nWhich, sal_True ) > SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); pParaBck_Impl->pCharBrush = new SvxBrushItem(*pBgdAttr); @@ -679,12 +679,12 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) // Input-BrushItem besorgen und auswerten const SvxBrushItem* pBgdAttr = NULL; - USHORT nSlot = SID_VIEW_FLD_PIC; - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nSlot = SID_VIEW_FLD_PIC; + sal_uInt16 nWhich = GetWhich( nSlot ); SvxBrushItem* pTemp = 0; const CntWallpaperItem* pItem = 0; - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) { pItem = (const CntWallpaperItem*)&rSet.Get( nWhich ); pTemp = new SvxBrushItem( *pItem, nWhich ); @@ -700,7 +700,7 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) if( aBgdColor != pBgdAttr->GetColor() ) { aBgdColor = pBgdAttr->GetColor(); - USHORT nCol = GetItemId_Impl( aBackgroundColorSet, aBgdColor ); + sal_uInt16 nCol = GetItemId_Impl( aBackgroundColorSet, aBgdColor ); aBackgroundColorSet.SelectItem( nCol ); pPreviewWin1->NotifyChange( aBgdColor ); } @@ -716,10 +716,10 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) } // We now have always a link to the background - bLinkOnly = TRUE; - aBtnLink.Check( TRUE ); - aBtnLink.Show( FALSE ); -// if( !pItem || !pItem->GetWallpaper(FALSE).IsBitmap() ) + bLinkOnly = sal_True; + aBtnLink.Check( sal_True ); + aBtnLink.Show( sal_False ); +// if( !pItem || !pItem->GetWallpaper(sal_False).IsBitmap() ) // aBtnLink.Check(); delete pTemp; @@ -745,7 +745,7 @@ void SvxBackgroundTabPage::FillUserData() //------------------------------------------------------------------------ -BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) /* [Beschreibung] @@ -762,11 +762,11 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) // const SfxPoolItem* pX = GetOldItem( rCoreSet, SID_VIEW_FLD_PIC ); // if( pX && pX->ISA(SfxWallpaperItem)) - if(SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), FALSE)) + if(SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), sal_False)) return FillItemSetWithWallpaperItem( rCoreSet, SID_VIEW_FLD_PIC ); - BOOL bModified = FALSE; - USHORT nSlot = SID_ATTR_BRUSH; + sal_Bool bModified = sal_False; + sal_uInt16 nSlot = SID_ATTR_BRUSH; if ( aTblLBox.IsVisible() ) { @@ -795,18 +795,18 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) break; } } - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); const SfxPoolItem* pOld = GetOldItem( rCoreSet, nSlot ); - SfxItemState eOldItemState = rCoreSet.GetItemState(nSlot, FALSE); + SfxItemState eOldItemState = rCoreSet.GetItemState(nSlot, sal_False); const SfxItemSet& rOldSet = GetItemSet(); - BOOL bGraphTransparencyChanged = bGraphTransparency && (aGraphTransMF.GetText() != aGraphTransMF.GetSavedValue()); + sal_Bool bGraphTransparencyChanged = bGraphTransparency && (aGraphTransMF.GetText() != aGraphTransMF.GetSavedValue()); if ( pOld ) { const SvxBrushItem& rOldItem = (const SvxBrushItem&)*pOld; SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); - const BOOL bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); + const sal_Bool bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); // transparency has to be set if enabled, the color not already set to "No fill" and if( bColTransparency && @@ -825,10 +825,10 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( rOldItem.GetColor() != aBgdColor || (SFX_ITEM_AVAILABLE >= eOldItemState && !aBackgroundColorSet.IsNoSelection())) { - bModified = TRUE; + bModified = sal_True; rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } else @@ -836,8 +836,8 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) // Bitmap-Behandlung: SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); - const BOOL bIsLink = aBtnLink.IsChecked(); - const BOOL bWasLink = (NULL != rOldItem.GetGraphicLink() ); + const sal_Bool bIsLink = aBtnLink.IsChecked(); + const sal_Bool bWasLink = (NULL != rOldItem.GetGraphicLink() ); if ( !bIsLink && !bIsGraphicValid ) @@ -852,7 +852,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) != aBgdGraphic.GetBitmap() ) ) { - bModified = TRUE; + bModified = sal_True; SvxBrushItem aTmpBrush(nWhich); if ( bIsLink ) @@ -870,7 +870,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) rCoreSet.Put(aTmpBrush); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } } @@ -911,7 +911,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != Color( COL_WHITE ) ) { rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) ); - bModified = TRUE; + bModified = sal_True; } if( aTblLBox.IsVisible() ) @@ -925,7 +925,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pTableBck_Impl->pCellBrush != *pOldCell ) { rCoreSet.Put( *pTableBck_Impl->pCellBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -937,7 +937,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pTableBck_Impl->pRowBrush != *pOldRow ) { rCoreSet.Put( *pTableBck_Impl->pRowBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -949,7 +949,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pTableBck_Impl->pTableBrush != *pOldTable ) { rCoreSet.Put( *pTableBck_Impl->pTableBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -957,7 +957,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) { rCoreSet.Put( SfxUInt16Item( SID_BACKGRND_DESTINATION, aTblLBox.GetSelectEntryPos() ) ); - bModified |= TRUE; + bModified |= sal_True; } } else if(aParaLBox.GetData() == &aParaLBox) @@ -971,7 +971,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pParaBck_Impl->pParaBrush != *pOldPara ) { rCoreSet.Put( *pParaBck_Impl->pParaBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -987,7 +987,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) *pParaBck_Impl->pCharBrush != SvxBrushItem(SID_ATTR_BRUSH_CHAR))) { rCoreSet.Put( *pParaBck_Impl->pCharBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -995,23 +995,23 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) { rCoreSet.Put( SfxUInt16Item( SID_BACKGRND_DESTINATION, aParaLBox.GetSelectEntryPos() ) ); - bModified |= TRUE; + bModified |= sal_True; } } return bModified; } -BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, USHORT nSlot) +sal_Bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, sal_uInt16 nSlot) { - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); const SfxPoolItem* pOld = GetOldItem( rCoreSet, nSlot ); const SfxItemSet& rOldSet = GetItemSet(); DBG_ASSERT(pOld,"FillItemSetWithWallpaperItem: Item not found"); SvxBrushItem rOldItem( (const CntWallpaperItem&)*pOld, nWhich ); SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); - const BOOL bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); - BOOL bModified = FALSE; + const sal_Bool bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); + sal_Bool bModified = sal_False; if ( ( (GPOS_NONE == eOldPos) && bIsBrush ) || ( (GPOS_NONE != eOldPos) && !bIsBrush ) ) // Brush <-> Bitmap gewechselt? @@ -1023,12 +1023,12 @@ BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, U // Brush-Behandlung: if ( rOldItem.GetColor() != aBgdColor ) { - bModified = TRUE; + bModified = sal_True; CntWallpaperItem aItem( nWhich ); aItem.SetColor( aBgdColor ); rCoreSet.Put( aItem ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } else @@ -1041,16 +1041,16 @@ BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, U int bBrushChanged = ( rOldItem.GetColor() != aBgdColor ); if( bBitmapChanged || bBrushChanged ) { - bModified = TRUE; + bModified = sal_True; CntWallpaperItem aItem( nWhich ); WallpaperStyle eWallStyle = SvxBrushItem::GraphicPos2WallpaperStyle(eNewPos); - aItem.SetStyle( sal::static_int_cast< USHORT >( eWallStyle ) ); + aItem.SetStyle( sal::static_int_cast< sal_uInt16 >( eWallStyle ) ); aItem.SetColor( aBgdColor ); aItem.SetBitmapURL( aBgdGraphicPath ); rCoreSet.Put( aItem ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } } @@ -1066,13 +1066,13 @@ BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, U { WallpaperStyle eWallStyle = SvxBrushItem::GraphicPos2WallpaperStyle( GetGraphicPosition_Impl() ); - aItem.SetStyle( sal::static_int_cast< USHORT >( eWallStyle ) ); + aItem.SetStyle( sal::static_int_cast< sal_uInt16 >( eWallStyle ) ); aItem.SetColor( aBgdColor ); aItem.SetBitmapURL( aBgdGraphicPath ); rCoreSet.Put( aItem ); } - bModified = TRUE; + bModified = sal_True; } return bModified; } @@ -1135,13 +1135,13 @@ void SvxBackgroundTabPage::ShowSelector() pPageImpl->pLoadTimer->SetTimeoutHdl( LINK( this, SvxBackgroundTabPage, LoadTimerHdl_Impl ) ); - bAllowShowSelector = FALSE; + bAllowShowSelector = sal_False; if(nHtmlMode & HTMLMODE_ON) { if(!(nHtmlMode & HTMLMODE_GRAPH_POS)) - aBtnPosition.Enable(FALSE); - aBtnArea.Enable(FALSE); + aBtnPosition.Enable(sal_False); + aBtnArea.Enable(sal_False); } } } @@ -1169,14 +1169,14 @@ void SvxBackgroundTabPage::RaiseLoadError_Impl() //------------------------------------------------------------------------ -BOOL SvxBackgroundTabPage::LoadLinkedGraphic_Impl() +sal_Bool SvxBackgroundTabPage::LoadLinkedGraphic_Impl() /* [Beschreibung] */ { - BOOL bResult = ( aBgdGraphicPath.Len() > 0 ) && + sal_Bool bResult = ( aBgdGraphicPath.Len() > 0 ) && ( GRFILTER_OK == GraphicFilter::LoadGraphic( aBgdGraphicPath, aBgdGraphicFilter, aBgdGraphic ) ); @@ -1198,14 +1198,14 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl() const SfxPoolItem* pItem = NULL; XColorTable* pColorTable = NULL; const Size aSize15x15 = Size( 15, 15 ); - FASTBOOL bOwn = FALSE; + FASTBOOL bOwn = sal_False; if ( pDocSh && ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) ) ) pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable(); if ( !pColorTable ) { - bOwn = TRUE; + bOwn = sal_True; pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() ); } @@ -1279,8 +1279,8 @@ void SvxBackgroundTabPage::ShowColorUI_Impl() aWndPosition.Hide(); aGbPosition.Hide(); pPreviewWin2->Hide(); - aGraphTransFL.Show(FALSE); - aGraphTransMF.Show(FALSE); + aGraphTransFL.Show(sal_False); + aGraphTransMF.Show(sal_False); if(bColTransparency) { aColTransFT.Show(); @@ -1327,8 +1327,8 @@ void SvxBackgroundTabPage::ShowBitmapUI_Impl() aGraphTransFL.Show(); aGraphTransMF.Show(); } - aColTransFT.Show(FALSE); - aColTransMF.Show(FALSE); + aColTransFT.Show(sal_False); + aColTransMF.Show(sal_False); } } @@ -1425,11 +1425,11 @@ IMPL_LINK( SvxBackgroundTabPage, BackgroundColorHdl_Impl, ValueSet*, EMPTYARG ) Handler, called when color selection is changed */ { - USHORT nItemId = aBackgroundColorSet.GetSelectItemId(); + sal_uInt16 nItemId = aBackgroundColorSet.GetSelectItemId(); Color aColor = nItemId ? ( aBackgroundColorSet.GetItemColor( nItemId ) ) : Color( COL_TRANSPARENT ); aBgdColor = aColor; pPreviewWin1->NotifyChange( aBgdColor ); - BOOL bEnableTransp = aBgdColor.GetTransparency() < 0xff; + sal_Bool bEnableTransp = aBgdColor.GetTransparency() < 0xff; aColTransFT.Enable(bEnableTransp); aColTransMF.Enable(bEnableTransp); return 0; @@ -1452,7 +1452,7 @@ IMPL_LINK( SvxBackgroundTabPage, SelectHdl_Impl, ListBox*, EMPTYARG ) else { ShowBitmapUI_Impl(); - aParaLBox.Enable(FALSE);// Zeichenhintergrund kann keine Bitmap sein + aParaLBox.Enable(sal_False);// Zeichenhintergrund kann keine Bitmap sein } return 0; } @@ -1544,16 +1544,16 @@ IMPL_LINK( SvxBackgroundTabPage, BrowseHdl_Impl, PushButton* , EMPTYARG ) { if ( pPageImpl->pLoadTimer->IsActive() ) return 0; - BOOL bHtml = 0 != ( nHtmlMode & HTMLMODE_ON ); + sal_Bool bHtml = 0 != ( nHtmlMode & HTMLMODE_ON ); pImportDlg = new SvxOpenGraphicDialog( aStrBrowse ); if ( bHtml || bLinkOnly ) pImportDlg->EnableLink(sal_False); pImportDlg->SetPath( aBgdGraphicPath, aBtnLink.IsChecked() ); - pPageImpl->bIsImportDlgInExecute = TRUE; + pPageImpl->bIsImportDlgInExecute = sal_True; short nErr = pImportDlg->Execute(); - pPageImpl->bIsImportDlgInExecute = FALSE; + pPageImpl->bIsImportDlgInExecute = sal_False; if( !nErr ) { @@ -1563,7 +1563,7 @@ IMPL_LINK( SvxBackgroundTabPage, BrowseHdl_Impl, PushButton* , EMPTYARG ) // dann die Vorschau aktivieren, damit der Anwender sieht, // welche Grafik er ausgew"ahlt hat if ( !aBtnLink.IsChecked() && !aBtnPreview.IsChecked() ) - aBtnPreview.Check( TRUE ); + aBtnPreview.Check( sal_True ); // timer-verz"ogertes Laden der Grafik pPageImpl->pLoadTimer->Start(); } @@ -1597,7 +1597,7 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer ) // neue Datei gew"ahlt aBgdGraphicPath = pImportDlg->GetPath(); aBgdGraphicFilter = pImportDlg->GetCurrentFilter(); - BOOL bLink = ( nHtmlMode & HTMLMODE_ON ) || bLinkOnly ? TRUE : pImportDlg->IsAsLink(); + sal_Bool bLink = ( nHtmlMode & HTMLMODE_ON ) || bLinkOnly ? sal_True : pImportDlg->IsAsLink(); aBtnLink.Check( bLink ); aBtnLink.Enable(); @@ -1605,17 +1605,17 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer ) { if( !pImportDlg->GetGraphic(aBgdGraphic) ) { - bIsGraphicValid = TRUE; + bIsGraphicValid = sal_True; } else { aBgdGraphicFilter.Erase(); aBgdGraphicPath.Erase(); - bIsGraphicValid = FALSE; + bIsGraphicValid = sal_False; } } else - bIsGraphicValid = FALSE; // Grafik erst beim Preview-Click laden + bIsGraphicValid = sal_False; // Grafik erst beim Preview-Click laden if ( aBtnPreview.IsChecked() && bIsGraphicValid ) { @@ -1650,7 +1650,7 @@ void SvxBackgroundTabPage::ShowTblControl() //----------------------------------------------------------------------- -void SvxBackgroundTabPage::ShowParaControl(BOOL bCharOnly) +void SvxBackgroundTabPage::ShowParaControl(sal_Bool bCharOnly) { aParaLBox.SetSelectHdl(HDL(ParaDestinationHdl_Impl)); aParaLBox.SelectEntryPos(0); @@ -1670,11 +1670,11 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) */ { - USHORT nSelPos = pBox->GetSelectEntryPos(); + sal_uInt16 nSelPos = pBox->GetSelectEntryPos(); if( pTableBck_Impl && pTableBck_Impl->nActPos != nSelPos) { SvxBrushItem** pActItem = new (SvxBrushItem*); - USHORT nWhich = 0; + sal_uInt16 nWhich = 0; switch(pTableBck_Impl->nActPos) { case TBL_DEST_CELL: @@ -1700,7 +1700,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) else { SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); - const BOOL bIsLink = aBtnLink.IsChecked(); + const sal_Bool bIsLink = aBtnLink.IsChecked(); if ( !bIsLink && !bIsGraphicValid ) bIsGraphicValid = LoadLinkedGraphic_Impl(); @@ -1749,7 +1749,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) { - USHORT nSelPos = pBox->GetSelectEntryPos(); + sal_uInt16 nSelPos = pBox->GetSelectEntryPos(); if( pParaBck_Impl && pParaBck_Impl->nActPos != nSelPos) { SvxBrushItem** pActItem = new (SvxBrushItem*); @@ -1765,13 +1765,13 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) pParaBck_Impl->nActPos = nSelPos; if(0 == aLbSelect.GetSelectEntryPos()) // Brush ausgewaehlt { - USHORT nWhich = (*pActItem)->Which(); + sal_uInt16 nWhich = (*pActItem)->Which(); **pActItem = SvxBrushItem( aBgdColor, nWhich ); } else { SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); - const BOOL bIsLink = aBtnLink.IsChecked(); + const sal_Bool bIsLink = aBtnLink.IsChecked(); if ( !bIsLink && !bIsGraphicValid ) bIsGraphicValid = LoadLinkedGraphic_Impl(); @@ -1795,7 +1795,7 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) case PARA_DEST_CHAR: { *pActItem = pParaBck_Impl->pCharBrush; - aLbSelect.Enable(FALSE); + aLbSelect.Enable(sal_False); } break; } @@ -1822,7 +1822,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, { aColTransMF.SetValue(lcl_TransparencyToPercent(rColor.GetTransparency())); aColTransMF.SaveValue(); - BOOL bEnableTransp = rColor.GetTransparency() < 0xff; + sal_Bool bEnableTransp = rColor.GetTransparency() < 0xff; aColTransFT.Enable(bEnableTransp); aColTransMF.Enable(bEnableTransp); //the default setting should be "no transparency" @@ -1837,7 +1837,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, Color aTrColor( COL_TRANSPARENT ); aBgdColor = rColor; - USHORT nCol = ( aTrColor != aBgdColor ) ? + sal_uInt16 nCol = ( aTrColor != aBgdColor ) ? GetItemId_Impl( aBackgroundColorSet, aBgdColor ) : 0; if( aTrColor != aBgdColor && nCol == 0) @@ -1856,8 +1856,8 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, aBgdGraphicPath.Erase(); if ( !rUserData.Len() ) - aBtnPreview.Check( FALSE ); - aBtnLink.Check( FALSE ); + aBtnPreview.Check( sal_False ); + aBtnLink.Check( sal_False ); aBtnLink.Disable(); pPreviewWin2->NotifyChange( NULL ); SetGraphicPosition_Impl( GPOS_TILED ); // Kacheln als Default @@ -1878,13 +1878,13 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); #endif aBgdGraphicPath = *pStrLink; - aBtnLink.Check( TRUE ); + aBtnLink.Check( sal_True ); aBtnLink.Enable(); } else { aBgdGraphicPath.Erase(); - aBtnLink.Check( FALSE ); + aBtnLink.Check( sal_False ); aBtnLink.Disable(); } @@ -1917,7 +1917,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, else if ( pGraphic ) { aBgdGraphic = *pGraphic; - bIsGraphicValid = TRUE; + bIsGraphicValid = sal_True; if ( !rUserData.Len() ) aBtnPreview.Check(); @@ -1925,10 +1925,10 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, else { RaiseLoadError_Impl(); - bIsGraphicValid = FALSE; + bIsGraphicValid = sal_False; if ( !rUserData.Len() ) - aBtnPreview.Check( FALSE ); + aBtnPreview.Check( sal_False ); } } @@ -1946,7 +1946,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, /* -----------------------------09.08.2002 14:04------------------------------ ---------------------------------------------------------------------------*/ -void SvxBackgroundTabPage::EnableTransparency(BOOL bColor, BOOL bGraphic) +void SvxBackgroundTabPage::EnableTransparency(sal_Bool bColor, sal_Bool bGraphic) { bColTransparency = bColor; bGraphTransparency = bGraphic; @@ -1973,7 +1973,7 @@ void SvxBackgroundTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,sal_False); if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_SHOW_TBLCTL ) == SVX_SHOW_TBLCTL ) ShowTblControl(); if ( ( nFlags & SVX_SHOW_PARACTL ) == SVX_SHOW_PARACTL ) @@ -1981,6 +1981,6 @@ void SvxBackgroundTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 if ( ( nFlags & SVX_SHOW_SELECTOR ) == SVX_SHOW_SELECTOR ) ShowSelector(); if ( ( nFlags & SVX_ENABLE_TRANSPARENCY ) == SVX_ENABLE_TRANSPARENCY ) - EnableTransparency(TRUE, TRUE); + EnableTransparency(sal_True, sal_True); } } |