summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/backgrnd.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/backgrnd.cxx')
-rw-r--r--cui/source/tabpages/backgrnd.cxx260
1 files changed, 130 insertions, 130 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index f9d2b9078824..e7639e34fe7d 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]
@@ -347,7 +347,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent,
aBackgroundColorSet ( &aBorderWin, CUI_RES( SET_BGDCOLOR ) ),
aBackgroundColorBox ( this, CUI_RES( GB_BGDCOLOR ) ),
pPreviewWin1 ( new BackgroundPreviewImpl(
- this, CUI_RES( WIN_PREVIEW1 ), FALSE ) ),
+ this, CUI_RES( WIN_PREVIEW1 ), sal_False ) ),
aColTransFT ( this, CUI_RES( FT_COL_TRANS ) ),
aColTransMF ( this, CUI_RES( MF_COL_TRANS ) ),
aBtnBrowse ( this, CUI_RES( BTN_BROWSE ) ),
@@ -363,7 +363,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent,
aGraphTransFL ( this, CUI_RES( FL_GRAPH_TRANS ) ),
aGraphTransMF ( this, CUI_RES( MF_GRAPH_TRANS ) ),
pPreviewWin2 ( new BackgroundPreviewImpl(
- this, CUI_RES( WIN_PREVIEW2 ), TRUE ) ),
+ this, CUI_RES( WIN_PREVIEW2 ), sal_True ) ),
aSelectTxt ( this, CUI_RES( FT_SELECTOR ) ),
aLbSelect ( this, CUI_RES( LB_SELECTOR ) ),
aStrBrowse ( CUI_RES( STR_BROWSE ) ),
@@ -372,12 +372,12 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent,
aTblLBox ( this, CUI_RES( LB_TBL_BOX ) ),
aParaLBox ( this, CUI_RES( LB_PARA_BOX ) ),
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 ),
@@ -391,7 +391,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 ) ) ) )
{
@@ -437,7 +437,7 @@ SvxBackgroundTabPage::~SvxBackgroundTabPage()
//------------------------------------------------------------------------
-USHORT* SvxBackgroundTabPage::GetRanges()
+sal_uInt16* SvxBackgroundTabPage::GetRanges()
/* [Beschreibung]
@@ -475,7 +475,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;
@@ -486,17 +486,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);
@@ -515,11 +515,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
@@ -540,9 +540,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();
@@ -569,7 +569,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet )
{
if(aTblLBox.IsVisible())
{
- USHORT nValue = aTblLBox.GetSelectEntryPos();
+ sal_uInt16 nValue = aTblLBox.GetSelectEntryPos();
if ( pTableBck_Impl )
{
@@ -583,21 +583,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);
@@ -609,7 +609,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet )
}
else
{
- USHORT nValue = aParaLBox.GetSelectEntryPos();
+ sal_uInt16 nValue = aParaLBox.GetSelectEntryPos();
if ( pParaBck_Impl )
{
@@ -622,16 +622,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);
@@ -671,12 +671,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 );
@@ -692,7 +692,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 );
}
@@ -708,10 +708,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;
@@ -737,7 +737,7 @@ void SvxBackgroundTabPage::FillUserData()
//------------------------------------------------------------------------
-BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
/* [Beschreibung]
@@ -754,11 +754,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() )
{
@@ -787,18 +787,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 &&
@@ -817,10 +817,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
@@ -828,8 +828,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 )
@@ -844,7 +844,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
!= aBgdGraphic.GetBitmap() )
)
{
- bModified = TRUE;
+ bModified = sal_True;
SvxBrushItem aTmpBrush(nWhich);
if ( bIsLink )
@@ -862,7 +862,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 );
}
}
@@ -903,7 +903,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() )
@@ -917,7 +917,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
if ( *pTableBck_Impl->pCellBrush != *pOldCell )
{
rCoreSet.Put( *pTableBck_Impl->pCellBrush );
- bModified |= TRUE;
+ bModified |= sal_True;
}
}
@@ -929,7 +929,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
if ( *pTableBck_Impl->pRowBrush != *pOldRow )
{
rCoreSet.Put( *pTableBck_Impl->pRowBrush );
- bModified |= TRUE;
+ bModified |= sal_True;
}
}
@@ -941,7 +941,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
if ( *pTableBck_Impl->pTableBrush != *pOldTable )
{
rCoreSet.Put( *pTableBck_Impl->pTableBrush );
- bModified |= TRUE;
+ bModified |= sal_True;
}
}
@@ -949,7 +949,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
rCoreSet.Put( SfxUInt16Item( SID_BACKGRND_DESTINATION,
aTblLBox.GetSelectEntryPos() ) );
- bModified |= TRUE;
+ bModified |= sal_True;
}
}
else if(aParaLBox.GetData() == &aParaLBox)
@@ -963,7 +963,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
if ( *pParaBck_Impl->pParaBrush != *pOldPara )
{
rCoreSet.Put( *pParaBck_Impl->pParaBrush );
- bModified |= TRUE;
+ bModified |= sal_True;
}
}
@@ -979,7 +979,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
*pParaBck_Impl->pCharBrush != SvxBrushItem(SID_ATTR_BRUSH_CHAR)))
{
rCoreSet.Put( *pParaBck_Impl->pCharBrush );
- bModified |= TRUE;
+ bModified |= sal_True;
}
}
@@ -987,23 +987,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?
@@ -1015,12 +1015,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
@@ -1033,16 +1033,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 );
}
}
@@ -1058,13 +1058,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;
}
@@ -1127,13 +1127,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);
}
}
}
@@ -1161,14 +1161,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 ) );
@@ -1190,14 +1190,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() );
}
@@ -1270,8 +1270,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();
@@ -1318,8 +1318,8 @@ void SvxBackgroundTabPage::ShowBitmapUI_Impl()
aGraphTransFL.Show();
aGraphTransMF.Show();
}
- aColTransFT.Show(FALSE);
- aColTransMF.Show(FALSE);
+ aColTransFT.Show(sal_False);
+ aColTransMF.Show(sal_False);
}
}
@@ -1416,11 +1416,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;
@@ -1443,7 +1443,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;
}
@@ -1535,16 +1535,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 )
{
@@ -1554,7 +1554,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();
}
@@ -1588,7 +1588,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();
@@ -1596,17 +1596,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 )
{
@@ -1641,7 +1641,7 @@ void SvxBackgroundTabPage::ShowTblControl()
//-----------------------------------------------------------------------
-void SvxBackgroundTabPage::ShowParaControl(BOOL bCharOnly)
+void SvxBackgroundTabPage::ShowParaControl(sal_Bool bCharOnly)
{
aParaLBox.SetSelectHdl(HDL(ParaDestinationHdl_Impl));
aParaLBox.SelectEntryPos(0);
@@ -1661,11 +1661,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:
@@ -1691,7 +1691,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();
@@ -1740,7 +1740,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*);
@@ -1756,13 +1756,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();
@@ -1786,7 +1786,7 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox )
case PARA_DEST_CHAR:
{
*pActItem = pParaBck_Impl->pCharBrush;
- aLbSelect.Enable(FALSE);
+ aLbSelect.Enable(sal_False);
}
break;
}
@@ -1813,7 +1813,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"
@@ -1828,7 +1828,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)
@@ -1847,8 +1847,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
@@ -1869,13 +1869,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();
}
@@ -1908,7 +1908,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
else if ( pGraphic )
{
aBgdGraphic = *pGraphic;
- bIsGraphicValid = TRUE;
+ bIsGraphicValid = sal_True;
if ( !rUserData.Len() )
aBtnPreview.Check();
@@ -1916,10 +1916,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 );
}
}
@@ -1937,7 +1937,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;
@@ -1964,7 +1964,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 )
@@ -1972,6 +1972,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);
}
}