From 7f33ed417b2e29e5470724ea76967f64699a2662 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 17 Jan 2011 15:06:54 +0100 Subject: removetooltypes01: #i112600# Remove tools types from sw --- sw/source/ui/chrdlg/numpara.cxx | 60 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'sw/source/ui/chrdlg/numpara.cxx') diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index f80130f475e9..00d691edd9c3 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -56,7 +56,7 @@ // Globals ****************************************************************** -static USHORT __FAR_DATA aPageRg[] = { +static sal_uInt16 __FAR_DATA aPageRg[] = { FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT, 0 }; @@ -83,18 +83,18 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, // --> OD 2008-04-14 #outlinelevel# msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ), // <-- - bModified(FALSE), - bCurNumrule(FALSE) + bModified(sal_False), + bCurNumrule(sal_False) { FreeResource(); const SfxPoolItem* pItem; SfxObjectShell* pObjSh; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, FALSE, &pItem) || + if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, sal_False, &pItem) || ( 0 != ( pObjSh = SfxObjectShell::Current()) && 0 != (pItem = pObjSh->GetItem(SID_HTML_MODE)))) { - USHORT nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue(); if(HTMLMODE_ON & nHtmlMode) { aCountParaFL .Hide(); @@ -131,7 +131,7 @@ SfxTabPage* SwParagraphNumTabPage::Create( Window* pParent, /*-----------------31.01.98 08:38------------------- --------------------------------------------------*/ -USHORT* SwParagraphNumTabPage::GetRanges() +sal_uInt16* SwParagraphNumTabPage::GetRanges() { return aPageRg; } @@ -139,18 +139,18 @@ USHORT* SwParagraphNumTabPage::GetRanges() /*-----------------31.01.98 08:38------------------- --------------------------------------------------*/ -BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) { //<-#outline level, added by zhaojianwei if( aOutlineLvLB.GetSelectEntryPos() != aOutlineLvLB.GetSavedValue()) { - USHORT aOutlineLv = aOutlineLvLB.GetSelectEntryPos(); + sal_uInt16 aOutlineLv = aOutlineLvLB.GetSelectEntryPos(); const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL); SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone(); pOutlineLv->SetValue( aOutlineLv ); rSet.Put(*pOutlineLv); delete pOutlineLv; - bModified = TRUE; + bModified = sal_True; } //<-end if( aNumberStyleLB.GetSelectEntryPos() != aNumberStyleLB.GetSavedValue()) @@ -163,18 +163,18 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) pRule->SetValue(aStyle); rSet.Put(*pRule); delete pRule; - bModified = TRUE; + bModified = sal_True; } if(aNewStartCB.GetState() != aNewStartCB.GetSavedValue() || aNewStartNumberCB.GetState() != aNewStartNumberCB.GetSavedValue()|| aNewStartNF.GetText() != aNewStartNF.GetSavedValue()) { - bModified = TRUE; - BOOL bNewStartChecked = STATE_CHECK == aNewStartCB.GetState(); - BOOL bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState(); + bModified = sal_True; + sal_Bool bNewStartChecked = STATE_CHECK == aNewStartCB.GetState(); + sal_Bool bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState(); rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, bNewStartChecked)); rSet.Put(SfxUInt16Item(FN_NUMBER_NEWSTART_AT, - bNumberNewStartChecked && bNewStartChecked ? (USHORT)aNewStartNF.GetValue() : USHRT_MAX)); + bNumberNewStartChecked && bNewStartChecked ? (sal_uInt16)aNewStartNF.GetValue() : USHRT_MAX)); } if(aCountParaCB.GetSavedValue() != aCountParaCB.GetState() || @@ -182,11 +182,11 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) aRestartNF.GetSavedValue() != aRestartNF.GetText() ) { SwFmtLineNumber aFmt; - aFmt.SetStartValue( static_cast< ULONG >(aRestartParaCountCB.GetState() == STATE_CHECK ? + aFmt.SetStartValue( static_cast< sal_uLong >(aRestartParaCountCB.GetState() == STATE_CHECK ? aRestartNF.GetValue() : 0 )); aFmt.SetCountLines( aCountParaCB.IsChecked() ); rSet.Put(aFmt); - bModified = TRUE; + bModified = sal_True; } return bModified; } @@ -196,7 +196,7 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) --------------------------------------------------*/ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) { - BOOL bHasNumberStyle = FALSE; + sal_Bool bHasNumberStyle = sal_False; SfxItemState eItemState = rSet.GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) ); @@ -231,7 +231,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) else aNumberStyleLB.SelectEntry( aStyle ); - bHasNumberStyle = TRUE; + bHasNumberStyle = sal_True; } else { @@ -243,12 +243,12 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART ); if(eItemState > SFX_ITEM_AVAILABLE ) { - bCurNumrule = TRUE; + bCurNumrule = sal_True; const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(FN_NUMBER_NEWSTART); aNewStartCB.SetState( rStart.GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aNewStartCB.EnableTriState(FALSE); + aNewStartCB.EnableTriState(sal_False); } else aNewStartCB.SetState(bHasNumberStyle ? STATE_NOCHECK : STATE_DONTKNOW); @@ -257,13 +257,13 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART_AT); if( eItemState > SFX_ITEM_AVAILABLE ) { - USHORT nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue(); + sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue(); aNewStartNumberCB.Check(USHRT_MAX != nNewStart); if(USHRT_MAX == nNewStart) nNewStart = 1; aNewStartNF.SetValue(nNewStart); - aNewStartNumberCB.EnableTriState(FALSE); + aNewStartNumberCB.EnableTriState(sal_False); } else aNewStartCB.SetState(STATE_DONTKNOW); @@ -274,14 +274,14 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) if( SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_LINENUMBER)) { SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet.Get(RES_LINENUMBER); - ULONG nStartValue = rNum.GetStartValue(); - BOOL bCount = rNum.IsCount(); + sal_uLong nStartValue = rNum.GetStartValue(); + sal_Bool bCount = rNum.IsCount(); aCountParaCB.SetState( bCount ? STATE_CHECK : STATE_NOCHECK ); aRestartParaCountCB.SetState( 0 != nStartValue ? STATE_CHECK : STATE_NOCHECK ); aRestartNF.SetValue(nStartValue == 0 ? 1 : nStartValue); LineCountHdl_Impl(&aCountParaCB); - aCountParaCB.EnableTriState(FALSE); - aRestartParaCountCB.EnableTriState(FALSE); + aCountParaCB.EnableTriState(sal_False); + aRestartParaCountCB.EnableTriState(sal_False); } else { @@ -292,7 +292,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) aRestartParaCountCB.SaveValue(); aRestartNF.SaveValue(); - bModified = FALSE; + bModified = sal_False; } /*-----------------31.01.98 08:38------------------- @@ -324,7 +324,7 @@ void SwParagraphNumTabPage::EnableNewStart() --------------------------------------------------*/ IMPL_LINK( SwParagraphNumTabPage, NewStartHdl_Impl, CheckBox*, EMPTYARG ) { - BOOL bEnable = aNewStartCB.IsChecked(); + sal_Bool bEnable = aNewStartCB.IsChecked(); aNewStartNumberCB.Enable(bEnable); aNewStartNF.Enable(bEnable && aNewStartNumberCB.IsChecked()); return 0; @@ -337,7 +337,7 @@ IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG) { aRestartParaCountCB.Enable(aCountParaCB.IsChecked()); - BOOL bEnableRestartValue = aRestartParaCountCB.IsEnabled() && + sal_Bool bEnableRestartValue = aRestartParaCountCB.IsEnabled() && aRestartParaCountCB.IsChecked(); aRestartFT.Enable(bEnableRestartValue); aRestartNF.Enable(bEnableRestartValue); @@ -354,7 +354,7 @@ IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox ) // if( msOutlineNumbering == dd) { } - BOOL bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0; + sal_Bool bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0; aNewStartCB.Enable(bEnable); NewStartHdl_Impl(&aNewStartCB); -- cgit