summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/numpages.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/numpages.cxx')
-rw-r--r--cui/source/tabpages/numpages.cxx748
1 files changed, 374 insertions, 374 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 234d9edd6..505a3f1fd 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -110,7 +110,7 @@ SV_IMPL_PTRARR(SvxNumSettingsArr_Impl,SvxNumSettings_ImplPtr);
#define MAX_BMP_WIDTH 16
#define MAX_BMP_HEIGHT 16
-static BOOL bLastRelative = FALSE;
+static sal_Bool bLastRelative = sal_False;
static const sal_Char cNumberingType[] = "NumberingType";
static const sal_Char cValue[] = "Value";
static const sal_Char cParentNumbering[] = "ParentNumbering";
@@ -186,11 +186,11 @@ static sal_Char __READONLY_DATA aNumChar[] =
/*-----------------18.03.98 08:35-------------------
Ist eins der maskierten Formate gesetzt?
--------------------------------------------------*/
-BOOL lcl_IsNumFmtSet(SvxNumRule* pNum, USHORT nLevelMask)
+sal_Bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 nLevelMask)
{
- BOOL bRet = FALSE;
- USHORT nMask = 1;
- for( USHORT i = 0; i < SVX_MAX_NUM && !bRet; i++ )
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < SVX_MAX_NUM && !bRet; i++ )
{
if(nLevelMask & nMask)
bRet |= 0 != pNum->Get( i );
@@ -204,7 +204,7 @@ BOOL lcl_IsNumFmtSet(SvxNumRule* pNum, USHORT nLevelMask)
Font& lcl_GetDefaultBulletFont()
{
- static BOOL bInit = 0;
+ static sal_Bool bInit = 0;
static Font aDefBulletFont( UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "StarSymbol" ) ),
String(), Size( 0, 14 ) );
@@ -214,8 +214,8 @@ Font& lcl_GetDefaultBulletFont()
aDefBulletFont.SetFamily( FAMILY_DONTKNOW );
aDefBulletFont.SetPitch( PITCH_DONTKNOW );
aDefBulletFont.SetWeight( WEIGHT_DONTKNOW );
- aDefBulletFont.SetTransparent( TRUE );
- bInit = TRUE;
+ aDefBulletFont.SetTransparent( sal_True );
+ bInit = sal_True;
}
return aDefBulletFont;
}
@@ -235,8 +235,8 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent,
pActNum(0),
pSaveNum(0),
nActNumLvl( USHRT_MAX ),
- bModified(FALSE),
- bPreset(FALSE),
+ bModified(sal_False),
+ bPreset(sal_False),
nNumItemId(SID_ATTR_NUMBERING_RULE)
{
FreeResource();
@@ -300,7 +300,7 @@ SfxTabPage* SvxSingleNumPickTabPage::Create( Window* pParent,
--------------------------------------------------*/
-BOOL SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet )
{
if( (bPreset || bModified) && pSaveNum)
{
@@ -319,17 +319,17 @@ BOOL SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet )
void SvxSingleNumPickTabPage::ActivatePage(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- bPreset = FALSE;
- BOOL bIsPreset = FALSE;
+ bPreset = sal_False;
+ sal_Bool bIsPreset = sal_False;
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
if(pExampleSet)
{
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem))
bIsPreset = ((const SfxBoolItem*)pItem)->GetValue();
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem))
nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem))
{
delete pSaveNum;
pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
@@ -344,11 +344,11 @@ void SvxSingleNumPickTabPage::ActivatePage(const SfxItemSet& rSet)
{
pExamplesVS->SelectItem(1);
NumSelectHdl_Impl(pExamplesVS);
- bPreset = TRUE;
+ bPreset = sal_True;
}
bPreset |= bIsPreset;
- bModified = FALSE;
+ bModified = sal_False;
}
/*-----------------08.02.97 11.28-------------------
@@ -359,7 +359,7 @@ int SvxSingleNumPickTabPage::DeactivatePage(SfxItemSet *_pSet)
{
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*-----------------07.02.97 12.09-------------------
@@ -372,15 +372,15 @@ void SvxSingleNumPickTabPage::Reset( const SfxItemSet& rSet )
const SfxPoolItem* pItem;
// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
//im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem);
if(eState != SFX_ITEM_SET)
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ eState = rSet.GetItemState(nNumItemId, sal_False, &pItem);
if( eState != SFX_ITEM_SET )
{
- pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) );
eState = SFX_ITEM_SET;
}
}
@@ -401,9 +401,9 @@ IMPL_LINK(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
{
if(pActNum)
{
- bPreset = FALSE;
- bModified = TRUE;
- USHORT nIdx = pExamplesVS->GetSelectItemId() - 1;
+ bPreset = sal_False;
+ bModified = sal_True;
+ sal_uInt16 nIdx = pExamplesVS->GetSelectItemId() - 1;
DBG_ASSERT(aNumSettingsArr.Count() > nIdx, "wrong index");
if(aNumSettingsArr.Count() <= nIdx)
return 0;
@@ -412,8 +412,8 @@ IMPL_LINK(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
const sal_Unicode cLocalPrefix = _pSet->sPrefix.getLength() ? _pSet->sPrefix.getStr()[0] : 0;
const sal_Unicode cLocalSuffix = _pSet->sSuffix.getLength() ? _pSet->sSuffix.getStr()[0] : 0;
- USHORT nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -464,8 +464,8 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(Window* pParent,
pActNum(0),
pSaveNum(0),
nActNumLvl( USHRT_MAX ),
- bModified(FALSE),
- bPreset(FALSE),
+ bModified(sal_False),
+ bPreset(sal_False),
nNumItemId(SID_ATTR_NUMBERING_RULE)
{
FreeResource();
@@ -502,7 +502,7 @@ SfxTabPage* SvxBulletPickTabPage::Create( Window* pParent,
--------------------------------------------------*/
-BOOL SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet )
{
if( (bPreset || bModified) && pActNum)
{
@@ -519,17 +519,17 @@ BOOL SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet )
void SvxBulletPickTabPage::ActivatePage(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- bPreset = FALSE;
- BOOL bIsPreset = FALSE;
+ bPreset = sal_False;
+ sal_Bool bIsPreset = sal_False;
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
if(pExampleSet)
{
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem))
bIsPreset = ((const SfxBoolItem*)pItem)->GetValue();
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem))
nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem))
{
delete pSaveNum;
pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
@@ -544,10 +544,10 @@ void SvxBulletPickTabPage::ActivatePage(const SfxItemSet& rSet)
{
pExamplesVS->SelectItem(1);
NumSelectHdl_Impl(pExamplesVS);
- bPreset = TRUE;
+ bPreset = sal_True;
}
bPreset |= bIsPreset;
- bModified = FALSE;
+ bModified = sal_False;
}
/*-----------------08.02.97 11.28-------------------
@@ -557,7 +557,7 @@ int SvxBulletPickTabPage::DeactivatePage(SfxItemSet *_pSet)
{
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*-----------------07.02.97 12.11-------------------
@@ -569,15 +569,15 @@ void SvxBulletPickTabPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
//im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem);
if(eState != SFX_ITEM_SET)
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ eState = rSet.GetItemState(nNumItemId, sal_False, &pItem);
if( eState != SFX_ITEM_SET )
{
- pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) );
eState = SFX_ITEM_SET;
}
@@ -601,13 +601,13 @@ IMPL_LINK(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
{
if(pActNum)
{
- bPreset = FALSE;
- bModified = TRUE;
+ bPreset = sal_False;
+ bModified = sal_True;
sal_Unicode cChar = aBulletTypes[pExamplesVS->GetSelectItemId() - 1];
Font& rActBulletFont = lcl_GetDefaultBulletFont();
- USHORT nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -665,8 +665,8 @@ SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent,
pSaveNum(0),
nActNumLvl( USHRT_MAX ),
nNumItemId(SID_ATTR_NUMBERING_RULE),
- bModified(FALSE),
- bPreset(FALSE)
+ bModified(sal_False),
+ bPreset(sal_False)
{
FreeResource();
@@ -739,7 +739,7 @@ SfxTabPage* SvxNumPickTabPage::Create( Window* pParent,
--------------------------------------------------*/
-BOOL SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet )
{
if( (bPreset || bModified) && pActNum)
{
@@ -756,17 +756,17 @@ BOOL SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet )
void SvxNumPickTabPage::ActivatePage(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- bPreset = FALSE;
- BOOL bIsPreset = FALSE;
+ bPreset = sal_False;
+ sal_Bool bIsPreset = sal_False;
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
if(pExampleSet)
{
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem))
bIsPreset = ((const SfxBoolItem*)pItem)->GetValue();
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem))
nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem))
{
delete pSaveNum;
pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
@@ -781,10 +781,10 @@ void SvxNumPickTabPage::ActivatePage(const SfxItemSet& rSet)
{
pExamplesVS->SelectItem(1);
NumSelectHdl_Impl(pExamplesVS);
- bPreset = TRUE;
+ bPreset = sal_True;
}
bPreset |= bIsPreset;
- bModified = FALSE;
+ bModified = sal_False;
}
/* -----------------08.02.97 11.29-------------------
@@ -795,7 +795,7 @@ int SvxNumPickTabPage::DeactivatePage(SfxItemSet *_pSet)
{
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*-----------------07.02.97 12.12-------------------
@@ -806,15 +806,15 @@ void SvxNumPickTabPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
//im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem);
if(eState != SFX_ITEM_SET)
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ eState = rSet.GetItemState(nNumItemId, sal_False, &pItem);
if( eState != SFX_ITEM_SET )
{
- pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) );
eState = SFX_ITEM_SET;
}
@@ -839,8 +839,8 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
{
if(pActNum)
{
- bPreset = FALSE;
- bModified = TRUE;
+ bPreset = sal_False;
+ bModified = sal_True;
const FontList* pList = 0;
@@ -848,7 +848,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
Font& rActBulletFont = lcl_GetDefaultBulletFont();
SvxNumSettings_ImplPtr pLevelSettings = 0;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(rItemArr.Count() > i)
pLevelSettings = rItemArr[i];
@@ -856,7 +856,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
break;
SvxNumberFormat aFmt(pActNum->GetLevel(i));
aFmt.SetNumberingType( pLevelSettings->nNumberType );
- USHORT nUpperLevelOrChar = (USHORT)pLevelSettings->nParentNumbering;
+ sal_uInt16 nUpperLevelOrChar = (sal_uInt16)pLevelSettings->nParentNumbering;
if(aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL)
{
if( pLevelSettings->sBulletFont.getLength() &&
@@ -888,7 +888,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
aCreateFont.SetFamily( FAMILY_DONTKNOW );
aCreateFont.SetPitch( PITCH_DONTKNOW );
aCreateFont.SetWeight( WEIGHT_DONTKNOW );
- aCreateFont.SetTransparent( TRUE );
+ aCreateFont.SetTransparent( sal_True );
aFmt.SetBulletFont( &aCreateFont );
}
}
@@ -904,7 +904,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
}
else
{
- aFmt.SetIncludeUpperLevels(sal::static_int_cast< BYTE >(0 != nUpperLevelOrChar ? pActNum->GetLevelCount() : 0));
+ aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? pActNum->GetLevelCount() : 0));
aFmt.SetCharFmtName(sNumCharFmtName);
// #62069# // #92724#
aFmt.SetBulletRelSize(100);
@@ -956,8 +956,8 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent,
pSaveNum(0),
nActNumLvl( USHRT_MAX ),
nNumItemId(SID_ATTR_NUMBERING_RULE),
- bModified(FALSE),
- bPreset(FALSE)
+ bModified(sal_False),
+ bPreset(sal_False)
{
FreeResource();
SetExchangeSupport();
@@ -970,7 +970,7 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent,
GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames);
pExamplesVS->SetHelpId(HID_VALUESET_NUMBMP );
- for(USHORT i = 0; i < aGrfNames.Count(); i++)
+ for(sal_uInt16 i = 0; i < aGrfNames.Count(); i++)
{
pExamplesVS->InsertItem( i + 1, i);
String* pGrfNm = (String*) aGrfNames.GetObject(i);
@@ -1025,18 +1025,18 @@ SfxTabPage* SvxBitmapPickTabPage::Create( Window* pParent,
void SvxBitmapPickTabPage::ActivatePage(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- bPreset = FALSE;
- BOOL bIsPreset = FALSE;
+ bPreset = sal_False;
+ sal_Bool bIsPreset = sal_False;
// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
if(pExampleSet)
{
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem))
bIsPreset = ((const SfxBoolItem*)pItem)->GetValue();
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem))
nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem))
{
delete pSaveNum;
pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
@@ -1052,10 +1052,10 @@ void SvxBitmapPickTabPage::ActivatePage(const SfxItemSet& rSet)
{
pExamplesVS->SelectItem(1);
NumSelectHdl_Impl(pExamplesVS);
- bPreset = TRUE;
+ bPreset = sal_True;
}
bPreset |= bIsPreset;
- bModified = FALSE;
+ bModified = sal_False;
}
/*-----------------12.02.97 07.46-------------------
@@ -1065,19 +1065,19 @@ int SvxBitmapPickTabPage::DeactivatePage(SfxItemSet *_pSet)
{
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*-----------------12.02.97 07.46-------------------
--------------------------------------------------*/
-BOOL SvxBitmapPickTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SvxBitmapPickTabPage::FillItemSet( SfxItemSet& rSet )
{
if ( !aGrfNames.Count() )
{
// das ist im SfxItemSet leider nicht zulaessig #52134#
// rSet.DisableItem(SID_ATTR_NUMBERING_RULE);
- return FALSE;
+ return sal_False;
}
if( (bPreset || bModified) && pActNum)
{
@@ -1096,15 +1096,15 @@ void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
//im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem);
if(eState != SFX_ITEM_SET)
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ eState = rSet.GetItemState(nNumItemId, sal_False, &pItem);
if( eState != SFX_ITEM_SET )
{
- pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) );
eState = SFX_ITEM_SET;
}
@@ -1119,13 +1119,13 @@ void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet )
*pActNum = *pSaveNum;
if(!pActNum->IsFeatureSupported(NUM_ENABLE_LINKED_BMP))
{
- aLinkedCB.Check(FALSE);
- aLinkedCB.Enable(FALSE);
+ aLinkedCB.Check(sal_False);
+ aLinkedCB.Enable(sal_False);
}
else if(!pActNum->IsFeatureSupported(NUM_ENABLE_EMBEDDED_BMP))
{
- aLinkedCB.Check(TRUE);
- aLinkedCB.Enable(FALSE);
+ aLinkedCB.Check(sal_True);
+ aLinkedCB.Enable(sal_False);
}
}
@@ -1137,20 +1137,20 @@ IMPL_LINK(SvxBitmapPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
{
if(pActNum)
{
- bPreset = FALSE;
- bModified = TRUE;
- USHORT nIdx = pExamplesVS->GetSelectItemId() - 1;
+ bPreset = sal_False;
+ bModified = sal_True;
+ sal_uInt16 nIdx = pExamplesVS->GetSelectItemId() - 1;
String* pGrfName = 0;
if(aGrfNames.Count() > nIdx)
pGrfName = (String*)aGrfNames.GetObject(nIdx);
- USHORT nMask = 1;
+ sal_uInt16 nMask = 1;
String aEmptyStr;
- USHORT nSetNumberingType = SVX_NUM_BITMAP;
+ sal_uInt16 nSetNumberingType = SVX_NUM_BITMAP;
if(aLinkedCB.IsChecked())
nSetNumberingType |= LINK_TOKEN;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -1209,7 +1209,7 @@ IMPL_LINK(SvxBitmapPickTabPage, LinkBmpHdl_Impl, CheckBox*, EMPTYARG )
//CHINA001
//CHINA001 SvxNumValueSet( pParent, rResId, NUM_PAGETYPE_BMP ),
//CHINA001 // rStrList ( rStrNames ),
-//CHINA001 bGrfNotFound( FALSE )
+//CHINA001 bGrfNotFound( sal_False )
//CHINA001
//CHINA001 {
//CHINA001 GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS);
@@ -1238,7 +1238,7 @@ IMPL_LINK(SvxBitmapPickTabPage, LinkBmpHdl_Impl, CheckBox*, EMPTYARG )
//CHINA001
//CHINA001 Rectangle aRect = rUDEvt.GetRect();
//CHINA001 OutputDevice* pDev = rUDEvt.GetDevice();
-//CHINA001 USHORT nItemId = rUDEvt.GetItemId();
+//CHINA001 sal_uInt16 nItemId = rUDEvt.GetItemId();
//CHINA001 Point aBLPos = aRect.TopLeft();
//CHINA001
//CHINA001 int nRectHeight = aRect.GetHeight();
@@ -1248,14 +1248,14 @@ IMPL_LINK(SvxBitmapPickTabPage, LinkBmpHdl_Impl, CheckBox*, EMPTYARG )
//CHINA001 if(!GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, nItemId - 1,
//CHINA001 &aGraphic, NULL))
//CHINA001 {
-//CHINA001 bGrfNotFound = TRUE;
+//CHINA001 bGrfNotFound = sal_True;
//CHINA001 }
//CHINA001 else
//CHINA001 {
//CHINA001 Point aPos(aBLPos.X() + 5, 0);
-//CHINA001 for( USHORT i = 0; i < 3; i++ )
+//CHINA001 for( sal_uInt16 i = 0; i < 3; i++ )
//CHINA001 {
-//CHINA001 USHORT nY = 11 + i * 33;
+//CHINA001 sal_uInt16 nY = 11 + i * 33;
//CHINA001 aPos.Y() = aBLPos.Y() + nRectHeight * nY / 100;
//CHINA001 aGraphic.Draw( pDev, aPos, aSize );
//CHINA001 }
@@ -1271,7 +1271,7 @@ IMPL_LINK(SvxBitmapPickTabPage, LinkBmpHdl_Impl, CheckBox*, EMPTYARG )
//CHINA001 // nur, wenn eine Grafik nicht da war, muss formatiert werden
//CHINA001 if(bGrfNotFound)
//CHINA001 {
-//CHINA001 bGrfNotFound = FALSE;
+//CHINA001 bGrfNotFound = sal_False;
//CHINA001 Format();
//CHINA001 }
//CHINA001 Invalidate();
@@ -1321,12 +1321,12 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent,
pPreviewWIN( new SvxNumberingPreview(this, CUI_RES(WIN_PREVIEW ))),
pActNum(0),
pSaveNum(0),
- bLastWidthModified(FALSE),
- bModified(FALSE),
- bPreset(FALSE),
- bAutomaticCharStyles(TRUE),
- bHTMLMode(FALSE),
- bMenuButtonInitialized(FALSE),
+ bLastWidthModified(sal_False),
+ bModified(sal_False),
+ bPreset(sal_False),
+ bAutomaticCharStyles(sal_True),
+ bHTMLMode(sal_False),
+ bMenuButtonInitialized(sal_False),
sBullet(CUI_RES(STR_BULLET)),
nBullet(0xff),
nActNumLvl(USHRT_MAX),
@@ -1361,7 +1361,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent,
aBitmapMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup );
pPopup->InsertItem( NUM_NO_GRAPHIC, String(CUI_RES(ST_POPUP_EMPTY_ENTRY)) );
- pPopup->EnableItem( NUM_NO_GRAPHIC, FALSE );
+ pPopup->EnableItem( NUM_NO_GRAPHIC, sal_False );
eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE));
@@ -1374,12 +1374,12 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent,
// Extended numbering schemes present in the resource but not offered by
// the i18n framework per configuration must be removed from the listbox.
// Watch out for the ugly 0x88/*SVX_NUM_BITMAP|0x80*/ to not remove that.
- const USHORT nDontRemove = 0xffff;
- ::std::vector< USHORT> aRemove( aFmtLB.GetEntryCount(), nDontRemove);
+ const sal_uInt16 nDontRemove = 0xffff;
+ ::std::vector< sal_uInt16> aRemove( aFmtLB.GetEntryCount(), nDontRemove);
for (size_t i=0; i<aRemove.size(); ++i)
{
- USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(
- sal::static_int_cast< USHORT >(i));
+ sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData(
+ sal::static_int_cast< sal_uInt16 >(i));
if (nEntryData > NumberingType::CHARS_LOWER_LETTER_N &&
nEntryData != (SVX_NUM_BITMAP | 0x80))
aRemove[i] = nEntryData;
@@ -1394,10 +1394,10 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent,
if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N)
{
sal_Bool bInsert = sal_True;
- for(USHORT nEntry = 0; nEntry < aFmtLB.GetEntryCount(); nEntry++)
+ for(sal_uInt16 nEntry = 0; nEntry < aFmtLB.GetEntryCount(); nEntry++)
{
- USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(nEntry);
- if(nEntryData == (USHORT) nCurrent)
+ sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData(nEntry);
+ if(nEntryData == (sal_uInt16) nCurrent)
{
bInsert = sal_False;
aRemove[nEntry] = nDontRemove;
@@ -1407,8 +1407,8 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent,
if(bInsert)
{
OUString aIdent = xInfo->getNumberingIdentifier( nCurrent );
- USHORT nPos = aFmtLB.InsertEntry(aIdent);
- aFmtLB.SetEntryData(nPos,(void*)(ULONG)nCurrent);
+ sal_uInt16 nPos = aFmtLB.InsertEntry(aIdent);
+ aFmtLB.SetEntryData(nPos,(void*)(sal_uLong)nCurrent);
}
}
}
@@ -1417,7 +1417,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent,
{
if (aRemove[i] != nDontRemove)
{
- USHORT nPos = aFmtLB.GetEntryPos( (void*)(ULONG)aRemove[i]);
+ sal_uInt16 nPos = aFmtLB.GetEntryPos( (void*)(sal_uLong)aRemove[i]);
aFmtLB.RemoveEntry( nPos);
}
}
@@ -1469,15 +1469,15 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
- UINT16 nTmpNumLvl = USHRT_MAX;
+ sal_uInt16 nTmpNumLvl = USHRT_MAX;
if(pExampleSet)
{
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem))
bPreset = ((const SfxBoolItem*)pItem)->GetValue();
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem))
nTmpNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem))
{
delete pSaveNum;
pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
@@ -1488,18 +1488,18 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet)
nActNumLvl != nTmpNumLvl)
{
nActNumLvl = nTmpNumLvl;
- USHORT nMask = 1;
- aLevelLB.SetUpdateMode(FALSE);
+ sal_uInt16 nMask = 1;
+ aLevelLB.SetUpdateMode(sal_False);
aLevelLB.SetNoSelection();
aLevelLB.SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == USHRT_MAX);
if(nActNumLvl != USHRT_MAX)
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
- aLevelLB.SelectEntryPos( i, TRUE);
+ aLevelLB.SelectEntryPos( i, sal_True);
nMask <<= 1 ;
}
- aLevelLB.SetUpdateMode(TRUE);
+ aLevelLB.SetUpdateMode(sal_True);
*pActNum = *pSaveNum;
InitControls();
}
@@ -1512,19 +1512,19 @@ int SvxNumOptionsTabPage::DeactivatePage(SfxItemSet * _pSet)
{
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*-----------------01.12.97 16:29-------------------
--------------------------------------------------*/
-BOOL SvxNumOptionsTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SvxNumOptionsTabPage::FillItemSet( SfxItemSet& rSet )
{
rSet.Put(SfxUInt16Item(SID_PARAM_CUR_NUM_LEVEL, nActNumLvl));
if(bModified && pActNum)
{
*pSaveNum = *pActNum;
rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId);
- rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, FALSE));
+ rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, sal_False));
}
return bModified;
};
@@ -1535,15 +1535,15 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
//im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem);
if(eState != SFX_ITEM_SET)
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ eState = rSet.GetItemState(nNumItemId, sal_False, &pItem);
if( eState != SFX_ITEM_SET )
{
- pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) );
eState = SFX_ITEM_SET;
}
@@ -1555,7 +1555,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
// Ebenen einfuegen
if(!aLevelLB.GetEntryCount())
{
- for(USHORT i = 1; i <= pSaveNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 1; i <= pSaveNum->GetLevelCount(); i++)
aLevelLB.InsertEntry( UniString::CreateFromInt32(i));
if(pSaveNum->GetLevelCount() > 1)
{
@@ -1571,21 +1571,21 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
aLevelLB.SelectEntryPos(aLevelLB.GetEntryCount() - 1);
// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
- USHORT nMask = 1;
- aLevelLB.SetUpdateMode(FALSE);
+ sal_uInt16 nMask = 1;
+ aLevelLB.SetUpdateMode(sal_False);
aLevelLB.SetNoSelection();
if(nActNumLvl == USHRT_MAX)
{
- aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), TRUE);
+ aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), sal_True);
}
else
- for(USHORT i = 0; i < pSaveNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pSaveNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
- aLevelLB.SelectEntryPos( i, TRUE);
+ aLevelLB.SelectEntryPos( i, sal_True);
nMask <<= 1 ;
}
- aLevelLB.SetUpdateMode(TRUE);
+ aLevelLB.SetUpdateMode(sal_True);
if(!pActNum)
pActNum = new SvxNumRule(*pSaveNum);
@@ -1600,7 +1600,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT( pDocSh, "DocShell not found!" );
XColorTable* pColorTable = NULL;
- FASTBOOL bKillTable = FALSE;
+ FASTBOOL bKillTable = sal_False;
if ( pDocSh )
{
pItem = pDocSh->GetItem( SID_COLOR_TABLE );
@@ -1611,7 +1611,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
if ( !pColorTable )
{
pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() );
- bKillTable = TRUE;
+ bKillTable = sal_True;
}
aBulColLB.InsertEntry( Color( COL_AUTO ), SVX_RESSTR( RID_SVXSTR_AUTOMATIC ));
@@ -1627,21 +1627,21 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
}
SfxObjectShell* pShell;
- if ( SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE, &pItem )
+ if ( SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False, &pItem )
|| ( 0 != ( pShell = SfxObjectShell::Current()) &&
0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) )
{
- USHORT nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue();
bHTMLMode = 0 != (nHtmlMode&HTMLMODE_ON);
}
- BOOL bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE);
+ sal_Bool bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE);
aCharFmtFT.Show(bCharFmt);
aCharFmtLB.Show(bCharFmt);
- BOOL bContinuous = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+ sal_Bool bContinuous = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
- BOOL bAllLevel = bContinuous && !bHTMLMode;
+ sal_Bool bAllLevel = bContinuous && !bHTMLMode;
aAllLevelFT.Show(bAllLevel);
aAllLevelNF.Show(bAllLevel);
@@ -1652,10 +1652,10 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
//remove types that are unsupported by Draw/Impress
if(!bContinuous)
{
- USHORT nFmtCount = aFmtLB.GetEntryCount();
- for(USHORT i = nFmtCount; i; i--)
+ sal_uInt16 nFmtCount = aFmtLB.GetEntryCount();
+ for(sal_uInt16 i = nFmtCount; i; i--)
{
- USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(i - 1);
+ sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData(i - 1);
if(/*SVX_NUM_NUMBER_NONE == nEntryData ||*/
((SVX_NUM_BITMAP|LINK_TOKEN) == nEntryData))
aFmtLB.RemoveEntry(i - 1);
@@ -1665,14 +1665,14 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
if(!pActNum->IsFeatureSupported(NUM_ENABLE_LINKED_BMP))
{
long nData = SVX_NUM_BITMAP|LINK_TOKEN;
- USHORT nPos = aFmtLB.GetEntryPos((void*)nData);
+ sal_uInt16 nPos = aFmtLB.GetEntryPos((void*)nData);
if(LISTBOX_ENTRY_NOTFOUND != nPos)
aFmtLB.RemoveEntry(nPos);
}
else if(!pActNum->IsFeatureSupported(NUM_ENABLE_EMBEDDED_BMP))
{
long nData = SVX_NUM_BITMAP;
- USHORT nPos = aFmtLB.GetEntryPos((void*)nData);
+ sal_uInt16 nPos = aFmtLB.GetEntryPos((void*)nData);
if(LISTBOX_ENTRY_NOTFOUND != nPos)
aFmtLB.RemoveEntry(nPos);
}
@@ -1690,17 +1690,17 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
//Alle arten der numerischen Aufzaehlungen loeschen
if(pActNum->IsFeatureSupported(NUM_NO_NUMBERS))
{
- USHORT nFmtCount = aFmtLB.GetEntryCount();
- for(USHORT i = nFmtCount; i; i--)
+ sal_uInt16 nFmtCount = aFmtLB.GetEntryCount();
+ for(sal_uInt16 i = nFmtCount; i; i--)
{
- USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(i - 1);
+ sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData(i - 1);
if( /*nEntryData >= SVX_NUM_CHARS_UPPER_LETTER &&*/ nEntryData <= SVX_NUM_NUMBER_NONE)
aFmtLB.RemoveEntry(i - 1);
}
}
InitControls();
- bModified = FALSE;
+ bModified = sal_False;
}
/*-----------------02.12.97 13:47-------------------
@@ -1708,32 +1708,32 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
--------------------------------------------------*/
void SvxNumOptionsTabPage::InitControls()
{
- BOOL bShowBullet = TRUE;
- BOOL bShowBitmap = TRUE;
- BOOL bSameType = TRUE;
- BOOL bSameStart = TRUE;
- BOOL bSamePrefix = TRUE;
- BOOL bSameSuffix = TRUE;
- BOOL bAllLevel = TRUE;
- BOOL bSameCharFmt = TRUE;
- BOOL bSameVOrient = TRUE;
- BOOL bSameSize = TRUE;
- BOOL bSameBulColor = TRUE;
- BOOL bSameBulRelSize= TRUE;
- BOOL bSameAdjust = TRUE;
+ sal_Bool bShowBullet = sal_True;
+ sal_Bool bShowBitmap = sal_True;
+ sal_Bool bSameType = sal_True;
+ sal_Bool bSameStart = sal_True;
+ sal_Bool bSamePrefix = sal_True;
+ sal_Bool bSameSuffix = sal_True;
+ sal_Bool bAllLevel = sal_True;
+ sal_Bool bSameCharFmt = sal_True;
+ sal_Bool bSameVOrient = sal_True;
+ sal_Bool bSameSize = sal_True;
+ sal_Bool bSameBulColor = sal_True;
+ sal_Bool bSameBulRelSize= sal_True;
+ sal_Bool bSameAdjust = sal_True;
const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM];
String sFirstCharFmt;
sal_Int16 eFirstOrient = text::VertOrientation::NONE;
Size aFirstSize(0,0);
- USHORT nMask = 1;
- USHORT nLvl = USHRT_MAX;
- USHORT nHighestLevel = 0;
+ sal_uInt16 nMask = 1;
+ sal_uInt16 nLvl = USHRT_MAX;
+ sal_uInt16 nHighestLevel = 0;
String aEmptyStr;
- BOOL bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR);
- BOOL bBullRelSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE);
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_Bool bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR);
+ sal_Bool bBullRelSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE);
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -1780,7 +1780,7 @@ void SvxNumOptionsTabPage::InitControls()
aOrientLB.SetNoSelection();
else
aOrientLB.SelectEntryPos(
- sal::static_int_cast< USHORT >(eFirstOrient - 1));
+ sal::static_int_cast< sal_uInt16 >(eFirstOrient - 1));
// kein text::VertOrientation::NONE
if(bSameSize)
@@ -1797,7 +1797,7 @@ void SvxNumOptionsTabPage::InitControls()
if(bSameType)
{
- USHORT nLBData = (USHORT) aNumFmtArr[nLvl]->GetNumberingType();
+ sal_uInt16 nLBData = (sal_uInt16) aNumFmtArr[nLvl]->GetNumberingType();
aFmtLB.SelectEntryPos(aFmtLB.GetEntryPos( (void*)sal::static_int_cast<sal_uIntPtr>( nLBData ) ));
}
else
@@ -1815,7 +1815,7 @@ void SvxNumOptionsTabPage::InitControls()
}
if(bSameAdjust)
{
- USHORT nPos = 1; // zentriert
+ sal_uInt16 nPos = 1; // zentriert
if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
nPos = 0;
else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
@@ -1890,14 +1890,14 @@ void SvxNumOptionsTabPage::InitControls()
0 - Nummer; 1 - Bullet; 2 - Bitmap
--------------------------------------------------*/
-void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL )
+void SvxNumOptionsTabPage::SwitchNumberType( sal_uInt8 nType, sal_Bool )
{
if(nBullet == nType)
return;
nBullet = nType;
- BOOL bBitmap = FALSE;
- BOOL bBullet = FALSE;
- BOOL bEnableBitmap = FALSE;
+ sal_Bool bBitmap = sal_False;
+ sal_Bool bBullet = sal_False;
+ sal_Bool bEnableBitmap = sal_False;
if(nType == SHOW_NUMBERING)
{
// Label umschalten, alten Text merken
@@ -1908,27 +1908,27 @@ void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL )
{
// Label umschalten, alten Text merken
aStartFT.SetText(sBullet);
- bBullet = TRUE;
+ bBullet = sal_True;
}
else
{
- bBitmap = TRUE;
- bEnableBitmap = TRUE;
+ bBitmap = sal_True;
+ bEnableBitmap = sal_True;
}
- BOOL bNumeric = !(bBitmap||bBullet);
+ sal_Bool bNumeric = !(bBitmap||bBullet);
aPrefixFT.Show(bNumeric);
aPrefixED.Show(bNumeric);
aSuffixFT.Show(bNumeric);
aSuffixED.Show(bNumeric);
- BOOL bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE);
+ sal_Bool bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE);
aCharFmtFT.Show(!bBitmap && bCharFmt);
aCharFmtLB.Show(!bBitmap && bCharFmt);
// das ist eigentlich Missbrauch, da fuer die vollst. Numerierung kein
// eigenes Flag existiert
- BOOL bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
- BOOL bAllLevel = bNumeric && bAllLevelFeature && !bHTMLMode;
+ sal_Bool bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+ sal_Bool bAllLevel = bNumeric && bAllLevelFeature && !bHTMLMode;
aAllLevelFT.Show(bAllLevel);
aAllLevelNF.Show(bAllLevel);
@@ -1936,10 +1936,10 @@ void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL )
aStartED.Show(!(bBullet||bBitmap));
aBulletPB.Show(bBullet);
- BOOL bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR);
+ sal_Bool bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR);
aBulColorFT.Show( !bBitmap && bBullColor );
aBulColLB.Show( !bBitmap && bBullColor );
- BOOL bBullResSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE);
+ sal_Bool bBullResSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE);
aBulRelSizeFT.Show( !bBitmap && bBullResSize );
aBulRelSizeMF.Show( !bBitmap && bBullResSize );
@@ -1969,33 +1969,33 @@ void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL )
--------------------------------------------------*/
IMPL_LINK( SvxNumOptionsTabPage, LevelHdl_Impl, ListBox *, pBox )
{
- USHORT nSaveNumLvl = nActNumLvl;
+ sal_uInt16 nSaveNumLvl = nActNumLvl;
nActNumLvl = 0;
if(pBox->IsEntryPosSelected( pActNum->GetLevelCount() ) &&
(pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff))
{
nActNumLvl = 0xFFFF;
- pBox->SetUpdateMode(FALSE);
- for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ )
- pBox->SelectEntryPos( i, FALSE );
- pBox->SetUpdateMode(TRUE);
+ pBox->SetUpdateMode(sal_False);
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ )
+ pBox->SelectEntryPos( i, sal_False );
+ pBox->SetUpdateMode(sal_True);
}
else if(pBox->GetSelectEntryCount())
{
- USHORT nMask = 1;
- for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ )
{
if(pBox->IsEntryPosSelected( i ))
nActNumLvl |= nMask;
nMask <<= 1;
}
- pBox->SelectEntryPos( pActNum->GetLevelCount(), FALSE );
+ pBox->SelectEntryPos( pActNum->GetLevelCount(), sal_False );
}
else
{
nActNumLvl = nSaveNumLvl;
- USHORT nMask = 1;
- for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ )
{
if(nActNumLvl & nMask)
{
@@ -2021,15 +2021,15 @@ IMPL_LINK( SvxNumOptionsTabPage, PreviewInvalidateHdl_Impl, Timer*, EMPTYARG )
--------------------------------------------------*/
IMPL_LINK( SvxNumOptionsTabPage, AllLevelHdl_Impl, NumericField*, pBox )
{
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
- USHORT nMask = 1;
- for(USHORT e = 0; e < pActNum->GetLevelCount(); e++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 e = 0; e < pActNum->GetLevelCount(); e++)
{
if(nActNumLvl & nMask)
{
SvxNumberFormat aNumFmt(pActNum->GetLevel(e));
- aNumFmt.SetIncludeUpperLevels((BYTE) std::min(pBox->GetValue(), sal_Int64(e + 1)) );
+ aNumFmt.SetIncludeUpperLevels((sal_uInt8) std::min(pBox->GetValue(), sal_Int64(e + 1)) );
pActNum->SetLevel(e, aNumFmt);
}
nMask <<= 1;
@@ -2046,35 +2046,35 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox )
{
String sSelectStyle;
sal_Int16 eOldType;
- BOOL bShowOrient = FALSE;
- BOOL bBmp = FALSE;
+ sal_Bool bShowOrient = sal_False;
+ sal_Bool bBmp = sal_False;
String aEmptyStr;
- USHORT nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
eOldType = aNumFmt.GetNumberingType();
// PAGEDESC gibt es nicht
- USHORT nNumType = (USHORT)(ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos());
+ sal_uInt16 nNumType = (sal_uInt16)(sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos());
aNumFmt.SetNumberingType((sal_Int16)nNumType);
sal_uInt16 nNumberingType = aNumFmt.GetNumberingType();
if(SVX_NUM_BITMAP == (nNumberingType&(~LINK_TOKEN)))
{
bBmp |= 0 != aNumFmt.GetBrush();
- aNumFmt.SetIncludeUpperLevels( FALSE );
+ aNumFmt.SetIncludeUpperLevels( sal_False );
aNumFmt.SetSuffix( aEmptyStr );
aNumFmt.SetPrefix( aEmptyStr );
if(!bBmp)
aNumFmt.SetGraphic(aEmptyStr);
pActNum->SetLevel(i, aNumFmt);
SwitchNumberType(SHOW_BITMAP, bBmp );
- bShowOrient = TRUE;
+ bShowOrient = sal_True;
}
else if( SVX_NUM_CHAR_SPECIAL == nNumberingType )
{
- aNumFmt.SetIncludeUpperLevels( FALSE );
+ aNumFmt.SetIncludeUpperLevels( sal_False );
aNumFmt.SetSuffix( aEmptyStr );
aNumFmt.SetPrefix( aEmptyStr );
if( !aNumFmt.GetBulletFont() )
@@ -2109,7 +2109,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox )
}
nMask <<= 1;
}
- BOOL bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+ sal_Bool bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
if(bShowOrient && bAllLevelFeature)
{
aOrientFT.Show();
@@ -2126,7 +2126,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox )
aCharFmtLB.SelectEntry(sSelectStyle);
CharFmtHdl_Impl(&aCharFmtLB);
// bAutomaticCharStyles wird im CharFmtHdl_Impl zurueckgesetzt
- bAutomaticCharStyles = TRUE;
+ bAutomaticCharStyles = sal_True;
}
return 0;
}
@@ -2135,8 +2135,8 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox )
* --------------------------------------------------*/
void SvxNumOptionsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType)
{
- BOOL bIsNull = aStartED.GetValue() == 0;
- BOOL bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
+ sal_Bool bIsNull = aStartED.GetValue() == 0;
+ sal_Bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType ||
SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType;
aStartED.SetMin(bNoZeroAllowed ? 1 : 0);
@@ -2148,11 +2148,11 @@ void SvxNumOptionsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType)
--------------------------------------------------*/
IMPL_LINK( SvxNumOptionsTabPage, OrientHdl_Impl, ListBox *, pBox )
{
- USHORT nPos = pBox->GetSelectEntryPos();
+ sal_uInt16 nPos = pBox->GetSelectEntryPos();
nPos ++; // kein VERT_NONE
- USHORT nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -2168,7 +2168,7 @@ IMPL_LINK( SvxNumOptionsTabPage, OrientHdl_Impl, ListBox *, pBox )
}
nMask <<= 1;
}
- SetModified(FALSE);
+ SetModified(sal_False);
return 0;
}
@@ -2178,15 +2178,15 @@ IMPL_LINK( SvxNumOptionsTabPage, OrientHdl_Impl, ListBox *, pBox )
--------------------------------------------------*/
IMPL_LINK( SvxNumOptionsTabPage, SameLevelHdl_Impl, CheckBox *, pBox )
{
- BOOL bSet = pBox->IsChecked();
+ sal_Bool bSet = pBox->IsChecked();
pActNum->SetContinuousNumbering(bSet);
- BOOL bRepaint = FALSE;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_Bool bRepaint = sal_False;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
if(aNumFmt.GetNumberingType() != SVX_NUM_NUMBER_NONE)
{
- bRepaint = TRUE;
+ bRepaint = sal_True;
break;
}
}
@@ -2201,8 +2201,8 @@ IMPL_LINK( SvxNumOptionsTabPage, BulColorHdl_Impl, ColorListBox*, pBox )
{
Color nSetColor = pBox->GetSelectEntryColor();
- USHORT nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -2220,10 +2220,10 @@ IMPL_LINK( SvxNumOptionsTabPage, BulColorHdl_Impl, ColorListBox*, pBox )
* --------------------------------------------------*/
IMPL_LINK( SvxNumOptionsTabPage, BulRelSizeHdl_Impl, MetricField *, pField)
{
- USHORT nRelSize = (USHORT)pField->GetValue();
+ sal_uInt16 nRelSize = (sal_uInt16)pField->GetValue();
- USHORT nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -2242,7 +2242,7 @@ IMPL_LINK( SvxNumOptionsTabPage, BulRelSizeHdl_Impl, MetricField *, pField)
--------------------------------------------------*/
IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton )
{
- USHORT nItemId = pButton->GetCurItemId();
+ sal_uInt16 nItemId = pButton->GetCurItemId();
String aGrfName;
Size aSize;
sal_Bool bSucc(sal_False);
@@ -2279,8 +2279,8 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton )
{
aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)eCoreUnit);
- USHORT nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -2321,7 +2321,7 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG )
{
if(!bMenuButtonInitialized)
{
- bMenuButtonInitialized = TRUE;
+ bMenuButtonInitialized = sal_True;
EnterWait();
PopupMenu* pPopup = aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames);
@@ -2331,7 +2331,7 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG )
String aEmptyStr;
GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS);
- for(USHORT i = 0; i < aGrfNames.Count(); i++)
+ for(sal_uInt16 i = 0; i < aGrfNames.Count(); i++)
{
Graphic aGraphic;
String sGrfName = *(const String*)aGrfNames.GetObject(i);
@@ -2345,7 +2345,7 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG )
if(aSize.Width() > MAX_BMP_WIDTH ||
aSize.Height() > MAX_BMP_HEIGHT)
{
- BOOL bWidth = aSize.Width() > aSize.Height();
+ sal_Bool bWidth = aSize.Width() > aSize.Height();
double nScale = bWidth ?
(double)MAX_BMP_WIDTH / (double)aSize.Width():
(double)MAX_BMP_HEIGHT / (double)aSize.Height();
@@ -2374,14 +2374,14 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG )
--------------------------------------------------*/
IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG )
{
- SvxCharacterMap* pMap = new SvxCharacterMap( this, TRUE );
+ SvxCharacterMap* pMap = new SvxCharacterMap( this, sal_True );
- USHORT nMask = 1;
+ sal_uInt16 nMask = 1;
const Font* pFmtFont = 0;
- BOOL bSameBullet = TRUE;
+ sal_Bool bSameBullet = sal_True;
sal_Unicode cBullet = 0;
- BOOL bFirst = TRUE;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_Bool bFirst = sal_True;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -2392,12 +2392,12 @@ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG )
}
else if(rCurFmt.GetBulletChar() != cBullet )
{
- bSameBullet = FALSE;
+ bSameBullet = sal_False;
break;
}
if(!pFmtFont)
pFmtFont = rCurFmt.GetBulletFont();
- bFirst = FALSE;
+ bFirst = sal_False;
}
nMask <<= 1;
@@ -2414,8 +2414,8 @@ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG )
// Font Numrules umstellen
aActBulletFont = pMap->GetCharFont();
- USHORT _nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 _nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & _nMask)
{
@@ -2439,9 +2439,9 @@ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG )
IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField)
{
- BOOL bWidth = pField == &aWidthMF;
+ sal_Bool bWidth = pField == &aWidthMF;
bLastWidthModified = bWidth;
- BOOL bRatio = aRatioCB.IsChecked();
+ sal_Bool bRatio = aRatioCB.IsChecked();
long nWidthVal = static_cast<long>(aWidthMF.Denormalize(aWidthMF.GetValue(FUNIT_100TH_MM)));
long nHeightVal = static_cast<long>(aHeightMF.Denormalize(aHeightMF.GetValue(FUNIT_100TH_MM)));
nWidthVal = OutputDevice::LogicToLogic( nWidthVal ,
@@ -2450,9 +2450,9 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField)
MAP_100TH_MM, (MapUnit)eCoreUnit);
double fSizeRatio;
- BOOL bRepaint = FALSE;
- USHORT nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_Bool bRepaint = sal_False;
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -2494,7 +2494,7 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField)
const SvxBrushItem* pBrushItem = aNumFmt.GetBrush();
sal_Int16 eOrient = aNumFmt.GetVertOrient();
if(aSize != aSaveSize)
- bRepaint = TRUE;
+ bRepaint = sal_True;
aNumFmt.SetGraphicBrush( pBrushItem, &aSize, &eOrient );
pActNum->SetLevel(i, aNumFmt);
}
@@ -2526,12 +2526,12 @@ IMPL_LINK( SvxNumOptionsTabPage, RatioHdl_Impl, CheckBox *, pBox )
--------------------------------------------------*/
IMPL_LINK( SvxNumOptionsTabPage, CharFmtHdl_Impl, ListBox *, EMPTYARG )
{
- bAutomaticCharStyles = FALSE;
- USHORT nEntryPos = aCharFmtLB.GetSelectEntryPos();
+ bAutomaticCharStyles = sal_False;
+ sal_uInt16 nEntryPos = aCharFmtLB.GetSelectEntryPos();
String sEntry = aCharFmtLB.GetSelectEntry();
- USHORT nMask = 1;
+ sal_uInt16 nMask = 1;
String aEmptyStr;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -2547,7 +2547,7 @@ IMPL_LINK( SvxNumOptionsTabPage, CharFmtHdl_Impl, ListBox *, EMPTYARG )
}
nMask <<= 1;
}
- SetModified(FALSE);
+ SetModified(sal_False);
return 0;
};
@@ -2557,11 +2557,11 @@ IMPL_LINK( SvxNumOptionsTabPage, CharFmtHdl_Impl, ListBox *, EMPTYARG )
--------------------------------------------------*/
IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit )
{
- BOOL bPrefix = pEdit == &aPrefixED;
- BOOL bSuffix = pEdit == &aSuffixED;
- BOOL bStart = pEdit == &aStartED;
- USHORT nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_Bool bPrefix = pEdit == &aPrefixED;
+ sal_Bool bSuffix = pEdit == &aSuffixED;
+ sal_Bool bStart = pEdit == &aStartED;
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -2571,10 +2571,10 @@ IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit )
else if(bSuffix)
aNumFmt.SetSuffix( aSuffixED.GetText() );
else if(bStart)
- aNumFmt.SetStart( (USHORT)aStartED.GetValue() );
+ aNumFmt.SetStart( (sal_uInt16)aStartED.GetValue() );
else //align
{
- USHORT nPos = aAlignLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aAlignLB.GetSelectEntryPos();
SvxAdjust eAdjust = SVX_ADJUST_CENTER;
if(nPos == 0)
eAdjust = SVX_ADJUST_LEFT;
@@ -2594,11 +2594,11 @@ IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit )
/*-----------------09.12.97 11:49-------------------
--------------------------------------------------*/
-USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, USHORT nXStart,
- USHORT nYStart, USHORT nDivision)
+sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, sal_uInt16 nXStart,
+ sal_uInt16 nYStart, sal_uInt16 nDivision)
{
const SvxBrushItem* pBrushItem = rFmt.GetBrush();
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(pBrushItem)
{
const Graphic* pGrf = pBrushItem->GetGraphic();
@@ -2606,7 +2606,7 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, USHORT
{
Size aGSize( rFmt.GetGraphicSize() );
aGSize.Width() /= nDivision;
- nRet = (USHORT)aGSize.Width();
+ nRet = (sal_uInt16)aGSize.Width();
aGSize.Height() /= nDivision;
pGrf->Draw( pVDev, Point(nXStart,nYStart),
pVDev->PixelToLogic( aGSize ) );
@@ -2619,9 +2619,9 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, USHORT
/*-----------------09.12.97 11:54-------------------
--------------------------------------------------*/
-USHORT lcl_DrawBullet(VirtualDevice* pVDev,
- const SvxNumberFormat& rFmt, USHORT nXStart,
- USHORT nYStart, const Size& rSize)
+sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
+ const SvxNumberFormat& rFmt, sal_uInt16 nXStart,
+ sal_uInt16 nYStart, const Size& rSize)
{
Font aTmpFont(pVDev->GetFont());
@@ -2636,7 +2636,7 @@ USHORT lcl_DrawBullet(VirtualDevice* pVDev,
if(!aTmpSize.Height())
aTmpSize.Height() = 1;
aFont.SetSize(aTmpSize);
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
Color aBulletColor = rFmt.GetBulletColor();
if(aBulletColor.GetColor() == COL_AUTO)
aBulletColor = Color(pVDev->GetFillColor().IsDark() ? COL_WHITE : COL_BLACK);
@@ -2648,7 +2648,7 @@ USHORT lcl_DrawBullet(VirtualDevice* pVDev,
long nY = nYStart;
nY -= ((aTmpSize.Height() - rSize.Height())/ 2);
pVDev->DrawText( Point(nXStart, nY), aText );
- USHORT nRet = (USHORT)pVDev->GetTextWidth(aText);
+ sal_uInt16 nRet = (sal_uInt16)pVDev->GetTextWidth(aText);
pVDev->SetFont(aTmpFont);
return nRet;
@@ -2679,10 +2679,10 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
if(pActNum)
{
- USHORT nWidthRelation;
+ sal_uInt16 nWidthRelation;
if(nPageWidth)
{
- nWidthRelation = USHORT (nPageWidth / aSize.Width());
+ nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width());
if(bPosition)
nWidthRelation = nWidthRelation * 2 / 3;
else
@@ -2692,52 +2692,52 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
nWidthRelation = 30; // Kapiteldialog
//Hoehe pro Ebene
- USHORT nXStep = sal::static_int_cast< USHORT >(aSize.Width() / (3 * pActNum->GetLevelCount()));
+ sal_uInt16 nXStep = sal::static_int_cast< sal_uInt16 >(aSize.Width() / (3 * pActNum->GetLevelCount()));
if(pActNum->GetLevelCount() < 10)
nXStep /= 2;
- USHORT nYStart = 4;
+ sal_uInt16 nYStart = 4;
// fuer ein einziges Level darf nicht die gesamte Hoehe benutzt werden
- USHORT nYStep = sal::static_int_cast< USHORT >((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5));
+ sal_uInt16 nYStep = sal::static_int_cast< sal_uInt16 >((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5));
aStdFont = OutputDevice::GetDefaultFont(
DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE);
aStdFont.SetColor(aTextColor);
aStdFont.SetFillColor(aBackColor);
//
- USHORT nFontHeight = nYStep * 6 / 10;
+ sal_uInt16 nFontHeight = nYStep * 6 / 10;
if(bPosition)
nFontHeight = nYStep * 15 / 10;
aStdFont.SetSize(Size( 0, nFontHeight ));
- SvxNodeNum aNum( (BYTE)0 );
- USHORT nPreNum = pActNum->GetLevel(0).GetStart();
+ SvxNodeNum aNum( (sal_uInt8)0 );
+ sal_uInt16 nPreNum = pActNum->GetLevel(0).GetStart();
if(bPosition)
{
- USHORT nLineHeight = nFontHeight * 8 / 7;
- BYTE nStart = 0;
+ sal_uInt16 nLineHeight = nFontHeight * 8 / 7;
+ sal_uInt8 nStart = 0;
while( !(nActLevel & (1<<nStart)) )
{
nStart++;
}
if(nStart)
nStart--;
- BYTE nEnd = std::min( (BYTE)(nStart + 3), (BYTE)pActNum->GetLevelCount() );
- for( BYTE nLevel = nStart; nLevel < nEnd; ++nLevel )
+ sal_uInt8 nEnd = std::min( (sal_uInt8)(nStart + 3), (sal_uInt8)pActNum->GetLevelCount() );
+ for( sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel )
{
const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel);
aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart();
// --> OD 2008-01-16 #newlistlevelattrs#
- USHORT nXStart( 0 );
+ sal_uInt16 nXStart( 0 );
short nTextOffset( 0 );
- USHORT nNumberXPos( 0 );
+ sal_uInt16 nNumberXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation;
nNumberXPos = nXStart;
- USHORT nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
+ sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
if(nFirstLineOffset <= nNumberXPos)
nNumberXPos = nNumberXPos - nFirstLineOffset;
@@ -2758,12 +2758,12 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
}
else
{
- nNumberXPos = static_cast<USHORT>( nTmpNumberXPos );
+ nNumberXPos = static_cast<sal_uInt16>( nTmpNumberXPos );
}
}
// <--
- USHORT nBulletWidth = 0;
+ sal_uInt16 nBulletWidth = 0;
if( SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN)))
{
nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev, rFmt,
@@ -2793,7 +2793,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
pVDev->SetFont(aColorFont);
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
pVDev->SetFont(aSaveFont);
- nBulletWidth = (USHORT)pVDev->GetTextWidth(aText);
+ nBulletWidth = (sal_uInt16)pVDev->GetTextWidth(aText);
nPreNum++;
}
// --> OD 2008-01-16 #newlistlevelattrs#
@@ -2803,11 +2803,11 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
pVDev->SetFont(aStdFont);
String aText(' ');
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
- nBulletWidth = nBulletWidth + (USHORT)pVDev->GetTextWidth(aText);
+ nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText);
}
// --> OD 2008-01-16 #newlistlevelattrs#
- USHORT nTextXPos( 0 );
+ sal_uInt16 nTextXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nTextXPos = nXStart;
@@ -2822,7 +2822,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
{
case SvxNumberFormat::LISTTAB:
{
- nTextXPos = static_cast<USHORT>(
+ nTextXPos = static_cast<sal_uInt16>(
rFmt.GetListtabPos() / nWidthRelation );
if ( nTextXPos < nNumberXPos + nBulletWidth )
{
@@ -2838,7 +2838,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
break;
}
- nXStart = static_cast<USHORT>( rFmt.GetIndentAt() / nWidthRelation );
+ nXStart = static_cast<sal_uInt16>( rFmt.GetIndentAt() / nWidthRelation );
}
// <--
@@ -2863,13 +2863,13 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
if(aBlackColor == aBackColor)
aBlackColor.Invert();
- for( BYTE nLevel = 0; nLevel < pActNum->GetLevelCount();
+ for( sal_uInt8 nLevel = 0; nLevel < pActNum->GetLevelCount();
++nLevel, nYStart = nYStart + nYStep )
{
const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel);
aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart();
// --> OD 2008-01-31 #newlistlevelattrs#
- USHORT nXStart( 0 );
+ sal_uInt16 nXStart( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
@@ -2885,13 +2885,13 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
}
else
{
- nXStart = static_cast<USHORT>(nTmpXStart);
+ nXStart = static_cast<sal_uInt16>(nTmpXStart);
}
}
nXStart /= 2;
nXStart += 2;
// <--
- USHORT nTextOffset = 2 * nXStep;
+ sal_uInt16 nTextOffset = 2 * nXStep;
if( SVX_NUM_BITMAP == (rFmt.GetNumberingType()&(~LINK_TOKEN)) )
{
if(rFmt.IsShowSymbol())
@@ -2924,7 +2924,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
String aText(pActNum->MakeNumString( aNum ));
pVDev->DrawText( Point(nXStart, nYStart), aText );
pVDev->SetFont(aStdFont);
- nTextOffset = (USHORT)pVDev->GetTextWidth(aText);
+ nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText);
nTextOffset = nTextOffset + nXStep;
nPreNum++;
}
@@ -3000,7 +3000,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent,
nNumItemId(SID_ATTR_NUMBERING_RULE),
bModified(false),
bPreset(false),
- bInInintControl(FALSE),
+ bInInintControl(sal_False),
// --> OD 2008-01-11 #newlistlevelattrs#
bLabelAlignmentPosAndSpaceModeActive( false )
// <--
@@ -3013,7 +3013,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent,
aAlignLB.SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl));
// --> OD 2008-01-10 #newlistlevelattrs#
aAlign2LB.SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl));
- for ( USHORT i = 0; i < aAlignLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aAlignLB.GetEntryCount(); ++i )
{
aAlign2LB.InsertEntry( aAlignLB.GetEntry( i ) );
}
@@ -3144,7 +3144,7 @@ void lcl_PrintDebugOutput(FixedText& rFixed, const SvxNumberFormat& rNumFmt)
--------------------------------------------------*/
void SvxNumPositionTabPage::InitControls()
{
- bInInintControl = TRUE;
+ bInInintControl = sal_True;
// --> OD 2008-01-11 #newlistlevelattrs#
const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive &&
aRelativeCB.IsEnabled() && aRelativeCB.IsChecked();
@@ -3171,11 +3171,11 @@ void SvxNumPositionTabPage::InitControls()
// <--
const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM];
- USHORT nMask = 1;
- USHORT nLvl = USHRT_MAX;
+ sal_uInt16 nMask = 1;
+ sal_uInt16 nLvl = USHRT_MAX;
long nFirstBorderText = 0;
long nFirstBorderTextRelative = -1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
aNumFmtArr[i] = &pActNum->GetLevel(i);
if(nActNumLvl & nMask)
@@ -3269,7 +3269,7 @@ void SvxNumPositionTabPage::InitControls()
if(bSameAdjust)
{
- USHORT nPos = 1; // zentriert
+ sal_uInt16 nPos = 1; // zentriert
if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
nPos = 0;
else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
@@ -3290,7 +3290,7 @@ void SvxNumPositionTabPage::InitControls()
// --> OD 2008-01-11 #newlistlevelattrs#
if ( bSameLabelFollowedBy )
{
- USHORT nPos = 0; // LISTTAB
+ sal_uInt16 nPos = 0; // LISTTAB
if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{
nPos = 1;
@@ -3350,7 +3350,7 @@ void SvxNumPositionTabPage::InitControls()
if ( bSetDistEmpty )
aDistBorderMF.SetText(aEmptyStr);
- bInInintControl = FALSE;
+ bInInintControl = sal_False;
}
/*-----------------03.12.97 10:02-------------------
@@ -3359,17 +3359,17 @@ void SvxNumPositionTabPage::InitControls()
void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- UINT16 nTmpNumLvl = USHRT_MAX;
+ sal_uInt16 nTmpNumLvl = USHRT_MAX;
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
if(pExampleSet)
{
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem))
bPreset = ((const SfxBoolItem*)pItem)->GetValue();
- if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem))
nTmpNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
}
//
- if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem))
{
delete pSaveNum;
pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
@@ -3380,19 +3380,19 @@ void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet)
{
*pActNum = *pSaveNum;
nActNumLvl = nTmpNumLvl;
- USHORT nMask = 1;
- aLevelLB.SetUpdateMode(FALSE);
+ sal_uInt16 nMask = 1;
+ aLevelLB.SetUpdateMode(sal_False);
aLevelLB.SetNoSelection();
aLevelLB.SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == USHRT_MAX);
if(nActNumLvl != USHRT_MAX)
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
- aLevelLB.SelectEntryPos( i, TRUE);
+ aLevelLB.SelectEntryPos( i, sal_True);
nMask <<= 1 ;
}
aRelativeCB.Enable(nActNumLvl != 1);
- aLevelLB.SetUpdateMode(TRUE);
+ aLevelLB.SetUpdateMode(sal_True);
// --> OD 2008-01-11 #newlistlevelattrs#
InitPosAndSpaceMode();
@@ -3412,13 +3412,13 @@ int SvxNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet)
{
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*-----------------03.12.97 10:02-------------------
--------------------------------------------------*/
-BOOL SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
{
rSet.Put(SfxUInt16Item(SID_PARAM_CUR_NUM_LEVEL, nActNumLvl));
@@ -3426,7 +3426,7 @@ BOOL SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
{
*pSaveNum = *pActNum;
rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId);
- rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, FALSE));
+ rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, sal_False));
}
return bModified;
}
@@ -3438,15 +3438,15 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
//im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem);
if(eState != SFX_ITEM_SET)
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ eState = rSet.GetItemState(nNumItemId, sal_False, &pItem);
if( eState != SFX_ITEM_SET )
{
- pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) );
eState = SFX_ITEM_SET;
}
@@ -3458,7 +3458,7 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet )
// Ebenen einfuegen
if(!aLevelLB.GetEntryCount())
{
- for(USHORT i = 1; i <= pSaveNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 1; i <= pSaveNum->GetLevelCount(); i++)
aLevelLB.InsertEntry(UniString::CreateFromInt32(i));
if(pSaveNum->GetLevelCount() > 1)
{
@@ -3472,21 +3472,21 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet )
}
else
aLevelLB.SelectEntryPos(aLevelLB.GetEntryCount() - 1);
- USHORT nMask = 1;
- aLevelLB.SetUpdateMode(FALSE);
+ sal_uInt16 nMask = 1;
+ aLevelLB.SetUpdateMode(sal_False);
aLevelLB.SetNoSelection();
if(nActNumLvl == USHRT_MAX)
{
- aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), TRUE);
+ aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), sal_True);
}
else
- for(USHORT i = 0; i < pSaveNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pSaveNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
- aLevelLB.SelectEntryPos( i, TRUE);
+ aLevelLB.SelectEntryPos( i, sal_True);
nMask <<= 1;
}
- aLevelLB.SetUpdateMode(TRUE);
+ aLevelLB.SetUpdateMode(sal_True);
if(!pActNum)
pActNum = new SvxNumRule(*pSaveNum);
@@ -3497,13 +3497,13 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet )
// --> OD 2008-01-11 #newlistlevelattrs#
InitPosAndSpaceMode();
ShowControlsDependingOnPosAndSpaceMode();
-// const BOOL bDraw = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+// const sal_Bool bDraw = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
// aDistNumFT.Show(bDraw);
// aDistNumMF.Show(bDraw);
// <--
InitControls();
- bModified = FALSE;
+ bModified = sal_False;
}
// --> OD 2008-01-11 #newlistlevelattrs#
@@ -3518,8 +3518,8 @@ void SvxNumPositionTabPage::InitPosAndSpaceMode()
SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode =
SvxNumberFormat::LABEL_ALIGNMENT;
- USHORT nMask = 1;
- for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i )
{
if(nActNumLvl & nMask)
{
@@ -3604,15 +3604,15 @@ void SvxNumPositionTabPage::SetMetric(FieldUnit eMetric)
--------------------------------------------------*/
IMPL_LINK( SvxNumPositionTabPage, EditModifyHdl_Impl, Edit *, EMPTYARG )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
// --> OD 2008-01-11 #newlistlevelattrs#
- const USHORT nPos = aAlignLB.IsVisible()
+ const sal_uInt16 nPos = aAlignLB.IsVisible()
? aAlignLB.GetSelectEntryPos()
: aAlign2LB.GetSelectEntryPos();
// <--
@@ -3634,33 +3634,33 @@ IMPL_LINK( SvxNumPositionTabPage, EditModifyHdl_Impl, Edit *, EMPTYARG )
--------------------------------------------------*/
IMPL_LINK( SvxNumPositionTabPage, LevelHdl_Impl, ListBox *, pBox )
{
- USHORT nSaveNumLvl = nActNumLvl;
+ sal_uInt16 nSaveNumLvl = nActNumLvl;
nActNumLvl = 0;
if(pBox->IsEntryPosSelected( pActNum->GetLevelCount() ) &&
(pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff))
{
nActNumLvl = 0xFFFF;
- pBox->SetUpdateMode(FALSE);
- for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ )
- pBox->SelectEntryPos( i, FALSE );
- pBox->SetUpdateMode(TRUE);
+ pBox->SetUpdateMode(sal_False);
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ )
+ pBox->SelectEntryPos( i, sal_False );
+ pBox->SetUpdateMode(sal_True);
}
else if(pBox->GetSelectEntryCount())
{
- USHORT nMask = 1;
- for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ )
{
if(pBox->IsEntryPosSelected( i ))
nActNumLvl |= nMask;
nMask <<= 1;
}
- pBox->SelectEntryPos( pActNum->GetLevelCount(), FALSE );
+ pBox->SelectEntryPos( pActNum->GetLevelCount(), sal_False );
}
else
{
nActNumLvl = nSaveNumLvl;
- USHORT nMask = 1;
- for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ )
{
if(nActNumLvl & nMask)
{
@@ -3687,11 +3687,11 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld )
if(bInInintControl)
return 0;
long nValue = GetCoreValue(*pFld, eCoreUnit);
- USHORT nMask = 1;
+ sal_uInt16 nMask = 1;
#if OSL_DEBUG_LEVEL > 1
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
#endif
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -3704,7 +3704,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld )
if(0 == i)
{
long nTmp = aNumFmt.GetFirstLineOffset();
- aNumFmt.SetAbsLSpace( USHORT(nValue - nTmp));
+ aNumFmt.SetAbsLSpace( sal_uInt16(nValue - nTmp));
}
else
{
@@ -3712,7 +3712,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld )
pActNum->GetLevel( i - 1 ).GetFirstLineOffset() -
pActNum->GetLevel( i ).GetFirstLineOffset();
- aNumFmt.SetAbsLSpace( USHORT(nValue + nTmp));
+ aNumFmt.SetAbsLSpace( sal_uInt16(nValue + nTmp));
}
}
else
@@ -3729,14 +3729,14 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld )
//jetzt muss mit dem FirstLineOffset auch der AbsLSpace veraendert werden
long nDiff = nValue + aNumFmt.GetFirstLineOffset();
long nAbsLSpace = aNumFmt.GetAbsLSpace();
- aNumFmt.SetAbsLSpace(USHORT(nAbsLSpace + nDiff));
+ aNumFmt.SetAbsLSpace(sal_uInt16(nAbsLSpace + nDiff));
aNumFmt.SetFirstLineOffset( -(short)nValue );
}
#if OSL_DEBUG_LEVEL > 1
if(bFirst)
lcl_PrintDebugOutput(*pDebugFixedText, aNumFmt);
- bFirst = FALSE;
+ bFirst = sal_False;
#endif
pActNum->SetLevel( i, aNumFmt );
}
@@ -3758,16 +3758,16 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld )
--------------------------------------------------*/
IMPL_LINK( SvxNumPositionTabPage, RelativeHdl_Impl, CheckBox *, pBox )
{
- BOOL bOn = pBox->IsChecked();
- BOOL bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
- BOOL bSetValue = FALSE;
+ sal_Bool bOn = pBox->IsChecked();
+ sal_Bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
+ sal_Bool bSetValue = sal_False;
long nValue = 0;
if(bOn || bSingleSelection)
{
- USHORT nMask = 1;
- BOOL bFirst = TRUE;
- bSetValue = TRUE;
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 nMask = 1;
+ sal_Bool bFirst = sal_True;
+ bSetValue = sal_True;
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -3782,7 +3782,7 @@ IMPL_LINK( SvxNumPositionTabPage, RelativeHdl_Impl, CheckBox *, pBox )
bSetValue = nValue ==
(rNumFmt.GetAbsLSpace() + rNumFmt.GetFirstLineOffset()) -
(pActNum->GetLevel(i - 1).GetAbsLSpace() + pActNum->GetLevel(i - 1).GetFirstLineOffset());
- bFirst = FALSE;
+ bFirst = sal_False;
}
nMask <<= 1;
}
@@ -3806,7 +3806,7 @@ IMPL_LINK( SvxNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG )
SvxNumberFormat::SvxNumLabelFollowedBy eLabelFollowedBy =
SvxNumberFormat::LISTTAB;
{
- const USHORT nPos = aLabelFollowedByLB.GetSelectEntryPos();
+ const sal_uInt16 nPos = aLabelFollowedByLB.GetSelectEntryPos();
if ( nPos == 1 )
{
eLabelFollowedBy = SvxNumberFormat::SPACE;
@@ -3819,9 +3819,9 @@ IMPL_LINK( SvxNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG )
// set value at the chosen list levels
bool bSameListtabPos = true;
- USHORT nFirstLvl = USHRT_MAX;
- USHORT nMask = 1;
- for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i )
+ sal_uInt16 nFirstLvl = USHRT_MAX;
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i )
{
if ( nActNumLvl & nMask )
{
@@ -3868,8 +3868,8 @@ IMPL_LINK( SvxNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld )
const long nValue = GetCoreValue( *pFld, eCoreUnit );
// set value at the chosen list levels
- USHORT nMask = 1;
- for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i )
{
if ( nActNumLvl & nMask )
{
@@ -3896,8 +3896,8 @@ IMPL_LINK( SvxNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld )
const long nValue = GetCoreValue( *pFld, eCoreUnit );
// set value at the chosen list levels
- USHORT nMask = 1;
- for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i )
{
if ( nActNumLvl & nMask )
{
@@ -3925,8 +3925,8 @@ IMPL_LINK( SvxNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld )
const long nValue = GetCoreValue( *pFld, eCoreUnit );
// set value at the chosen list levels
- USHORT nMask = 1;
- for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i )
{
if ( nActNumLvl & nMask )
{
@@ -3954,7 +3954,7 @@ IMPL_LINK( SvxNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld )
--------------------------------------------------*/
IMPL_LINK( SvxNumPositionTabPage, StandardHdl_Impl, PushButton *, EMPTYARG )
{
- USHORT nMask = 1;
+ sal_uInt16 nMask = 1;
// --> OD 2008-02-11 #newlistlevelattrs#
SvxNumRule aTmpNumRule( pActNum->GetFeatureFlags(),
pActNum->GetLevelCount(),
@@ -3962,7 +3962,7 @@ IMPL_LINK( SvxNumPositionTabPage, StandardHdl_Impl, PushButton *, EMPTYARG )
SVX_RULETYPE_NUMBERING,
pActNum->GetLevel( 0 ).GetPositionAndSpaceMode() );
// <--
- for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
{
@@ -3996,9 +3996,9 @@ IMPL_LINK( SvxNumPositionTabPage, StandardHdl_Impl, PushButton *, EMPTYARG )
return 0;
}
-void SvxNumPositionTabPage::SetModified(BOOL bRepaint)
+void SvxNumPositionTabPage::SetModified(sal_Bool bRepaint)
{
- bModified = TRUE;
+ bModified = sal_True;
if(bRepaint)
{
pPreviewWIN->SetLevel(nActNumLvl);
@@ -4006,9 +4006,9 @@ void SvxNumPositionTabPage::SetModified(BOOL bRepaint)
}
}
-void SvxNumOptionsTabPage::SetModified(BOOL bRepaint)
+void SvxNumOptionsTabPage::SetModified(sal_Bool bRepaint)
{
- bModified = TRUE;
+ bModified = sal_True;
if(bRepaint)
{
pPreviewWIN->SetLevel(nActNumLvl);