diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-14 12:41:27 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-14 12:41:27 +0100 |
commit | 13c1c67ec50995550076b7085d1a955b9df09cd0 (patch) | |
tree | 02d6eb0b5492436ffdad936fa6eff8e9b076d3a9 /cui/source/tabpages | |
parent | 1a64ddfe1d1deeb1779dfa73a4fc8aad089dc968 (diff) |
removetooltypes01: #i112600# remove tooltypes from cui
Diffstat (limited to 'cui/source/tabpages')
35 files changed, 2537 insertions, 2537 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 65d0cad3dfd1..bcf8dca6b7d1 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -59,7 +59,7 @@ namespace svx { // horizontal alignment ------------------------------------------------------- -typedef sfx::ValueItemWrapper< SvxHorJustifyItem, SvxCellHorJustify, USHORT > HorJustItemWrapper; +typedef sfx::ValueItemWrapper< SvxHorJustifyItem, SvxCellHorJustify, sal_uInt16 > HorJustItemWrapper; typedef sfx::ListBoxConnection< HorJustItemWrapper > HorJustConnection; static const HorJustConnection::MapEntryType s_pHorJustMap[] = @@ -75,7 +75,7 @@ static const HorJustConnection::MapEntryType s_pHorJustMap[] = // vertical alignment --------------------------------------------------------- -typedef sfx::ValueItemWrapper< SvxVerJustifyItem, SvxCellVerJustify, USHORT > VerJustItemWrapper; +typedef sfx::ValueItemWrapper< SvxVerJustifyItem, SvxCellVerJustify, sal_uInt16 > VerJustItemWrapper; typedef sfx::ListBoxConnection< VerJustItemWrapper > VerJustConnection; static const VerJustConnection::MapEntryType s_pVerJustMap[] = @@ -89,7 +89,7 @@ static const VerJustConnection::MapEntryType s_pVerJustMap[] = // cell rotate mode ----------------------------------------------------------- -typedef sfx::ValueItemWrapper< SvxRotateModeItem, SvxRotateMode, USHORT > RotateModeItemWrapper; +typedef sfx::ValueItemWrapper< SvxRotateModeItem, SvxRotateMode, sal_uInt16 > RotateModeItemWrapper; typedef sfx::ValueSetConnection< RotateModeItemWrapper > RotateModeConnection; static const RotateModeConnection::MapEntryType s_pRotateModeMap[] = @@ -102,7 +102,7 @@ static const RotateModeConnection::MapEntryType s_pRotateModeMap[] = // ============================================================================ -static USHORT s_pRanges[] = +static sal_uInt16 s_pRanges[] = { SID_ATTR_ALIGN_HOR_JUSTIFY,SID_ATTR_ALIGN_VER_JUSTIFY, SID_ATTR_ALIGN_STACKED,SID_ATTR_ALIGN_LINEBREAK, @@ -208,7 +208,7 @@ SfxTabPage* AlignmentTabPage::Create( Window* pParent, const SfxItemSet& rAttrSe return new AlignmentTabPage( pParent, rAttrSet ); } -USHORT* AlignmentTabPage::GetRanges() +sal_uInt16* AlignmentTabPage::GetRanges() { return s_pRanges; } @@ -239,7 +239,7 @@ void AlignmentTabPage::DataChanged( const DataChangedEvent& rDCEvt ) void AlignmentTabPage::InitVsRefEgde() { // remember selection - is deleted in call to ValueSet::Clear() - USHORT nSel = maVsRefEdge.GetSelectItemId(); + sal_uInt16 nSel = maVsRefEdge.GetSelectItemId(); ResId aResId( GetSettings().GetStyleSettings().GetHighContrastMode() ? IL_LOCK_BMPS_HC : IL_LOCK_BMPS, CUI_MGR() ); ImageList aImageList( aResId ); @@ -260,7 +260,7 @@ void AlignmentTabPage::InitVsRefEgde() void AlignmentTabPage::UpdateEnableControls() { - USHORT nHorAlign = maLbHorAlign.GetSelectEntryPos(); + sal_uInt16 nHorAlign = maLbHorAlign.GetSelectEntryPos(); bool bHorLeft = (nHorAlign == ALIGNDLG_HORALIGN_LEFT); bool bHorBlock = (nHorAlign == ALIGNDLG_HORALIGN_BLOCK); bool bHorFill = (nHorAlign == ALIGNDLG_HORALIGN_FILL); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 05ec88e5aa7f..420786ce52a2 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -89,18 +89,18 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : aLanguageFT( this, CUI_RES(FT_LANG )), aLanguageLB( this, CUI_RES(LB_LANG )) { - BOOL bShowSWOptions = FALSE; - BOOL bOpenSmartTagOptions = FALSE; + sal_Bool bShowSWOptions = sal_False; + sal_Bool bOpenSmartTagOptions = sal_False; if ( _pSet ) { - SFX_ITEMSET_ARG( _pSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, FALSE ); + SFX_ITEMSET_ARG( _pSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, sal_False ); if ( pItem && pItem->GetValue() ) - bShowSWOptions = TRUE; + bShowSWOptions = sal_True; - SFX_ITEMSET_ARG( _pSet, pItem2, SfxBoolItem, SID_OPEN_SMARTTAGOPTIONS, FALSE ); + SFX_ITEMSET_ARG( _pSet, pItem2, SfxBoolItem, SID_OPEN_SMARTTAGOPTIONS, sal_False ); if ( pItem2 && pItem2->GetValue() ) - bOpenSmartTagOptions = TRUE; + bOpenSmartTagOptions = sal_True; } aLanguageFT.SetZOrder(0, WINDOW_ZORDER_FIRST); @@ -141,9 +141,9 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : if( SvtLanguageOptions().IsCTLFontEnabled() ) nLangList |= LANG_LIST_CTL; - aLanguageLB.SetLanguageList( nLangList, TRUE, TRUE ); + aLanguageLB.SetLanguageList( nLangList, sal_True, sal_True ); aLanguageLB.SelectLanguage( LANGUAGE_NONE ); - USHORT nPos = aLanguageLB.GetSelectEntryPos(); + sal_uInt16 nPos = aLanguageLB.GetSelectEntryPos(); DBG_ASSERT( LISTBOX_ENTRY_NOTFOUND != nPos, "listbox entry missing" ); aLanguageLB.SetEntryData( nPos, (void*)(long) LANGUAGE_DONTKNOW ); @@ -171,23 +171,23 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : --------------------------------------------------*/ -BOOL lcl_FindEntry( ListBox& rLB, const String& rEntry, +sal_Bool lcl_FindEntry( ListBox& rLB, const String& rEntry, CollatorWrapper& rCmpClass ) { - USHORT nCount = rLB.GetEntryCount(); - USHORT nSelPos = rLB.GetSelectEntryPos(); - USHORT i; + sal_uInt16 nCount = rLB.GetEntryCount(); + sal_uInt16 nSelPos = rLB.GetSelectEntryPos(); + sal_uInt16 i; for(i = 0; i < nCount; i++) { if( 0 == rCmpClass.compareString(rEntry, rLB.GetEntry(i) )) { - rLB.SelectEntryPos(i, TRUE); - return TRUE; + rLB.SelectEntryPos(i, sal_True); + return sal_True; } } if(LISTBOX_ENTRY_NOTFOUND != nSelPos) - rLB.SelectEntryPos(nSelPos, FALSE); - return FALSE; + rLB.SelectEntryPos(nSelPos, sal_False); + return sal_False; } /* -----------------23.11.98 10:46------------------- @@ -195,13 +195,13 @@ BOOL lcl_FindEntry( ListBox& rLB, const String& rEntry, * --------------------------------------------------*/ IMPL_LINK(OfaAutoCorrDlg, SelectLanguageHdl, ListBox*, pBox) { - USHORT nPos = pBox->GetSelectEntryPos(); + sal_uInt16 nPos = pBox->GetSelectEntryPos(); void* pVoid = pBox->GetEntryData(nPos); LanguageType eNewLang = (LanguageType)(long)pVoid; //alte Einstellungen speichern und neu fuellen if(eNewLang != eLastDialogLanguage) { - USHORT nPageId = GetCurPageId(); + sal_uInt16 nPageId = GetCurPageId(); if(RID_OFAPAGE_AUTOCORR_REPLACE == nPageId) ((OfaAutocorrReplacePage*)GetTabPage( nPageId ))->SetLanguage(eNewLang); else if(RID_OFAPAGE_AUTOCORR_EXCEPT == nPageId) @@ -255,12 +255,12 @@ SfxTabPage* OfaAutocorrOptionsPage::Create( Window* pParent, --------------------------------------------------*/ -BOOL OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); long nFlags = pAutoCorrect->GetFlags(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; pAutoCorrect->SetAutoCorrFlag(Autocorrect, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CptlSttWrd, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc, aCheckLB.IsChecked(nPos++)); @@ -269,7 +269,7 @@ BOOL OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) pAutoCorrect->SetAutoCorrFlag(ChgToEnEmDash, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(IgnoreDoubleSpace, aCheckLB.IsChecked(nPos++)); - BOOL bReturn = nFlags != pAutoCorrect->GetFlags(); + sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags(); if(bReturn ) { SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); @@ -284,7 +284,7 @@ BOOL OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) * --------------------------------------------------*/ void OfaAutocorrOptionsPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(FALSE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_False); } /*-----------------14.10.96 15.58------------------- @@ -297,7 +297,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); const long nFlags = pAutoCorrect->GetFlags(); - aCheckLB.SetUpdateMode(FALSE); + aCheckLB.SetUpdateMode(sal_False); aCheckLB.Clear(); aCheckLB.InsertEntry(sInput); @@ -308,7 +308,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) aCheckLB.InsertEntry(sDash); aCheckLB.InsertEntry(sNoDblSpaces); - USHORT nPos = 0; + sal_uInt16 nPos = 0; aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & Autocorrect) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CptlSttWrd) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CptlSttSntnc) ); @@ -317,7 +317,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgToEnEmDash) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & IgnoreDoubleSpace) ); - aCheckLB.SetUpdateMode(TRUE); + aCheckLB.SetUpdateMode(sal_True); } /*********************************************************************/ @@ -373,10 +373,10 @@ class OfaImpBrwString : public SvLBoxString { public: - OfaImpBrwString( SvLBoxEntry* pEntry, USHORT nFlags, + OfaImpBrwString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr){} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; @@ -385,7 +385,7 @@ public: /*********************************************************************/ -void __EXPORT OfaImpBrwString::Paint( const Point& rPos, SvLBox& rDev, USHORT /*nFlags*/, +void __EXPORT OfaImpBrwString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* pEntry ) { rDev.DrawText( rPos, GetText() ); @@ -404,8 +404,8 @@ void __EXPORT OfaImpBrwString::Paint( const Point& rPos, SvLBox& rDev, USHORT /* } aFont.SetWeight( WEIGHT_BOLD ); - BOOL bFett = TRUE; - USHORT nPos = 0; + sal_Bool bFett = sal_True; + sal_uInt16 nPos = 0; do { String sTxt( pUserData->pString->GetToken( 0, 1, nPos )); @@ -518,7 +518,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( Window* pParent, /* */ /*********************************************************************/ -SvLBoxEntry* OfaSwAutoFmtOptionsPage::CreateEntry(String& rTxt, USHORT nCol) +SvLBoxEntry* OfaSwAutoFmtOptionsPage::CreateEntry(String& rTxt, sal_uInt16 nCol) { SvLBoxEntry* pEntry = new SvLBoxEntry; @@ -572,14 +572,14 @@ SfxTabPage* __EXPORT OfaSwAutoFmtOptionsPage::Create( Window* pParent, /* */ /*********************************************************************/ -BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); long nFlags = pAutoCorrect->GetFlags(); - BOOL bCheck = aCheckLB.IsChecked(USE_REPLACE_TABLE, CBCOL_FIRST); + sal_Bool bCheck = aCheckLB.IsChecked(USE_REPLACE_TABLE, CBCOL_FIRST); bModified |= pOpt->bAutoCorrect != bCheck; pOpt->bAutoCorrect = bCheck; pAutoCorrect->SetAutoCorrFlag(Autocorrect, @@ -637,7 +637,7 @@ BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) bModified |= pOpt->bRightMargin != bCheck; pOpt->bRightMargin = bCheck; bModified |= nPercent != pOpt->nRightMargin; - pOpt->nRightMargin = (BYTE)nPercent; + pOpt->nRightMargin = (sal_uInt8)nPercent; bCheck = aCheckLB.IsChecked(APPLY_NUMBERING, CBCOL_SECOND); bModified |= pOpt->bSetNumRule != bCheck; @@ -682,7 +682,7 @@ BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) pCfg->Commit(); } - return TRUE; + return sal_True; } /* -----------------23.11.98 16:15------------------- @@ -690,7 +690,7 @@ BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) * --------------------------------------------------*/ void OfaSwAutoFmtOptionsPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(FALSE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_False); } /*********************************************************************/ @@ -704,7 +704,7 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& ) SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); const long nFlags = pAutoCorrect->GetFlags(); - aCheckLB.SetUpdateMode(FALSE); + aCheckLB.SetUpdateMode(sal_False); aCheckLB.Clear(); // Die folgenden Eintraege muessen in der selben Reihenfolge, wie im @@ -773,7 +773,7 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& ) aCheckLB.CheckEntryPos( CREATE_TABLE, CBCOL_SECOND, pOpt->bCreateTable ); aCheckLB.CheckEntryPos( REPLACE_STYLES, CBCOL_SECOND, pOpt->bReplaceStyles ); - aCheckLB.SetUpdateMode(TRUE); + aCheckLB.SetUpdateMode(sal_True); } /*********************************************************************/ @@ -792,7 +792,7 @@ IMPL_LINK(OfaSwAutoFmtOptionsPage, SelectHdl, OfaACorrCheckListBox*, pBox) IMPL_LINK(OfaSwAutoFmtOptionsPage, EditHdl, PushButton*, EMPTYARG) { - ULONG nSelEntryPos = aCheckLB.GetSelectEntryPos(); + sal_uLong nSelEntryPos = aCheckLB.GetSelectEntryPos(); if( nSelEntryPos == REPLACE_BULLETS || nSelEntryPos == APPLY_NUMBERING) { @@ -818,7 +818,7 @@ IMPL_LINK(OfaSwAutoFmtOptionsPage, EditHdl, PushButton*, EMPTYARG) aDlg.GetPrcntFld().SetValue(nPercent); if(RET_OK == aDlg.Execute()) { - nPercent = (USHORT)aDlg.GetPrcntFld().GetValue(); + nPercent = (sal_uInt16)aDlg.GetPrcntFld().GetValue(); sMargin = ' '; sMargin += String::CreateFromInt32( nPercent ); sMargin += '%'; @@ -835,7 +835,7 @@ IMPL_LINK(OfaSwAutoFmtOptionsPage, EditHdl, PushButton*, EMPTYARG) void OfaACorrCheckListBox::SetTabs() { SvxSimpleTable::SetTabs(); - USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; + sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; if( aTabs.Count() > 1 ) { @@ -855,7 +855,7 @@ void OfaACorrCheckListBox::SetTabs() /* */ /*********************************************************************/ -void OfaACorrCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked) +void OfaACorrCheckListBox::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked) { if ( nPos < GetEntryCount() ) SetCheckButtonState( @@ -869,7 +869,7 @@ void OfaACorrCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked) /* */ /*********************************************************************/ -BOOL OfaACorrCheckListBox::IsChecked(ULONG nPos, USHORT nCol) +sal_Bool OfaACorrCheckListBox::IsChecked(sal_uLong nPos, sal_uInt16 nCol) { return GetCheckButtonState( GetEntry(nPos), nCol ) == SV_BUTTON_CHECKED; } @@ -878,7 +878,7 @@ BOOL OfaACorrCheckListBox::IsChecked(ULONG nPos, USHORT nCol) /* */ /*********************************************************************/ -void OfaACorrCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol, SvButtonState eState) +void OfaACorrCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol, SvButtonState eState) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -907,7 +907,7 @@ void OfaACorrCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol /* */ /*********************************************************************/ -SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol ) const +SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const { SvButtonState eState = SV_BUTTON_UNCHECKED; SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -915,7 +915,7 @@ SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, US if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) { - USHORT nButtonFlags = pItem->GetButtonFlags(); + sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); } @@ -934,8 +934,8 @@ void OfaACorrCheckListBox::KeyInput( const KeyEvent& rKEvt ) if(!rKEvt.GetKeyCode().GetModifier() && KEY_SPACE == rKEvt.GetKeyCode().GetCode()) { - ULONG nSelPos = GetSelectEntryPos(); - USHORT nCol = GetCurrentTabPos() - 1; + sal_uLong nSelPos = GetSelectEntryPos(); + sal_uInt16 nCol = GetCurrentTabPos() - 1; if ( nCol < 2 ) { CheckEntryPos( nSelPos, nCol, !IsChecked( nSelPos, nCol ) ); @@ -943,7 +943,7 @@ void OfaACorrCheckListBox::KeyInput( const KeyEvent& rKEvt ) } else { - USHORT nCheck = IsChecked(nSelPos, 1) ? 1 : 0; + sal_uInt16 nCheck = IsChecked(nSelPos, 1) ? 1 : 0; if(IsChecked(nSelPos, 0)) nCheck += 2; nCheck--; @@ -1002,10 +1002,10 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* pParent, sNew(aNewReplacePB.GetText()), pFormatText(0), eLang(eLastDialogLanguage), - bHasSelectionText(FALSE), - bFirstSelect(TRUE), - bReplaceEditChanged(FALSE), - bSWriter(TRUE) + bHasSelectionText(sal_False), + bFirstSelect(sal_True), + bReplaceEditChanged(sal_False), + bSWriter(sal_True) { FreeResource(); SfxModule *pMod = *(SfxModule**)GetAppData(SHL_WRITER); @@ -1031,8 +1031,8 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* pParent, aShortED.SetActionHdl(LINK(this, OfaAutocorrReplacePage, NewDelHdl)); aReplaceED.SetActionHdl(LINK(this, OfaAutocorrReplacePage, NewDelHdl)); - aReplaceED.SetSpaces(TRUE); - aShortED.SetSpaces(TRUE); + aReplaceED.SetSpaces(sal_True); + aShortED.SetSpaces(sal_True); aShortED.SetMaxTextLen(30); } @@ -1065,7 +1065,7 @@ void OfaAutocorrReplacePage::ActivatePage( const SfxItemSet& ) { if(eLang != eLastDialogLanguage) SetLanguage(eLastDialogLanguage); - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(TRUE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_True); } /* -----------------20.11.98 13:26------------------- * @@ -1078,7 +1078,7 @@ int OfaAutocorrReplacePage::DeactivatePage( SfxItemSet* ) --------------------------------------------------*/ -BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); DoubleStringArrayPtr pDoubleStringArray = aDoubleStringTable.Last(); @@ -1088,19 +1088,19 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) if(eCurLang != eLang) // die aktuelle Sprache wird weiter hinten behandelt { SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eCurLang); - USHORT nWordListCount = pWordList->Count(); - USHORT nDoubleStringArrayCount = pDoubleStringArray->Count(); - USHORT nPos = nDoubleStringArrayCount; - USHORT nLastPos = nPos; + sal_uInt16 nWordListCount = pWordList->Count(); + sal_uInt16 nDoubleStringArrayCount = pDoubleStringArray->Count(); + sal_uInt16 nPos = nDoubleStringArrayCount; + sal_uInt16 nLastPos = nPos; // 1. Durchlauf: Eintraege loeschen oder veraendern: - for( USHORT nWordListPos = nWordListCount; nWordListPos; nWordListPos-- ) + for( sal_uInt16 nWordListPos = nWordListCount; nWordListPos; nWordListPos-- ) { SvxAutocorrWordPtr pWordPtr = pWordList->GetObject(nWordListPos - 1); String sEntry(pWordPtr->GetShort()); // formatierter Text steht nur im Writer - BOOL bFound = !bSWriter && !pWordPtr->IsTextOnly(); + sal_Bool bFound = !bSWriter && !pWordPtr->IsTextOnly(); while(!bFound && nPos) { DoubleString* pDouble = pDoubleStringArray->GetObject( nPos - 1); @@ -1109,7 +1109,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) sEntry, pDouble->sShort )) { nLastPos = nPos - 1; - bFound = TRUE; + bFound = sal_True; if( !(pWordPtr->IsTextOnly() == (0 == pDouble->pUserData) && 0 == pCompareCaseClass->compareString( pWordPtr->GetLong(), pDouble->sLong ) ) ) @@ -1128,7 +1128,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) } } nDoubleStringArrayCount = pDoubleStringArray->Count(); - for(USHORT nDoubleStringArrayPos = 0; nDoubleStringArrayPos < nDoubleStringArrayCount; nDoubleStringArrayPos++ ) + for(sal_uInt16 nDoubleStringArrayPos = 0; nDoubleStringArrayPos < nDoubleStringArrayCount; nDoubleStringArrayPos++ ) { //jetzt sollte es nur noch neue Eintraege geben DoubleString* pDouble = pDoubleStringArray->GetObject( nDoubleStringArrayPos ); @@ -1149,21 +1149,21 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) aDoubleStringTable.Clear(); // jetzt noch die aktuelle Selektion SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eLang); - USHORT nWordListCount = pWordList->Count(); - USHORT nListBoxCount = (USHORT)aReplaceTLB.GetEntryCount(); + sal_uInt16 nWordListCount = pWordList->Count(); + sal_uInt16 nListBoxCount = (sal_uInt16)aReplaceTLB.GetEntryCount(); - aReplaceTLB.SetUpdateMode(FALSE); - USHORT nListBoxPos = nListBoxCount; - USHORT nLastListBoxPos = nListBoxPos; + aReplaceTLB.SetUpdateMode(sal_False); + sal_uInt16 nListBoxPos = nListBoxCount; + sal_uInt16 nLastListBoxPos = nListBoxPos; // 1. Durchlauf: Eintraege loeschen oder veraendern: - USHORT i; + sal_uInt16 i; for( i = nWordListCount; i; i-- ) { SvxAutocorrWordPtr pWordPtr = pWordList->GetObject(i- 1); String sEntry(pWordPtr->GetShort()); // formatierter Text steht nur im Writer - BOOL bFound = !bSWriter && !pWordPtr->IsTextOnly(); + sal_Bool bFound = !bSWriter && !pWordPtr->IsTextOnly(); while(!bFound && nListBoxPos) { SvLBoxEntry* pEntry = aReplaceTLB.GetEntry( nListBoxPos - 1); @@ -1171,7 +1171,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) aReplaceTLB.GetEntryText(pEntry, 0))) { nLastListBoxPos = nListBoxPos - 1; - bFound = TRUE; + bFound = sal_True; String sLong = aReplaceTLB.GetEntryText(pEntry, 1); if( !(pWordPtr->IsTextOnly() == (0 == pEntry->GetUserData()) && 0 == pCompareCaseClass->compareString( @@ -1192,7 +1192,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) } } - nListBoxCount = (USHORT)aReplaceTLB.GetEntryCount(); + nListBoxCount = (sal_uInt16)aReplaceTLB.GetEntryCount(); for(i = 0; i < nListBoxCount; i++ ) { //jetzt sollte es nur noch neue Eintraege geben @@ -1207,13 +1207,13 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) } } - return FALSE; + return sal_False; } /* -----------------19.11.98 13:16------------------- * * --------------------------------------------------*/ -void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, +void OfaAutocorrReplacePage::RefillReplaceBox(sal_Bool bFromReset, LanguageType eOldLanguage, LanguageType eNewLanguage) { @@ -1225,17 +1225,17 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, DoubleStringArray* pArray = 0; if(aDoubleStringTable.IsKeyValid(eOldLanguage)) { - pArray = aDoubleStringTable.Seek(ULONG(eOldLanguage)); + pArray = aDoubleStringTable.Seek(sal_uLong(eOldLanguage)); pArray->DeleteAndDestroy(0, pArray->Count()); } else { pArray = new DoubleStringArray; - aDoubleStringTable.Insert(ULONG(eOldLanguage), pArray); + aDoubleStringTable.Insert(sal_uLong(eOldLanguage), pArray); } - USHORT nListBoxCount = (USHORT)aReplaceTLB.GetEntryCount(); - USHORT i; + sal_uInt16 nListBoxCount = (sal_uInt16)aReplaceTLB.GetEntryCount(); + sal_uInt16 i; for(i = 0; i < nListBoxCount; i++) { DoubleString* pDouble = new DoubleString(); @@ -1258,11 +1258,11 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, if(aDoubleStringTable.IsKeyValid(eLang)) { - DoubleStringArray* pArray = aDoubleStringTable.Seek(ULONG(eNewLanguage)); - for(USHORT i = 0; i < pArray->Count(); i++) + DoubleStringArray* pArray = aDoubleStringTable.Seek(sal_uLong(eNewLanguage)); + for(sal_uInt16 i = 0; i < pArray->Count(); i++) { DoubleString* pDouble = pArray->GetObject(i); - BOOL bTextOnly = 0 == pDouble->pUserData; + sal_Bool bTextOnly = 0 == pDouble->pUserData; // formatierter Text wird nur im Writer angeboten if(bSWriter || bTextOnly) { @@ -1285,10 +1285,10 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eLang); - for(USHORT i = 0; i < pWordList->Count(); i++) + for(sal_uInt16 i = 0; i < pWordList->Count(); i++) { SvxAutocorrWordPtr pWordPtr = pWordList->GetObject(i); - BOOL bTextOnly = pWordPtr->IsTextOnly(); + sal_Bool bTextOnly = pWordPtr->IsTextOnly(); // formatierter Text wird nur im Writer angeboten if(bSWriter || bTextOnly) { @@ -1305,22 +1305,22 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, pFormatText->Insert(new String(pWordPtr->GetShort())); } } - aNewReplacePB.Enable(FALSE); - aDeleteReplacePB.Enable(FALSE); + aNewReplacePB.Enable(sal_False); + aDeleteReplacePB.Enable(sal_False); } SfxViewShell* pViewShell = SfxViewShell::Current(); - if( pViewShell && pViewShell->HasSelection( TRUE ) ) + if( pViewShell && pViewShell->HasSelection( sal_True ) ) { - bHasSelectionText = TRUE; + bHasSelectionText = sal_True; const String sSelection( pViewShell->GetSelectionText() ); aReplaceED.SetText( sSelection ); aTextOnlyCB.Check( !bSWriter ); aTextOnlyCB.Enable( bSWriter && sSelection.Len() ); } else - aTextOnlyCB.Enable( FALSE ); + aTextOnlyCB.Enable( sal_False ); } /*-----------------14.10.96 15.58------------------- @@ -1328,7 +1328,7 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, void OfaAutocorrReplacePage::Reset( const SfxItemSet& ) { - RefillReplaceBox(TRUE, eLang, eLang); + RefillReplaceBox(sal_True, eLang, eLang); aShortED.GrabFocus(); } @@ -1340,7 +1340,7 @@ void OfaAutocorrReplacePage::SetLanguage(LanguageType eSet) //save old settings an refill if(eSet != eLang) { - RefillReplaceBox(FALSE, eLang, eSet); + RefillReplaceBox(sal_False, eLang, eSet); eLastDialogLanguage = eSet; delete pCompareClass; delete pCompareCaseClass; @@ -1369,7 +1369,7 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox) String sTmpShort(pBox->GetEntryText(pEntry, 0)); // wird der Text ueber den ModifyHdl gesetzt, dann steht der Cursor sonst immer am Wortanfang, // obwohl man gerade hier editiert - BOOL bSameContent = 0 == pCompareClass->compareString( + sal_Bool bSameContent = 0 == pCompareClass->compareString( sTmpShort, aShortED.GetText() ); Selection aSel = aShortED.GetSelection(); if(aShortED.GetText() != sTmpShort) @@ -1384,9 +1384,9 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox) aTextOnlyCB.Check(0 == pEntry->GetUserData()); } else - bFirstSelect = FALSE; + bFirstSelect = sal_False; - aNewReplacePB.Enable(FALSE); + aNewReplacePB.Enable(sal_False); aDeleteReplacePB.Enable(); return 0; }; @@ -1416,18 +1416,18 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) if(sEntry.Len() && ( aReplaceED.GetText().Len() || ( bHasSelectionText && bSWriter ) )) { - aReplaceTLB.SetUpdateMode(FALSE); - USHORT nPos = USHRT_MAX; + aReplaceTLB.SetUpdateMode(sal_False); + sal_uInt16 nPos = USHRT_MAX; sEntry += '\t'; sEntry += aReplaceED.GetText(); if(_pNewEntry) { - nPos = (USHORT)aReplaceTLB.GetModel()->GetAbsPos(_pNewEntry); + nPos = (sal_uInt16)aReplaceTLB.GetModel()->GetAbsPos(_pNewEntry); aReplaceTLB.GetModel()->Remove(_pNewEntry); } else { - USHORT j; + sal_uInt16 j; for( j = 0; j < aReplaceTLB.GetEntryCount(); j++ ) { SvLBoxEntry* pReplaceEntry = aReplaceTLB.GetEntry(j); @@ -1445,7 +1445,7 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) pInsEntry->SetUserData(&bHasSelectionText); // neuer formatierter Text aReplaceTLB.MakeVisible( pInsEntry ); - aReplaceTLB.SetUpdateMode(TRUE); + aReplaceTLB.SetUpdateMode(sal_True); // falls der Request aus dem ReplaceEdit kam, dann Focus in das ShortEdit setzen if(aReplaceED.HasFocus()) aShortED.GrabFocus(); @@ -1468,7 +1468,7 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) { SvLBoxEntry* pFirstSel = aReplaceTLB.FirstSelected(); - BOOL bShort = pEdt == &aShortED; + sal_Bool bShort = pEdt == &aShortED; const String rEntry = pEdt->GetText(); const String rRepString = aReplaceED.GetText(); String aWordStr( pCharClass->lower( rEntry )); @@ -1477,21 +1477,21 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) { if(rEntry.Len()) { - BOOL bFound = FALSE; - BOOL bTmpSelEntry=FALSE; + sal_Bool bFound = sal_False; + sal_Bool bTmpSelEntry=sal_False; - for(USHORT i = 0; i < aReplaceTLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < aReplaceTLB.GetEntryCount(); i++) { SvLBoxEntry* pEntry = aReplaceTLB.GetEntry( i ); String aTestStr=aReplaceTLB.GetEntryText(pEntry, 0); if( 0 == pCompareClass->compareString(rEntry, aTestStr )) { if(rRepString.Len()) - bFirstSelect = TRUE; + bFirstSelect = sal_True; aReplaceTLB.SetCurEntry(pEntry); pFirstSel = pEntry; aNewReplacePB.SetText(sModify); - bFound= TRUE; + bFound= sal_True; break; } else @@ -1500,17 +1500,17 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) if(aTestStr.Search(aWordStr)==0 && !bTmpSelEntry) { aReplaceTLB.MakeVisible(pEntry); - bTmpSelEntry=TRUE; + bTmpSelEntry=sal_True; } } } if(!bFound) { - aReplaceTLB.SelectAll(FALSE); + aReplaceTLB.SelectAll(sal_False); pFirstSel = 0; aNewReplacePB.SetText(sNew); if(bReplaceEditChanged) - aTextOnlyCB.Enable(FALSE); + aTextOnlyCB.Enable(sal_False); } aDeleteReplacePB.Enable(bFound); } @@ -1523,7 +1523,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) } else if(!bShort) { - bReplaceEditChanged = TRUE; + bReplaceEditChanged = sal_True; if(pFirstSel) { aNewReplacePB.SetText(sModify); @@ -1531,17 +1531,17 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) } const String& rShortTxt = aShortED.GetText(); - BOOL bEnableNew = rShortTxt.Len() && + sal_Bool bEnableNew = rShortTxt.Len() && ( rRepString.Len() || ( bHasSelectionText && bSWriter )) && ( !pFirstSel || rRepString != aReplaceTLB.GetEntryText( pFirstSel, 1 ) ); if(bEnableNew && pFormatText) { - for(USHORT i = 0; i < pFormatText->Count(); i++) + for(sal_uInt16 i = 0; i < pFormatText->Count(); i++) if(*pFormatText->GetObject(i) == rShortTxt) { - bEnableNew = FALSE; + bEnableNew = sal_False; break; } } @@ -1567,12 +1567,12 @@ typedef StringsArrays* StringsArraysPtr; /* -----------------19.11.98 16:07------------------- * * --------------------------------------------------*/ -BOOL lcl_FindInArray(SvStringsDtor& rStrings, const String& rString) +sal_Bool lcl_FindInArray(SvStringsDtor& rStrings, const String& rString) { - for(USHORT i = 0; i < rStrings.Count(); i++) + for(sal_uInt16 i = 0; i < rStrings.Count(); i++) if(rString == *rStrings.GetObject(i)) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } void lcl_ClearTable(StringsTable& rTable) @@ -1655,7 +1655,7 @@ void OfaAutocorrExceptPage::ActivatePage( const SfxItemSet& ) { if(eLang != eLastDialogLanguage) SetLanguage(eLastDialogLanguage); - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(TRUE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_True); } /* -----------------20.11.98 13:26------------------- * @@ -1668,7 +1668,7 @@ int OfaAutocorrExceptPage::DeactivatePage( SfxItemSet* ) --------------------------------------------------*/ -BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); StringsArraysPtr pArrays = aStringsTable.Last(); @@ -1681,8 +1681,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pWrdList) { - USHORT nCount = pWrdList->Count(); - USHORT i; + sal_uInt16 nCount = pWrdList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pWrdList->GetObject( --i ); @@ -1704,8 +1704,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pCplList) { - USHORT nCount = pCplList->Count(); - USHORT i; + sal_uInt16 nCount = pCplList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pCplList->GetObject( --i ); @@ -1730,8 +1730,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pWrdList) { - USHORT nCount = pWrdList->Count(); - USHORT i; + sal_uInt16 nCount = pWrdList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pWrdList->GetObject( --i ); @@ -1752,8 +1752,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pCplList) { - USHORT nCount = pCplList->Count(); - USHORT i; + sal_uInt16 nCount = pCplList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pCplList->GetObject( --i ); @@ -1773,7 +1773,7 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) pAutoCorrect->SetAutoCorrFlag( SaveWordCplSttLst, aAutoAbbrevCB.IsChecked()); if(aAutoCapsCB.IsChecked() != aAutoCapsCB.GetSavedValue()) pAutoCorrect->SetAutoCorrFlag( SaveWordWrdSttLst, aAutoCapsCB.IsChecked()); - return FALSE; + return sal_False; } /* -----------------23.11.98 10:33------------------- @@ -1784,7 +1784,7 @@ void OfaAutocorrExceptPage::SetLanguage(LanguageType eSet) if(eLang != eSet) { //alte Einstellungen speichern und neu fuellen - RefillReplaceBoxes(FALSE, eLang, eSet); + RefillReplaceBoxes(sal_False, eLang, eSet); eLastDialogLanguage = eSet; delete pCompareClass; pCompareClass = new CollatorWrapper( GetProcessFact() ); @@ -1798,7 +1798,7 @@ void OfaAutocorrExceptPage::SetLanguage(LanguageType eSet) /* -----------------20.11.98 14:06------------------- * * --------------------------------------------------*/ -void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, +void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool bFromReset, LanguageType eOldLanguage, LanguageType eNewLanguage) { @@ -1810,7 +1810,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, StringsArraysPtr pArrays = 0; if(aStringsTable.IsKeyValid(eOldLanguage)) { - pArrays = aStringsTable.Seek(ULONG(eOldLanguage)); + pArrays = aStringsTable.Seek(sal_uLong(eOldLanguage)); pArrays->aAbbrevStrings.DeleteAndDestroy( 0, pArrays->aAbbrevStrings.Count()); pArrays->aDoubleCapsStrings.DeleteAndDestroy( @@ -1819,10 +1819,10 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, else { pArrays = new StringsArrays; - aStringsTable.Insert(ULONG(eOldLanguage), pArrays); + aStringsTable.Insert(sal_uLong(eOldLanguage), pArrays); } - USHORT i; + sal_uInt16 i; for(i = 0; i < aAbbrevLB.GetEntryCount(); i++) { pArrays->aAbbrevStrings.Insert( @@ -1843,8 +1843,8 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, if(aStringsTable.IsKeyValid(eLang)) { - StringsArraysPtr pArrays = aStringsTable.Seek(ULONG(eLang)); - USHORT i; + StringsArraysPtr pArrays = aStringsTable.Seek(sal_uLong(eLang)); + sal_uInt16 i; for(i = 0; i < pArrays->aAbbrevStrings.Count(); i++ ) { aAbbrevLB.InsertEntry(*pArrays->aAbbrevStrings.GetObject(i)); @@ -1859,7 +1859,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); const SvStringsISortDtor* pCplList = pAutoCorrect->GetCplSttExceptList(eLang); const SvStringsISortDtor* pWrdList = pAutoCorrect->GetWrdSttExceptList(eLang); - USHORT i; + sal_uInt16 i; for( i = 0; i < pCplList->Count(); i++ ) { aAbbrevLB.InsertEntry(*pCplList->GetObject(i)); @@ -1878,7 +1878,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, void OfaAutocorrExceptPage::Reset( const SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); - RefillReplaceBoxes(TRUE, eLang, eLang); + RefillReplaceBoxes(sal_True, eLang, eLang); aAutoAbbrevCB. Check( pAutoCorrect->IsAutoCorrFlag( SaveWordCplSttLst )); aAutoCapsCB. Check( pAutoCorrect->IsAutoCorrFlag( SaveWordWrdSttLst )); aAutoAbbrevCB.SaveValue(); @@ -1926,13 +1926,13 @@ IMPL_LINK(OfaAutocorrExceptPage, SelectHdl, ListBox*, pBox) if(pBox == &aAbbrevLB) { aAbbrevED.SetText(pBox->GetSelectEntry()); - aNewAbbrevPB.Enable(FALSE); + aNewAbbrevPB.Enable(sal_False); aDelAbbrevPB.Enable(); } else { aDoubleCapsED.SetText(pBox->GetSelectEntry()); - aNewDoublePB.Enable(FALSE); + aNewDoublePB.Enable(sal_False); aDelDoublePB.Enable(); } return 0; @@ -1944,12 +1944,12 @@ IMPL_LINK(OfaAutocorrExceptPage, SelectHdl, ListBox*, pBox) IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, Edit*, pEdt) { -// BOOL bSame = pEdt->GetText() == ->GetSelectEntry(); +// sal_Bool bSame = pEdt->GetText() == ->GetSelectEntry(); const String& sEntry = pEdt->GetText(); - BOOL bEntryLen = 0!= sEntry.Len(); + sal_Bool bEntryLen = 0!= sEntry.Len(); if(pEdt == &aAbbrevED) { - BOOL bSame = lcl_FindEntry(aAbbrevLB, sEntry, *pCompareClass); + sal_Bool bSame = lcl_FindEntry(aAbbrevLB, sEntry, *pCompareClass); if(bSame && sEntry != aAbbrevLB.GetSelectEntry()) pEdt->SetText(aAbbrevLB.GetSelectEntry()); aNewAbbrevPB.Enable(!bSame && bEntryLen); @@ -1957,7 +1957,7 @@ IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, Edit*, pEdt) } else { - BOOL bSame = lcl_FindEntry(aDoubleCapsLB, sEntry, *pCompareClass); + sal_Bool bSame = lcl_FindEntry(aDoubleCapsLB, sEntry, *pCompareClass); if(bSame && sEntry != aDoubleCapsLB.GetSelectEntry()) pEdt->SetText(aDoubleCapsLB.GetSelectEntry()); aNewDoublePB.Enable(!bSame && bEntryLen); @@ -1973,7 +1973,7 @@ IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, Edit*, pEdt) void AutoCorrEdit::KeyInput( const KeyEvent& rKEvt ) { const KeyCode aKeyCode = rKEvt.GetKeyCode(); - const USHORT nModifier = aKeyCode.GetModifier(); + const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_RETURN ) { //wird bei Enter nichts getan, dann doch die Basisklasse rufen @@ -1995,7 +1995,7 @@ enum OfaQuoteOptions REPLACE_1ST }; -SvLBoxEntry* OfaQuoteTabPage::CreateEntry(String& rTxt, USHORT nCol) +SvLBoxEntry* OfaQuoteTabPage::CreateEntry(String& rTxt, sal_uInt16 nCol) { SvLBoxEntry* pEntry = new SvLBoxEntry; @@ -2060,14 +2060,14 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : { FreeResource(); - BOOL bShowSWOptions = FALSE; + sal_Bool bShowSWOptions = sal_False; aCheckLB.SetHelpId( HID_OFAPAGE_QUOTE_CLB ); aSwCheckLB.SetHelpId( HID_OFAPAGE_QUOTE_SW_CLB ); - SFX_ITEMSET_ARG( &rSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, FALSE ); + SFX_ITEMSET_ARG( &rSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, sal_False ); if ( pItem && pItem->GetValue() ) - bShowSWOptions = TRUE; + bShowSWOptions = sal_True; if ( bShowSWOptions ) { @@ -2085,7 +2085,7 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : sHeader += '\t'; aSwCheckLB.InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_CENTER | HIB_VCENTER | HIB_FIXEDPOS | HIB_FIXED); - aCheckLB.Hide( TRUE ); + aCheckLB.Hide( sal_True ); } else { @@ -2118,7 +2118,7 @@ SfxTabPage* OfaQuoteTabPage::Create( Window* pParent, /*-----------------03.07.97 13:18------------------- --------------------------------------------------*/ -BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaQuoteTabPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); @@ -2126,17 +2126,17 @@ BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) if ( aCheckLB.IsVisible( ) ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; pAutoCorrect->SetAutoCorrFlag(AddNonBrkSpace, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(ChgOrdinalNumber, aCheckLB.IsChecked(nPos++)); } - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if ( aSwCheckLB.IsVisible( ) ) { SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); - BOOL bCheck = aSwCheckLB.IsChecked(ADD_NONBRK_SPACE, CBCOL_FIRST); + sal_Bool bCheck = aSwCheckLB.IsChecked(ADD_NONBRK_SPACE, CBCOL_FIRST); bModified |= pOpt->bAddNonBrkSpace != bCheck; pOpt->bAddNonBrkSpace = bCheck; pAutoCorrect->SetAutoCorrFlag(AddNonBrkSpace, @@ -2151,28 +2151,28 @@ BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) pAutoCorrect->SetAutoCorrFlag(ChgQuotes, aTypoCB.IsChecked()); pAutoCorrect->SetAutoCorrFlag(ChgSglQuotes, aSingleTypoCB.IsChecked()); - BOOL bReturn = nFlags != pAutoCorrect->GetFlags(); + sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags(); if(cStartQuote != pAutoCorrect->GetStartDoubleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cStartQuote); //TODO pAutoCorrect->SetStartDoubleQuote(cUCS2); } if(cEndQuote != pAutoCorrect->GetEndDoubleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cEndQuote); //TODO pAutoCorrect->SetEndDoubleQuote(cUCS2); } if(cSglStartQuote != pAutoCorrect->GetStartSingleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cSglStartQuote); //TODO pAutoCorrect->SetStartSingleQuote(cUCS2); } if(cSglEndQuote != pAutoCorrect->GetEndSingleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cSglEndQuote); //TODO pAutoCorrect->SetEndSingleQuote(cUCS2); } @@ -2190,7 +2190,7 @@ BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) * --------------------------------------------------*/ void OfaQuoteTabPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(FALSE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_False); } /*-----------------03.07.97 13:18------------------- @@ -2205,7 +2205,7 @@ void OfaQuoteTabPage::Reset( const SfxItemSet& ) { SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); - aSwCheckLB.SetUpdateMode( FALSE ); + aSwCheckLB.SetUpdateMode( sal_False ); aSwCheckLB.Clear(); aSwCheckLB.GetModel()->Insert(CreateEntry(sNonBrkSpace, CBCOL_BOTH )); @@ -2216,23 +2216,23 @@ void OfaQuoteTabPage::Reset( const SfxItemSet& ) aSwCheckLB.CheckEntryPos( REPLACE_1ST, CBCOL_FIRST, pOpt->bChgOrdinalNumber ); aSwCheckLB.CheckEntryPos( REPLACE_1ST, CBCOL_SECOND, 0 != (nFlags & ChgOrdinalNumber) ); - aSwCheckLB.SetUpdateMode( TRUE ); + aSwCheckLB.SetUpdateMode( sal_True ); } // Initialize the non Sw options if ( aCheckLB.IsVisible( ) ) { - aCheckLB.SetUpdateMode( FALSE ); + aCheckLB.SetUpdateMode( sal_False ); aCheckLB.Clear( ); aCheckLB.InsertEntry( sNonBrkSpace ); aCheckLB.InsertEntry( sOrdinal ); - USHORT nPos = 0; + sal_uInt16 nPos = 0; aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & AddNonBrkSpace) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgOrdinalNumber) ); - aCheckLB.SetUpdateMode( TRUE ); + aCheckLB.SetUpdateMode( sal_True ); } // Initialize the quote stuffs @@ -2264,7 +2264,7 @@ void OfaQuoteTabPage::Reset( const SfxItemSet& ) IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) { - USHORT nMode = SGL_START; + sal_uInt16 nMode = SGL_START; if(pBtn == &aSglEndQuotePB) nMode = SGL_END; else if(pBtn == &aStartQuotePB) @@ -2272,7 +2272,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) else if(pBtn == &aEndQuotePB) nMode = DBL_END; // Zeichenauswahl-Dialog starten - SvxCharacterMap* pMap = new SvxCharacterMap( this, TRUE ); + SvxCharacterMap* pMap = new SvxCharacterMap( this, sal_True ); pMap->SetCharFont( OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT, LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE, 0 )); pMap->SetText(nMode < SGL_END ? sStartQuoteDlg : sEndQuoteDlg ); @@ -2285,22 +2285,22 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) case SGL_START: cDlg = cSglStartQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\'',TRUE,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 + cDlg = pAutoCorrect->GetQuote('\'',sal_True,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 break; case SGL_END: cDlg = cSglEndQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\'',FALSE,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 + cDlg = pAutoCorrect->GetQuote('\'',sal_False,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 break; case DBL_START: cDlg = cStartQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\"',TRUE,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 + cDlg = pAutoCorrect->GetQuote('\"',sal_True,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 break; case DBL_END: cDlg = cEndQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\"',FALSE,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 + cDlg = pAutoCorrect->GetQuote('\"',sal_False,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 break; default: DBG_ERROR("svx::OfaQuoteTabPage::QuoteHdl(), how to initialize cDlg?" ); @@ -2410,7 +2410,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent, FreeResource(); // the defined KEYs - static const USHORT aKeyCodes[] = { + static const sal_uInt16 aKeyCodes[] = { KEY_END, KEY_RETURN, KEY_SPACE, @@ -2419,11 +2419,11 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent, 0 }; - for( const USHORT* pKeys = aKeyCodes; *pKeys; ++pKeys ) + for( const sal_uInt16* pKeys = aKeyCodes; *pKeys; ++pKeys ) { KeyCode aKCode( *pKeys ); - USHORT nPos = aDCBExpandKey.InsertEntry( aKCode.GetName() ); - aDCBExpandKey.SetEntryData( nPos, (void*)(ULONG)*pKeys ); + sal_uInt16 nPos = aDCBExpandKey.InsertEntry( aKCode.GetName() ); + aDCBExpandKey.SetEntryData( nPos, (void*)(sal_uLong)*pKeys ); if( KEY_RETURN == *pKeys ) // default to RETURN aDCBExpandKey.SelectEntryPos( nPos ); } @@ -2443,12 +2443,12 @@ SfxTabPage* OfaAutoCompleteTabPage::Create( Window* pParent, return new OfaAutoCompleteTabPage( pParent, rSet ); } -BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE, bCheck; + sal_Bool bModified = sal_False, bCheck; SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); - USHORT nVal; + sal_uInt16 nVal; bCheck = aCBActiv.IsChecked(); bModified |= pOpt->bAutoCompleteWords != bCheck; @@ -2466,25 +2466,25 @@ BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) bModified |= pOpt->bAutoCmpltShowAsTip != bCheck; pOpt->bAutoCmpltShowAsTip = bCheck; - nVal = (USHORT)aNFMinWordlen.GetValue(); + nVal = (sal_uInt16)aNFMinWordlen.GetValue(); bModified |= nVal != pOpt->nAutoCmpltWordLen; pOpt->nAutoCmpltWordLen = nVal; - nVal = (USHORT)aNFMaxEntries.GetValue(); + nVal = (sal_uInt16)aNFMaxEntries.GetValue(); bModified |= nVal != pOpt->nAutoCmpltListLen; pOpt->nAutoCmpltListLen = nVal; nVal = aDCBExpandKey.GetSelectEntryPos(); if( nVal < aDCBExpandKey.GetEntryCount() ) { - ULONG nKey = (ULONG)aDCBExpandKey.GetEntryData( nVal ); + sal_uLong nKey = (sal_uLong)aDCBExpandKey.GetEntryData( nVal ); bModified |= nKey != pOpt->nAutoCmpltExpandKey; - pOpt->nAutoCmpltExpandKey = (USHORT)nKey; + pOpt->nAutoCmpltExpandKey = (sal_uInt16)nKey; } if( pAutoCmpltList && nAutoCmpltListCnt != aLBEntries.GetEntryCount() ) { - bModified = TRUE; + bModified = sal_True; pOpt->pAutoCmpltList = pAutoCmpltList; } if( bModified ) @@ -2493,7 +2493,7 @@ BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) pCfg->SetModified(); pCfg->Commit(); } - return TRUE; + return sal_True; } void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) @@ -2512,9 +2512,9 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) // select the specific KeyCode: { - ULONG nKey = pOpt->nAutoCmpltExpandKey; - for( USHORT n = 0, nCnt = aDCBExpandKey.GetEntryCount(); n < nCnt; ++n ) - if( nKey == (ULONG)aDCBExpandKey.GetEntryData( n )) + sal_uLong nKey = pOpt->nAutoCmpltExpandKey; + for( sal_uInt16 n = 0, nCnt = aDCBExpandKey.GetEntryCount(); n < nCnt; ++n ) + if( nKey == (sal_uLong)aDCBExpandKey.GetEntryData( n )) { aDCBExpandKey.SelectEntryPos( n ); break; @@ -2526,10 +2526,10 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) pAutoCmpltList = (SvStringsISortDtor*)pOpt->pAutoCmpltList; pOpt->pAutoCmpltList = 0; nAutoCmpltListCnt = pAutoCmpltList->Count(); - for( USHORT n = 0; n < nAutoCmpltListCnt; ++n ) + for( sal_uInt16 n = 0; n < nAutoCmpltListCnt; ++n ) { const StringPtr pStr = pAutoCmpltList->GetObject( n ); - USHORT nPos = aLBEntries.InsertEntry( *pStr ); + sal_uInt16 nPos = aLBEntries.InsertEntry( *pStr ); aLBEntries.SetEntryData( nPos, (void*)pStr ); } } @@ -2545,15 +2545,15 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) void OfaAutoCompleteTabPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( FALSE ); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( sal_False ); } IMPL_LINK( OfaAutoCompleteTabPage, DeleteHdl, PushButton*, EMPTYARG ) { - USHORT nSelCnt = pAutoCmpltList ? aLBEntries.GetSelectEntryCount() : 0; + sal_uInt16 nSelCnt = pAutoCmpltList ? aLBEntries.GetSelectEntryCount() : 0; while( nSelCnt ) { - USHORT nPos = aLBEntries.GetSelectEntryPos( --nSelCnt ); + sal_uInt16 nPos = aLBEntries.GetSelectEntryPos( --nSelCnt ); const StringPtr pStr = (StringPtr)aLBEntries.GetEntryData( nPos ); aLBEntries.RemoveEntry( nPos ); nPos = pAutoCmpltList->GetPos( pStr ); @@ -2565,7 +2565,7 @@ IMPL_LINK( OfaAutoCompleteTabPage, DeleteHdl, PushButton*, EMPTYARG ) IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox ) { - BOOL bEnable = pBox->IsChecked(); + sal_Bool bEnable = pBox->IsChecked(); if( pBox == &aCBActiv ) { aCBAppendSpace.Enable( bEnable ); @@ -2580,7 +2580,7 @@ IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox ) void OfaAutoCompleteTabPage::CopyToClipboard() const { - USHORT nSelCnt = aLBEntries.GetSelectEntryCount(); + sal_uInt16 nSelCnt = aLBEntries.GetSelectEntryCount(); if( pAutoCmpltList && nSelCnt ) { TransferDataContainer* pCntnr = new TransferDataContainer; @@ -2597,7 +2597,7 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const rtl_TextEncoding nEncode = gsl_getSystemTextEncoding(); - for( USHORT n = 0; n < nSelCnt; ++n ) + for( sal_uInt16 n = 0; n < nSelCnt; ++n ) { sData += ByteString( aLBEntries.GetSelectEntry( n ), nEncode ); sData += pLineEnd; @@ -2686,8 +2686,8 @@ struct ImplSmartTagLBUserData */ void OfaSmartTagOptionsTabPage::ClearListBox() { - const ULONG nCount = m_aSmartTagTypesLB.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + const sal_uLong nCount = m_aSmartTagTypesLB.GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(i); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); @@ -2745,7 +2745,7 @@ void OfaSmartTagOptionsTabPage::FillListBox( const SmartTagMgr& rSmartTagMgr ) */ IMPL_LINK( OfaSmartTagOptionsTabPage, ClickHdl, PushButton*, EMPTYARG ) { - const USHORT nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); + const sal_uInt16 nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(nPos); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); uno::Reference< smarttags::XSmartTagRecognizer > xRec = pUserData->mxRec; @@ -2762,7 +2762,7 @@ IMPL_LINK( OfaSmartTagOptionsTabPage, ClickHdl, PushButton*, EMPTYARG ) */ IMPL_LINK( OfaSmartTagOptionsTabPage, CheckHdl, CheckBox*, EMPTYARG ) { - const BOOL bEnable = m_aMainCB.IsChecked(); + const sal_Bool bEnable = m_aMainCB.IsChecked(); m_aSmartTagTypesLB.Enable( bEnable ); m_aSmartTagTypesLB.Invalidate(); m_aPropertiesPB.Enable( false ); @@ -2784,7 +2784,7 @@ IMPL_LINK(OfaSmartTagOptionsTabPage, SelectHdl, SvxCheckListBox*, EMPTYARG) if ( m_aSmartTagTypesLB.GetEntryCount() < 1 ) return 0; - const USHORT nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); + const sal_uInt16 nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(nPos); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); uno::Reference< smarttags::XSmartTagRecognizer > xRec = pUserData->mxRec; @@ -2801,7 +2801,7 @@ IMPL_LINK(OfaSmartTagOptionsTabPage, SelectHdl, SvxCheckListBox*, EMPTYARG) /** Propagates the current settings to the smart tag manager. */ -BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); @@ -2809,19 +2809,19 @@ BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) // robust! if ( !pSmartTagMgr ) - return FALSE; + return sal_False; - BOOL bModifiedSmartTagTypes = FALSE; + sal_Bool bModifiedSmartTagTypes = sal_False; std::vector< rtl::OUString > aDisabledSmartTagTypes; - const ULONG nCount = m_aSmartTagTypesLB.GetEntryCount(); + const sal_uLong nCount = m_aSmartTagTypesLB.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(i); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); - const BOOL bChecked = m_aSmartTagTypesLB.IsChecked(i); - const BOOL bIsCurrentlyEnabled = pSmartTagMgr->IsSmartTagTypeEnabled( pUserData->maSmartTagType ); + const sal_Bool bChecked = m_aSmartTagTypesLB.IsChecked(i); + const sal_Bool bIsCurrentlyEnabled = pSmartTagMgr->IsSmartTagTypeEnabled( pUserData->maSmartTagType ); bModifiedSmartTagTypes = bModifiedSmartTagTypes || ( !bChecked != !bIsCurrentlyEnabled ); @@ -2831,7 +2831,7 @@ BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) delete pUserData; } - const BOOL bModifiedRecognize = ( !m_aMainCB.IsChecked() != !pSmartTagMgr->IsLabelTextWithSmartTags() ); + const sal_Bool bModifiedRecognize = ( !m_aMainCB.IsChecked() != !pSmartTagMgr->IsLabelTextWithSmartTags() ); if ( bModifiedSmartTagTypes || bModifiedRecognize ) { bool bLabelTextWithSmartTags = m_aMainCB.IsChecked() ? true : false; @@ -2839,7 +2839,7 @@ BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) bModifiedSmartTagTypes ? &aDisabledSmartTagTypes : 0 ); } - return TRUE; + return sal_True; } /** Sets the controls based on the current settings at SmartTagMgr. @@ -2862,6 +2862,6 @@ void OfaSmartTagOptionsTabPage::Reset( const SfxItemSet& ) void OfaSmartTagOptionsTabPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( FALSE ); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( sal_False ); } 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); } } diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx index 8cae4b77cc62..79bf90a5606c 100644 --- a/cui/source/tabpages/bbdlg.cxx +++ b/cui/source/tabpages/bbdlg.cxx @@ -43,7 +43,7 @@ SvxBorderBackgroundDlg::SvxBorderBackgroundDlg( Window *pParent, const SfxItemSet& rCoreSet, - BOOL bEnableSelector ) : + sal_Bool bEnableSelector ) : SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_BBDLG ), &rCoreSet ), bEnableBackgroundSelector( bEnableSelector ) @@ -61,7 +61,7 @@ SvxBorderBackgroundDlg::~SvxBorderBackgroundDlg() // ----------------------------------------------------------------------- -void SvxBorderBackgroundDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage ) +void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) { // Umschalten zwischen Farbe/Grafik ermoeglichen: diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 0c1c1c7b269c..9140a2f0e4c2 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -75,7 +75,7 @@ // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW, SID_ATTR_ALIGN_MARGIN, SID_ATTR_ALIGN_MARGIN, @@ -85,7 +85,7 @@ static USHORT pRanges[] = 0 }; -BOOL SvxBorderTabPage::bSync = TRUE; +sal_Bool SvxBorderTabPage::bSync = sal_True; //------------------------------------------------------------------------ @@ -222,7 +222,7 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, /* Use SvxMarginItem instead of margins from SvxBoxItem, if present. -> Remember this state in mbUseMarginItem, because other special handling is needed across various functions... */ - mbUseMarginItem = rCoreAttrs.GetItemState(GetWhich(SID_ATTR_ALIGN_MARGIN),TRUE) != SFX_ITEM_UNKNOWN; + mbUseMarginItem = rCoreAttrs.GetItemState(GetWhich(SID_ATTR_ALIGN_MARGIN),sal_True) != SFX_ITEM_UNKNOWN; // Metrik einstellen FieldUnit eFUnit = GetModuleFieldUnit( rCoreAttrs ); @@ -263,10 +263,10 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, SetFieldUnit( aEdShadowSize, eFUnit ); - USHORT nWhich = GetWhich( SID_ATTR_BORDER_INNER, sal_False ); - BOOL bIsDontCare = TRUE; + sal_uInt16 nWhich = GetWhich( SID_ATTR_BORDER_INNER, sal_False ); + sal_Bool bIsDontCare = sal_True; - if ( rCoreAttrs.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreAttrs.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { // Absatz oder Tabelle const SvxBoxInfoItem* pBoxInfo = @@ -358,14 +358,14 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, if ( pColorTable ) { // fuellen der Linienfarben-Box - aLbLineColor.SetUpdateMode( FALSE ); + aLbLineColor.SetUpdateMode( sal_False ); for ( long i = 0; i < pColorTable->Count(); ++i ) { XColorEntry* pEntry = pColorTable->GetColor(i); aLbLineColor.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - aLbLineColor.SetUpdateMode( TRUE ); + aLbLineColor.SetUpdateMode( sal_True ); // dann nur noch in die Schattenfarben-Box kopieren aLbShadowColor.CopyEntries( aLbLineColor ); } @@ -404,7 +404,7 @@ SvxBorderTabPage::~SvxBorderTabPage() // ----------------------------------------------------------------------- -USHORT* SvxBorderTabPage::GetRanges() +sal_uInt16* SvxBorderTabPage::GetRanges() { return pRanges; } @@ -438,7 +438,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) const SvxBoxItem* pBoxItem; const SvxBoxInfoItem* pBoxInfoItem; - USHORT nWhichBox = GetWhich(SID_ATTR_BORDER_OUTER); + sal_uInt16 nWhichBox = GetWhich(SID_ATTR_BORDER_OUTER); SfxMapUnit eCoreUnit; const Color aColBlack = RGBCOL(COL_BLACK); @@ -482,9 +482,9 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) if ( pBoxInfoItem->IsDist() ) { - if( rSet.GetItemState( nWhichBox, TRUE ) >= SFX_ITEM_DEFAULT ) + if( rSet.GetItemState( nWhichBox, sal_True ) >= SFX_ITEM_DEFAULT ) { - BOOL bIsAnyBorderVisible = aFrameSel.IsAnyBorderVisible(); + sal_Bool bIsAnyBorderVisible = aFrameSel.IsAnyBorderVisible(); if( !bIsAnyBorderVisible || !pBoxInfoItem->IsMinDist() ) { aLeftMF.SetMin( 0 ); @@ -513,7 +513,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) // or it is null with an active border line // no automatic changes should be made const long nDefDist = bIsAnyBorderVisible ? pBoxInfoItem->GetDefDist() : 0; - BOOL bDiffDist = (nDefDist != nLeftDist || + sal_Bool bDiffDist = (nDefDist != nLeftDist || nDefDist != nRightDist || nDefDist != nTopDist || nDefDist != nBottomDist); @@ -553,7 +553,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) //------------------------------------------------------------- { // Do all visible lines show the same line widths? - USHORT nPrim, nDist, nSecn; + sal_uInt16 nPrim, nDist, nSecn; bool bWidthEq = aFrameSel.GetVisibleWidth( nPrim, nDist, nSecn ); if( bWidthEq ) aLbLineStyle.SelectEntry( nPrim * 100, nSecn * 100, nDist * 100 ); @@ -566,7 +566,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) if( !bColorEq ) aColor.SetColor( COL_BLACK ); - USHORT nSelPos = aLbLineColor.GetEntryPos( aColor ); + sal_uInt16 nSelPos = aLbLineColor.GetEntryPos( aColor ); if( nSelPos == LISTBOX_ENTRY_NOTFOUND ) nSelPos = aLbLineColor.InsertEntry( aColor, SVX_RESSTR( RID_SVXSTR_COLOR_USER ) ); @@ -582,7 +582,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) SelColHdl_Impl( &aLbLineColor ); } - BOOL bEnable = aWndShadows.GetSelectItemId() > 1 ; + sal_Bool bEnable = aWndShadows.GetSelectItemId() > 1 ; aFtShadowSize.Enable(bEnable); aEdShadowSize.Enable(bEnable); aFtShadowColor.Enable(bEnable); @@ -600,11 +600,11 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pItem; 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(); if(nHtmlMode & HTMLMODE_ON) { //Im Html-Mode gibt es keinen Schatten und nur komplette Umrandungen @@ -616,14 +616,14 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) aLbShadowColor.Disable(); aFlShadow .Disable(); - USHORT nLBCount = aLbLineStyle.GetEntryCount(); + sal_uInt16 nLBCount = aLbLineStyle.GetEntryCount(); // ist es ein Absatzdialog, dann alle Linien fuer // Sw-Export, sonst ist die Page nicht da if(!(mbHorEnabled || mbVerEnabled) && 0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS) && SFX_ITEM_AVAILABLE > rSet.GetItemState(GetWhich( SID_ATTR_PARA_LINESPACE ))) { - for( USHORT i = nLBCount - 1; i > LINESTYLE_HTML_MAX; --i) + for( sal_uInt16 i = nLBCount - 1; i > LINESTYLE_HTML_MAX; --i) aLbLineStyle.RemoveEntry(i); } @@ -655,13 +655,13 @@ int SvxBorderTabPage::DeactivatePage( SfxItemSet* _pSet ) #define IS_DONT_CARE(a) ((a).GetState() == svx::FRAMESTATE_DONTCARE ) -BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) { bool bAttrsChanged = SfxTabPage::FillItemSet( rCoreAttrs ); - BOOL bPut = TRUE; - USHORT nBoxWhich = GetWhich( SID_ATTR_BORDER_OUTER ); - USHORT nBoxInfoWhich = rCoreAttrs.GetPool()->GetWhich( SID_ATTR_BORDER_INNER, sal_False ); + sal_Bool bPut = sal_True; + sal_uInt16 nBoxWhich = GetWhich( SID_ATTR_BORDER_OUTER ); + sal_uInt16 nBoxInfoWhich = rCoreAttrs.GetPool()->GetWhich( SID_ATTR_BORDER_INNER, sal_False ); const SfxItemSet& rOldSet = GetItemSet(); SvxBoxItem aBoxItem ( nBoxWhich ); SvxBoxInfoItem aBoxInfoItem ( nBoxInfoWhich ); @@ -673,7 +673,7 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) //------------------ // Umrandung aussen: //------------------ - typedef ::std::pair<svx::FrameBorderType,USHORT> TBorderPair; + typedef ::std::pair<svx::FrameBorderType,sal_uInt16> TBorderPair; TBorderPair eTypes1[] = { TBorderPair(svx::FRAMEBORDER_TOP,BOX_LINE_TOP), TBorderPair(svx::FRAMEBORDER_BOTTOM,BOX_LINE_BOTTOM), @@ -703,7 +703,7 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) if( aLeftMF.IsVisible() ) { // #i40405# enable distance controls for next dialog call - aBoxInfoItem.SetDist( TRUE ); + aBoxInfoItem.SetDist( sal_True ); if( !mbUseMarginItem ) { @@ -734,10 +734,10 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) (pOldBoxInfoItem && !pOldBoxInfoItem->IsValid(VALID_DISTANCE)) ) { - aBoxItem.SetDistance( (USHORT)GetCoreValue( aLeftMF, eCoreUnit ), BOX_LINE_LEFT ); - aBoxItem.SetDistance( (USHORT)GetCoreValue( aRightMF, eCoreUnit ), BOX_LINE_RIGHT ); - aBoxItem.SetDistance( (USHORT)GetCoreValue( aTopMF, eCoreUnit ), BOX_LINE_TOP ); - aBoxItem.SetDistance( (USHORT)GetCoreValue( aBottomMF, eCoreUnit ), BOX_LINE_BOTTOM); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aLeftMF, eCoreUnit ), BOX_LINE_LEFT ); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aRightMF, eCoreUnit ), BOX_LINE_RIGHT ); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aTopMF, eCoreUnit ), BOX_LINE_TOP ); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aBottomMF, eCoreUnit ), BOX_LINE_BOTTOM); } else { @@ -746,10 +746,10 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) aBoxItem.SetDistance(pOldBoxItem->GetDistance(BOX_LINE_TOP ), BOX_LINE_TOP); aBoxItem.SetDistance(pOldBoxItem->GetDistance(BOX_LINE_BOTTOM), BOX_LINE_BOTTOM); } - aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE ); + aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True ); } else - aBoxInfoItem.SetValid( VALID_DISTANCE, FALSE ); + aBoxInfoItem.SetValid( VALID_DISTANCE, sal_False ); } } } @@ -767,13 +767,13 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) // // Put oder Clear der Umrandung? // - bPut = TRUE; + bPut = sal_True; - if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxWhich, FALSE )) + if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxWhich, sal_False )) { bPut = aBoxItem != (const SvxBoxItem&)(rOldSet.Get(nBoxWhich)) ? sal_True : sal_False; } - if( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxInfoWhich, FALSE ) ) + if( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxInfoWhich, sal_False ) ) { const SvxBoxInfoItem& rOldBoxInfo = (const SvxBoxInfoItem&) rOldSet.Get(nBoxInfoWhich); @@ -788,14 +788,14 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) if ( !pOldBoxItem || !( *pOldBoxItem == aBoxItem ) ) { rCoreAttrs.Put( aBoxItem ); - bAttrsChanged |= TRUE; + bAttrsChanged |= sal_True; } pOld = GetOldItem( rCoreAttrs, SID_ATTR_BORDER_INNER, sal_False ); if ( !pOld || !( *(const SvxBoxInfoItem*)pOld == aBoxInfoItem ) ) { rCoreAttrs.Put( aBoxInfoItem ); - bAttrsChanged |= TRUE; + bAttrsChanged |= sal_True; } } else @@ -859,7 +859,7 @@ IMPL_LINK( SvxBorderTabPage, SelPreHdl_Impl, void *, EMPTYARG ) aFrameSel.DeselectAllBorders(); // Using image ID to find correct line in table above. - USHORT nLine = GetPresetImageId( aWndPresets.GetSelectItemId() ) - 1; + sal_uInt16 nLine = GetPresetImageId( aWndPresets.GetSelectItemId() ) - 1; // Apply all styles from the table for( int nBorder = 0; nBorder < svx::FRAMEBORDERTYPE_COUNT; ++nBorder ) @@ -896,7 +896,7 @@ IMPL_LINK( SvxBorderTabPage, SelPreHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBorderTabPage, SelSdwHdl_Impl, void *, EMPTYARG ) { - BOOL bEnable = aWndShadows.GetSelectItemId() > 1; + sal_Bool bEnable = aWndShadows.GetSelectItemId() > 1; aFtShadowSize.Enable(bEnable); aEdShadowSize.Enable(bEnable); aFtShadowColor.Enable(bEnable); @@ -925,9 +925,9 @@ IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox *, pLb ) { if ( pLb == &aLbLineStyle ) aFrameSel.SetStyleToSelection( - static_cast< USHORT >( aLbLineStyle.GetSelectEntryLine1() / 100 ), - static_cast< USHORT >( aLbLineStyle.GetSelectEntryDistance() / 100 ), - static_cast< USHORT >( aLbLineStyle.GetSelectEntryLine2() / 100 ) ); + static_cast< sal_uInt16 >( aLbLineStyle.GetSelectEntryLine1() / 100 ), + static_cast< sal_uInt16 >( aLbLineStyle.GetSelectEntryDistance() / 100 ), + static_cast< sal_uInt16 >( aLbLineStyle.GetSelectEntryLine2() / 100 ) ); return 0; } @@ -937,17 +937,17 @@ IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox *, pLb ) // ============================================================================ // number of preset images to show -const USHORT SVX_BORDER_PRESET_COUNT = 5; +const sal_uInt16 SVX_BORDER_PRESET_COUNT = 5; // number of shadow images to show -const USHORT SVX_BORDER_SHADOW_COUNT = 5; +const sal_uInt16 SVX_BORDER_SHADOW_COUNT = 5; // ---------------------------------------------------------------------------- -USHORT SvxBorderTabPage::GetPresetImageId( USHORT nValueSetIdx ) const +sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nValueSetIdx ) const { // table with all sets of predefined border styles - static const USHORT ppnImgIds[][ SVX_BORDER_PRESET_COUNT ] = + static const sal_uInt16 ppnImgIds[][ SVX_BORDER_PRESET_COUNT ] = { // simple cell without diagonal frame borders { IID_PRE_CELL_NONE, IID_PRE_CELL_ALL, IID_PRE_CELL_LR, IID_PRE_CELL_TB, IID_PRE_CELL_L }, @@ -977,10 +977,10 @@ USHORT SvxBorderTabPage::GetPresetImageId( USHORT nValueSetIdx ) const return ppnImgIds[ nLine ][ nValueSetIdx - 1 ]; } -USHORT SvxBorderTabPage::GetPresetStringId( USHORT nValueSetIdx ) const +sal_uInt16 SvxBorderTabPage::GetPresetStringId( sal_uInt16 nValueSetIdx ) const { // string resource IDs for each image (in order of the IID_PRE_* image IDs) - static const USHORT pnStrIds[] = + static const sal_uInt16 pnStrIds[] = { RID_SVXSTR_TABLE_PRESET_NONE, RID_SVXSTR_PARA_PRESET_ALL, @@ -1025,7 +1025,7 @@ void SvxBorderTabPage::FillPresetVS() aWndPresets.SetSizePixel( aWndPresets.CalcWindowSizePixel( aImgSize ) ); // insert images and help texts - for( USHORT nVSIdx = 1; nVSIdx <= SVX_BORDER_PRESET_COUNT; ++nVSIdx ) + for( sal_uInt16 nVSIdx = 1; nVSIdx <= SVX_BORDER_PRESET_COUNT; ++nVSIdx ) { aWndPresets.InsertItem( nVSIdx ); aWndPresets.SetItemImage( nVSIdx, rImgList.GetImage( GetPresetImageId( nVSIdx ) ) ); @@ -1052,14 +1052,14 @@ void SvxBorderTabPage::FillShadowVS() aWndShadows.SetSizePixel( aWndShadows.CalcWindowSizePixel( aImgSize ) ); // image resource IDs - static const USHORT pnImgIds[ SVX_BORDER_SHADOW_COUNT ] = + static const sal_uInt16 pnImgIds[ SVX_BORDER_SHADOW_COUNT ] = { IID_SHADOWNONE, IID_SHADOW_BOT_RIGHT, IID_SHADOW_TOP_RIGHT, IID_SHADOW_BOT_LEFT, IID_SHADOW_TOP_LEFT }; // string resource IDs for each image - static const USHORT pnStrIds[ SVX_BORDER_SHADOW_COUNT ] = + static const sal_uInt16 pnStrIds[ SVX_BORDER_SHADOW_COUNT ] = { RID_SVXSTR_SHADOW_STYLE_NONE, RID_SVXSTR_SHADOW_STYLE_BOTTOMRIGHT, RID_SVXSTR_SHADOW_STYLE_TOPRIGHT, RID_SVXSTR_SHADOW_STYLE_BOTTOMLEFT, RID_SVXSTR_SHADOW_STYLE_TOPLEFT }; // insert images and help texts - for( USHORT nVSIdx = 1; nVSIdx <= SVX_BORDER_SHADOW_COUNT; ++nVSIdx ) + for( sal_uInt16 nVSIdx = 1; nVSIdx <= SVX_BORDER_SHADOW_COUNT; ++nVSIdx ) { aWndShadows.InsertItem( nVSIdx ); aWndShadows.SetItemImage( nVSIdx, rImgList.GetImage( pnImgIds[ nVSIdx - 1 ] ) ); @@ -1117,9 +1117,9 @@ IMPL_LINK( SvxBorderTabPage, LinesChanged_Impl, void*, EMPTYARG ) { if(!mbUseMarginItem && aLeftMF.IsVisible()) { - BOOL bLineSet = aFrameSel.IsAnyBorderVisible(); - BOOL bMinAllowed = 0 != (nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_TABLE)); - BOOL bSpaceModified = aLeftMF .IsModified()|| + sal_Bool bLineSet = aFrameSel.IsAnyBorderVisible(); + sal_Bool bMinAllowed = 0 != (nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_TABLE)); + sal_Bool bSpaceModified = aLeftMF .IsModified()|| aRightMF .IsModified()|| aTopMF .IsModified()|| aBottomMF.IsModified(); @@ -1160,7 +1160,7 @@ IMPL_LINK( SvxBorderTabPage, LinesChanged_Impl, void*, EMPTYARG ) } } //fuer Tabellen ist alles erlaubt - USHORT nValid = VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT; + sal_uInt16 nValid = VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT; //fuer Rahmen und Absatz wird das Edit disabled, wenn keine Border gesetzt ist if(nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_PARA)) diff --git a/cui/source/tabpages/borderconn.cxx b/cui/source/tabpages/borderconn.cxx index 0e9039b0d5b1..b46f24d5cbfd 100644 --- a/cui/source/tabpages/borderconn.cxx +++ b/cui/source/tabpages/borderconn.cxx @@ -51,7 +51,7 @@ of the tab page. class LineItemWrapper : public sfx::SingleItemWrapper< SvxLineItem, const SvxBorderLine* > { public: - inline explicit LineItemWrapper( USHORT nSlot ) : SingleItemWrapperType( nSlot ) {} + inline explicit LineItemWrapper( sal_uInt16 nSlot ) : SingleItemWrapperType( nSlot ) {} virtual const SvxBorderLine* GetItemValue( const SvxLineItem& rItem ) const { return rItem.GetLine(); } @@ -277,7 +277,7 @@ ShadowConnection::ShadowConnection( const SfxItemSet& rItemSet, // ============================================================================ // ============================================================================ -sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot, +sfx::ItemConnectionBase* CreateFrameLineConnection( sal_uInt16 nSlot, FrameSelector& rFrameSel, FrameBorderType eBorder, sfx::ItemConnFlags nFlags ) { return new FrameLineConnection( nSlot, new FrameSelectorWrapper( rFrameSel, eBorder ), nFlags ); diff --git a/cui/source/tabpages/borderconn.hxx b/cui/source/tabpages/borderconn.hxx index 873a56e4fd3b..7ea7289d8ee4 100644 --- a/cui/source/tabpages/borderconn.hxx +++ b/cui/source/tabpages/borderconn.hxx @@ -44,7 +44,7 @@ class FrameSelector; /** Creates an item connection object that connects an SvxLineItem with an svx::FrameSelector control. */ -sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot, +sfx::ItemConnectionBase* CreateFrameLineConnection( sal_uInt16 nSlot, FrameSelector& rFrameSel, FrameBorderType eBorder, sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT ); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 560074c4e80f..a3dc52bd43ad 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -104,7 +104,7 @@ using namespace ::com::sun::star; // static ---------------------------------------------------------------- -static USHORT pNameRanges[] = +static sal_uInt16 pNameRanges[] = { SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_WEIGHT, @@ -121,7 +121,7 @@ static USHORT pNameRanges[] = 0 }; -static USHORT pEffectsRanges[] = +static sal_uInt16 pEffectsRanges[] = { SID_ATTR_CHAR_SHADOWED, SID_ATTR_CHAR_UNDERLINE, @@ -142,7 +142,7 @@ static USHORT pEffectsRanges[] = 0 }; -static USHORT pPositionRanges[] = +static sal_uInt16 pPositionRanges[] = { SID_ATTR_CHAR_KERNING, SID_ATTR_CHAR_KERNING, @@ -157,7 +157,7 @@ static USHORT pPositionRanges[] = 0 }; -static USHORT pTwoLinesRanges[] = +static sal_uInt16 pTwoLinesRanges[] = { SID_ATTR_CHAR_TWO_LINES, SID_ATTR_CHAR_TWO_LINES, @@ -166,7 +166,7 @@ static USHORT pTwoLinesRanges[] = // C-Funktion ------------------------------------------------------------ -inline BOOL StateToAttr( TriState aState ) +inline sal_Bool StateToAttr( TriState aState ) { return ( STATE_CHECK == aState ); } @@ -194,11 +194,11 @@ inline SvxFont& SvxCharBasePage::GetPreviewCTLFont() // ----------------------------------------------------------------------- SvxCharBasePage::SvxCharBasePage( Window* pParent, const ResId& rResId, const SfxItemSet& rItemset, - USHORT nResIdPrewievWin, USHORT nResIdFontTypeFT ): + sal_uInt16 nResIdPrewievWin, sal_uInt16 nResIdFontTypeFT ): SfxTabPage( pParent, rResId, rItemset ), m_aPreviewWin( this, ResId( nResIdPrewievWin, *rResId.GetResMgr() ) ), m_aFontTypeFT( this, ResId( nResIdFontTypeFT, *rResId.GetResMgr() ) ), - m_bPreviewBackgroundToCharacter( FALSE ) + m_bPreviewBackgroundToCharacter( sal_False ) { } @@ -216,7 +216,7 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) SvxFont& rFont = GetPreviewFont(); SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - USHORT nWhich; + sal_uInt16 nWhich; nWhich = GetWhich( SID_CHAR_DLG_PREVIEW_STRING ); if( ISITEMSET ) @@ -325,7 +325,7 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) if( ISITEMSET ) { const SvxContourItem& rItem = ( SvxContourItem& ) rSet.Get( nWhich ); - BOOL bOutline = rItem.GetValue(); + sal_Bool bOutline = rItem.GetValue(); rFont.SetOutline( bOutline ); rCJKFont.SetOutline( bOutline ); rCTLFont.SetOutline( bOutline ); @@ -336,14 +336,14 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) if( ISITEMSET ) { const SvxShadowedItem& rItem = ( SvxShadowedItem& ) rSet.Get( nWhich ); - BOOL bShadow = rItem.GetValue(); + sal_Bool bShadow = rItem.GetValue(); rFont.SetShadow( bShadow ); rCJKFont.SetShadow( bShadow ); rCTLFont.SetShadow( bShadow ); } // Background - BOOL bTransparent; + sal_Bool bTransparent; nWhich = GetWhich( m_bPreviewBackgroundToCharacter ? SID_ATTR_BRUSH : SID_ATTR_BRUSH_CHAR ); if( ISITEMSET ) { @@ -355,7 +355,7 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) rCTLFont.SetFillColor( rColor ); } else - bTransparent = TRUE; + bTransparent = sal_True; rFont.SetTransparent( bTransparent ); rCJKFont.SetTransparent( bTransparent ); @@ -416,9 +416,9 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) // Escapement nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); - const BYTE nProp = 100; + const sal_uInt8 nProp = 100; short nEsc; - BYTE nEscProp; + sal_uInt8 nEscProp; if( ISITEMSET ) { const SvxEscapementItem& rItem = ( SvxEscapementItem& ) rSet.Get( nWhich ); @@ -446,9 +446,9 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFontSize( const SfxItemSet& rSet, USHORT nSlot, SvxFont& rFont ) +void SvxCharBasePage::SetPrevFontSize( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont ) { - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); long nH; if( rSet.GetItemState( nWhich ) >= SFX_ITEM_SET ) { @@ -464,9 +464,9 @@ void SvxCharBasePage::SetPrevFontSize( const SfxItemSet& rSet, USHORT nSlot, Svx // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFont( const SfxItemSet& rSet, USHORT nSlot, SvxFont& rFont ) +void SvxCharBasePage::SetPrevFont( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont ) { - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); if( ISITEMSET ) { const SvxFontItem& rFontItem = ( SvxFontItem& ) rSet.Get( nWhich ); @@ -480,9 +480,9 @@ void SvxCharBasePage::SetPrevFont( const SfxItemSet& rSet, USHORT nSlot, SvxFont // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFontStyle( const SfxItemSet& rSet, USHORT nPosture, USHORT nWeight, SvxFont& rFont ) +void SvxCharBasePage::SetPrevFontStyle( const SfxItemSet& rSet, sal_uInt16 nPosture, sal_uInt16 nWeight, SvxFont& rFont ) { - USHORT nWhich = GetWhich( nPosture ); + sal_uInt16 nWhich = GetWhich( nPosture ); if( ISITEMSET ) { const SvxPostureItem& rItem = ( SvxPostureItem& ) rSet.Get( nWhich ); @@ -501,7 +501,7 @@ void SvxCharBasePage::SetPrevFontStyle( const SfxItemSet& rSet, USHORT nPosture, void SvxCharBasePage::SetPrevFontWidthScale( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); if( ISITEMSET ) { const SvxCharScaleWidthItem& rItem = ( SvxCharScaleWidthItem& ) rSet.Get( nWhich ); @@ -514,7 +514,7 @@ void SvxCharBasePage::SetPrevFontWidthScale( const SfxItemSet& rSet ) namespace { // ----------------------------------------------------------------------- - void setPrevFontEscapement(SvxFont& _rFont,BYTE nProp, BYTE nEscProp, short nEsc ) + void setPrevFontEscapement(SvxFont& _rFont,sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) { _rFont.SetPropr( nProp ); _rFont.SetProprRel( nEscProp ); @@ -525,7 +525,7 @@ namespace } // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFontEscapement( BYTE nProp, BYTE nEscProp, short nEsc ) +void SvxCharBasePage::SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) { setPrevFontEscapement(GetPreviewFont(),nProp,nEscProp,nEsc); setPrevFontEscapement(GetPreviewCJKFont(),nProp,nEscProp,nEsc); @@ -541,16 +541,16 @@ struct SvxCharNamePage_Impl String m_aNoStyleText; String m_aTransparentText; const FontList* m_pFontList; - USHORT m_nExtraEntryPos; - BOOL m_bMustDelete; - BOOL m_bInSearchMode; + sal_uInt16 m_nExtraEntryPos; + sal_Bool m_bMustDelete; + sal_Bool m_bInSearchMode; SvxCharNamePage_Impl() : m_pFontList ( NULL ), m_nExtraEntryPos( LISTBOX_ENTRY_NOTFOUND ), - m_bMustDelete ( FALSE ), - m_bInSearchMode ( FALSE ) + m_bMustDelete ( sal_False ), + m_bInSearchMode ( sal_False ) { m_aUpdateTimer.SetTimeout( 350 ); @@ -661,9 +661,9 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet ) : FreeResource(); - m_pWestFontLanguageLB->SetLanguageList( LANG_LIST_WESTERN, TRUE, FALSE, TRUE ); - m_pEastFontLanguageLB->SetLanguageList( LANG_LIST_CJK, TRUE, FALSE, TRUE ); - m_pCTLFontLanguageLB->SetLanguageList( LANG_LIST_CTL, TRUE, FALSE, TRUE ); + m_pWestFontLanguageLB->SetLanguageList( LANG_LIST_WESTERN, sal_True, sal_False, sal_True ); + m_pEastFontLanguageLB->SetLanguageList( LANG_LIST_CJK, sal_True, sal_False, sal_True ); + m_pCTLFontLanguageLB->SetLanguageList( LANG_LIST_CTL, sal_True, sal_False, sal_True ); Initialize(); } @@ -720,7 +720,7 @@ void SvxCharNamePage::Initialize() SfxObjectShell* pDocSh = SfxObjectShell::Current(); //DBG_ASSERT( pDocSh, "DocShell not found!" ); XColorTable* pColorTable = NULL; - FASTBOOL bKillTable = FALSE; + FASTBOOL bKillTable = sal_False; const SfxPoolItem* pItem = NULL; if ( pDocSh ) @@ -733,10 +733,10 @@ void SvxCharNamePage::Initialize() if ( !pColorTable ) { pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() ); - bKillTable = TRUE; + bKillTable = sal_True; } - m_pColorLB->SetUpdateMode( FALSE ); + m_pColorLB->SetUpdateMode( sal_False ); { SfxPoolItem* pDummy; @@ -752,7 +752,7 @@ void SvxCharNamePage::Initialize() m_pColorLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_pColorLB->SetUpdateMode( TRUE ); + m_pColorLB->SetUpdateMode( sal_True ); if ( bKillTable ) delete pColorTable; @@ -795,14 +795,14 @@ const FontList* SvxCharNamePage::GetFontList() const DBG_ASSERT(NULL != ( (SvxFontListItem*)pItem )->GetFontList(), "Where is the font list?"); m_pImpl->m_pFontList = static_cast<const SvxFontListItem*>(pItem )->GetFontList()->Clone(); - m_pImpl->m_bMustDelete = TRUE; + m_pImpl->m_bMustDelete = sal_True; } } if(!m_pImpl->m_pFontList) { m_pImpl->m_pFontList = new FontList( Application::GetDefaultDevice() ); - m_pImpl->m_bMustDelete = TRUE; + m_pImpl->m_bMustDelete = sal_True; } } @@ -818,14 +818,14 @@ namespace const FontStyleBox* _pFontStyleLB, const FontSizeBox* _pFontSizeLB, const FontList* _pFontList, - USHORT _nFontWhich, - USHORT _nFontHeightWhich) + sal_uInt16 _nFontWhich, + sal_uInt16 _nFontHeightWhich) { Size aSize = _rFont.GetSize(); aSize.Width() = 0; FontInfo aFontInfo; String sFontName(_pFontNameLB->GetText()); - BOOL bFontAvailable = _pFontList->IsAvailable( sFontName ); + sal_Bool bFontAvailable = _pFontList->IsAvailable( sFontName ); if(bFontAvailable || _pFontNameLB->GetSavedValue() != sFontName) aFontInfo = _pFontList->Get( sFontName, _pFontStyleLB->GetText() ); else @@ -986,7 +986,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp FontSizeBox* pSizeBox = NULL; FixedText* pLangFT = NULL; SvxLanguageBox* pLangBox = NULL; - USHORT nWhich = 0; + sal_uInt16 nWhich = 0; switch ( eLangGrp ) { @@ -1047,8 +1047,8 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp FillStyleBox_Impl( pNameBox ); - FASTBOOL bStyle = FALSE; - FASTBOOL bStyleAvailable = TRUE; + FASTBOOL bStyle = sal_False; + FASTBOOL bStyleAvailable = sal_True; FontItalic eItalic = ITALIC_NONE; FontWeight eWeight = WEIGHT_NORMAL; switch ( eLangGrp ) @@ -1063,7 +1063,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp { const SvxPostureItem& rItem = (SvxPostureItem&)rSet.Get( nWhich ); eItalic = (FontItalic)rItem.GetValue(); - bStyle = TRUE; + bStyle = sal_True; } bStyleAvailable = bStyleAvailable && (eState >= SFX_ITEM_DONTCARE); @@ -1081,7 +1081,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp eWeight = (FontWeight)rItem.GetValue(); } else - bStyle = FALSE; + bStyle = sal_False; bStyleAvailable = bStyleAvailable && (eState >= SFX_ITEM_DONTCARE); // Aktuell eingestellter Font @@ -1122,7 +1122,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp if( rItem.GetProp() != 100 || SFX_MAPUNIT_RELATIVE != rItem.GetPropUnit() ) { - BOOL bPtRel = SFX_MAPUNIT_POINT == rItem.GetPropUnit(); + sal_Bool bPtRel = SFX_MAPUNIT_POINT == rItem.GetPropUnit(); pSizeBox->SetPtRelative( bPtRel ); pSizeBox->SetValue( bPtRel ? ((short)rItem.GetProp()) * 10 : rItem.GetProp() ); } @@ -1195,16 +1195,16 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp // ----------------------------------------------------------------------- -BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ) +sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; FontNameBox* pNameBox = NULL; FontStyleBox* pStyleBox = NULL; FontSizeBox* pSizeBox = NULL; SvxLanguageBox* pLangBox = NULL; - USHORT nWhich = 0; - USHORT nSlot = 0; + sal_uInt16 nWhich = 0; + sal_uInt16 nSlot = 0; switch ( eLangGrp ) { @@ -1240,11 +1240,11 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; - FASTBOOL bChanged = TRUE; + FASTBOOL bChanged = sal_True; const String& rFontName = pNameBox->GetText(); const FontList* pFontList = GetFontList(); String aStyleBoxText =pStyleBox->GetText(); - USHORT nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText ); + sal_uInt16 nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText ); if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) aStyleBoxText.Erase(); FontInfo aInfo( pFontList->Get( rFontName, aStyleBoxText ) ); @@ -1257,27 +1257,27 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp const SvxFontItem& rItem = *( (const SvxFontItem*)pOld ); if ( rItem.GetFamilyName() == aFontItem.GetFamilyName() ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged ) bChanged = !pNameBox->GetSavedValue().Len(); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && ( (SvxFontItem*)pItem )->GetFamilyName() != aFontItem.GetFamilyName() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && rFontName.Len() ) { rSet.Put( aFontItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rSet.ClearItem( nWhich ); - bChanged = TRUE; + bChanged = sal_True; switch ( eLangGrp ) { case Western : nSlot = SID_ATTR_CHAR_WEIGHT; break; @@ -1296,7 +1296,7 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp const SvxWeightItem& rItem = *( (const SvxWeightItem*)pOld ); if ( rItem.GetValue() == aWeightItem.GetValue() ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged ) @@ -1305,13 +1305,13 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( m_pImpl->m_bInSearchMode && bChanged && aInfo.GetWeight() == WEIGHT_NORMAL && aInfo.GetItalic() != ITALIC_NONE ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && ( (SvxWeightItem*)pItem )->GetValue() != aWeightItem.GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) bChanged = ( nEntryPos == m_pImpl->m_nExtraEntryPos ); @@ -1321,12 +1321,12 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( bChanged && aText.Len() ) { rSet.Put( aWeightItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; switch ( eLangGrp ) { case Western : nSlot = SID_ATTR_CHAR_POSTURE; break; @@ -1345,7 +1345,7 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp const SvxPostureItem& rItem = *( (const SvxPostureItem*)pOld ); if ( rItem.GetValue() == aPostureItem.GetValue() ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged ) @@ -1354,13 +1354,13 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( m_pImpl->m_bInSearchMode && bChanged && aInfo.GetItalic() == ITALIC_NONE && aInfo.GetWeight() != WEIGHT_NORMAL ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && ( (SvxPostureItem*)pItem )->GetValue() != aPostureItem.GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) bChanged = ( nEntryPos == ( m_pImpl->m_nExtraEntryPos + 1 ) ); @@ -1368,9 +1368,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( bChanged && aText.Len() ) { rSet.Put( aPostureItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // FontSize @@ -1379,12 +1379,12 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( !pSizeBox->GetText().Len() ) // GetValue() gibt dann Min-Wert zurueck nSize = 0; long nSavedSize = pSizeBox->GetSavedValue().ToInt32(); - FASTBOOL bRel = TRUE; + FASTBOOL bRel = sal_True; if ( !pSizeBox->IsRelative() ) { nSavedSize *= 10; - bRel = FALSE; + bRel = sal_False; } switch ( eLangGrp ) @@ -1398,12 +1398,12 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bChanged = ( nSize != nSavedSize ); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET ) + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET ) { float fSize = (float)nSize / 10; long nVal = CalcToUnit( fSize, rSet.GetPool()->GetMetric( nWhich ) ); - if ( ( (SvxFontHeightItem*)pItem )->GetHeight() != (UINT32)nVal ) - bChanged = TRUE; + if ( ( (SvxFontHeightItem*)pItem )->GetHeight() != (sal_uInt32)nVal ) + bChanged = sal_True; } if ( bChanged || !pOldHeight || @@ -1418,9 +1418,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp SvxFontHeightItem aHeight( 240, 100, nWhich ); if ( pSizeBox->IsPtRelative() ) - aHeight.SetHeight( rOldItem.GetHeight(), (USHORT)( nSize / 10 ), SFX_MAPUNIT_POINT, eUnit ); + aHeight.SetHeight( rOldItem.GetHeight(), (sal_uInt16)( nSize / 10 ), SFX_MAPUNIT_POINT, eUnit ); else - aHeight.SetHeight( rOldItem.GetHeight(), (USHORT)nSize, SFX_MAPUNIT_RELATIVE ); + aHeight.SetHeight( rOldItem.GetHeight(), (sal_uInt16)nSize, SFX_MAPUNIT_RELATIVE ); rSet.Put( aHeight ); } else @@ -1428,12 +1428,12 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp float fSize = (float)nSize / 10; rSet.Put( SvxFontHeightItem( CalcToUnit( fSize, eUnit ), 100, nWhich ) ); } - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; switch ( eLangGrp ) { case Western : nSlot = SID_ATTR_CHAR_LANGUAGE; break; @@ -1442,15 +1442,15 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp } nWhich = GetWhich( nSlot ); pOld = GetOldItem( rSet, nSlot ); - USHORT nLangPos = pLangBox->GetSelectEntryPos(); - LanguageType eLangType = (LanguageType)(ULONG)pLangBox->GetEntryData( nLangPos ); + sal_uInt16 nLangPos = pLangBox->GetSelectEntryPos(); + LanguageType eLangType = (LanguageType)(sal_uLong)pLangBox->GetEntryData( nLangPos ); if ( pOld ) { const SvxLanguageItem& rItem = *( (const SvxLanguageItem*)pOld ); if ( nLangPos == LISTBOX_ENTRY_NOTFOUND || eLangType == (LanguageType)rItem.GetValue() ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged ) @@ -1459,9 +1459,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( bChanged && nLangPos != LISTBOX_ENTRY_NOTFOUND ) { rSet.Put( SvxLanguageItem( eLangType, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -1471,7 +1471,7 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp void SvxCharNamePage::ResetColor_Impl( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); SfxItemState eState = rSet.GetItemState( nWhich ); switch ( eState ) @@ -1501,7 +1501,7 @@ void SvxCharNamePage::ResetColor_Impl( const SfxItemSet& rSet ) rCJKFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); rCTLFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); m_aPreviewWin.Invalidate(); - USHORT nSelPos = m_pColorLB->GetEntryPos( aColor ); + sal_uInt16 nSelPos = m_pColorLB->GetEntryPos( aColor ); if ( nSelPos == LISTBOX_ENTRY_NOTFOUND && aColor == Color( COL_TRANSPARENT ) ) nSelPos = m_pColorLB->GetEntryPos( m_pImpl->m_aTransparentText ); @@ -1589,7 +1589,7 @@ SfxTabPage* SvxCharNamePage::Create( Window* pParent, const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -USHORT* SvxCharNamePage::GetRanges() +sal_uInt16* SvxCharNamePage::GetRanges() { return pNameRanges; } @@ -1610,9 +1610,9 @@ void SvxCharNamePage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharNamePage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharNamePage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FillItemSet_Impl( rSet, Western ); + sal_Bool bModified = FillItemSet_Impl( rSet, Western ); bModified |= FillItemSet_Impl( rSet, Asian ); bModified |= FillItemSet_Impl( rSet, Ctl ); return bModified; @@ -1627,13 +1627,13 @@ void SvxCharNamePage::SetFontList( const SvxFontListItem& rItem ) delete m_pImpl->m_pFontList; } m_pImpl->m_pFontList = rItem.GetFontList()->Clone(); - m_pImpl->m_bMustDelete = TRUE; + m_pImpl->m_bMustDelete = sal_True; } // ----------------------------------------------------------------------- namespace { - void enableRelativeMode( SvxCharNamePage* _pPage, FontSizeBox* _pFontSizeLB, USHORT _nHeightWhich ) + void enableRelativeMode( SvxCharNamePage* _pPage, FontSizeBox* _pFontSizeLB, sal_uInt16 _nHeightWhich ) { _pFontSizeLB->EnableRelativeMode( 5, 995, 5 ); // min 5%, max 995%, step 5 @@ -1663,10 +1663,10 @@ void SvxCharNamePage::EnableRelativeMode() void SvxCharNamePage::EnableSearchMode() { - m_pImpl->m_bInSearchMode = TRUE; + m_pImpl->m_bInSearchMode = sal_True; } // ----------------------------------------------------------------------- -void SvxCharNamePage::DisableControls( USHORT nDisable ) +void SvxCharNamePage::DisableControls( sal_uInt16 nDisable ) { if ( DISABLE_LANGUAGE & nDisable ) { @@ -1707,7 +1707,7 @@ void SvxCharNamePage::PageCreated (SfxAllItemSet aSet) //add CHINA001 if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_RELATIVE_MODE ) == SVX_RELATIVE_MODE ) EnableRelativeMode(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) @@ -1777,7 +1777,7 @@ void SvxCharEffectsPage::Initialize() // HTML-Mode const SfxPoolItem* pItem; SfxObjectShell* pShell; - if ( SFX_ITEM_SET == GetItemSet().GetItemState( SID_HTML_MODE, FALSE, &pItem ) || + if ( SFX_ITEM_SET == GetItemSet().GetItemState( SID_HTML_MODE, sal_False, &pItem ) || ( NULL != ( pShell = SfxObjectShell::Current() ) && NULL != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) ) { @@ -1792,7 +1792,7 @@ void SvxCharEffectsPage::Initialize() SfxObjectShell* pDocSh = SfxObjectShell::Current(); DBG_ASSERT( pDocSh, "DocShell not found!" ); XColorTable* pColorTable = NULL; - FASTBOOL bKillTable = FALSE; + FASTBOOL bKillTable = sal_False; if ( pDocSh ) { @@ -1804,12 +1804,12 @@ void SvxCharEffectsPage::Initialize() if ( !pColorTable ) { pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() ); - bKillTable = TRUE; + bKillTable = sal_True; } - m_aUnderlineColorLB.SetUpdateMode( FALSE ); - m_aOverlineColorLB.SetUpdateMode( FALSE ); - m_aFontColorLB.SetUpdateMode( FALSE ); + m_aUnderlineColorLB.SetUpdateMode( sal_False ); + m_aOverlineColorLB.SetUpdateMode( sal_False ); + m_aFontColorLB.SetUpdateMode( sal_False ); { SfxPoolItem* pDummy; @@ -1830,9 +1830,9 @@ void SvxCharEffectsPage::Initialize() m_aFontColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_aUnderlineColorLB.SetUpdateMode( TRUE ); - m_aOverlineColorLB.SetUpdateMode( TRUE ); - m_aFontColorLB.SetUpdateMode( TRUE ); + m_aUnderlineColorLB.SetUpdateMode( sal_True ); + m_aOverlineColorLB.SetUpdateMode( sal_True ); + m_aFontColorLB.SetUpdateMode( sal_True ); m_aFontColorLB.SetSelectHdl( LINK( this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl ) ); if ( bKillTable ) @@ -1884,12 +1884,12 @@ void SvxCharEffectsPage::UpdatePreview_Impl() SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - USHORT nPos = m_aUnderlineLB.GetSelectEntryPos(); - FontUnderline eUnderline = (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData( nPos ); + sal_uInt16 nPos = m_aUnderlineLB.GetSelectEntryPos(); + FontUnderline eUnderline = (FontUnderline)(sal_uLong)m_aUnderlineLB.GetEntryData( nPos ); nPos = m_aOverlineLB.GetSelectEntryPos(); - FontUnderline eOverline = (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData( nPos ); + FontUnderline eOverline = (FontUnderline)(sal_uLong)m_aOverlineLB.GetEntryData( nPos ); nPos = m_aStrikeoutLB.GetSelectEntryPos(); - FontStrikeout eStrikeout = (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData( nPos ); + FontStrikeout eStrikeout = (FontStrikeout)(sal_uLong)m_aStrikeoutLB.GetEntryData( nPos ); rFont.SetUnderline( eUnderline ); rCJKFont.SetUnderline( eUnderline ); rCTLFont.SetUnderline( eUnderline ); @@ -1903,14 +1903,14 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCTLFont.SetStrikeout( eStrikeout ); nPos = m_aPositionLB.GetSelectEntryPos(); - BOOL bUnder = ( CHRDLG_POSITION_UNDER == (ULONG)m_aPositionLB.GetEntryData( nPos ) ); + sal_Bool bUnder = ( CHRDLG_POSITION_UNDER == (sal_uLong)m_aPositionLB.GetEntryData( nPos ) ); FontEmphasisMark eMark = (FontEmphasisMark)m_aEmphasisLB.GetSelectEntryPos(); eMark |= bUnder ? EMPHASISMARK_POS_BELOW : EMPHASISMARK_POS_ABOVE; rFont.SetEmphasisMark( eMark ); rCJKFont.SetEmphasisMark( eMark ); rCTLFont.SetEmphasisMark( eMark ); - USHORT nRelief = m_aReliefLB.GetSelectEntryPos(); + sal_uInt16 nRelief = m_aReliefLB.GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nRelief) { rFont.SetRelief( (FontRelief)nRelief ); @@ -1926,7 +1926,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCJKFont.SetShadow( rFont.IsShadow() ); rCTLFont.SetShadow( rFont.IsShadow() ); - USHORT nCapsPos = m_aEffects2LB.GetSelectEntryPos(); + sal_uInt16 nCapsPos = m_aEffects2LB.GetSelectEntryPos(); if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND ) { rFont.SetCaseMap( (SvxCaseMap)nCapsPos ); @@ -1935,7 +1935,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCTLFont.SetCaseMap( static_cast<SvxCaseMap>( nCapsPos == SVX_CASEMAP_KAPITAELCHEN ? SVX_CASEMAP_NOT_MAPPED : (SvxCaseMap)nCapsPos) ); } - BOOL bWordLine = m_aIndividualWordsBtn.IsChecked(); + sal_Bool bWordLine = m_aIndividualWordsBtn.IsChecked(); rFont.SetWordLineMode( bWordLine ); rCJKFont.SetWordLineMode( bWordLine ); rCTLFont.SetWordLineMode( bWordLine ); @@ -1949,7 +1949,7 @@ void SvxCharEffectsPage::SetCaseMap_Impl( SvxCaseMap eCaseMap ) { if ( SVX_CASEMAP_END > eCaseMap ) m_aEffects2LB.SelectEntryPos( - sal::static_int_cast< USHORT >( eCaseMap ) ); + sal::static_int_cast< sal_uInt16 >( eCaseMap ) ); else { m_aEffects2LB.SetNoSelection(); @@ -1963,7 +1963,7 @@ void SvxCharEffectsPage::SetCaseMap_Impl( SvxCaseMap eCaseMap ) void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); SfxItemState eState = rSet.GetItemState( nWhich ); switch ( eState ) @@ -1997,7 +1997,7 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) rCTLFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); m_aPreviewWin.Invalidate(); - USHORT nSelPos = m_aFontColorLB.GetEntryPos( aColor ); + sal_uInt16 nSelPos = m_aFontColorLB.GetEntryPos( aColor ); if ( nSelPos == LISTBOX_ENTRY_NOTFOUND && aColor == Color( COL_TRANSPARENT ) ) nSelPos = m_aFontColorLB.GetEntryPos( m_aTransparentColorName ); @@ -2019,12 +2019,12 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) +sal_Bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); const SvxColorItem* pOld = (const SvxColorItem*)GetOldItem( rSet, SID_ATTR_CHAR_COLOR ); const SvxColorItem* pItem = NULL; - BOOL bChanged = TRUE; + sal_Bool bChanged = sal_True; const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; const SfxItemSet& rOldSet = GetItemSet(); @@ -2035,24 +2035,24 @@ BOOL SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) aSelectedColor = m_aFontColorLB.GetSelectEntryColor(); if ( pOld && pOld->GetValue() == aSelectedColor ) - bChanged = FALSE; + bChanged = sal_False; if ( !bChanged ) bChanged = ( m_aFontColorLB.GetSavedValue() == LISTBOX_ENTRY_NOTFOUND ); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, (const SfxPoolItem**)&pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, (const SfxPoolItem**)&pItem ) == SFX_ITEM_SET && ( (SvxColorItem*)pItem )->GetValue() != aSelectedColor ) - bChanged = TRUE; + bChanged = sal_True; - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if ( bChanged && m_aFontColorLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) { rSet.Put( SvxColorItem( aSelectedColor, nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -2064,24 +2064,24 @@ IMPL_LINK( SvxCharEffectsPage, SelectHdl_Impl, ListBox*, pBox ) { if ( &m_aEmphasisLB == pBox ) { - USHORT nEPos = m_aEmphasisLB.GetSelectEntryPos(); - BOOL bEnable = ( nEPos > 0 && nEPos != LISTBOX_ENTRY_NOTFOUND ); + sal_uInt16 nEPos = m_aEmphasisLB.GetSelectEntryPos(); + sal_Bool bEnable = ( nEPos > 0 && nEPos != LISTBOX_ENTRY_NOTFOUND ); m_aPositionFT.Enable( bEnable ); m_aPositionLB.Enable( bEnable ); } else if( &m_aReliefLB == pBox) { - BOOL bEnable = ( pBox->GetSelectEntryPos() == 0 ); + sal_Bool bEnable = ( pBox->GetSelectEntryPos() == 0 ); m_aOutlineBtn.Enable( bEnable ); m_aShadowBtn.Enable( bEnable ); } else if ( &m_aPositionLB != pBox ) { - USHORT nUPos = m_aUnderlineLB.GetSelectEntryPos(), + sal_uInt16 nUPos = m_aUnderlineLB.GetSelectEntryPos(), nOPos = m_aOverlineLB.GetSelectEntryPos(), nSPos = m_aStrikeoutLB.GetSelectEntryPos(); - BOOL bUEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND ); - BOOL bOEnable = ( nOPos > 0 && nOPos != LISTBOX_ENTRY_NOTFOUND ); + sal_Bool bUEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND ); + sal_Bool bOEnable = ( nOPos > 0 && nOPos != LISTBOX_ENTRY_NOTFOUND ); m_aUnderlineColorFT.Enable( bUEnable ); m_aUnderlineColorLB.Enable( bUEnable ); m_aOverlineColorFT.Enable( bOEnable ); @@ -2159,7 +2159,7 @@ SfxTabPage* SvxCharEffectsPage::Create( Window* pParent, const SfxItemSet& rSet // ----------------------------------------------------------------------- -USHORT* SvxCharEffectsPage::GetRanges() +sal_uInt16* SvxCharEffectsPage::GetRanges() { return pEffectsRanges; } @@ -2172,10 +2172,10 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; // Underline - USHORT nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); rFont.SetUnderline( UNDERLINE_NONE ); rCJKFont.SetUnderline( UNDERLINE_NONE ); rCTLFont.SetUnderline( UNDERLINE_NONE ); @@ -2197,18 +2197,18 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) if ( eUnderline != UNDERLINE_NONE ) { - for ( USHORT i = 0; i < m_aUnderlineLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aUnderlineLB.GetEntryCount(); ++i ) { - if ( (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData(i) == eUnderline ) + if ( (FontUnderline)(sal_uLong)m_aUnderlineLB.GetEntryData(i) == eUnderline ) { m_aUnderlineLB.SelectEntryPos(i); - bEnable |= TRUE; + bEnable |= sal_True; break; } } Color aColor = rItem.GetColor(); - USHORT nPos = m_aUnderlineColorLB.GetEntryPos( aColor ); + sal_uInt16 nPos = m_aUnderlineColorLB.GetEntryPos( aColor ); if ( LISTBOX_ENTRY_NOTFOUND != nPos ) m_aUnderlineColorLB.SelectEntryPos( nPos ); @@ -2254,18 +2254,18 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) if ( eOverline != UNDERLINE_NONE ) { - for ( USHORT i = 0; i < m_aOverlineLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aOverlineLB.GetEntryCount(); ++i ) { - if ( (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData(i) == eOverline ) + if ( (FontUnderline)(sal_uLong)m_aOverlineLB.GetEntryData(i) == eOverline ) { m_aOverlineLB.SelectEntryPos(i); - bEnable |= TRUE; + bEnable |= sal_True; break; } } Color aColor = rItem.GetColor(); - USHORT nPos = m_aOverlineColorLB.GetEntryPos( aColor ); + sal_uInt16 nPos = m_aOverlineColorLB.GetEntryPos( aColor ); if ( LISTBOX_ENTRY_NOTFOUND != nPos ) m_aOverlineColorLB.SelectEntryPos( nPos ); @@ -2311,12 +2311,12 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) if ( eStrikeout != STRIKEOUT_NONE ) { - for ( USHORT i = 0; i < m_aStrikeoutLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aStrikeoutLB.GetEntryCount(); ++i ) { - if ( (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData(i) == eStrikeout ) + if ( (FontStrikeout)(sal_uLong)m_aStrikeoutLB.GetEntryData(i) == eStrikeout ) { m_aStrikeoutLB.SelectEntryPos(i); - bEnable |= TRUE; + bEnable |= sal_True; break; } } @@ -2367,15 +2367,15 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) rCJKFont.SetEmphasisMark( eMark ); rCTLFont.SetEmphasisMark( eMark ); - m_aEmphasisLB.SelectEntryPos( (USHORT)( eMark & EMPHASISMARK_STYLE ) ); + m_aEmphasisLB.SelectEntryPos( (sal_uInt16)( eMark & EMPHASISMARK_STYLE ) ); eMark &= ~EMPHASISMARK_STYLE; - ULONG nEntryData = ( eMark == EMPHASISMARK_POS_ABOVE ) + sal_uLong nEntryData = ( eMark == EMPHASISMARK_POS_ABOVE ) ? CHRDLG_POSITION_OVER : ( eMark == EMPHASISMARK_POS_BELOW ) ? CHRDLG_POSITION_UNDER : 0; - for ( USHORT i = 0; i < m_aPositionLB.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < m_aPositionLB.GetEntryCount(); i++ ) { - if ( nEntryData == (ULONG)m_aPositionLB.GetEntryData(i) ) + if ( nEntryData == (sal_uLong)m_aPositionLB.GetEntryData(i) ) { m_aPositionLB.SelectEntryPos(i); break; @@ -2497,7 +2497,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxContourItem& rItem = (SvxContourItem&)rSet.Get( nWhich ); m_aOutlineBtn.SetState( (TriState)rItem.GetValue() ); - m_aOutlineBtn.EnableTriState( FALSE ); + m_aOutlineBtn.EnableTriState( sal_False ); break; } } @@ -2526,7 +2526,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxShadowedItem& rItem = (SvxShadowedItem&)rSet.Get( nWhich ); m_aShadowBtn.SetState( (TriState)rItem.GetValue() ); - m_aShadowBtn.EnableTriState( FALSE ); + m_aShadowBtn.EnableTriState( sal_False ); break; } } @@ -2555,7 +2555,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxBlinkItem& rItem = (SvxBlinkItem&)rSet.Get( nWhich ); m_aBlinkingBtn.SetState( (TriState)rItem.GetValue() ); - m_aBlinkingBtn.EnableTriState( FALSE ); + m_aBlinkingBtn.EnableTriState( sal_False ); break; } } @@ -2583,7 +2583,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxCharHiddenItem& rItem = (SvxCharHiddenItem&)rSet.Get( nWhich ); m_aHiddenBtn.SetState( (TriState)rItem.GetValue() ); - m_aHiddenBtn.EnableTriState( FALSE ); + m_aHiddenBtn.EnableTriState( sal_False ); break; } } @@ -2614,18 +2614,18 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SfxPoolItem* pOld = 0; const SfxItemSet& rOldSet = GetItemSet(); - BOOL bModified = FALSE; - FASTBOOL bChanged = TRUE; + sal_Bool bModified = sal_False; + FASTBOOL bChanged = sal_True; // Underline - USHORT nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_UNDERLINE ); - USHORT nPos = m_aUnderlineLB.GetSelectEntryPos(); - FontUnderline eUnder = (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData( nPos ); + sal_uInt16 nPos = m_aUnderlineLB.GetSelectEntryPos(); + FontUnderline eUnder = (FontUnderline)(sal_uLong)m_aUnderlineLB.GetEntryData( nPos ); if ( pOld ) { @@ -2633,14 +2633,14 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the underline style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxUnderlineItem& rItem = *( (const SvxUnderlineItem*)pOld ); if ( (FontUnderline)rItem.GetValue() == eUnder && ( UNDERLINE_NONE == eUnder || rItem.GetColor() == m_aUnderlineColorLB.GetSelectEntryColor() ) && ! bAllowChg ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged ) @@ -2648,18 +2648,18 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) SvxUnderlineItem aNewItem( eUnder, nWhich ); aNewItem.SetColor( m_aUnderlineColorLB.GetSelectEntryColor() ); rSet.Put( aNewItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Overline nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_OVERLINE ); nPos = m_aOverlineLB.GetSelectEntryPos(); - FontUnderline eOver = (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData( nPos ); + FontUnderline eOver = (FontUnderline)(sal_uLong)m_aOverlineLB.GetEntryData( nPos ); if ( pOld ) { @@ -2667,14 +2667,14 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the underline style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxOverlineItem& rItem = *( (const SvxOverlineItem*)pOld ); if ( (FontUnderline)rItem.GetValue() == eOver && ( UNDERLINE_NONE == eOver || rItem.GetColor() == m_aOverlineColorLB.GetSelectEntryColor() ) && ! bAllowChg ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged ) @@ -2682,18 +2682,18 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) SvxOverlineItem aNewItem( eOver, nWhich ); aNewItem.SetColor( m_aOverlineColorLB.GetSelectEntryColor() ); rSet.Put( aNewItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Strikeout nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_STRIKEOUT ); nPos = m_aStrikeoutLB.GetSelectEntryPos(); - FontStrikeout eStrike = (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData( nPos ); + FontStrikeout eStrike = (FontStrikeout)(sal_uLong)m_aStrikeoutLB.GetEntryData( nPos ); if ( pOld ) { @@ -2701,24 +2701,24 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the strikeout style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxCrossedOutItem& rItem = *( (const SvxCrossedOutItem*)pOld ); if ( !m_aStrikeoutLB.IsEnabled() || ((FontStrikeout)rItem.GetValue() == eStrike && !bAllowChg) ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged ) { rSet.Put( SvxCrossedOutItem( eStrike, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Individual words nWhich = GetWhich( SID_ATTR_CHAR_WORDLINEMODE ); @@ -2728,32 +2728,32 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SvxWordLineModeItem& rItem = *( (const SvxWordLineModeItem*)pOld ); if ( rItem.GetValue() == m_aIndividualWordsBtn.IsChecked() ) - bChanged = FALSE; + bChanged = sal_False; } if ( rOldSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE && m_aIndividualWordsBtn.IsChecked() == m_aIndividualWordsBtn.GetSavedValue() ) - bChanged = FALSE; + bChanged = sal_False; if ( bChanged ) { rSet.Put( SvxWordLineModeItem( m_aIndividualWordsBtn.IsChecked(), nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Emphasis nWhich = GetWhich( SID_ATTR_CHAR_EMPHASISMARK ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_EMPHASISMARK ); - USHORT nMarkPos = m_aEmphasisLB.GetSelectEntryPos(); - USHORT nPosPos = m_aPositionLB.GetSelectEntryPos(); + sal_uInt16 nMarkPos = m_aEmphasisLB.GetSelectEntryPos(); + sal_uInt16 nPosPos = m_aPositionLB.GetSelectEntryPos(); FontEmphasisMark eMark = (FontEmphasisMark)nMarkPos; if ( m_aPositionLB.IsEnabled() ) { - eMark |= ( CHRDLG_POSITION_UNDER == (ULONG)m_aPositionLB.GetEntryData( nPosPos ) ) + eMark |= ( CHRDLG_POSITION_UNDER == (sal_uLong)m_aPositionLB.GetEntryData( nPosPos ) ) ? EMPHASISMARK_POS_BELOW : EMPHASISMARK_POS_ABOVE; } @@ -2763,34 +2763,34 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SvxEmphasisMarkItem& rItem = *( (const SvxEmphasisMarkItem*)pOld ); if ( rItem.GetEmphasisMark() == eMark ) - bChanged = FALSE; + bChanged = sal_False; } } if ( rOldSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE && m_aEmphasisLB.GetSavedValue() == nMarkPos && m_aPositionLB.GetSavedValue() == nPosPos ) - bChanged = FALSE; + bChanged = sal_False; if ( bChanged ) { rSet.Put( SvxEmphasisMarkItem( eMark, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Effects nWhich = GetWhich( SID_ATTR_CHAR_CASEMAP ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_CASEMAP ); SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED; - FASTBOOL bChecked = FALSE; - USHORT nCapsPos = m_aEffects2LB.GetSelectEntryPos(); + FASTBOOL bChecked = sal_False; + sal_uInt16 nCapsPos = m_aEffects2LB.GetSelectEntryPos(); if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND ) { eCaseMap = (SvxCaseMap)nCapsPos; - bChecked = TRUE; + bChecked = sal_True; } if ( pOld ) @@ -2799,23 +2799,23 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the effect style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxCaseMapItem& rItem = *( (const SvxCaseMapItem*)pOld ); if ( (SvxCaseMap)rItem.GetValue() == eCaseMap && !bAllowChg ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged && bChecked ) { rSet.Put( SvxCaseMapItem( eCaseMap, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; //Relief nWhich = GetWhich(SID_ATTR_CHAR_RELIEF); @@ -2837,22 +2837,22 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SvxContourItem& rItem = *( (const SvxContourItem*)pOld ); if ( rItem.GetValue() == StateToAttr( eState ) && m_aOutlineBtn.GetSavedValue() == eState ) - bChanged = FALSE; + bChanged = sal_False; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxContourItem*)pItem )->GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && eState != STATE_DONTKNOW ) { rSet.Put( SvxContourItem( StateToAttr( eState ), nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Shadow nWhich = GetWhich( SID_ATTR_CHAR_SHADOWED ); @@ -2863,22 +2863,22 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SvxShadowedItem& rItem = *( (const SvxShadowedItem*)pOld ); if ( rItem.GetValue() == StateToAttr( eState ) && m_aShadowBtn.GetSavedValue() == eState ) - bChanged = FALSE; + bChanged = sal_False; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxShadowedItem*)pItem )->GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && eState != STATE_DONTKNOW ) { rSet.Put( SvxShadowedItem( StateToAttr( eState ), nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Blinking nWhich = GetWhich( SID_ATTR_FLASH ); @@ -2889,44 +2889,44 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SvxBlinkItem& rItem = *( (const SvxBlinkItem*)pOld ); if ( rItem.GetValue() == StateToAttr( eState ) && m_aBlinkingBtn.GetSavedValue() == eState ) - bChanged = FALSE; + bChanged = sal_False; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxBlinkItem*)pItem )->GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && eState != STATE_DONTKNOW ) { rSet.Put( SvxBlinkItem( StateToAttr( eState ), nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // Hidden nWhich = GetWhich( SID_ATTR_CHAR_HIDDEN ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_HIDDEN ); eState = m_aHiddenBtn.GetState(); - bChanged = TRUE; + bChanged = sal_True; if ( pOld ) { const SvxCharHiddenItem& rItem = *( (const SvxCharHiddenItem*)pOld ); if ( rItem.GetValue() == StateToAttr( eState ) && m_aHiddenBtn.GetSavedValue() == eState ) - bChanged = FALSE; + bChanged = sal_False; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxCharHiddenItem*)pItem )->GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && eState != STATE_DONTKNOW ) { rSet.Put( SvxCharHiddenItem( StateToAttr( eState ), nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bModified |= FillItemSetColor_Impl( rSet ); @@ -2934,7 +2934,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) return bModified; } -void SvxCharEffectsPage::DisableControls( USHORT nDisable ) +void SvxCharEffectsPage::DisableControls( sal_uInt16 nDisable ) { if ( ( DISABLE_CASEMAP & nDisable ) == DISABLE_CASEMAP ) { @@ -2968,7 +2968,7 @@ void SvxCharEffectsPage::EnableFlash() // ----------------------------------------------------------------------- void SvxCharEffectsPage::SetPreviewBackgroundToCharacter() { - m_bPreviewBackgroundToCharacter = TRUE; + m_bPreviewBackgroundToCharacter = sal_True; } // ----------------------------------------------------------------------- @@ -2981,7 +2981,7 @@ void SvxCharEffectsPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_ENABLE_FLASH ) == SVX_ENABLE_FLASH ) EnableFlash(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) @@ -3023,8 +3023,8 @@ SvxCharPositionPage::SvxCharPositionPage( Window* pParent, const SfxItemSet& rIn m_nSubEsc ( (short)DFLT_ESC_SUB ), m_nScaleWidthItemSetVal ( 100 ), m_nScaleWidthInitialVal ( 100 ), - m_nSuperProp ( (BYTE)DFLT_ESC_PROP ), - m_nSubProp ( (BYTE)DFLT_ESC_PROP ) + m_nSuperProp ( (sal_uInt8)DFLT_ESC_PROP ), + m_nSubProp ( (sal_uInt8)DFLT_ESC_PROP ) { FreeResource(); Initialize(); @@ -3074,14 +3074,14 @@ void SvxCharPositionPage::Initialize() // ----------------------------------------------------------------------- -void SvxCharPositionPage::UpdatePreview_Impl( BYTE nProp, BYTE nEscProp, short nEsc ) +void SvxCharPositionPage::UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) { SetPrevFontEscapement( nProp, nEscProp, nEsc ); } // ----------------------------------------------------------------------- -void SvxCharPositionPage::SetEscapement_Impl( USHORT nEsc ) +void SvxCharPositionPage::SetEscapement_Impl( sal_uInt16 nEsc ) { SvxEscapementItem aEscItm( (SvxEscapement)nEsc, SID_ATTR_CHAR_ESCAPEMENT ); @@ -3131,7 +3131,7 @@ void SvxCharPositionPage::SetEscapement_Impl( USHORT nEsc ) IMPL_LINK( SvxCharPositionPage, PositionHdl_Impl, RadioButton*, pBtn ) { - USHORT nEsc = SVX_ESCAPEMENT_OFF; // also when pBtn == NULL + sal_uInt16 nEsc = SVX_ESCAPEMENT_OFF; // also when pBtn == NULL if ( &m_aHighPosBtn == pBtn ) nEsc = SVX_ESCAPEMENT_SUPERSCRIPT; @@ -3146,9 +3146,9 @@ IMPL_LINK( SvxCharPositionPage, PositionHdl_Impl, RadioButton*, pBtn ) IMPL_LINK( SvxCharPositionPage, RotationHdl_Impl, RadioButton*, pBtn ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if (&m_a90degRB == pBtn || &m_a270degRB == pBtn) - bEnable = TRUE; + bEnable = sal_True; else OSL_ENSURE( &m_a0degRB == pBtn, "unexpected button" ); m_aFitToLineCB.Enable( bEnable ); @@ -3159,7 +3159,7 @@ IMPL_LINK( SvxCharPositionPage, RotationHdl_Impl, RadioButton*, pBtn ) IMPL_LINK( SvxCharPositionPage, FontModifyHdl_Impl, MetricField*, EMPTYARG ) { - BYTE nEscProp = (BYTE)m_aFontSizeEdit.GetValue(); + sal_uInt8 nEscProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); short nEsc = (short)m_aHighLowEdit.GetValue(); nEsc *= m_aLowPosBtn.IsChecked() ? -1 : 1; UpdatePreview_Impl( 100, nEscProp, nEsc ); @@ -3188,7 +3188,7 @@ IMPL_LINK( SvxCharPositionPage, FitToLineHdl_Impl, CheckBox*, pBox ) { if ( &m_aFitToLineCB == pBox) { - UINT16 nVal = m_nScaleWidthInitialVal; + sal_uInt16 nVal = m_nScaleWidthInitialVal; if (m_aFitToLineCB.IsChecked()) nVal = m_nScaleWidthItemSetVal; m_aScaleWidthMF.SetValue( nVal ); @@ -3283,9 +3283,9 @@ IMPL_LINK( SvxCharPositionPage, LoseFocusHdl_Impl, MetricField*, pField ) else if ( &m_aFontSizeEdit == pField ) { if ( bLow ) - m_nSubProp = (BYTE)m_aFontSizeEdit.GetValue(); + m_nSubProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); else - m_nSuperProp = (BYTE)m_aFontSizeEdit.GetValue(); + m_nSuperProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); } return 0; } @@ -3294,7 +3294,7 @@ IMPL_LINK( SvxCharPositionPage, LoseFocusHdl_Impl, MetricField*, pField ) IMPL_LINK( SvxCharPositionPage, ScaleWidthModifyHdl_Impl, MetricField*, EMPTYARG ) { - m_aPreviewWin.SetFontWidthScale( USHORT( m_aScaleWidthMF.GetValue() ) ); + m_aPreviewWin.SetFontWidthScale( sal_uInt16( m_aScaleWidthMF.GetValue() ) ); return 0; } @@ -3338,7 +3338,7 @@ SfxTabPage* SvxCharPositionPage::Create( Window* pParent, const SfxItemSet& rSet // ----------------------------------------------------------------------- -USHORT* SvxCharPositionPage::GetRanges() +sal_uInt16* SvxCharPositionPage::GetRanges() { return pPositionRanges; } @@ -3352,13 +3352,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) { m_nSuperEsc = (short)sUser.GetToken( 0 ).ToInt32(); m_nSubEsc = (short)sUser.GetToken( 1 ).ToInt32(); - m_nSuperProp = (BYTE)sUser.GetToken( 2 ).ToInt32(); - m_nSubProp = (BYTE)sUser.GetToken( 3 ).ToInt32(); + m_nSuperProp = (sal_uInt8)sUser.GetToken( 2 ).ToInt32(); + m_nSubProp = (sal_uInt8)sUser.GetToken( 3 ).ToInt32(); } short nEsc = 0; - BYTE nEscProp = 100; - BYTE nProp = 100; + sal_uInt8 nEscProp = 100; + sal_uInt8 nProp = 100; m_aHighLowFT.Disable(); m_aHighLowEdit.Disable(); @@ -3368,7 +3368,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) SvxFont& rFont = GetPreviewFont(); SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - USHORT nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) { @@ -3389,7 +3389,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) if ( nEsc > 0 ) { nFac = 1; - m_aHighPosBtn.Check( TRUE ); + m_aHighPosBtn.Check( sal_True ); if ( nEsc == DFLT_ESC_AUTO_SUPER ) { nEsc = DFLT_ESC_SUPER; @@ -3399,7 +3399,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) else { nFac = -1; - m_aLowPosBtn.Check( TRUE ); + m_aLowPosBtn.Check( sal_True ); if ( nEsc == DFLT_ESC_AUTO_SUB ) { nEsc = DFLT_ESC_SUB; @@ -3421,8 +3421,8 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) } else { - m_aNormalPosBtn.Check( TRUE ); - m_aHighLowRB.Check( TRUE ); + m_aNormalPosBtn.Check( sal_True ); + m_aHighLowRB.Check( sal_True ); PositionHdl_Impl( NULL ); } //the height has to be set after the handler is called to keep the value also if the escapement is zero @@ -3430,9 +3430,9 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) } else { - m_aHighPosBtn.Check( FALSE ); - m_aNormalPosBtn.Check( FALSE ); - m_aLowPosBtn.Check( FALSE ); + m_aHighPosBtn.Check( sal_False ); + m_aNormalPosBtn.Check( sal_False ); + m_aLowPosBtn.Check( sal_False ); } // BspFont setzen @@ -3490,7 +3490,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) m_aPairKerningBtn.Check( rItem.GetValue() ); } else - m_aPairKerningBtn.Check( FALSE ); + m_aPairKerningBtn.Check( sal_False ); // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); @@ -3548,13 +3548,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) const SvxCharRotateItem& rItem = (SvxCharRotateItem&) rSet.Get( nWhich ); if (rItem.IsBottomToTop()) - m_a90degRB.Check( TRUE ); + m_a90degRB.Check( sal_True ); else if (rItem.IsTopToBotton()) - m_a270degRB.Check( TRUE ); + m_a270degRB.Check( sal_True ); else { DBG_ASSERT( 0 == rItem.GetValue(), "incorrect value" ); - m_a0degRB.Check( TRUE ); + m_a0degRB.Check( sal_True ); } m_aFitToLineCB.Check( rItem.IsFitToLine() ); } @@ -3562,14 +3562,14 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) { if( eState == SFX_ITEM_DONTCARE ) { - m_a0degRB.Check( FALSE ); - m_a90degRB.Check( FALSE ); - m_a270degRB.Check( FALSE ); + m_a0degRB.Check( sal_False ); + m_a90degRB.Check( sal_False ); + m_a270degRB.Check( sal_False ); } else - m_a0degRB.Check( TRUE ); + m_a0degRB.Check( sal_True ); - m_aFitToLineCB.Check( FALSE ); + m_aFitToLineCB.Check( sal_False ); } m_aFitToLineCB.SetClickHdl( aOldLink ); m_aFitToLineCB.Enable( !m_a0degRB.IsChecked() ); @@ -3595,16 +3595,16 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) { // Position (hoch, normal oder tief) const SfxItemSet& rOldSet = GetItemSet(); - BOOL bModified = FALSE, bChanged = TRUE; - USHORT nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); + sal_Bool bModified = sal_False, bChanged = sal_True; + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); const SfxPoolItem* pOld = GetOldItem( rSet, SID_ATTR_CHAR_ESCAPEMENT ); const FASTBOOL bHigh = m_aHighPosBtn.IsChecked(); short nEsc; - BYTE nEscProp; + sal_uInt8 nEscProp; if ( bHigh || m_aLowPosBtn.IsChecked() ) { @@ -3615,7 +3615,7 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) nEsc = (short)m_aHighLowEdit.Denormalize( m_aHighLowEdit.GetValue() ); nEsc *= bHigh ? 1 : -1; } - nEscProp = (BYTE)m_aFontSizeEdit.Denormalize( m_aFontSizeEdit.GetValue() ); + nEscProp = (sal_uInt8)m_aFontSizeEdit.Denormalize( m_aFontSizeEdit.GetValue() ); } else { @@ -3627,28 +3627,28 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) { const SvxEscapementItem& rItem = *( (const SvxEscapementItem*)pOld ); if ( rItem.GetEsc() == nEsc && rItem.GetProp() == nEscProp ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged && !m_aHighPosBtn.GetSavedValue() && !m_aNormalPosBtn.GetSavedValue() && !m_aLowPosBtn.GetSavedValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && ( m_aHighPosBtn.IsChecked() || m_aNormalPosBtn.IsChecked() || m_aLowPosBtn.IsChecked() ) ) { rSet.Put( SvxEscapementItem( nEsc, nEscProp, nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Kerning nWhich = GetWhich( SID_ATTR_CHAR_KERNING ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_KERNING ); - USHORT nPos = m_aKerningLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aKerningLB.GetSelectEntryPos(); short nKerning = 0; SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich ); @@ -3666,23 +3666,23 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) { const SvxKerningItem& rItem = *( (const SvxKerningItem*)pOld ); if ( rItem.GetValue() == nKerning ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged && ( m_aKerningLB.GetSavedValue() == LISTBOX_ENTRY_NOTFOUND || ( !m_aKerningEdit.GetSavedValue().Len() && m_aKerningEdit.IsEnabled() ) ) ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && nPos != LISTBOX_ENTRY_NOTFOUND ) { rSet.Put( SvxKerningItem( nKerning, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Pair-Kerning nWhich = GetWhich( SID_ATTR_CHAR_AUTOKERN ); @@ -3690,19 +3690,19 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) if ( m_aPairKerningBtn.IsChecked() != m_aPairKerningBtn.GetSavedValue() ) { rSet.Put( SvxAutoKernItem( m_aPairKerningBtn.IsChecked(), nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); if ( m_aScaleWidthMF.GetText() != m_aScaleWidthMF.GetSavedValue() ) { - rSet.Put( SvxCharScaleWidthItem( (USHORT)m_aScaleWidthMF.GetValue(), nWhich ) ); - bModified |= TRUE; + rSet.Put( SvxCharScaleWidthItem( (sal_uInt16)m_aScaleWidthMF.GetValue(), nWhich ) ); + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // Rotation @@ -3718,9 +3718,9 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) else if (m_a270degRB.IsChecked()) aItem.SetTopToBotton(); rSet.Put( aItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -3745,7 +3745,7 @@ void SvxCharPositionPage::FillUserData() // ----------------------------------------------------------------------- void SvxCharPositionPage::SetPreviewBackgroundToCharacter() { - m_bPreviewBackgroundToCharacter = TRUE; + m_bPreviewBackgroundToCharacter = sal_True; } // ----------------------------------------------------------------------- void SvxCharPositionPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 @@ -3753,7 +3753,7 @@ void SvxCharPositionPage::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_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) SetPreviewBackgroundToCharacter(); } @@ -3790,7 +3790,7 @@ void SvxCharTwoLinesPage::Initialize() aSize.Height() = m_aEndBracketLB.CalcSize( 1, 6 ).Height(); m_aEndBracketLB.SetSizePixel( aSize ); - m_aTwoLinesBtn.Check( FALSE ); + m_aTwoLinesBtn.Check( sal_False ); TwoLinesHdl_Impl( NULL ); m_aTwoLinesBtn.SetClickHdl( LINK( this, SvxCharTwoLinesPage, TwoLinesHdl_Impl ) ); @@ -3835,25 +3835,25 @@ void SvxCharTwoLinesPage::SelectCharacter( ListBox* pBox ) // ----------------------------------------------------------------------- -void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, BOOL bStart ) +void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, sal_Bool bStart ) { - USHORT nEntryPos = 0; + sal_uInt16 nEntryPos = 0; ListBox* pBox = bStart ? &m_aStartBracketLB : &m_aEndBracketLB; if ( 0 == cBracket ) pBox->SelectEntryPos(0); else { - FASTBOOL bFound = FALSE; - for ( USHORT i = 1; i < pBox->GetEntryCount(); ++i ) + FASTBOOL bFound = sal_False; + for ( sal_uInt16 i = 1; i < pBox->GetEntryCount(); ++i ) { - if ( (ULONG)pBox->GetEntryData(i) != CHRDLG_ENCLOSE_SPECIAL_CHAR ) + if ( (sal_uLong)pBox->GetEntryData(i) != CHRDLG_ENCLOSE_SPECIAL_CHAR ) { const sal_Unicode cChar = pBox->GetEntry(i).GetChar(0); if ( cChar == cBracket ) { pBox->SelectEntryPos(i); nEntryPos = i; - bFound = TRUE; + bFound = sal_True; break; } } @@ -3875,7 +3875,7 @@ void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, BOOL bStart ) IMPL_LINK( SvxCharTwoLinesPage, TwoLinesHdl_Impl, CheckBox*, EMPTYARG ) { - BOOL bChecked = m_aTwoLinesBtn.IsChecked(); + sal_Bool bChecked = m_aTwoLinesBtn.IsChecked(); m_aStartBracketFT.Enable( bChecked ); m_aStartBracketLB.Enable( bChecked ); m_aEndBracketFT.Enable( bChecked ); @@ -3889,8 +3889,8 @@ IMPL_LINK( SvxCharTwoLinesPage, TwoLinesHdl_Impl, CheckBox*, EMPTYARG ) IMPL_LINK( SvxCharTwoLinesPage, CharacterMapHdl_Impl, ListBox*, pBox ) { - USHORT nPos = pBox->GetSelectEntryPos(); - if ( CHRDLG_ENCLOSE_SPECIAL_CHAR == (ULONG)pBox->GetEntryData( nPos ) ) + sal_uInt16 nPos = pBox->GetSelectEntryPos(); + if ( CHRDLG_ENCLOSE_SPECIAL_CHAR == (sal_uLong)pBox->GetEntryData( nPos ) ) SelectCharacter( pBox ); else { @@ -3929,7 +3929,7 @@ SfxTabPage* SvxCharTwoLinesPage::Create( Window* pParent, const SfxItemSet& rSet // ----------------------------------------------------------------------- -USHORT* SvxCharTwoLinesPage::GetRanges() +sal_uInt16* SvxCharTwoLinesPage::GetRanges() { return pTwoLinesRanges; } @@ -3938,8 +3938,8 @@ USHORT* SvxCharTwoLinesPage::GetRanges() void SvxCharTwoLinesPage::Reset( const SfxItemSet& rSet ) { - m_aTwoLinesBtn.Check( FALSE ); - USHORT nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); + m_aTwoLinesBtn.Check( sal_False ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); SfxItemState eState = rSet.GetItemState( nWhich ); if ( eState >= SFX_ITEM_DONTCARE ) @@ -3949,8 +3949,8 @@ void SvxCharTwoLinesPage::Reset( const SfxItemSet& rSet ) if ( rItem.GetValue() ) { - SetBracket( rItem.GetStartBracket(), TRUE ); - SetBracket( rItem.GetEndBracket(), FALSE ); + SetBracket( rItem.GetStartBracket(), sal_True ); + SetBracket( rItem.GetEndBracket(), sal_False ); } } TwoLinesHdl_Impl( NULL ); @@ -3960,11 +3960,11 @@ void SvxCharTwoLinesPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet ) { const SfxItemSet& rOldSet = GetItemSet(); - BOOL bModified = FALSE, bChanged = TRUE; - USHORT nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); + sal_Bool bModified = sal_False, bChanged = sal_True; + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); const SfxPoolItem* pOld = GetOldItem( rSet, SID_ATTR_CHAR_TWO_LINES ); sal_Bool bOn = m_aTwoLinesBtn.IsChecked(); sal_Unicode cStart = ( bOn && m_aStartBracketLB.GetSelectEntryPos() > 0 ) @@ -3977,15 +3977,15 @@ BOOL SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet ) const SvxTwoLinesItem& rItem = *( (const SvxTwoLinesItem*)pOld ); if ( rItem.GetValue() == bOn && ( !bOn || ( rItem.GetStartBracket() == cStart && rItem.GetEndBracket() == cEnd ) ) ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged ) { rSet.Put( SvxTwoLinesItem( bOn, cStart, cEnd, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -4006,7 +4006,7 @@ void SvxCharTwoLinesPage::UpdatePreview_Impl() // ----------------------------------------------------------------------- void SvxCharTwoLinesPage::SetPreviewBackgroundToCharacter() { - m_bPreviewBackgroundToCharacter = TRUE; + m_bPreviewBackgroundToCharacter = sal_True; } // ----------------------------------------------------------------------- @@ -4015,7 +4015,7 @@ void SvxCharTwoLinesPage::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_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) SetPreviewBackgroundToCharacter(); } diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index 2cc564c3c553..69e370be9f8b 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -51,7 +51,7 @@ #include <cuires.hrc> -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_EDGE_FIRST, SDRATTR_EDGE_LAST, @@ -287,23 +287,23 @@ void __EXPORT SvxConnectionPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINEDELTAANZ ); if( pItem ) { - UINT16 nValue = ( ( const SdrEdgeLineDeltaAnzItem* )pItem )->GetValue(); + sal_uInt16 nValue = ( ( const SdrEdgeLineDeltaAnzItem* )pItem )->GetValue(); if( nValue <= 2 ) { - aFtLine3.Enable( FALSE ); - aMtrFldLine3.Enable( FALSE ); + aFtLine3.Enable( sal_False ); + aMtrFldLine3.Enable( sal_False ); aMtrFldLine3.SetEmptyFieldValue(); } if( nValue <= 1 ) { - aFtLine2.Enable( FALSE ); - aMtrFldLine2.Enable( FALSE ); + aFtLine2.Enable( sal_False ); + aMtrFldLine2.Enable( sal_False ); aMtrFldLine2.SetEmptyFieldValue(); } if( nValue == 0 ) { - aFtLine1.Enable( FALSE ); - aMtrFldLine1.Enable( FALSE ); + aFtLine1.Enable( sal_False ); + aMtrFldLine1.Enable( sal_False ); aMtrFldLine1.SetEmptyFieldValue(); } } @@ -315,7 +315,7 @@ void __EXPORT SvxConnectionPage::Reset( const SfxItemSet& rAttrs ) if( pItem ) { SdrEdgeKind nValue = ( ( const SdrEdgeKindItem* )pItem )->GetValue(); - aLbType.SelectEntryPos( sal::static_int_cast< USHORT >(nValue) ); + aLbType.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(nValue) ); } else aLbType.SetNoSelection(); @@ -328,68 +328,68 @@ void __EXPORT SvxConnectionPage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - INT32 nValue; + sal_Bool bModified = sal_False; + sal_Int32 nValue; if( aMtrFldHorz1.GetText() != aMtrFldHorz1.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHorz1, eUnit ); rAttrs.Put( SdrEdgeNode1HorzDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHorz2.GetText() != aMtrFldHorz2.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHorz2, eUnit ); rAttrs.Put( SdrEdgeNode2HorzDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldVert1.GetText() != aMtrFldVert1.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldVert1, eUnit ); rAttrs.Put( SdrEdgeNode1VertDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldVert2.GetText() != aMtrFldVert2.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldVert2, eUnit ); rAttrs.Put( SdrEdgeNode2VertDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldLine1.GetText() != aMtrFldLine1.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLine1, eUnit ); rAttrs.Put( SdrEdgeLine1DeltaItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldLine2.GetText() != aMtrFldLine2.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLine2, eUnit ); rAttrs.Put( SdrEdgeLine2DeltaItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldLine3.GetText() != aMtrFldLine3.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLine3, eUnit ); rAttrs.Put( SdrEdgeLine3DeltaItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } - USHORT nPos = aLbType.GetSelectEntryPos(); + sal_uInt16 nPos = aLbType.GetSelectEntryPos(); if( nPos != aLbType.GetSavedValue() ) { if( nPos != LISTBOX_ENTRY_NOTFOUND ) { rAttrs.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -428,7 +428,7 @@ SfxTabPage* SvxConnectionPage::Create( Window* pWindow, |* \************************************************************************/ -USHORT* SvxConnectionPage::GetRanges() +sal_uInt16* SvxConnectionPage::GetRanges() { return( pRanges ); } @@ -443,50 +443,50 @@ IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p ) { if( p == &aMtrFldHorz1 ) { - INT32 nValue = GetCoreValue( aMtrFldHorz1, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHorz1, eUnit ); aAttrSet.Put( SdrEdgeNode1HorzDistItem( nValue ) ); } if( p == &aMtrFldHorz2 ) { - INT32 nValue = GetCoreValue( aMtrFldHorz2, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHorz2, eUnit ); aAttrSet.Put( SdrEdgeNode2HorzDistItem( nValue ) ); } if( p == &aMtrFldVert1 ) { - INT32 nValue = GetCoreValue( aMtrFldVert1, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldVert1, eUnit ); aAttrSet.Put( SdrEdgeNode1VertDistItem( nValue ) ); } if( p == &aMtrFldVert2 ) { - INT32 nValue = GetCoreValue( aMtrFldVert2, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldVert2, eUnit ); aAttrSet.Put( SdrEdgeNode2VertDistItem( nValue ) ); } if( p == &aMtrFldLine1 ) { - INT32 nValue = GetCoreValue( aMtrFldLine1, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLine1, eUnit ); aAttrSet.Put( SdrEdgeLine1DeltaItem( nValue ) ); } if( p == &aMtrFldLine2 ) { - INT32 nValue = GetCoreValue( aMtrFldLine2, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLine2, eUnit ); aAttrSet.Put( SdrEdgeLine2DeltaItem( nValue ) ); } if( p == &aMtrFldLine3 ) { - INT32 nValue = GetCoreValue( aMtrFldLine3, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLine3, eUnit ); aAttrSet.Put( SdrEdgeLine3DeltaItem( nValue ) ); } if( p == &aLbType ) { - USHORT nPos = aLbType.GetSelectEntryPos(); + sal_uInt16 nPos = aLbType.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aAttrSet.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) ); @@ -498,7 +498,7 @@ IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p ) if( p == &aLbType ) { // Anzahl der Linienversaetze ermitteln - USHORT nCount = aCtlPreview.GetLineDeltaAnz(); + sal_uInt16 nCount = aCtlPreview.GetLineDeltaAnz(); aFtLine3.Enable( nCount > 2 ); aMtrFldLine3.Enable( nCount > 2 ); @@ -543,10 +543,10 @@ void SvxConnectionPage::FillTypeLB() if( pItem ) { const SdrEdgeKindItem* pEdgeKindItem = (const SdrEdgeKindItem*) pItem; - USHORT nCount = pEdgeKindItem->GetValueCount(); + sal_uInt16 nCount = pEdgeKindItem->GetValueCount(); String aStr; - for( USHORT i = 0; i < nCount; i++ ) + for( sal_uInt16 i = 0; i < nCount; i++ ) { aStr = pEdgeKindItem->GetValueTextByPos( i ); aLbType.InsertEntry( aStr ); diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx index 0474f8c3ef82..8d30c4431e55 100644 --- a/cui/source/tabpages/dstribut.cxx +++ b/cui/source/tabpages/dstribut.cxx @@ -37,7 +37,7 @@ #include <dialmgr.hxx> #include <tools/shl.hxx> -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST, @@ -148,7 +148,7 @@ SfxTabPage* SvxDistributePage::Create(Window* pWindow, const SfxItemSet& rAttrs, |* \************************************************************************/ -UINT16* SvxDistributePage::GetRanges() +sal_uInt16* SvxDistributePage::GetRanges() { return(pRanges); } @@ -171,34 +171,34 @@ void SvxDistributePage::PointChanged(Window* /*pWindow*/, RECT_POINT /*eRP*/) void __EXPORT SvxDistributePage::Reset(const SfxItemSet& ) { - maBtnHorNone.SetState(FALSE); - maBtnHorLeft.SetState(FALSE); - maBtnHorCenter.SetState(FALSE); - maBtnHorDistance.SetState(FALSE); - maBtnHorRight.SetState(FALSE); + maBtnHorNone.SetState(sal_False); + maBtnHorLeft.SetState(sal_False); + maBtnHorCenter.SetState(sal_False); + maBtnHorDistance.SetState(sal_False); + maBtnHorRight.SetState(sal_False); switch(meDistributeHor) { - case SvxDistributeHorizontalNone : maBtnHorNone.SetState(TRUE); break; - case SvxDistributeHorizontalLeft : maBtnHorLeft.SetState(TRUE); break; - case SvxDistributeHorizontalCenter : maBtnHorCenter.SetState(TRUE); break; - case SvxDistributeHorizontalDistance : maBtnHorDistance.SetState(TRUE); break; - case SvxDistributeHorizontalRight : maBtnHorRight.SetState(TRUE); break; + case SvxDistributeHorizontalNone : maBtnHorNone.SetState(sal_True); break; + case SvxDistributeHorizontalLeft : maBtnHorLeft.SetState(sal_True); break; + case SvxDistributeHorizontalCenter : maBtnHorCenter.SetState(sal_True); break; + case SvxDistributeHorizontalDistance : maBtnHorDistance.SetState(sal_True); break; + case SvxDistributeHorizontalRight : maBtnHorRight.SetState(sal_True); break; } - maBtnVerNone.SetState(FALSE); - maBtnVerTop.SetState(FALSE); - maBtnVerCenter.SetState(FALSE); - maBtnVerDistance.SetState(FALSE); - maBtnVerBottom.SetState(FALSE); + maBtnVerNone.SetState(sal_False); + maBtnVerTop.SetState(sal_False); + maBtnVerCenter.SetState(sal_False); + maBtnVerDistance.SetState(sal_False); + maBtnVerBottom.SetState(sal_False); switch(meDistributeVer) { - case SvxDistributeVerticalNone : maBtnVerNone.SetState(TRUE); break; - case SvxDistributeVerticalTop : maBtnVerTop.SetState(TRUE); break; - case SvxDistributeVerticalCenter : maBtnVerCenter.SetState(TRUE); break; - case SvxDistributeVerticalDistance : maBtnVerDistance.SetState(TRUE); break; - case SvxDistributeVerticalBottom : maBtnVerBottom.SetState(TRUE); break; + case SvxDistributeVerticalNone : maBtnVerNone.SetState(sal_True); break; + case SvxDistributeVerticalTop : maBtnVerTop.SetState(sal_True); break; + case SvxDistributeVerticalCenter : maBtnVerCenter.SetState(sal_True); break; + case SvxDistributeVerticalDistance : maBtnVerDistance.SetState(sal_True); break; + case SvxDistributeVerticalBottom : maBtnVerBottom.SetState(sal_True); break; } } @@ -208,7 +208,7 @@ void __EXPORT SvxDistributePage::Reset(const SfxItemSet& ) |* \************************************************************************/ -BOOL SvxDistributePage::FillItemSet( SfxItemSet& ) +sal_Bool SvxDistributePage::FillItemSet( SfxItemSet& ) { SvxDistributeHorizontal eDistributeHor(SvxDistributeHorizontalNone); SvxDistributeVertical eDistributeVer(SvxDistributeVerticalNone); @@ -235,10 +235,10 @@ BOOL SvxDistributePage::FillItemSet( SfxItemSet& ) { meDistributeHor = eDistributeHor; meDistributeVer = eDistributeVer; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 6fb538a76947..c06d564e45dd 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -82,8 +82,8 @@ SvxGrfCropPage::SvxGrfCropPage ( Window *pParent, const SfxItemSet &rSet ) aOrigSizePB( this, CUI_RES( PB_ORGSIZE )), aExampleWN( this, CUI_RES( WN_BSP )), pLastCropField(0), - bInitialized(FALSE), - bSetOrigSize(FALSE) + bInitialized(sal_False), + bSetOrigSize(sal_False) { FreeResource(); @@ -163,7 +163,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) const SfxItemPool& rPool = *rSet.GetPool(); if(SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( - SID_ATTR_GRAF_KEEP_ZOOM ), TRUE, &pItem )) + SID_ATTR_GRAF_KEEP_ZOOM ), sal_True, &pItem )) { if( ((const SfxBoolItem*)pItem)->GetValue() ) aZoomConstRB.Check(); @@ -172,8 +172,8 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) aZoomConstRB.SaveValue(); } - USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); - if( SFX_ITEM_SET == rSet.GetItemState( nW, TRUE, &pItem)) + sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); + if( SFX_ITEM_SET == rSet.GetItemState( nW, sal_True, &pItem)) { FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); @@ -198,7 +198,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) } nW = rPool.GetWhich( SID_ATTR_PAGE_SIZE ); - if ( SFX_ITEM_SET == rSet.GetItemState( nW, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == rSet.GetItemState( nW, sal_False, &pItem ) ) { // Orientation und Size aus dem PageItem FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); @@ -221,8 +221,8 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) MapMode( (MapUnit)rSet.GetPool()->GetMetric( nW ) ) ); } - BOOL bFound = FALSE; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) ) + sal_Bool bFound = sal_False; + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) ) { const Graphic* pGrf = ((SvxBrushItem*)pItem)->GetGraphic(); if( pGrf ) @@ -234,30 +234,30 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) aExampleWN.SetGraphic( *pGrf ); aExampleWN.SetFrameSize( aOrigSize ); - bFound = TRUE; + bFound = sal_True; if( ((SvxBrushItem*)pItem)->GetGraphicLink() ) aGraphicName = *((SvxBrushItem*)pItem)->GetGraphicLink(); } } GraphicHasChanged( bFound ); - bReset = TRUE; + bReset = sal_True; ActivatePage( rSet ); - bReset = FALSE; + bReset = sal_False; } /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ -BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) { const SfxItemPool& rPool = *rSet.GetPool(); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if( aWidthMF.GetSavedValue() != aWidthMF.GetText() || aHeightMF.GetSavedValue() != aHeightMF.GetText() ) { - USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_FRMSIZE ); + sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_FRMSIZE ); FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); SvxSizeItem aSz( nW ); @@ -267,7 +267,7 @@ BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) const SfxItemSet* pExSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; const SfxPoolItem* pItem = 0; if( pExSet && SFX_ITEM_SET == - pExSet->GetItemState( nW, FALSE, &pItem ) ) + pExSet->GetItemState( nW, sal_False, &pItem ) ) aSz = *(const SvxSizeItem*)pItem; else aSz = (const SvxSizeItem&)GetItemSet().Get( nW ); @@ -292,7 +292,7 @@ BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) if( aLeftMF.IsModified() || aRightMF.IsModified() || aTopMF.IsModified() || aBottomMF.IsModified() ) { - USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); + sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); SvxGrfCrop* pNew = (SvxGrfCrop*)rSet.Get( nW ).Clone(); @@ -310,7 +310,7 @@ BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) SID_ATTR_GRAF_KEEP_ZOOM), aZoomConstRB.IsChecked() ) ); } - bInitialized = FALSE; + bInitialized = sal_False; return bModified; } @@ -326,12 +326,12 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) DBG_ASSERT( pPool, "Wo ist der Pool" ); #endif - bSetOrigSize = FALSE; + bSetOrigSize = sal_False; // Size Size aSize; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_FRMSIZE, sal_False, &pItem ) ) aSize = ((const SvxSizeItem*)pItem)->GetSize(); nOldWidth = aSize.Width(); @@ -365,9 +365,9 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) aHeightMF.SetValue(nHeight, FUNIT_TWIP); } aHeightMF.SaveValue(); - bInitialized = TRUE; + bInitialized = sal_True; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) ) { const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem; if( rBrush.GetGraphicLink() && @@ -384,7 +384,7 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) CalcMinMaxBorder(); } else - GraphicHasChanged( FALSE ); + GraphicHasChanged( sal_False ); } CalcZoom(); @@ -398,7 +398,7 @@ int SvxGrfCropPage::DeactivatePage(SfxItemSet *_pSet) { if ( _pSet ) FillItemSet( *_pSet ); - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -453,7 +453,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, MetricField *, pField ) lcl_GetValue(aRightMF, eUnit) ); if(!nWidth) nWidth++; - USHORT nZoom = (USHORT)( aSize.Width() * 100L / nWidth); + sal_uInt16 nZoom = (sal_uInt16)( aSize.Width() * 100L / nWidth); aWidthZoomMF.SetValue(nZoom); } else @@ -463,7 +463,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, MetricField *, pField ) lcl_GetValue(aBottomMF, eUnit)); if(!nHeight) nHeight++; - USHORT nZoom = (USHORT)( aSize.Height() * 100L/ nHeight); + sal_uInt16 nZoom = (sal_uInt16)( aSize.Height() * 100L/ nHeight); aHeightZoomMF.SetValue(nZoom); } @@ -481,7 +481,7 @@ IMPL_LINK( SvxGrfCropPage, CropHdl, const MetricField *, pField ) FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich( SID_ATTR_GRAF_CROP ) ) ); - BOOL bZoom = aZoomConstRB.IsChecked(); + sal_Bool bZoom = aZoomConstRB.IsChecked(); if( pField == &aLeftMF || pField == &aRightMF ) { long nLeft = lcl_GetValue( aLeftMF, eUnit ); @@ -576,7 +576,7 @@ IMPL_LINK( SvxGrfCropPage, OrigSizeHdl, PushButton *, EMPTYARG ) aHeightMF.SetValue( aHeightMF.Normalize( nHeight ), eUnit ); aWidthZoomMF.SetValue(100); aHeightZoomMF.SetValue(100); - bSetOrigSize = TRUE; + bSetOrigSize = sal_True; return 0; } /*-------------------------------------------------------------------- @@ -596,13 +596,13 @@ void SvxGrfCropPage::CalcZoom() lcl_GetValue( aRightMF, eUnit ); long nULBorders = lcl_GetValue( aTopMF, eUnit ) + lcl_GetValue( aBottomMF, eUnit ); - USHORT nZoom = 0; + sal_uInt16 nZoom = 0; long nDen; if( (nDen = aOrigSize.Width() - nLRBorders) > 0) - nZoom = (USHORT)((( nWidth * 1000L / nDen )+5)/10); + nZoom = (sal_uInt16)((( nWidth * 1000L / nDen )+5)/10); aWidthZoomMF.SetValue(nZoom); if( (nDen = aOrigSize.Height() - nULBorders) > 0) - nZoom = (USHORT)((( nHeight * 1000L / nDen )+5)/10); + nZoom = (sal_uInt16)((( nHeight * 1000L / nDen )+5)/10); else nZoom = 0; aHeightZoomMF.SetValue(nZoom); @@ -651,7 +651,7 @@ void SvxGrfCropPage::CalcMinMaxBorder() FixedText mit der Originalgroesse fuellen --------------------------------------------------------------------*/ -void SvxGrfCropPage::GraphicHasChanged( BOOL bFound ) +void SvxGrfCropPage::GraphicHasChanged( sal_Bool bFound ) { if( bFound ) { diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index becc29e468bc..e4ef79b4f1f9 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -65,7 +65,7 @@ // static ---------------------------------------------------------------- -static USHORT pCaptionRanges[] = +static sal_uInt16 pCaptionRanges[] = { SDRATTR_CAPTIONTYPE, SDRATTR_CAPTIONFIXEDANGLE, @@ -172,7 +172,7 @@ void SvxCaptionTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxCaptionTabPage::FillItemSet( SfxItemSet& _rOutAttrs) +sal_Bool SvxCaptionTabPage::FillItemSet( SfxItemSet& _rOutAttrs) { SfxItemPool* pPool = _rOutAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); @@ -239,7 +239,7 @@ BOOL SvxCaptionTabPage::FillItemSet( SfxItemSet& _rOutAttrs) //NYI-------------die Winkel muessen noch hier rein!!! XXX---------------------- - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -267,7 +267,7 @@ void SvxCaptionTabPage::Reset( const SfxItemSet& ) SfxItemPool* pPool = rOutAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); - USHORT nWhich; + sal_uInt16 nWhich; SfxMapUnit eUnit; //------- Winkel ---------- @@ -391,14 +391,14 @@ SfxTabPage* SvxCaptionTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxCaptionTabPage::GetRanges() +sal_uInt16* SvxCaptionTabPage::GetRanges() { return( pCaptionRanges ); } //------------------------------------------------------------------------ -void SvxCaptionTabPage::SetupAnsatz_Impl( USHORT nType ) +void SvxCaptionTabPage::SetupAnsatz_Impl( sal_uInt16 nType ) { xub_StrLen nCnt=0, nIdx=0; @@ -515,7 +515,7 @@ IMPL_LINK_INLINE_END( SvxCaptionTabPage, SelectCaptTypeHdl_Impl, void *, EMPTYAR //------------------------------------------------------------------------ -void SvxCaptionTabPage::SetupType_Impl( USHORT nType ) +void SvxCaptionTabPage::SetupType_Impl( sal_uInt16 nType ) { switch( nType-1 ) { @@ -578,7 +578,7 @@ void SvxCaptionTabPage::FillValueSet() //======================================================================== -SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView, USHORT nAnchorTypes) +SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView, sal_uInt16 nAnchorTypes) : SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_CAPTION ) ), pView ( pSdrView ), nAnchorCtrls(nAnchorTypes) @@ -612,7 +612,7 @@ SvxCaptionTabDialog::~SvxCaptionTabDialog() // ----------------------------------------------------------------------- -void SvxCaptionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxCaptionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index c18ebf6f2a68..267f77e5c035 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -74,9 +74,9 @@ public: FNGetRangeHdl fnGetRange; FNGetMacrosOfRangeHdl fnGetMacroOfRange; - BOOL bReadOnly; + sal_Bool bReadOnly; Timer maFillGroupTimer; - BOOL bGotEvents; + sal_Bool bGotEvents; }; _SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) : @@ -93,8 +93,8 @@ _SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) : pMacroStr( NULL ), fnGetRange( NULL ), fnGetMacroOfRange( NULL ), - bReadOnly( FALSE ), - bGotEvents( FALSE ) + bReadOnly( sal_False ), + bGotEvents( sal_False ) { } @@ -117,7 +117,7 @@ _SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl() SvStringsDtor* _ImpGetRangeHdl( _SfxMacroTabPage*, const String& rLanguage ); SvStringsDtor* _ImpGetMacrosOfRangeHdl( _SfxMacroTabPage*, const String& rLanguage, const String& rRange ); -static USHORT __FAR_DATA aPageRg[] = { +static sal_uInt16 __FAR_DATA aPageRg[] = { SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, 0 }; @@ -145,7 +145,7 @@ String ConvertToUIName_Impl( SvxMacro *pMacro, const String& /*rLanguage*/ ) String aEntry; if ( ! pMacro->GetLanguage().EqualsAscii("JavaScript") ) { - USHORT nCount = aName.GetTokenCount('.'); + sal_uInt16 nCount = aName.GetTokenCount('.'); aEntry = aName.GetToken( nCount-1, '.' ); if ( nCount > 2 ) { @@ -168,7 +168,7 @@ void _SfxMacroTabPage::EnableButtons( const String& rLangName ) if ( pE ) { // Gebundenes Macro holen - const SvxMacro* pM = aTbl.Get( (USHORT)(ULONG) pE->GetUserData() ); + const SvxMacro* pM = aTbl.Get( (sal_uInt16)(sal_uLong) pE->GetUserData() ); mpImpl->pDeletePB->Enable( 0 != pM && !mpImpl->bReadOnly ); // Bei gleichem ScriptType Zuweisung nur, wenn Macro sich @@ -207,7 +207,7 @@ _SfxMacroTabPage::~_SfxMacroTabPage() DELETEZ( mpImpl ); } -void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId ) +void _SfxMacroTabPage::AddEvent( const String & rEventName, sal_uInt16 nEventId ) { String sTmp( rEventName ); sTmp += '\t'; @@ -237,29 +237,29 @@ void _SfxMacroTabPage::ScriptChanged( const String& aLangName ) EnableButtons( aLangName ); } -BOOL _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) { SvxMacroItem aItem( GetWhich( aPageRg[0] ) ); ((SvxMacroTableDtor&)aItem.GetMacroTable()) = aTbl; const SfxPoolItem* pItem; - if( SFX_ITEM_SET != GetItemSet().GetItemState( aItem.Which(), TRUE, &pItem ) + if( SFX_ITEM_SET != GetItemSet().GetItemState( aItem.Which(), sal_True, &pItem ) || aItem != *(SvxMacroItem*)pItem ) { rSet.Put( aItem ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet) { const SfxPoolItem* pEventsItem; - if( !mpImpl->bGotEvents && SFX_ITEM_SET == aSet.GetItemState( SID_EVENTCONFIG, TRUE, &pEventsItem ) ) + if( !mpImpl->bGotEvents && SFX_ITEM_SET == aSet.GetItemState( SID_EVENTCONFIG, sal_True, &pEventsItem ) ) { - mpImpl->bGotEvents = TRUE; + mpImpl->bGotEvents = sal_True; const SfxEventNamesList& rList = ((SfxEventNamesItem*)pEventsItem)->GetEvents(); - for ( USHORT nNo = 0; nNo < rList.Count(); ++nNo ) + for ( sal_uInt16 nNo = 0; nNo < rList.Count(); ++nNo ) { const SfxEventName *pOwn = rList.GetObject(nNo); AddEvent( pOwn->maUIName, pOwn->mnId ); @@ -270,15 +270,15 @@ void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet) void _SfxMacroTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( aPageRg[0] ), TRUE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( aPageRg[0] ), sal_True, &pItem )) aTbl = ((SvxMacroItem*)pItem)->GetMacroTable(); const SfxPoolItem* pEventsItem; - if( !mpImpl->bGotEvents && SFX_ITEM_SET == rSet.GetItemState( SID_EVENTCONFIG, TRUE, &pEventsItem ) ) + if( !mpImpl->bGotEvents && SFX_ITEM_SET == rSet.GetItemState( SID_EVENTCONFIG, sal_True, &pEventsItem ) ) { - mpImpl->bGotEvents = TRUE; + mpImpl->bGotEvents = sal_True; const SfxEventNamesList& rList = ((SfxEventNamesItem*)pEventsItem)->GetEvents(); - for ( USHORT nNo = 0; nNo < rList.Count(); ++nNo ) + for ( sal_uInt16 nNo = 0; nNo < rList.Count(); ++nNo ) { const SfxEventName *pOwn = rList.GetObject(nNo); AddEvent( pOwn->maUIName, pOwn->mnId ); @@ -293,7 +293,7 @@ void _SfxMacroTabPage::Reset( const SfxItemSet& rSet ) rListBox.SetCurEntry( pE ); } -BOOL _SfxMacroTabPage::IsReadOnly() const +sal_Bool _SfxMacroTabPage::IsReadOnly() const { return mpImpl->bReadOnly; } @@ -303,7 +303,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); SvLBoxEntry* pE = rListBox.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) { @@ -311,7 +311,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) return 0; } - USHORT nEventId = (USHORT)(ULONG)pE->GetUserData(); + sal_uInt16 nEventId = (sal_uInt16)(sal_uLong)pE->GetUserData(); String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); const SvxMacro* pM = pThis->aTbl.Get( nEventId ); @@ -351,7 +351,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox*, EMPTYARG ) { // Wenn dort ein Macro drin ist, wurde es selektiert und der // AssignButton schon in SelectMacro richtig enabled - pImpl->pAssignPB->Enable( FALSE ); + pImpl->pAssignPB->Enable( sal_False ); } pImpl->pFT_MacroLBLabel->SetText( aLabelText ); @@ -372,7 +372,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); SvLBoxEntry* pE = rListBox.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) { @@ -380,10 +380,10 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) return 0; } - const BOOL bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); + const sal_Bool bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); // aus der Tabelle entfernen - USHORT nEvent = (USHORT)(ULONG)pE->GetUserData(); + sal_uInt16 nEvent = (sal_uInt16)(sal_uLong)pE->GetUserData(); SvxMacro *pRemoveMacro = pThis->aTbl.Remove( nEvent ); delete pRemoveMacro; @@ -418,12 +418,12 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) } } - pImpl->pEventLB->SetUpdateMode( FALSE ); + pImpl->pEventLB->SetUpdateMode( sal_False ); pE->ReplaceItem( new SvLBoxString( pE, 0, sNew ), LB_MACROS_ITEMPOS ); rListBox.GetModel()->InvalidateEntry( pE ); rListBox.Select( pE ); rListBox.MakeVisible( pE ); - rListBox.SetUpdateMode( TRUE ); + rListBox.SetUpdateMode( sal_True ); pThis->EnableButtons( aLanguage ); return 0; @@ -443,12 +443,12 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer*, EMPTYARG ) if ( pTabDlg ) { pTabDlg->EnterWait(); - pTabDlg->EnableInput( FALSE ); + pTabDlg->EnableInput( sal_False ); } pThis->FillMacroList(); if ( pTabDlg ) { - pTabDlg->EnableInput( TRUE ); + pTabDlg->EnableInput( sal_True ); pTabDlg->LeaveWait(); } return 0; @@ -482,9 +482,9 @@ void _SfxMacroTabPage::InitAndSetHandler() mpImpl->pEventLB->Show(); mpImpl->pEventLB->ConnectElements(); - mpImpl->pEventLB->Enable( TRUE ); - mpImpl->pGroupLB->Enable( TRUE ); - mpImpl->pMacroLB->Enable( TRUE ); + mpImpl->pEventLB->Enable( sal_True ); + mpImpl->pGroupLB->Enable( sal_True ); + mpImpl->pMacroLB->Enable( sal_True ); mpImpl->pScriptTypeLB->SetDropDownLineCount( 3 ); String sBasicName/*(SfxResId(STR_BASICNAME))*/; @@ -523,10 +523,10 @@ void _SfxMacroTabPage::FillEvents() SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry(); - ULONG nEntryCnt = rListBox.GetEntryCount(); + sal_uLong nEntryCnt = rListBox.GetEntryCount(); // Events aus der Tabelle holen und die EventListBox entsprechen fuellen - for( ULONG n = 0 ; n < nEntryCnt ; ++n ) + for( sal_uLong n = 0 ; n < nEntryCnt ; ++n ) { SvLBoxEntry* pE = rListBox.GetEntry( n ); if( pE ) @@ -536,7 +536,7 @@ void _SfxMacroTabPage::FillEvents() String sOld( pLItem->GetText() ); String sNew; - USHORT nEventId = ( USHORT ) ( ULONG ) pE->GetUserData(); + sal_uInt16 nEventId = ( sal_uInt16 ) ( sal_uLong ) pE->GetUserData(); if( aTbl.IsKeyValid( nEventId ) ) sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ), aLanguage ); @@ -572,12 +572,12 @@ SvStringsDtor* __EXPORT _ImpGetRangeHdl( _SfxMacroTabPage* /*pTbPg*/, const Stri // gerade bearbeitet wird String aAppName(DEFINE_CONST_UNICODE("BASIC - ")); - USHORT nLen = aAppName.Len(); + sal_uInt16 nLen = aAppName.Len(); if ( aTitle.CompareIgnoreCaseToAscii( aAppName, nLen ) == COMPARE_EQUAL ) { // Basic-Namensprefix entfernen aTitle.Erase( 0, nLen ); - USHORT nIndex=0, nCount=aTitle.GetTokenCount('.'); + sal_uInt16 nIndex=0, nCount=aTitle.GetTokenCount('.'); if ( nCount > 1 ) { // Namen der Library entfernen diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index c370b5183ebd..2c90310dbf67 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -52,7 +52,7 @@ #include <sfx2/request.hxx> //add CHINA001 #include "svx/ofaitem.hxx" //add CHINA001 -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST, @@ -128,7 +128,7 @@ SvxMeasurePage::SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ) : aAttrSet ( *rInAttrs.GetPool() ), pView( 0 ), - bPositionModified ( FALSE ) + bPositionModified ( sal_False ) { FillUnitLB(); @@ -273,7 +273,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbBelowRefEdge.SetState( ( ( const SdrMeasureBelowRefEdgeItem& )rAttrs.Get( SDRATTR_MEASUREBELOWREFEDGE ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbBelowRefEdge.EnableTriState( FALSE ); + aTsbBelowRefEdge.EnableTriState( sal_False ); } else { @@ -287,7 +287,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREDECIMALPLACES ); if( pItem ) { - INT16 nValue = ( ( const SdrMeasureDecimalPlacesItem* )pItem )->GetValue(); + sal_Int16 nValue = ( ( const SdrMeasureDecimalPlacesItem* )pItem )->GetValue(); aMtrFldDecimalPlaces.SetValue( nValue ); } else @@ -302,7 +302,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbParallel.SetState( ( ( const SdrMeasureTextRota90Item& )rAttrs.Get( SDRATTR_MEASURETEXTROTA90 ) ). GetValue() ? STATE_NOCHECK : STATE_CHECK ); - aTsbParallel.EnableTriState( FALSE ); + aTsbParallel.EnableTriState( sal_False ); } else { @@ -315,7 +315,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbShowUnit.SetState( ( ( const SdrMeasureShowUnitItem& )rAttrs.Get( SDRATTR_MEASURESHOWUNIT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbShowUnit.EnableTriState( FALSE ); + aTsbShowUnit.EnableTriState( sal_False ); } else { @@ -329,7 +329,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) long nFieldUnit = (long) ( ( const SdrMeasureUnitItem& )rAttrs. Get( SDRATTR_MEASUREUNIT ) ).GetValue(); - for( USHORT i = 0; i < aLbUnit.GetEntryCount(); ++i ) + for( sal_uInt16 i = 0; i < aLbUnit.GetEntryCount(); ++i ) { if ( (long)aLbUnit.GetEntryData( i ) == nFieldUnit ) { @@ -352,8 +352,8 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) { - aTsbAutoPosV.EnableTriState( FALSE ); - aTsbAutoPosH.EnableTriState( FALSE ); + aTsbAutoPosV.EnableTriState( sal_False ); + aTsbAutoPosH.EnableTriState( sal_False ); SdrMeasureTextHPos eHPos = (SdrMeasureTextHPos) ( ( const SdrMeasureTextHPosItem& )rAttrs.Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue(); @@ -431,7 +431,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) ChangeAttrHdl_Impl( &aTsbShowUnit ); aCtlPreview.SetAttributes( rAttrs ); - bPositionModified = FALSE; + bPositionModified = sal_False; } /************************************************************************* @@ -440,86 +440,86 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - INT32 nValue; + sal_Bool bModified = sal_False; + sal_Int32 nValue; TriState eState; if( aMtrFldLineDist.GetText() != aMtrFldLineDist.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLineDist, eUnit ); rAttrs.Put( SdrMeasureLineDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelplineOverhang.GetText() != aMtrFldHelplineOverhang.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); rAttrs.Put( SdrMeasureHelplineOverhangItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelplineDist.GetText() != aMtrFldHelplineDist.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); rAttrs.Put( SdrMeasureHelplineDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelpline1Len.GetText() != aMtrFldHelpline1Len.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); rAttrs.Put( SdrMeasureHelpline1LenItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelpline2Len.GetText() != aMtrFldHelpline2Len.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); rAttrs.Put( SdrMeasureHelpline2LenItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } eState = aTsbBelowRefEdge.GetState(); if( eState != aTsbBelowRefEdge.GetSavedValue() ) { - rAttrs.Put( SdrMeasureBelowRefEdgeItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } if( aMtrFldDecimalPlaces.GetText() != aMtrFldDecimalPlaces.GetSavedValue() ) { - nValue = static_cast<INT32>(aMtrFldDecimalPlaces.GetValue()); + nValue = static_cast<sal_Int32>(aMtrFldDecimalPlaces.GetValue()); rAttrs.Put( SdrMeasureDecimalPlacesItem( - sal::static_int_cast< INT16 >( nValue ) ) ); - bModified = TRUE; + sal::static_int_cast< sal_Int16 >( nValue ) ) ); + bModified = sal_True; } eState = aTsbParallel.GetState(); if( eState != aTsbParallel.GetSavedValue() ) { - rAttrs.Put( SdrMeasureTextRota90Item( (BOOL) STATE_NOCHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureTextRota90Item( (sal_Bool) STATE_NOCHECK == eState ) ); + bModified = sal_True; } eState = aTsbShowUnit.GetState(); if( eState != aTsbShowUnit.GetSavedValue() ) { - rAttrs.Put( SdrMeasureShowUnitItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureShowUnitItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } - USHORT nPos = aLbUnit.GetSelectEntryPos(); + sal_uInt16 nPos = aLbUnit.GetSelectEntryPos(); if( nPos != aLbUnit.GetSavedValue() ) { if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nFieldUnit = (USHORT)(long)aLbUnit.GetEntryData( nPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbUnit.GetEntryData( nPos ); FieldUnit _eUnit = (FieldUnit) nFieldUnit; rAttrs.Put( SdrMeasureUnitItem( _eUnit ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -568,13 +568,13 @@ BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) if( eOldVPos != eVPos ) { rAttrs.Put( SdrMeasureTextVPosItem( eVPos ) ); - bModified = TRUE; + bModified = sal_True; } } else { rAttrs.Put( SdrMeasureTextVPosItem( eVPos ) ); - bModified = TRUE; + bModified = sal_True; } if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) @@ -584,13 +584,13 @@ BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) if( eOldHPos != eHPos ) { rAttrs.Put( SdrMeasureTextHPosItem( eHPos ) ); - bModified = TRUE; + bModified = sal_True; } } else { rAttrs.Put( SdrMeasureTextHPosItem( eHPos ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -630,7 +630,7 @@ SfxTabPage* SvxMeasurePage::Create( Window* pWindow, |* \************************************************************************/ -USHORT* SvxMeasurePage::GetRanges() +sal_uInt16* SvxMeasurePage::GetRanges() { return( pRanges ); } @@ -712,31 +712,31 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) if( p == &aMtrFldLineDist ) { - INT32 nValue = GetCoreValue( aMtrFldLineDist, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLineDist, eUnit ); aAttrSet.Put( SdrMeasureLineDistItem( nValue ) ); } if( p == &aMtrFldHelplineOverhang ) { - INT32 nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); aAttrSet.Put( SdrMeasureHelplineOverhangItem( nValue) ); } if( p == &aMtrFldHelplineDist ) { - INT32 nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); aAttrSet.Put( SdrMeasureHelplineDistItem( nValue) ); } if( p == &aMtrFldHelpline1Len ) { - INT32 nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); aAttrSet.Put( SdrMeasureHelpline1LenItem( nValue ) ); } if( p == &aMtrFldHelpline2Len ) { - INT32 nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); aAttrSet.Put( SdrMeasureHelpline2LenItem( nValue ) ); } @@ -744,12 +744,12 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) { TriState eState = aTsbBelowRefEdge.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (BOOL) STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) STATE_CHECK == eState ) ); } if( p == &aMtrFldDecimalPlaces ) { - INT16 nValue = sal::static_int_cast< INT16 >( + sal_Int16 nValue = sal::static_int_cast< sal_Int16 >( aMtrFldDecimalPlaces.GetValue() ); aAttrSet.Put( SdrMeasureDecimalPlacesItem( nValue ) ); } @@ -758,22 +758,22 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) { TriState eState = aTsbParallel.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureTextRota90Item( (BOOL) !STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureTextRota90Item( (sal_Bool) !STATE_CHECK == eState ) ); } if( p == &aTsbShowUnit ) { TriState eState = aTsbShowUnit.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureShowUnitItem( (BOOL) STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureShowUnitItem( (sal_Bool) STATE_CHECK == eState ) ); } if( p == &aLbUnit ) { - USHORT nPos = aLbUnit.GetSelectEntryPos(); + sal_uInt16 nPos = aLbUnit.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nFieldUnit = (USHORT)(long)aLbUnit.GetEntryData( nPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbUnit.GetEntryData( nPos ); FieldUnit _eUnit = (FieldUnit) nFieldUnit; aAttrSet.Put( SdrMeasureUnitItem( _eUnit ) ); } @@ -781,7 +781,7 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) if( p == &aTsbAutoPosV || p == &aTsbAutoPosH || p == &aCtlPosition ) { - bPositionModified = TRUE; + bPositionModified = sal_True; // Position RECT_POINT eRP = aCtlPosition.GetActualRP(); @@ -851,10 +851,10 @@ void SvxMeasurePage::FillUnitLB() long nUnit = FUNIT_NONE; String aStrMetric( CUI_RES( STR_MEASURE_AUTOMATIC ) ); - USHORT nPos = aLbUnit.InsertEntry( aStrMetric ); + sal_uInt16 nPos = aLbUnit.InsertEntry( aStrMetric ); aLbUnit.SetEntryData( nPos, (void*)nUnit ); - for( USHORT i = 0; i < aMetricArr.Count(); ++i ) + for( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i ) { aStrMetric = aMetricArr.GetStringByPos( i ); nUnit = aMetricArr.GetValue( i ); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 15ac78e9975e..4787f263657b 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -64,7 +64,7 @@ // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO, @@ -97,10 +97,10 @@ SvxNumberPreviewImpl::SvxNumberPreviewImpl( Window* pParent, const ResId& rResId { Font aFont( GetFont() ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aFont.SetColor( Application::GetSettings().GetStyleSettings().GetFieldColor() ); SetFont( aFont ); - InitSettings( TRUE, TRUE ); + InitSettings( sal_True, sal_True ); SetBorderStyle( WINDOW_BORDER_MONO ); } @@ -175,7 +175,7 @@ void SvxNumberPreviewImpl::Paint( const Rectangle& ) // ----------------------------------------------------------------------- -void SvxNumberPreviewImpl::InitSettings( BOOL bForeground, BOOL bBackground ) +void SvxNumberPreviewImpl::InitSettings( sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); @@ -204,9 +204,9 @@ void SvxNumberPreviewImpl::InitSettings( BOOL bForeground, BOOL bBackground ) void SvxNumberPreviewImpl::StateChanged( StateChangedType nType ) { if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) - InitSettings( TRUE, FALSE ); + InitSettings( sal_True, sal_False ); else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) - InitSettings( FALSE, TRUE ); + InitSettings( sal_False, sal_True ); Window::StateChanged( nType ); } @@ -218,7 +218,7 @@ void SvxNumberPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt ) Window::DataChanged( rDCEvt ); if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) - InitSettings( TRUE, TRUE ); + InitSettings( sal_True, sal_True ); } // class SvxNumberFormatTabPage ------------------------------------------ @@ -258,7 +258,7 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window* pParent, aLbCurrency ( this, CUI_RES( LB_CURRENCY) ), aLbFormat ( this, CUI_RES( LB_FORMAT ) ), aFtLanguage ( this, CUI_RES( FT_LANGUAGE ) ), - aLbLanguage ( this, CUI_RES( LB_LANGUAGE ), FALSE ), + aLbLanguage ( this, CUI_RES( LB_LANGUAGE ), sal_False ), aCbSourceFormat ( this, CUI_RES( CB_SOURCEFORMAT ) ), aFtDecimals ( this, CUI_RES( FT_DECIMALS ) ), aEdDecimals ( this, CUI_RES( ED_DECIMALS ) ), @@ -309,8 +309,8 @@ void SvxNumberFormatTabPage::Init_Impl() ImageList aIconList( CUI_RES_PLAIN ( IL_ICON ) ); ImageList aIconListHC( CUI_RES_PLAIN ( IL_ICON_HC ) ); - bNumItemFlag=TRUE; - bOneAreaFlag=FALSE; + bNumItemFlag=sal_True; + bOneAreaFlag=sal_False; nCatHeight=aLbCategory.GetSizePixel().Height(); @@ -328,15 +328,15 @@ void SvxNumberFormatTabPage::Init_Impl() aIbInfo. SetModeImage( aIconList.GetImage( IID_INFO ) ); aIbInfo. SetModeImage( aIconListHC.GetImage( IID_INFO ), BMP_COLOR_HIGHCONTRAST ); - aIbAdd.Enable(FALSE ); - aIbRemove.Enable(FALSE ); - aIbInfo.Enable(FALSE ); + aIbAdd.Enable(sal_False ); + aIbRemove.Enable(sal_False ); + aIbInfo.Enable(sal_False ); aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert //holen aEdComment.Hide(); - aCbSourceFormat.Check( FALSE ); + aCbSourceFormat.Check( sal_False ); aCbSourceFormat.Disable(); aCbSourceFormat.Hide(); @@ -396,7 +396,7 @@ void SvxNumberFormatTabPage::Init_Impl() #* #************************************************************************/ -USHORT* SvxNumberFormatTabPage::GetRanges() +sal_uInt16* SvxNumberFormatTabPage::GetRanges() { return pRanges; } @@ -444,8 +444,8 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pItem = NULL; const SfxBoolItem* pAutoEntryAttr = NULL; - USHORT nCatLbSelPos = 0; - USHORT nFmtLbSelPos = 0; + sal_uInt16 nCatLbSelPos = 0; + sal_uInt16 nFmtLbSelPos = 0; LanguageType eLangType = LANGUAGE_DONTKNOW; SvxDelStrgs aFmtEntryList; SvxNumberValueType eValType = SVX_VALUE_TYPE_UNDEFINED; @@ -454,7 +454,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) SfxItemState eState = SFX_ITEM_DONTCARE; - eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_NOLANGUAGE ),TRUE,&pItem); + eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_NOLANGUAGE ),sal_True,&pItem); if(eState==SFX_ITEM_SET) { @@ -467,28 +467,28 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) } else { - HideLanguage(FALSE); + HideLanguage(sal_False); } } - eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_INFO ),TRUE,&pItem); + eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_INFO ),sal_True,&pItem); if(eState==SFX_ITEM_SET) { if(pNumItem==NULL) { - bNumItemFlag=TRUE; + bNumItemFlag=sal_True; pNumItem= (SvxNumberInfoItem *) pItem->Clone(); } else { - bNumItemFlag=FALSE; + bNumItemFlag=sal_False; } } else { - bNumItemFlag=FALSE; + bNumItemFlag=sal_False; } @@ -504,7 +504,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) bOneAreaFlag= pBoolItem->GetValue(); } } - //bOneAreaFlag=TRUE; //@@ Debug-Test + //bOneAreaFlag=sal_True; //@@ Debug-Test eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_SOURCE ) ); @@ -515,13 +515,13 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) if ( pBoolItem ) aCbSourceFormat.Check( pBoolItem->GetValue() ); else - aCbSourceFormat.Check( FALSE ); + aCbSourceFormat.Check( sal_False ); aCbSourceFormat.Enable(); aCbSourceFormat.Show(); } else { - BOOL bInit = FALSE; // set to TRUE for debug test + sal_Bool bInit = sal_False; // set to sal_True for debug test aCbSourceFormat.Check( bInit ); aCbSourceFormat.Enable( bInit ); aCbSourceFormat.Show( bInit ); @@ -585,7 +585,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) pNumFmtShell->GetInitSettings( nCatLbSelPos, eLangType, nFmtLbSelPos, aFmtEntryList, aPrevString, pDummy ); - aLbCurrency.SelectEntryPos((USHORT)pNumFmtShell->GetCurrencySymbol()); + aLbCurrency.SelectEntryPos((sal_uInt16)pNumFmtShell->GetCurrencySymbol()); nFixedCategory=nCatLbSelPos; if(bOneAreaFlag) @@ -614,7 +614,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) aLbLanguage.SelectLanguage( eLangType ); if(pAutoEntryAttr) AddAutomaticLanguage_Impl(eLangType, pAutoEntryAttr->GetValue()); - UpdateFormatListBox_Impl(FALSE,TRUE); + UpdateFormatListBox_Impl(sal_False,sal_True); //! erAck 26.01.01 //! This spoils everything because it rematches currency formats based on @@ -662,9 +662,9 @@ void SvxNumberFormatTabPage::Obstructing() aFtLanguage .Disable(); aLbLanguage .Disable(); - aIbAdd.Enable(FALSE ); - aIbRemove.Enable(FALSE ); - aIbInfo.Enable(FALSE ); + aIbAdd.Enable(sal_False ); + aIbRemove.Enable(sal_False ); + aIbInfo.Enable(sal_False ); aBtnNegRed .Disable(); aBtnThousand .Disable(); @@ -675,8 +675,8 @@ void SvxNumberFormatTabPage::Obstructing() aFlOptions .Disable(); aEdDecimals .SetText( String() ); aEdLeadZeroes .SetText( String() ); - aBtnNegRed .Check( FALSE ); - aBtnThousand .Check( FALSE ); + aBtnNegRed .Check( sal_False ); + aBtnThousand .Check( sal_False ); aWndPreview .NotifyChange( String() ); aLbCategory .SelectEntryPos( 0 ); @@ -695,7 +695,7 @@ void SvxNumberFormatTabPage::Obstructing() #************************************************************************/ void SvxNumberFormatTabPage::EnableBySourceFormat_Impl() { - BOOL bEnable = !aCbSourceFormat.IsChecked(); + sal_Bool bEnable = !aCbSourceFormat.IsChecked(); if ( !bEnable ) aCbSourceFormat.GrabFocus(); aFtCategory .Enable( bEnable ); @@ -731,13 +731,13 @@ void SvxNumberFormatTabPage::EnableBySourceFormat_Impl() #* #* Funktion: Versteckt die Spracheinstellung: #* -#* Input: BOOL nFlag +#* Input: sal_Bool nFlag #* #* Output: --- #* #************************************************************************/ -void SvxNumberFormatTabPage::HideLanguage(BOOL nFlag) +void SvxNumberFormatTabPage::HideLanguage(sal_Bool nFlag) { Size aSize=aLbCategory.GetSizePixel(); @@ -772,14 +772,14 @@ void SvxNumberFormatTabPage::HideLanguage(BOOL nFlag) #* #************************************************************************/ -BOOL SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) { - BOOL bDataChanged = aFtLanguage.IsEnabled() || aCbSourceFormat.IsEnabled(); + sal_Bool bDataChanged = aFtLanguage.IsEnabled() || aCbSourceFormat.IsEnabled(); if ( bDataChanged ) { const SfxItemSet& rMyItemSet = GetItemSet(); - USHORT nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); - SfxItemState eItemState = rMyItemSet.GetItemState( nWhich, FALSE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); + SfxItemState eItemState = rMyItemSet.GetItemState( nWhich, sal_False ); // OK chosen - Is format code input entered already taken over? // If not, simulate Add. Upon syntax error ignore input and prevent Put. @@ -828,7 +828,7 @@ BOOL SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) pNumFmtShell->GetUpdateData( pDelArr, nDelCount ); pNumItem->SetDelFormatArray( pDelArr, nDelCount ); - if(bNumItemFlag==TRUE) + if(bNumItemFlag==sal_True) { rCoreAttrs.Put( *pNumItem ); } @@ -850,14 +850,14 @@ BOOL SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) // -------------------------------------------- if ( aCbSourceFormat.IsEnabled() ) { - USHORT _nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_SOURCE ); - SfxItemState _eItemState = rMyItemSet.GetItemState( _nWhich, FALSE ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_SOURCE ); + SfxItemState _eItemState = rMyItemSet.GetItemState( _nWhich, sal_False ); const SfxBoolItem* pBoolItem = (const SfxBoolItem*) GetItem( rMyItemSet, SID_ATTR_NUMBERFORMAT_SOURCE ); - BOOL bOld = (pBoolItem ? pBoolItem->GetValue() : FALSE); + sal_Bool bOld = (pBoolItem ? pBoolItem->GetValue() : sal_False); rCoreAttrs.Put( SfxBoolItem( _nWhich, aCbSourceFormat.IsChecked() ) ); if ( !bDataChanged ) - bDataChanged = (bOld != (BOOL) aCbSourceFormat.IsChecked() || + bDataChanged = (bOld != (sal_Bool) aCbSourceFormat.IsChecked() || _eItemState != SFX_ITEM_SET); } @@ -878,9 +878,9 @@ int SvxNumberFormatTabPage::DeactivatePage( SfxItemSet* _pSet ) { /* if ( (ULONG_MAX != nInitFormat) && _pSet ) { - const ULONG nCurKey = pNumFmtShell->GetCurNumFmtKey(); - const USHORT nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); - SfxItemState eItemState = GetItemSet().GetItemState( nWhich, FALSE ); + const sal_uLong nCurKey = pNumFmtShell->GetCurNumFmtKey(); + const sal_uInt16 nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); + SfxItemState eItemState = GetItemSet().GetItemState( nWhich, sal_False ); if ( (nInitFormat == nCurKey) && (SFX_ITEM_DEFAULT == eItemState) ) _pSet->ClearItem( nWhich ); @@ -907,14 +907,14 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( SvxDelStrgs& rEntries ) String aTmpString; String aTmpCatString; Font aFont=aLbCategory.GetFont(); - USHORT i = 0; + sal_uInt16 i = 0; short nTmpCatPos; short aPrivCat; aLbFormat.Clear(); - aLbFormat.SetUpdateMode( FALSE ); + aLbFormat.SetUpdateMode( sal_False ); - USHORT nCount = rEntries.Count(); + sal_uInt16 nCount = rEntries.Count(); if(nCount<1) return; @@ -966,7 +966,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( SvxDelStrgs& rEntries ) } } } - aLbFormat.SetUpdateMode( TRUE ); + aLbFormat.SetUpdateMode( sal_True ); DeleteEntryList_Impl(rEntries); } @@ -987,7 +987,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( SvxDelStrgs& rEntries ) void SvxNumberFormatTabPage::DeleteEntryList_Impl( SvxDelStrgs& rEntries ) { - USHORT nCount = rEntries.Count(); + sal_uInt16 nCount = rEntries.Count(); rEntries.DeleteAndDestroy(0,nCount); } @@ -1007,18 +1007,18 @@ void SvxNumberFormatTabPage::DeleteEntryList_Impl( SvxDelStrgs& rEntries ) #* #***?********************************************************************/ -void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE*/ ) +void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sal_False*/ ) { SvxDelStrgs aEntryList; String theFormat = aEdFormat.GetText(); - USHORT nCurCategory = aLbCategory.GetSelectEntryPos(); - USHORT nCategory = nCurCategory; - USHORT nDecimals = 0; - USHORT nZeroes = 0; - BOOL bNegRed = FALSE; - BOOL bThousand = FALSE; + sal_uInt16 nCurCategory = aLbCategory.GetSelectEntryPos(); + sal_uInt16 nCategory = nCurCategory; + sal_uInt16 nDecimals = 0; + sal_uInt16 nZeroes = 0; + sal_Bool bNegRed = sal_False; + sal_Bool bThousand = sal_False; short nTmpCatPos; - USHORT nCurrencyPos =aLbCurrency.GetSelectEntryPos(); + sal_uInt16 nCurrencyPos =aLbCurrency.GetSelectEntryPos(); if(bOneAreaFlag) { @@ -1035,15 +1035,15 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* bThousand, bNegRed, nDecimals, nZeroes, nCategory ); - BOOL bDoIt=FALSE; + sal_Bool bDoIt=sal_False; if(nCategory==CAT_CURRENCY) { - USHORT nTstPos=pNumFmtShell->FindCurrencyFormat(theFormat); - if(nCurrencyPos!=nTstPos && nTstPos!=(USHORT)-1) + sal_uInt16 nTstPos=pNumFmtShell->FindCurrencyFormat(theFormat); + if(nCurrencyPos!=nTstPos && nTstPos!=(sal_uInt16)-1) { aLbCurrency.SelectEntryPos(nTstPos); pNumFmtShell->SetCurrencySymbol(nTstPos); - bDoIt=TRUE; + bDoIt=sal_True; } } @@ -1058,7 +1058,7 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* else SetCategory(nCategory ); - UpdateFormatListBox_Impl( TRUE, FALSE ); + UpdateFormatListBox_Impl( sal_True, sal_False ); } } else if ( aLbFormat.GetEntryCount() > 0 ) @@ -1114,8 +1114,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* aBtnThousand .Disable(); aEdDecimals .SetText( UniString::CreateFromInt32( 0 ) ); aEdLeadZeroes .SetText( UniString::CreateFromInt32( 0 ) ); - aBtnNegRed .Check( FALSE ); - aBtnThousand .Check( FALSE ); + aBtnNegRed .Check( sal_False ); + aBtnThousand .Check( sal_False ); } } @@ -1138,8 +1138,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* void SvxNumberFormatTabPage::UpdateFormatListBox_Impl ( - USHORT bCat, // Category oder Land/Sprache ListBox? - BOOL bUpdateEdit // Format-Edit aktualisieren? + sal_uInt16 bCat, // Category oder Land/Sprache ListBox? + sal_Bool bUpdateEdit // Format-Edit aktualisieren? ) { SvxDelStrgs aEntryList; @@ -1217,7 +1217,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl aFtComment.SetText(aLbCategory.GetEntry(1)); } } - ChangePreviewText( (USHORT)nFmtLbSelPos ); + ChangePreviewText( (sal_uInt16)nFmtLbSelPos ); } } @@ -1226,7 +1226,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl FillFormatListBox_Impl( aEntryList ); if(nFmtLbSelPos != SELPOS_NONE) { - aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos ); + aLbFormat.SelectEntryPos( (sal_uInt16)nFmtLbSelPos ); aFtComment.SetText(pNumFmtShell->GetComment4Entry(nFmtLbSelPos)); if(pNumFmtShell->GetUserDefined4Entry(nFmtLbSelPos)) @@ -1319,9 +1319,9 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) if (aLbFormat.GetSelectEntryPos () == LISTBOX_ENTRY_NOTFOUND) #else /* !ENABLE_LAYOUT */ // Current category may be UserDefined with no format entries defined. - // And yes, aLbFormat is a SvxFontListBox with ULONG list positions, + // And yes, aLbFormat is a SvxFontListBox with sal_uLong list positions, // implementation returns a LIST_APPEND if empty, comparison with - // USHORT LISTBOX_ENTRY_NOTFOUND wouldn't match. + // sal_uInt16 LISTBOX_ENTRY_NOTFOUND wouldn't match. if ( aLbFormat.GetSelectEntryPos() == LIST_APPEND ) #endif /* !ENABLE_LAYOUT */ pLb = &aLbCategory; // continue with the current category selected @@ -1340,7 +1340,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) nTmpCatPos=aLbCategory.GetSelectEntryPos(); } - USHORT nCurrencyPos=LISTBOX_ENTRY_NOTFOUND ; + sal_uInt16 nCurrencyPos=LISTBOX_ENTRY_NOTFOUND ; if(nTmpCatPos==CAT_CURRENCY && (ListBox *)pLb == &aLbCurrency ) { @@ -1352,7 +1352,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) // Format-ListBox ---------------------------------------------------- if ( (SvxFontListBox *)pLb == &aLbFormat ) { - USHORT nSelPos = (USHORT) aLbFormat.GetSelectEntryPos(); + sal_uInt16 nSelPos = (sal_uInt16) aLbFormat.GetSelectEntryPos(); String aFormat = aLbFormat.GetSelectEntry(); String aComment; SvxDelStrgs aEntryList; @@ -1380,21 +1380,21 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) if ( pNumFmtShell->FindEntry( aFormat) ) { - aIbAdd.Enable(FALSE ); - BOOL bIsUserDef=pNumFmtShell->IsUserDefined( aFormat ); + aIbAdd.Enable(sal_False ); + sal_Bool bIsUserDef=pNumFmtShell->IsUserDefined( aFormat ); aIbRemove.Enable(bIsUserDef); aIbInfo.Enable(bIsUserDef); } else { - aIbAdd.Enable(TRUE ); - aIbInfo.Enable(TRUE ); - aIbRemove.Enable(FALSE ); + aIbAdd.Enable(sal_True ); + aIbInfo.Enable(sal_True ); + aIbRemove.Enable(sal_False ); aFtComment.SetText(aEdComment.GetText()); } - UpdateOptions_Impl( FALSE ); + UpdateOptions_Impl( sal_False ); //------- return 0; @@ -1405,9 +1405,9 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) // Kategorie-ListBox ------------------------------------------------- if ( pLb == &aLbCategory || pLb == &aLbCurrency) { - UpdateFormatListBox_Impl( TRUE, TRUE ); + UpdateFormatListBox_Impl( sal_True, sal_True ); EditHdl_Impl( NULL ); - UpdateOptions_Impl( FALSE ); + UpdateOptions_Impl( sal_False ); //------- return 0; @@ -1418,7 +1418,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) // Sprache/Land-ListBox ---------------------------------------------- if ( pLb == &aLbLanguage ) { - UpdateFormatListBox_Impl( FALSE, TRUE ); + UpdateFormatListBox_Impl( sal_False, sal_True ); EditHdl_Impl( &aEdFormat ); //------- @@ -1447,12 +1447,12 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) { - BOOL bAdded = FALSE; - BOOL bDeleted = FALSE; - ULONG nReturn = 0; - const ULONG nReturnChanged = 0x1; // THE boolean return value - const ULONG nReturnAdded = 0x2; // temp: format added - const ULONG nReturnOneArea = 0x4; // temp: one area but category changed => ignored + sal_Bool bAdded = sal_False; + sal_Bool bDeleted = sal_False; + sal_uLong nReturn = 0; + const sal_uLong nReturnChanged = 0x1; // THE boolean return value + const sal_uLong nReturnAdded = 0x2; // temp: format added + const sal_uLong nReturnOneArea = 0x4; // temp: one area but category changed => ignored if(pIB==&aIbAdd) { // Also called from FillItemSet() if a temporary currency format has @@ -1460,7 +1460,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) String aFormat = aEdFormat.GetText(); SvxDelStrgs aEntryList; SvxDelStrgs a2EntryList; - USHORT nCatLbSelPos = 0; + sal_uInt16 nCatLbSelPos = 0; short nFmtLbSelPos = SELPOS_NONE; xub_StrLen nErrPos=0; @@ -1483,7 +1483,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) { if(nCatLbSelPos==CAT_CURRENCY) { - aLbCurrency.SelectEntryPos((USHORT)pNumFmtShell->GetCurrencySymbol()); + aLbCurrency.SelectEntryPos((sal_uInt16)pNumFmtShell->GetCurrencySymbol()); } if(bOneAreaFlag && (nFixedCategory!=nCatLbSelPos)) @@ -1519,13 +1519,13 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) pNumFmtShell->SetComment4Entry(nFmtLbSelPos, String()); } - aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos ); + aLbFormat.SelectEntryPos( (sal_uInt16)nFmtLbSelPos ); aEdFormat.SetText( aFormat ); //aEdComment.SetText(String()); //@@ ??? aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert //holen - ChangePreviewText( (USHORT)nFmtLbSelPos ); + ChangePreviewText( (sal_uInt16)nFmtLbSelPos ); } } } @@ -1541,7 +1541,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) { String aFormat = aEdFormat.GetText(); SvxDelStrgs aEntryList; - USHORT nCatLbSelPos = 0; + sal_uInt16 nCatLbSelPos = 0; short nFmtLbSelPos = SELPOS_NONE; bDeleted = pNumFmtShell->RemoveFormat( aFormat, @@ -1566,9 +1566,9 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) else SetCategory(nCatLbSelPos ); - aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos ); + aLbFormat.SelectEntryPos( (sal_uInt16)nFmtLbSelPos ); aEdFormat.SetText( aFormat ); - ChangePreviewText( (USHORT)nFmtLbSelPos ); + ChangePreviewText( (sal_uInt16)nFmtLbSelPos ); } else { @@ -1621,9 +1621,9 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat ) if ( aEdFormat.GetText().Len() == 0 ) { - aIbAdd.Enable(FALSE ); - aIbRemove.Enable(FALSE ); - aIbInfo.Enable(FALSE ); + aIbAdd.Enable(sal_False ); + aIbRemove.Enable(sal_False ); + aIbInfo.Enable(sal_False ); aFtComment.SetText(String()); } else @@ -1634,30 +1634,30 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat ) if ( pNumFmtShell->FindEntry( aFormat, &nCurKey ) ) { - aIbAdd.Enable(FALSE ); - BOOL bUserDef=pNumFmtShell->IsUserDefined( aFormat ); + aIbAdd.Enable(sal_False ); + sal_Bool bUserDef=pNumFmtShell->IsUserDefined( aFormat ); aIbRemove.Enable(bUserDef); aIbInfo.Enable(bUserDef); if(bUserDef) { - USHORT nTmpCurPos=pNumFmtShell->FindCurrencyFormat(aFormat ); + sal_uInt16 nTmpCurPos=pNumFmtShell->FindCurrencyFormat(aFormat ); - if(nTmpCurPos!=(USHORT)-1) + if(nTmpCurPos!=(sal_uInt16)-1) aLbCurrency.SelectEntryPos(nTmpCurPos); } short nPosi=pNumFmtShell->GetListPos4Entry(aFormat); if(nPosi>=0) - aLbFormat.SelectEntryPos( (USHORT)nPosi); + aLbFormat.SelectEntryPos( (sal_uInt16)nPosi); } else { - aIbAdd.Enable(TRUE ); - aIbInfo.Enable(TRUE); - aIbRemove.Enable(FALSE ); + aIbAdd.Enable(sal_True ); + aIbInfo.Enable(sal_True); + aIbRemove.Enable(sal_False ); aFtComment.SetText(aEdComment.GetText()); @@ -1667,7 +1667,7 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat ) if ( pEdFormat ) { pNumFmtShell->SetCurNumFmtKey( nCurKey ); - UpdateOptions_Impl( TRUE ); + UpdateOptions_Impl( sal_True ); } return 0; @@ -1696,21 +1696,21 @@ IMPL_LINK( SvxNumberFormatTabPage, OptHdl_Impl, void *, pOptCtrl ) || ((CheckBox*) pOptCtrl == &aBtnThousand) ) { String aFormat; - BOOL bThousand = aBtnThousand.IsEnabled() + sal_Bool bThousand = aBtnThousand.IsEnabled() && aBtnThousand.IsChecked(); - BOOL bNegRed = aBtnNegRed.IsEnabled() + sal_Bool bNegRed = aBtnNegRed.IsEnabled() && aBtnNegRed.IsChecked(); - USHORT nPrecision = (aEdDecimals.IsEnabled()) - ? (USHORT)aEdDecimals.GetValue() - : (USHORT)0; - USHORT nLeadZeroes = (aEdLeadZeroes.IsEnabled()) - ? (USHORT)aEdLeadZeroes.GetValue() - : (USHORT)0; + sal_uInt16 nPrecision = (aEdDecimals.IsEnabled()) + ? (sal_uInt16)aEdDecimals.GetValue() + : (sal_uInt16)0; + sal_uInt16 nLeadZeroes = (aEdLeadZeroes.IsEnabled()) + ? (sal_uInt16)aEdLeadZeroes.GetValue() + : (sal_uInt16)0; pNumFmtShell->MakeFormat( aFormat, bThousand, bNegRed, nPrecision, nLeadZeroes, - (USHORT)aLbFormat.GetSelectEntryPos() ); + (sal_uInt16)aLbFormat.GetSelectEntryPos() ); aEdFormat.SetText( aFormat ); //aFtComment.SetText(String()); @@ -1718,8 +1718,8 @@ IMPL_LINK( SvxNumberFormatTabPage, OptHdl_Impl, void *, pOptCtrl ) if ( pNumFmtShell->FindEntry( aFormat ) ) { - aIbAdd.Enable(FALSE ); - BOOL bUserDef=pNumFmtShell->IsUserDefined( aFormat ); + aIbAdd.Enable(sal_False ); + sal_Bool bUserDef=pNumFmtShell->IsUserDefined( aFormat ); aIbRemove.Enable(bUserDef); aIbInfo.Enable(bUserDef); EditHdl_Impl( &aEdFormat); @@ -1765,7 +1765,7 @@ IMPL_LINK( SvxNumberFormatTabPage, LostFocusHdl_Impl, Edit *, pEd) aFtComment.Show(); if(!aIbAdd.IsEnabled()) { - USHORT nSelPos = (USHORT) aLbFormat.GetSelectEntryPos(); + sal_uInt16 nSelPos = (sal_uInt16) aLbFormat.GetSelectEntryPos(); pNumFmtShell->SetComment4Entry(nSelPos, aEdComment.GetText()); aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert @@ -1828,7 +1828,7 @@ void SvxNumberFormatTabPage::MakePreviewText( const String& rFormat ) aWndPreview.NotifyChange( aPreviewString, pPreviewColor ); } -void SvxNumberFormatTabPage::ChangePreviewText( USHORT nPos ) +void SvxNumberFormatTabPage::ChangePreviewText( sal_uInt16 nPos ) { String aPreviewString; Color* pPreviewColor = NULL; @@ -1876,12 +1876,12 @@ void SvxNumberFormatTabPage::FillCurrencyBox() SvStringsDtor aList; NfShCurrencyEntries rEntries; XubString* pEntry = NULL; - USHORT nPos=0; - USHORT nSelPos=0; + sal_uInt16 nPos=0; + sal_uInt16 nSelPos=0; pNumFmtShell->GetCurrencySymbols( aList, &nSelPos); - for(USHORT i=1;i<aList.Count();i++) + for(sal_uInt16 i=1;i<aList.Count();i++) { pEntry=aList[i]; nPos=aLbCurrency.InsertEntry( *pEntry); @@ -1889,12 +1889,12 @@ void SvxNumberFormatTabPage::FillCurrencyBox() aLbCurrency.SelectEntryPos(nSelPos); } -void SvxNumberFormatTabPage::SetCategory(USHORT nPos) +void SvxNumberFormatTabPage::SetCategory(sal_uInt16 nPos) { - USHORT nCurCategory = aLbCategory.GetSelectEntryPos(); + sal_uInt16 nCurCategory = aLbCategory.GetSelectEntryPos(); Point aPos=aLbFormat.GetPosPixel(); Size aSize=aLbFormat.GetSizePixel(); - USHORT nTmpCatPos; + sal_uInt16 nTmpCatPos; if(bOneAreaFlag) { @@ -1930,11 +1930,11 @@ void SvxNumberFormatTabPage::SetCategory(USHORT nPos) * which marks a certain language as automatically detected * Additionally the "Default" language is removed * --------------------------------------------------*/ -void SvxNumberFormatTabPage::AddAutomaticLanguage_Impl(LanguageType eAutoLang, BOOL bSelect) +void SvxNumberFormatTabPage::AddAutomaticLanguage_Impl(LanguageType eAutoLang, sal_Bool bSelect) { aLbLanguage.RemoveLanguage(LANGUAGE_SYSTEM); - USHORT nPos = aLbLanguage.InsertEntry(sAutomaticEntry); - aLbLanguage.SetEntryData(nPos, (void*)(ULONG)eAutoLang); + sal_uInt16 nPos = aLbLanguage.InsertEntry(sAutomaticEntry); + aLbLanguage.SetEntryData(nPos, (void*)(sal_uLong)eAutoLang); if(bSelect) aLbLanguage.SelectEntryPos(nPos); } diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 5b2bb4474573..b624da8a509b 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); diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index e2ee5b11af8f..fc9c4f70e621 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -129,7 +129,7 @@ static const long MINBODY = 284; // 0,5cm in twips aufgerundet //static const long PRINT_OFFSET = 17; // 0,03cm in twips abgerundet static const long PRINT_OFFSET = 0; // why was this ever set to 17 ? it led to wrong right and bottom margins. -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_SHADOW, @@ -142,7 +142,7 @@ static USHORT pRanges[] = // ------- Mapping Seitenlayout ------------------------------------------ -USHORT aArr[] = +sal_uInt16 aArr[] = { SVX_PAGE_ALL, SVX_PAGE_MIRROR, @@ -152,11 +152,11 @@ USHORT aArr[] = // ----------------------------------------------------------------------- -USHORT PageUsageToPos_Impl( USHORT nUsage ) +sal_uInt16 PageUsageToPos_Impl( sal_uInt16 nUsage ) { - const USHORT nCount = sizeof(aArr) / sizeof(USHORT); + const sal_uInt16 nCount = sizeof(aArr) / sizeof(sal_uInt16); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) if ( aArr[i] == ( nUsage & 0x000f ) ) return i; return SVX_PAGE_ALL; @@ -164,9 +164,9 @@ USHORT PageUsageToPos_Impl( USHORT nUsage ) // ----------------------------------------------------------------------- -USHORT PosToPageUsage_Impl( USHORT nPos ) +sal_uInt16 PosToPageUsage_Impl( sal_uInt16 nPos ) { - const USHORT nCount = sizeof(aArr) / sizeof(USHORT); + const sal_uInt16 nCount = sizeof(aArr) / sizeof(sal_uInt16); if ( nPos >= nCount ) return 0; @@ -192,7 +192,7 @@ long ConvertLong_Impl( const long nIn, SfxMapUnit eUnit ) return OutputDevice::LogicToLogic( nIn, (MapUnit)eUnit, MAP_TWIP ); } -BOOL IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize ) +sal_Bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize ) { if ( pSize ) { @@ -202,7 +202,7 @@ BOOL IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize ) return ( nDiffW < 10 && nDiffH < 10 ); } else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -230,7 +230,7 @@ struct SvxPage_Impl // gibt den Bereich der Which-Werte zur"uck -USHORT* SvxPageDescPage::GetRanges() +sal_uInt16* SvxPageDescPage::GetRanges() { return pRanges; } @@ -291,16 +291,16 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : aOutsideText ( CUI_RES( STR_OUTSIDE ) ), aPrintRangeQueryText( CUI_RES( STR_QUERY_PRINTRANGE ) ), - bLandscape ( FALSE ), + bLandscape ( sal_False ), eMode ( SVX_PAGE_MODE_STANDARD ), ePaperStart ( PAPER_A3 ), ePaperEnd ( PAPER_ENV_DL ), pImpl ( new SvxPage_Impl ) { - bBorderModified = FALSE; + bBorderModified = sal_False; FreeResource(); - aBspWin.EnableRTL( FALSE ); + aBspWin.EnableRTL( sal_False ); // diese Page braucht ExchangeSupport SetExchangeSupport(); @@ -312,7 +312,7 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : const SfxPoolItem* pItem; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, FALSE, &pItem) || + if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, sal_False, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) bWeb = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); @@ -488,10 +488,10 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)*pItem; SetMetricValue( aLeftMarginEdit, rLRSpace.GetLeft(), eUnit ); aBspWin.SetLeft( - (USHORT)ConvertLong_Impl( (long)rLRSpace.GetLeft(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rLRSpace.GetLeft(), eUnit ) ); SetMetricValue( aRightMarginEdit, rLRSpace.GetRight(), eUnit ); aBspWin.SetRight( - (USHORT)ConvertLong_Impl( (long)rLRSpace.GetRight(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rLRSpace.GetRight(), eUnit ) ); } // R"ander (Oben/Unten) einstellen @@ -502,16 +502,16 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)*pItem; SetMetricValue( aTopMarginEdit, rULSpace.GetUpper(), eUnit ); aBspWin.SetTop( - (USHORT)ConvertLong_Impl( (long)rULSpace.GetUpper(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rULSpace.GetUpper(), eUnit ) ); SetMetricValue( aBottomMarginEdit, rULSpace.GetLower(), eUnit ); aBspWin.SetBottom( - (USHORT)ConvertLong_Impl( (long)rULSpace.GetLower(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rULSpace.GetLower(), eUnit ) ); } // allgemeine Seitendaten SvxNumType eNumType = SVX_ARABIC; bLandscape = ( pImpl->mpDefPrinter->GetOrientation() == ORIENTATION_LANDSCAPE ); - USHORT nUse = (USHORT)SVX_PAGE_ALL; + sal_uInt16 nUse = (sal_uInt16)SVX_PAGE_ALL; pItem = GetItem( rSet, SID_ATTR_PAGE ); if ( pItem ) @@ -528,11 +528,11 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) LayoutHdl_Impl( 0 ); // Numerierungsart der Seitenvorlage einstellen - aNumberFormatBox.SelectEntryPos( sal::static_int_cast< USHORT >(eNumType) ); + aNumberFormatBox.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(eNumType) ); // Aktueller Papierschacht aPaperTrayBox.Clear(); - BYTE nPaperBin = PAPERBIN_PRINTER_SETTINGS; + sal_uInt8 nPaperBin = PAPERBIN_PRINTER_SETTINGS; pItem = GetItem( rSet, SID_ATTR_PAGE_PAPERBIN ); if ( pItem ) @@ -548,10 +548,10 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) if ( PAPERBIN_PRINTER_SETTINGS == nPaperBin ) aBinName = EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ); else - aBinName = pImpl->mpDefPrinter->GetPaperBinName( (USHORT)nPaperBin ); + aBinName = pImpl->mpDefPrinter->GetPaperBinName( (sal_uInt16)nPaperBin ); - USHORT nEntryPos = aPaperTrayBox.InsertEntry( aBinName ); - aPaperTrayBox.SetEntryData( nEntryPos, (void*)(ULONG)nPaperBin ); + sal_uInt16 nEntryPos = aPaperTrayBox.InsertEntry( aBinName ); + aPaperTrayBox.SetEntryData( nEntryPos, (void*)(sal_uLong)nPaperBin ); aPaperTrayBox.SelectEntry( aBinName ); // Size rausholen @@ -564,14 +564,14 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) FASTBOOL bOrientationSupport = pImpl->mpDefPrinter->HasSupport( SUPPORT_SET_ORIENTATION ); #ifdef OS2 - // unter OS/2 wird bei HasSupport() immer TRUE returned + // unter OS/2 wird bei HasSupport() immer sal_True returned // aber nur als Dummy, deshalb FALSE - bOrientationSupport = FALSE; + bOrientationSupport = sal_False; #endif if ( !bOrientationSupport && aPaperSize.Width() > aPaperSize.Height() ) - bLandscape = TRUE; + bLandscape = sal_True; aLandscapeBtn.Check( bLandscape ); aPortraitBtn.Check( !bLandscape ); @@ -584,7 +584,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) Swap( aPaperSize ); // Actual Paper Format - Paper ePaper = SvxPaperInfo::GetSvxPaper( aPaperSize, MAP_100TH_MM, TRUE ); + Paper ePaper = SvxPaperInfo::GetSvxPaper( aPaperSize, MAP_100TH_MM, sal_True ); if ( PAPER_USER != ePaper ) aPaperSize = SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM ); @@ -597,8 +597,8 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) SetMetricValue( aPaperWidthEdit, aPaperSize.Width(), SFX_MAPUNIT_100TH_MM ); aPaperSizeBox.Clear(); - USHORT nActPos = LISTBOX_ENTRY_NOTFOUND; - USHORT nAryId = RID_SVXSTRARY_PAPERSIZE_STD; + sal_uInt16 nActPos = LISTBOX_ENTRY_NOTFOUND; + sal_uInt16 nAryId = RID_SVXSTRARY_PAPERSIZE_STD; if ( ePaperStart != PAPER_A3 ) nAryId = RID_SVXSTRARY_PAPERSIZE_DRAW; @@ -609,8 +609,8 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) { String aStr = aPaperAry.GetString(i); Paper eSize = (Paper)aPaperAry.GetValue(i); - USHORT nPos = aPaperSizeBox.InsertEntry( aStr ); - aPaperSizeBox.SetEntryData( nPos, (void*)(ULONG)eSize ); + sal_uInt16 nPos = aPaperSizeBox.InsertEntry( aStr ); + aPaperSizeBox.SetEntryData( nPos, (void*)(sal_uLong)eSize ); if ( eSize == ePaper ) nActPos = nPos; @@ -632,15 +632,15 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) // Horizontale Ausrichtung pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 ); aHorzBox.Check( pItem ? ( (const SfxBoolItem*)pItem )->GetValue() - : FALSE ); + : sal_False ); // Vertikale Ausrichtung pItem = GetItem( rSet, SID_ATTR_PAGE_EXT2 ); aVertBox.Check( pItem ? ( (const SfxBoolItem*)pItem )->GetValue() - : FALSE ); + : sal_False ); // Beispiel-Fenster auf Tabelle setzen - aBspWin.SetTable( TRUE ); + aBspWin.SetTable( sal_True ); aBspWin.SetHorz( aHorzBox.IsChecked() ); aBspWin.SetVert( aVertBox.IsChecked() ); @@ -653,7 +653,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) aAdaptBox.Show(); pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 ); aAdaptBox.Check( pItem ? - ( (const SfxBoolItem*)pItem )->GetValue() : FALSE ); + ( (const SfxBoolItem*)pItem )->GetValue() : sal_False ); //!!! hidden, weil von StarDraw nicht implementiert aLayoutBox.Hide(); @@ -674,8 +674,8 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) InitHeadFoot_Impl( rSet ); // R"ander auf Hoch/Quer updaten, dann Beispiel updaten - bBorderModified = FALSE; - SwapFirstValues_Impl( FALSE ); + bBorderModified = sal_False; + SwapFirstValues_Impl( sal_False ); UpdateExample_Impl(); // Alte Werte sichern @@ -713,7 +713,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) } SfxItemState eState = rSet.GetItemState( GetWhich( SID_ATTR_FRAMEDIRECTION ), - TRUE, &pItem ); + sal_True, &pItem ); if( SFX_ITEM_UNKNOWN != eState ) { sal_uInt32 nVal = SFX_ITEM_SET == eState @@ -735,13 +735,13 @@ void SvxPageDescPage::FillUserData() // ----------------------------------------------------------------------- -BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; const SfxItemSet& rOldSet = GetItemSet(); SfxItemPool* pPool = rOldSet.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); - USHORT nWhich = GetWhich( SID_ATTR_LRSPACE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxMapUnit eUnit = pPool->GetMetric( nWhich ); const SfxPoolItem* pOld = 0; @@ -754,14 +754,14 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( aLeftMarginEdit.GetText() != aLeftMarginEdit.GetSavedValue() ) { - aMargin.SetLeft( (USHORT)GetCoreValue( aLeftMarginEdit, eUnit ) ); - bModified |= TRUE; + aMargin.SetLeft( (sal_uInt16)GetCoreValue( aLeftMarginEdit, eUnit ) ); + bModified |= sal_True; } if ( aRightMarginEdit.GetText() != aRightMarginEdit.GetSavedValue() ) { - aMargin.SetRight( (USHORT)GetCoreValue( aRightMarginEdit, eUnit ) ); - bModified |= TRUE; + aMargin.SetRight( (sal_uInt16)GetCoreValue( aRightMarginEdit, eUnit ) ); + bModified |= sal_True; } // Linken und rechten Rand setzen @@ -772,21 +772,21 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *(const SvxLRSpaceItem*)pOld == aMargin ) ) rSet.Put( aMargin ); else - bModified = FALSE; + bModified = sal_False; } - BOOL bMod = FALSE; + sal_Bool bMod = sal_False; if ( aTopMarginEdit.GetText() != aTopMarginEdit.GetSavedValue() ) { - aTopMargin.SetUpper( (USHORT)GetCoreValue( aTopMarginEdit, eUnit ) ); - bMod |= TRUE; + aTopMargin.SetUpper( (sal_uInt16)GetCoreValue( aTopMarginEdit, eUnit ) ); + bMod |= sal_True; } if ( aBottomMarginEdit.GetText() != aBottomMarginEdit.GetSavedValue() ) { - aTopMargin.SetLower( (USHORT)GetCoreValue( aBottomMarginEdit, eUnit ) ); - bMod |= TRUE; + aTopMargin.SetLower( (sal_uInt16)GetCoreValue( aBottomMarginEdit, eUnit ) ); + bMod |= sal_True; } // unteren oberen Rand setzen @@ -797,27 +797,27 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *(const SvxULSpaceItem*)pOld == aTopMargin ) ) { - bModified |= TRUE; + bModified |= sal_True; rSet.Put( aTopMargin ); } } // Druckerschacht nWhich = GetWhich( SID_ATTR_PAGE_PAPERBIN ); - USHORT nPos = aPaperTrayBox.GetSelectEntryPos(); - USHORT nBin = (USHORT)(ULONG)aPaperTrayBox.GetEntryData( nPos ); + sal_uInt16 nPos = aPaperTrayBox.GetSelectEntryPos(); + sal_uInt16 nBin = (sal_uInt16)(sal_uLong)aPaperTrayBox.GetEntryData( nPos ); pOld = GetOldItem( rSet, SID_ATTR_PAGE_PAPERBIN ); if ( !pOld || ( (const SvxPaperBinItem*)pOld )->GetValue() != nBin ) { - rSet.Put( SvxPaperBinItem( nWhich, (BYTE)nBin ) ); - bModified |= TRUE; + rSet.Put( SvxPaperBinItem( nWhich, (sal_uInt8)nBin ) ); + bModified |= sal_True; } nPos = aPaperSizeBox.GetSelectEntryPos(); - Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos ); - const USHORT nOld = aPaperSizeBox.GetSavedValue(); - BOOL bChecked = aLandscapeBtn.IsChecked(); + Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos ); + const sal_uInt16 nOld = aPaperSizeBox.GetSavedValue(); + sal_Bool bChecked = aLandscapeBtn.IsChecked(); if ( PAPER_USER == ePaper ) { @@ -833,7 +833,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || ( (const SvxSizeItem*)pOld )->GetSize() != aSize ) { rSet.Put( SvxSizeItem( GetWhich(SID_ATTR_PAGE_SIZE), aSize ) ); - bModified |= TRUE; + bModified |= sal_True; } } } @@ -851,7 +851,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || ( (const SvxSizeItem*)pOld )->GetSize() != aSize ) { rSet.Put( SvxSizeItem( GetWhich(SID_ATTR_PAGE_SIZE), aSize ) ); - bModified |= TRUE; + bModified |= sal_True; } } } @@ -868,7 +868,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( bChecked != aLandscapeBtn.GetSavedValue() ) { aPage.SetLandscape(bChecked); - bMod |= TRUE; + bMod |= sal_True; } // Einstellen der Numerierungsart der Seite @@ -877,7 +877,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( nPos != aNumberFormatBox.GetSavedValue() ) { aPage.SetNumType( (SvxNumType)nPos ); - bMod |= TRUE; + bMod |= sal_True; } if ( bMod ) @@ -887,7 +887,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *(const SvxPageItem*)pOld == aPage ) ) { rSet.Put( aPage ); - bModified |= TRUE; + bModified |= sal_True; } } else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich ) ) @@ -906,7 +906,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) SfxBoolItem aHorz( GetWhich( SID_ATTR_PAGE_EXT1 ), aHorzBox.IsChecked() ); rSet.Put( aHorz ); - bModified |= TRUE; + bModified |= sal_True; } if ( aVertBox.IsChecked() != aVertBox.GetSavedValue() ) @@ -914,7 +914,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) SfxBoolItem aVert( GetWhich( SID_ATTR_PAGE_EXT2 ), aVertBox.IsChecked() ); rSet.Put( aVert ); - bModified |= TRUE; + bModified |= sal_True; } break; } @@ -924,7 +924,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) // immer putten, damit Draw das auswerten kann rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_PAGE_EXT1 ), aAdaptBox.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; break; } default: ;//prevent warning @@ -936,13 +936,13 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) { const SfxBoolItem& rRegItem = (const SfxBoolItem&)rOldSet.Get(SID_SWREGISTER_MODE); SfxBoolItem* pRegItem = (SfxBoolItem*)rRegItem.Clone(); - BOOL bCheck = aRegisterCB.IsChecked(); + sal_Bool bCheck = aRegisterCB.IsChecked(); pRegItem->SetValue(bCheck); rSet.Put(*pRegItem); - bModified |= TRUE; + bModified |= sal_True; if(bCheck) { - bModified |= TRUE; + bModified |= sal_True; rSet.Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aRegisterLB.GetSelectEntry())); } @@ -953,7 +953,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if( aTextFlowBox.IsVisible() && (eDirection != aTextFlowBox.GetSavedValue()) ) { rSet.Put( SvxFrameDirectionItem( eDirection, GetWhich( SID_ATTR_FRAMEDIRECTION ) ) ); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -964,7 +964,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) IMPL_LINK( SvxPageDescPage, LayoutHdl_Impl, ListBox *, EMPTYARG ) { // innen au\sen umschalten - const USHORT nPos = PosToPageUsage_Impl( aLayoutBox.GetSelectEntryPos() ); + const sal_uInt16 nPos = PosToPageUsage_Impl( aLayoutBox.GetSelectEntryPos() ); if ( nPos == SVX_PAGE_MIRROR ) { @@ -996,16 +996,16 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) // Schacht-Box initialisieren String aOldName = aPaperTrayBox.GetSelectEntry(); - aPaperTrayBox.SetUpdateMode( FALSE ); + aPaperTrayBox.SetUpdateMode( sal_False ); aPaperTrayBox.Clear(); - USHORT nEntryPos = aPaperTrayBox.InsertEntry( + sal_uInt16 nEntryPos = aPaperTrayBox.InsertEntry( EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ) ); aPaperTrayBox.SetEntryData( nEntryPos, - (void*)(ULONG)PAPERBIN_PRINTER_SETTINGS ); + (void*)(sal_uLong)PAPERBIN_PRINTER_SETTINGS ); String aPaperBin( EditResId( RID_SVXSTR_PAPERBIN ) ); - USHORT nBinCount = pImpl->mpDefPrinter->GetPaperBinCount(); + sal_uInt16 nBinCount = pImpl->mpDefPrinter->GetPaperBinCount(); - for ( USHORT i = 0; i < nBinCount; ++i ) + for ( sal_uInt16 i = 0; i < nBinCount; ++i ) { String aName = pImpl->mpDefPrinter->GetPaperBinName(i); @@ -1016,10 +1016,10 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) aName.Append( UniString::CreateFromInt32( i+1 ) ); } nEntryPos = aPaperTrayBox.InsertEntry( aName ); - aPaperTrayBox.SetEntryData( nEntryPos, (void*)(ULONG)i ); + aPaperTrayBox.SetEntryData( nEntryPos, (void*)(sal_uLong)i ); } aPaperTrayBox.SelectEntry( aOldName ); - aPaperTrayBox.SetUpdateMode( TRUE ); + aPaperTrayBox.SetUpdateMode( sal_True ); return 0; } @@ -1028,8 +1028,8 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox ) { - const USHORT nPos = pBox->GetSelectEntryPos(); - Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos ); + const sal_uInt16 nPos = pBox->GetSelectEntryPos(); + Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos ); if ( ePaper != PAPER_USER ) { @@ -1057,7 +1057,7 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox ) { // Draw: bei Papierformat soll der Rand 1cm betragen long nTmp = 0; - BOOL bScreen = ( PAPER_SCREEN == ePaper ); + sal_Bool bScreen = ( PAPER_SCREEN == ePaper ); if ( !bScreen ) // bei Bildschirm keinen Rand @@ -1102,16 +1102,16 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox ) IMPL_LINK( SvxPageDescPage, PaperSizeModify_Impl, Edit *, EMPTYARG ) { - USHORT nWhich = GetWhich( SID_ATTR_LRSPACE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWhich ); Size aSize( GetCoreValue( aPaperWidthEdit, eUnit ), GetCoreValue( aPaperHeightEdit, eUnit ) ); - Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, (MapUnit)eUnit, TRUE ); - USHORT nEntryCount = aPaperSizeBox.GetEntryCount(); + Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, (MapUnit)eUnit, sal_True ); + sal_uInt16 nEntryCount = aPaperSizeBox.GetEntryCount(); - for ( USHORT i = 0; i < nEntryCount; ++i ) + for ( sal_uInt16 i = 0; i < nEntryCount; ++i ) { - Paper eTmp = (Paper)(ULONG)aPaperSizeBox.GetEntryData(i); + Paper eTmp = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData(i); if ( eTmp == ePaper ) { @@ -1227,7 +1227,7 @@ void SvxPageDescPage::SwapFirstValues_Impl( FASTBOOL bSet ) IMPL_LINK_INLINE_START( SvxPageDescPage, BorderModify_Impl, MetricField *, EMPTYARG ) { if ( !bBorderModified ) - bBorderModified = TRUE; + bBorderModified = sal_True; UpdateExample_Impl(); return 0; } @@ -1260,12 +1260,12 @@ void SvxPageDescPage::UpdateExample_Impl( bool bResetbackground ) void SvxPageDescPage::ResetBackground_Impl( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_PAGE_HEADERSET ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_PAGE_HEADERSET ); - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { const SvxSetItem& rSetItem = - (const SvxSetItem&)rSet.Get( nWhich, FALSE ); + (const SvxSetItem&)rSet.Get( nWhich, sal_False ); const SfxItemSet& rTmpSet = rSetItem.GetItemSet(); const SfxBoolItem& rOn = (const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) ); @@ -1293,10 +1293,10 @@ void SvxPageDescPage::ResetBackground_Impl( const SfxItemSet& rSet ) nWhich = GetWhich( SID_ATTR_PAGE_FOOTERSET ); - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { const SvxSetItem& rSetItem = - (const SvxSetItem&)rSet.Get( nWhich, FALSE ); + (const SvxSetItem&)rSet.Get( nWhich, sal_False ); const SfxItemSet& rTmpSet = rSetItem.GetItemSet(); const SfxBoolItem& rOn = (const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) ); @@ -1360,7 +1360,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ), - FALSE, (const SfxPoolItem**)&pSetItem ) ) + sal_False, (const SfxPoolItem**)&pSetItem ) ) { const SfxItemSet& rHeaderSet = pSetItem->GetItemSet(); const SfxBoolItem& rHeaderOn = @@ -1379,13 +1379,13 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) ); aBspWin.SetHdLeft( rLR.GetLeft() ); aBspWin.SetHdRight( rLR.GetRight() ); - aBspWin.SetHeader( TRUE ); + aBspWin.SetHeader( sal_True ); } else - aBspWin.SetHeader( FALSE ); + aBspWin.SetHeader( sal_False ); // im Beispiel Hintergrund und Umrandung anzeigen - USHORT nWhich = GetWhich( SID_ATTR_BRUSH ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_BRUSH ); if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) { @@ -1407,7 +1407,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ), - FALSE, (const SfxPoolItem**)&pSetItem ) ) + sal_False, (const SfxPoolItem**)&pSetItem ) ) { const SfxItemSet& rFooterSet = pSetItem->GetItemSet(); const SfxBoolItem& rFooterOn = @@ -1426,13 +1426,13 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) rFooterSet.Get( GetWhich( SID_ATTR_LRSPACE ) ); aBspWin.SetFtLeft( rLR.GetLeft() ); aBspWin.SetFtRight( rLR.GetRight() ); - aBspWin.SetFooter( TRUE ); + aBspWin.SetFooter( sal_True ); } else - aBspWin.SetFooter( FALSE ); + aBspWin.SetFooter( sal_False ); // im Beispiel Hintergrund und Umrandung anzeigen - USHORT nWhich = GetWhich( SID_ATTR_BRUSH ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_BRUSH ); if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) { @@ -1467,8 +1467,8 @@ int SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet ) // Abfrage, ob die Seitenr"ander ausserhalb des Druckbereichs liegen // Wenn nicht, dann den Anwender fragen, ob sie "ubernommen werden sollen. // Wenn nicht, dann auf der TabPage bleiben. - USHORT nPos = aPaperSizeBox.GetSelectEntryPos(); - Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos ); + sal_uInt16 nPos = aPaperSizeBox.GetSelectEntryPos(); + Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos ); if ( ePaper != PAPER_SCREEN && IsMarginOutOfRange() ) { @@ -1500,7 +1500,7 @@ int SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet ) FillItemSet( *_pSet ); // ggf. hoch/quer putten - USHORT nWh = GetWhich( SID_ATTR_PAGE_SIZE ); + sal_uInt16 nWh = GetWhich( SID_ATTR_PAGE_SIZE ); SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWh ); Size aSize( GetCoreValue( aPaperWidthEdit, eUnit ), GetCoreValue( aPaperHeightEdit, eUnit ) ); @@ -1648,7 +1648,7 @@ IMPL_LINK_INLINE_END( SvxPageDescPage, CenterHdl_Impl, CheckBox *, EMPTYARG ) void SvxPageDescPage::SetCollectionList(const List* pList) { sStandardRegister = *(String*)pList->GetObject(0); - for( USHORT i = 1; i < pList->Count(); i++ ) + for( sal_uInt16 i = 1; i < pList->Count(); i++ ) { aRegisterLB.InsertEntry(*(String*)pList->GetObject(i)); } @@ -1663,10 +1663,10 @@ void SvxPageDescPage::SetCollectionList(const List* pList) IMPL_LINK( SvxPageDescPage, RegisterModify, CheckBox*, pBox ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if(pBox->IsChecked()) { - bEnable = TRUE; + bEnable = sal_True; if(USHRT_MAX == aRegisterLB.GetSelectEntryPos()) aRegisterLB.SelectEntry(sStandardRegister); } diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 0359ef595a87..408a72d14765 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -65,7 +65,7 @@ // static ---------------------------------------------------------------- -static USHORT pStdRanges[] = +static sal_uInt16 pStdRanges[] = { SID_ATTR_PARA_LINESPACE, // 10033 SID_ATTR_PARA_LINESPACE, @@ -76,14 +76,14 @@ static USHORT pStdRanges[] = 0 }; -static USHORT pAlignRanges[] = +static sal_uInt16 pAlignRanges[] = { SID_ATTR_PARA_ADJUST, // 10027 SID_ATTR_PARA_ADJUST, 0 }; -static USHORT pExtRanges[] = +static sal_uInt16 pExtRanges[] = { SID_ATTR_PARA_PAGEBREAK, // 10037 - SID_ATTR_PARA_WIDOWS, // 10041 @@ -138,21 +138,21 @@ void SetLineSpace_Impl( SvxLineSpacingItem& rLineSpace, case LLINESPACE_PROP: rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; - rLineSpace.SetPropLineSpace( (BYTE)lValue ); + rLineSpace.SetPropLineSpace( (sal_uInt8)lValue ); break; case LLINESPACE_MIN: - rLineSpace.SetLineHeight( (USHORT)lValue ); + rLineSpace.SetLineHeight( (sal_uInt16)lValue ); rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; break; case LLINESPACE_DURCH: rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; - rLineSpace.SetInterLineSpace( (USHORT)lValue ); + rLineSpace.SetInterLineSpace( (sal_uInt16)lValue ); break; case LLINESPACE_FIX: - rLineSpace.SetLineHeight((USHORT)lValue); + rLineSpace.SetLineHeight((sal_uInt16)lValue); rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_FIX; rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; break; @@ -160,12 +160,12 @@ void SetLineSpace_Impl( SvxLineSpacingItem& rLineSpace, } -USHORT GetHtmlMode_Impl(const SfxItemSet& rSet) +sal_uInt16 GetHtmlMode_Impl(const SfxItemSet& rSet) { - USHORT nHtmlMode = 0; + sal_uInt16 nHtmlMode = 0; const SfxPoolItem* pItem = 0; 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)))) { @@ -229,16 +229,16 @@ SfxTabPage* SvxStdParagraphTabPage::Create( Window* pParent, // ----------------------------------------------------------------------- -BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) +sal_Bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { SfxItemState eState = SFX_ITEM_UNKNOWN; const SfxPoolItem* pOld = 0; SfxItemPool* pPool = rOutSet.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); - BOOL bModified = FALSE; - USHORT nWhich; - USHORT nPos = aLineDist.GetSelectEntryPos(); + sal_Bool bModified = sal_False; + sal_uInt16 nWhich; + sal_uInt16 nPos = aLineDist.GetSelectEntryPos(); if ( LISTBOX_ENTRY_NOTFOUND != nPos && ( nPos != aLineDist.GetSavedValue() || @@ -282,7 +282,7 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) SFX_ITEM_DONTCARE == eState ) { rOutSet.Put( aSpacing ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -302,21 +302,21 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( aTopDist.IsRelative() ) aMargin.SetUpper( rOldItem.GetUpper(), - (USHORT)aTopDist.GetValue() ); + (sal_uInt16)aTopDist.GetValue() ); else - aMargin.SetUpper( (USHORT)GetCoreValue( aTopDist, eUnit ) ); + aMargin.SetUpper( (sal_uInt16)GetCoreValue( aTopDist, eUnit ) ); if ( aBottomDist.IsRelative() ) aMargin.SetLower( rOldItem.GetLower(), - (USHORT)aBottomDist.GetValue() ); + (sal_uInt16)aBottomDist.GetValue() ); else - aMargin.SetLower( (USHORT)GetCoreValue( aBottomDist, eUnit ) ); + aMargin.SetLower( (sal_uInt16)GetCoreValue( aBottomDist, eUnit ) ); } else { - aMargin.SetUpper( (USHORT)GetCoreValue( aTopDist, eUnit ) ); - aMargin.SetLower( (USHORT)GetCoreValue( aBottomDist, eUnit ) ); + aMargin.SetUpper( (sal_uInt16)GetCoreValue( aTopDist, eUnit ) ); + aMargin.SetLower( (sal_uInt16)GetCoreValue( aBottomDist, eUnit ) ); } eState = GetItemSet().GetItemState( nWhich ); @@ -324,10 +324,10 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) SFX_ITEM_DONTCARE == eState ) { rOutSet.Put( aMargin ); - bModified |= TRUE; + bModified |= sal_True; } } - FASTBOOL bNullTab = FALSE; + FASTBOOL bNullTab = sal_False; if ( aLeftIndent.IsValueModified() || aFLineIndent.IsValueModified() || @@ -348,40 +348,40 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( aLeftIndent.IsRelative() ) aMargin.SetTxtLeft( rOldItem.GetTxtLeft(), - (USHORT)aLeftIndent.GetValue() ); + (sal_uInt16)aLeftIndent.GetValue() ); else aMargin.SetTxtLeft( GetCoreValue( aLeftIndent, eUnit ) ); if ( aRightIndent.IsRelative() ) aMargin.SetRight( rOldItem.GetRight(), - (USHORT)aRightIndent.GetValue() ); + (sal_uInt16)aRightIndent.GetValue() ); else aMargin.SetRight( GetCoreValue( aRightIndent, eUnit ) ); if ( aFLineIndent.IsRelative() ) aMargin.SetTxtFirstLineOfst( rOldItem.GetTxtFirstLineOfst(), - (USHORT)aFLineIndent.GetValue() ); + (sal_uInt16)aFLineIndent.GetValue() ); else aMargin.SetTxtFirstLineOfst( - (USHORT)GetCoreValue( aFLineIndent, eUnit ) ); + (sal_uInt16)GetCoreValue( aFLineIndent, eUnit ) ); } else { aMargin.SetTxtLeft( GetCoreValue( aLeftIndent, eUnit ) ); aMargin.SetRight( GetCoreValue( aRightIndent, eUnit ) ); aMargin.SetTxtFirstLineOfst( - (USHORT)GetCoreValue( aFLineIndent, eUnit ) ); + (sal_uInt16)GetCoreValue( aFLineIndent, eUnit ) ); } aMargin.SetAutoFirst(aAutoCB.IsChecked()); if ( aMargin.GetTxtFirstLineOfst() < 0 ) - bNullTab = TRUE; + bNullTab = sal_True; eState = GetItemSet().GetItemState( nWhich ); if ( !pOld || !( *(const SvxLRSpaceItem*)pOld == aMargin ) || SFX_ITEM_DONTCARE == eState ) { rOutSet.Put( aMargin ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -392,7 +392,7 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { // negativer Erstzeileneinzug -> ggf. Null Default-Tabstop setzen - USHORT _nWhich = GetWhich( SID_ATTR_TABSTOP ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_TABSTOP ); const SfxItemSet& rInSet = GetItemSet(); if ( rInSet.GetItemState( _nWhich ) >= SFX_ITEM_AVAILABLE ) @@ -411,16 +411,16 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) const SfxBoolItem* pBoolItem = (SfxBoolItem*)GetOldItem( rOutSet, SID_ATTR_PARA_REGISTER); SfxBoolItem* pRegItem = (SfxBoolItem*)pBoolItem->Clone(); - USHORT _nWhich = GetWhich( SID_ATTR_PARA_REGISTER ); - BOOL bSet = pRegItem->GetValue(); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_REGISTER ); + sal_Bool bSet = pRegItem->GetValue(); if(aRegisterCB.IsChecked() != bSet ) { pRegItem->SetValue(!bSet); rOutSet.Put(*pRegItem); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == GetItemSet().GetItemState( _nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == GetItemSet().GetItemState( _nWhich, sal_False ) ) rOutSet.ClearItem(_nWhich); delete pRegItem; } @@ -445,7 +445,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) SetFieldUnit( aBottomDist, eFUnit ); SetFieldUnit( aLineDistAtMetricBox, eFUnit ); - USHORT _nWhich = GetWhich( SID_ATTR_LRSPACE ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxItemState eItemState = rSet.GetItemState( _nWhich ); if ( eItemState >= SFX_ITEM_AVAILABLE ) @@ -459,7 +459,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropLeft() != 100 ) { - aLeftIndent.SetRelative( TRUE ); + aLeftIndent.SetRelative( sal_True ); aLeftIndent.SetValue( rOldItem.GetPropLeft() ); } else @@ -471,7 +471,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropRight() != 100 ) { - aRightIndent.SetRelative( TRUE ); + aRightIndent.SetRelative( sal_True ); aRightIndent.SetValue( rOldItem.GetPropRight() ); } else @@ -483,7 +483,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropTxtFirstLineOfst() != 100 ) { - aFLineIndent.SetRelative( TRUE ); + aFLineIndent.SetRelative( sal_True ); aFLineIndent.SetValue( rOldItem.GetPropTxtFirstLineOfst() ); } else @@ -529,7 +529,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropUpper() != 100 ) { - aTopDist.SetRelative( TRUE ); + aTopDist.SetRelative( sal_True ); aTopDist.SetValue( rOldItem.GetPropUpper() ); } else @@ -541,7 +541,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropLower() != 100 ) { - aBottomDist.SetRelative( TRUE ); + aBottomDist.SetRelative( sal_True ); aBottomDist.SetValue( rOldItem.GetPropLower() ); } else @@ -580,7 +580,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eItemState >= SFX_ITEM_AVAILABLE ) aRegisterCB.Check( ((const SfxBoolItem &)rSet.Get( _nWhich )).GetValue()); aRegisterCB.SaveValue(); - USHORT nHtmlMode = GetHtmlMode_Impl(rSet); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl(rSet); if(nHtmlMode & HTMLMODE_ON) { aRegisterCB.Hide(); @@ -616,7 +616,7 @@ void SvxStdParagraphTabPage::EnableRelativeMode() aRightIndent.EnableRelativeMode( 0, 999 ); aTopDist.EnableRelativeMode( 0, 999 ); aBottomDist.EnableRelativeMode( 0, 999 ); - bRelativeMode = TRUE; + bRelativeMode = sal_True; } // ----------------------------------------------------------------------- @@ -665,8 +665,8 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( Window* pParent, nWidth ( 11905 /*567 * 50*/ ), nMinFixDist(0L), - bRelativeMode ( FALSE ), - bNegativeIndents(FALSE) + bRelativeMode ( sal_False ), + bNegativeIndents(sal_False) { // diese Page braucht ExchangeSupport @@ -687,12 +687,12 @@ void SvxStdParagraphTabPage::EnableNegativeMode() aRightIndent.SetMin(-9999); aRightIndent.EnableNegativeMode(); aLeftIndent.EnableNegativeMode(); - bNegativeIndents = TRUE; + bNegativeIndents = sal_True; } // ----------------------------------------------------------------------- -USHORT* SvxStdParagraphTabPage::GetRanges() +sal_uInt16* SvxStdParagraphTabPage::GetRanges() { return pStdRanges; } @@ -777,8 +777,8 @@ IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox *, pBox ) case LLINESPACE_1: case LLINESPACE_15: case LLINESPACE_2: - aLineDistAtLabel.Enable(FALSE); - pActLineDistFld->Enable(FALSE); + aLineDistAtLabel.Enable(sal_False); + pActLineDistFld->Enable(sal_False); pActLineDistFld->SetText( String() ); break; @@ -844,7 +844,7 @@ IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox *, pBox ) } break; } - UpdateExample_Impl( TRUE ); + UpdateExample_Impl( sal_True ); return 0; } @@ -890,7 +890,7 @@ void SvxStdParagraphTabPage::Init_Impl() // ----------------------------------------------------------------------- -void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) +void SvxStdParagraphTabPage::UpdateExample_Impl( sal_Bool bAll ) { aExampleWin.SetFirstLineOfst( (short)aFLineIndent.Denormalize( aFLineIndent.GetValue( FUNIT_TWIP ) ) ); @@ -899,13 +899,13 @@ void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) aExampleWin.SetRightMargin( static_cast<long>(aRightIndent.Denormalize( aRightIndent.GetValue( FUNIT_TWIP ) ) ) ); aExampleWin.SetUpper( - (USHORT)aTopDist.Denormalize( aTopDist.GetValue( FUNIT_TWIP ) ) ); + (sal_uInt16)aTopDist.Denormalize( aTopDist.GetValue( FUNIT_TWIP ) ) ); aExampleWin.SetLower( - (USHORT)aBottomDist.Denormalize( aBottomDist.GetValue( FUNIT_TWIP ) ) ); + (sal_uInt16)aBottomDist.Denormalize( aBottomDist.GetValue( FUNIT_TWIP ) ) ); - USHORT nPos = aLineDist.GetSelectEntryPos(); + sal_uInt16 nPos = aLineDist.GetSelectEntryPos(); switch ( nPos ) { @@ -917,7 +917,7 @@ void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) case LLINESPACE_PROP: aExampleWin.SetLineSpace( (SvxPrevLineSpace)nPos, - (USHORT)aLineDistAtPercentBox.Denormalize( + (sal_uInt16)aLineDistAtPercentBox.Denormalize( aLineDistAtPercentBox.GetValue() ) ); break; @@ -925,7 +925,7 @@ void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) case LLINESPACE_DURCH: case LLINESPACE_FIX: aExampleWin.SetLineSpace( (SvxPrevLineSpace)nPos, - (USHORT)GetCoreValue( aLineDistAtMetricBox, SFX_MAPUNIT_TWIP ) ); + (sal_uInt16)GetCoreValue( aLineDistAtMetricBox, SFX_MAPUNIT_TWIP ) ); break; } aExampleWin.Draw( bAll ); @@ -944,7 +944,7 @@ void SvxStdParagraphTabPage::EnableRegisterMode() --------------------------------------------------*/ IMPL_LINK( SvxStdParagraphTabPage, AutoHdl_Impl, CheckBox*, pBox ) { - BOOL bEnable = !pBox->IsChecked(); + sal_Bool bEnable = !pBox->IsChecked(); aFLineLabel .Enable(bEnable); aFLineIndent.Enable(bEnable); return 0; @@ -953,7 +953,7 @@ IMPL_LINK( SvxStdParagraphTabPage, AutoHdl_Impl, CheckBox*, pBox ) /*-----------------16.01.97 18.00------------------- --------------------------------------------------*/ -void SvxStdParagraphTabPage::SetPageWidth( USHORT nPageWidth ) +void SvxStdParagraphTabPage::SetPageWidth( sal_uInt16 nPageWidth ) { nWidth = nPageWidth; } @@ -1049,7 +1049,7 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSe aTextDirectionLB ( this, CUI_RES( LB_TEXTDIRECTION )) { SvtLanguageOptions aLangOptions; - USHORT nLastLinePos = LASTLINEPOS_DEFAULT; + sal_uInt16 nLastLinePos = LASTLINEPOS_DEFAULT; if ( aLangOptions.IsAsianTypographyEnabled() ) { @@ -1079,7 +1079,7 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSe aLastLineLB.SetSelectHdl( LINK( this, SvxParaAlignTabPage, LastLineHdl_Impl ) ); aTextDirectionLB.SetSelectHdl( LINK( this, SvxParaAlignTabPage, TextDirectionHdl_Impl ) ); - USHORT nHtmlMode = GetHtmlMode_Impl(rSet); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl(rSet); if(!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES)) ) { if( aLangOptions.IsCTLFontEnabled() ) @@ -1123,7 +1123,7 @@ SfxTabPage* SvxParaAlignTabPage::Create( Window* pParent, const SfxItemSet& rSet /*-----------------16.01.97 19.33------------------- --------------------------------------------------*/ -USHORT* SvxParaAlignTabPage::GetRanges() +sal_uInt16* SvxParaAlignTabPage::GetRanges() { return pAlignRanges; @@ -1132,30 +1132,30 @@ USHORT* SvxParaAlignTabPage::GetRanges() /*-----------------16.01.97 19.33------------------- --------------------------------------------------*/ -BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) +sal_Bool SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; - FASTBOOL bAdj = FALSE, bChecked = FALSE; + FASTBOOL bAdj = sal_False, bChecked = sal_False; SvxAdjust eAdjust = SVX_ADJUST_LEFT; if ( aLeft.IsChecked() ) { eAdjust = SVX_ADJUST_LEFT; bAdj = !aLeft.GetSavedValue(); - bChecked = TRUE; + bChecked = sal_True; } else if ( aRight.IsChecked() ) { eAdjust = SVX_ADJUST_RIGHT; bAdj = !aRight.GetSavedValue(); - bChecked = TRUE; + bChecked = sal_True; } else if ( aCenter.IsChecked() ) { eAdjust = SVX_ADJUST_CENTER; bAdj = !aCenter.GetSavedValue(); - bChecked = TRUE; + bChecked = sal_True; } else if ( aJustify.IsChecked() ) { @@ -1163,9 +1163,9 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) bAdj = !aJustify.GetSavedValue() || aExpandCB.IsChecked() != aExpandCB.GetSavedValue() || aLastLineLB.GetSelectEntryPos() != aLastLineLB.GetSavedValue(); - bChecked = TRUE; + bChecked = sal_True; } - USHORT _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); if ( bAdj ) { @@ -1173,7 +1173,7 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) (const SvxAdjustItem*)GetOldItem( rOutSet, SID_ATTR_PARA_ADJUST ); SvxAdjust eOneWord = aExpandCB.IsChecked() ? SVX_ADJUST_BLOCK : SVX_ADJUST_LEFT; - USHORT nLBPos = aLastLineLB.GetSelectEntryPos(); + sal_uInt16 nLBPos = aLastLineLB.GetSelectEntryPos(); SvxAdjust eLastBlock = SVX_ADJUST_LEFT; if ( 1 == nLBPos ) @@ -1190,7 +1190,7 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) pOld->GetLastBlock() != eLastBlock || ( bChecked && bNothingWasChecked ) ) { - bModified |= TRUE; + bModified |= sal_True; SvxAdjustItem aAdj( (const SvxAdjustItem&)GetItemSet().Get( _nWhich ) ); aAdj.SetAdjust( eAdjust ); @@ -1202,12 +1202,12 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) if(aSnapToGridCB.IsChecked() != aSnapToGridCB.GetSavedValue()) { rOutSet.Put(SvxParaGridItem(aSnapToGridCB.IsChecked(), GetWhich( SID_ATTR_PARA_SNAPTOGRID ))); - bModified = TRUE; + bModified = sal_True; } if(aVertAlignLB.GetSavedValue() != aVertAlignLB.GetSelectEntryPos()) { rOutSet.Put(SvxParaVertAlignItem(aVertAlignLB.GetSelectEntryPos(), GetWhich( SID_PARA_VERTALIGN ))); - bModified = TRUE; + bModified = sal_True; } if( aTextDirectionLB.IsVisible() ) @@ -1216,7 +1216,7 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) if( eDir != aTextDirectionLB.GetSavedValue() ) { rOutSet.Put( SvxFrameDirectionItem( eDir, GetWhich( SID_ATTR_FRAMEDIRECTION ) ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -1228,10 +1228,10 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) --------------------------------------------------*/ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) { - USHORT _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); SfxItemState eItemState = rSet.GetItemState( _nWhich ); - USHORT nLBSelect = 0; + sal_uInt16 nLBSelect = 0; if ( eItemState >= SFX_ITEM_AVAILABLE ) { const SvxAdjustItem& rAdj = (const SvxAdjustItem&)rSet.Get( _nWhich ); @@ -1247,7 +1247,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) case SVX_ADJUST_BLOCK: aJustify.Check(); break; default: ; //prevent warning } - BOOL bEnable = aJustify.IsChecked(); + sal_Bool bEnable = aJustify.IsChecked(); aLastLineFT.Enable(bEnable); aLastLineLB.Enable(bEnable); aExpandCB .Enable(bEnable); @@ -1265,14 +1265,14 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) } else { - aLeft.Check( FALSE ); - aRight.Check( FALSE ); - aCenter.Check( FALSE ); - aJustify.Check( FALSE ); + aLeft.Check( sal_False ); + aRight.Check( sal_False ); + aCenter.Check( sal_False ); + aJustify.Check( sal_False ); } aLastLineLB.SelectEntryPos(nLBSelect); - USHORT nHtmlMode = GetHtmlMode_Impl(rSet); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl(rSet); if(nHtmlMode & HTMLMODE_ON) { aLastLineLB.Hide(); @@ -1280,7 +1280,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) aExpandCB.Hide(); if(!(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE)) ) aJustify.Disable(); - aSnapToGridCB.Show(FALSE); + aSnapToGridCB.Show(sal_False); } _nWhich = GetWhich(SID_ATTR_PARA_SNAPTOGRID); eItemState = rSet.GetItemState( _nWhich ); @@ -1321,7 +1321,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) aLastLineLB.SaveValue(); aExpandCB.SaveValue(); - UpdateExample_Impl(TRUE); + UpdateExample_Impl(sal_True); } /*-----------------17.01.97 08.06------------------- @@ -1329,17 +1329,17 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) --------------------------------------------------*/ IMPL_LINK( SvxParaAlignTabPage, AlignHdl_Impl, RadioButton*, EMPTYARG ) { - BOOL bJustify = aJustify.IsChecked(); + sal_Bool bJustify = aJustify.IsChecked(); aLastLineFT.Enable(bJustify); aLastLineLB.Enable(bJustify); aExpandCB.Enable(bJustify); - UpdateExample_Impl(FALSE); + UpdateExample_Impl(sal_False); return 0; } IMPL_LINK( SvxParaAlignTabPage, LastLineHdl_Impl, ListBox*, EMPTYARG ) { - UpdateExample_Impl(FALSE); + UpdateExample_Impl(sal_False); return 0; } @@ -1349,8 +1349,8 @@ IMPL_LINK( SvxParaAlignTabPage, TextDirectionHdl_Impl, ListBox*, EMPTYARG ) switch ( eDir ) { // check the default alignment for this text direction - case FRMDIR_HORI_LEFT_TOP : aLeft.Check( TRUE ); break; - case FRMDIR_HORI_RIGHT_TOP : aRight.Check( TRUE ); break; + case FRMDIR_HORI_LEFT_TOP : aLeft.Check( sal_True ); break; + case FRMDIR_HORI_RIGHT_TOP : aRight.Check( sal_True ); break; case FRMDIR_ENVIRONMENT : /* do nothing */ break; default: { @@ -1364,7 +1364,7 @@ IMPL_LINK( SvxParaAlignTabPage, TextDirectionHdl_Impl, ListBox*, EMPTYARG ) /*-----------------16.01.97 19.34------------------- --------------------------------------------------*/ -void SvxParaAlignTabPage::UpdateExample_Impl( BOOL bAll ) +void SvxParaAlignTabPage::UpdateExample_Impl( sal_Bool bAll ) { if ( aLeft.IsChecked() ) aExampleWin.SetAdjust( SVX_ADJUST_LEFT ); @@ -1376,7 +1376,7 @@ void SvxParaAlignTabPage::UpdateExample_Impl( BOOL bAll ) { aExampleWin.SetAdjust( SVX_ADJUST_BLOCK ); SvxAdjust eLastBlock = SVX_ADJUST_LEFT; - USHORT nLBPos = aLastLineLB.GetSelectEntryPos(); + sal_uInt16 nLBPos = aLastLineLB.GetSelectEntryPos(); if(nLBPos == 1) eLastBlock = SVX_ADJUST_CENTER; else if(nLBPos == 2) @@ -1418,10 +1418,10 @@ SfxTabPage* SvxExtParagraphTabPage::Create( Window* pParent, // ----------------------------------------------------------------------- -BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) +sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { - BOOL bModified = FALSE; - USHORT _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); + sal_Bool bModified = sal_False; + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); const TriState eHyphenState = aHyphenBox.GetState(); const SfxPoolItem* pOld = GetOldItem( rOutSet, SID_ATTR_PARA_HYPHENZONE ); @@ -1436,38 +1436,38 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( eHyphenState == STATE_CHECK ) { - aHyphen.GetMinLead() = (BYTE)aExtHyphenBeforeBox.GetValue(); - aHyphen.GetMinTrail() = (BYTE)aExtHyphenAfterBox.GetValue(); + aHyphen.GetMinLead() = (sal_uInt8)aExtHyphenBeforeBox.GetValue(); + aHyphen.GetMinTrail() = (sal_uInt8)aExtHyphenAfterBox.GetValue(); } - aHyphen.GetMaxHyphens() = (BYTE)aMaxHyphenEdit.GetValue(); + aHyphen.GetMaxHyphens() = (sal_uInt8)aMaxHyphenEdit.GetValue(); if ( !pOld || !( *(SvxHyphenZoneItem*)pOld == aHyphen ) || eHyphenState != aHyphenBox.GetSavedValue()) { rOutSet.Put( aHyphen ); - bModified |= TRUE; + bModified |= sal_True; } } if (aPagenumEdit.IsEnabled() && aPagenumEdit.IsValueModified()) { SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, - (USHORT)aPagenumEdit.GetValue() ); + (sal_uInt16)aPagenumEdit.GetValue() ); pOld = GetOldItem( rOutSet, SID_ATTR_PARA_PAGENUM ); if ( !pOld || ( (const SfxUInt16Item*)pOld )->GetValue() != aPageNum.GetValue() ) { rOutSet.Put( aPageNum ); - bModified |= TRUE; + bModified |= sal_True; } } // Seitenumbruch TriState eState = aApplyCollBtn.GetState(); - FASTBOOL bIsPageModel = FALSE; + FASTBOOL bIsPageModel = sal_False; _nWhich = GetWhich( SID_ATTR_PARA_MODEL ); String sPage; @@ -1484,16 +1484,16 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( !pOld || ( (const SvxPageModelItem*)pOld )->GetValue() != sPage ) { - rOutSet.Put( SvxPageModelItem( sPage, FALSE, _nWhich ) ); - bModified |= TRUE; + rOutSet.Put( SvxPageModelItem( sPage, sal_False, _nWhich ) ); + bModified |= sal_True; } else - bIsPageModel = FALSE; + bIsPageModel = sal_False; } else if(STATE_CHECK == eState && aApplyCollBtn.IsEnabled()) - bIsPageModel = TRUE; + bIsPageModel = sal_True; else - rOutSet.Put( SvxPageModelItem( sPage, FALSE, _nWhich ) ); + rOutSet.Put( SvxPageModelItem( sPage, sal_False, _nWhich ) ); _nWhich = GetWhich( SID_ATTR_PARA_PAGEBREAK ); @@ -1503,7 +1503,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) else { eState = aPageBreakBox.GetState(); - SfxItemState eModelState = GetItemSet().GetItemState(SID_ATTR_PARA_MODEL, FALSE); + SfxItemState eModelState = GetItemSet().GetItemState(SID_ATTR_PARA_MODEL, sal_False); if ( (eModelState == SFX_ITEM_SET && STATE_CHECK == aPageBreakBox.GetState()) || eState != aPageBreakBox.GetSavedValue() || @@ -1518,7 +1518,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { case STATE_CHECK: { - BOOL bBefore = aBreakPositionLB.GetSelectEntryPos() == 0; + sal_Bool bBefore = aBreakPositionLB.GetSelectEntryPos() == 0; if ( aBreakTypeLB.GetSelectEntryPos() == 0 ) { @@ -1547,7 +1547,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( eState != aPageBreakBox.GetSavedValue() || !pOld || !( *(const SvxFmtBreakItem*)pOld == aBreak ) ) { - bModified |= TRUE; + bModified |= sal_True; rOutSet.Put( aBreak ); } } @@ -1566,7 +1566,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) ( eState == STATE_NOCHECK ) ) { rOutSet.Put( SvxFmtSplitItem( eState == STATE_NOCHECK, _nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -1580,7 +1580,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) // hat sich der Status geaendert, muss immer geputtet werden rOutSet.Put( SvxFmtKeepItem( eState == STATE_CHECK, _nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } // Witwen und Waisen @@ -1591,13 +1591,13 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) aWidowRowNo.IsValueModified() ) { SvxWidowsItem rItem( eState == STATE_CHECK ? - (BYTE)aWidowRowNo.GetValue() : 0, _nWhich ); + (sal_uInt8)aWidowRowNo.GetValue() : 0, _nWhich ); pOld = GetOldItem( rOutSet, SID_ATTR_PARA_WIDOWS ); if ( eState != aWidowBox.GetSavedValue() || !pOld || !( *(const SvxWidowsItem*)pOld == rItem ) ) { rOutSet.Put( rItem ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -1608,7 +1608,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) aOrphanRowNo.IsValueModified() ) { SvxOrphansItem rItem( eState == STATE_CHECK ? - (BYTE)aOrphanRowNo.GetValue() : 0, _nWhich ); + (sal_uInt8)aOrphanRowNo.GetValue() : 0, _nWhich ); pOld = GetOldItem( rOutSet, SID_ATTR_PARA_ORPHANS ); if ( eState != aOrphanBox.GetSavedValue() || @@ -1616,7 +1616,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) !( *(const SvxOrphansItem*)pOld == rItem ) ) { rOutSet.Put( rItem ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -1627,16 +1627,16 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { - USHORT _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); SfxItemState eItemState = rSet.GetItemState( _nWhich ); - BOOL bItemAvailable = eItemState >= SFX_ITEM_AVAILABLE; - BOOL bIsHyphen = FALSE; + sal_Bool bItemAvailable = eItemState >= SFX_ITEM_AVAILABLE; + sal_Bool bIsHyphen = sal_False; if( !bHtmlMode && bItemAvailable ) { const SvxHyphenZoneItem& rHyphen = (const SvxHyphenZoneItem&)rSet.Get( _nWhich ); - aHyphenBox.EnableTriState( FALSE ); + aHyphenBox.EnableTriState( sal_False ); bIsHyphen = rHyphen.IsHyphen(); aHyphenBox.SetState( bIsHyphen ? STATE_CHECK : STATE_NOCHECK ); @@ -1649,7 +1649,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { aHyphenBox.SetState( STATE_DONTKNOW ); } - BOOL bEnable = bItemAvailable && bIsHyphen; + sal_Bool bEnable = bItemAvailable && bIsHyphen; aExtHyphenBeforeBox.Enable(bEnable); aExtHyphenAfterBox.Enable(bEnable); aBeforeText.Enable(bEnable); @@ -1661,7 +1661,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rSet.GetItemState(_nWhich) >= SFX_ITEM_AVAILABLE ) { - const USHORT nPageNum = + const sal_uInt16 nPageNum = ( (const SfxUInt16Item&)rSet.Get( _nWhich ) ).GetValue(); aPagenumEdit.SetValue( nPageNum ); } @@ -1670,12 +1670,12 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { // zuerst PageModel behandeln _nWhich = GetWhich( SID_ATTR_PARA_MODEL ); - BOOL bIsPageModel = FALSE; + sal_Bool bIsPageModel = sal_False; eItemState = rSet.GetItemState( _nWhich ); if ( eItemState >= SFX_ITEM_SET ) { - aApplyCollBtn.EnableTriState( FALSE ); + aApplyCollBtn.EnableTriState( sal_False ); const SvxPageModelItem& rModel = (const SvxPageModelItem&)rSet.Get( _nWhich ); @@ -1686,10 +1686,10 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { aApplyCollBox.SelectEntry( aStr ); aApplyCollBtn.SetState( STATE_CHECK ); - bIsPageModel = TRUE; + bIsPageModel = sal_True; aPageBreakBox.Enable(); - aPageBreakBox.EnableTriState( FALSE ); + aPageBreakBox.EnableTriState( sal_False ); aBreakTypeFT.Enable(); aBreakTypeLB.Enable(); aBreakPositionFT.Enable(); @@ -1710,16 +1710,16 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) } else if ( SFX_ITEM_DONTCARE == eItemState ) { - aApplyCollBtn.EnableTriState( TRUE ); + aApplyCollBtn.EnableTriState( sal_True ); aApplyCollBtn.SetState( STATE_DONTKNOW ); aApplyCollBox.SetNoSelection(); } else { - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumEdit.Enable(FALSE); - aPagenumText.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumEdit.Enable(sal_False); + aPagenumText.Enable(sal_False); } //!!! ApplyCollClickHdl_Impl( &aApplyCollBtn ); @@ -1738,7 +1738,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) // PageBreak nicht ueber CTRL-RETURN, // dann kann CheckBox frei gegeben werden aPageBreakBox.Enable(); - aPageBreakBox.EnableTriState( FALSE ); + aPageBreakBox.EnableTriState( sal_False ); aBreakTypeFT.Enable(); aBreakTypeLB.Enable(); aBreakPositionFT.Enable(); @@ -1746,7 +1746,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) aPageBreakBox.SetState( STATE_CHECK ); - BOOL _bEnable = eBreak != SVX_BREAK_NONE && + sal_Bool _bEnable = eBreak != SVX_BREAK_NONE && eBreak != SVX_BREAK_COLUMN_BEFORE && eBreak != SVX_BREAK_COLUMN_AFTER; aApplyCollBtn.Enable(_bEnable); @@ -1759,8 +1759,8 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eBreak == SVX_BREAK_NONE ) aPageBreakBox.SetState( STATE_NOCHECK ); - USHORT nType = 0; // selection position in break type ListBox : Page - USHORT nPosition = 0; // selection position in break position ListBox : Before + sal_uInt16 nType = 0; // selection position in break type ListBox : Page + sal_uInt16 nPosition = 0; // selection position in break position ListBox : Before switch ( eBreak ) { case SVX_BREAK_PAGE_BEFORE: @@ -1784,11 +1784,11 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) aPageBreakBox.SetState( STATE_DONTKNOW ); else { - aPageBreakBox.Enable(FALSE); - aBreakTypeFT.Enable(FALSE); - aBreakTypeLB.Enable(FALSE); - aBreakPositionFT.Enable(FALSE); - aBreakPositionLB.Enable(FALSE); + aPageBreakBox.Enable(sal_False); + aBreakTypeFT.Enable(sal_False); + aBreakTypeLB.Enable(sal_False); + aBreakPositionFT.Enable(sal_False); + aBreakPositionLB.Enable(sal_False); } } @@ -1801,7 +1801,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eItemState >= SFX_ITEM_AVAILABLE ) { - aKeepParaBox.EnableTriState( FALSE ); + aKeepParaBox.EnableTriState( sal_False ); const SvxFmtKeepItem& rKeep = (const SvxFmtKeepItem&)rSet.Get( _nWhich ); @@ -1813,7 +1813,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) else if ( SFX_ITEM_DONTCARE == eItemState ) aKeepParaBox.SetState( STATE_DONTKNOW ); else - aKeepParaBox.Enable(FALSE); + aKeepParaBox.Enable(sal_False); _nWhich = GetWhich( SID_ATTR_PARA_SPLIT ); eItemState = rSet.GetItemState( _nWhich ); @@ -1822,7 +1822,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxFmtSplitItem& rSplit = (const SvxFmtSplitItem&)rSet.Get( _nWhich ); - aKeepTogetherBox.EnableTriState( FALSE ); + aKeepTogetherBox.EnableTriState( sal_False ); if ( !rSplit.GetValue() ) aKeepTogetherBox.SetState( STATE_CHECK ); @@ -1839,10 +1839,10 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxWidowsItem& rWidow = (const SvxWidowsItem&)rSet.Get( _nWhich ); - aWidowBox.EnableTriState( FALSE ); - const USHORT nLines = rWidow.GetValue(); + aWidowBox.EnableTriState( sal_False ); + const sal_uInt16 nLines = rWidow.GetValue(); - BOOL _bEnable = nLines > 0; + sal_Bool _bEnable = nLines > 0; aWidowRowNo.SetValue( aWidowRowNo.Normalize( nLines ) ); aWidowBox.SetState( _bEnable ? STATE_CHECK : STATE_NOCHECK); aWidowRowNo.Enable(_bEnable); @@ -1852,7 +1852,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) else if ( SFX_ITEM_DONTCARE == eTmpState ) aWidowBox.SetState( STATE_DONTKNOW ); else - aWidowBox.Enable(FALSE); + aWidowBox.Enable(sal_False); aOrphanBox.Enable(); _nWhich = GetWhich( SID_ATTR_PARA_ORPHANS ); @@ -1862,10 +1862,10 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxOrphansItem& rOrphan = (const SvxOrphansItem&)rSet.Get( _nWhich ); - const USHORT nLines = rOrphan.GetValue(); - aOrphanBox.EnableTriState( FALSE ); + const sal_uInt16 nLines = rOrphan.GetValue(); + aOrphanBox.EnableTriState( sal_False ); - BOOL _bEnable = nLines > 0; + sal_Bool _bEnable = nLines > 0; aOrphanBox.SetState( _bEnable ? STATE_CHECK : STATE_NOCHECK); aOrphanRowNo.SetValue( aOrphanRowNo.Normalize( nLines ) ); aOrphanRowNo.Enable(_bEnable); @@ -1875,13 +1875,13 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) else if ( SFX_ITEM_DONTCARE == eTmpState ) aOrphanBox.SetState( STATE_DONTKNOW ); else - aOrphanBox.Enable(FALSE); + aOrphanBox.Enable(sal_False); } } else if ( SFX_ITEM_DONTCARE == eItemState ) aKeepTogetherBox.SetState( STATE_DONTKNOW ); else - aKeepTogetherBox.Enable(FALSE); + aKeepTogetherBox.Enable(sal_False); // damit alles richt enabled wird KeepTogetherHdl_Impl( 0 ); @@ -1917,14 +1917,14 @@ int SvxExtParagraphTabPage::DeactivatePage( SfxItemSet* _pSet ) void SvxExtParagraphTabPage::DisablePageBreak() { - bPageBreak = FALSE; - aPageBreakBox.Enable(FALSE); + bPageBreak = sal_False; + aPageBreakBox.Enable(sal_False); aBreakTypeLB.RemoveEntry(0); - aBreakPositionFT.Enable(FALSE); - aBreakPositionLB.Enable(FALSE); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumEdit.Enable(FALSE); + aBreakPositionFT.Enable(sal_False); + aBreakPositionLB.Enable(sal_False); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumEdit.Enable(sal_False); } // ----------------------------------------------------------------------- @@ -1964,8 +1964,8 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe aWidowBox ( this, CUI_RES( BTN_WIDOWS ) ), aWidowRowNo ( this, CUI_RES( ED_WIDOWS ) ), aWidowRowLabel ( this, CUI_RES( FT_WIDOWS ) ), - bPageBreak ( TRUE ), - bHtmlMode ( FALSE ), + bPageBreak ( sal_True ), + bHtmlMode ( sal_False ), nStdPos ( 0 ) { FreeResource(); @@ -2001,20 +2001,20 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe nStdPos = aApplyCollBox.GetEntryPos( aStdName ); } - USHORT nHtmlMode = GetHtmlMode_Impl( rAttr ); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl( rAttr ); if ( nHtmlMode & HTMLMODE_ON ) { - bHtmlMode = TRUE; - aHyphenBox .Enable(FALSE); - aBeforeText .Enable(FALSE); - aExtHyphenBeforeBox .Enable(FALSE); - aAfterText .Enable(FALSE); - aExtHyphenAfterBox .Enable(FALSE); - aMaxHyphenLabel .Enable(FALSE); - aMaxHyphenEdit .Enable(FALSE); - aExtFL .Enable(FALSE); - aPagenumText .Enable(FALSE); - aPagenumEdit .Enable(FALSE); + bHtmlMode = sal_True; + aHyphenBox .Enable(sal_False); + aBeforeText .Enable(sal_False); + aExtHyphenBeforeBox .Enable(sal_False); + aAfterText .Enable(sal_False); + aExtHyphenAfterBox .Enable(sal_False); + aMaxHyphenLabel .Enable(sal_False); + aMaxHyphenEdit .Enable(sal_False); + aExtFL .Enable(sal_False); + aPagenumText .Enable(sal_False); + aPagenumEdit .Enable(sal_False); // no column break in HTML aBreakTypeLB.RemoveEntry(1); } @@ -2028,7 +2028,7 @@ __EXPORT SvxExtParagraphTabPage::~SvxExtParagraphTabPage() // ----------------------------------------------------------------------- -USHORT* SvxExtParagraphTabPage::GetRanges() +sal_uInt16* SvxExtParagraphTabPage::GetRanges() { return pExtRanges; } @@ -2050,7 +2050,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakHdl_Impl, TriStateBox *, EMPTYARG ) { aApplyCollBtn.Enable(); - BOOL bEnable = STATE_CHECK == aApplyCollBtn.GetState() && + sal_Bool bEnable = STATE_CHECK == aApplyCollBtn.GetState() && aApplyCollBox.GetEntryCount(); aApplyCollBox.Enable(bEnable); if(!bHtmlMode) @@ -2064,14 +2064,14 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakHdl_Impl, TriStateBox *, EMPTYARG ) case STATE_NOCHECK: case STATE_DONTKNOW: aApplyCollBtn.SetState( STATE_NOCHECK ); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumText.Enable(FALSE); - aPagenumEdit.Enable(FALSE); - aBreakTypeFT.Enable(FALSE); - aBreakTypeLB.Enable(FALSE); - aBreakPositionFT.Enable(FALSE); - aBreakPositionLB.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumText.Enable(sal_False); + aPagenumEdit.Enable(sal_False); + aBreakTypeFT.Enable(sal_False); + aBreakTypeLB.Enable(sal_False); + aBreakPositionFT.Enable(sal_False); + aBreakPositionLB.Enable(sal_False); break; } return 0; @@ -2081,7 +2081,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakHdl_Impl, TriStateBox *, EMPTYARG ) IMPL_LINK( SvxExtParagraphTabPage, KeepTogetherHdl_Impl, TriStateBox *, EMPTYARG ) { - BOOL bEnable = aKeepTogetherBox.GetState() == STATE_NOCHECK; + sal_Bool bEnable = aKeepTogetherBox.GetState() == STATE_NOCHECK; aWidowBox.Enable(bEnable); aOrphanBox.Enable(bEnable); @@ -2097,7 +2097,7 @@ IMPL_LINK( SvxExtParagraphTabPage, WidowHdl_Impl, TriStateBox *, EMPTYARG ) case STATE_CHECK: aWidowRowNo.Enable(); aWidowRowLabel.Enable(); - aKeepTogetherBox.Enable(FALSE); + aKeepTogetherBox.Enable(sal_False); break; case STATE_NOCHECK: @@ -2106,8 +2106,8 @@ IMPL_LINK( SvxExtParagraphTabPage, WidowHdl_Impl, TriStateBox *, EMPTYARG ) // kein break case STATE_DONTKNOW: - aWidowRowNo.Enable(FALSE); - aWidowRowLabel.Enable(FALSE); + aWidowRowNo.Enable(sal_False); + aWidowRowLabel.Enable(sal_False); break; } return 0; @@ -2122,7 +2122,7 @@ IMPL_LINK( SvxExtParagraphTabPage, OrphanHdl_Impl, TriStateBox *, EMPTYARG ) case STATE_CHECK: aOrphanRowNo.Enable(); aOrphanRowLabel.Enable(); - aKeepTogetherBox.Enable(FALSE); + aKeepTogetherBox.Enable(sal_False); break; case STATE_NOCHECK: @@ -2131,8 +2131,8 @@ IMPL_LINK( SvxExtParagraphTabPage, OrphanHdl_Impl, TriStateBox *, EMPTYARG ) // kein break case STATE_DONTKNOW: - aOrphanRowNo.Enable(FALSE); - aOrphanRowLabel.Enable(FALSE); + aOrphanRowNo.Enable(sal_False); + aOrphanRowLabel.Enable(sal_False); break; } return 0; @@ -2143,7 +2143,7 @@ IMPL_LINK( SvxExtParagraphTabPage, OrphanHdl_Impl, TriStateBox *, EMPTYARG ) IMPL_LINK( SvxExtParagraphTabPage, HyphenClickHdl_Impl, TriStateBox *, EMPTYARG ) { - BOOL bEnable = aHyphenBox.GetState() == STATE_CHECK; + sal_Bool bEnable = aHyphenBox.GetState() == STATE_CHECK; aBeforeText.Enable(bEnable); aExtHyphenBeforeBox.Enable(bEnable); aAfterText.Enable(bEnable); @@ -2159,11 +2159,11 @@ IMPL_LINK( SvxExtParagraphTabPage, HyphenClickHdl_Impl, TriStateBox *, EMPTYARG IMPL_LINK( SvxExtParagraphTabPage, ApplyCollClickHdl_Impl, TriStateBox *, EMPTYARG ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if ( aApplyCollBtn.GetState() == STATE_CHECK && aApplyCollBox.GetEntryCount() ) { - bEnable = TRUE; + bEnable = sal_True; aApplyCollBox.SelectEntryPos( nStdPos ); } else @@ -2187,7 +2187,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox ) { aApplyCollBtn.Enable(); - BOOL bEnable = aApplyCollBtn.GetState() == STATE_CHECK && + sal_Bool bEnable = aApplyCollBtn.GetState() == STATE_CHECK && aApplyCollBox.GetEntryCount(); aApplyCollBox.Enable(bEnable); @@ -2200,10 +2200,10 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox ) else if ( 1 == pListBox->GetSelectEntryPos() ) { aApplyCollBtn.SetState( STATE_NOCHECK ); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumText.Enable(FALSE); - aPagenumEdit.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumText.Enable(sal_False); + aPagenumEdit.Enable(sal_False); } return 0; } @@ -2213,14 +2213,14 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox ) IMPL_LINK( SvxExtParagraphTabPage, PageBreakTypeHdl_Impl, ListBox *, pListBox ) { //column break or break break after - USHORT nBreakPos = aBreakPositionLB.GetSelectEntryPos(); + sal_uInt16 nBreakPos = aBreakPositionLB.GetSelectEntryPos(); if ( pListBox->GetSelectEntryPos() == 1 || 1 == nBreakPos) { aApplyCollBtn.SetState( STATE_NOCHECK ); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumText.Enable(FALSE); - aPagenumEdit.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumText.Enable(sal_False); + aPagenumEdit.Enable(sal_False); } else PageBreakPosHdl_Impl( &aBreakPositionLB ); @@ -2275,9 +2275,9 @@ SfxTabPage* SvxAsianTabPage::Create( Window* pParent, const SfxItemSet& rSet /*-- 29.11.00 11:36:24--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT* SvxAsianTabPage::GetRanges() +sal_uInt16* SvxAsianTabPage::GetRanges() { - static USHORT pRanges[] = + static sal_uInt16 pRanges[] = { SID_ATTR_PARA_SCRIPTSPACE, SID_ATTR_PARA_FORBIDDEN_RULES, 0 @@ -2287,9 +2287,9 @@ USHORT* SvxAsianTabPage::GetRanges() /*-- 29.11.00 11:36:24--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SfxItemPool* pPool = rSet.GetPool(); if(aScriptSpaceCB.IsChecked() != aScriptSpaceCB.GetSavedValue()) { @@ -2298,7 +2298,7 @@ BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) pNewItem->SetValue(aScriptSpaceCB.IsChecked()); rSet.Put(*pNewItem); delete pNewItem; - bRet = TRUE; + bRet = sal_True; } if(aHangingPunctCB.IsChecked() != aHangingPunctCB.GetSavedValue()) { @@ -2307,7 +2307,7 @@ BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) pNewItem->SetValue(aHangingPunctCB.IsChecked()); rSet.Put(*pNewItem); delete pNewItem; - bRet = TRUE; + bRet = sal_True; } if(aForbiddenRulesCB.IsChecked() != aForbiddenRulesCB.GetSavedValue()) { @@ -2316,22 +2316,22 @@ BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) pNewItem->SetValue(aForbiddenRulesCB.IsChecked()); rSet.Put(*pNewItem); delete pNewItem; - bRet = TRUE; + bRet = sal_True; } return bRet; } /*-- 29.11.00 11:36:25--------------------------------------------------- -----------------------------------------------------------------------*/ -void lcl_SetBox(const SfxItemSet& rSet, USHORT nSlotId, TriStateBox& rBox) +void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, TriStateBox& rBox) { - USHORT _nWhich = rSet.GetPool()->GetWhich(nSlotId); - SfxItemState eState = rSet.GetItemState(_nWhich, TRUE); + sal_uInt16 _nWhich = rSet.GetPool()->GetWhich(nSlotId); + SfxItemState eState = rSet.GetItemState(_nWhich, sal_True); if(!eState || eState == SFX_ITEM_DISABLED ) - rBox.Enable(FALSE); + rBox.Enable(sal_False); else if(eState >= SFX_ITEM_AVAILABLE) { - rBox.EnableTriState( FALSE ); + rBox.EnableTriState( sal_False ); rBox.Check(((const SfxBoolItem&)rSet.Get(_nWhich)).GetValue()); } else @@ -2351,15 +2351,15 @@ void SvxAsianTabPage::Reset( const SfxItemSet& rSet ) // lcl_SetBox(rSet, , aPuntuationCB ); lcl_SetBox(rSet, SID_ATTR_PARA_SCRIPTSPACE, aScriptSpaceCB ); // lcl_SetBox(rSet, , aAdjustNumbersCB ); -// aAllowWordBreakCB .Enable(FALSE); -// aPuntuationCB .Enable(FALSE); -// aAdjustNumbersCB .Enable(FALSE); +// aAllowWordBreakCB .Enable(sal_False); +// aPuntuationCB .Enable(sal_False); +// aAdjustNumbersCB .Enable(sal_False); } /* -----------------------------19.12.00 12:59-------------------------------- ---------------------------------------------------------------------------*/ IMPL_LINK( SvxAsianTabPage, ClickHdl_Impl, TriStateBox*, pBox ) { - pBox->EnableTriState( FALSE ); + pBox->EnableTriState( sal_False ); return 0; } diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index a498a439c524..d231e3249cb4 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -56,14 +56,14 @@ struct FrmMap SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; short nAlign; - ULONG nLBRelations; + sal_uLong nLBRelations; }; struct RelationMap { SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; - ULONG nLBRelation; + sal_uLong nLBRelation; short nRelation; }; struct StringIdPair_Impl @@ -425,7 +425,7 @@ std::size_t lcl_GetFrmMapCount(const FrmMap* pMap) -----------------------------------------------------------------------*/ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( - SvxSwFramePosString::StringId eStringId, BOOL bVertical, BOOL bRTL) + SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bRTL) { //special handling of STR_FROMLEFT if(SwFPos::FROMLEFT == eStringId) @@ -460,7 +460,7 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT }, {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT } }; - USHORT nIndex; + sal_uInt16 nIndex; for(nIndex = 0; nIndex < sizeof(aHoriIds) / sizeof(StringIdPair_Impl); ++nIndex) { if(aHoriIds[nIndex].eHori == eStringId) @@ -483,9 +483,9 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( } // OD 12.11.2003 #i22341# - helper method in order to determine all possible // listbox relations in a relation map for a given relation -ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) +sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel ) { - ULONG nLBRelations = 0L; + sal_uLong nLBRelations = 0L; sal_uInt16 nRelMapSize = sizeof(aRelationMap) / sizeof(RelationMap); for ( sal_uInt16 nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos ) @@ -501,11 +501,11 @@ ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) // OD 14.11.2003 #i22341# - helper method on order to determine all possible // listbox relations in a relation map for a given string ID -ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap, +sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap, const SvxSwFramePosString::StringId _eStrId, const bool _bUseMirrorStr ) { - ULONG nLBRelations = 0L; + sal_uLong nLBRelations = 0L; std::size_t nRelMapSize = lcl_GetFrmMapCount( _pMap ); for ( std::size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos ) @@ -587,10 +587,10 @@ SvxSwPosSizeTabPage::SvxSwPosSizeTabPage( Window* pParent, const SfxItemSet& rIn { FreeResource(); FieldUnit eDlgUnit = GetModuleFieldUnit( rInAttrs ); - SetFieldUnit( m_aHoriByMF, eDlgUnit, TRUE ); - SetFieldUnit( m_aVertByMF, eDlgUnit, TRUE ); - SetFieldUnit( m_aWidthMF , eDlgUnit, TRUE ); - SetFieldUnit( m_aHeightMF, eDlgUnit, TRUE ); + SetFieldUnit( m_aHoriByMF, eDlgUnit, sal_True ); + SetFieldUnit( m_aVertByMF, eDlgUnit, sal_True ); + SetFieldUnit( m_aWidthMF , eDlgUnit, sal_True ); + SetFieldUnit( m_aHeightMF, eDlgUnit, sal_True ); SetExchangeSupport(); @@ -639,9 +639,9 @@ SfxTabPage* SvxSwPosSizeTabPage::Create( Window* pParent, const SfxItemSet& rSet /*-- 05.03.2004 17:27:42--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT* SvxSwPosSizeTabPage::GetRanges() +sal_uInt16* SvxSwPosSizeTabPage::GetRanges() { - static USHORT pSwPosRanges[] = + static sal_uInt16 pSwPosRanges[] = { SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y, @@ -670,15 +670,15 @@ USHORT* SvxSwPosSizeTabPage::GetRanges() /*-- 03.03.2004 12:21:34--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) +sal_Bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) { bool bAnchorChanged = false; short nAnchor = GetAnchorType(&bAnchorChanged); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if(bAnchorChanged) { rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); - bModified |= TRUE; + bModified |= sal_True; } if ( m_aPositionCB.GetState() != m_aPositionCB.GetSavedValue() ) { @@ -687,8 +687,8 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) else rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ), - m_aPositionCB.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + m_aPositionCB.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } if ( m_aSizeCB.GetState() != m_aSizeCB.GetSavedValue() ) @@ -698,8 +698,8 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) else rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ), - m_aSizeCB.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + m_aSizeCB.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } const SfxItemSet& rOldSet = GetItemSet(); @@ -726,7 +726,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_POS_X ), nHoriByPos ) ); rSet.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_POS_Y ), nVertByPos ) ); - bModified |= TRUE; + bModified |= sal_True; } } else @@ -740,7 +740,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) const SfxInt32Item& rHoriPosition = static_cast<const SfxInt32Item&>(rOldSet.Get( SID_ATTR_TRANSFORM_HORI_POSITION)) ; - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriLB); short nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); short nRel = GetRelation(m_pHMap, m_aHoriToLB); const long nHoriByPos = @@ -755,7 +755,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_HORI_RELATION, nRel)); if(m_aHoriByMF.IsEnabled()) rSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_HORI_POSITION, nHoriByPos)); - bModified |= TRUE; + bModified |= sal_True; } } if(m_aHoriMirrorCB.IsEnabled() && m_aHoriMirrorCB.IsChecked() != m_aHoriMirrorCB.GetSavedValue()) @@ -770,7 +770,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) const SfxInt32Item& rVertPosition = static_cast<const SfxInt32Item&>(rOldSet.Get( SID_ATTR_TRANSFORM_VERT_POSITION)); - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); short nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); short nRel = GetRelation(m_pVMap, m_aVertToLB); // --> OD 2004-10-21 #i34055# - convert vertical position for @@ -791,7 +791,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_VERT_RELATION, nRel)); if(m_aVertByMF.IsEnabled()) rSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_VERT_POSITION, nVertByPos)); - bModified |= TRUE; + bModified |= sal_True; } } @@ -815,13 +815,13 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) sal_uInt32 nWidth = static_cast<sal_uInt32>(m_aWidthMF.Denormalize(m_aWidthMF.GetValue(FUNIT_TWIP))); sal_uInt32 nHeight = static_cast<sal_uInt32>(m_aHeightMF.Denormalize(m_aHeightMF.GetValue(FUNIT_TWIP))); rSet.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), - (UINT32) nWidth ) ); + (sal_uInt32) nWidth ) ); rSet.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), - (UINT32) nHeight ) ); + (sal_uInt32) nHeight ) ); //this item is required by SdrEditView::SetGeoAttrToMarked() rSet.Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), RP_LT ) ); - bModified |= TRUE; + bModified |= sal_True; } return bModified; @@ -854,11 +854,11 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) } if(bInvalidateAnchor) { - m_aToPageRB.Enable( FALSE ); - m_aToParaRB.Enable( FALSE ); - m_aToCharRB.Enable( FALSE ); - m_aAsCharRB.Enable( FALSE ); - m_aToFrameRB.Enable( FALSE ); + m_aToPageRB.Enable( sal_False ); + m_aToParaRB.Enable( sal_False ); + m_aToCharRB.Enable( sal_False ); + m_aAsCharRB.Enable( sal_False ); + m_aToFrameRB.Enable( sal_False ); } pItem = GetItem( rSet, SID_ATTR_TRANSFORM_PROTECT_POS ); @@ -866,7 +866,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue(); m_aPositionCB.SetState( bProtected ? STATE_CHECK : STATE_NOCHECK ); - m_aPositionCB.EnableTriState( FALSE ); + m_aPositionCB.EnableTriState( sal_False ); m_aSizeCB.Enable( !bProtected ); } else @@ -882,7 +882,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { m_aSizeCB.SetState( ( (const SfxBoolItem*)pItem )->GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_aSizeCB.EnableTriState( FALSE ); + m_aSizeCB.EnableTriState( sal_False ); } else m_aSizeCB.SetState( STATE_DONTKNOW ); @@ -918,8 +918,8 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { if( 0 == (m_nHtmlMode & HTMLMODE_FULL_ABS_POS)) { - m_aHeightFT .Enable( FALSE ); - m_aHeightMF .Enable( FALSE ); + m_aHeightFT .Enable( sal_False ); + m_aHeightMF .Enable( sal_False ); } if( 0 == (m_nHtmlMode & HTMLMODE_SOME_ABS_POS)) { @@ -927,12 +927,12 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { m_aToParaRB.Check(); } - m_aToPageRB.Enable(FALSE); + m_aToPageRB.Enable(sal_False); } - m_aHoriMirrorCB.Show(FALSE); - m_aKeepRatioCB.Enable(FALSE); + m_aHoriMirrorCB.Show(sal_False); + m_aKeepRatioCB.Enable(sal_False); // OD 19.09.2003 #i18732# - hide checkbox in HTML mode - m_aFollowCB.Show(FALSE); + m_aFollowCB.Show(sal_False); } else { @@ -945,12 +945,12 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) } pItem = GetItem( rSet, SID_ATTR_TRANSFORM_WIDTH ); - sal_Int32 nWidth = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (UINT32)1 ); + sal_Int32 nWidth = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 ); m_aWidthMF.SetValue(m_aWidthMF.Normalize(nWidth), FUNIT_TWIP); pItem = GetItem( rSet, SID_ATTR_TRANSFORM_HEIGHT ); - sal_Int32 nHeight = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (UINT32)1 ); + sal_Int32 nHeight = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 ); m_aHeightMF.SetValue(m_aHeightMF.Normalize(nHeight), FUNIT_TWIP); m_fWidthHeightRatio = nHeight ? double(nWidth) / double(nHeight) : 1.0; @@ -1015,12 +1015,12 @@ int SvxSwPosSizeTabPage::DeactivatePage( SfxItemSet* _pSet ) /*-- 04.03.2004 09:14:41--------------------------------------------------- -----------------------------------------------------------------------*/ -void SvxSwPosSizeTabPage::EnableAnchorTypes(USHORT nAnchorEnable) +void SvxSwPosSizeTabPage::EnableAnchorTypes(sal_uInt16 nAnchorEnable) { if((nAnchorEnable & SVX_OBJ_AT_FLY)) m_aToFrameRB.Show(); if(!(nAnchorEnable & SVX_OBJ_PAGE)) - m_aToPageRB.Enable(FALSE); + m_aToPageRB.Enable(sal_False); } /*-- 04.03.2004 09:33:33--------------------------------------------------- @@ -1085,9 +1085,9 @@ IMPL_LINK( SvxSwPosSizeTabPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( m_pHMap ) { // Ausrichtung Horizontal - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriToLB); - USHORT nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); - USHORT nRel = GetRelation(m_pHMap, m_aHoriToLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriToLB); + sal_uInt16 nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); + sal_uInt16 nRel = GetRelation(m_pHMap, m_aHoriToLB); aVal.nHoriOrient = (short)nAlign; aVal.nHRelOrient = (short)nRel; @@ -1098,9 +1098,9 @@ IMPL_LINK( SvxSwPosSizeTabPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( m_pVMap ) { // Ausrichtung Vertikal - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); - USHORT nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); - USHORT nRel = GetRelation(m_pVMap, m_aVertToLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); + sal_uInt16 nRel = GetRelation(m_pVMap, m_aVertToLB); aVal.nVertOrient = (short)nAlign; aVal.nVRelOrient = (short)nRel; @@ -1190,14 +1190,14 @@ IMPL_LINK( SvxSwPosSizeTabPage, MirrorHdl, CheckBox *, EMPTYARG ) -----------------------------------------------------------------------*/ IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) { - BOOL bHori = pLB == &m_aHoriToLB; + sal_Bool bHori = pLB == &m_aHoriToLB; UpdateExample(); if (bHori) - m_bAtHoriPosModified = TRUE; + m_bAtHoriPosModified = sal_True; else - m_bAtVertPosModified = TRUE; + m_bAtVertPosModified = sal_True; // OD 12.11.2003 #i22341# - following special handling no longer needed /* @@ -1205,16 +1205,16 @@ IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) { // Ausrichtung Vertikal String sEntry; - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); - USHORT nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); - USHORT nRel = GetRelation(m_pVMap, m_aVertToLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); + sal_uInt16 nRel = GetRelation(m_pVMap, m_aVertToLB); if (nRel == SwFPos::REL_CHAR) sEntry = m_aFramePosString.GetString(SwFPos::FROMBOTTOM); else sEntry = m_aFramePosString.GetString(SwFPos::FROMTOP); - USHORT nOldPos = m_aVertLB.GetSelectEntryPos(); + sal_uInt16 nOldPos = m_aVertLB.GetSelectEntryPos(); String sName = m_aVertLB.GetEntry(m_aVertLB.GetEntryCount() - 1); if (sName != sEntry) @@ -1229,7 +1229,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) { if(bHori) { - USHORT nRel = GetRelation(m_pHMap, m_aHoriToLB); + sal_uInt16 nRel = GetRelation(m_pHMap, m_aHoriToLB); if(RelOrientation::PRINT_AREA == nRel && 0 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(1); @@ -1251,24 +1251,24 @@ IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) -----------------------------------------------------------------------*/ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) { - BOOL bHori = pLB == &m_aHoriLB; + sal_Bool bHori = pLB == &m_aHoriLB; ListBox *pRelLB = bHori ? &m_aHoriToLB : &m_aVertToLB; FixedText *pRelFT = bHori ? &m_aHoriToFT : &m_aVertToFT; FrmMap *pMap = bHori ? m_pHMap : m_pVMap; - USHORT nMapPos = GetMapPos(pMap, *pLB); - USHORT nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB); + sal_uInt16 nMapPos = GetMapPos(pMap, *pLB); + sal_uInt16 nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB); if (bHori) { - BOOL bEnable = HoriOrientation::NONE == nAlign; + sal_Bool bEnable = HoriOrientation::NONE == nAlign; m_aHoriByMF.Enable( bEnable ); m_aHoriByFT.Enable( bEnable ); } else { - BOOL bEnable = VertOrientation::NONE == nAlign; + sal_Bool bEnable = VertOrientation::NONE == nAlign; m_aVertByMF.Enable( bEnable ); m_aVertByFT.Enable( bEnable ); } @@ -1291,15 +1291,15 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) UpdateExample(); if (bHori) - m_bAtHoriPosModified = TRUE; + m_bAtHoriPosModified = sal_True; else - m_bAtVertPosModified = TRUE; + m_bAtVertPosModified = sal_True; // Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten if(m_bHtmlMode && m_nHtmlMode & HTMLMODE_SOME_ABS_POS && TextContentAnchorType_AT_CHARACTER == GetAnchorType()) { - BOOL bSet = FALSE; + sal_Bool bSet = sal_False; if(bHori) { // rechts ist nur unterhalb erlaubt - von links nur oben @@ -1311,17 +1311,17 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) m_aVertLB.SelectEntryPos(1); else m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } else if(HoriOrientation::LEFT == nAlign && 1 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } else if(HoriOrientation::NONE == nAlign && 1 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } if(bSet) PosHdl(&m_aVertLB); @@ -1333,7 +1333,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) if(1 == m_aHoriLB.GetSelectEntryPos()) { m_aHoriLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } m_aHoriToLB.SelectEntryPos(1); } @@ -1342,7 +1342,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) if(2 == m_aHoriLB.GetSelectEntryPos()) { m_aHoriLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } m_aHoriToLB.SelectEntryPos(0) ; } @@ -1391,7 +1391,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, ProtectHdl, TriStateBox *, EMPTYARG) short SvxSwPosSizeTabPage::GetRelation(FrmMap *, ListBox &rRelationLB) { short nRel = 0; - USHORT nPos = rRelationLB.GetSelectEntryPos(); + sal_uInt16 nPos = rRelationLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND) { @@ -1404,7 +1404,7 @@ short SvxSwPosSizeTabPage::GetRelation(FrmMap *, ListBox &rRelationLB) /*-- 05.03.2004 14:20:19--------------------------------------------------- -----------------------------------------------------------------------*/ -short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/*rAlignLB*/, ListBox &rRelationLB) +short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &/*rAlignLB*/, ListBox &rRelationLB) { short nAlign = 0; @@ -1415,7 +1415,7 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ { if (rRelationLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) { - ULONG nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; + sal_uLong nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; @@ -1423,7 +1423,7 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ { if (pMap[i].eStrId == eStrId) { - ULONG nLBRelations = pMap[i].nLBRelations; + sal_uLong nLBRelations = pMap[i].nLBRelations; if (nLBRelations & nRel) { nAlign = pMap[i].nAlign; @@ -1441,10 +1441,10 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ /*-- 05.03.2004 14:20:19--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) +sal_uInt16 SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) { - USHORT nMapPos = 0; - USHORT nLBSelPos = rAlignLB.GetSelectEntryPos(); + sal_uInt16 nMapPos = 0; + sal_uInt16 nLBSelPos = rAlignLB.GetSelectEntryPos(); if (nLBSelPos != LISTBOX_ENTRY_NOTFOUND) { @@ -1461,7 +1461,7 @@ USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) if (sEntry == sSelEntry) { - nMapPos = sal::static_int_cast< USHORT >(i); + nMapPos = sal::static_int_cast< sal_uInt16 >(i); break; } } @@ -1476,14 +1476,14 @@ USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) -----------------------------------------------------------------------*/ void SvxSwPosSizeTabPage::InitPos(short nAnchor, - USHORT nH, - USHORT nHRel, - USHORT nV, - USHORT nVRel, + sal_uInt16 nH, + sal_uInt16 nHRel, + sal_uInt16 nV, + sal_uInt16 nVRel, long nX, long nY) { - USHORT nPos = m_aVertLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aVertLB.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND && m_pVMap ) { m_nOldV = m_pVMap[nPos].nAlign; @@ -1502,7 +1502,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, m_nOldHRel = ((RelationMap *)m_aHoriToLB.GetEntryData(nPos))->nRelation; } - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; if( m_bIsMultiSelection ) { m_pVMap = aVMultiSelectionMap; @@ -1550,7 +1550,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, { m_pVMap = m_bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap; m_pHMap = 0; - bEnable = FALSE; + bEnable = sal_False; } m_aHoriLB.Enable( bEnable ); m_aHoriFT.Enable( bEnable ); @@ -1563,7 +1563,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, nHRel = m_nOldHRel; } // OD 12.11.2003 #i22341# - pass <nHRel> as 3rd parameter to method <FillPosLB> - USHORT nMapPos = FillPosLB(m_pHMap, nH, nHRel, m_aHoriLB); + sal_uInt16 nMapPos = FillPosLB(m_pHMap, nH, nHRel, m_aHoriLB); FillRelLB(m_pHMap, nMapPos, nH, nHRel, m_aHoriToLB, m_aHoriToFT); // Vertikal @@ -1629,10 +1629,10 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, -----------------------------------------------------------------------*/ void SvxSwPosSizeTabPage::UpdateExample() { - USHORT nPos = m_aHoriLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aHoriLB.GetSelectEntryPos(); if ( m_pHMap && nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriLB); short nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); short nRel = GetRelation(m_pHMap, m_aHoriToLB); @@ -1643,9 +1643,9 @@ void SvxSwPosSizeTabPage::UpdateExample() nPos = m_aVertLB.GetSelectEntryPos(); if ( m_pVMap && nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); - USHORT nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); - USHORT nRel = GetRelation(m_pVMap, m_aVertToLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); + sal_uInt16 nRel = GetRelation(m_pVMap, m_aVertToLB); m_aExampleWN.SetVAlign(nAlign); m_aExampleWN.SetVertRel(nRel); @@ -1662,11 +1662,11 @@ void SvxSwPosSizeTabPage::UpdateExample() /*-- 05.03.2004 14:20:19--------------------------------------------------- -----------------------------------------------------------------------*/ -ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign, - USHORT nRel, ListBox &rLB, FixedText &rFT) +sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_uInt16 nAlign, + sal_uInt16 nRel, ListBox &rLB, FixedText &rFT) { String sSelEntry; - ULONG nLBRelations = 0; + sal_uLong nLBRelations = 0; std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); rLB.Clear(); @@ -1676,7 +1676,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap) { String sOldEntry(rLB.GetSelectEntry()); - USHORT nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap); + sal_uInt16 nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; for (std::size_t _nMapPos = 0; _nMapPos < nMapCount; _nMapPos++) @@ -1684,7 +1684,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (pMap[_nMapPos].eStrId == eStrId) { nLBRelations = pMap[_nMapPos].nLBRelations; - for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++) + for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++) { if (nLBRelations & aAsCharRelationMap[nRelPos].nLBRelation) { @@ -1692,7 +1692,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); String sEntry = m_aFramePosString.GetString(sStrId1); - USHORT nPos = rLB.InsertEntry(sEntry); + sal_uInt16 nPos = rLB.InsertEntry(sEntry); rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]); if (pMap[_nMapPos].nAlign == nAlign) sSelEntry = sEntry; @@ -1709,7 +1709,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (!rLB.GetSelectEntryCount()) { - for (USHORT i = 0; i < rLB.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < rLB.GetEntryCount(); i++) { RelationMap *pEntry = (RelationMap *)rLB.GetEntryData(i); if (pEntry->nLBRelation == LB_REL_CHAR) // Default @@ -1723,7 +1723,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign } else { - USHORT nRelCount = sizeof(aRelationMap) / sizeof(RelationMap); + sal_uInt16 nRelCount = sizeof(aRelationMap) / sizeof(RelationMap); // OD 14.11.2003 #i22341# - special handling for map <aVCharMap>, // because its ambigous in its <eStrId>/<eMirrorStrId>. @@ -1740,18 +1740,18 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign nLBRelations = pMap[nMapPos].nLBRelations; } - for (ULONG nBit = 1; nBit < 0x80000000; nBit <<= 1) + for (sal_uLong nBit = 1; nBit < 0x80000000; nBit <<= 1) { if (nLBRelations & nBit) { - for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++) + for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++) { if (aRelationMap[nRelPos].nLBRelation == nBit) { SvxSwFramePosString::StringId sStrId1 = m_aHoriMirrorCB.IsChecked() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId; sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); String sEntry = m_aFramePosString.GetString(sStrId1); - USHORT nPos = rLB.InsertEntry(sEntry); + sal_uInt16 nPos = rLB.InsertEntry(sEntry); rLB.SetEntryData(nPos, &aRelationMap[nRelPos]); if (!sSelEntry.Len() && aRelationMap[nRelPos].nRelation == nRel) sSelEntry = sEntry; @@ -1784,7 +1784,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign break; } - for (USHORT i = 0; i < rLB.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < rLB.GetEntryCount(); i++) { RelationMap *pEntry = (RelationMap *)rLB.GetEntryData(i); if (pEntry->nRelation == nRel) @@ -1810,9 +1810,9 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign /*-- 05.03.2004 14:20:19--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, - USHORT _nAlign, - const USHORT _nRel, +sal_uInt16 SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, + sal_uInt16 _nAlign, + const sal_uInt16 _nRel, ListBox &_rLB) { String sSelEntry, sOldEntry; @@ -1822,7 +1822,7 @@ USHORT SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, // OD 12.11.2003 #i22341# - determine all possible listbox relations for // given relation for map <aVCharMap> - const ULONG nLBRelations = (_pMap != aVCharMap) + const sal_uLong nLBRelations = (_pMap != aVCharMap) ? 0L : ::lcl_GetLBRelationsForRelations( _nRel ); @@ -1890,27 +1890,27 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView ) if( m_aAnchorPos != Point(0,0) ) // -> Writer { - for( USHORT i = 1; i < rMarkList.GetMarkCount(); i++ ) + for( sal_uInt16 i = 1; i < rMarkList.GetMarkCount(); i++ ) { pObj = rMarkList.GetMark( i )->GetMarkedSdrObj(); if( m_aAnchorPos != pObj->GetAnchorPos() ) { // different anchor positions -> disable positioning - m_aPositionFL.Enable(FALSE); - m_aHoriFT.Enable(FALSE); - m_aHoriLB.Enable(FALSE); - m_aHoriByFT.Enable(FALSE); - m_aHoriByMF.Enable(FALSE); - m_aHoriToFT.Enable(FALSE); - m_aHoriToLB.Enable(FALSE); - m_aHoriMirrorCB.Enable(FALSE); - m_aVertFT.Enable(FALSE); - m_aVertLB.Enable(FALSE); - m_aVertByFT.Enable(FALSE); - m_aVertByMF.Enable(FALSE); - m_aVertToFT.Enable(FALSE); - m_aVertToLB.Enable(FALSE); - m_aFollowCB.Enable(FALSE); + m_aPositionFL.Enable(sal_False); + m_aHoriFT.Enable(sal_False); + m_aHoriLB.Enable(sal_False); + m_aHoriByFT.Enable(sal_False); + m_aHoriByMF.Enable(sal_False); + m_aHoriToFT.Enable(sal_False); + m_aHoriToLB.Enable(sal_False); + m_aHoriMirrorCB.Enable(sal_False); + m_aVertFT.Enable(sal_False); + m_aVertLB.Enable(sal_False); + m_aVertByFT.Enable(sal_False); + m_aVertByMF.Enable(sal_False); + m_aVertToFT.Enable(sal_False); + m_aVertToLB.Enable(sal_False); + m_aFollowCB.Enable(sal_False); m_aHoriByMF.SetText(String()); m_aVertByMF.SetText(String()); diff --git a/cui/source/tabpages/swpossizetabpage.hxx b/cui/source/tabpages/swpossizetabpage.hxx index e27f243dc895..518d02535d87 100644 --- a/cui/source/tabpages/swpossizetabpage.hxx +++ b/cui/source/tabpages/swpossizetabpage.hxx @@ -104,7 +104,7 @@ class SvxSwPosSizeTabPage : public SfxTabPage short m_nOldVRel; double m_fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button - USHORT m_nHtmlMode; + sal_uInt16 m_nHtmlMode; bool m_bHtmlMode; bool m_bAtHoriPosModified; bool m_bAtVertPosModified; @@ -123,15 +123,15 @@ class SvxSwPosSizeTabPage : public SfxTabPage DECL_LINK( ModifyHdl, Edit * ); DECL_LINK( ProtectHdl, TriStateBox *); - void InitPos(short nAnchorType, USHORT nH, USHORT nHRel, - USHORT nV, USHORT nVRel, + void InitPos(short nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel, + sal_uInt16 nV, sal_uInt16 nVRel, long nX, long nY); - USHORT GetMapPos(FrmMap *pMap, ListBox &rAlignLB); - short GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); + sal_uInt16 GetMapPos(FrmMap *pMap, ListBox &rAlignLB); + short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); short GetRelation(FrmMap *pMap, ListBox &rRelationLB); short GetAnchorType(bool* pbHasChanged = 0); - ULONG FillRelLB(FrmMap *pMap, USHORT nLBSelPos, USHORT nAlign, USHORT nRel, ListBox &rLB, FixedText &rFT); - USHORT FillPosLB(FrmMap *pMap, USHORT nAlign, const USHORT _nRel, ListBox &rLB); + sal_uLong FillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT); + sal_uInt16 FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, ListBox &rLB); void UpdateExample(); @@ -140,14 +140,14 @@ public: ~SvxSwPosSizeTabPage(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual int DeactivatePage( SfxItemSet* pSet ); - void EnableAnchorTypes(USHORT nAnchorEnable); + void EnableAnchorTypes(sal_uInt16 nAnchorEnable); void SetValidateFramePosLink( const Link& rLink ) {m_aValidateLink = rLink;} diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index 115164bba772..4e873f4cb021 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -90,7 +90,7 @@ SvxAreaTabDialog::SvxAreaTabDialog mnDlgType( 0 ), mnPos( 0 ), mbAreaTP( sal_False ), - mbDeleteColorTable( TRUE ) + mbDeleteColorTable( sal_True ) { FreeResource(); @@ -253,7 +253,7 @@ short SvxAreaTabDialog::Ok() SavePalettes(); // Es wird RET_OK zurueckgeliefert, wenn wenigstens eine - // TabPage in FillItemSet() TRUE zurueckliefert. Dieses + // TabPage in FillItemSet() sal_True zurueckliefert. Dieses // geschieht z.Z. standardmaessig. return( SfxTabDialog::Ok() ); } @@ -271,7 +271,7 @@ IMPL_LINK_INLINE_END( SvxAreaTabDialog, CancelHdlImpl, void *, p ) // ----------------------------------------------------------------------- -void SvxAreaTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx index 02280cb587a8..8d0e287b86b5 100644 --- a/cui/source/tabpages/tabline.cxx +++ b/cui/source/tabpages/tabline.cxx @@ -67,7 +67,7 @@ SvxLineTabDialog::SvxLineTabDialog const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pSdrObj, - BOOL bHasObj + sal_Bool bHasObj ) : SfxTabDialog ( pParent, CUI_RES( RID_SVXDLG_LINE ), pAttr ), @@ -91,7 +91,7 @@ SvxLineTabDialog::SvxLineTabDialog nPosLineEndLb( 0 ), mnPos( 0 ), mbAreaTP( sal_False ), - mbDeleteColorTable( TRUE ) + mbDeleteColorTable( sal_True ) { FreeResource(); @@ -210,7 +210,7 @@ short SvxLineTabDialog::Ok() SavePalettes(); // Es wird RET_OK zurueckgeliefert, wenn wenigstens eine - // TabPage in FillItemSet() TRUE zurueckliefert. Dieses + // TabPage in FillItemSet() sal_True zurueckliefert. Dieses // geschieht z.Z. standardmaessig. return( SfxTabDialog::Ok() ); } @@ -228,7 +228,7 @@ IMPL_LINK_INLINE_END( SvxLineTabDialog, CancelHdlImpl, void *, EMPTYARG ) // ----------------------------------------------------------------------- -void SvxLineTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index e1e65404b1a2..33e47e8c86ed 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -56,10 +56,10 @@ class TabWin_Impl : public Window { private: - USHORT nTabStyle; + sal_uInt16 nTabStyle; public: - TabWin_Impl( Window* pParent, const ResId& rId, USHORT nStyle ) : + TabWin_Impl( Window* pParent, const ResId& rId, sal_uInt16 nStyle ) : Window( pParent, rId ), nTabStyle( nStyle ) {} @@ -68,7 +68,7 @@ public: // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_TABSTOP, SID_ATTR_TABSTOP_OFFSET, @@ -113,10 +113,10 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, aRightTab ( this, CUI_RES( BTN_TABTYPE_RIGHT ) ), aCenterTab ( this, CUI_RES( BTN_TABTYPE_CENTER ) ), aDezTab ( this, CUI_RES( BTN_TABTYPE_DECIMAL ) ), - pLeftWin ( new TabWin_Impl( this, CUI_RES( WIN_TABLEFT ), (USHORT)(RULER_TAB_LEFT|WB_HORZ) ) ), - pRightWin ( new TabWin_Impl( this, CUI_RES( WIN_TABRIGHT ), (USHORT)(RULER_TAB_RIGHT|WB_HORZ) ) ), - pCenterWin ( new TabWin_Impl( this, CUI_RES( WIN_TABCENTER ), (USHORT)(RULER_TAB_CENTER|WB_HORZ) ) ), - pDezWin ( new TabWin_Impl( this, CUI_RES( WIN_TABDECIMAL ), (USHORT)(RULER_TAB_DECIMAL|WB_HORZ) ) ), + pLeftWin ( new TabWin_Impl( this, CUI_RES( WIN_TABLEFT ), (sal_uInt16)(RULER_TAB_LEFT|WB_HORZ) ) ), + pRightWin ( new TabWin_Impl( this, CUI_RES( WIN_TABRIGHT ), (sal_uInt16)(RULER_TAB_RIGHT|WB_HORZ) ) ), + pCenterWin ( new TabWin_Impl( this, CUI_RES( WIN_TABCENTER ), (sal_uInt16)(RULER_TAB_CENTER|WB_HORZ) ) ), + pDezWin ( new TabWin_Impl( this, CUI_RES( WIN_TABDECIMAL ), (sal_uInt16)(RULER_TAB_DECIMAL|WB_HORZ) ) ), aDezCharLabel ( this, CUI_RES( FT_TABTYPE_DECCHAR ) ), aDezChar ( this, CUI_RES( ED_TABTYPE_DECCHAR ) ), aTabTypeLabel ( this, CUI_RES( FL_TABTYPE ) ), @@ -135,7 +135,7 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, aNewTabs ( 0, 0, SVX_TAB_ADJUST_LEFT, GetWhich( SID_ATTR_TABSTOP ) ), nDefDist ( 0 ), eDefUnit( FUNIT_100TH_MM ), - bCheck ( FALSE ) + bCheck ( sal_False ) { SvtCJKOptions aCJKOptions; @@ -200,16 +200,16 @@ SvxTabulatorTabPage::~SvxTabulatorTabPage() // ----------------------------------------------------------------------- -USHORT* SvxTabulatorTabPage::GetRanges() +sal_uInt16* SvxTabulatorTabPage::GetRanges() { return pRanges; } // ----------------------------------------------------------------------- -BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; // Hier die Werte aus den Controls eintueten if ( aNewBtn.IsEnabled() ) @@ -231,7 +231,7 @@ BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) const SfxPoolItem* pLRSpace; // wenn nicht im neuen Set, dann vielleicht im alten if ( SFX_ITEM_SET != - rSet.GetItemState( GetWhich( SID_ATTR_LRSPACE ), TRUE, &pLRSpace ) ) + rSet.GetItemState( GetWhich( SID_ATTR_LRSPACE ), sal_True, &pLRSpace ) ) pLRSpace = GetOldItem( rSet, SID_ATTR_LRSPACE ); if ( pLRSpace && ( (SvxLRSpaceItem*)pLRSpace )->GetTxtFirstLineOfst() < 0 ) @@ -243,7 +243,7 @@ BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) SvxTabStopItem aTmp( aNewTabs ); aTmp.Remove( 0, aTmp.Count() ); - for ( USHORT i = 0; i < aNewTabs.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aNewTabs.Count(); ++i ) { SvxTabStop aTmpStop = aNewTabs[i]; aTmpStop.GetTabPos() = @@ -254,13 +254,13 @@ BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *( (SvxTabStopItem*)pOld ) == aTmp ) ) { rSet.Put( aTmp ); - bModified = TRUE; + bModified = sal_True; } } else if ( !pOld || !( *( (SvxTabStopItem*)pOld ) == aNewTabs ) ) { rSet.Put( aNewTabs ); - bModified = TRUE; + bModified = sal_True; } return bModified; } @@ -290,7 +290,7 @@ void SvxTabulatorTabPage::Reset( const SfxItemSet& rSet ) SvxTabStopItem aTmp( *( (const SvxTabStopItem*)pItem ) ); aNewTabs.Remove( 0, aNewTabs.Count() ); - for ( USHORT i = 0; i < aTmp.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aTmp.Count(); ++i ) { SvxTabStop aTmpStop = aTmp[i]; aTmpStop.GetTabPos() = @@ -313,7 +313,7 @@ void SvxTabulatorTabPage::Reset( const SfxItemSet& rSet ) (long)((const SfxUInt16Item*)pItem)->GetValue(), eUnit, MAP_100TH_MM ); // Aktuell selektierte Tab-Pos - USHORT nTabPos = 0; + sal_uInt16 nTabPos = 0; pItem = GetItem( rSet, SID_ATTR_TABSTOP_POS ); if ( pItem ) @@ -324,7 +324,7 @@ void SvxTabulatorTabPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -void SvxTabulatorTabPage::DisableControls( const USHORT nFlag ) +void SvxTabulatorTabPage::DisableControls( const sal_uInt16 nFlag ) { if ( ( TABTYPE_LEFT & nFlag ) == TABTYPE_LEFT ) { @@ -378,13 +378,13 @@ int SvxTabulatorTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -void SvxTabulatorTabPage::InitTabPos_Impl( USHORT nTabPos ) +void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos ) { aTabBox.Clear(); long nOffset = 0; const SfxPoolItem* pItem = 0; - if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, TRUE, &pItem ) + if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, sal_True, &pItem ) == SFX_ITEM_SET ) { nOffset = ( (const SfxInt32Item*)pItem )->GetValue(); @@ -393,7 +393,7 @@ void SvxTabulatorTabPage::InitTabPos_Impl( USHORT nTabPos ) } // Aktuelle TabPos korrigieren und Defaults-Tabs - for ( USHORT i = 0; i < aNewTabs.Count(); i++ ) + for ( sal_uInt16 i = 0; i < aNewTabs.Count(); i++ ) { if ( aNewTabs[i].GetAdjustment() != SVX_TAB_ADJUST_DEFAULT ) { @@ -405,14 +405,14 @@ void SvxTabulatorTabPage::InitTabPos_Impl( USHORT nTabPos ) } // aktuellen Tabulator auswaehlen - const USHORT nSize = aNewTabs.Count(); + const sal_uInt16 nSize = aNewTabs.Count(); if ( nTabPos >= nSize ) nTabPos = 0; // alle RadioButtons erstmal ausschalten - aLeftTab.Check( TRUE ); - aNoFillChar.Check( TRUE ); + aLeftTab.Check( sal_True ); + aNoFillChar.Check( sal_True ); if( aTabBox.GetEntryCount() > 0 ) { @@ -495,7 +495,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) long nOffset = 0; const SfxPoolItem* pItem = 0; - if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, TRUE, &pItem ) == + if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, sal_True, &pItem ) == SFX_ITEM_SET ) { nOffset = ( (const SfxInt32Item*)pItem )->GetValue(); @@ -503,9 +503,9 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) nOffset = OutputDevice::LogicToLogic( nOffset, eUnit, MAP_100TH_MM ); } const long nReal = nVal - nOffset; - USHORT nSize = aTabBox.GetEntryCount(); + sal_uInt16 nSize = aTabBox.GetEntryCount(); - USHORT i; + sal_uInt16 i; for( i = 0; i < nSize; i++ ) { if ( nReal < aNewTabs[i].GetTabPos() ) @@ -533,7 +533,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) // falls kein RadioButton geclickt wurde, // muss trotzdem geputtet werden - bCheck |= TRUE; + bCheck |= sal_True; // set the selection into the position Edit aTabBox.SetSelection(Selection(0, aTabBox.GetText().Len())); return 0; @@ -543,7 +543,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) IMPL_LINK( SvxTabulatorTabPage, DelHdl_Impl, Button *, EMPTYARG ) { - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue() ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue() ); if ( nPos == COMBOBOX_ENTRY_NOTFOUND ) return 0; @@ -559,7 +559,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelHdl_Impl, Button *, EMPTYARG ) aNewTabs.Remove( nPos ); // aAktTab neu setzen - const USHORT nSize = aNewTabs.Count(); + const sal_uInt16 nSize = aNewTabs.Count(); if ( nSize > 0 ) { @@ -579,7 +579,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelHdl_Impl, Button *, EMPTYARG ) // falls kein RadioButton geclickt wurde, // muss trotzdem geputtet werden - bCheck |= TRUE; + bCheck |= sal_True; return 0; } @@ -593,7 +593,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelAllHdl_Impl, Button *, EMPTYARG ) InitTabPos_Impl(); // damit in FillItemSet() geputtet wird - bCheck |= TRUE; + bCheck |= sal_True; } return 0; } @@ -602,7 +602,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelAllHdl_Impl, Button *, EMPTYARG ) IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) { - bCheck |= TRUE; + bCheck |= sal_True; SvxTabAdjust eAdj; aDezChar.Disable(); aDezCharLabel.Disable(); @@ -623,7 +623,7 @@ IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) } aAktTab.GetAdjustment() = eAdj; - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { @@ -637,8 +637,8 @@ IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox ) { - bCheck |= TRUE; - BYTE cFill = ' '; + bCheck |= sal_True; + sal_uInt8 cFill = ' '; aFillChar.SetText( String() ); aFillChar.Disable(); @@ -654,7 +654,7 @@ IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox ) cFill = '-'; aAktTab.GetFill() = cFill; - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { @@ -673,7 +673,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit ) if ( aChar.Len() > 0 ) aAktTab.GetFill() = aChar.GetChar( 0 ); - const USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit); + const sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aNewTabs.Remove( nPos ); @@ -690,7 +690,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit ) if ( aChar.Len() > 0 && ( aChar.GetChar( 0 ) >= ' ')) aAktTab.GetDecimal() = aChar.GetChar( 0 ); - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aNewTabs.Remove( nPos ); @@ -703,7 +703,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit ) IMPL_LINK( SvxTabulatorTabPage, SelectHdl_Impl, MetricBox *, EMPTYARG ) { - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aAktTab = aNewTabs[nPos]; @@ -717,7 +717,7 @@ IMPL_LINK( SvxTabulatorTabPage, SelectHdl_Impl, MetricBox *, EMPTYARG ) IMPL_LINK( SvxTabulatorTabPage, ModifyHdl_Impl, MetricBox *, EMPTYARG ) { - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aAktTab = aNewTabs[nPos]; diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index cfff61fd5009..c41f8f3f40bf 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -45,7 +45,7 @@ #include <dialmgr.hxx> #include "svx/dlgutil.hxx" -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_TEXT_ANIKIND, SDRATTR_TEXT_ANIAMOUNT, @@ -77,7 +77,7 @@ __EXPORT SvxTextTabDialog::SvxTextTabDialog( Window* pParent, |* \************************************************************************/ -void __EXPORT SvxTextTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void __EXPORT SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { @@ -188,7 +188,7 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) if( pItem ) { eAniKind = ( ( const SdrTextAniKindItem* )pItem )->GetValue(); - aLbEffect.SelectEntryPos( sal::static_int_cast< USHORT >(eAniKind) ); + aLbEffect.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(eAniKind) ); } else aLbEffect.SetNoSelection(); @@ -205,10 +205,10 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) } else { - aBtnUp.Check( FALSE ); - aBtnLeft.Check( FALSE ); - aBtnRight.Check( FALSE ); - aBtnDown.Check( FALSE ); + aBtnUp.Check( sal_False ); + aBtnLeft.Check( sal_False ); + aBtnRight.Check( sal_False ); + aBtnDown.Check( sal_False ); } aBtnUp.SaveValue(); aBtnLeft.SaveValue(); @@ -221,8 +221,8 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTARTINSIDE ); if( pItem ) { - aTsbStartInside.EnableTriState( FALSE ); - BOOL bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue(); + aTsbStartInside.EnableTriState( sal_False ); + sal_Bool bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue(); if( bValue ) aTsbStartInside.SetState( STATE_CHECK ); else @@ -238,8 +238,8 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTOPINSIDE ); if( pItem ) { - aTsbStopInside.EnableTriState( FALSE ); - BOOL bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue(); + aTsbStopInside.EnableTriState( sal_False ); + sal_Bool bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue(); if( bValue ) aTsbStopInside.SetState( STATE_CHECK ); else @@ -255,7 +255,7 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANICOUNT ); if( pItem ) { - aTsbEndless.EnableTriState( FALSE ); + aTsbEndless.EnableTriState( sal_False ); long nValue = (long) ( ( const SdrTextAniCountItem* )pItem )->GetValue(); aNumFldCount.SetValue( nValue ); if( nValue == 0 ) @@ -263,7 +263,7 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) if( eAniKind == SDRTEXTANI_SLIDE ) { aTsbEndless.SetState( STATE_NOCHECK ); - aTsbEndless.Enable( FALSE ); + aTsbEndless.Enable( sal_False ); } else { @@ -288,7 +288,7 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDELAY ); if( pItem ) { - aTsbAuto.EnableTriState( FALSE ); + aTsbAuto.EnableTriState( sal_False ); long nValue = (long) ( ( const SdrTextAniDelayItem* )pItem )->GetValue(); aMtrFldDelay.SetValue( nValue ); if( nValue == 0 ) @@ -313,7 +313,7 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIAMOUNT ); if( pItem ) { - aTsbPixel.EnableTriState( FALSE ); + aTsbPixel.EnableTriState( sal_False ); long nValue = (long) ( ( const SdrTextAniAmountItem* )pItem )->GetValue(); if( nValue <= 0 ) { @@ -369,10 +369,10 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - USHORT nPos; + sal_Bool bModified = sal_False; + sal_uInt16 nPos; TriState eState; // Animationstyp @@ -381,7 +381,7 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) nPos != aLbEffect.GetSavedValue() ) { rAttrs.Put( SdrTextAniKindItem( (SdrTextAniKind) nPos ) ); - bModified = TRUE; + bModified = sal_True; } // Animationsrichtung @@ -392,23 +392,23 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection(); rAttrs.Put( SdrTextAniDirectionItem( eValue ) ); - bModified = TRUE; + bModified = sal_True; } // Start inside eState = aTsbStartInside.GetState(); if( eState != aTsbStartInside.GetSavedValue() ) { - rAttrs.Put( SdrTextAniStartInsideItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrTextAniStartInsideItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } // Stop inside eState = aTsbStopInside.GetState(); if( eState != aTsbStopInside.GetSavedValue() ) { - rAttrs.Put( SdrTextAniStopInsideItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrTextAniStopInsideItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } // Anzahl @@ -419,17 +419,17 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { sal_Int64 nValue = 0; if( eState == STATE_CHECK /*#89844#*/ && aTsbEndless.IsEnabled()) - bModified = TRUE; + bModified = sal_True; else { if( aStr != aNumFldCount.GetSavedValue() ) { nValue = aNumFldCount.GetValue(); - bModified = TRUE; + bModified = sal_True; } } if( bModified ) - rAttrs.Put( SdrTextAniCountItem( (UINT16) nValue ) ); + rAttrs.Put( SdrTextAniCountItem( (sal_uInt16) nValue ) ); } // Verzoegerung @@ -440,17 +440,17 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { sal_Int64 nValue = 0; if( eState == STATE_CHECK ) - bModified = TRUE; + bModified = sal_True; else { if( aStr != aMtrFldDelay.GetSavedValue() ) { nValue = aMtrFldDelay.GetValue(); - bModified = TRUE; + bModified = sal_True; } } if( bModified ) - rAttrs.Put( SdrTextAniDelayItem( (UINT16) nValue ) ); + rAttrs.Put( SdrTextAniDelayItem( (sal_uInt16) nValue ) ); } // Schrittweite @@ -469,9 +469,9 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { nValue = GetCoreValue( aMtrFldAmount, eUnit ); } - rAttrs.Put( SdrTextAniAmountItem( (INT16) nValue ) ); + rAttrs.Put( SdrTextAniAmountItem( (sal_Int16) nValue ) ); - bModified = TRUE; + bModified = sal_True; } return( bModified ); @@ -493,7 +493,7 @@ void SvxTextAnimationPage::Construct() |* \************************************************************************/ -USHORT* SvxTextAnimationPage::GetRanges() +sal_uInt16* SvxTextAnimationPage::GetRanges() { return( pRanges ); } @@ -518,7 +518,7 @@ SfxTabPage* SvxTextAnimationPage::Create( Window* pWindow, IMPL_LINK( SvxTextAnimationPage, SelectEffectHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbEffect.GetSelectEntryPos(); + sal_uInt16 nPos = aLbEffect.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { eAniKind = (SdrTextAniKind) nPos; @@ -738,9 +738,9 @@ void SvxTextAnimationPage::SelectDirection( SdrTextAniDirection nValue ) |* \************************************************************************/ -USHORT SvxTextAnimationPage::GetSelectedDirection() +sal_uInt16 SvxTextAnimationPage::GetSelectedDirection() { - USHORT nValue = 0; + sal_uInt16 nValue = 0; if( aBtnUp.IsChecked() ) nValue = SDRTEXTANI_UP; diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 93330fbeb4dd..bb13af3703ab 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -56,7 +56,7 @@ #include <svx/ofaitem.hxx> //add CHINA001 #include <editeng/writingmodeitem.hxx> -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_MISC_FIRST, SDRATTR_TEXT_HORZADJUST, SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_AUTOGROWSIZE, @@ -226,7 +226,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbAutoGrowHeight.SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbAutoGrowHeight.EnableTriState( FALSE ); + aTsbAutoGrowHeight.EnableTriState( sal_False ); } else aTsbAutoGrowHeight.SetState( STATE_DONTKNOW ); @@ -237,7 +237,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbAutoGrowWidth.SetState( ( ( const SdrTextAutoGrowWidthItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWWIDTH ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbAutoGrowWidth.EnableTriState( FALSE ); + aTsbAutoGrowWidth.EnableTriState( sal_False ); } else aTsbAutoGrowWidth.SetState( STATE_DONTKNOW ); @@ -248,7 +248,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbAutoGrowSize.SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbAutoGrowSize.EnableTriState( FALSE ); + aTsbAutoGrowSize.EnableTriState( sal_False ); } else aTsbAutoGrowSize.SetState( STATE_DONTKNOW ); @@ -259,7 +259,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbWordWrapText.SetState( ( ( const SdrTextWordWrapItem& )rAttrs.Get( SDRATTR_TEXT_WORDWRAP ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbWordWrapText.EnableTriState( FALSE ); + aTsbWordWrapText.EnableTriState( sal_False ); } else aTsbWordWrapText.SetState( STATE_DONTKNOW ); @@ -278,7 +278,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) SdrTextHorzAdjust eTHA = (SdrTextHorzAdjust)((const SdrTextHorzAdjustItem&)rAttrs.Get(SDRATTR_TEXT_HORZADJUST)).GetValue(); RECT_POINT eRP = RP_LB; - aTsbFullWidth.EnableTriState( FALSE ); + aTsbFullWidth.EnableTriState( sal_False ); // Translate item values into local anchor position. switch (eTVA) @@ -352,7 +352,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) SdrFitToSizeType eFTS = (SdrFitToSizeType) ( ( const SdrTextFitToSizeTypeItem& )rAttrs.Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue(); aTsbFitToSize.SetState( eFTS == SDRTEXTFIT_NONE ? STATE_NOCHECK : STATE_CHECK ); - aTsbFitToSize.EnableTriState( FALSE ); + aTsbFitToSize.EnableTriState( sal_False ); } else aTsbFitToSize.SetState( STATE_DONTKNOW ); @@ -361,9 +361,9 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) // Konturfluss if( rAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SFX_ITEM_DONTCARE ) { - BOOL bContour = ( ( const SdrTextContourFrameItem& )rAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); + sal_Bool bContour = ( ( const SdrTextContourFrameItem& )rAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); aTsbContour.SetState( bContour ? STATE_CHECK : STATE_NOCHECK ); - aTsbContour.EnableTriState( FALSE ); + aTsbContour.EnableTriState( sal_False ); } else aTsbContour.SetState( STATE_DONTKNOW ); @@ -378,13 +378,13 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) { SfxItemPool* pPool = rAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); SfxMapUnit eUnit = pPool->GetMetric( SDRATTR_TEXT_LEFTDIST ); - INT32 nValue; + sal_Int32 nValue; TriState eState; if( aMtrFldLeft.GetText() != aMtrFldLeft.GetSavedValue() ) @@ -414,32 +414,32 @@ BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) eState = aTsbAutoGrowHeight.GetState(); if( eState != aTsbAutoGrowHeight.GetSavedValue() ) { - rAttrs.Put( SdrTextAutoGrowHeightItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextAutoGrowHeightItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbAutoGrowWidth.GetState(); if( eState != aTsbAutoGrowWidth.GetSavedValue() ) { - rAttrs.Put( SdrTextAutoGrowWidthItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextAutoGrowWidthItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbAutoGrowSize.GetState(); if( eState != aTsbAutoGrowSize.GetSavedValue() ) { - rAttrs.Put( SdrTextAutoGrowHeightItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextAutoGrowHeightItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbWordWrapText.GetState(); if( eState != aTsbWordWrapText.GetSavedValue() ) { - rAttrs.Put( SdrTextWordWrapItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextWordWrapItem( (sal_Bool) STATE_CHECK == eState ) ); } // Konturfluss eState = aTsbContour.GetState(); if( eState != aTsbContour.GetSavedValue() ) { - rAttrs.Put( SdrTextContourFrameItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextContourFrameItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbFitToSize.GetState(); @@ -519,7 +519,7 @@ BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) rAttrs.Put( SdrTextHorzAdjustItem( eTHA ) ); } - return( TRUE ); + return( sal_True ); } /************************************************************************* @@ -532,8 +532,8 @@ void SvxTextAttrPage::Construct() { DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" ); - bFitToSizeEnabled = bContourEnabled = TRUE; - bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = FALSE; + bFitToSizeEnabled = bContourEnabled = sal_True; + bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = sal_False; const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); if( rMarkList.GetMarkCount() == 1 ) @@ -552,18 +552,18 @@ void SvxTextAttrPage::Construct() if ( ((SdrTextObj*)pObj)->HasText() ) { // Konturfluss ist NICHT bei reinen Textobjekten m�glich - bContourEnabled = FALSE; + bContourEnabled = sal_False; // Breite und Hoehe anpassen ist NUR bei reinen Textobjekten m�glich - bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = TRUE; + bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = sal_True; } } break; case OBJ_CUSTOMSHAPE : { - bFitToSizeEnabled = bContourEnabled = FALSE; - bAutoGrowSizeEnabled = TRUE; - bWordWrapTextEnabled = TRUE; + bFitToSizeEnabled = bContourEnabled = sal_False; + bAutoGrowSizeEnabled = sal_True; + bWordWrapTextEnabled = sal_True; } break; default: ;//prevent warning @@ -596,7 +596,7 @@ SfxTabPage* SvxTextAttrPage::Create( Window* pWindow, |* \************************************************************************/ -USHORT* SvxTextAttrPage::GetRanges() +sal_uInt16* SvxTextAttrPage::GetRanges() { return( pRanges ); } @@ -714,10 +714,10 @@ IMPL_LINK( SvxTextAttrPage, ClickFullWidthHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxTextAttrPage, ClickHdl_Impl, void *, EMPTYARG ) { - BOOL bAutoGrowWidth = aTsbAutoGrowWidth.GetState() == STATE_CHECK; - BOOL bAutoGrowHeight = aTsbAutoGrowHeight.GetState() == STATE_CHECK; - BOOL bFitToSize = aTsbFitToSize.GetState() == STATE_CHECK; - BOOL bContour = aTsbContour.GetState() == STATE_CHECK; + sal_Bool bAutoGrowWidth = aTsbAutoGrowWidth.GetState() == STATE_CHECK; + sal_Bool bAutoGrowHeight = aTsbAutoGrowHeight.GetState() == STATE_CHECK; + sal_Bool bFitToSize = aTsbFitToSize.GetState() == STATE_CHECK; + sal_Bool bContour = aTsbContour.GetState() == STATE_CHECK; aTsbContour.Enable( !bFitToSize && !( ( bAutoGrowWidth && bAutoGrowWidthEnabled ) || ( bAutoGrowHeight && bAutoGrowHeightEnabled ) ) && diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 774a58b4a34d..45469938b099 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -62,7 +62,7 @@ // static ---------------------------------------------------------------- -static USHORT pAreaRanges[] = +static sal_uInt16 pAreaRanges[] = { XATTR_GRADIENTSTEPCOUNT, XATTR_GRADIENTSTEPCOUNT, @@ -71,7 +71,7 @@ static USHORT pAreaRanges[] = 0 }; -static USHORT pTransparenceRanges[] = +static sal_uInt16 pTransparenceRanges[] = { XATTR_FILLTRANSPARENCE, XATTR_FILLTRANSPARENCE, @@ -91,8 +91,8 @@ static USHORT pTransparenceRanges[] = IMPL_LINK(SvxTransparenceTabPage, ClickTransOffHdl_Impl, void *, EMPTYARG) { // disable all other controls - ActivateLinear(FALSE); - ActivateGradient(FALSE); + ActivateLinear(sal_False); + ActivateGradient(sal_False); // Preview rXFSet.ClearItem (XATTR_FILLTRANSPARENCE); @@ -100,7 +100,7 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransOffHdl_Impl, void *, EMPTYARG) aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() ); - InvalidatePreview( FALSE ); + InvalidatePreview( sal_False ); return( 0L ); } @@ -108,8 +108,8 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransOffHdl_Impl, void *, EMPTYARG) IMPL_LINK(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, void *, EMPTYARG) { // enable linear, disable other - ActivateLinear(TRUE); - ActivateGradient(FALSE); + ActivateLinear(sal_True); + ActivateGradient(sal_False); // preview rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE); @@ -121,8 +121,8 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, void *, EMPTYARG) IMPL_LINK(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, void *, EMPTYARG) { // enable gradient, disable other - ActivateLinear(FALSE); - ActivateGradient(TRUE); + ActivateLinear(sal_False); + ActivateGradient(sal_True); // preview rXFSet.ClearItem (XATTR_FILLTRANSPARENCE); @@ -131,14 +131,14 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, void *, EMPTYARG) return( 0L ); } -void SvxTransparenceTabPage::ActivateLinear(BOOL bActivate) +void SvxTransparenceTabPage::ActivateLinear(sal_Bool bActivate) { aMtrTransparent.Enable(bActivate); } IMPL_LINK(SvxTransparenceTabPage, ModifyTransparentHdl_Impl, void*, EMPTYARG) { - UINT16 nPos = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nPos = (sal_uInt16)aMtrTransparent.GetValue(); XFillTransparenceItem aItem(nPos); rXFSet.Put(XFillTransparenceItem(aItem)); @@ -157,16 +157,16 @@ IMPL_LINK(SvxTransparenceTabPage, ModifiedTrgrHdl_Impl, void *, pControl) } // preview - UINT8 nStartCol = (UINT8)(((UINT16)aMtrTrgrStartValue.GetValue() * 255) / 100); - UINT8 nEndCol = (UINT8)(((UINT16)aMtrTrgrEndValue.GetValue() * 255) / 100); + sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrStartValue.GetValue() * 255) / 100); + sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrEndValue.GetValue() * 255) / 100); XGradient aTmpGradient( Color(nStartCol, nStartCol, nStartCol), Color(nEndCol, nEndCol, nEndCol), (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos(), - (UINT16)aMtrTrgrAngle.GetValue() * 10, - (UINT16)aMtrTrgrCenterX.GetValue(), - (UINT16)aMtrTrgrCenterY.GetValue(), - (UINT16)aMtrTrgrBorder.GetValue(), + (sal_uInt16)aMtrTrgrAngle.GetValue() * 10, + (sal_uInt16)aMtrTrgrCenterX.GetValue(), + (sal_uInt16)aMtrTrgrCenterY.GetValue(), + (sal_uInt16)aMtrTrgrBorder.GetValue(), 100, 100); String aString; @@ -178,7 +178,7 @@ IMPL_LINK(SvxTransparenceTabPage, ModifiedTrgrHdl_Impl, void *, pControl) return( 0L ); } -void SvxTransparenceTabPage::ActivateGradient(BOOL bActivate) +void SvxTransparenceTabPage::ActivateGradient(sal_Bool bActivate) { aFtTrgrType.Enable(bActivate); aLbTrgrGradientType.Enable(bActivate); @@ -281,7 +281,7 @@ SvxTransparenceTabPage::SvxTransparenceTabPage(Window* pParent, const SfxItemSet aCtlBitmapPreview ( this, CUI_RES( CTL_BITMAP_PREVIEW ) ), aCtlXRectPreview ( this, CUI_RES( CTL_TRANS_PREVIEW ) ), - bBitmap ( FALSE ), + bBitmap ( sal_False ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) @@ -323,33 +323,33 @@ SfxTabPage* SvxTransparenceTabPage::Create(Window* pWindow, const SfxItemSet& rA return(new SvxTransparenceTabPage(pWindow, rAttrs)); } -UINT16* SvxTransparenceTabPage::GetRanges() +sal_uInt16* SvxTransparenceTabPage::GetRanges() { return(pTransparenceRanges); } -BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) +sal_Bool SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) { const SfxPoolItem* pGradientItem = NULL; const SfxPoolItem* pLinearItem = NULL; - SfxItemState eStateGradient(rOutAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, TRUE, &pGradientItem)); - SfxItemState eStateLinear(rOutAttrs.GetItemState(XATTR_FILLTRANSPARENCE, TRUE, &pLinearItem)); - BOOL bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); - BOOL bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); + SfxItemState eStateGradient(rOutAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, sal_True, &pGradientItem)); + SfxItemState eStateLinear(rOutAttrs.GetItemState(XATTR_FILLTRANSPARENCE, sal_True, &pLinearItem)); + sal_Bool bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); + sal_Bool bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); // #103765# - BOOL bGradUsed = (eStateGradient == SFX_ITEM_DONTCARE); - BOOL bLinearUsed = (eStateLinear == SFX_ITEM_DONTCARE); + sal_Bool bGradUsed = (eStateGradient == SFX_ITEM_DONTCARE); + sal_Bool bLinearUsed = (eStateLinear == SFX_ITEM_DONTCARE); - BOOL bModified(FALSE); - BOOL bSwitchOffLinear(FALSE); - BOOL bSwitchOffGradient(FALSE); + sal_Bool bModified(sal_False); + sal_Bool bSwitchOffLinear(sal_False); + sal_Bool bSwitchOffGradient(sal_False); if(aMtrTransparent.IsEnabled()) { // linear transparence - UINT16 nPos = (UINT16)aMtrTransparent.GetValue(); - if(nPos != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() || !bLinearActive) + sal_uInt16 nPos = (sal_uInt16)aMtrTransparent.GetValue(); + if(nPos != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() || !bLinearActive) { XFillTransparenceItem aItem(nPos); SdrShadowTransparenceItem aShadowItem(nPos); @@ -358,8 +358,8 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) { rAttrs.Put(aItem); rAttrs.Put(aShadowItem); - bModified = TRUE; - bSwitchOffGradient = TRUE; + bModified = sal_True; + bSwitchOffGradient = sal_True; } } } @@ -368,23 +368,23 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) // transparence gradient, fill ItemSet from values if(!bGradActive || (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos() != (XGradientStyle)aLbTrgrGradientType.GetSavedValue() - || (UINT16)aMtrTrgrAngle.GetValue() != (UINT16)aMtrTrgrAngle.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrCenterX.GetValue() != (UINT16)aMtrTrgrCenterX.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrCenterY.GetValue() != (UINT16)aMtrTrgrCenterY.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrBorder.GetValue() != (UINT16)aMtrTrgrBorder.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrStartValue.GetValue() != (UINT16)aMtrTrgrStartValue.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrEndValue.GetValue() != (UINT16)aMtrTrgrEndValue.GetSavedValue().ToInt32() ) + || (sal_uInt16)aMtrTrgrAngle.GetValue() != (sal_uInt16)aMtrTrgrAngle.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrCenterX.GetValue() != (sal_uInt16)aMtrTrgrCenterX.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrCenterY.GetValue() != (sal_uInt16)aMtrTrgrCenterY.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrBorder.GetValue() != (sal_uInt16)aMtrTrgrBorder.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrStartValue.GetValue() != (sal_uInt16)aMtrTrgrStartValue.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrEndValue.GetValue() != (sal_uInt16)aMtrTrgrEndValue.GetSavedValue().ToInt32() ) { - UINT8 nStartCol = (UINT8)(((UINT16)aMtrTrgrStartValue.GetValue() * 255) / 100); - UINT8 nEndCol = (UINT8)(((UINT16)aMtrTrgrEndValue.GetValue() * 255) / 100); + sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrStartValue.GetValue() * 255) / 100); + sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrEndValue.GetValue() * 255) / 100); XGradient aTmpGradient( Color(nStartCol, nStartCol, nStartCol), Color(nEndCol, nEndCol, nEndCol), (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos(), - (UINT16)aMtrTrgrAngle.GetValue() * 10, - (UINT16)aMtrTrgrCenterX.GetValue(), - (UINT16)aMtrTrgrCenterY.GetValue(), - (UINT16)aMtrTrgrBorder.GetValue(), + (sal_uInt16)aMtrTrgrAngle.GetValue() * 10, + (sal_uInt16)aMtrTrgrCenterX.GetValue(), + (sal_uInt16)aMtrTrgrCenterY.GetValue(), + (sal_uInt16)aMtrTrgrBorder.GetValue(), 100, 100); String aString; @@ -394,16 +394,16 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) if(!pOld || !(*(const XFillFloatTransparenceItem*)pOld == aItem) || !bGradActive) { rAttrs.Put(aItem); - bModified = TRUE; - bSwitchOffLinear = TRUE; + bModified = sal_True; + bSwitchOffLinear = sal_True; } } } else { // no transparence - bSwitchOffGradient = TRUE; - bSwitchOffLinear = TRUE; + bSwitchOffGradient = sal_True; + bSwitchOffLinear = sal_True; } // disable unused XFillFloatTransparenceItem @@ -415,9 +415,9 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) aGrad.SetEndIntens(100); String aString; XFillFloatTransparenceItem aItem( rXFSet.GetPool()/*aString*/, aGrad); - aItem.SetEnabled(FALSE); + aItem.SetEnabled(sal_False); rAttrs.Put(aItem); - bModified = TRUE; + bModified = sal_True; } // disable unused XFillFloatTransparenceItem @@ -427,7 +427,7 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) SdrShadowTransparenceItem aShadowItem(0); rAttrs.Put(aItem); rAttrs.Put(aShadowItem); - bModified = TRUE; + bModified = sal_True; } //add CHINA001 begin rAttrs.Put (CntUInt16Item(SID_PAGE_TYPE,nPageType)); @@ -438,30 +438,30 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) void SvxTransparenceTabPage::Reset(const SfxItemSet& rAttrs) { const SfxPoolItem* pGradientItem = NULL; - SfxItemState eStateGradient(rAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, TRUE, &pGradientItem)); + SfxItemState eStateGradient(rAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, sal_True, &pGradientItem)); if(!pGradientItem) pGradientItem = &rAttrs.Get(XATTR_FILLFLOATTRANSPARENCE); - BOOL bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); + sal_Bool bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); const SfxPoolItem* pLinearItem = NULL; - SfxItemState eStateLinear(rAttrs.GetItemState(XATTR_FILLTRANSPARENCE, TRUE, &pLinearItem)); + SfxItemState eStateLinear(rAttrs.GetItemState(XATTR_FILLTRANSPARENCE, sal_True, &pLinearItem)); if(!pLinearItem) pLinearItem = &rAttrs.Get(XATTR_FILLTRANSPARENCE); - BOOL bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); + sal_Bool bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); // transparence gradient const XGradient& rGradient = ((XFillFloatTransparenceItem*)pGradientItem)->GetGradientValue(); XGradientStyle eXGS(rGradient.GetGradientStyle()); - aLbTrgrGradientType.SelectEntryPos(sal::static_int_cast< USHORT >(eXGS)); + aLbTrgrGradientType.SelectEntryPos(sal::static_int_cast< sal_uInt16 >(eXGS)); aMtrTrgrAngle.SetValue(rGradient.GetAngle() / 10); aMtrTrgrBorder.SetValue(rGradient.GetBorder()); aMtrTrgrCenterX.SetValue(rGradient.GetXOffset()); aMtrTrgrCenterY.SetValue(rGradient.GetYOffset()); - aMtrTrgrStartValue.SetValue((UINT16)((((UINT16)rGradient.GetStartColor().GetRed() + 1) * 100) / 255)); - aMtrTrgrEndValue.SetValue((UINT16)((((UINT16)rGradient.GetEndColor().GetRed() + 1) * 100) / 255)); + aMtrTrgrStartValue.SetValue((sal_uInt16)((((sal_uInt16)rGradient.GetStartColor().GetRed() + 1) * 100) / 255)); + aMtrTrgrEndValue.SetValue((sal_uInt16)((((sal_uInt16)rGradient.GetEndColor().GetRed() + 1) * 100) / 255)); // linear transparence - UINT16 nTransp = ((XFillTransparenceItem*)pLinearItem)->GetValue(); + sal_uInt16 nTransp = ((XFillTransparenceItem*)pLinearItem)->GetValue(); aMtrTransparent.SetValue(bLinearActive ? nTransp : 50); ModifyTransparentHdl_Impl(NULL); @@ -496,7 +496,7 @@ void SvxTransparenceTabPage::Reset(const SfxItemSet& rAttrs) aMtrTrgrStartValue.SaveValue(); aMtrTrgrEndValue.SaveValue(); - BOOL bActive = InitPreview ( rAttrs ); + sal_Bool bActive = InitPreview ( rAttrs ); InvalidatePreview ( bActive ); } @@ -530,7 +530,7 @@ void SvxTransparenceTabPage::PointChanged(Window* , RECT_POINT eRcPt) // // Preview-Methods // -BOOL SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet ) +sal_Bool SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet ) { // set transparencetyp for preview if ( aRbtTransOff.IsChecked() ) @@ -572,7 +572,7 @@ BOOL SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet ) return !aRbtTransOff.IsChecked(); } -void SvxTransparenceTabPage::InvalidatePreview (BOOL bEnable) +void SvxTransparenceTabPage::InvalidatePreview (sal_Bool bEnable) { if ( bBitmap ) { @@ -702,7 +702,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : aLbHatchBckgrdColor.Hide(); - aTsbOriginal.EnableTriState( FALSE ); + aTsbOriginal.EnableTriState( sal_False ); // this page needs ExchangeSupport @@ -719,8 +719,8 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : break; default: ;//prevent warning } - SetFieldUnit( aMtrFldXSize, eFUnit, TRUE ); - SetFieldUnit( aMtrFldYSize, eFUnit, TRUE ); + SetFieldUnit( aMtrFldXSize, eFUnit, sal_True ); + SetFieldUnit( aMtrFldYSize, eFUnit, sal_True ); // get PoolUnit SfxItemPool* pPool = rOutAttrs.GetPool(); @@ -765,7 +765,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : aTypeLB.SetSelectHdl( LINK( this, SvxAreaTabPage, SelectDialogTypeHdl_Impl ) ); // #i76307# always paint the preview in LTR, because this is what the document does - aCtlXRectPreview.EnableRTL(FALSE); + aCtlXRectPreview.EnableRTL(sal_False); } // ----------------------------------------------------------------------- @@ -785,8 +785,8 @@ void SvxAreaTabPage::Construct() void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) { - USHORT _nPos = 0; - USHORT nCount; + sal_uInt16 _nPos = 0; + sal_uInt16 nCount; //add CHINA001 Begin SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False); SFX_ITEMSET_ARG (&rSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS,sal_False); @@ -797,7 +797,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) //add CHINA001 end if( nDlgType == 0 )//CHINA001 if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = TRUE; + *pbAreaTP = sal_True; if( pColorTab ) { @@ -979,11 +979,11 @@ int SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) { const SfxPoolItem* pOld = NULL; - USHORT _nPos; - BOOL bModified = FALSE; + sal_uInt16 _nPos; + sal_Bool bModified = sal_False; if( nDlgType != 0 || *pbAreaTP )//CHINA001 if( *pDlgType != 0 || *pbAreaTP ) { @@ -1000,7 +1000,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1017,20 +1017,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillColorItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_SOLID ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1048,20 +1048,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillGradientItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_GRADIENT ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1079,7 +1079,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillHatchItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } XFillBackgroundItem aItem ( aCbxHatchBckgrd.IsChecked() ); @@ -1094,20 +1094,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillColorItem*)pOld == aFillColorItem ) ) { rAttrs.Put( aFillColorItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_HATCH ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1125,20 +1125,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) ) { rAttrs.Put( aFillBitmapItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_BITMAP ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1148,22 +1148,22 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) // Schrittweite if( aTsbStepCount.IsEnabled() ) { - UINT16 nValue = 0; - BOOL bValueModified = FALSE; + sal_uInt16 nValue = 0; + sal_Bool bValueModified = sal_False; TriState eState = aTsbStepCount.GetState(); if( eState == STATE_CHECK ) { if( eState != aTsbStepCount.GetSavedValue() ) - bValueModified = TRUE; + bValueModified = sal_True; } else { // Zustand != Disabled ? if( aNumFldStepCount.GetText().Len() > 0 ) { - nValue = (UINT16) aNumFldStepCount.GetValue(); - if( nValue != (UINT16) aNumFldStepCount.GetSavedValue().ToInt32() ) - bValueModified = TRUE; + nValue = (sal_uInt16) aNumFldStepCount.GetValue(); + if( nValue != (sal_uInt16) aNumFldStepCount.GetSavedValue().ToInt32() ) + bValueModified = sal_True; } } if( bValueModified ) @@ -1173,7 +1173,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XGradientStepCountItem*)pOld == aFillBitmapItem ) ) { rAttrs.Put( aFillBitmapItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1185,12 +1185,12 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( eState != aTsbTile.GetSavedValue() ) { XFillBmpTileItem aFillBmpTileItem( - sal::static_int_cast< BOOL >( eState ) ); + sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILE ); if ( !pOld || !( *(const XFillBmpTileItem*)pOld == aFillBmpTileItem ) ) { rAttrs.Put( aFillBmpTileItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1201,19 +1201,19 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( eState != aTsbStretch.GetSavedValue() ) { XFillBmpStretchItem aFillBmpStretchItem( - sal::static_int_cast< BOOL >( eState ) ); + sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_STRETCH ); if ( !pOld || !( *(const XFillBmpStretchItem*)pOld == aFillBmpStretchItem ) ) { rAttrs.Put( aFillBmpStretchItem ); - bModified = TRUE; + bModified = sal_True; } } } // Originalgroesse (im UI) wird wie folgt benutzt: // Controls sind disabled, muessen aber gesetzt werden. - // SizeX = 0; SizeY = 0; Log = TRUE + // SizeX = 0; SizeY = 0; Log = sal_True //aTsbScale TriState eState = aTsbScale.GetState(); @@ -1226,7 +1226,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( aTsbScale.IsEnabled() ) pItem = new XFillBmpSizeLogItem( eState == STATE_NOCHECK ); else if( aTsbOriginal.IsEnabled() && aTsbOriginal.GetState() == STATE_CHECK ) - pItem = new XFillBmpSizeLogItem( TRUE ); + pItem = new XFillBmpSizeLogItem( sal_True ); if( pItem ) { @@ -1234,7 +1234,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpSizeLogItem*)pOld == *pItem ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -1271,7 +1271,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpSizeXItem*)pOld == *pItem ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -1308,7 +1308,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpSizeYItem*)pOld == *pItem ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -1327,24 +1327,24 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) { if( aRbtRow.IsChecked() ) { - XFillBmpTileOffsetXItem aFillBmpTileOffsetXItem( (UINT16) aMtrFldOffset.GetValue() ); + XFillBmpTileOffsetXItem aFillBmpTileOffsetXItem( (sal_uInt16) aMtrFldOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILEOFFSETX ); if ( !pOld || !( *(const XFillBmpTileOffsetXItem*)pOld == aFillBmpTileOffsetXItem ) ) { rAttrs.Put( aFillBmpTileOffsetXItem ); rAttrs.Put( XFillBmpTileOffsetYItem( 0 ) ); - bModified = TRUE; + bModified = sal_True; } } else if( aRbtColumn.IsChecked() ) { - XFillBmpTileOffsetYItem aFillBmpTileOffsetYItem( (UINT16) aMtrFldOffset.GetValue() ); + XFillBmpTileOffsetYItem aFillBmpTileOffsetYItem( (sal_uInt16) aMtrFldOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILEOFFSETY ); if ( !pOld || !( *(const XFillBmpTileOffsetYItem*)pOld == aFillBmpTileOffsetYItem ) ) { rAttrs.Put( aFillBmpTileOffsetYItem ); rAttrs.Put( XFillBmpTileOffsetXItem( 0 ) ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1353,16 +1353,16 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) //aCtlPosition if( aCtlPosition.IsEnabled() ) { - BOOL bPut = FALSE; + sal_Bool bPut = sal_False; RECT_POINT _eRP = aCtlPosition.GetActualRP(); if( SFX_ITEM_DONTCARE == rOutAttrs.GetItemState( XATTR_FILLBMP_POS ) ) - bPut = TRUE; + bPut = sal_True; else { RECT_POINT eValue = ( ( const XFillBmpPosItem& ) rOutAttrs.Get( XATTR_FILLBMP_POS ) ).GetValue(); if( eValue != _eRP ) - bPut = TRUE; + bPut = sal_True; } if( bPut ) { @@ -1371,7 +1371,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpPosItem*)pOld == aFillBmpPosItem ) ) { rAttrs.Put( aFillBmpPosItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1383,12 +1383,12 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( sMtrXOffset.Len() > 0 && sMtrXOffset != aMtrFldXOffset.GetSavedValue() ) { - XFillBmpPosOffsetXItem aFillBmpPosOffsetXItem( (UINT16) aMtrFldXOffset.GetValue() ); + XFillBmpPosOffsetXItem aFillBmpPosOffsetXItem( (sal_uInt16) aMtrFldXOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_POSOFFSETX ); if ( !pOld || !( *(const XFillBmpPosOffsetXItem*)pOld == aFillBmpPosOffsetXItem ) ) { rAttrs.Put( aFillBmpPosOffsetXItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1400,12 +1400,12 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( sMtrYOffset.Len() > 0 && sMtrYOffset != aMtrFldYOffset.GetSavedValue() ) { - XFillBmpPosOffsetYItem aFillBmpPosOffsetYItem( (UINT16) aMtrFldYOffset.GetValue() ); + XFillBmpPosOffsetYItem aFillBmpPosOffsetYItem( (sal_uInt16) aMtrFldYOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_POSOFFSETY ); if ( !pOld || !( *(const XFillBmpPosOffsetYItem*)pOld == aFillBmpPosOffsetYItem ) ) { rAttrs.Put( aFillBmpPosOffsetYItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1429,7 +1429,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) { eXFS = (XFillStyle) ( ( ( const XFillStyleItem& ) rAttrs. Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() ); - aTypeLB.SelectEntryPos( sal::static_int_cast< USHORT >( eXFS ) ); + aTypeLB.SelectEntryPos( sal::static_int_cast< sal_uInt16 >( eXFS ) ); switch( eXFS ) { case XFILL_NONE: @@ -1437,7 +1437,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) break; case XFILL_SOLID: - //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLCOLOR ) ) { XFillColorItem aColorItem( ( const XFillColorItem& ) @@ -1451,7 +1451,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) break; case XFILL_GRADIENT: - //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) ) + //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True, &pPoolItem ) ) if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLGRADIENT ) ) { XFillGradientItem aGradientItem( ( ( const XFillGradientItem& ) @@ -1465,7 +1465,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) break; case XFILL_HATCH: - //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) ) + //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True, &pPoolItem ) ) if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLHATCH ) ) { aLbHatching.SelectEntry( ( ( const XFillHatchItem& ) @@ -1527,8 +1527,8 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) if( ( rAttrs.GetItemState( XATTR_GRADIENTSTEPCOUNT ) != SFX_ITEM_DONTCARE ) || ( rAttrs.GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE ) ) { - aTsbStepCount.EnableTriState( FALSE ); - UINT16 nValue = ( ( const XGradientStepCountItem& ) rAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue(); + aTsbStepCount.EnableTriState( sal_False ); + sal_uInt16 nValue = ( ( const XGradientStepCountItem& ) rAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue(); if( nValue == 0 ) { aTsbStepCount.SetState( STATE_CHECK ); @@ -1552,7 +1552,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) // Ist Kacheln gesetzt? if( rAttrs.GetItemState( XATTR_FILLBMP_TILE ) != SFX_ITEM_DONTCARE ) { - aTsbTile.EnableTriState( FALSE ); + aTsbTile.EnableTriState( sal_False ); if( ( ( const XFillBmpTileItem& ) rAttrs.Get( XATTR_FILLBMP_TILE ) ).GetValue() ) aTsbTile.SetState( STATE_CHECK ); @@ -1565,7 +1565,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) // Ist Stretchen gesetzt? if( rAttrs.GetItemState( XATTR_FILLBMP_STRETCH ) != SFX_ITEM_DONTCARE ) { - aTsbStretch.EnableTriState( FALSE ); + aTsbStretch.EnableTriState( sal_False ); if( ( ( const XFillBmpStretchItem& ) rAttrs.Get( XATTR_FILLBMP_STRETCH ) ).GetValue() ) aTsbStretch.SetState( STATE_CHECK ); @@ -1579,7 +1579,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aTsbScale if( rAttrs.GetItemState( XATTR_FILLBMP_SIZELOG ) != SFX_ITEM_DONTCARE ) { - aTsbScale.EnableTriState( FALSE ); + aTsbScale.EnableTriState( sal_False ); if( ( ( const XFillBmpSizeLogItem& ) rAttrs.Get( XATTR_FILLBMP_SIZELOG ) ).GetValue() ) aTsbScale.SetState( STATE_NOCHECK ); @@ -1598,7 +1598,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldXSize if( rAttrs.GetItemState( XATTR_FILLBMP_SIZEX ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpSizeXItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEX ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpSizeXItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEX ) ).GetValue(); if( aTsbScale.GetState() == STATE_CHECK ) { // Wenn im Item eine Prozentangabe steckt, @@ -1626,7 +1626,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldYSize if( rAttrs.GetItemState( XATTR_FILLBMP_SIZEY ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpSizeYItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEY ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpSizeYItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEY ) ).GetValue(); if( aTsbScale.GetState() == STATE_CHECK ) { // Wenn im Item eine Prozentangabe steckt, @@ -1660,7 +1660,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldOffset if( rAttrs.GetItemState( XATTR_FILLBMP_TILEOFFSETX ) != SFX_ITEM_DONTCARE ) { - UINT16 nValue = ( ( const XFillBmpTileOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_TILEOFFSETX ) ).GetValue(); + sal_uInt16 nValue = ( ( const XFillBmpTileOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_TILEOFFSETX ) ).GetValue(); if( nValue > 0 ) { aMtrFldOffset.SetValue( nValue ); @@ -1694,7 +1694,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldXOffset if( rAttrs.GetItemState( XATTR_FILLBMP_POSOFFSETX ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpPosOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETX ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpPosOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETX ) ).GetValue(); aMtrFldXOffset.SetValue( nValue ); } else @@ -1703,7 +1703,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldYOffset if( rAttrs.GetItemState( XATTR_FILLBMP_POSOFFSETY ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpPosOffsetYItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETY ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpPosOffsetYItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETY ) ).GetValue(); aMtrFldYOffset.SetValue( nValue ); } else @@ -1746,7 +1746,7 @@ SfxTabPage* SvxAreaTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxAreaTabPage::GetRanges() +sal_uInt16* SvxAreaTabPage::GetRanges() { return( pAreaRanges ); } @@ -1878,7 +1878,7 @@ IMPL_LINK( SvxAreaTabPage, ClickColorHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyColorHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbColor.GetSelectEntryPos(); aLbHatchBckgrdColor.SelectEntryPos( _nPos ); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -1887,7 +1887,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyColorHdl_Impl, void *, EMPTYARG ) aLbColor.GetSelectEntryColor() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); @@ -1969,7 +1969,7 @@ IMPL_LINK( SvxAreaTabPage, ClickGradientHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyGradientHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbGradient.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbGradient.GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { // ItemSet fuellen und an aCtlXRectPreview weiterleiten @@ -1980,7 +1980,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyGradientHdl_Impl, void *, EMPTYARG ) pEntry->GetGradient() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); rXFSet.Put( XFillGradientItem( String(), ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ) ); @@ -2066,7 +2066,7 @@ IMPL_LINK( SvxAreaTabPage, ClickHatchingHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbHatching.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbHatching.GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { // ItemSet fuellen und an aCtlXRectPreview weiterleiten @@ -2076,7 +2076,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG ) rXFSet.Put( XFillHatchItem( String(), pEntry->GetHatch() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_HATCH ) ); rXFSet.Put( XFillHatchItem( String(), ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ) ); @@ -2095,7 +2095,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbHatchBckgrdColor.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbHatchBckgrdColor.GetSelectEntryPos(); aLbColor.SelectEntryPos( _nPos ); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -2104,7 +2104,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl, void *, EMPTYARG ) aLbHatchBckgrdColor.GetSelectEntryColor() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { // rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); @@ -2232,7 +2232,7 @@ IMPL_LINK( SvxAreaTabPage, ClickBitmapHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbBitmap.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbBitmap.GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { // ItemSet fuellen und an aCtlXRectPreview weiterleiten @@ -2242,7 +2242,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG ) rXFSet.Put( XFillBitmapItem( String(), pEntry->GetXBitmap() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_BITMAP ) ); rXFSet.Put( XFillBitmapItem( String(), ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() ) ); @@ -2260,7 +2260,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG ) //IMPL_LINK( SvxAreaTabPage, ModifyTransparentHdl_Impl, void *, EMPTYARG ) //{ -// USHORT nPos = aLbTransparent.GetSelectEntryPos(); +// sal_uInt16 nPos = aLbTransparent.GetSelectEntryPos(); // if( nPos != LISTBOX_ENTRY_NOTFOUND ) // { // XFillTransparenceItem aItem( nPos * 25 ); @@ -2291,12 +2291,12 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p ) aNumFldStepCount.Disable(); } - UINT16 nValue = 0; + sal_uInt16 nValue = 0; if( aTsbStepCount.GetState() != STATE_CHECK ) { // Zustand != Disabled ? if( aNumFldStepCount.GetText().Len() > 0 ) - nValue = (UINT16) aNumFldStepCount.GetValue(); + nValue = (sal_uInt16) aNumFldStepCount.GetValue(); } rXFSet.Put( XGradientStepCountItem( nValue ) ); aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() ); @@ -2421,12 +2421,12 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) */ } - rXFSet.Put( XFillBmpTileItem( sal::static_int_cast< BOOL >( eState ) ) ); + rXFSet.Put( XFillBmpTileItem( sal::static_int_cast< sal_Bool >( eState ) ) ); if( aTsbStretch.IsEnabled() ) rXFSet.Put( XFillBmpStretchItem( - sal::static_int_cast< BOOL >( aTsbStretch.GetState() ) ) ); + sal::static_int_cast< sal_Bool >( aTsbStretch.GetState() ) ) ); if( aTsbScale.IsEnabled() ) rXFSet.Put( XFillBmpSizeLogItem( aTsbScale.GetState() == STATE_NOCHECK ) ); @@ -2449,7 +2449,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) { // Originalgroesse -> Size == 0 rXFSet.Put( XFillBmpSizeXItem( 0 ) ); - rXFSet.Put( XFillBmpSizeLogItem( TRUE ) ); + rXFSet.Put( XFillBmpSizeLogItem( sal_True ) ); } if( aMtrFldYSize.IsEnabled() ) @@ -2470,20 +2470,20 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) { // Originalgroesse -> Size == 0 rXFSet.Put( XFillBmpSizeYItem( 0 ) ); - rXFSet.Put( XFillBmpSizeLogItem( TRUE ) ); + rXFSet.Put( XFillBmpSizeLogItem( sal_True ) ); } if( aMtrFldOffset.IsEnabled() ) { if( aRbtRow.IsChecked() ) { - rXFSet.Put( XFillBmpTileOffsetXItem( (UINT16) aMtrFldOffset.GetValue() ) ); - rXFSet.Put( XFillBmpTileOffsetYItem( (UINT16) 0 ) ); + rXFSet.Put( XFillBmpTileOffsetXItem( (sal_uInt16) aMtrFldOffset.GetValue() ) ); + rXFSet.Put( XFillBmpTileOffsetYItem( (sal_uInt16) 0 ) ); } else if( aRbtColumn.IsChecked() ) { - rXFSet.Put( XFillBmpTileOffsetXItem( (UINT16) 0 ) ); - rXFSet.Put( XFillBmpTileOffsetYItem( (UINT16) aMtrFldOffset.GetValue() ) ); + rXFSet.Put( XFillBmpTileOffsetXItem( (sal_uInt16) 0 ) ); + rXFSet.Put( XFillBmpTileOffsetYItem( (sal_uInt16) aMtrFldOffset.GetValue() ) ); } } @@ -2491,10 +2491,10 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) rXFSet.Put( XFillBmpPosItem( aCtlPosition.GetActualRP() ) ); if( aMtrFldXOffset.IsEnabled() ) - rXFSet.Put( XFillBmpPosOffsetXItem( (UINT16) aMtrFldXOffset.GetValue() ) ); + rXFSet.Put( XFillBmpPosOffsetXItem( (sal_uInt16) aMtrFldXOffset.GetValue() ) ); if( aMtrFldYOffset.IsEnabled() ) - rXFSet.Put( XFillBmpPosOffsetYItem( (UINT16) aMtrFldYOffset.GetValue() ) ); + rXFSet.Put( XFillBmpPosOffsetYItem( (sal_uInt16) aMtrFldYOffset.GetValue() ) ); aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() ); diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 9060b6fb013e..640df280f066 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -166,12 +166,12 @@ void SvxBitmapTabPage::Construct() void SvxBitmapTabPage::ActivatePage( const SfxItemSet& ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -254,9 +254,9 @@ int SvxBitmapTabPage::DeactivatePage( SfxItemSet* _pSet) // ----------------------------------------------------------------------- -BOOL SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) +sal_Bool SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) { - if( *pDlgType == 0 && *pbAreaTP == FALSE ) // Flaechen-Dialog + if( *pDlgType == 0 && *pbAreaTP == sal_False ) // Flaechen-Dialog { if( *pPageType == PT_BITMAP ) { @@ -264,7 +264,7 @@ BOOL SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) XOBitmap aXOBitmap; String aString; - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aXOBitmap = pBitmapList->GetBitmap( nPos )->GetXBitmap(); @@ -284,7 +284,7 @@ BOOL SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) _rOutAttrs.Put( XFillBitmapItem( aString, aXOBitmap ) ); } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -342,11 +342,11 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) ) { XFillStyle eXFS = (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue(); if( ( XFILL_BITMAP == eXFS ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE, &pPoolItem ) ) ) + ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True, &pPoolItem ) ) ) { pXOBitmap = new XOBitmap( ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() ); } @@ -363,11 +363,11 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) { //WorkWindow aTmpWW( DLGWIN ); //VirtualDevice aVD( aTmpWW ); - //USHORT nLines = aCtlPixel.GetLineCount(); + //sal_uInt16 nLines = aCtlPixel.GetLineCount(); //Color aPixelColor, aBackColor; - //BOOL bPixelColor = FALSE; - //USHORT nWidth = pBitmap->GetSizePixel().Width(); - //USHORT nHeight = pBitmap->GetSizePixel().Height(); + //sal_Bool bPixelColor = sal_False; + //sal_uInt16 nWidth = pBitmap->GetSizePixel().Width(); + //sal_uInt16 nHeight = pBitmap->GetSizePixel().Height(); // #85339# try to convert bitmapped item to array item. if(pXOBitmap->GetBitmapType() == XBITMAP_IMPORT) @@ -381,7 +381,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) sal_uInt32 nCol1(0xffffffff); // background sal_uInt32 nCol2(0xffffffff); // pixel BitmapReadAccess* pAccess = aBitmap.AcquireReadAccess(); - sal_Bool bValid(TRUE); + sal_Bool bValid(sal_True); if(pAccess) { @@ -414,7 +414,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) else { // Third color detected - bValid = FALSE; + bValid = sal_False; } } else @@ -437,7 +437,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) else { // no access -> no success - bValid = FALSE; + bValid = sal_False; } if(bValid) @@ -470,7 +470,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) if( pXOBitmap->GetBitmapType() == XBITMAP_IMPORT ) { aCtlPixel.Reset(); - aCtlPixel.SetPaintable( FALSE ); + aCtlPixel.SetPaintable( sal_False ); aCtlPixel.Disable(); aFtPixelEdit.Disable(); aFtColor.Disable(); @@ -482,7 +482,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) } else if( pXOBitmap->GetBitmapType() == XBITMAP_8X8 ) { - aCtlPixel.SetPaintable( TRUE ); + aCtlPixel.SetPaintable( sal_True ); aCtlPixel.Enable(); aFtPixelEdit.Enable(); aFtColor.Enable(); @@ -531,7 +531,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = FALSE; + bBmpChanged = sal_False; delete pXOBitmap; } return 0L; @@ -541,7 +541,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) long SvxBitmapTabPage::CheckChanges_Impl() { - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { String aString = aLbBitmaps.GetSelectEntry(); @@ -582,7 +582,7 @@ long SvxBitmapTabPage::CheckChanges_Impl() case RET_CANCEL: // return( -1L ); break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } @@ -604,18 +604,18 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pBitmapList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pBitmapList->GetBitmap( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -623,17 +623,17 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 WarningBox* pWarnBox = NULL; - USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; while( pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pBitmapList->GetBitmap( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { nError = 0; @@ -671,7 +671,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) else // Es muss sich um eine nicht vorhandene importierte Bitmap handeln { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( XATTR_FILLBITMAP, TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( XATTR_FILLBITMAP, sal_True, &pPoolItem ) ) { XOBitmap aXOBitmap( ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() ); pEntry = new XBitmapEntry( aXOBitmap, aName ); @@ -690,7 +690,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); //aLbBitmaps.Invalidate(); @@ -758,12 +758,12 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) { pDlg->GetName( aName ); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; long nCount = pBitmapList->Count(); for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pBitmapList->GetBitmap( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { nError = 0; @@ -799,7 +799,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); //aLbBitmaps.Invalidate(); @@ -830,7 +830,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -846,24 +846,24 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 long nCount = pBitmapList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pBitmapList->GetBitmap( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; XBitmapEntry* pEntry = pBitmapList->GetBitmap( nPos ); pEntry->SetName( aName ); @@ -882,7 +882,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) // Flag fuer modifiziert setzen *pnBitmapListState |= CT_MODIFIED; - bBmpChanged = FALSE; + bBmpChanged = sal_False; } else { @@ -900,7 +900,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBitmapTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -936,7 +936,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; ResMgr& rMgr = CUI_MGR(); if ( *pnBitmapListState & CT_MODIFIED ) @@ -1108,7 +1108,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangePixelColorHdl_Impl, void *, EMPTYARG ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = TRUE; + bBmpChanged = sal_True; return 0L; } @@ -1127,7 +1127,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl, void *, EMPTYARG ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = TRUE; + bBmpChanged = sal_True; return 0L; } @@ -1145,7 +1145,7 @@ void SvxBitmapTabPage::PointChanged( Window* pWindow, RECT_POINT ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = TRUE; + bBmpChanged = sal_True; } } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 5152bd0e9478..d1e39b9cd8a0 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -117,7 +117,7 @@ SvxColorTabPage::SvxColorTabPage rOutAttrs ( rInAttrs ), pColorTab( NULL ), - bDeleteColorTable ( TRUE ), + bDeleteColorTable ( sal_True ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFStyleItem ( XFILL_SOLID ), @@ -189,7 +189,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& ) { if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -204,7 +204,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& ) else if( *pPageType == PT_COLOR && *pPos == LISTBOX_ENTRY_NOTFOUND ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { aLbColorModel.SelectEntryPos( CM_RGB ); @@ -286,7 +286,7 @@ long SvxColorTabPage::CheckChanges_Impl() if (eCM != CM_RGB) ConvertColorValues (aTmpColor, CM_RGB); - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { Color aColor = pColorTab->GetColor( nPos )->GetColor(); @@ -336,7 +336,7 @@ long SvxColorTabPage::CheckChanges_Impl() case RET_CANCEL: // return( -1L ); <-- wuerde die Seite nicht verlassen break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } @@ -354,17 +354,17 @@ long SvxColorTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxColorTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxColorTabPage::FillItemSet( SfxItemSet& rSet ) { if( ( *pDlgType != 0 ) || - ( *pPageType == PT_COLOR && *pbAreaTP == FALSE ) ) + ( *pPageType == PT_COLOR && *pbAreaTP == sal_False ) ) { String aString; Color aColor; // CheckChanges_Impl(); <-- doppelte Abfrage ? - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aColor = pColorTab->GetColor( nPos )->GetColor(); @@ -380,14 +380,14 @@ BOOL SvxColorTabPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( XFillStyleItem( XFILL_SOLID ) ); } - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- void SvxColorTabPage::Reset( const SfxItemSet& rSet ) { - USHORT nState = rSet.GetItemState( XATTR_FILLCOLOR ); + sal_uInt16 nState = rSet.GetItemState( XATTR_FILLCOLOR ); if ( nState >= SFX_ITEM_DEFAULT ) { @@ -399,7 +399,7 @@ void SvxColorTabPage::Reset( const SfxItemSet& rSet ) // Farbmodell setzen String aStr = GetUserData(); - aLbColorModel.SelectEntryPos( (USHORT) aStr.ToInt32() ); + aLbColorModel.SelectEntryPos( (sal_uInt16) aStr.ToInt32() ); ChangeColorHdl_Impl( this ); SelectColorModelHdl_Impl( this ); @@ -439,10 +439,10 @@ SfxTabPage* SvxColorTabPage::Create( Window* pWindow, IMPL_LINK( SvxColorTabPage, ModifiedHdl_Impl, void *, EMPTYARG ) { // lese aktuelle MtrFields aus, wenn cmyk, dann k-Wert als Trans.-Farbe - aAktuellColor.SetColor ( Color( (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel4.GetValue() ), - (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel1.GetValue() ), - (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel2.GetValue() ), - (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel3.GetValue() ) ).GetColor() ); + aAktuellColor.SetColor ( Color( (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel4.GetValue() ), + (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel1.GetValue() ), + (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel2.GetValue() ), + (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel3.GetValue() ) ).GetColor() ); Color aTmpColor(aAktuellColor); if (eCM != CM_RGB) @@ -476,12 +476,12 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) String aName( aEdtName.GetText() ); XColorEntry* pEntry; long nCount = pColorTab->Count(); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; // Pruefen, ob Name schon vorhanden ist for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pColorTab->GetColor( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) @@ -495,21 +495,21 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( !bDifferent && bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pColorTab->GetColor( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) - bLoop = FALSE; + bLoop = sal_False; else aWarningBox.Execute(); } @@ -554,7 +554,7 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) // IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -562,12 +562,12 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) String aDesc( ResId( RID_SVXSTR_DESC_COLOR, rMgr ) ); String aName( aEdtName.GetText() ); long nCount = pColorTab->Count(); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; // Pruefen, ob Name schon vorhanden ist for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pColorTab->GetColor( i )->GetName() && nPos != i ) - bDifferent = FALSE; + bDifferent = sal_False; // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) @@ -581,19 +581,19 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( !bDifferent && bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for ( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pColorTab->GetColor( i )->GetName() && nPos != i ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) - bLoop = FALSE; + bLoop = sal_False; else aWarningBox.Execute(); } @@ -645,7 +645,7 @@ IMPL_LINK( SvxColorTabPage, ClickWorkOnHdl_Impl, void *, EMPTYARG ) if( pColorDlg->Execute() == RET_OK ) { - USHORT nK = 0; + sal_uInt16 nK = 0; Color aPreviewColor = pColorDlg->GetColor(); aAktuellColor = aPreviewColor; if (eCM != CM_RGB) @@ -675,7 +675,7 @@ IMPL_LINK( SvxColorTabPage, ClickWorkOnHdl_Impl, void *, EMPTYARG ) // IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -685,14 +685,14 @@ IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) if( aQueryBox.Execute() == RET_YES ) { // Jetzt wird richtig geloescht - ULONG nCount = pColorTab->Count() - 1; + sal_uLong nCount = pColorTab->Count() - 1; XColorEntry* pEntry; pEntry = pColorTab->Remove( nPos ); DBG_ASSERT( pEntry, "ColorEntry nicht vorhanden (1) !" ); delete pEntry; - for( ULONG i = nPos; i < nCount; i++ ) + for( sal_uLong i = nPos; i < nCount; i++ ) { pEntry = pColorTab->Remove( i + 1 ); DBG_ASSERT( pEntry, "ColorEntry nicht vorhanden (2) !" ); @@ -733,7 +733,7 @@ IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxColorTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if( *pnColorTableState & CT_MODIFIED ) { @@ -787,7 +787,7 @@ IMPL_LINK( SvxColorTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if( bDeleteColorTable ) delete pColorTab; else - bDeleteColorTable = TRUE; + bDeleteColorTable = sal_True; } pColorTab = pColTab; @@ -934,7 +934,7 @@ IMPL_LINK( SvxColorTabPage, ClickSaveHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxColorTabPage, SelectColorLBHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aValSetColorTable.SelectItem( nPos + 1 ); @@ -957,7 +957,7 @@ IMPL_LINK( SvxColorTabPage, SelectColorLBHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxColorTabPage, SelectValSetHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aValSetColorTable.GetSelectItemId(); + sal_uInt16 nPos = aValSetColorTable.GetSelectItemId(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aLbColor.SelectEntryPos( nPos - 1 ); @@ -987,16 +987,16 @@ void SvxColorTabPage::ConvertColorValues (Color& rColor, ColorModel eModell) { case CM_RGB: { - CmykToRgb_Impl (rColor, (USHORT)rColor.GetTransparency() ); - rColor.SetTransparency ((UINT8) 0); + CmykToRgb_Impl (rColor, (sal_uInt16)rColor.GetTransparency() ); + rColor.SetTransparency ((sal_uInt8) 0); } break; case CM_CMYK: { - USHORT nK; + sal_uInt16 nK; RgbToCmyk_Impl (rColor, nK ); - rColor.SetTransparency ((UINT8) nK); + rColor.SetTransparency ((sal_uInt8) nK); } break; } @@ -1162,7 +1162,7 @@ void SvxColorTabPage::FillValueSet_Impl( ValueSet& rVs ) for( long i = 0; i < nCount; i++ ) { pColorEntry = pColorTab->GetColor( i ); - rVs.InsertItem( (USHORT) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); + rVs.InsertItem( (sal_uInt16) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); } } @@ -1174,10 +1174,10 @@ void SvxColorTabPage::FillValueSet_Impl( ValueSet& rVs ) // Bei weiteren Farbmodellen sollte man hierfuer eigene Klassen entwickeln, // die dann auch entsprechende Casts enthalten. -void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, USHORT& rK ) +void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK ) { - USHORT nColor1, nColor2, nColor3; - USHORT nProzent; // nur temporaer !!! + sal_uInt16 nColor1, nColor2, nColor3; + sal_uInt16 nProzent; // nur temporaer !!! nColor1 = 255 - rColor.GetRed(); nProzent = ColorToPercent_Impl( nColor1 ); @@ -1190,16 +1190,16 @@ void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, USHORT& rK ) rK = Min( Min( nColor1, nColor2 ), nColor3 ); - rColor.SetRed( sal::static_int_cast< UINT8 >( nColor1 - rK ) ); - rColor.SetGreen( sal::static_int_cast< UINT8 >( nColor2 - rK ) ); - rColor.SetBlue( sal::static_int_cast< UINT8 >( nColor3 - rK ) ); + rColor.SetRed( sal::static_int_cast< sal_uInt8 >( nColor1 - rK ) ); + rColor.SetGreen( sal::static_int_cast< sal_uInt8 >( nColor2 - rK ) ); + rColor.SetBlue( sal::static_int_cast< sal_uInt8 >( nColor3 - rK ) ); } //------------------------------------------------------------------------ // Umgekehrter Fall zu RgbToCmyk_Impl (s.o.) -void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const USHORT nK ) +void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const sal_uInt16 nK ) { long lTemp; @@ -1207,26 +1207,26 @@ void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const USHORT nK ) if( lTemp < 0L ) lTemp = 0L; - rColor.SetRed( (BYTE)lTemp ); + rColor.SetRed( (sal_uInt8)lTemp ); lTemp = 255 - ( rColor.GetGreen() + nK ); if( lTemp < 0L ) lTemp = 0L; - rColor.SetGreen( (BYTE)lTemp ); + rColor.SetGreen( (sal_uInt8)lTemp ); lTemp = 255 - ( rColor.GetBlue() + nK ); if( lTemp < 0L ) lTemp = 0L; - rColor.SetBlue( (BYTE)lTemp ); + rColor.SetBlue( (sal_uInt8)lTemp ); } //------------------------------------------------------------------------ -USHORT SvxColorTabPage::ColorToPercent_Impl( USHORT nColor ) +sal_uInt16 SvxColorTabPage::ColorToPercent_Impl( sal_uInt16 nColor ) { - USHORT nWert = 0; + sal_uInt16 nWert = 0; switch (eCM) { @@ -1235,7 +1235,7 @@ USHORT SvxColorTabPage::ColorToPercent_Impl( USHORT nColor ) break; case CM_CMYK: - nWert = (USHORT) ( (double) nColor * 100.0 / 255.0 + 0.5 ); + nWert = (sal_uInt16) ( (double) nColor * 100.0 / 255.0 + 0.5 ); break; } @@ -1244,9 +1244,9 @@ USHORT SvxColorTabPage::ColorToPercent_Impl( USHORT nColor ) //------------------------------------------------------------------------ -USHORT SvxColorTabPage::PercentToColor_Impl( USHORT nPercent ) +sal_uInt16 SvxColorTabPage::PercentToColor_Impl( sal_uInt16 nPercent ) { - USHORT nWert = 0; + sal_uInt16 nWert = 0; switch (eCM) { @@ -1255,7 +1255,7 @@ USHORT SvxColorTabPage::PercentToColor_Impl( USHORT nPercent ) break; case CM_CMYK: - nWert = (USHORT) ( (double) nPercent * 255.0 / 100.0 + 0.5 ); + nWert = (sal_uInt16) ( (double) nPercent * 255.0 / 100.0 + 0.5 ); break; } diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 1de256416b9d..63a2f3bbfd4e 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -155,7 +155,7 @@ SvxGradientTabPage::SvxGradientTabPage LINK( this, SvxGradientTabPage, ClickSaveHdl_Impl ) ); // #i76307# always paint the preview in LTR, because this is what the document does - aCtlPreview.EnableRTL( FALSE ); + aCtlPreview.EnableRTL( sal_False ); } // ----------------------------------------------------------------------- @@ -174,12 +174,12 @@ void SvxGradientTabPage::Construct() void SvxGradientTabPage::ActivatePage( const SfxItemSet& ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -268,13 +268,13 @@ long SvxGradientTabPage::CheckChanges_Impl() aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { XGradient aGradient = pGradientList->GetGradient( nPos )->GetGradient(); @@ -318,7 +318,7 @@ long SvxGradientTabPage::CheckChanges_Impl() case RET_CANCEL: // return( -1L ); <-- wuerde die Seite nicht verlassen break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } @@ -333,15 +333,15 @@ long SvxGradientTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) { - if( *pDlgType == 0 && *pPageType == PT_GRADIENT && *pbAreaTP == FALSE ) + if( *pDlgType == 0 && *pPageType == PT_GRADIENT && *pbAreaTP == sal_False ) { // CheckChanges(); <-- doppelte Abfrage ? XGradient* pXGradient = NULL; String aString; - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { pXGradient = new XGradient( pGradientList->GetGradient( nPos )->GetGradient() ); @@ -355,11 +355,11 @@ BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); } DBG_ASSERT( pXGradient, "XGradient konnte nicht erzeugt werden" ); rSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); @@ -367,7 +367,7 @@ BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) delete pXGradient; } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -410,11 +410,11 @@ IMPL_LINK( SvxGradientTabPage, ModifiedHdl_Impl, void *, pControl ) aLbColorTo.GetSelectEntryColor(), eXGS, static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); // Enablen/Disablen von Controls if( pControl == &aLbGradientType || pControl == this ) @@ -440,18 +440,18 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pGradientList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pGradientList->GetGradient( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -459,17 +459,17 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 WarningBox* pWarnBox = NULL; - USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; while( pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pGradientList->GetGradient( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { @@ -498,11 +498,11 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); XGradientEntry* pEntry = new XGradientEntry( aXGradient, aName ); pGradientList->Insert( pEntry, nCount ); @@ -514,7 +514,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbGradients.GetPosPixel(), aLbGradients.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); //aLbGradients.Invalidate(); @@ -541,7 +541,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -557,33 +557,33 @@ IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 long nCount = pGradientList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pGradientList->GetGradient( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; XGradient aXGradient( aLbColorFrom.GetSelectEntryColor(), aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); XGradientEntry* pEntry = new XGradientEntry( aXGradient, aName ); @@ -613,7 +613,7 @@ IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -649,7 +649,7 @@ IMPL_LINK( SvxGradientTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnGradientListState & CT_MODIFIED ) { @@ -823,10 +823,10 @@ IMPL_LINK( SvxGradientTabPage, ChangeGradientHdl_Impl, void *, EMPTYARG ) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) ) { if( ( XFILL_GRADIENT == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) ) ) + ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True, &pPoolItem ) ) ) { pGradient = new XGradient( ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ); } @@ -845,7 +845,7 @@ IMPL_LINK( SvxGradientTabPage, ChangeGradientHdl_Impl, void *, EMPTYARG ) XGradientStyle eXGS = pGradient->GetGradientStyle(); aLbGradientType.SelectEntryPos( - sal::static_int_cast< USHORT >( eXGS ) ); + sal::static_int_cast< sal_uInt16 >( eXGS ) ); // Wenn der EIntrag nicht in der Listbox ist, werden die Farben // temporaer hinzugenommen aLbColorFrom.SetNoSelection(); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 4fa65d95221a..556268f2e025 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -170,12 +170,12 @@ void SvxHatchTabPage::Construct() void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -291,12 +291,12 @@ long SvxHatchTabPage::CheckChanges_Impl() case RET_CANCEL: // return( -1L ); <-- wuerde die Seite nicht verlassen break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) *pPos = nPos; return 0L; @@ -304,9 +304,9 @@ long SvxHatchTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) { - if( *pDlgType == 0 && *pbAreaTP == FALSE ) // Flaechen-Dialog + if( *pDlgType == 0 && *pbAreaTP == sal_False ) // Flaechen-Dialog { if( *pPageType == PT_HATCH ) { @@ -314,7 +314,7 @@ BOOL SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) XHatch* pXHatch = NULL; String aString; - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { pXHatch = new XHatch( pHatchingList->GetHatch( nPos )->GetHatch() ); @@ -335,7 +335,7 @@ BOOL SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) delete pXHatch; } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -419,10 +419,10 @@ IMPL_LINK( SvxHatchTabPage, ChangeHatchHdl_Impl, void *, EMPTYARG ) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) ) { if( ( XFILL_HATCH == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) ) ) + ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True, &pPoolItem ) ) ) { pHatch = new XHatch( ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ); } @@ -438,7 +438,7 @@ IMPL_LINK( SvxHatchTabPage, ChangeHatchHdl_Impl, void *, EMPTYARG ) if( pHatch ) { aLbLineType.SelectEntryPos( - sal::static_int_cast< USHORT >( pHatch->GetHatchStyle() ) ); + sal::static_int_cast< sal_uInt16 >( pHatch->GetHatchStyle() ) ); // Wenn der Eintrag nicht in der Listbox ist, wird die Farbe // temporaer hinzugenommen aLbLineColor.SetNoSelection(); @@ -468,10 +468,10 @@ IMPL_LINK( SvxHatchTabPage, ChangeHatchHdl_Impl, void *, EMPTYARG ) // Backgroundcolor /* const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBACKGROUND ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBACKGROUND ), sal_True, &pPoolItem ) ) { rXFSet.Put ( XFillBackgroundItem( ( ( XFillBackgroundItem* )pPoolItem)->GetValue() ) ); - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetValue() ); rXFSet.Put( XFillColorItem( String(), aColor ) ); @@ -505,18 +505,18 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pHatchingList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pHatchingList->GetHatch( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -524,17 +524,17 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 WarningBox* pWarnBox = NULL; - USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; while( pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pHatchingList->GetHatch( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { nError = 0; @@ -573,7 +573,7 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbHatchings.GetPosPixel(), aLbHatchings.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); //aLbHatchings.Invalidate(); @@ -600,7 +600,7 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -616,23 +616,23 @@ IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 long nCount = pHatchingList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pHatchingList->GetHatch( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; XHatch aXHatch( aLbLineColor.GetSelectEntryColor(), (XHatchStyle) aLbLineType.GetSelectEntryPos(), GetCoreValue( aMtrDistance, ePoolUnit ), @@ -672,7 +672,7 @@ IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxHatchTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -708,7 +708,7 @@ IMPL_LINK( SvxHatchTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxHatchTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnHatchingListState & CT_MODIFIED ) { diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 2fee90d5871b..f4edeaa6d392 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -84,7 +84,7 @@ // static ---------------------------------------------------------------- -static USHORT pLineRanges[] = +static sal_uInt16 pLineRanges[] = { XATTR_LINETRANSPARENCE, XATTR_LINETRANSPARENCE, @@ -146,9 +146,9 @@ SvxLineTabPage::SvxLineTabPage aSymbolHeightMF ( this, CUI_RES(MF_SYMBOL_HEIGHT)), aSymbolRatioCB ( this, CUI_RES(CB_SYMBOL_RATIO)), - bLastWidthModified(FALSE), + bLastWidthModified(sal_False), aSymbolLastSize(Size(0,0)), - bSymbols(FALSE), + bSymbols(sal_False), rOutAttrs ( rInAttrs ), bObjSelected( sal_False ), @@ -234,14 +234,14 @@ SvxLineTabPage::SvxLineTabPage aSymbolHeightMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl)); aSymbolRatioCB.SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl)); - aSymbolRatioCB.Check(TRUE); - ShowSymbolControls(FALSE); + aSymbolRatioCB.Check(sal_True); + ShowSymbolControls(sal_False); // #63083# nActLineWidth = -1; } //#58425# Symbole auf einer Linie (z.B. StarChart) , Symbol-Controls aktivieren -void SvxLineTabPage::ShowSymbolControls(BOOL bOn) +void SvxLineTabPage::ShowSymbolControls(sal_Bool bOn) { bSymbols=bOn; aSymbolWidthFT.Show(bOn); @@ -286,7 +286,7 @@ void SvxLineTabPage::Construct() void SvxLineTabPage::FillListboxes() { // Linienstile - USHORT nOldSelect = aLbLineStyle.GetSelectEntryPos(); + sal_uInt16 nOldSelect = aLbLineStyle.GetSelectEntryPos(); aLbLineStyle.FillStyles(); aLbLineStyle.Fill( pDashList ); aLbLineStyle.SelectEntryPos( nOldSelect ); @@ -301,7 +301,7 @@ void SvxLineTabPage::FillListboxes() nOldSelect = aLbEndStyle.GetSelectEntryPos(); aLbEndStyle.Clear(); aLbEndStyle.InsertEntry( sNone ); - aLbEndStyle.Fill( pLineEndList, FALSE ); + aLbEndStyle.Fill( pLineEndList, sal_False ); aLbEndStyle.SelectEntryPos( nOldSelect ); } @@ -314,8 +314,8 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) SetPageType(pPageTypeItem->GetValue()); //add CHINA001 end if( nDlgType == 0 && pDashList ) //CHINA001 if( *pDlgType == 0 && pDashList ) // Linien-Dialog { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; // Dashliste if( ( *pnDashListState & CT_MODIFIED ) || @@ -390,7 +390,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) aLbEndStyle.Clear(); aLbEndStyle.InsertEntry( sNone ); - aLbEndStyle.Fill( pLineEndList, FALSE ); + aLbEndStyle.Fill( pLineEndList, sal_False ); nCount = aLbEndStyle.GetEntryCount(); if( nCount == 0 ) @@ -488,7 +488,7 @@ int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet ) { nPageType = 1; // evtl. fuer Erweiterungen//CHINA001 *pPageType = 1; // evtl. fuer Erweiterungen *pPosDashLb = aLbLineStyle.GetSelectEntryPos() - 2;// erster Eintrag SOLID !!! - USHORT nPos = aLbStartStyle.GetSelectEntryPos(); + sal_uInt16 nPos = aLbStartStyle.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) nPos--; *pPosLineEndLb = nPos; @@ -502,11 +502,11 @@ int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) { const SfxPoolItem* pOld = NULL; - USHORT nPos; - BOOL bModified = FALSE; + sal_uInt16 nPos; + sal_Bool bModified = sal_False; // Um evtl. Modifikationen der Liste vorzubeugen // werden Items anderer Seiten nicht gesetzt @@ -535,7 +535,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineDashItem*)pOld == aDashItem ) ) { rAttrs.Put( aDashItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -543,7 +543,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineStyleItem*)pOld == *pStyleItem ) ) { rAttrs.Put( *pStyleItem ); - bModified = TRUE; + bModified = sal_True; } delete pStyleItem; } @@ -557,7 +557,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } //Breite Linienanfang @@ -568,7 +568,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } //Breite Linienende @@ -579,7 +579,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -592,7 +592,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineColorItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -614,7 +614,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -634,7 +634,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -644,23 +644,23 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) TriState eState = aTsbCenterStart.GetState(); if( eState != aTsbCenterStart.GetSavedValue() ) { - XLineStartCenterItem aItem( sal::static_int_cast< BOOL >( eState ) ); + XLineStartCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_LINESTARTCENTER ); if ( !pOld || !( *(const XLineStartCenterItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } eState = aTsbCenterEnd.GetState(); if( eState != aTsbCenterEnd.GetSavedValue() ) { - XLineEndCenterItem aItem( sal::static_int_cast< BOOL >( eState ) ); + XLineEndCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_LINEENDCENTER ); if ( !pOld || !( *(const XLineEndCenterItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -672,7 +672,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } //Breite Linienende @@ -683,20 +683,20 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // Transparenz - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); - if( nVal != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() ) + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); + if( nVal != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() ) { XLineTransparenceItem aItem( nVal ); pOld = GetOldItem( rAttrs, XATTR_LINETRANSPARENCE ); if ( !pOld || !( *(const XLineTransparenceItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -737,7 +737,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(!pOld || !(*(const XLineJointItem*)pOld == *pNew)) { rAttrs.Put( *pNew ); - bModified = TRUE; + bModified = sal_True; } delete pNew; @@ -753,7 +753,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(bNewSize) { rAttrs.Put(aSItem); - bModified=TRUE; + bModified=sal_True; } SfxInt32Item aTItem(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),nSymbolType); @@ -764,7 +764,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(bNewType) { rAttrs.Put(aTItem); - bModified=TRUE; + bModified=sal_True; } if(nSymbolType!=SVX_SYMBOLTYPE_NONE) @@ -776,7 +776,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(bNewBrush) { rAttrs.Put(aBItem); - bModified=TRUE; + bModified=sal_True; } } } @@ -786,9 +786,9 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) // ----------------------------------------------------------------------- -BOOL SvxLineTabPage::FillXLSet_Impl() +sal_Bool SvxLineTabPage::FillXLSet_Impl() { - USHORT nPos; + sal_uInt16 nPos; if( aLbLineStyle.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ) { @@ -868,23 +868,23 @@ BOOL SvxLineTabPage::FillXLSet_Impl() // Linienenden zentriert if( aTsbCenterStart.GetState() == STATE_CHECK ) - rXLSet.Put( XLineStartCenterItem( TRUE ) ); + rXLSet.Put( XLineStartCenterItem( sal_True ) ); else if( aTsbCenterStart.GetState() == STATE_NOCHECK ) - rXLSet.Put( XLineStartCenterItem( FALSE ) ); + rXLSet.Put( XLineStartCenterItem( sal_False ) ); if( aTsbCenterEnd.GetState() == STATE_CHECK ) - rXLSet.Put( XLineEndCenterItem( TRUE ) ); + rXLSet.Put( XLineEndCenterItem( sal_True ) ); else if( aTsbCenterEnd.GetState() == STATE_NOCHECK ) - rXLSet.Put( XLineEndCenterItem( FALSE ) ); + rXLSet.Put( XLineEndCenterItem( sal_False ) ); // Transparenz - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); rXLSet.Put( XLineTransparenceItem( nVal ) ); // #116827# aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -904,11 +904,11 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) */ const SfxPoolItem *pPoolItem; long nSymType=SVX_SYMBOLTYPE_UNKNOWN; - BOOL bPrevSym=FALSE; - BOOL bEnable=TRUE; - BOOL bIgnoreGraphic=FALSE; - BOOL bIgnoreSize=FALSE; - if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),TRUE,&pPoolItem) == SFX_ITEM_SET) + sal_Bool bPrevSym=sal_False; + sal_Bool bEnable=sal_True; + sal_Bool bIgnoreGraphic=sal_False; + sal_Bool bIgnoreSize=sal_False; + if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),sal_True,&pPoolItem) == SFX_ITEM_SET) { nSymType=((const SfxInt32Item *)pPoolItem)->GetValue(); } @@ -917,13 +917,13 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) { aSymbolGraphic=aAutoSymbolGraphic; aSymbolSize=aSymbolLastSize=aAutoSymbolGraphic.GetPrefSize(); - bPrevSym=TRUE; + bPrevSym=sal_True; } else if(nSymType == SVX_SYMBOLTYPE_NONE) { - bEnable=FALSE; - bIgnoreGraphic=TRUE; - bIgnoreSize=TRUE; + bEnable=sal_False; + bIgnoreGraphic=sal_True; + bIgnoreSize=sal_True; } else if(nSymType >= 0) { @@ -932,7 +932,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS); pModel->GetItemPool().FreezeIdRanges(); - SdrPage* pPage = new SdrPage( *pModel, FALSE ); + SdrPage* pPage = new SdrPage( *pModel, sal_False ); pPage->SetSize(Size(1000,1000)); pModel->InsertPage( pPage, 0 ); SdrView* pView = new SdrView( pModel, &aVDev ); @@ -966,9 +966,9 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) aSymbolSize=pObj->GetSnapRect().GetSize(); aSymbolGraphic.SetPrefSize(aSymbolSize); aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM); - bPrevSym=TRUE; - bEnable=TRUE; - bIgnoreGraphic=TRUE; + bPrevSym=sal_True; + bEnable=sal_True; + bIgnoreGraphic=sal_True; pView->UnmarkAll(); pObj=pPage->RemoveObject(0); @@ -979,7 +979,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) delete pView; delete pModel; } - if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH),TRUE,&pPoolItem) == SFX_ITEM_SET) + if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH),sal_True,&pPoolItem) == SFX_ITEM_SET) { const Graphic* pGraphic = ((const SvxBrushItem *)pPoolItem)->GetGraphic(); if( pGraphic ) @@ -994,10 +994,10 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) pGraphic->GetPrefMapMode(), MAP_100TH_MM ); } - bPrevSym=TRUE; + bPrevSym=sal_True; } } - if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),TRUE,&pPoolItem) == SFX_ITEM_SET) + if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),sal_True,&pPoolItem) == SFX_ITEM_SET) { aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize(); } @@ -1090,7 +1090,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) else if( rAttrs.GetItemState( XATTR_LINESTART ) != SFX_ITEM_DONTCARE ) { // #86265# select entry using list and polygon, not string - sal_Bool bSelected(FALSE); + sal_Bool bSelected(sal_False); const basegfx::B2DPolyPolygon& rItemPolygon = ((const XLineStartItem&)rAttrs.Get(XATTR_LINESTART)).GetLineStartValue(); for(sal_Int32 a(0);!bSelected && a < pLineEndList->Count(); a++) @@ -1102,7 +1102,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) { // select this entry aLbStartStyle.SelectEntryPos((sal_uInt16)a + 1); - bSelected = TRUE; + bSelected = sal_True; } } @@ -1123,7 +1123,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) else if( rAttrs.GetItemState( XATTR_LINEEND ) != SFX_ITEM_DONTCARE ) { // #86265# select entry using list and polygon, not string - sal_Bool bSelected(FALSE); + sal_Bool bSelected(sal_False); const basegfx::B2DPolyPolygon& rItemPolygon = ((const XLineEndItem&)rAttrs.Get(XATTR_LINEEND)).GetLineEndValue(); for(sal_Int32 a(0);!bSelected && a < pLineEndList->Count(); a++) @@ -1135,7 +1135,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) { // select this entry aLbEndStyle.SelectEntryPos((sal_uInt16)a + 1); - bSelected = TRUE; + bSelected = sal_True; } } @@ -1183,7 +1183,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) } else if( rAttrs.GetItemState( XATTR_LINESTARTCENTER ) != SFX_ITEM_DONTCARE ) { - aTsbCenterStart.EnableTriState( FALSE ); + aTsbCenterStart.EnableTriState( sal_False ); if( ( ( const XLineStartCenterItem& ) rAttrs.Get( XATTR_LINESTARTCENTER ) ).GetValue() ) aTsbCenterStart.SetState( STATE_CHECK ); @@ -1203,7 +1203,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) } else if( rAttrs.GetItemState( XATTR_LINEENDCENTER ) != SFX_ITEM_DONTCARE ) { - aTsbCenterEnd.EnableTriState( FALSE ); + aTsbCenterEnd.EnableTriState( sal_False ); if( ( ( const XLineEndCenterItem& ) rAttrs.Get( XATTR_LINEENDCENTER ) ).GetValue() ) aTsbCenterEnd.SetState( STATE_CHECK ); @@ -1218,7 +1218,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) // Transparenz if( rAttrs.GetItemState( XATTR_LINETRANSPARENCE ) != SFX_ITEM_DONTCARE ) { - USHORT nTransp = ( ( const XLineTransparenceItem& ) rAttrs. + sal_uInt16 nTransp = ( ( const XLineTransparenceItem& ) rAttrs. Get( XATTR_LINETRANSPARENCE ) ).GetValue(); aMtrTransparent.SetValue( nTransp ); ChangeTransparentHdl_Impl( NULL ); @@ -1242,7 +1242,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) // Synchronisieren // Jetzt wird der Wert aus der INI-Datei geholt (#42258#) String aStr = GetUserData(); - aCbxSynchronize.Check( (BOOL)aStr.ToInt32() ); + aCbxSynchronize.Check( (sal_Bool)aStr.ToInt32() ); // #116827# if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs.GetItemState(XATTR_LINEJOINT)) @@ -1309,7 +1309,7 @@ SfxTabPage* SvxLineTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxLineTabPage::GetRanges() +sal_uInt16* SvxLineTabPage::GetRanges() { return( pLineRanges ); } @@ -1321,12 +1321,12 @@ IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) if(pCntrl == &aMtrLineWidth) { // Linienbreite und Start/EndBreite - INT32 nNewLineWidth = GetCoreValue( aMtrLineWidth, ePoolUnit ); + sal_Int32 nNewLineWidth = GetCoreValue( aMtrLineWidth, ePoolUnit ); if(nActLineWidth == -1) { // Noch nicht initialisiert, hole den Startwert const SfxPoolItem* pOld = GetOldItem( rXLSet, XATTR_LINEWIDTH ); - INT32 nStartLineWidth = 0; + sal_Int32 nStartLineWidth = 0; if(pOld) nStartLineWidth = (( const XLineWidthItem *)pOld)->GetValue(); nActLineWidth = nStartLineWidth; @@ -1335,8 +1335,8 @@ IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) if(nActLineWidth != nNewLineWidth) { // Anpassungen Start/EndWidth #63083# - INT32 nValAct = GetCoreValue( aMtrStartWidth, ePoolUnit ); - INT32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); + sal_Int32 nValAct = GetCoreValue( aMtrStartWidth, ePoolUnit ); + sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); if(nValNew < 0) nValNew = 0; SetMetricValue( aMtrStartWidth, nValNew, ePoolUnit ); @@ -1509,7 +1509,7 @@ long SvxLineTabPage::ClickMeasuringHdl_Impl( void* ) IMPL_LINK( SvxLineTabPage, ChangeTransparentHdl_Impl, void *, EMPTYARG ) { - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); XLineTransparenceItem aItem( nVal ); rXLSet.Put( XLineTransparenceItem( aItem ) ); @@ -1569,7 +1569,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); pInfo->pBrushItem = pBrushItem; - pInfo->nItemId = (UINT16)(MN_GALLERY_ENTRY + i); + pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i); aGrfBrushItems.Insert(pInfo, i); const Graphic* pGraphic = pBrushItem->GetGraphic(); @@ -1580,7 +1580,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) 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(); @@ -1598,7 +1598,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) } aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup ); if(!aGrfNames.Count()) - aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, FALSE); + aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, sal_False); } if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && pSymbolList) @@ -1608,7 +1608,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS); pModel->GetItemPool().FreezeIdRanges(); // Page - SdrPage* pPage = new SdrPage( *pModel, FALSE ); + SdrPage* pPage = new SdrPage( *pModel, sal_False ); pPage->SetSize(Size(1000,1000)); pModel->InsertPage( pPage, 0 ); // 3D View @@ -1651,13 +1651,13 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); pInfo->pBrushItem = pBrushItem; - pInfo->nItemId = (UINT16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems); + pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems); aGrfBrushItems.Insert(pInfo, nNumMenuGalleryItems + i); Size aSize(aBitmap.GetSizePixel()); 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(); @@ -1668,7 +1668,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) } aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup ); if(!aGrfNames.Count()) - aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, FALSE); + aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False); delete pView; delete pModel; @@ -1683,7 +1683,7 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) PopupMenu* pPopup = pThis->aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); SvxBmpItemInfo* pBmpInfo = 0; - for ( USHORT i = 0; i < pThis->aGrfBrushItems.Count(); i++ ) + for ( sal_uInt16 i = 0; i < pThis->aGrfBrushItems.Count(); i++ ) { SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)pThis->aGrfBrushItems.GetObject(i); if( pInfo->pBrushItem == pItem ) @@ -1700,7 +1700,7 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) 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(); @@ -1718,12 +1718,12 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) //Handler f�r Menuebutton IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { - USHORT nItemId = pButton->GetCurItemId(); + sal_uInt16 nItemId = pButton->GetCurItemId(); const Graphic* pGraphic = 0; Graphic aGraphic; String aGrfName; - BOOL bResetSize = FALSE; - BOOL bEnable=TRUE; + sal_Bool bResetSize = sal_False; + sal_Bool bEnable=sal_True; long nPreviousSymbolType = nSymbolType; if(nItemId >= MN_GALLERY_ENTRY) @@ -1735,7 +1735,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) else { nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM; - bResetSize = TRUE; + bResetSize = sal_True; } SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.GetObject(nItemId - MN_GALLERY_ENTRY); pGraphic = pInfo->pBrushItem->GetGraphic(); @@ -1754,7 +1754,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { nSymbolType=SVX_SYMBOLTYPE_NONE; pGraphic=NULL; - bEnable=FALSE; + bEnable=sal_False; } break; default: @@ -1770,7 +1770,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM; pGraphic = &aGraphic; - bResetSize = TRUE; + bResetSize = sal_True; } } if( !pGraphic ) @@ -1803,7 +1803,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { aSymbolGraphic=Graphic(); aCtlPreview.SetSymbol(NULL,aSymbolSize); - bEnable=FALSE; + bEnable=sal_False; } aSymbolLastSize=aSymbolSize; SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit); @@ -1820,9 +1820,9 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, MetricField *, pField) { bNewSize=true; - BOOL bWidth = (BOOL)(pField == &aSymbolWidthMF); + sal_Bool bWidth = (sal_Bool)(pField == &aSymbolWidthMF); bLastWidthModified = bWidth; - BOOL bRatio = aSymbolRatioCB.IsChecked(); + sal_Bool bRatio = aSymbolRatioCB.IsChecked(); long nWidthVal = static_cast<long>(aSymbolWidthMF.Denormalize(aSymbolWidthMF.GetValue(FUNIT_100TH_MM))); long nHeightVal= static_cast<long>(aSymbolHeightMF.Denormalize(aSymbolHeightMF.GetValue(FUNIT_100TH_MM))); nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MAP_100TH_MM,(MapUnit)ePoolUnit ); @@ -1913,7 +1913,7 @@ void SvxLineTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 if(pSdrObjListItem) //symbols { - ShowSymbolControls(TRUE); + ShowSymbolControls(sal_True); pSymbolList = static_cast<SdrObjList*>(pSdrObjListItem->GetValue()); if (pSymbolAttrItem) pSymbolAttr = new SfxItemSet(pSymbolAttrItem->GetItemSet()); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 5f1b385e8137..d70cb46fb1bc 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -289,14 +289,14 @@ void SvxLineDefTabPage::CheckChanges_Impl() case RET_CANCEL: break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } - USHORT nPos = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineStyles.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { *pPosDashLb = nPos; @@ -305,7 +305,7 @@ void SvxLineDefTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs ) { if( *pDlgType == 0 ) // Linien-Dialog { @@ -320,7 +320,7 @@ BOOL SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs ) rAttrs.Put( XLineDashItem( aString, aDash ) ); } } - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -577,40 +577,40 @@ IMPL_LINK( SvxLineDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pDashList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while ( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pDashList->GetDash( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pDashList->GetDash( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; FillDash_Impl(); pEntry = new XDashEntry( aDash, aName ); @@ -659,7 +659,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineStyles.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -675,24 +675,24 @@ IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 long nCount = pDashList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while ( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pDashList->GetDash( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if ( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; FillDash_Impl(); XDashEntry* pEntry = new XDashEntry( aDash, aName ); @@ -733,7 +733,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineStyles.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -771,7 +771,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnDashListState & CT_MODIFIED ) { @@ -949,10 +949,10 @@ void SvxLineDefTabPage::FillDash_Impl() eXDS = XDASH_RECT; aDash.SetDashStyle( eXDS ); - aDash.SetDots( (BYTE) aNumFldNumber1.GetValue() ); + aDash.SetDots( (sal_uInt8) aNumFldNumber1.GetValue() ); aDash.SetDotLen( aLbType1.GetSelectEntryPos() == 0 ? 0 : GetCoreValue( aMtrLength1, ePoolUnit ) ); - aDash.SetDashes( (BYTE) aNumFldNumber2.GetValue() ); + aDash.SetDashes( (sal_uInt8) aNumFldNumber2.GetValue() ); aDash.SetDashLen( aLbType2.GetSelectEntryPos() == 0 ? 0 : GetCoreValue( aMtrLength2, ePoolUnit ) ); aDash.SetDistance( GetCoreValue( aMtrDistance, ePoolUnit ) ); @@ -971,7 +971,7 @@ void SvxLineDefTabPage::FillDialog_Impl() if( eXDS == XDASH_RECTRELATIVE ) aCbxSynchronize.Check(); else - aCbxSynchronize.Check( FALSE ); + aCbxSynchronize.Check( sal_False ); aNumFldNumber1.SetValue( aDash.GetDots() ); //aMtrLength1.SetValue( aDash.GetDotLen() ); @@ -1003,7 +1003,7 @@ void SvxLineDefTabPage::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - USHORT nOldSelect = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nOldSelect = aLbLineStyles.GetSelectEntryPos(); aLbLineStyles.Clear(); aLbLineStyles.Fill( pDashList ); aLbLineStyles.SelectEntryPos( nOldSelect ); diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 4949ce4da6fa..4422d98247c1 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -161,7 +161,7 @@ void SvxLineEndDefTabPage::Construct() pPolyObj->TakeObjInfo( aInfoRec ); SdrObject* pNewObj = 0; if( aInfoRec.bCanConvToPath ) - pNewObj = pPolyObj->ConvertToPolyObj( TRUE, FALSE ); + pNewObj = pPolyObj->ConvertToPolyObj( sal_True, sal_False ); bCreateArrowPossible = pNewObj && pNewObj->ISA( SdrPathObj ); SdrObject::Free( pNewObj ); @@ -225,7 +225,7 @@ int SvxLineEndDefTabPage::DeactivatePage( SfxItemSet* _pSet ) void SvxLineEndDefTabPage::CheckChanges_Impl() { - USHORT nPos = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineEnds.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -248,7 +248,7 @@ void SvxLineEndDefTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxLineEndDefTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxLineEndDefTabPage::FillItemSet( SfxItemSet& rSet ) { if( *pDlgType == 0 ) // Linien-Dialog { @@ -263,7 +263,7 @@ BOOL SvxLineEndDefTabPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( XLineEndItem( pEntry->GetName(), pEntry->GetLineEnd() ) ); } } - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -352,7 +352,7 @@ long SvxLineEndDefTabPage::ChangePreviewHdl_Impl( void* ) IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineEnds.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -360,12 +360,12 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) String aDesc( ResId( RID_SVXSTR_DESC_LINEEND, rMgr ) ); String aName( aEdtName.GetText() ); long nCount = pLineEndList->Count(); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; // Pruefen, ob Name schon vorhanden ist for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) @@ -379,21 +379,21 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while( !bDifferent && bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) - bLoop = FALSE; + bLoop = sal_False; else aWarningBox.Execute(); } @@ -440,7 +440,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) if( aInfoRec.bCanConvToPath ) { - pNewObj = pConvPolyObj = pPolyObj->ConvertToPolyObj( TRUE, FALSE ); + pNewObj = pConvPolyObj = pPolyObj->ConvertToPolyObj( sal_True, sal_False ); if( !pNewObj || !pNewObj->ISA( SdrPathObj ) ) return( 0L ); // Abbruch, zusaetzliche Sicherheit, die bei @@ -468,40 +468,40 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pLineEndList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while ( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; pEntry = new XLineEndEntry( aNewPolyPolygon, aName ); long nLineEndCount = pLineEndList->Count(); @@ -543,7 +543,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineEndDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineEnds.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -580,7 +580,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineEndDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnLineEndListState & CT_MODIFIED ) { @@ -738,7 +738,7 @@ void SvxLineEndDefTabPage::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - USHORT nOldSelect = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nOldSelect = aLbLineEnds.GetSelectEntryPos(); aLbLineEnds.Clear(); aLbLineEnds.Fill( pLineEndList ); aLbLineEnds.SelectEntryPos( nOldSelect ); diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 3accd144efcc..7681bca4956a 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -54,7 +54,7 @@ // static ---------------------------------------------------------------- -static USHORT pShadowRanges[] = +static sal_uInt16 pShadowRanges[] = { SDRATTR_SHADOWCOLOR, SDRATTR_SHADOWTRANSPARENCE, @@ -86,7 +86,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs aCtlXRectPreview ( this, CUI_RES( CTL_COLOR_PREVIEW ) ), rOutAttrs ( rInAttrs ), pColorTab( NULL ), - bDisable ( FALSE ), + bDisable ( sal_False ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) @@ -215,8 +215,8 @@ void SvxShadowTabPage::Construct() void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; //add CHINA001 Begin SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False); if (pPageTypeItem) @@ -276,10 +276,10 @@ int SvxShadowTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) { const SfxPoolItem* pOld = NULL; - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if( !bDisable ) { @@ -287,20 +287,20 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) TriState eState = aTsbShowShadow.GetState(); if( eState != aTsbShowShadow.GetSavedValue() ) { - SdrShadowItem aItem( sal::static_int_cast< BOOL >( eState ) ); + SdrShadowItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, SDRATTR_SHADOW ); if ( !pOld || !( *(const SdrShadowItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // Schatten-Entfernung // Etwas umstaendliche Abfrage, ob etwas geaendert wurde, // da Items nicht direkt auf Controls abbildbar sind - INT32 nX = 0L, nY = 0L; - INT32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); + sal_Int32 nX = 0L, nY = 0L; + sal_Int32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); switch( aCtlPosition.GetActualRP() ) { @@ -323,8 +323,8 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE || rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { - INT32 nOldX = 9876543; // Unmoeglicher Wert, entspr. DontCare - INT32 nOldY = 9876543; + sal_Int32 nOldX = 9876543; // Unmoeglicher Wert, entspr. DontCare + sal_Int32 nOldY = 9876543; if( rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE && rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { @@ -339,7 +339,7 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const SdrShadowXDistItem*)pOld == aXItem ) ) ) { rAttrs.Put( aXItem ); - bModified = TRUE; + bModified = sal_True; } SdrShadowYDistItem aYItem( nY ); pOld = GetOldItem( rAttrs, SDRATTR_SHADOWYDIST ); @@ -347,12 +347,12 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const SdrShadowYDistItem*)pOld == aYItem ) ) ) { rAttrs.Put( aYItem ); - bModified = TRUE; + bModified = sal_True; } } // ShadowColor - USHORT nPos = aLbShadowColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbShadowColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != aLbShadowColor.GetSavedValue() ) { @@ -362,20 +362,20 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const SdrShadowColorItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // Transparenz - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); - if( nVal != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() ) + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); + if( nVal != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() ) { SdrShadowTransparenceItem aItem( nVal ); pOld = GetOldItem( rAttrs, SDRATTR_SHADOWTRANSPARENCE ); if ( !pOld || !( *(const SdrShadowTransparenceItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -397,7 +397,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) // Ist Schatten gesetzt? if( rAttrs.GetItemState( SDRATTR_SHADOW ) != SFX_ITEM_DONTCARE ) { - aTsbShowShadow.EnableTriState( FALSE ); + aTsbShowShadow.EnableTriState( sal_False ); if( ( ( const SdrShadowItem& ) rAttrs.Get( SDRATTR_SHADOW ) ).GetValue() ) aTsbShowShadow.SetState( STATE_CHECK ); @@ -415,8 +415,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) if( rAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE && rAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { - INT32 nX = ( ( const SdrShadowXDistItem& ) rAttrs.Get( SDRATTR_SHADOWXDIST ) ).GetValue(); - INT32 nY = ( ( const SdrShadowYDistItem& ) rAttrs.Get( SDRATTR_SHADOWYDIST ) ).GetValue(); + sal_Int32 nX = ( ( const SdrShadowXDistItem& ) rAttrs.Get( SDRATTR_SHADOWXDIST ) ).GetValue(); + sal_Int32 nY = ( ( const SdrShadowYDistItem& ) rAttrs.Get( SDRATTR_SHADOWYDIST ) ).GetValue(); if( nX != 0 ) SetMetricValue( aMtrDistance, nX < 0L ? -nX : nX, ePoolUnit ); @@ -443,8 +443,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) SdrShadowYDistItem* pYDistItem = (SdrShadowYDistItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWYDIST); if (pXDistItem && pYDistItem) { - INT32 nX = pXDistItem->GetValue(); - INT32 nY = pYDistItem->GetValue(); + sal_Int32 nX = pXDistItem->GetValue(); + sal_Int32 nY = pYDistItem->GetValue(); if( nX != 0 ) SetMetricValue( aMtrDistance, nX < 0L ? -nX : nX, ePoolUnit ); else @@ -469,7 +469,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) // Transparenz if( rAttrs.GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SFX_ITEM_DONTCARE ) { - USHORT nTransp = ( ( const SdrShadowTransparenceItem& ) rAttrs.Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue(); + sal_uInt16 nTransp = ( ( const SdrShadowTransparenceItem& ) rAttrs.Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue(); aMtrTransparent.SetValue( nTransp ); } else @@ -501,7 +501,7 @@ SfxTabPage* SvxShadowTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxShadowTabPage::GetRanges() +sal_uInt16* SvxShadowTabPage::GetRanges() { return( pShadowRanges ); } @@ -548,19 +548,19 @@ IMPL_LINK( SvxShadowTabPage, ModifyShadowHdl_Impl, void *, EMPTYARG ) else rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); - USHORT nPos = aLbShadowColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbShadowColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { rXFSet.Put( XFillColorItem( String(), aLbShadowColor.GetSelectEntryColor() ) ); } - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); XFillTransparenceItem aItem( nVal ); rXFSet.Put( XFillTransparenceItem( aItem ) ); // Schatten-Entfernung - INT32 nX = 0L, nY = 0L; - INT32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); + sal_Int32 nX = 0L, nY = 0L; + sal_Int32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); switch( aCtlPosition.GetActualRP() ) { case RP_LT: nX = nY = -nXY; break; diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index e42f85c811f1..ab73b6329e15 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -57,7 +57,7 @@ // static ---------------------------------------------------------------- -static USHORT pPosSizeRanges[] = +static sal_uInt16 pPosSizeRanges[] = { SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y, @@ -76,7 +76,7 @@ static USHORT pPosSizeRanges[] = 0 }; -static USHORT pAngleRanges[] = +static sal_uInt16 pAngleRanges[] = { SID_ATTR_TRANSFORM_ROT_X, SID_ATTR_TRANSFORM_ANGLE, @@ -85,7 +85,7 @@ static USHORT pAngleRanges[] = 0 }; -static USHORT pSlantRanges[] = +static sal_uInt16 pSlantRanges[] = { SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS, @@ -121,7 +121,7 @@ void lcl_ScaleRect(basegfx::B2DRange& rRange, const Fraction aUIScale) \************************************************************************/ SvxTransformTabDialog::SvxTransformTabDialog( Window* pParent, const SfxItemSet* pAttr, - const SdrView* pSdrView, USHORT nAnchorTypes ) : + const SdrView* pSdrView, sal_uInt16 nAnchorTypes ) : SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_TRANSFORM ), pAttr ), pView ( pSdrView ), nAnchorCtrls(nAnchorTypes) @@ -153,7 +153,7 @@ SvxTransformTabDialog::~SvxTransformTabDialog() // ----------------------------------------------------------------------- -void SvxTransformTabDialog::PageCreated(USHORT nId, SfxTabPage &rPage) +void SvxTransformTabDialog::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) { switch(nId) { @@ -257,8 +257,8 @@ void SvxAngleTabPage::Construct() { DBG_ASSERT(pView, "No valid view (!)"); eDlgUnit = GetModuleFieldUnit(GetItemSet()); - SetFieldUnit(aMtrPosX, eDlgUnit, TRUE); - SetFieldUnit(aMtrPosY, eDlgUnit, TRUE); + SetFieldUnit(aMtrPosX, eDlgUnit, sal_True); + SetFieldUnit(aMtrPosY, eDlgUnit, sal_True); if(FUNIT_MILE == eDlgUnit || FUNIT_KM == eDlgUnit) { @@ -313,9 +313,9 @@ void SvxAngleTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxAngleTabPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SvxAngleTabPage::FillItemSet(SfxItemSet& rSet) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if(aMtrAngle.IsValueModified() || aMtrPosX.IsValueModified() || aMtrPosY.IsValueModified()) { @@ -327,7 +327,7 @@ BOOL SvxAngleTabPage::FillItemSet(SfxItemSet& rSet) rSet.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_X), basegfx::fround(fTmpX))); rSet.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_Y), basegfx::fround(fTmpY))); - bModified |= TRUE; + bModified |= sal_True; } return bModified; @@ -384,7 +384,7 @@ SfxTabPage* SvxAngleTabPage::Create( Window* pWindow, const SfxItemSet& rSet) //------------------------------------------------------------------------ -USHORT* SvxAngleTabPage::GetRanges() +sal_uInt16* SvxAngleTabPage::GetRanges() { return(pAngleRanges); } @@ -543,7 +543,7 @@ void SvxSlantTabPage::Construct() // get the range DBG_ASSERT(pView, "no valid view (!)"); eDlgUnit = GetModuleFieldUnit(GetItemSet()); - SetFieldUnit(aMtrRadius, eDlgUnit, TRUE); + SetFieldUnit(aMtrRadius, eDlgUnit, sal_True); { // #i75273# Rectangle aTempRect(pView->GetAllMarkedRect()); @@ -554,10 +554,10 @@ void SvxSlantTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) +sal_Bool SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - INT32 nValue = 0L; + sal_Bool bModified = sal_False; + sal_Int32 nValue = 0L; String aStr = aMtrRadius.GetText(); if( aStr != aMtrRadius.GetSavedValue() ) @@ -567,16 +567,16 @@ BOOL SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) nTmp = Fraction( nTmp ) * aUIScale; rAttrs.Put( SdrEckenradiusItem( nTmp ) ); - bModified = TRUE; + bModified = sal_True; } aStr = aMtrAngle.GetText(); if( aStr != aMtrAngle.GetSavedValue() ) { - nValue = static_cast<INT32>(aMtrAngle.GetValue()); + nValue = static_cast<sal_Int32>(aMtrAngle.GetValue()); rAttrs.Put( SfxInt32Item( SID_ATTR_TRANSFORM_SHEAR, nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( bModified ) @@ -589,7 +589,7 @@ BOOL SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) rAttrs.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_X, aPt.X())); rAttrs.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_Y, aPt.Y())); - rAttrs.Put( SfxBoolItem( SID_ATTR_TRANSFORM_SHEAR_VERTICAL, FALSE ) ); + rAttrs.Put( SfxBoolItem( SID_ATTR_TRANSFORM_SHEAR_VERTICAL, sal_False ) ); } return( bModified ); @@ -662,7 +662,7 @@ SfxTabPage* SvxSlantTabPage::Create( Window* pWindow, const SfxItemSet& rOutAttr //------------------------------------------------------------------------ -USHORT* SvxSlantTabPage::GetRanges() +sal_uInt16* SvxSlantTabPage::GetRanges() { return( pSlantRanges ); } @@ -673,7 +673,7 @@ void SvxSlantTabPage::ActivatePage( const SfxItemSet& rSet ) { SfxRectangleItem* pRectItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , FALSE, (const SfxPoolItem**) &pRectItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , sal_False, (const SfxPoolItem**) &pRectItem ) ) { const Rectangle aTempRect(pRectItem->GetValue()); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); @@ -736,7 +736,7 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage( Window* pParent, const SfxItemSe mrOutAttrs ( rInAttrs ), mnProtectSizeState( STATE_NOCHECK ), - mbPageDisabled ( FALSE ), + mbPageDisabled ( sal_False ), mbProtectDisabled( false ), mbSizeDisabled( false ), mbAdjustDisabled( true ) @@ -774,10 +774,10 @@ void SvxPositionSizeTabPage::Construct() // get range and work area DBG_ASSERT( mpView, "no valid view (!)" ); meDlgUnit = GetModuleFieldUnit( GetItemSet() ); - SetFieldUnit( maMtrPosX, meDlgUnit, TRUE ); - SetFieldUnit( maMtrPosY, meDlgUnit, TRUE ); - SetFieldUnit( maMtrWidth, meDlgUnit, TRUE ); - SetFieldUnit( maMtrHeight, meDlgUnit, TRUE ); + SetFieldUnit( maMtrPosX, meDlgUnit, sal_True ); + SetFieldUnit( maMtrPosY, meDlgUnit, sal_True ); + SetFieldUnit( maMtrWidth, meDlgUnit, sal_True ); + SetFieldUnit( maMtrHeight, meDlgUnit, sal_True ); if(FUNIT_MILE == meDlgUnit || FUNIT_KM == meDlgUnit) { @@ -818,7 +818,7 @@ void SvxPositionSizeTabPage::Construct() // diferent anchor positions maMtrPosX.SetText( String() ); maMtrPosY.SetText( String() ); - mbPageDisabled = TRUE; + mbPageDisabled = sal_True; return; } } @@ -845,8 +845,8 @@ void SvxPositionSizeTabPage::Construct() maTsbAutoGrowHeight.SetClickHdl( LINK( this, SvxPositionSizeTabPage, ClickSizeProtectHdl ) ); // is used as flag to evaluate if its selectable - maTsbAutoGrowWidth.EnableTriState( FALSE ); - maTsbAutoGrowHeight.EnableTriState( FALSE ); + maTsbAutoGrowWidth.EnableTriState( sal_False ); + maTsbAutoGrowHeight.EnableTriState( sal_False ); } } @@ -865,9 +865,9 @@ void SvxPositionSizeTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) +sal_Bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { - BOOL bModified(FALSE); + sal_Bool bModified(sal_False); if ( maMtrWidth.HasFocus() ) { @@ -899,7 +899,7 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) rOutAttrs.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_POS_X), basegfx::fround(fX))); rOutAttrs.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_POS_Y), basegfx::fround(fY))); - bModified |= TRUE; + bModified |= sal_True; } if ( maTsbPosProtect.GetState() != maTsbPosProtect.GetSavedValue() ) @@ -912,10 +912,10 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ), - maTsbPosProtect.GetState() == STATE_CHECK ? TRUE : FALSE ) ); + maTsbPosProtect.GetState() == STATE_CHECK ? sal_True : sal_False ) ); } - bModified |= TRUE; + bModified |= sal_True; } } @@ -939,11 +939,11 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) // put Width & Height to itemset rOutAttrs.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), - (UINT32) lWidth ) ); + (sal_uInt32) lWidth ) ); rOutAttrs.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), - (UINT32) lHeight ) ); - rOutAttrs.Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal::static_int_cast< USHORT >( meRP ) ) ); - bModified |= TRUE; + (sal_uInt32) lHeight ) ); + rOutAttrs.Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal::static_int_cast< sal_uInt16 >( meRP ) ) ); + bModified |= sal_True; } if ( maTsbSizeProtect.GetState() != maTsbSizeProtect.GetSavedValue() ) @@ -953,8 +953,8 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) else rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ), - maTsbSizeProtect.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + maTsbSizeProtect.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } if ( maTsbAutoGrowWidth.GetState() != maTsbAutoGrowWidth.GetSavedValue() ) @@ -966,9 +966,9 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) else rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOWIDTH ), - maTsbAutoGrowWidth.GetState() == STATE_CHECK ? TRUE : FALSE ) ); + maTsbAutoGrowWidth.GetState() == STATE_CHECK ? sal_True : sal_False ) ); } - bModified |= TRUE; + bModified |= sal_True; } if ( maTsbAutoGrowHeight.GetState() != maTsbAutoGrowHeight.GetSavedValue() ) @@ -980,9 +980,9 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) else rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOHEIGHT ), - maTsbAutoGrowHeight.GetState() == STATE_CHECK ? TRUE : FALSE ) ); + maTsbAutoGrowHeight.GetState() == STATE_CHECK ? sal_True : sal_False ) ); } - bModified |= TRUE; + bModified |= sal_True; } @@ -1017,7 +1017,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) { sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue(); maTsbPosProtect.SetState( bProtected ? STATE_CHECK : STATE_NOCHECK ); - maTsbPosProtect.EnableTriState( FALSE ); + maTsbPosProtect.EnableTriState( sal_False ); } else { @@ -1060,7 +1060,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) { maTsbSizeProtect.SetState( ( (const SfxBoolItem*)pItem )->GetValue() ? STATE_CHECK : STATE_NOCHECK ); - maTsbSizeProtect.EnableTriState( FALSE ); + maTsbSizeProtect.EnableTriState( sal_False ); } else maTsbSizeProtect.SetState( STATE_DONTKNOW ); @@ -1085,7 +1085,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) // Ist Abgleich gesetzt? String aStr = GetUserData(); - maCbxScale.Check( (BOOL)aStr.ToInt32() ); + maCbxScale.Check( (sal_Bool)aStr.ToInt32() ); maTsbSizeProtect.SaveValue(); maTsbAutoGrowWidth.SaveValue(); @@ -1105,7 +1105,7 @@ SfxTabPage* SvxPositionSizeTabPage::Create( Window* pWindow, const SfxItemSet& r //------------------------------------------------------------------------ -USHORT* SvxPositionSizeTabPage::GetRanges() +sal_uInt16* SvxPositionSizeTabPage::GetRanges() { return( pPosSizeRanges ); } @@ -1116,7 +1116,7 @@ void SvxPositionSizeTabPage::ActivatePage( const SfxItemSet& rSet ) { SfxRectangleItem* pRectItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , FALSE, (const SfxPoolItem**) &pRectItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , sal_False, (const SfxPoolItem**) &pRectItem ) ) { { // #i75273# const Rectangle aTempRect(pRectItem->GetValue()); |