diff options
Diffstat (limited to 'sw/source/ui')
108 files changed, 991 insertions, 993 deletions
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index c3dd6192bb4f..1c8258ceee40 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -106,19 +106,19 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl) const SwPageDesc *pPageDesc; if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos ) pPageDesc = rSh.FindPageDescByName( m_pPageCollBox->GetSelectEntry(), - sal_True ); + true ); else pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc()); OSL_ENSURE(pPageDesc, "Page description not found."); const sal_uInt16 nUserPage = sal_uInt16(m_pPageNumEdit->GetValue()); - sal_Bool bOk = sal_True; + bool bOk = true; switch(pPageDesc->GetUseOn()) { case nsUseOnPage::PD_MIRROR: case nsUseOnPage::PD_ALL: break; case nsUseOnPage::PD_LEFT: bOk = 0 == nUserPage % 2; break; - case nsUseOnPage::PD_RIGHT: bOk = static_cast< sal_Bool >(nUserPage % 2); break; + case nsUseOnPage::PD_RIGHT: bOk = 1 == nUserPage % 2; break; default:; //prevent warning } if(!bOk) { @@ -182,22 +182,22 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) void SwBreakDlg::CheckEnable() { - sal_Bool bEnable = sal_True; + bool bEnable = true; if ( bHtmlMode ) { m_pColumnBtn->Enable(false); m_pPageCollBox->Enable(false); - bEnable = sal_False; + bEnable = false; } - else if(rSh.GetFrmType(0,sal_True) + else if(rSh.GetFrmType(0,true) & (FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE)) { m_pPageBtn->Enable(false); if(m_pPageBtn->IsChecked()) m_pLineBtn->Check(true); - bEnable = sal_False; + bEnable = false; } - const sal_Bool bPage = m_pPageBtn->IsChecked(); + const bool bPage = m_pPageBtn->IsChecked(); m_pPageCollText->Enable( bPage ); m_pPageCollBox->Enable ( bPage ); @@ -207,7 +207,7 @@ void SwBreakDlg::CheckEnable() // position 0 says 'Without' page template. const sal_Int32 nPos = m_pPageCollBox->GetSelectEntryPos(); if ( 0 == nPos || LISTBOX_ENTRY_NOTFOUND == nPos ) - bEnable = sal_False; + bEnable = false; } m_pPageNumBox->Enable(bEnable); m_pPageNumEdit->Enable(bEnable); diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 8b9787aef626..2b83a8313c3c 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -285,7 +285,7 @@ void SwDropCapsPict::UpdatePaintSettings( void ) // CTL GetFontSettings( *mpPage, maCTLFont, RES_CHRATR_CTL_FONT ); - mpPage->rSh.Pop(sal_False); + mpPage->rSh.Pop(false); mpPage->rSh.EndCrsrMove(); } else @@ -633,12 +633,12 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet) sal_uInt16( m_pDistanceField->Denormalize( m_pDistanceField->GetValue( FUNIT_TWIP ) ) ) ); ClickHdl(m_pDropCapsBox); - bModified = sal_False; + bModified = false; } IMPL_LINK_NOARG(SwDropCapsPage, ClickHdl) { - sal_Bool bChecked = m_pDropCapsBox->IsChecked(); + bool bChecked = m_pDropCapsBox->IsChecked(); m_pWholeWordCB->Enable( bChecked && !bHtmlMode ); @@ -661,7 +661,7 @@ IMPL_LINK_NOARG(SwDropCapsPage, ClickHdl) else m_pPict->SetText(""); - bModified = sal_True; + bModified = true; return 0; } @@ -673,7 +673,7 @@ IMPL_LINK_NOARG(SwDropCapsPage, WholeWordHdl) ModifyHdl(m_pDropCapsField); - bModified = sal_True; + bModified = true; return 0; } @@ -724,7 +724,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit ) else m_pPict->SetDistance((sal_uInt16)m_pDistanceField->Denormalize(m_pDistanceField->GetValue(FUNIT_TWIP))); - bModified = sal_True; + bModified = true; return 0; } @@ -732,7 +732,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit ) IMPL_LINK_NOARG_INLINE_START(SwDropCapsPage, SelectHdl) { m_pPict->UpdatePaintSettings(); - bModified = sal_True; + bModified = true; return 0; } IMPL_LINK_NOARG_INLINE_END(SwDropCapsPage, SelectHdl) @@ -748,7 +748,7 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet ) { SwFmtDrop aFmt; - sal_Bool bOn = m_pDropCapsBox->IsChecked(); + bool bOn = m_pDropCapsBox->IsChecked(); if(bOn) { // quantity, lines, gap diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 88078074811f..90b49decb0e3 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -44,8 +44,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet& SfxTabPage(pParent, "NumParaPage", "modules/swriter/ui/numparapage.ui", rAttr), msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ), - bModified(sal_False), - bCurNumrule(sal_False) + bModified(false), + bCurNumrule(false) { get(m_pOutlineStartBX, "boxOUTLINE"); get(m_pOutlineLvLB, "comboLB_OUTLINE_LEVEL"); @@ -113,7 +113,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) pOutlineLv->SetValue( aOutlineLv ); rSet.Put(*pOutlineLv); delete pOutlineLv; - bModified = sal_True; + bModified = true; } if( m_pNumberStyleLB->GetSelectEntryPos() != m_pNumberStyleLB->GetSavedValue()) @@ -128,14 +128,14 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) pRule->SetValue(aStyle); rSet.Put(*pRule); delete pRule; - bModified = sal_True; + bModified = true; } } if(m_pNewStartCB->GetState() != m_pNewStartCB->GetSavedValue() || m_pNewStartNumberCB->GetState() != m_pNewStartNumberCB->GetSavedValue()|| m_pNewStartNF->GetText() != m_pNewStartNF->GetSavedValue()) { - bModified = sal_True; + bModified = true; bool bNewStartChecked = TRISTATE_TRUE == m_pNewStartCB->GetState(); bool bNumberNewStartChecked = TRISTATE_TRUE == m_pNewStartNumberCB->GetState(); rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, bNewStartChecked)); @@ -152,7 +152,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) m_pRestartNF->GetValue() : 0 )); aFmt.SetCountLines( m_pCountParaCB->IsChecked() ); rSet.Put(aFmt); - bModified = sal_True; + bModified = true; } return bModified; } @@ -205,7 +205,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART ); if(eItemState > SFX_ITEM_AVAILABLE ) { - bCurNumrule = sal_True; + bCurNumrule = true; const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(FN_NUMBER_NEWSTART); m_pNewStartCB->SetState(rStart.GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -253,7 +253,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) m_pRestartParaCountCB->SaveValue(); m_pRestartNF->SaveValue(); - bModified = sal_False; + bModified = false; } void SwParagraphNumTabPage::DisableOutline() diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index 091248eefda2..215426c194e6 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -49,7 +49,7 @@ SwParaDlg::SwParaDlg(Window *pParent, const SfxItemSet& rCoreSet, sal_uInt8 nDialogMode, const OUString *pTitle, - sal_Bool bDraw, + bool bDraw, const OString& sDefPage) : SfxTabDialog(pParent, "ParagraphPropertiesDialog", @@ -67,7 +67,7 @@ SwParaDlg::SwParaDlg(Window *pParent, , m_nParaBorder(0) { nHtmlMode = ::GetHtmlMode(rVw.GetDocShell()); - sal_Bool bHtmlMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON); + bool bHtmlMode = (nHtmlMode & HTMLMODE_ON) == HTMLMODE_ON; if(pTitle) { // Update title @@ -197,7 +197,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) else if( m_nParaExt == nId ) { // pagebreak only when the cursor is in the body-area and not in a table - const sal_uInt16 eType = rSh.GetFrmType(0,sal_True); + const sal_uInt16 eType = rSh.GetFrmType(0,true); if( !(FRMTYPE_BODY & eType) || rSh.GetSelectionType() & nsSelectionType::SEL_TBL ) { @@ -207,7 +207,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) } else if( m_nParaDrpCps == nId ) { - ((SwDropCapsPage&)rPage).SetFormat(sal_False); + ((SwDropCapsPage&)rPage).SetFormat(false); } else if( m_nParaBckGrnd == nId ) { diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index f60dcb3d2597..e38941ac9a29 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -58,7 +58,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) pCmds( SwCondCollItem::GetCmds() ), pFmt(0), - bNewTemplate(sal_False) + bNewTemplate(false) { get(m_pConditionCB, "condstyle"); get(m_pContextFT, "contextft"); @@ -144,7 +144,7 @@ SfxTabPage* SwCondCollPage::Create(Window *pParent, const SfxItemSet &rSet) bool SwCondCollPage::FillItemSet(SfxItemSet &rSet) { - sal_Bool bModified = sal_True; + bool bModified = true; SwCondCollItem aCondItem; for (size_t i = 0; i < m_aStrArr.size(); ++i) { @@ -204,10 +204,10 @@ const sal_uInt16* SwCondCollPage::GetRanges() IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox ) { - const sal_Bool bEnable = pBox->IsChecked(); + const bool bEnable = pBox->IsChecked(); m_pContextFT->Enable( bEnable ); m_pUsedFT->Enable( bEnable ); - m_pTbLinks->EnableList( bEnable != sal_False ); + m_pTbLinks->EnableList( bEnable ); m_pStyleFT->Enable( bEnable ); m_pStyleLB->Enable( bEnable ); m_pFilterLB->Enable( bEnable ); @@ -231,7 +231,7 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn) OUString sSel = m_aStrArr[nPos] + "\t"; - const sal_Bool bAssEnabled = pBtn != m_pRemovePB && m_pAssignPB->IsEnabled(); + const bool bAssEnabled = pBtn != m_pRemovePB && m_pAssignPB->IsEnabled(); m_pAssignPB->Enable( !bAssEnabled ); m_pRemovePB->Enable( bAssEnabled ); if ( bAssEnabled ) @@ -283,7 +283,7 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox) return 0; } -void SwCondCollPage::SetCollection( SwFmt* pFormat, sal_Bool bNew ) +void SwCondCollPage::SetCollection( SwFmt* pFormat, bool bNew ) { pFmt = pFormat; bNewTemplate = bNew; diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index d465945ea77b..a03676e5b395 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -190,7 +190,7 @@ void SwMailConfigPage::Reset( const SfxItemSet& /*rSet*/ ) IMPL_LINK(SwMailConfigPage, ReplyToHdl, CheckBox*, pBox) { - sal_Bool bEnable = pBox->IsChecked(); + bool bEnable = pBox->IsChecked(); m_pReplyToFT->Enable(bEnable); m_pReplyToED->Enable(bEnable); return 0; @@ -434,7 +434,7 @@ IMPL_LINK_NOARG(SwAuthenticationSettingsDialog, OKHdl_Impl) IMPL_LINK( SwAuthenticationSettingsDialog, CheckBoxHdl_Impl, CheckBox*, pBox) { - sal_Bool bChecked = pBox->IsChecked(); + bool bChecked = pBox->IsChecked(); m_pSeparateAuthenticationRB->Enable(bChecked); m_pSMTPAfterPOPRB->Enable(bChecked); RadioButtonHdl_Impl( 0 ); @@ -444,9 +444,9 @@ IMPL_LINK( SwAuthenticationSettingsDialog, CheckBoxHdl_Impl, CheckBox*, pBox) IMPL_LINK_NOARG(SwAuthenticationSettingsDialog, RadioButtonHdl_Impl) { - sal_Bool bSeparate = m_pSeparateAuthenticationRB->IsChecked(); - sal_Bool bIsEnabled = m_pSeparateAuthenticationRB->IsEnabled(); - sal_Bool bNotSeparate = !bSeparate && bIsEnabled; + bool bSeparate = m_pSeparateAuthenticationRB->IsChecked(); + bool bIsEnabled = m_pSeparateAuthenticationRB->IsEnabled(); + bool bNotSeparate = !bSeparate && bIsEnabled; bSeparate &= bIsEnabled; m_pOutgoingServerFT->Enable(bSeparate); diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index fbc8888548fd..42a261c65b60 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -362,7 +362,7 @@ void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions ) OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" ); for ( sal_uLong i = 0; i < nCount; ++i ) { - sal_Bool bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 ); + bool bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 ); m_pOptionsLB->CheckEntryPos( i, bChecked ); nOptions = nOptions >> 1; } @@ -411,7 +411,7 @@ SfxTabPage* SwCompatibilityOptPage::Create( Window* pParent, const SfxItemSet& r bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& ) { - sal_Bool bModified = sal_False; + bool bModified = false; if ( m_pWrtShell ) { sal_uLong nSavedOptions = m_nSavedOptions; @@ -423,56 +423,56 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& ) for ( sal_uLong i = 0; i < nCount; ++i ) { CompatibilityOptions nOption = static_cast< CompatibilityOptions >(i); - sal_Bool bChecked = m_pOptionsLB->IsChecked(i); - sal_Bool bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 ); + bool bChecked = m_pOptionsLB->IsChecked(i); + bool bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 ); if ( bChecked != bSavedChecked ) { if ( COPT_USE_PRINTERDEVICE == nOption ) { m_pWrtShell->SetUseVirDev( !bChecked ); - bModified = sal_True; + bModified = true; } else if ( ( COPT_ADD_SPACING == nOption || COPT_ADD_SPACING_AT_PAGES == nOption ) && !bSetParaSpaceMax ) bSetParaSpaceMax = true; else if ( COPT_USE_OUR_TABSTOPS == nOption ) { m_pWrtShell->SetTabCompat( !bChecked ); - bModified = sal_True; + bModified = true; } else if ( COPT_NO_EXTLEADING == nOption ) { m_pWrtShell->SetAddExtLeading( !bChecked ); - bModified = sal_True; + bModified = true; } else if ( COPT_USE_LINESPACING == nOption ) { m_pWrtShell->SetUseFormerLineSpacing( bChecked ); - bModified = sal_True; + bModified = true; } else if ( COPT_ADD_TABLESPACING == nOption ) { m_pWrtShell->SetAddParaSpacingToTableCells( bChecked ); - bModified = sal_True; + bModified = true; } else if ( COPT_USE_OBJECTPOSITIONING == nOption ) { m_pWrtShell->SetUseFormerObjectPositioning( bChecked ); - bModified = sal_True; + bModified = true; } else if ( COPT_USE_OUR_TEXTWRAPPING == nOption ) { m_pWrtShell->SetUseFormerTextWrapping( bChecked ); - bModified = sal_True; + bModified = true; } else if ( COPT_CONSIDER_WRAPPINGSTYLE == nOption ) { m_pWrtShell->SetConsiderWrapOnObjPos( bChecked ); - bModified = sal_True; + bModified = true; } else if ( COPT_EXPAND_WORDSPACE == nOption ) { m_pWrtShell->SetDoNotJustifyLinesWithManualBreak( !bChecked ); - bModified = sal_True; + bModified = true; } } @@ -483,7 +483,7 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& ) { m_pWrtShell->SetParaSpaceMax( m_pOptionsLB->IsChecked( (sal_uLong)COPT_ADD_SPACING ) ); m_pWrtShell->SetParaSpaceMaxAtPages( m_pOptionsLB->IsChecked( (sal_uLong)COPT_ADD_SPACING_AT_PAGES ) ); - bModified = sal_True; + bModified = true; } } diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index be0eda245be1..55f047129e6a 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -129,7 +129,7 @@ SfxTabPage* SwLoadOptPage::Create( Window* pParent, bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) { - sal_Bool bRet = sal_False; + bool bRet = false; SwModule* pMod = SW_MOD(); sal_Int32 nNewLinkMode = AUTOMATIC; @@ -161,7 +161,7 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) m_pWrtShell->SetModified(); } - bRet = sal_True; + bRet = true; } const sal_Int32 nMPos = m_pMetricLB->GetSelectEntryPos(); @@ -170,23 +170,23 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) // Double-Cast for VA3.0 const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pMetricLB->GetEntryData( nMPos ); rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, nFieldUnit ) ); - bRet = sal_True; + bRet = true; } if(m_pTabMF->IsVisible() && m_pTabMF->GetText() != m_pTabMF->GetSavedValue()) { rSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP, (sal_uInt16)m_pTabMF->Denormalize(m_pTabMF->GetValue(FUNIT_TWIP)))); - bRet = sal_True; + bRet = true; } - sal_Bool bIsUseCharUnitFlag = m_pUseCharUnit->IsChecked(); + bool bIsUseCharUnitFlag = m_pUseCharUnit->IsChecked(); SvtCJKOptions aCJKOptions; bIsUseCharUnitFlag = bIsUseCharUnitFlag && aCJKOptions.IsAsianTypographyEnabled(); - if( bIsUseCharUnitFlag != m_pUseCharUnit->GetSavedValue()) + if( (bIsUseCharUnitFlag ? 1 : 0) != m_pUseCharUnit->GetSavedValue()) { rSet.Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bIsUseCharUnitFlag )); - bRet = sal_True; + bRet = true; } if (m_pWordCountED->GetText() != m_pWordCountED->GetSavedValue()) @@ -195,11 +195,11 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) comphelper::ConfigurationChanges::create()); officecfg::Office::Writer::WordCount::AdditionalSeparators::set(m_pWordCountED->GetText(), batch); batch->commit(); - bRet = sal_True; + bRet = true; } - sal_Bool bIsSquaredPageModeFlag = m_pUseSquaredPageMode->IsChecked(); - if ( bIsSquaredPageModeFlag != m_pUseSquaredPageMode->GetSavedValue() ) + bool bIsSquaredPageModeFlag = m_pUseSquaredPageMode->IsChecked(); + if ( (bIsSquaredPageModeFlag ? 1 : 0) != m_pUseSquaredPageMode->GetSavedValue() ) { pMod->ApplyDefaultPageMode( bIsSquaredPageModeFlag ); if ( m_pWrtShell ) @@ -208,7 +208,7 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) pDoc->SetDefaultPageMode( bIsSquaredPageModeFlag ); m_pWrtShell->SetModified(); } - bRet = sal_True; + bRet = true; } return bRet; @@ -216,7 +216,7 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) void SwLoadOptPage::Reset( const SfxItemSet& rSet) { - const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(sal_False); + const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(false); const SfxPoolItem* pItem; if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, false, &pItem)) @@ -226,8 +226,8 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet) m_nOldLinkMode = GLOBALSETTING; if (m_pWrtShell) { - eFldFlags = m_pWrtShell->GetFldUpdateFlags(sal_True); - m_nOldLinkMode = m_pWrtShell->GetLinkUpdMode(sal_True); + eFldFlags = m_pWrtShell->GetFldUpdateFlags(true); + m_nOldLinkMode = m_pWrtShell->GetLinkUpdMode(true); } if(GLOBALSETTING == m_nOldLinkMode) m_nOldLinkMode = pUsrPref->GetUpdateLinkMode(); @@ -300,7 +300,7 @@ IMPL_LINK_NOARG(SwLoadOptPage, MetricHdl) { // Double-Cast for VA3.0 FieldUnit eFieldUnit = (FieldUnit)(sal_IntPtr)m_pMetricLB->GetEntryData( nMPos ); - sal_Bool bModified = m_pTabMF->IsModified(); + bool bModified = m_pTabMF->IsModified(); long nVal = bModified ? sal::static_int_cast<sal_Int32, sal_Int64 >( m_pTabMF->Denormalize( m_pTabMF->GetValue( FUNIT_TWIP ) )) : m_nLastTab; @@ -493,7 +493,7 @@ SfxTabPage* SwCaptionOptPage::Create( Window* pParent, bool SwCaptionOptPage::FillItemSet( SfxItemSet& ) { - sal_Bool bRet = sal_False; + bool bRet = false; SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); SaveEntry(m_pCheckLB->FirstSelected()); // apply current entry @@ -597,7 +597,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl) if (pSelEntry) { - sal_Bool bChecked = m_pCheckLB->IsChecked(m_pCheckLB->GetModel()->GetAbsPos(pSelEntry)); + bool bChecked = m_pCheckLB->IsChecked(m_pCheckLB->GetModel()->GetAbsPos(pSelEntry)); m_pSettingsGroup->Enable(bChecked); bool bNumSep = bChecked && m_pLbCaptionOrder->GetSelectEntryPos() == 1; @@ -771,7 +771,7 @@ IMPL_LINK( SwCaptionOptPage, OrderHdl, ListBox*, pBox ) DrawSample(); SvTreeListEntry* pSelEntry = m_pCheckLB->FirstSelected(); - sal_Bool bChecked = sal_False; + bool bChecked = false; if (pSelEntry) { bChecked = m_pCheckLB->IsChecked(m_pCheckLB->GetModel()->GetAbsPos(pSelEntry)); @@ -816,7 +816,7 @@ void SwCaptionOptPage::DrawSample() aNumVector.push_back(1); const OUString sNumber( pSh->GetOutlineNumRule()->MakeNumString( - aNumVector, sal_False )); + aNumVector, false )); if( !sNumber.isEmpty() ) aStr += sNumber + pFldType->GetDelimiter(); } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index db1bbea6abc8..2740bf96fdff 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -234,7 +234,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) aElem.bVertRulerRight = m_pVRulerRightCBox->IsChecked(); aElem.bSmoothScroll = m_pSmoothCBox->IsChecked(); - sal_Bool bRet = !pOldAttr || aElem != *pOldAttr; + bool bRet = !pOldAttr || aElem != *pOldAttr; if(bRet) bRet = 0 != rSet.Put(aElem); @@ -245,7 +245,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) // Double-Cast for VA3.0 const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pMetricLB->GetEntryData( nMPos ); rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, nFieldUnit ) ); - bRet = sal_True; + bRet = true; } nMPos = m_pHMetric->GetSelectEntryPos(); @@ -254,7 +254,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) // Double-Cast for VA3.0 const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pHMetric->GetEntryData( nMPos ); rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, nFieldUnit ) ); - bRet = sal_True; + bRet = true; } nMPos = m_pVMetric->GetSelectEntryPos(); if ( nMPos != m_pVMetric->GetSavedValue() || nMPos != nGlobalMetricPos ) @@ -262,7 +262,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) // Double-Cast for VA3.0 const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pVMetric->GetEntryData( nMPos ); rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, nFieldUnit ) ); - bRet = sal_True; + bRet = true; } return bRet; } @@ -275,7 +275,7 @@ IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox) IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox) { - sal_Bool bChecked = pBox->IsChecked(); + bool bChecked = pBox->IsChecked(); m_pHRulerCBox->Enable(bChecked); m_pHMetric->Enable(bChecked); m_pVRulerCBox->Enable(bChecked); @@ -291,8 +291,8 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(Window* pParent, : SfxTabPage(pParent, "PrintOptionsPage", "modules/swriter/ui/printoptionspage.ui", rCoreSet) , sNone(SW_RESSTR(SW_STR_NONE)) - , bAttrModified(sal_False) - , bPreview(sal_False) + , bAttrModified(false) + , bPreview(false) { get(m_pGrfCB, "graphics"); get(m_pCtrlFldCB, "formcontrols"); @@ -356,7 +356,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(Window* pParent, m_pProspectCB_RTL->Show(aCTLOptions.IsCTLFontEnabled()); } -void SwAddPrinterTabPage::SetPreview(sal_Bool bPrev) +void SwAddPrinterTabPage::SetPreview(bool bPrev) { bPreview = bPrev; m_pCommentsFrame->Enable(!bPreview); @@ -375,7 +375,7 @@ bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet ) { SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER); aAddPrinterAttr.bPrintGraphic = m_pGrfCB->IsChecked(); - aAddPrinterAttr.bPrintTable = sal_True; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/ + aAddPrinterAttr.bPrintTable = true; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/ aAddPrinterAttr.bPrintDraw = m_pGrfCB->IsChecked(); // UI merged with m_pGrfCB in CWS printerpullgpages aAddPrinterAttr.bPrintControl = m_pCtrlFldCB->IsChecked(); aAddPrinterAttr.bPrintPageBackground = m_pBackgroundCB->IsChecked(); @@ -385,12 +385,12 @@ bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet ) aAddPrinterAttr.bPrintLeftPages = m_pLeftPageCB->IsChecked(); aAddPrinterAttr.bPrintRightPages = m_pRightPageCB->IsChecked(); - aAddPrinterAttr.bPrintReverse = sal_False; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/; + aAddPrinterAttr.bPrintReverse = false; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/; aAddPrinterAttr.bPrintProspect = m_pProspectCB->IsChecked(); aAddPrinterAttr.bPrintProspectRTL = m_pProspectCB_RTL->IsChecked(); aAddPrinterAttr.bPaperFromSetup = m_pPaperFromSetupCB->IsChecked(); aAddPrinterAttr.bPrintEmptyPages = m_pPrintEmptyPagesCB->IsChecked(); - aAddPrinterAttr.bPrintSingleJobs = sal_True; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/; + aAddPrinterAttr.bPrintSingleJobs = true; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/; if (m_pNoRB->IsChecked()) aAddPrinterAttr.nPrintPostIts = POSTITS_NONE; @@ -457,7 +457,7 @@ void SwAddPrinterTabPage::Init() IMPL_LINK_NOARG_INLINE_START(SwAddPrinterTabPage, AutoClickHdl) { - bAttrModified = sal_True; + bAttrModified = true; bool bIsProspect = m_pProspectCB->IsChecked(); if (!bIsProspect) m_pProspectCB_RTL->Check( false ); @@ -483,7 +483,7 @@ void SwAddPrinterTabPage::SetFax( const std::vector<OUString>& rFaxLst ) IMPL_LINK_NOARG_INLINE_START(SwAddPrinterTabPage, SelectHdl) { - bAttrModified=sal_True; + bAttrModified=true; return 0; } IMPL_LINK_NOARG_INLINE_END(SwAddPrinterTabPage, SelectHdl) @@ -519,20 +519,20 @@ SwStdFontTabPage::SwStdFontTabPage( Window* pParent, pWrtShell(0), eLanguage( GetAppLanguage() ), - bListDefault(sal_False), - bSetListDefault(sal_True), - bLabelDefault(sal_False), - bSetLabelDefault(sal_True), - bIdxDefault(sal_False), - bSetIdxDefault(sal_True), - bDeletePrinter(sal_False), - - bListHeightDefault (sal_False), - bSetListHeightDefault (sal_False), - bLabelHeightDefault (sal_False), - bSetLabelHeightDefault(sal_False), - bIndexHeightDefault (sal_False), - bSetIndexHeightDefault (sal_False), + bListDefault(false), + bSetListDefault(true), + bLabelDefault(false), + bSetLabelDefault(true), + bIdxDefault(false), + bSetIdxDefault(true), + bDeletePrinter(false), + + bListHeightDefault (false), + bSetListHeightDefault (false), + bLabelHeightDefault (false), + bSetLabelHeightDefault(false), + bIndexHeightDefault (false), + bSetIndexHeightDefault (false), nFontGroup(FONT_GROUP_DEFAULT), @@ -620,7 +620,7 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) { - sal_Bool bNotDocOnly = !pDocOnlyCB->IsChecked(); + bool bNotDocOnly = !pDocOnlyCB->IsChecked(); SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(!bNotDocOnly); const OUString sStandard = pStandardBox->GetText(); @@ -872,7 +872,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellTitle = sOutBackup = rFontHL.GetFamilyName(); - const SvxFontHeightItem& rFontHeightTitle = (const SvxFontHeightItem&)pColl->GetFmtAttr( nFontHeightWhich, sal_True ); + const SvxFontHeightItem& rFontHeightTitle = (const SvxFontHeightItem&)pColl->GetFmtAttr( nFontHeightWhich, true ); nTitleHeight = (sal_Int32)rFontHeightTitle.GetHeight(); const sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( @@ -884,7 +884,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); sShellList = sListBackup = rFontLS.GetFamilyName(); - const SvxFontHeightItem& rFontHeightList = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True); + const SvxFontHeightItem& rFontHeightList = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); nListHeight = (sal_Int32)rFontHeightList.GetHeight(); bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); @@ -893,7 +893,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) const SvxFontItem& rFontCP = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellLabel = sCapBackup = rFontCP.GetFamilyName(); - const SvxFontHeightItem& rFontHeightLabel = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True); + const SvxFontHeightItem& rFontHeightLabel = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); nLabelHeight = (sal_Int32)rFontHeightLabel.GetHeight(); bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); @@ -902,7 +902,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) const SvxFontItem& rFontIDX = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellIndex = sIdxBackup = rFontIDX.GetFamilyName(); - const SvxFontHeightItem& rFontHeightIndex = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True); + const SvxFontHeightItem& rFontHeightIndex = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); nIndexHeight = (sal_Int32)rFontHeightIndex.GetHeight(); bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); } @@ -989,15 +989,15 @@ IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox ) } else if(pBox == pListBox) { - bSetListDefault = sal_False; + bSetListDefault = false; } else if(pBox == pLabelBox) { - bSetLabelDefault = sal_False; + bSetLabelDefault = false; } else if(pBox == pIdxBox) { - bSetIdxDefault = sal_False; + bSetIdxDefault = false; } return 0; } @@ -1016,15 +1016,15 @@ IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox ) } else if(pBox == pListHeightLB) { - bSetListHeightDefault = sal_False; + bSetListHeightDefault = false; } else if(pBox == pLabelHeightLB) { - bSetLabelHeightDefault = sal_False; + bSetLabelHeightDefault = false; } else if(pBox == pIndexHeightLB) { - bSetIndexHeightDefault = sal_False; + bSetIndexHeightDefault = false; } return 0; } @@ -1068,7 +1068,7 @@ void SwStdFontTabPage::PageCreated (SfxAllItemSet aSet) SwTableOptionsTabPage::SwTableOptionsTabPage( Window* pParent, const SfxItemSet& rSet ) : SfxTabPage(pParent, "OptTablePage", "modules/swriter/ui/opttablepage.ui", rSet), pWrtShell(0), - bHTMLMode(sal_False) + bHTMLMode(false) { get(pHeaderCB,"header"); get(pRepeatHeaderCB,"repeatheader"); @@ -1103,7 +1103,7 @@ SfxTabPage* SwTableOptionsTabPage::Create( Window* pParent, bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) { - sal_Bool bRet = sal_False; + bool bRet = false; SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); if(pRowMoveMF->IsModified()) @@ -1142,7 +1142,7 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) pWrtShell->GetView().GetViewFrame()->GetBindings().Invalidate( aInva ); } - bRet = sal_True; + bRet = true; } SwInsertTableOptions aInsOpts( 0, 0 ); @@ -1170,19 +1170,19 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) if (pNumFormattingCB->GetSavedValue() != pNumFormattingCB->GetState()) { pModOpt->SetInsTblFormatNum(bHTMLMode, pNumFormattingCB->IsChecked()); - bRet = sal_True; + bRet = true; } if (pNumFmtFormattingCB->GetSavedValue() != pNumFmtFormattingCB->GetState()) { pModOpt->SetInsTblChangeNumFormat(bHTMLMode, pNumFmtFormattingCB->IsChecked()); - bRet = sal_True; + bRet = true; } if (pNumAlignmentCB->GetSavedValue() != pNumAlignmentCB->GetState()) { pModOpt->SetInsTblAlignNum(bHTMLMode, pNumAlignmentCB->IsChecked()); - bRet = sal_True; + bRet = true; } return bRet; @@ -1514,7 +1514,7 @@ void SwMarkPreview::InitColors( void ) const StyleSettings& rSettings = GetSettings().GetStyleSettings(); m_aBgCol = Color( rSettings.GetWindowColor() ); - sal_Bool bHC = rSettings.GetHighContrastMode(); + bool bHC = rSettings.GetHighContrastMode(); m_aLineCol = bHC? SwViewOption::GetFontColor() : Color( COL_BLACK ); m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor(); m_aTxtCol = bHC? SwViewOption::GetFontColor() : Color( COL_GRAY ); @@ -2243,7 +2243,7 @@ SfxTabPage* SwCompareOptionsTabPage::Create( Window* pParent, const SfxItemSet& bool SwCompareOptionsTabPage::FillItemSet( SfxItemSet& ) { - sal_Bool bRet = sal_False; + bool bRet = false; SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig(); if( m_pAutoRB->IsChecked() != m_pAutoRB->GetSavedValue() || @@ -2257,25 +2257,25 @@ bool SwCompareOptionsTabPage::FillItemSet( SfxItemSet& ) if ( m_pCharRB->IsChecked() ) eCmpMode = SVX_CMP_BY_CHAR; pOpt->SetCompareMode( eCmpMode ); - bRet = sal_True; + bRet = true; } if( TriState(m_pRsidCB->IsChecked()) != m_pRsidCB->GetSavedValue() ) { pOpt->SetUseRsid( m_pRsidCB->IsChecked() ); - bRet = sal_True; + bRet = true; } if( TriState(m_pIgnoreCB->IsChecked()) != m_pIgnoreCB->GetSavedValue() ) { pOpt->SetIgnorePieces( m_pIgnoreCB->IsChecked() ); - bRet = sal_True; + bRet = true; } if( m_pLenNF->IsModified() ) { pOpt->SetPieceLen( m_pLenNF->GetValue() ); - bRet = sal_True; + bRet = true; } return bRet; @@ -2343,7 +2343,7 @@ IMPL_LINK_NOARG(SwCompareOptionsTabPage, IgnoreHdl) SwTestTabPage::SwTestTabPage(Window* pParent, const SfxItemSet& rCoreSet) : SfxTabPage( pParent, "OptTestPage", "modules/swriter/ui/opttestpage.ui", rCoreSet) - , bAttrModified( sal_False ) + , bAttrModified( false ) { get(m_pTest1CBox, "unused"); get(m_pTest2CBox, "dynamic"); @@ -2426,7 +2426,7 @@ void SwTestTabPage::Init() IMPL_LINK_NOARG_INLINE_START(SwTestTabPage, AutoClickHdl) { - bAttrModified = sal_True; + bAttrModified = true; return 0; } IMPL_LINK_NOARG_INLINE_END(SwTestTabPage, AutoClickHdl) diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 3fbafc890e9d..4cd330e7ff88 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -214,8 +214,8 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) SwMailMergeConfigItem& rConfigItem = m_pAddressPage->GetWizard()->GetConfigItem(); const SwDBData& rCurrentData = rConfigItem.GetCurrentDBData(); - sal_Bool bEnableEdit = sal_False; - sal_Bool bEnableOK = sal_True; + bool bEnableEdit = false; + bool bEnableOK = true; m_pListLB->SelectAll( false ); SwDBConfig aDb; @@ -251,7 +251,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) } catch (const uno::Exception&) { - bEnableOK = sal_False; + bEnableOK = false; } m_aDBData = rCurrentData; } diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx index 5c3cb5211839..e3ae204ef573 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx @@ -190,7 +190,7 @@ SwAddRenameEntryDialog::SwAddRenameEntryDialog( IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit) { OUString sEntry = pEdit->GetText(); - sal_Bool bFound = sEntry.isEmpty(); + bool bFound = sEntry.isEmpty(); if(!bFound) { @@ -200,7 +200,7 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit) ++aHeaderIter) if(*aHeaderIter == sEntry) { - bFound = sal_True; + bFound = true; break; } } diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index d6dd12ff75ca..ee02e42dd7d4 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -168,15 +168,15 @@ struct _DB_ColumnConfigData: private boost::noncopyable OUString sTblList; OUString sTmplNm; OUString sTAutoFmtNm; - sal_Bool bIsTable : 1, + bool bIsTable : 1, bIsField : 1, bIsHeadlineOn : 1, bIsEmptyHeadln : 1; _DB_ColumnConfigData() { - bIsTable = bIsHeadlineOn = sal_True; - bIsField = bIsEmptyHeadln = sal_False; + bIsTable = bIsHeadlineOn = true; + bIsField = bIsEmptyHeadln = false; } ~_DB_ColumnConfigData(); @@ -290,7 +290,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, case DataType::TIME: case DataType::TIMESTAMP: { - pNew->bHasFmt = sal_True; + pNew->bHasFmt = true; Any aFormat = xCol->getPropertyValue("FormatKey"); if(aFormat.hasValue()) { @@ -466,7 +466,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) SwInsDBColumn aSrch( rBox.GetSelectEntry(), 0 ); SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch ); - sal_Bool bFromDB = m_pRbDbFmtFromDb == pButton; + bool bFromDB = m_pRbDbFmtFromDb == pButton; (*it)->bIsDBFmt = bFromDB; m_pLbDbFmtFromUsr->Enable( !bFromDB ); @@ -475,13 +475,13 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) { - sal_Bool bChgEnable = sal_True, bEnableTo = sal_True, bEnableFrom = sal_True; + bool bChgEnable = true, bEnableTo = true, bEnableFrom = true; m_pLbTblDbColumn->SetUpdateMode( false ); m_pLbTableCol->SetUpdateMode( false ); if( pButton == m_pIbDbcolAllTo ) { - bEnableTo = sal_False; + bEnableTo = false; sal_Int32 n, nInsPos = m_pLbTableCol->GetSelectEntryPos(), nCnt = m_pLbTblDbColumn->GetEntryCount(); @@ -554,7 +554,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) } else if( pButton == m_pIbDbcolAllFrom ) { - bEnableFrom = sal_False; + bEnableFrom = false; m_pLbTblDbColumn->Clear(); m_pLbTableCol->Clear(); @@ -565,7 +565,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) } else if( pButton == m_pIbDbcolToEdit ) { - bChgEnable = sal_False; + bChgEnable = false; // move data to Edit: OUString aFld( m_pLbTxtDbColumn->GetSelectEntry() ); if( !aFld.isEmpty() ) @@ -695,7 +695,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) } else nWidth = rSh.GetAnyCurRect( - FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, sal_True ) + FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, true ) ? RECT_FLY_PRT_EMBEDDED : RECT_PAGE_PRT ).Width(); @@ -726,7 +726,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) const sal_Int32 nStep = nWidth / (nCols+1); for( sal_Int32 n = 0; n < nCols; ++n ) { - aTabCols.Insert( nStep*(n+1), sal_False, n ); + aTabCols.Insert( nStep*(n+1), false, n ); } } delete pRep; @@ -759,7 +759,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton ) SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - boost::scoped_ptr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(), sal_False, pTAutoFmt)); + boost::scoped_ptr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(), false, pTAutoFmt)); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFmtOfIndex( pTAutoFmt ); @@ -800,7 +800,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) } else { - sal_Bool bEnableFmt = (*it)->bHasFmt; + bool bEnableFmt = (*it)->bHasFmt; m_pRbDbFmtFromDb->Enable( bEnableFmt ); m_pRbDbFmtFromUsr->Enable( bEnableFmt ); @@ -809,7 +809,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) sTxt += " (" + aSrch.sColumn + ")"; } - sal_Bool bIsDBFmt = (*it)->bIsDBFmt; + bool bIsDBFmt = (*it)->bIsDBFmt; m_pRbDbFmtFromDb->Check( bIsDBFmt ); m_pRbDbFmtFromUsr->Check( !bIsDBFmt ); m_pLbDbFmtFromUsr->Enable( !bIsDBFmt ); @@ -831,7 +831,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton ) { if( pButton == m_pCbTableHeadon ) { - sal_Bool bEnable = m_pCbTableHeadon->IsChecked(); + bool bEnable = m_pCbTableHeadon->IsChecked(); m_pRbHeadlColnms->Enable( bEnable ); m_pRbHeadlEmpty->Enable( bEnable ); @@ -863,7 +863,7 @@ static void lcl_InsTextInArr( const OUString& rTxt, _DB_Columns& rColArr ) bool SwInsertDBColAutoPilot::SplitTextToColArr( const OUString& rTxt, _DB_Columns& rColArr, - sal_Bool bInsField ) + bool bInsField ) { // create each of the database columns from the text again // and then save in an array @@ -946,7 +946,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, SwWrtShell& rSh = pView->GetWrtShell(); //with the drag and drop interface no result set is initially available - sal_Bool bDisposeResultSet = sal_False; + bool bDisposeResultSet = false; // we don't have a cursor, so we have to create our own RowSet if ( !xResultSet.is() ) { @@ -959,11 +959,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, return; rSh.StartAllAction(); - sal_Bool bUndo = rSh.DoesUndo(); + bool bUndo = rSh.DoesUndo(); if( bUndo ) rSh.StartUndo( UNDO_EMPTY ); - sal_Bool bAsTable = m_pRbAsTable->IsChecked(); + bool bAsTable = m_pRbAsTable->IsChecked(); SvNumberFormatter& rNumFmtr = *rSh.GetNumberFormatter(); if( rSh.HasSelection() ) @@ -977,7 +977,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, do{ // middle checked loop!! if( bAsTable ) // Daten als Tabelle einfuegen { - rSh.DoUndo( sal_False ); + rSh.DoUndo( false ); sal_Int32 nCols = m_pLbTableCol->GetEntryCount(); sal_Int32 nRows = 0; @@ -1016,7 +1016,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - sal_Bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON); + bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON); rSh.InsertTable( pModOpt->GetInsTblFlags(bHTML), nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFmt : 0) ); @@ -1027,8 +1027,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, SfxItemSet aTblSet( rSh.GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE ); - sal_Bool bIsAutoUpdateCells = rSh.IsAutoUpdateCells(); - rSh.SetAutoUpdateCells( sal_False ); + bool bIsAutoUpdateCells = rSh.IsAutoUpdateCells(); + rSh.SetAutoUpdateCells( false ); if( m_pCbTableHeadon->IsChecked() ) { @@ -1184,7 +1184,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, rSh.SwCrsrShell::Left(1,CRSR_SKIP_CHARS); } - rSh.DoUndo( sal_False ); + rSh.DoUndo( false ); SwTxtFmtColl* pColl = 0; { @@ -1367,7 +1367,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, if( !pSelection ) { - sal_Bool bNext = xResultSet->next(); + bool bNext = xResultSet->next(); if(!bNext) break; } @@ -1399,7 +1399,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, if( bUndo ) { - rSh.DoUndo( sal_True ); + rSh.DoUndo( true ); rSh.AppendUndoForInsertFromDB( bAsTable ); rSh.EndUndo( UNDO_EMPTY ); } @@ -1789,7 +1789,7 @@ void SwInsertDBColAutoPilot::Load() { if( rGet.bHasFmt && !rGet.bIsDBFmt ) { - rSet.bIsDBFmt = sal_False; + rSet.bIsDBFmt = false; rSet.nUsrNumFmt = rNFmtr.GetEntryKey( rGet.sUsrNumFmt, rGet.eUsrNumFmtLng ); if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFmt ) diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index ea4d9a83d1fd..c0bb2d074881 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -133,7 +133,7 @@ void SwMailMergeWizard::enterState( WizardState _nState ) */ if(_nState > MM_LAYOUTPAGE && m_rConfigItem.GetSourceView() && ((m_rConfigItem.IsAddressBlock() && !m_rConfigItem.IsAddressInserted()) || - (m_rConfigItem.IsGreetingLine(sal_False) && !m_rConfigItem.IsGreetingInserted() ))) + (m_rConfigItem.IsGreetingLine(false) && !m_rConfigItem.IsGreetingInserted() ))) { SwMailMergeLayoutPage::InsertAddressAndGreeting(m_rConfigItem.GetSourceView(), m_rConfigItem, Point(-1, -1), true); @@ -228,8 +228,8 @@ void SwMailMergeWizard::UpdateRoadmap() bool bAddressFieldsConfigured = !m_rConfigItem.IsOutputToLetter() || !m_rConfigItem.IsAddressBlock() || m_rConfigItem.IsAddressFieldsAssigned(); - bool bGreetingFieldsConfigured = !m_rConfigItem.IsGreetingLine(sal_False) || - !m_rConfigItem.IsIndividualGreeting(sal_False)|| + bool bGreetingFieldsConfigured = !m_rConfigItem.IsGreetingLine(false) || + !m_rConfigItem.IsIndividualGreeting(false)|| m_rConfigItem.IsGreetingFieldsAssigned(); //#i97436# if a document has to be loaded then enable output type page only m_bDocumentLoad = false; @@ -265,7 +265,7 @@ void SwMailMergeWizard::UpdateRoadmap() if(MM_LAYOUTPAGE == nPage) bEnable &= ((m_rConfigItem.IsAddressBlock() && !m_rConfigItem.IsAddressInserted()) || - (m_rConfigItem.IsGreetingLine(sal_False) && !m_rConfigItem.IsGreetingInserted() )); + (m_rConfigItem.IsGreetingLine(false) && !m_rConfigItem.IsGreetingInserted() )); break; } enableState( nPage, bEnable ); diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index cb036a0ea0bd..a548b2827e84 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -206,7 +206,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, AssignHdl_Impl, PushButton*, pButton) return 0; } -void SwMailMergeAddressBlockPage::EnableAddressBlock(sal_Bool bAll, sal_Bool bSelective) +void SwMailMergeAddressBlockPage::EnableAddressBlock(bool bAll, bool bSelective) { m_pSettingsFI->Enable(bAll); m_pAddressCB->Enable(bAll); @@ -264,10 +264,10 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton } m_pWizard->LeaveWait(); sal_Int32 nPos = rConfig.GetResultSetPosition(); - sal_Bool bEnable = sal_True; + bool bEnable = true; if(nPos < 1) { - bEnable = sal_False; + bEnable = false; nPos = 1; } else @@ -286,7 +286,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton m_pDocumentIndexFI->SetText(m_sDocument.replaceFirst("%1", OUString::number(nPos))); GetWizard()->enableButtons(WZB_NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); - sal_Bool bHasResultSet = rConfig.GetResultSet().is(); + bool bHasResultSet = rConfig.GetResultSet().is(); m_pCurrentAddressFI->Show(bHasResultSet); if(bHasResultSet) { @@ -367,7 +367,7 @@ const uno::Sequence< OUString >& SwSelectAddressBlockDialog::GetAddressBlocks } void SwSelectAddressBlockDialog::SetSettings( - sal_Bool bIsCountry, const OUString& rCountry) + bool bIsCountry, const OUString& rCountry) { RadioButton *pActive = m_pNeverRB; if(bIsCountry) diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index 9192b1e69b8a..e13069eb6e3e 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -71,7 +71,7 @@ class SwMailMergeAddressBlockPage : public svt::OWizardPage DECL_LINK(AddressBlockSelectHdl_Impl, void *); DECL_LINK(HideParagraphsHdl_Impl, CheckBox*); - void EnableAddressBlock(sal_Bool bAll, sal_Bool bSelective); + void EnableAddressBlock(bool bAll, bool bSelective); virtual void ActivatePage() SAL_OVERRIDE; virtual bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE; @@ -111,8 +111,8 @@ public: sal_uInt16 nSelected); const com::sun::star::uno::Sequence< OUString>& GetAddressBlocks(); - void SetSettings(sal_Bool bIsCountry, const OUString& sCountry); - sal_Bool IsIncludeCountry() const {return !m_pNeverRB->IsChecked();} + void SetSettings(bool bIsCountry, const OUString& sCountry); + bool IsIncludeCountry() const {return !m_pNeverRB->IsChecked();} OUString GetCountry() const; }; diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index cda35b70f5fc..ab7a5e1b062a 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -82,7 +82,7 @@ static void lcl_StoreGreetingsBox(ComboBox& rBox, IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl) { - sal_Bool bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked(); + bool bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked(); m_pFemaleFT->Enable(bIndividual); m_pFemaleLB->Enable(bIndividual); m_pFemalePB->Enable(bIndividual); @@ -97,7 +97,7 @@ IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl) if( m_bIsTabPage ) { - m_pWizard->GetConfigItem().SetIndividualGreeting(bIndividual, sal_False); + m_pWizard->GetConfigItem().SetIndividualGreeting(bIndividual, false); m_pWizard->UpdateRoadmap(); m_pWizard->enableButtons(WZB_NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); } @@ -204,10 +204,10 @@ void SwMailMergeGreetingsPage::UpdatePreview() m_pPreviewWIN->SetAddress(sPreview); } -void SwGreetingsHandler::Contains(sal_Bool bContainsGreeting) +void SwGreetingsHandler::Contains(bool bContainsGreeting) { m_pPersonalizedCB->Enable(bContainsGreeting); - sal_Bool bEnablePersonal = bContainsGreeting && m_pPersonalizedCB->IsChecked(); + bool bEnablePersonal = bContainsGreeting && m_pPersonalizedCB->IsChecked(); m_pFemaleFT->Enable(bEnablePersonal); m_pFemaleLB->Enable(bEnablePersonal); m_pFemalePB->Enable(bEnablePersonal); @@ -279,8 +279,8 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent) m_pNextSetIB->SetClickHdl(aDataLink); SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); - m_pGreetingLineCB->Check(rConfig.IsGreetingLine(sal_False)); - m_pPersonalizedCB->Check(rConfig.IsIndividualGreeting(sal_False)); + m_pGreetingLineCB->Check(rConfig.IsGreetingLine(false)); + m_pPersonalizedCB->Check(rConfig.IsIndividualGreeting(false)); ContainsHdl_Impl(m_pGreetingLineCB); aIndividualLink.Call(0); @@ -347,14 +347,14 @@ bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason m_pNeutralCB->SelectEntryPos(nCount); } lcl_StoreGreetingsBox(*m_pNeutralCB, rConfig, SwMailMergeConfigItem::NEUTRAL); - rConfig.SetGreetingLine(m_pGreetingLineCB->IsChecked(), sal_False); - rConfig.SetIndividualGreeting(m_pPersonalizedCB->IsChecked(), sal_False); + rConfig.SetGreetingLine(m_pGreetingLineCB->IsChecked(), false); + rConfig.SetIndividualGreeting(m_pPersonalizedCB->IsChecked(), false); return true; } IMPL_LINK(SwMailMergeGreetingsPage, ContainsHdl_Impl, CheckBox*, pBox) { - sal_Bool bContainsGreeting = pBox->IsChecked(); + bool bContainsGreeting = pBox->IsChecked(); SwGreetingsHandler::Contains(bContainsGreeting); m_pPreviewFI-> Enable(bContainsGreeting); m_pPreviewWIN->Enable(bContainsGreeting); @@ -363,7 +363,7 @@ IMPL_LINK(SwMailMergeGreetingsPage, ContainsHdl_Impl, CheckBox*, pBox) m_pPrevSetIB->Enable(bContainsGreeting); m_pNextSetIB->Enable(bContainsGreeting); SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); - rConfig.SetGreetingLine(m_pGreetingLineCB->IsChecked(), sal_False); + rConfig.SetGreetingLine(m_pGreetingLineCB->IsChecked(), false); m_pWizard->UpdateRoadmap(); return 0; } @@ -383,10 +383,10 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton) rConfig.MoveResultSet( bNext ? ++nPos : --nPos); } sal_Int32 nPos = rConfig.GetResultSetPosition(); - sal_Bool bEnable = sal_True; + bool bEnable = true; if(nPos < 1) { - bEnable = sal_False; + bEnable = false; nPos = 1; } else @@ -459,8 +459,8 @@ SwMailBodyDialog::SwMailBodyDialog(Window* pParent, SwMailMergeWizard* _pWizard) m_aOK.SetClickHdl(LINK(this, SwMailBodyDialog, OKHdl)); SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); - m_aGreetingLineCB.Check(rConfig.IsGreetingLine(sal_True)); - m_aPersonalizedCB.Check(rConfig.IsIndividualGreeting(sal_True)); + m_aGreetingLineCB.Check(rConfig.IsGreetingLine(true)); + m_aPersonalizedCB.Check(rConfig.IsIndividualGreeting(true)); ContainsHdl_Impl(&m_aGreetingLineCB); aIndividualLink.Call(0); @@ -493,7 +493,7 @@ SwMailBodyDialog::~SwMailBodyDialog() IMPL_LINK(SwMailBodyDialog, ContainsHdl_Impl, CheckBox*, pBox) { SwGreetingsHandler::Contains(pBox->IsChecked()); - m_pWizard->GetConfigItem().SetGreetingLine(pBox->IsChecked(), sal_True); + m_pWizard->GetConfigItem().SetGreetingLine(pBox->IsChecked(), true); return 0; } @@ -501,9 +501,9 @@ IMPL_LINK_NOARG(SwMailBodyDialog, OKHdl) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); rConfigItem.SetGreetingLine( - m_aGreetingLineCB.IsChecked(), sal_False); + m_aGreetingLineCB.IsChecked(), false); rConfigItem.SetIndividualGreeting( - m_aPersonalizedCB.IsChecked(), sal_False); + m_aPersonalizedCB.IsChecked(), false); if(m_aFemaleColumnLB.GetSelectEntryPos() != m_aFemaleColumnLB.GetSavedValue()) { diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index e68cf9768bd7..04f48a0f366f 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -63,7 +63,7 @@ protected: DECL_LINK(IndividualHdl_Impl, void *); DECL_LINK(GreetingHdl_Impl, PushButton*); - void Contains(sal_Bool bContainsGreeting); + void Contains(bool bContainsGreeting); virtual void UpdatePreview(); }; diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index ff3ef8ae0ebe..3df9f3a97a9a 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -142,7 +142,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : m_pTopMF->SetDownHdl(aFrameHdl); m_pTopMF->SetLoseFocusHdl(aFrameHdl); - FieldUnit eFieldUnit = ::GetDfltMetric(sal_False); + FieldUnit eFieldUnit = ::GetDfltMetric(false); ::SetFieldUnit( *m_pLeftMF, eFieldUnit ); ::SetFieldUnit( *m_pTopMF, eFieldUnit ); @@ -163,8 +163,8 @@ SwMailMergeLayoutPage::~SwMailMergeLayoutPage() void SwMailMergeLayoutPage::ActivatePage() { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - sal_Bool bGreetingLine = rConfigItem.IsGreetingLine(sal_False) && !rConfigItem.IsGreetingInserted(); - sal_Bool bAddressBlock = rConfigItem.IsAddressBlock() && !rConfigItem.IsAddressInserted(); + bool bGreetingLine = rConfigItem.IsGreetingLine(false) && !rConfigItem.IsGreetingInserted(); + bool bAddressBlock = rConfigItem.IsAddressBlock() && !rConfigItem.IsAddressInserted(); m_pPosition->Enable(bAddressBlock); AlignToTextHdl_Impl(m_pAlignToBodyCB); @@ -175,7 +175,7 @@ void SwMailMergeLayoutPage::ActivatePage() if(m_pExampleWrtShell) // initially there's nothing to check { if(!rConfigItem.IsGreetingInserted() && - m_bIsGreetingInserted != (0 != bGreetingLine) ) + m_bIsGreetingInserted != bGreetingLine ) { if( m_bIsGreetingInserted ) { @@ -197,7 +197,7 @@ void SwMailMergeLayoutPage::ActivatePage() m_pExampleWrtShell->GotoFly( m_pAddressBlockFormat->GetName() ); m_pExampleWrtShell->DelRight(); m_pAddressBlockFormat = 0; - m_pExampleWrtShell->Pop(sal_False); + m_pExampleWrtShell->Pop(false); } else { @@ -249,7 +249,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView* pView, rConfigItem.SetAddressInserted(pAddressBlockFormat->GetName()); } //now the greeting - if(rConfigItem.IsGreetingLine(sal_False) && !rConfigItem.IsGreetingInserted()) + if(rConfigItem.IsGreetingLine(false) && !rConfigItem.IsGreetingInserted()) { InsertGreeting( pView->GetWrtShell(), rConfigItem, false); rConfigItem.SetGreetingInserted(); @@ -285,7 +285,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( aSet.Put(SvxBoxItem( RES_BOX )); aSet.Put(SwFmtSurround( SURROUND_NONE )); - rShell.NewFlyFrm(aSet, sal_True ); + rShell.NewFlyFrm(aSet, true ); SwFrmFmt* pRet = rShell.GetFlyFrmFmt(); OSL_ENSURE( pRet, "Fly not inserted" ); @@ -310,8 +310,8 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( // paragraph has to be hidden depending on the // IsIncludeCountry()/GetExcludeCountry() settings - sal_Bool bIncludeCountry = rConfigItem.IsIncludeCountry(); - sal_Bool bHideEmptyParagraphs = rConfigItem.IsHideEmptyParagraphs(); + bool bIncludeCountry = rConfigItem.IsIncludeCountry(); + bool bHideEmptyParagraphs = rConfigItem.IsHideEmptyParagraphs(); const OUString rExcludeCountry = rConfigItem.GetExcludeCountry(); bool bSpecialReplacementForCountry = (!bIncludeCountry || !rExcludeCountry.isEmpty()); @@ -406,13 +406,13 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig const SwRect& rPageRect = rShell.GetAnyCurRect(RECT_PAGE); const Point aGreetingPos( DEFAULT_LEFT_DISTANCE + rPageRect.Left(), GREETING_TOP_DISTANCE ); - const sal_Bool bRet = rShell.SetShadowCrsrPos( aGreetingPos, FILL_SPACE ); + const bool bRet = rShell.SetShadowCrsrPos( aGreetingPos, FILL_SPACE ); if(!bRet) { //there's already text at the desired position //go to start of the doc, directly! - rShell.SttEndDoc(sal_True); + rShell.SttEndDoc(true); //and go by paragraph until the position is reached long nYPos = rShell.GetCharRect().Top(); while(nYPos < GREETING_TOP_DISTANCE) @@ -455,7 +455,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig } } //now insert the greeting text - if we have any? - const sal_Bool bIndividual = rConfigItem.IsIndividualGreeting(sal_False); + const bool bIndividual = rConfigItem.IsIndividualGreeting(false); if(bIndividual) { //lock expression fields - prevents hiding of the paragraph to insert into @@ -487,7 +487,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig const OUString sNameColumn = rConfigItem.GetAssignedColumn(MM_PART_LASTNAME); const OUString& rFemaleGenderValue = rConfigItem.GetFemaleGenderValue(); - sal_Bool bHideEmptyParagraphs = rConfigItem.IsHideEmptyParagraphs(); + bool bHideEmptyParagraphs = rConfigItem.IsHideEmptyParagraphs(); const SwDBData& rData = rConfigItem.GetCurrentDBData(); const OUString sCommonBase(rData.sDataSource + "." + rData.sCommand + "."); const OUString sConditionBase("[" + sCommonBase + sGenderColumn + "]"); @@ -595,7 +595,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig { rShell.Push(); rShell.SplitNode(); - rShell.Pop(sal_False); + rShell.Pop(false); } //put the cursor to the start of the paragraph rShell.SttPara(); @@ -627,7 +627,7 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl) Point(DEFAULT_LEFT_DISTANCE, DEFAULT_TOP_DISTANCE), m_pAlignToBodyCB->IsChecked(), true); } - if(rConfigItem.IsGreetingLine(sal_False)) + if(rConfigItem.IsGreetingLine(false)) { InsertGreeting(*m_pExampleWrtShell, rConfigItem, true); m_bIsGreetingInserted = true; @@ -705,7 +705,7 @@ IMPL_LINK(SwMailMergeLayoutPage, GreetingsHdl_Impl, PushButton*, pButton) IMPL_LINK(SwMailMergeLayoutPage, AlignToTextHdl_Impl, CheckBox*, pBox) { - sal_Bool bCheck = pBox->IsChecked() && pBox->IsEnabled(); + bool bCheck = pBox->IsChecked() && pBox->IsEnabled(); m_pLeftFT->Enable(!bCheck); m_pLeftMF->Enable(!bCheck); ChangeAddressHdl_Impl( 0 ); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 0645df2e8ec1..c276b4bdc7b9 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -484,7 +484,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton) IMPL_LINK(SwMailMergeOutputPage, DocumentSelectionHdl_Impl, RadioButton*, pButton) { - sal_Bool bEnableFromTo = pButton == m_pFromRB; + bool bEnableFromTo = pButton == m_pFromRB; m_pFromNF->Enable(bEnableFromTo); m_pToFT->Enable(bEnableFromTo); m_pToNF->Enable(bEnableFromTo); @@ -672,13 +672,13 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; - aOpt.SetTxtFmts( sal_True ); - aOpt.SetFrmFmts( sal_True ); - aOpt.SetPageDescs( sal_True ); - aOpt.SetNumRules( sal_True ); - aOpt.SetMerge( sal_False ); + aOpt.SetTxtFmts( true ); + aOpt.SetFrmFmts( true ); + aOpt.SetPageDescs( true ); + aOpt.SetNumRules( true ); + aOpt.SetMerge( false ); pTempView->GetDocShell()->LoadStylesFromFile( - sTargetTempURL, aOpt, sal_True ); + sTargetTempURL, aOpt, true ); pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(), (sal_uInt16)rInfo.nStartPageInTarget, (sal_uInt16)rInfo.nEndPageInTarget ); @@ -803,7 +803,7 @@ IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) sPages += " - "; sPages += OUString::number( rEndInfo.nEndPageInTarget ); - pTargetView->SetMailMergeConfigItem(&rConfigItem, 0, sal_False); + pTargetView->SetMailMergeConfigItem(&rConfigItem, 0, false); if(m_pTempPrinter) { SfxPrinter *const pDocumentPrinter = pTargetView->GetWrtShell() @@ -827,7 +827,7 @@ IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) pTargetView->ExecPrint( aProps, false, true ); SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), pObjSh)); - pTargetView->SetMailMergeConfigItem(0, 0, sal_False); + pTargetView->SetMailMergeConfigItem(0, 0, false); m_pWizard->enableButtons(WZB_CANCEL, true); m_pWizard->enableButtons(WZB_FINISH, true); return 0; @@ -845,7 +845,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterSetupHdl_Impl, PushButton*, pButton) IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox) { sal_uLong nDocType = (sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos()); - sal_Bool bEnable = MM_DOCTYPE_HTML != nDocType && MM_DOCTYPE_TEXT != nDocType; + bool bEnable = MM_DOCTYPE_HTML != nDocType && MM_DOCTYPE_TEXT != nDocType; m_pSendAsPB->Enable( bEnable ); m_pAttachmentGroup->Enable( bEnable ); if(bEnable) @@ -1079,13 +1079,13 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; - aOpt.SetTxtFmts( sal_True ); - aOpt.SetFrmFmts( sal_True ); - aOpt.SetPageDescs( sal_True ); - aOpt.SetNumRules( sal_True ); - aOpt.SetMerge( sal_False ); + aOpt.SetTxtFmts( true ); + aOpt.SetFrmFmts( true ); + aOpt.SetPageDescs( true ); + aOpt.SetNumRules( true ); + aOpt.SetMerge( false ); pTempView->GetDocShell()->LoadStylesFromFile( - sTargetTempURL, aOpt, sal_True ); + sTargetTempURL, aOpt, true ); pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(), (sal_uInt16)rInfo.nStartPageInTarget, (sal_uInt16)rInfo.nEndPageInTarget ); pTargetView->GetWrtShell().EndAction(); @@ -1134,7 +1134,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) continue; } OString sLine; - sal_Bool bDone = pInStream->ReadLine( sLine ); + bool bDone = pInStream->ReadLine( sLine ); while ( bDone ) { sBody += OStringToOUString(sLine, eEncoding); @@ -1161,12 +1161,12 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) aDesc.sAttachmentName = sAttachment; aDesc.sMimeType = sMimeType; - if(rConfigItem.IsGreetingLine(sal_True)) + if(rConfigItem.IsGreetingLine(true)) { OUString sNameColumn = rConfigItem.GetAssignedColumn(MM_PART_LASTNAME); OUString sName = lcl_GetColumnValueOf(sNameColumn, xColAccess); OUString sGreeting; - if(!sName.isEmpty() && rConfigItem.IsIndividualGreeting(sal_True)) + if(!sName.isEmpty() && rConfigItem.IsIndividualGreeting(true)) { OUString sGenderColumn = rConfigItem.GetAssignedColumn(MM_PART_GENDER); const OUString& sFemaleValue = rConfigItem.GetFemaleGenderValue(); diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx index 935fcecc7344..8dc93ddb9512 100644 --- a/sw/source/ui/dialog/docstdlg.cxx +++ b/sw/source/ui/dialog/docstdlg.cxx @@ -129,7 +129,7 @@ IMPL_LINK_NOARG(SwDocStatPage, UpdateHdl) SwDocShell* pDocShell = (SwDocShell*) SfxObjectShell::Current(); SwFEShell* pFEShell = pDocShell->GetFEShell(); if(pFEShell) - m_pLineNo->SetText( OUString::number( pFEShell->GetLineCount(sal_False))); + m_pLineNo->SetText( OUString::number( pFEShell->GetLineCount(false))); //pButton->Disable(); return 0; } diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 35468ddc63e7..de4c780ea7dc 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -348,7 +348,7 @@ OUString AbstractSwFldDlg_Impl::GetText() const return pDlg->GetText(); } -void AbstractSwFldDlg_Impl::Start( sal_Bool bShowl ) +void AbstractSwFldDlg_Impl::Start( bool bShowl ) { pDlg->Start( bShowl ); } @@ -390,7 +390,7 @@ void AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess( pDlg->SetAlternativeAccess( xSecond, xThird); } -void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( sal_Bool bAccept ) +void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( bool bAccept ) { pDlg->AcceptAll( bAccept); } @@ -425,7 +425,7 @@ OUString AbstractInsFootNoteDlg_Impl::GetFontName() return pDlg->GetFontName(); } -sal_Bool AbstractInsFootNoteDlg_Impl::IsEndNote() +bool AbstractInsFootNoteDlg_Impl::IsEndNote() { return pDlg->IsEndNote(); } @@ -462,12 +462,12 @@ OUString AbstractJavaEditDialog_Impl::GetScriptType() const return pDlg->GetScriptType(); } -sal_Bool AbstractJavaEditDialog_Impl::IsUrl() const +bool AbstractJavaEditDialog_Impl::IsUrl() const { return pDlg->IsUrl(); } -sal_Bool AbstractJavaEditDialog_Impl::IsNew() const +bool AbstractJavaEditDialog_Impl::IsNew() const { return pDlg->IsNew(); } @@ -517,12 +517,12 @@ OUString AbstractMailMergeDlg_Impl::GetPath() const return pDlg->GetPath(); } -sal_Bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const +bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const { return pDlg->IsThisDocument(); } -sal_Bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const +bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const { return pDlg->IsUseExistingConnections(); } @@ -631,7 +631,7 @@ OUString AbstractMailMergeWizard_Impl::GetReloadDocument() const return pDlg->GetReloadDocument(); } -sal_Bool AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel ) +bool AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel ) { return pDlg->skipUntil(nLevel); } @@ -767,7 +767,7 @@ SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg( } AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog(Window *pParent, - SwWrtShell &rSh, SwField* pField, sal_Bool bNextButton) + SwWrtShell &rSh, SwField* pField, bool bNextButton) { sw::DropDownFieldDialog* pDlg = new sw::DropDownFieldDialog(pParent, rSh, pField, bNextButton); return new AbstractDropDownFieldDialog_Impl( pDlg ); @@ -775,7 +775,7 @@ AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownField SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, - sal_Bool bInsert ) + bool bInsert ) { SfxTabDialog* pDlg = new SwEnvDlg( pParent, rSet, pWrtSh,pPrt, bInsert ); return new AbstractTabDialog_Impl( pDlg ); @@ -797,7 +797,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pP const SfxItemSet& rCoreSet , sal_uInt8 nDialogMode, const OUString *pCollName, - sal_Bool bDraw , + bool bDraw , const OString& sDefPage) { SfxTabDialog* pDlg = new SwParaDlg( pParent, rVw, rCoreSet,nDialogMode, pCollName, bDraw, sDefPage ); @@ -842,7 +842,7 @@ AbstractSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg( } AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg(Window* pParent, - SwWrtShell* pShell, sal_Bool bSetAutoFmt, const SwTableAutoFmt* pSelFmt) + SwWrtShell* pShell, bool bSetAutoFmt, const SwTableAutoFmt* pSelFmt) { SwAutoFormatDlg* pDlg = new SwAutoFormatDlg(pParent, pShell, bSetAutoFmt, pSelFmt); return new AbstractSwAutoFormatDlg_Impl(pDlg); @@ -865,7 +865,7 @@ SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg(Window* pPar return 0; } -SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ) +SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode, int nResId ) { SfxModalDialog* pDlg=NULL; switch ( nResId ) @@ -932,7 +932,7 @@ AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRed return new AbstractSwModalRedlineAcceptDlg_Impl( pDlg ); } -VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTblMergeDialog(Window* pParent, sal_Bool& rWithPrev) +VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTblMergeDialog(Window* pParent, bool& rWithPrev) { Dialog* pDlg = new SwMergeTblDlg( pParent, rWithPrev ); return new VclAbstractDialog_Impl( pDlg ); @@ -978,7 +978,7 @@ AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg(Window *pPa } AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( - Window * pParent, SwWrtShell &rSh, sal_Bool bEd ) + Window * pParent, SwWrtShell &rSh, bool bEd ) { SwInsFootNoteDlg* pDlg = new SwInsFootNoteDlg(pParent, rSh, bEd); return new AbstractInsFootNoteDlg_Impl( pDlg ); @@ -1078,7 +1078,7 @@ AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialo Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, SwTOXBase* pCurTOX, sal_uInt16 nToxType, - sal_Bool bGlobal) + bool bGlobal) { SwMultiTOXTabDialog* pDlg = new SwMultiTOXTabDialog( pParent, rSet, rShell, pCurTOX, nToxType, bGlobal ); return new AbstractMultiTOXTabDialog_Impl( pDlg ); @@ -1098,22 +1098,22 @@ AbstractInsertSectionTabDialog * SwAbstractDialogFactory_Impl::CreateInsertSecti } AbstractMarkFloatDlg * SwAbstractDialogFactory_Impl::CreateIndexMarkFloatDlg( - SfxBindings* pBindings, + SfxBindings* pBindings, SfxChildWindow* pChild, Window *pParent, - SfxChildWinInfo* pInfo, - sal_Bool bNew ) + SfxChildWinInfo* pInfo, + bool bNew ) { SwIndexMarkFloatDlg* pDlg = new SwIndexMarkFloatDlg(pBindings, pChild, pParent, pInfo, bNew); return new AbstractIndexMarkFloatDlg_Impl(pDlg); } AbstractMarkFloatDlg * SwAbstractDialogFactory_Impl::CreateAuthMarkFloatDlg( - SfxBindings* pBindings, + SfxBindings* pBindings, SfxChildWindow* pChild, Window *pParent, - SfxChildWinInfo* pInfo, - sal_Bool bNew) + SfxChildWinInfo* pInfo, + bool bNew) { SwAuthMarkFloatDlg* pDlg = new SwAuthMarkFloatDlg( pBindings, pChild, pParent, pInfo, bNew ); return new AbstractAuthMarkFloatDlg_Impl( pDlg ); diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 2a40abd65a01..10c584d1462d 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -200,12 +200,12 @@ class AbstractSwFldDlg_Impl : public AbstractSwFldDlg virtual void SetCurPageId( sal_uInt16 nId ) SAL_OVERRIDE; virtual void SetCurPageId( const OString &rName ) SAL_OVERRIDE; virtual const SfxItemSet* GetOutputItemSet() const SAL_OVERRIDE; - virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) SAL_OVERRIDE; + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) SAL_OVERRIDE; virtual void SetInputSet( const SfxItemSet* pInSet ) SAL_OVERRIDE; //From class Window. - virtual void SetText( const OUString& rStr ) SAL_OVERRIDE; - virtual OUString GetText() const SAL_OVERRIDE; - virtual void Start( sal_Bool bShow = sal_True ) SAL_OVERRIDE; //this method from SfxTabDialog + virtual void SetText( const OUString& rStr ) SAL_OVERRIDE; + virtual OUString GetText() const SAL_OVERRIDE; + virtual void Start( bool bShow = true ) SAL_OVERRIDE; //this method from SfxTabDialog virtual void ShowReferencePage() SAL_OVERRIDE; virtual void Initialize(SfxChildWinInfo *pInfo) SAL_OVERRIDE; virtual void ReInitDlg() SAL_OVERRIDE; @@ -225,7 +225,7 @@ class AbstractSwRenameXNamedDlg_Impl : public AbstractSwRenameXNamedDlg class AbstractSwModalRedlineAcceptDlg_Impl : public AbstractSwModalRedlineAcceptDlg { DECL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl,SwModalRedlineAcceptDlg ) - virtual void AcceptAll( sal_Bool bAccept ) SAL_OVERRIDE; + virtual void AcceptAll( bool bAccept ) SAL_OVERRIDE; }; class SwGlossaryDlg; @@ -251,7 +251,7 @@ class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg { DECL_ABSTDLG_BASE(AbstractInsFootNoteDlg_Impl,SwInsFootNoteDlg) virtual OUString GetFontName() SAL_OVERRIDE; - virtual sal_Bool IsEndNote() SAL_OVERRIDE; + virtual bool IsEndNote() SAL_OVERRIDE; virtual OUString GetStr() SAL_OVERRIDE; //from class Window virtual void SetHelpId( const OString& sHelpId ) SAL_OVERRIDE; @@ -273,8 +273,8 @@ class AbstractJavaEditDialog_Impl : public AbstractJavaEditDialog DECL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl,SwJavaEditDialog) virtual OUString GetScriptText() const SAL_OVERRIDE; virtual OUString GetScriptType() const SAL_OVERRIDE; - virtual sal_Bool IsUrl() const SAL_OVERRIDE; - virtual sal_Bool IsNew() const SAL_OVERRIDE; + virtual bool IsUrl() const SAL_OVERRIDE; + virtual bool IsNew() const SAL_OVERRIDE; virtual bool IsUpdate() const SAL_OVERRIDE; }; @@ -296,14 +296,14 @@ class SwMailMergeCreateFromDlg; class AbstractMailMergeCreateFromDlg_Impl : public AbstractMailMergeCreateFromDlg { DECL_ABSTDLG_BASE(AbstractMailMergeCreateFromDlg_Impl,SwMailMergeCreateFromDlg) - virtual sal_Bool IsThisDocument() const SAL_OVERRIDE ; + virtual bool IsThisDocument() const SAL_OVERRIDE ; }; class SwMailMergeFieldConnectionsDlg; class AbstractMailMergeFieldConnectionsDlg_Impl : public AbstractMailMergeFieldConnectionsDlg { DECL_ABSTDLG_BASE(AbstractMailMergeFieldConnectionsDlg_Impl,SwMailMergeFieldConnectionsDlg) - virtual sal_Bool IsUseExistingConnections() const SAL_OVERRIDE ; + virtual bool IsUseExistingConnections() const SAL_OVERRIDE ; }; class SwMultiTOXTabDialog; @@ -364,7 +364,7 @@ public: virtual void SetReloadDocument(const OUString& rURL) SAL_OVERRIDE; virtual OUString GetReloadDocument() const SAL_OVERRIDE; - virtual sal_Bool ShowPage( sal_uInt16 nLevel ) SAL_OVERRIDE; + virtual bool ShowPage( sal_uInt16 nLevel ) SAL_OVERRIDE; virtual sal_uInt16 GetRestartPage() const SAL_OVERRIDE; }; @@ -400,8 +400,8 @@ public: virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg(Window *pParent, SwWrtShell &rSh) SAL_OVERRIDE; virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog (Window *pParent, SwWrtShell &rSh, - SwField* pField, sal_Bool bNextButton = sal_False) SAL_OVERRIDE; - virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert ) SAL_OVERRIDE; + SwField* pField, bool bNextButton = false) SAL_OVERRIDE; + virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool bInsert ) SAL_OVERRIDE; virtual AbstractSwLabDlg* CreateSwLabDlg(Window* pParent, const SfxItemSet& rSet, SwDBMgr* pDBMgr, bool bLabel) SAL_OVERRIDE; @@ -411,7 +411,7 @@ public: const SfxItemSet& rCoreSet, sal_uInt8 nDialogMode, const OUString *pCollName = 0, - sal_Bool bDraw = sal_False, + bool bDraw = false, const OString& sDefPage = OString() ) SAL_OVERRIDE; virtual AbstractSwSelGlossaryDlg * CreateSwSelGlossaryDlg(Window * pParent, const OUString &rShortName) SAL_OVERRIDE; @@ -419,11 +419,11 @@ public: virtual AbstractSplitTableDialog * CreateSplitTblDialog ( Window * pParent, SwWrtShell &rSh ) SAL_OVERRIDE; virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, - sal_Bool bSetAutoFmt = sal_True, + bool bSetAutoFmt = true, const SwTableAutoFmt* pSelFmt = 0 ) SAL_OVERRIDE; virtual SfxAbstractDialog * CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType, int nResId ) SAL_OVERRIDE; - virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ) SAL_OVERRIDE; + virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode, int nResId ) SAL_OVERRIDE; virtual VclAbstractDialog * CreateSwTableWidthDlg(Window *pParent, SwTableFUNC &rFnc) SAL_OVERRIDE; virtual SfxAbstractTabDialog* CreateSwTableTabDlg(Window* pParent, SfxItemPool& Pool, const SfxItemSet* pItemSet, SwWrtShell* pSh) SAL_OVERRIDE; @@ -434,7 +434,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess) SAL_OVERRIDE; virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg(Window *pParent) SAL_OVERRIDE; - virtual VclAbstractDialog* CreateTblMergeDialog(Window* pParent, sal_Bool& rWithPrev) SAL_OVERRIDE; + virtual VclAbstractDialog* CreateTblMergeDialog(Window* pParent, bool& rWithPrev) SAL_OVERRIDE; virtual SfxAbstractTabDialog* CreateFrmTabDialog( const OString &rDialogType, SfxViewFrame *pFrame, Window *pParent, const SfxItemSet& rCoreSet, @@ -455,7 +455,7 @@ public: virtual AbstractFldInputDlg* CreateFldInputDlg(Window *pParent, SwWrtShell &rSh, SwField* pField, bool bNextButton = false) SAL_OVERRIDE; virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( - Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False) SAL_OVERRIDE; + Window * pParent, SwWrtShell &rSh, bool bEd = false) SAL_OVERRIDE; virtual VclAbstractDialog * CreateTitlePageDlg ( Window * pParent ) SAL_OVERRIDE; virtual VclAbstractDialog * CreateVclSwViewDialog(SwView& rView) SAL_OVERRIDE; virtual AbstractInsTableDlg* CreateInsTableDlg(SwView& rView) SAL_OVERRIDE; @@ -479,22 +479,22 @@ public: Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX, - sal_Bool bGlobal = sal_False) SAL_OVERRIDE; + bool bGlobal = false) SAL_OVERRIDE; virtual AbstractEditRegionDlg* CreateEditRegionDlg(Window* pParent, SwWrtShell& rWrtSh) SAL_OVERRIDE; virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) SAL_OVERRIDE; virtual AbstractMarkFloatDlg* CreateIndexMarkFloatDlg( - SfxBindings* pBindings, + SfxBindings* pBindings, SfxChildWindow* pChild, Window *pParent, - SfxChildWinInfo* pInfo, - sal_Bool bNew=sal_True) SAL_OVERRIDE; + SfxChildWinInfo* pInfo, + bool bNew=true) SAL_OVERRIDE; virtual AbstractMarkFloatDlg* CreateAuthMarkFloatDlg( - SfxBindings* pBindings, + SfxBindings* pBindings, SfxChildWindow* pChild, Window *pParent, - SfxChildWinInfo* pInfo, - sal_Bool bNew=sal_True) SAL_OVERRIDE; + SfxChildWinInfo* pInfo, + bool bNew=true) SAL_OVERRIDE; virtual VclAbstractDialog * CreateIndexMarkModalDlg( Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark ) SAL_OVERRIDE; diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 2011284a80d0..548d8ba1f8e6 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -391,14 +391,14 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh ) if( !m_pTree->FirstSelected() && m_pTree->First() ) m_pTree->Select( m_pTree->First() ); m_pTree->Show(); - bDontCheckPasswd = sal_False; + bDontCheckPasswd = false; } -sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) +bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) { if(bDontCheckPasswd) - return sal_True; - sal_Bool bRet = sal_True; + return true; + bool bRet = true; SvTreeListEntry* pEntry = m_pTree->FirstSelected(); while( pEntry ) { @@ -407,7 +407,7 @@ sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) && pRepr->GetSectionData().GetPassword().getLength()) { SfxPasswordDialog aPasswdDlg(this); - bRet = sal_False; + bRet = false; if (aPasswdDlg.Execute()) { const OUString sNewPasswd( aPasswdDlg.GetPassword() ); @@ -417,7 +417,7 @@ sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) pRepr->GetSectionData().GetPassword(), sNewPasswd)) { pRepr->SetTempPasswd(aNewPasswd); - bRet = sal_True; + bRet = true; } else { @@ -713,7 +713,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) m_pPasswdCB->Enable(bPasswdEnabled); m_pPasswdPB->Enable(bPasswdEnabled); } - bDontCheckPasswd = sal_False; + bDontCheckPasswd = false; return 0; } @@ -758,7 +758,7 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl) rSh.StartAllAction(); rSh.StartUndo(); - rSh.ResetSelect( 0,sal_False ); + rSh.ResetSelect( 0,false ); SvTreeListEntry* pEntry = m_pTree->First(); while( pEntry ) @@ -776,13 +776,13 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl) if( pFmt->GetCol() != pRepr->GetCol() ) pSet->Put( pRepr->GetCol() ); - if( pFmt->GetBackground(sal_False) != pRepr->GetBackground() ) + if( pFmt->GetBackground(false) != pRepr->GetBackground() ) pSet->Put( pRepr->GetBackground() ); - if( pFmt->GetFtnAtTxtEnd(sal_False) != pRepr->GetFtnNtAtEnd() ) + if( pFmt->GetFtnAtTxtEnd(false) != pRepr->GetFtnNtAtEnd() ) pSet->Put( pRepr->GetFtnNtAtEnd() ); - if( pFmt->GetEndAtTxtEnd(sal_False) != pRepr->GetEndNtAtEnd() ) + if( pFmt->GetEndAtTxtEnd(false) != pRepr->GetEndNtAtEnd() ) pSet->Put( pRepr->GetEndNtAtEnd() ); if( pFmt->GetBalancedColumns() != pRepr->GetBalance() ) @@ -831,7 +831,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox ) pBox->EnableTriState(false); SvTreeListEntry* pEntry = m_pTree->FirstSelected(); OSL_ENSURE(pEntry,"no entry found"); - sal_Bool bCheck = TRISTATE_TRUE == pBox->GetState(); + bool bCheck = TRISTATE_TRUE == pBox->GetState(); while( pEntry ) { SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData(); @@ -973,14 +973,14 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox ) return 0; SvTreeListEntry* pEntry = m_pTree->FirstSelected(); pBox->EnableTriState(false); - sal_Bool bMulti = 1 < m_pTree->GetSelectionCount(); - sal_Bool bFile = pBox->IsChecked(); + bool bMulti = 1 < m_pTree->GetSelectionCount(); + bool bFile = pBox->IsChecked(); if(pEntry) { while(pEntry) { const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData(); - sal_Bool bContent = pSectRepr->IsContent(); + bool bContent = pSectRepr->IsContent(); if( pBox->IsChecked() && bContent && rSh.HasSelection() ) { if( RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() ) @@ -1203,7 +1203,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) bool bFile = m_pFileCB->IsChecked(); SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData(); SwSectionData & rData( pSectRepr->GetSectionData() ); - sal_Bool bDDE = pBox->IsChecked(); + bool bDDE = pBox->IsChecked(); if(bDDE) { m_pFileNameFT->Hide(); @@ -1396,10 +1396,10 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent ) return 0; } -Image SwEditRegionDlg::BuildBitmap( sal_Bool bProtect, sal_Bool bHidden ) +Image SwEditRegionDlg::BuildBitmap( bool bProtect, bool bHidden ) { ImageList& rImgLst = aImageIL; - return rImgLst.GetImage((int(!bHidden)+(bProtect<<1)) + 1); + return rImgLst.GetImage((int(!bHidden)+((bProtect ? 1 : 0)<<1)) + 1); } /*-------------------------------------------------------------------- @@ -1471,8 +1471,8 @@ void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)GetInputSetImpl()->Get(RES_FRM_SIZE); ((SwColumnPage&)rPage).SetPageWidth(rSize.GetWidth()); - ((SwColumnPage&)rPage).ShowBalance(sal_True); - ((SwColumnPage&)rPage).SetInSection(sal_True); + ((SwColumnPage&)rPage).ShowBalance(true); + ((SwColumnPage&)rPage).SetInSection(true); } else if (nId == m_nIndentPage) ((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh); @@ -1612,7 +1612,7 @@ bool SwInsertSectionTabPage::FillItemSet( SfxItemSet& ) { SwSectionData aSection(CONTENT_SECTION, m_pCurName->GetText()); aSection.SetCondition(m_pConditionED->GetText()); - sal_Bool bProtected = m_pProtectCB->IsChecked(); + bool bProtected = m_pProtectCB->IsChecked(); aSection.SetProtectFlag(bProtected); aSection.SetHidden(m_pHideCB->IsChecked()); // edit in readonly sections @@ -1624,7 +1624,7 @@ bool SwInsertSectionTabPage::FillItemSet( SfxItemSet& ) } const OUString sFileName = m_pFileNameED->GetText(); const OUString sSubRegion = m_pSubRegionED->GetText(); - sal_Bool bDDe = m_pDDECB->IsChecked(); + bool bDDe = m_pDDECB->IsChecked(); if(m_pFileCB->IsChecked() && (!sFileName.isEmpty() || !sSubRegion.isEmpty() || bDDe)) { OUString aLinkFile; @@ -1679,7 +1679,7 @@ SfxTabPage* SwInsertSectionTabPage::Create( Window* pParent, IMPL_LINK( SwInsertSectionTabPage, ChangeHideHdl, CheckBox *, pBox ) { - sal_Bool bHide = pBox->IsChecked(); + bool bHide = pBox->IsChecked(); m_pConditionED->Enable(bHide); m_pConditionFT->Enable(bHide); return 0; @@ -1692,7 +1692,7 @@ IMPL_LINK_NOARG(SwInsertSectionTabPage, ChangeEditInReadonlyHdl) IMPL_LINK( SwInsertSectionTabPage, ChangeProtectHdl, CheckBox *, pBox ) { - sal_Bool bCheck = pBox->IsChecked(); + bool bCheck = pBox->IsChecked(); m_pPasswdCB->Enable(bCheck); m_pPasswdPB->Enable(bCheck); return 0; @@ -1700,8 +1700,8 @@ IMPL_LINK( SwInsertSectionTabPage, ChangeProtectHdl, CheckBox *, pBox ) IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton ) { - sal_Bool bChange = pButton == m_pPasswdPB; - sal_Bool bSet = bChange ? bChange : m_pPasswdCB->IsChecked(); + bool bChange = pButton == m_pPasswdPB; + bool bSet = bChange ? bChange : m_pPasswdCB->IsChecked(); if(bSet) { if(!m_aNewPasswd.getLength() || bChange) @@ -1746,7 +1746,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox ) pBox->Check( false ); } - sal_Bool bFile = pBox->IsChecked(); + bool bFile = pBox->IsChecked(); m_pFileNameFT->Enable(bFile); m_pFileNameED->Enable(bFile); m_pFilePB->Enable(bFile); @@ -1779,8 +1779,8 @@ IMPL_LINK_NOARG(SwInsertSectionTabPage, FileSearchHdl) IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox ) { - sal_Bool bDDE = pBox->IsChecked(); - sal_Bool bFile = m_pFileCB->IsChecked(); + bool bDDE = pBox->IsChecked(); + bool bFile = m_pFileCB->IsChecked(); m_pFilePB->Enable(!bDDE && bFile); if(bDDE) { @@ -1923,8 +1923,8 @@ bool SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet ) return true; } -void SwSectionFtnEndTabPage::ResetState( sal_Bool bFtn, - const SwFmtFtnEndAtTxtEnd& rAttr ) +void SwSectionFtnEndTabPage::ResetState( bool bFtn, + const SwFmtFtnEndAtTxtEnd& rAttr ) { CheckBox *pNtAtTextEndCB, *pNtNumCB, *pNtNumFmtCB; FixedText*pPrefixFT, *pSuffixFT; @@ -2005,9 +2005,9 @@ void SwSectionFtnEndTabPage::ResetState( sal_Bool bFtn, void SwSectionFtnEndTabPage::Reset( const SfxItemSet& rSet ) { - ResetState( sal_True, (const SwFmtFtnAtTxtEnd&)rSet.Get( + ResetState( true, (const SwFmtFtnAtTxtEnd&)rSet.Get( RES_FTN_AT_TXTEND, false )); - ResetState( sal_False, (const SwFmtEndAtTxtEnd&)rSet.Get( + ResetState( false, (const SwFmtEndAtTxtEnd&)rSet.Get( RES_END_AT_TXTEND, false )); } @@ -2019,7 +2019,7 @@ SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent, IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox ) { - sal_Bool bFoot = pFtnNtAtTextEndCB == pBox || pFtnNtNumCB == pBox || + bool bFoot = pFtnNtAtTextEndCB == pBox || pFtnNtNumCB == pBox || pFtnNtNumFmtCB == pBox ; CheckBox *pNumBox, *pNumFmtBox, *pEndBox; @@ -2056,9 +2056,9 @@ IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox ) pSuffixED = pEndSuffixED; } - sal_Bool bEnableAtEnd = TRISTATE_TRUE == pEndBox->GetState(); - sal_Bool bEnableNum = bEnableAtEnd && TRISTATE_TRUE == pNumBox->GetState(); - sal_Bool bEnableNumFmt = bEnableNum && TRISTATE_TRUE == pNumFmtBox->GetState(); + bool bEnableAtEnd = TRISTATE_TRUE == pEndBox->GetState(); + bool bEnableNum = bEnableAtEnd && TRISTATE_TRUE == pNumBox->GetState(); + bool bEnableNumFmt = bEnableNum && TRISTATE_TRUE == pNumFmtBox->GetState(); pNumBox->Enable( bEnableAtEnd ); pOffsetTxt->Enable( bEnableNum ); @@ -2112,8 +2112,8 @@ void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage } else if (nId == m_nColumnPageId) { - ((SwColumnPage&)rPage).ShowBalance(sal_True); - ((SwColumnPage&)rPage).SetInSection(sal_True); + ((SwColumnPage&)rPage).ShowBalance(true); + ((SwColumnPage&)rPage).SetInSection(true); } else if (nId == m_nIndentPage) ((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh); @@ -2150,7 +2150,7 @@ bool SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet) void SwSectionIndentTabPage::Reset( const SfxItemSet& rSet) { //this page doesn't show up in HTML mode - FieldUnit aMetric = ::GetDfltMetric(sal_False); + FieldUnit aMetric = ::GetDfltMetric(false); SetMetric(*m_pBeforeMF, aMetric); SetMetric(*m_pAfterMF , aMetric); diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 82f94802a6d6..8a62fff1eaf3 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -136,7 +136,7 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) SetExchangeSupport(); // Metrics - FieldUnit aMetric = ::GetDfltMetric(sal_False); + FieldUnit aMetric = ::GetDfltMetric(false); SetMetric(*m_pAddrLeftField, aMetric); SetMetric(*m_pAddrTopField, aMetric); SetMetric(*m_pSendLeftField, aMetric); diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 67dec60a65d3..bd0eebc77e5e 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -135,7 +135,7 @@ void SwEnvPreview::Paint(const Rectangle &) } SwEnvDlg::SwEnvDlg(Window* pParent, const SfxItemSet& rSet, - SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert) + SwWrtShell* pWrtSh, Printer* pPrt, bool bInsert) : SfxTabDialog(pParent, "EnvDialog", "modules/swriter/ui/envdialog.ui", &rSet) , aEnvItem((const SwEnvItem&) rSet.Get(FN_ENVELOP)) @@ -269,7 +269,7 @@ IMPL_LINK_NOARG(SwEnvPage, FieldHdl) IMPL_LINK_NOARG(SwEnvPage, SenderHdl) { - const sal_Bool bEnable = m_pSenderBox->IsChecked(); + const bool bEnable = m_pSenderBox->IsChecked(); GetParentSwEnvDlg()->aEnvItem.bSend = bEnable; m_pSenderEdit->Enable(bEnable); if ( bEnable ) diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx index 714f2bc12642..492a816b3e49 100644 --- a/sw/source/ui/envelp/envprt.cxx +++ b/sw/source/ui/envelp/envprt.cxx @@ -42,7 +42,7 @@ SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) SetExchangeSupport(); // Metrics - FieldUnit eUnit = ::GetDfltMetric(sal_False); + FieldUnit eUnit = ::GetDfltMetric(false); SetMetric(*m_pRightField, eUnit); SetMetric(*m_pDownField, eUnit); diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index b0b5b96e8976..a679796377f2 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -92,7 +92,7 @@ void SwLabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) } SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet, - SwDBMgr* pDBMgr_, sal_Bool bLabel) + SwDBMgr* pDBMgr_, bool bLabel) : SfxTabDialog(pParent, "LabelDialog", "modules/swriter/ui/labeldialog.ui", &rSet) , pDBMgr(pDBMgr_) @@ -196,7 +196,7 @@ void SwLabDlg::GetLabItem(SwLabItem &rItem) } } -SwLabRec* SwLabDlg::GetRecord(const OUString &rRecName, sal_Bool bCont) +SwLabRec* SwLabDlg::GetRecord(const OUString &rRecName, bool bCont) { SwLabRec* pRec = NULL; bool bFound = false; @@ -294,7 +294,7 @@ void SwLabPage::SetToBusinessCard() m_pSheetButton->SetHelpId(HID_BUSINESS_FMT_PAGE_SHEET); m_pMakeBox->SetHelpId(HID_BUSINESS_FMT_PAGE_BRAND); m_pTypeBox->SetHelpId(HID_BUSINESS_FMT_PAGE_TYPE); - m_bLabel = sal_False; + m_bLabel = false; m_pAddressFrame->Hide(); }; @@ -355,7 +355,7 @@ IMPL_LINK_NOARG(SwLabPage, MakeHdl) GetParentSwLabDlg()->ReplaceGroup( aMake ); aItem.aLstMake = aMake; - const sal_Bool bCont = m_pContButton->IsChecked(); + const bool bCont = m_pContButton->IsChecked(); const size_t nCount = GetParentSwLabDlg()->Recs().size(); size_t nLstType = 0; @@ -408,7 +408,7 @@ IMPL_LINK_NOARG_INLINE_END(SwLabPage, TypeHdl) void SwLabPage::DisplayFormat() { MetricField aField(this, WinBits(0)); - FieldUnit aMetric = ::GetDfltMetric(sal_False); + FieldUnit aMetric = ::GetDfltMetric(false); SetMetric(aField, aMetric); aField.SetDecimalDigits(2); aField.SetMin (0); diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index 256027c5b132..ba14f0e17ae6 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -155,7 +155,7 @@ IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox ) aBlockNames.getConstArray() ); } if(pExampleFrame->IsInitialized()) - pExampleFrame->ClearDocument( sal_True ); + pExampleFrame->ClearDocument( true ); } return 0; } diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index c763b0e2d3c2..0570ae151ac1 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -311,7 +311,7 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) get(m_pSavePB, "save"); // Metrics - FieldUnit aMetric = ::GetDfltMetric(sal_False); + FieldUnit aMetric = ::GetDfltMetric(false); SetMetric(*m_pHDistField, aMetric); SetMetric(*m_pVDistField , aMetric); SetMetric(*m_pWidthField , aMetric); diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index db4f7d018ab2..00efa604f004 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -115,7 +115,7 @@ void SwXSelChgLstnr_Impl::selectionChanged( const EventObject& ) throw (Runtime if(rParent.pImpl->xSelSupp.is()) rParent.pImpl->xSelSupp->getSelection() >>= aSelection; - sal_Bool bEnable = aSelection.getLength() > 0; + bool bEnable = aSelection.getLength() > 0; rParent.aMarkedRB.Enable(bEnable); if(bEnable) rParent.aMarkedRB.Check(); @@ -386,7 +386,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, if (aColumnLB.GetSelectEntryCount() == 0) aColumnLB.SelectEntryPos(0); - const sal_Bool bEnable = m_aSelection.getLength() != 0; + const bool bEnable = m_aSelection.getLength() != 0; aMarkedRB.Enable(bEnable); if (bEnable) aMarkedRB.Check(); @@ -574,7 +574,7 @@ IMPL_LINK( SwMailMergeDlg, ButtonHdl, Button *, pBtn ) IMPL_LINK( SwMailMergeDlg, OutputTypeHdl, RadioButton *, pBtn ) { - sal_Bool bPrint = pBtn == &aPrinterRB; + bool bPrint = pBtn == &aPrinterRB; aSingleJobsCB.Enable(bPrint); aSaveMergedDocumentFL.Enable( !bPrint ); @@ -624,7 +624,7 @@ IMPL_LINK( SwMailMergeDlg, SaveTypeHdl, RadioButton*, pBtn ) IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox ) { - sal_Bool bEnable = pBox->IsChecked(); + bool bEnable = pBox->IsChecked(); aColumnFT.Enable( bEnable ); aColumnLB.Enable(bEnable); aPathFT.Enable( bEnable ); diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx index e24a86d4ec48..97e6a171256f 100644 --- a/sw/source/ui/envelp/swuilabimp.hxx +++ b/sw/source/ui/envelp/swuilabimp.hxx @@ -44,7 +44,7 @@ class SwLabPage : public SfxTabPage ListBox* m_pHiddenSortTypeBox; FixedText* m_pFormatInfo; - sal_Bool m_bLabel; + bool m_bLabel; SwLabPage(Window* pParent, const SfxItemSet& rSet); diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx index 1eb7e5107a52..3d32f7391de7 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star; Description: edit insert-field --------------------------------------------------------------------*/ sw::DropDownFieldDialog::DropDownFieldDialog(Window *pParent, SwWrtShell &rS, - SwField* pField, sal_Bool bNextButton) + SwField* pField, bool bNextButton) : SvxStandardDialog(pParent, "DropdownFieldDialog", "modules/swriter/ui/dropdownfielddialog.ui") , rSh( rS ) @@ -67,7 +67,7 @@ sw::DropDownFieldDialog::DropDownFieldDialog(Window *pParent, SwWrtShell &rS, m_pListItemsLB->SelectEntry(pDropField->GetSelectedItem()); } - sal_Bool bEnable = !rSh.IsCrsrReadonly(); + bool bEnable = !rSh.IsCrsrReadonly(); m_pOKPB->Enable( bEnable ); m_pListItemsLB->GrabFocus(); diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index 4af3c051c213..580e42867583 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -230,14 +230,14 @@ IMPL_LINK_NOARG(SwChangeDBDlg, ButtonHdl) IMPL_LINK_NOARG(SwChangeDBDlg, TreeSelectHdl) { - sal_Bool bEnable = sal_False; + bool bEnable = false; SvTreeListEntry* pEntry = m_pAvailDBTLB->GetCurEntry(); if (pEntry) { if (m_pAvailDBTLB->GetParent(pEntry)) - bEnable = sal_True; + bEnable = true; m_pDefineBT->Enable( bEnable ); } return 0; diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 40b1f68d223f..526743adfb06 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -233,7 +233,7 @@ bool SwFldDBPage::FillItemSet(SfxItemSet& ) OUString sTempTableName; OUString sTempColumnName; OUString sTempDBName = m_pDatabaseTLB->GetDBName(sTempTableName, sTempColumnName); - sal_Bool bDBListBoxChanged = m_sOldDBName != sTempDBName || + bool bDBListBoxChanged = m_sOldDBName != sTempDBName || m_sOldTableName != sTempTableName || m_sOldColumnName != sTempColumnName; if (!IsFldEdit() || m_pConditionED->GetSavedValue() != m_pConditionED->GetText() || @@ -278,7 +278,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) SwWrtShell *pSh = GetWrtShell(); if(!pSh) pSh = ::GetActiveWrtShell(); - sal_Bool bCond = sal_False, bSetNo = sal_False, bFormat = sal_False, bDBFormat = sal_False; + bool bCond = false, bSetNo = false, bFormat = false, bDBFormat = false; const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel()); m_pDatabaseTLB->ShowColumns(nTypeId == TYP_DBFLD); @@ -302,8 +302,8 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) switch (nTypeId) { case TYP_DBFLD: - bFormat = sal_True; - bDBFormat = sal_True; + bFormat = true; + bDBFormat = true; m_pNumFormatLB->Show(); m_pFormatLB->Hide(); @@ -323,10 +323,10 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) break; case TYP_DBNUMSETFLD: - bSetNo = sal_True; + bSetNo = true; // no break! case TYP_DBNEXTSETFLD: - bCond = sal_True; + bCond = true; if (IsFldEdit()) { m_pConditionED->SetText(GetCurField()->GetPar1()); @@ -338,7 +338,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) break; case TYP_DBSETNUMBERFLD: - bFormat = sal_True; + bFormat = true; m_pNewFormatRB->Check(); m_pNumFormatLB->Hide(); m_pFormatLB->Show(); @@ -360,11 +360,11 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) if (nTypeId != TYP_DBFLD) { m_pDBFormatRB->Enable(bDBFormat); - m_pNewFormatRB->Enable(bDBFormat|bFormat); + m_pNewFormatRB->Enable(bDBFormat || bFormat); m_pNumFormatLB->Enable(bDBFormat); m_pFormatLB->Enable(bFormat); } - m_pFormat->Enable(bDBFormat|bFormat); + m_pFormat->Enable(bDBFormat || bFormat); if (!IsFldEdit()) { @@ -434,7 +434,7 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox ) if (nTypeId == TYP_DBFLD) { - sal_Bool bNumFormat = sal_False; + bool bNumFormat = false; if (pEntry != 0) { diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 58e8035afaff..6334fc37b856 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -80,7 +80,7 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pParent, const SfxItemSet& rCoreSet) m_pTypeTLB->SetNodeDefaultImages(); //enable 'active' language selection - m_pFormatLB->SetShowLanguageControl(sal_True); + m_pFormatLB->SetShowLanguageControl(true); SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, false ); if ( pItem ) @@ -280,8 +280,8 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl) nExtSubType = DI_SUB_TIME; sal_uInt16 nOldType = 0; - sal_Bool bEnable = sal_False; - sal_Bool bOneArea = sal_False; + bool bEnable = false; + bool bOneArea = false; if (m_pFormatLB->IsEnabled()) nOldType = m_pFormatLB->GetFormatType(); @@ -293,12 +293,12 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl) case DI_SUB_DATE: nNewType = NUMBERFORMAT_DATE; - bOneArea = sal_True; + bOneArea = true; break; case DI_SUB_TIME: nNewType = NUMBERFORMAT_TIME; - bOneArea = sal_True; + bOneArea = true; break; } if (!nNewType) @@ -312,7 +312,7 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl) m_pFormatLB->SetFormatType(nNewType); m_pFormatLB->SetOneArea(bOneArea); } - bEnable = sal_True; + bEnable = true; } sal_uLong nFormat = IsFldEdit() ? ((SwDocInfoField*)GetCurField())->GetFormat() : 0; @@ -399,14 +399,14 @@ sal_Int32 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType) } } - sal_Bool bEnable = nSize != 0; + bool bEnable = nSize != 0; if (nSize) { if (!m_pSelectionLB->GetSelectEntryCount()) m_pSelectionLB->SelectEntryPos(nSelPos == USHRT_MAX ? 0 : nSelPos); - bEnable = sal_True; + bEnable = true; } m_pSelection->Enable(bEnable); diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 1260773c8867..27c125d8e33e 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -75,7 +75,7 @@ SwFldDokPage::SwFldDokPage(Window* pParent, const SfxItemSet& rCoreSet ) m_pDateOffsetED->SetMin(LONG_MIN); m_pDateOffsetED->SetMax(LONG_MAX); //enable 'active' language selection - m_pNumFormatLB->SetShowLanguageControl(sal_True); + m_pNumFormatLB->SetShowLanguageControl(true); } SwFldDokPage::~SwFldDokPage() @@ -291,7 +291,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) m_pSelectionLB->SetSelectHdl(LINK(this, SwFldDokPage, SubTypeHdl)); } - sal_Bool bEnable = nCount != 0; + bool bEnable = nCount != 0; if (bEnable && !m_pSelectionLB->GetSelectEntryCount()) m_pSelectionLB->SelectEntryPos(0); @@ -301,16 +301,16 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) // fill Format-Listbox sal_Int32 nSize = FillFormatLB(nTypeId); - sal_Bool bValue = sal_False, bLevel = sal_False, bNumFmt = sal_False, bOffset = sal_False; - sal_Bool bFormat = nSize != 0; - sal_Bool bOneArea = sal_False; - sal_Bool bFixed = sal_False; + bool bValue = false, bLevel = false, bNumFmt = false, bOffset = false; + bool bFormat = nSize != 0; + bool bOneArea = false; + bool bFixed = false; sal_uInt16 nFmtType = 0; switch (nTypeId) { case TYP_DATEFLD: - bFormat = bNumFmt = bOneArea = bOffset = sal_True; + bFormat = bNumFmt = bOneArea = bOffset = true; nFmtType = NUMBERFORMAT_DATE; @@ -324,7 +324,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) break; case TYP_TIMEFLD: - bFormat = bNumFmt = bOneArea = bOffset = sal_True; + bFormat = bNumFmt = bOneArea = bOffset = true; nFmtType = NUMBERFORMAT_TIME; @@ -359,27 +359,27 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) else m_pValueED->SetText(((SwPageNumberField*)GetCurField())->GetUserString()); } - bValue = sal_True; + bValue = true; break; case TYP_CHAPTERFLD: m_pValueFT->SetText(SW_RESSTR(STR_LEVEL)); if (IsFldEdit()) m_pLevelED->SetText(OUString::number(((SwChapterField*)GetCurField())->GetLevel() + 1)); - bLevel = sal_True; + bLevel = true; break; case TYP_PAGENUMBERFLD: m_pValueFT->SetText( SW_RESSTR( STR_OFFSET )); if (IsFldEdit()) m_pValueED->SetText(GetCurField()->GetPar2()); - bValue = sal_True; + bValue = true; break; case TYP_EXTUSERFLD: case TYP_AUTHORFLD: case TYP_FILENAMEFLD: - bFixed = sal_True; + bFixed = true; break; default: @@ -426,7 +426,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) if (m_pNumFormatLB->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND) m_pNumFormatLB->SelectEntryPos(0); - m_pValueFT->Enable(bValue | bLevel | bOffset); + m_pValueFT->Enable(bValue || bLevel || bOffset); m_pValueED->Enable(bValue); } diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 65e5c99962db..8fc8170ed32f 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -121,12 +121,12 @@ void SwFldEditDlg::Init() pSh->StartAction(); pSh->CreateCrsr(); - sal_Bool bMove = rMgr.GoNext(); + bool bMove = rMgr.GoNext(); if( bMove ) rMgr.GoPrev(); m_pNextBT->Enable(bMove); - if( 0 != ( bMove = rMgr.GoPrev() ) ) + if( ( bMove = rMgr.GoPrev() ) ) rMgr.GoNext(); m_pPrevBT->Enable( bMove ); @@ -200,10 +200,10 @@ SwFldEditDlg::~SwFldEditDlg() pSh->EnterStdMode(); } -void SwFldEditDlg::EnableInsert(sal_Bool bEnable) +void SwFldEditDlg::EnableInsert(bool bEnable) { if( bEnable && pSh->IsReadOnlyAvailable() && pSh->HasReadonlySel() ) - bEnable = sal_False; + bEnable = false; GetOKButton()->Enable( bEnable ); } @@ -265,11 +265,11 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton ) /* #108536# Only create selection if there is none already. Normalize PaM instead of swapping. */ if ( ! pSh->HasSelection() ) - pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); + pSh->Right(CRSR_SKIP_CHARS, true, 1, false ); pSh->NormalizePam(); - sal_uInt16 nGroup = rMgr.GetGroup(sal_False, pCurFld->GetTypeId(), pCurFld->GetSubType()); + sal_uInt16 nGroup = rMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType()); if (nGroup != pTabPage->GetGroup()) pTabPage = (SwFldPage*)CreatePage(nGroup); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 3cb7b72c4dfe..ab4ea04a282b 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -220,12 +220,12 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) m_pFormatLB->SelectEntryPos(0); } - sal_Bool bValue = sal_False, bName = sal_False, bMacro = sal_False, bInsert = sal_True; - sal_Bool bFormat = nSize != 0; + bool bValue = false, bName = false, bMacro = false, bInsert = true; + bool bFormat = nSize != 0; // two controls for conditional text - sal_Bool bDropDown = TYP_DROPDOWN == nTypeId; - sal_Bool bCondTxtFld = TYP_CONDTXTFLD == nTypeId; + bool bDropDown = TYP_DROPDOWN == nTypeId; + bool bCondTxtFld = TYP_CONDTXTFLD == nTypeId; m_pCond1FT->Show(!bDropDown && bCondTxtFld); m_pCond1ED->Show(!bDropDown && bCondTxtFld); @@ -277,11 +277,11 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) switch (nTypeId) { case TYP_MACROFLD: - bMacro = sal_True; + bMacro = true; if (!GetFldMgr().GetMacroPath().isEmpty()) - bValue = sal_True; + bValue = true; else - bInsert = sal_False; + bInsert = false; m_pNameFT->SetText(SW_RESSTR(STR_MACNAME)); m_pValueFT->SetText(SW_RESSTR(STR_PROMPT)); @@ -293,7 +293,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) case TYP_HIDDENPARAFLD: m_pNameFT->SetText(SW_RESSTR(STR_COND)); m_pNameED->SetDropEnable(true); - bName = sal_True; + bName = true; m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); break; @@ -306,7 +306,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) SwWrtShell* pSh = GetActiveWrtShell(); if (!IsFldEdit() && pSh ) m_pValueED->SetText(pSh->GetSelTxt()); - bName = bValue = sal_True; + bName = bValue = true; m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); } @@ -321,7 +321,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) m_pCond2ED->SetText(GetCurField()->GetPar2().getToken(1, '|')); } - bName = bValue = sal_True; + bName = bValue = true; m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); break; @@ -329,14 +329,14 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) case TYP_JUMPEDITFLD: m_pNameFT->SetText(SW_RESSTR(STR_JUMPEDITFLD)); m_pValueFT->SetText(SW_RESSTR(STR_PROMPT)); - bName = bValue = sal_True; + bName = bValue = true; m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); break; case TYP_INPUTFLD: m_pValueFT->SetText(SW_RESSTR(STR_PROMPT)); - bValue = sal_True; + bValue = true; m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); break; @@ -345,11 +345,11 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) { m_pNameFT->SetText(SW_RESSTR(STR_COMBCHRS_FT)); m_pNameED->SetDropEnable(true); - bName = sal_True; + bName = true; const sal_Int32 nLen = m_pNameED->GetText().getLength(); if( !nLen || nLen > MAX_COMBINED_CHARACTERS ) - bInsert = sal_False; + bInsert = false; m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); } @@ -444,7 +444,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, ListEnableHdl) //enable "Add" button when text is in the Edit that's not already member of the box m_pListAddPB->Enable(!m_pListItemED->GetText().isEmpty() && LISTBOX_ENTRY_NOTFOUND == m_pListItemsLB->GetEntryPos(m_pListItemED->GetText())); - sal_Bool bEnableButtons = m_pListItemsLB->GetSelectEntryCount() > 0; + bool bEnableButtons = m_pListItemsLB->GetSelectEntryCount() > 0; m_pListRemovePB->Enable(bEnableButtons); m_pListUpPB->Enable(bEnableButtons && (m_pListItemsLB->GetSelectEntryPos() > 0)); m_pListDownPB->Enable(bEnableButtons && @@ -474,7 +474,7 @@ void SwFldFuncPage::UpdateSubType() m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(i)); } - sal_Bool bEnable = nCount != 0; + bool bEnable = nCount != 0; m_pSelectionLB->Enable( bEnable ); @@ -627,12 +627,12 @@ IMPL_LINK_NOARG(SwFldFuncPage, ModifyHdl) { const sal_Int32 nLen = m_pNameED->GetText().getLength(); - sal_Bool bEnable = sal_True; + bool bEnable = true; sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel()); if( TYP_COMBINED_CHARS == nTypeId && (!nLen || nLen > MAX_COMBINED_CHARACTERS )) - bEnable = sal_False; + bEnable = false; EnableInsert( bEnable ); diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index be9a092f93bf..f3a4c4220285 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -67,7 +67,7 @@ SwFldPage::~SwFldPage() void SwFldPage::Init() { SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current(); - sal_Bool bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON); + bool bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON); m_bFldEdit = 0 == GetTabDialog(); @@ -82,7 +82,7 @@ void SwFldPage::Init() // initialise Rangelistbox if( m_bFldDlgHtmlMode && m_bFirstHTMLInit ) { - m_bFirstHTMLInit = sal_False; + m_bFirstHTMLInit = false; SwWrtShell *pSh = m_pWrtShell; if(! pSh) pSh = ::GetActiveWrtShell(); @@ -111,27 +111,27 @@ void SwFldPage::ActivatePage() Description: complete reset; edit new field --------------------------------------------------------------------*/ -void SwFldPage::EditNewField( sal_Bool bOnlyActivate ) +void SwFldPage::EditNewField( bool bOnlyActivate ) { if( !bOnlyActivate ) { m_nTypeSel = LISTBOX_ENTRY_NOTFOUND; } m_nSelectionSel = LISTBOX_ENTRY_NOTFOUND; - m_bRefresh = sal_True; + m_bRefresh = true; Reset(*(SfxItemSet*)0); - m_bRefresh = sal_False; + m_bRefresh = false; } /*-------------------------------------------------------------------- Description: insert field --------------------------------------------------------------------*/ -sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString& rPar1, +bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString& rPar1, const OUString& rPar2, sal_uLong nFormatId, - sal_Unicode cSeparator, sal_Bool bIsAutomaticLanguage) + sal_Unicode cSeparator, bool bIsAutomaticLanguage) { - sal_Bool bRet = sal_False; + bool bRet = false; SwView* pView = GetActiveView(); SwWrtShell *pSh = m_pWrtShell ? m_pWrtShell : pView->GetWrtShellPtr(); @@ -346,7 +346,7 @@ IMPL_LINK( SwFldPage, InsertHdl, Button *, pBtn ) Description: enable/disable "Insert"-Button --------------------------------------------------------------------*/ -void SwFldPage::EnableInsert(sal_Bool bEnable) +void SwFldPage::EnableInsert(bool bEnable) { SwFldDlg *pDlg = (SwFldDlg*)GetTabDialog(); diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx index 719e701cee09..dedbae5fcf2f 100644 --- a/sw/source/ui/fldui/fldpage.hxx +++ b/sw/source/ui/fldui/fldpage.hxx @@ -37,10 +37,10 @@ class SwFldPage : public SfxTabPage sal_Int32 m_nTypeSel; sal_Int32 m_nSelectionSel; bool m_bFldEdit; - sal_Bool m_bInsert; - sal_Bool m_bFldDlgHtmlMode; - sal_Bool m_bRefresh; - sal_Bool m_bFirstHTMLInit; + bool m_bInsert; + bool m_bFldDlgHtmlMode; + bool m_bRefresh; + bool m_bFirstHTMLInit; protected: @@ -48,8 +48,8 @@ protected: void SetTypeSel(sal_Int32 nSet) { m_nTypeSel = nSet;} sal_Int32 GetSelectionSel() const { return m_nSelectionSel;} void SetSelectionSel(sal_Int32 nSet){ m_nSelectionSel = nSet;} - sal_Bool IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;} - sal_Bool IsRefresh() const { return m_bRefresh;} + bool IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;} + bool IsRefresh() const { return m_bRefresh;} SwField* GetCurField() { return m_pCurFld;} SwWrtShell* GetWrtShell() { return m_pWrtShell;} @@ -62,17 +62,17 @@ protected: const ListBox* pLst3 = 0); void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0, ListBox* pLst3 = 0 ); - void EnableInsert(sal_Bool bEnable = sal_True); + void EnableInsert(bool bEnable = true); inline bool IsFldEdit() const { return m_bFldEdit; } // insert field - sal_Bool InsertFld( sal_uInt16 nTypeId, + bool InsertFld( sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString& rPar1, const OUString& rPar2, sal_uLong nFormatId, sal_Unicode cDelim = ' ', - sal_Bool bIsAutomaticLanguage = sal_True); + bool bIsAutomaticLanguage = true); using SfxTabPage::ActivatePage; @@ -86,7 +86,7 @@ public: inline SwFldMgr& GetFldMgr() { return m_aMgr; } void SetWrtShell( SwWrtShell* m_pWrtShell ); - void EditNewField( sal_Bool bOnlyActivate = sal_False ); + void EditNewField( bool bOnlyActivate = false ); virtual sal_uInt16 GetGroup() = 0; }; diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index f1820e81b558..87daaac6c63e 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -342,7 +342,7 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl) // fill selection-ListBox UpdateSubType(); - sal_Bool bName = sal_False; + bool bName = false; nFldDlgFmtSel = 0; if ( ( !IsFldEdit() || m_pSelectionLB->GetEntryCount() ) && @@ -358,15 +358,15 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl) if (REFFLDFLAG & (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(nOld)) // the old one stays nFldDlgFmtSel = m_pFormatLB->GetSelectEntryPos(); - bName = sal_True; + bName = true; break; case TYP_SETREFFLD: - bName = sal_True; + bName = true; break; case REFFLDFLAG_BOOKMARK: - bName = sal_True; + bName = true; // no break!!! default: if( REFFLDFLAG & nTypeId ) @@ -747,13 +747,13 @@ IMPL_LINK_NOARG(SwFldRefPage, ModifyHdl) OUString aName(m_pNameED->GetText()); const bool bEmptyName = aName.isEmpty(); - sal_Bool bEnable = sal_True; + bool bEnable = true; sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel()); if ((nTypeId == TYP_SETREFFLD && !GetFldMgr().CanInsertRefMark(aName)) || (bEmptyName && (nTypeId == TYP_GETREFFLD || nTypeId == TYP_SETREFFLD || nTypeId == REFFLDFLAG_BOOKMARK))) - bEnable = sal_False; + bEnable = false; EnableInsert(bEnable); @@ -764,7 +764,7 @@ IMPL_LINK_NOARG(SwFldRefPage, ModifyHdl) bool SwFldRefPage::FillItemSet(SfxItemSet& ) { - sal_Bool bModified = sal_False; + bool bModified = false; sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel()); sal_uInt16 nSubType = 0; @@ -825,7 +825,7 @@ bool SwFldRefPage::FillItemSet(SfxItemSet& ) aVal = OUString::number( aArr[nPos]->nSeqNo ); if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo()) - bModified = sal_True; // can happen with fields of which the references were deleted + bModified = true; // can happen with fields of which the references were deleted } else if (IsFldEdit()) aVal = OUString::number( pRefFld->GetSeqNo() ); @@ -846,7 +846,7 @@ bool SwFldRefPage::FillItemSet(SfxItemSet& ) aVal = OUString::number( aArr[nPos]->nSeqNo ); if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo()) - bModified = sal_True; // can happen with fields of which the reference was deleted + bModified = true; // can happen with fields of which the reference was deleted } else if (IsFldEdit()) aVal = OUString::number( pRefFld->GetSeqNo() ); @@ -915,7 +915,7 @@ bool SwFldRefPage::FillItemSet(SfxItemSet& ) aVal = OUString::number( aArr[nPos]->nSeqNo ); if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo()) - bModified = sal_True; // can happen with fields of which the reference was deleted + bModified = true; // can happen with fields of which the reference was deleted } else if (IsFldEdit()) aVal = OUString::number( pRefFld->GetSeqNo() ); diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 9fa310f42093..bc39b2392b8f 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -86,7 +86,7 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent) -1, utl::OConfigurationTreeRoot::CM_READONLY); - sal_Bool bDatabaseFields = sal_True; + bool bDatabaseFields = true; aCfgRoot.getNodeValue( OUString("DatabaseFields")) >>= bDatabaseFields; @@ -212,7 +212,7 @@ IMPL_LINK_NOARG(SwFldDlg, CancelHdl) void SwFldDlg::ReInitDlg() { SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current(); - sal_Bool bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0; + bool bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0; if (bNewMode != m_bHtmlMode) { @@ -246,7 +246,7 @@ void SwFldDlg::ReInitDlg() Description: newly initialise TabPage after Doc-Switch --------------------------------------------------------------------*/ -void SwFldDlg::ReInitTabPage( sal_uInt16 nPageId, sal_Bool bOnlyActivate ) +void SwFldDlg::ReInitTabPage( sal_uInt16 nPageId, bool bOnlyActivate ) { SwFldPage* pPage = (SwFldPage* )GetTabPage(nPageId); @@ -278,7 +278,7 @@ void SwFldDlg::Activate() } } -void SwFldDlg::EnableInsert(sal_Bool bEnable) +void SwFldDlg::EnableInsert(bool bEnable) { if( bEnable ) { @@ -287,7 +287,7 @@ void SwFldDlg::EnableInsert(sal_Bool bEnable) if( !pView || (pView->GetWrtShell().IsReadOnlyAvailable() && pView->GetWrtShell().HasReadonlySel()) ) - bEnable = sal_False; + bEnable = false; } GetOKButton().Enable(bEnable); } @@ -299,7 +299,7 @@ void SwFldDlg::InsertHdl() void SwFldDlg::ActivateDatabasePage() { - m_bDataBaseMode = sal_True; + m_bDataBaseMode = true; ShowPage(m_nDbId); SfxTabPage* pDBPage = GetTabPage(m_nDbId); if( pDBPage ) diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 99ba1bd603cd..4e4ae2f3dc82 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -81,7 +81,7 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) m_pChapterLevelLB->SelectEntryPos(0); //enable 'active' language selection - m_pNumFormatLB->SetShowLanguageControl(sal_True); + m_pNumFormatLB->SetShowLanguageControl(true); } SwFldVarPage::~SwFldVarPage() @@ -198,7 +198,7 @@ IMPL_LINK_NOARG(SwFldVarPage, TypeHdl) if (nOld != GetTypeSel() || nOld == LISTBOX_ENTRY_NOTFOUND) { - bInit = sal_True; + bInit = true; if (nOld != LISTBOX_ENTRY_NOTFOUND) { m_pNameED->SetText(OUString()); @@ -209,7 +209,7 @@ IMPL_LINK_NOARG(SwFldVarPage, TypeHdl) UpdateSubType(); // initialise selection-listboxes } - bInit = sal_False; + bInit = false; return 0; } @@ -242,9 +242,9 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) sal_Int32 nSize = m_pFormatLB->GetEntryCount(); - sal_Bool bValue = sal_False, bName = sal_False, bNumFmt = sal_False, - bInvisible = sal_False, bShowChapterFrame = sal_False; - sal_Bool bFormat = nSize != 0; + bool bValue = false, bName = false, bNumFmt = false, + bInvisible = false, bShowChapterFrame = false; + bool bFormat = nSize != 0; switch (nTypeId) { @@ -282,19 +282,19 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) m_pValueED->SetText(OUString()); } } - bValue = bName = bNumFmt = bInvisible = sal_True; + bValue = bName = bNumFmt = bInvisible = true; m_pValueED->SetDropEnable(true); break; } case TYP_SETFLD: - bValue = sal_True; + bValue = true; - bNumFmt = bInvisible = sal_True; + bNumFmt = bInvisible = true; if (!IsFldDlgHtmlMode()) - bName = sal_True; + bName = true; else { m_pNumFormatLB->Clear(); @@ -340,8 +340,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) case TYP_FORMELFLD: { - bValue = sal_True; - bNumFmt = sal_True; + bValue = true; + bNumFmt = true; m_pValueFT->SetText(SW_RESSTR(STR_FORMULA)); m_pValueED->SetDropEnable(true); } @@ -373,16 +373,16 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if(pSetTyp) { if (pSetTyp->GetType() & nsSwGetSetExpType::GSE_STRING) // textual? - bFormat = sal_True; + bFormat = true; else // numeric - bNumFmt = sal_True; + bNumFmt = true; } } } else - bFormat = sal_False; + bFormat = false; - EnableInsert(bFormat|bNumFmt); + EnableInsert(bFormat || bNumFmt); } break; @@ -391,7 +391,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (nSelPos != LISTBOX_ENTRY_NOTFOUND) { - bValue = bNumFmt = sal_True; + bValue = bNumFmt = true; OUString sName; @@ -423,7 +423,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) m_pValueED->SetText(((SwSetExpField*)GetCurField())->GetPromptText()); } else // USERFLD - bFormat = bNumFmt = sal_False; + bFormat = bNumFmt = false; } break; @@ -453,7 +453,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) } } } - bName = bValue = sal_True; + bName = bValue = true; break; case TYP_SEQFLD: @@ -496,7 +496,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) case TYP_SETREFPAGEFLD: { - bValue = sal_False; + bValue = false; m_pValueFT->SetText( SW_RESSTR( STR_OFFSET )); if (IsFldEdit() || pBox) // only when interacting via mouse @@ -504,7 +504,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (nSelPos != 0 && nSelPos != LISTBOX_ENTRY_NOTFOUND) { - bValue = sal_True; // SubType OFF - knows no Offset + bValue = true; // SubType OFF - knows no Offset if (IsFldEdit()) m_pValueED->SetText(OUString::number(((SwRefPageSetField*)GetCurField())->GetOffset())); } @@ -521,9 +521,9 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) m_pFormatLB->Show(!bNumFmt); if (IsFldEdit()) - bName = sal_False; + bName = false; - m_pFormat->Enable(bFormat|bNumFmt); + m_pFormat->Enable(bFormat || bNumFmt); m_pNameFT->Enable(bName); m_pNameED->Enable(bName); m_pValueFT->Enable(bValue); @@ -598,29 +598,29 @@ void SwFldVarPage::UpdateSubType() } else { - sal_Bool bInsert = sal_False; + bool bInsert = false; switch (nTypeId) { case TYP_INPUTFLD: if (aList[i] == GetCurField()->GetPar1()) - bInsert = sal_True; + bInsert = true; break; case TYP_FORMELFLD: - bInsert = sal_True; + bInsert = true; break; case TYP_GETFLD: if (aList[i].equals(((const SwFormulaField*)GetCurField())->GetFormula())) - bInsert = sal_True; + bInsert = true; break; case TYP_SETFLD: case TYP_USERFLD: if (aList[i] == GetCurField()->GetTyp()->GetName()) { - bInsert = sal_True; + bInsert = true; if (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE) m_pInvisibleCB->Check(); } @@ -638,7 +638,7 @@ void SwFldVarPage::UpdateSubType() default: if (aList[i] == GetCurField()->GetPar1()) - bInsert = sal_True; + bInsert = true; break; } if (bInsert) @@ -652,7 +652,7 @@ void SwFldVarPage::UpdateSubType() } } - sal_Bool bEnable = m_pSelectionLB->GetEntryCount() != 0; + bool bEnable = m_pSelectionLB->GetEntryCount() != 0; ListBox *pLB = 0; if (bEnable) @@ -690,7 +690,7 @@ sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) // fill Format-Listbox m_pFormatLB->Clear(); m_pNumFormatLB->Clear(); - sal_Bool bSpecialFmt = sal_False; + bool bSpecialFmt = false; if( TYP_GETREFPAGEFLD != nTypeId ) { @@ -806,7 +806,7 @@ sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) IMPL_LINK_NOARG(SwFldVarPage, ModifyHdl) { OUString sValue(m_pValueED->GetText()); - sal_Bool bHasValue = !sValue.isEmpty(); + bool bHasValue = !sValue.isEmpty(); const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel()); bool bInsert = false, bApply = false, bDelete = false; @@ -1076,7 +1076,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) IMPL_LINK_NOARG(SwFldVarPage, ChapterHdl) { - sal_Bool bEnable = m_pChapterLevelLB->GetSelectEntryPos() != 0; + bool bEnable = m_pChapterLevelLB->GetSelectEntryPos() != 0; m_pSeparatorED->Enable(bEnable); m_pSeparatorFT->Enable(bEnable); @@ -1087,7 +1087,7 @@ IMPL_LINK_NOARG(SwFldVarPage, ChapterHdl) IMPL_LINK_NOARG(SwFldVarPage, SeparatorHdl) { - sal_Bool bEnable = !m_pSeparatorED->GetText().isEmpty() || + bool bEnable = !m_pSeparatorED->GetText().isEmpty() || m_pChapterLevelLB->GetSelectEntryPos() == 0; EnableInsert(bEnable); diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx index ca0c23e03fa6..ab4222e4245b 100644 --- a/sw/source/ui/fldui/fldvar.hxx +++ b/sw/source/ui/fldui/fldvar.hxx @@ -74,7 +74,7 @@ class SwFldVarPage : public SwFldPage OUString sOldNameFT; sal_uLong nOldFormat; - sal_Bool bInit; + bool bInit; DECL_LINK(TypeHdl, void *); DECL_LINK( SubTypeHdl, ListBox* pLB = 0 ); diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index 2ebbb9880035..2a1d5ea5cca8 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -35,7 +35,7 @@ --------------------------------------------------------------------*/ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS, - SwField* pField, sal_Bool bNextButton ) + SwField* pField, bool bNextButton ) : SvxStandardDialog( pParent, "InputFieldDialog", "modules/swriter/ui/inputfielddialog.ui") , rSh( rS ) @@ -100,7 +100,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS, // JP 31.3.00: Inputfields in readonly regions must be allowed to // input any content. - 74639 - sal_Bool bEnable = !rSh.IsCrsrReadonly(); + bool bEnable = !rSh.IsCrsrReadonly(); m_pOKBT->Enable( bEnable ); m_pEditED->SetReadOnly( !bEnable ); diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index fad10ca8b6b3..bbc4f00e9521 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -45,8 +45,8 @@ using namespace ::com::sun::star; SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) : SvxStandardDialog(pParent, "InsertScriptDialog", "modules/swriter/ui/insertscript.ui"), - bNew(sal_True), - bIsUrl(sal_False), + bNew(true), + bIsUrl(false), pSh(pWrtSh), pFileDlg(NULL), @@ -134,8 +134,8 @@ void SwJavaEditDialog::Apply() void SwJavaEditDialog::CheckTravel() { - sal_Bool bTravel = sal_False; - sal_Bool bNext(sal_False), bPrev(sal_False); + bool bTravel = false; + bool bNext(false), bPrev(false); if(!bNew) { @@ -147,9 +147,9 @@ void SwJavaEditDialog::CheckTravel() if( bNext ) pMgr->GoPrev(); - if( 0 != ( bPrev = pMgr->GoPrev() ) ) + if( ( bPrev = pMgr->GoPrev() ) ) pMgr->GoNext(); - bTravel |= bNext|bPrev; + bTravel |= bNext || bPrev; pSh->DestroyCrsr(); pSh->EndAction(); @@ -219,12 +219,12 @@ void SwJavaEditDialog::SetFld() bool SwJavaEditDialog::IsUpdate() const { - return pFld && ( bIsUrl != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText ); + return pFld && ( (bIsUrl ? 1 : 0) != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText ); } IMPL_LINK_NOARG(SwJavaEditDialog, RadioButtonHdl) { - sal_Bool bEnable = m_pUrlRB->IsChecked(); + bool bEnable = m_pUrlRB->IsChecked(); m_pUrlPB->Enable(bEnable); m_pUrlED->Enable(bEnable); m_pEditED->Enable(!bEnable); diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 10a3e55527ef..cc591f370de2 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -442,23 +442,23 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nTypeId) { - ((SwFrmPage&)rPage).SetNewFrame( sal_True ); - ((SwFrmPage&)rPage).SetFormatUsed( sal_True ); + ((SwFrmPage&)rPage).SetNewFrame( true ); + ((SwFrmPage&)rPage).SetFormatUsed( true ); } else if (nId == m_nOptionsId) { - ((SwFrmAddPage&)rPage).SetFormatUsed(sal_True); - ((SwFrmAddPage&)rPage).SetNewFrame(sal_True); + ((SwFrmAddPage&)rPage).SetFormatUsed(true); + ((SwFrmAddPage&)rPage).SetNewFrame(true); } else if (nId == m_nWrapId) { - ((SwWrapTabPage&)rPage).SetFormatUsed( sal_True, sal_False ); + ((SwWrapTabPage&)rPage).SetFormatUsed( true, false ); } else if (nId == m_nColumnId) { if( nType == SFX_STYLE_FAMILY_FRAME ) - ((SwColumnPage&)rPage).SetFrmMode(sal_True); - ((SwColumnPage&)rPage).SetFormatUsed( sal_True ); + ((SwColumnPage&)rPage).SetFrmMode(true); + ((SwColumnPage&)rPage).SetFormatUsed( true ); } //UUUU do not remove; many other style dialog combinations still use the SfxTabPage // for the SvxBrushItem (see RID_SVXPAGE_BACKGROUND) diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 12abb8e882ee..3e1d5aa59fcd 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -276,10 +276,10 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox) break; } - sal_Bool bIsSection = pSet == pSectionSet || pSet == pSelectionSet; + bool bIsSection = pSet == pSectionSet || pSet == pSelectionSet; pTabPage->ShowBalance(bIsSection); pTabPage->SetInSection(bIsSection); - pTabPage->SetFrmMode(sal_True); + pTabPage->SetFrmMode(true); pTabPage->SetPageWidth(nWidth); if( pSet ) pTabPage->Reset(*pSet); @@ -404,9 +404,9 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) , nFirstVis(0) , nMinWidth(MINLAY) , pModifiedField(0) - , bFormat(sal_False) - , bFrm(sal_False) - , bHtmlMode(sal_False) + , bFormat(false) + , bFrm(false) + , bHtmlMode(false) , bLockUpdate(false) { get(m_pCLNrEdt, "colsnf"); @@ -576,7 +576,7 @@ void SwColumnPage::Reset(const SfxItemSet &rSet) ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); if(nHtmlMode & HTMLMODE_ON) { - bHtmlMode = sal_True; + bHtmlMode = true; m_pAutoWidthBox->Enable(false); } FieldUnit aMetric = ::GetDfltMetric(bHtmlMode); @@ -681,10 +681,10 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ ) for( sal_uInt16 i = 1; i < nCols; ++i ) nMin = std::min(nMin, nColWidth[i]); - sal_Bool bAutoWidth = m_pAutoWidthBox->IsChecked(); + bool bAutoWidth = m_pAutoWidthBox->IsChecked(); if(!bAutoWidth) { - pColMgr->SetAutoWidth(sal_False); + pColMgr->SetAutoWidth(false); // when the user didn't allocate the whole width, // add the missing amount to the last column. long nSum = 0; @@ -780,7 +780,7 @@ void SwColumnPage::Init() { m_pCLNrEdt->SetValue(nCols); - sal_Bool bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode; + bool bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode; m_pAutoWidthBox->Check( bAutoWidth ); sal_Int32 nColumnWidthSum = 0; @@ -856,10 +856,10 @@ bool SwColumnPage::isLineNotNone() const ------------------------------------------------------------------------*/ void SwColumnPage::UpdateCols() { - sal_Bool bEnableBtns= sal_False; - sal_Bool bEnable12 = sal_False; - sal_Bool bEnable3 = sal_False; - const sal_Bool bEdit = !m_pAutoWidthBox->IsChecked(); + bool bEnableBtns= false; + bool bEnable12 = false; + bool bEnable3 = false; + const bool bEdit = !m_pAutoWidthBox->IsChecked(); if ( nCols > nVisCols ) { bEnableBtns = true && !bHtmlMode; @@ -870,8 +870,8 @@ void SwColumnPage::UpdateCols() // here are purposely hardly any breaks switch(nCols) { - case 3: bEnable3 = sal_True; - case 2: bEnable12= sal_True; break; + case 3: bEnable3 = true; + case 2: bEnable12= true; break; default: /* do nothing */; } } @@ -1231,7 +1231,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) pColMgr->SetActualWidth(nTotalWish); Init(); } - sal_Bool bPercent; + bool bPercent; // only relative data in frame format if ( bFormat || (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) ) { @@ -1243,10 +1243,10 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) aDistEd2.SetRefValue(nTotalWish); // switch to %-view - bPercent = sal_True; + bPercent = true; } else - bPercent = sal_False; + bPercent = false; aEd1.ShowPercent(bPercent); aEd2.ShowPercent(bPercent); @@ -1308,12 +1308,12 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS ) return 0; } -void SwColumnPage::SetFrmMode(sal_Bool bMod) +void SwColumnPage::SetFrmMode(bool bMod) { bFrm = bMod; } -void SwColumnPage::SetInSection(sal_Bool bSet) +void SwColumnPage::SetInSection(bool bSet) { if(!SW_MOD()->GetCTLOptions().IsCTLFontEnabled()) return; diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index c9774e26cc58..30a373ef8fd8 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -246,7 +246,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) : void SwCaptionDialog::Apply() { InsCaptionOpt aOpt; - aOpt.UseCaption() = sal_True; + aOpt.UseCaption() = true; OUString aName( m_pCategoryBox->GetText() ); if ( aName == m_sNone ) { @@ -366,7 +366,7 @@ void SwCaptionDialog::DrawSample() aNumVector.push_back(1); OUString sNumber( rSh.GetOutlineNumRule()-> - MakeNumString(aNumVector, sal_False )); + MakeNumString(aNumVector, false )); if( !sNumber.isEmpty() ) aStr += sNumber + pFldType->GetDelimiter(); } diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index add00da6754f..c6ee60133c98 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -162,12 +162,12 @@ void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) else if (nId == m_nWrapId) { ((SwWrapTabPage&)rPage).SetNewFrame(m_bNew); - ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, sal_False); + ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, false); ((SwWrapTabPage&)rPage).SetShell(m_pWrtShell); } else if (nId == m_nColumnId) { - ((SwColumnPage&)rPage).SetFrmMode(sal_True); + ((SwColumnPage&)rPage).SetFrmMode(true); ((SwColumnPage&)rPage).SetFormatUsed(m_bFormat); const SwFmtFrmSize& rSize = (const SwFmtFrmSize&) diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 03c2b05b0fea..2775966644ce 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -453,7 +453,7 @@ static void lcl_InsertVectors(ListBox& rBox, // --> OD 2009-08-31 #mongolianlayout# // add input parameter -static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, bool bVertical, sal_Bool bVerticalL2R, sal_Bool bRTL) +static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, bool bVertical, bool bVerticalL2R, bool bRTL) { //special handling of STR_FROMLEFT if ( SwFPos::FROMLEFT == eStringId ) @@ -586,7 +586,7 @@ static sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap, // standard frame TabPage namespace { - void HandleAutoCB( sal_Bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto, MetricField& _rPF_Edit) + void HandleAutoCB( bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto, MetricField& _rPF_Edit) { _rFT_man.Show( !_bChecked ); _rFT_auto.Show( _bChecked ); @@ -599,17 +599,17 @@ SwFrmPage::SwFrmPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage(pParent, "FrmTypePage", "modules/swriter/ui/frmtypepage.ui", rSet) , - bAtHorzPosModified( sal_False ), - bAtVertPosModified( sal_False ), - bFormat(sal_False), - bNew(sal_True), - bNoModifyHdl(sal_True), + bAtHorzPosModified( false ), + bAtVertPosModified( false ), + bFormat(false), + bNew(true), + bNoModifyHdl(true), // --> OD 2009-08-31 #mongolianlayout# - no used // bVerticalChanged(sal_False), bIsVerticalFrame(false), - bIsVerticalL2R(sal_False), - bIsInRightToLeft(sal_False), - bHtmlMode(sal_False), + bIsVerticalL2R(false), + bIsInRightToLeft(false), + bHtmlMode(false), nHtmlMode(0), nUpperBorder(0), nLowerBorder(0), @@ -883,7 +883,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) m_pAnchorAtFrameRB->Hide(); // --> OD 2009-08-31 #mongolianlayout# // if ( !bVerticalChanged && pSh->IsFrmVertical(sal_True, bIsInRightToLeft) ) - if ( pSh->IsFrmVertical( sal_True, bIsInRightToLeft, bIsVerticalL2R ) ) + if ( pSh->IsFrmVertical( true, bIsInRightToLeft, bIsVerticalL2R ) ) { OUString sHLabel = m_pHorizontalFT->GetText(); m_pHorizontalFT->SetText(m_pVerticalFT->GetText()); @@ -1001,12 +1001,12 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) m_pAnchorAtFrameRB->IsChecked() ); } - Init( rSet, sal_True ); + Init( rSet, true ); m_pAtVertPosED->SaveValue(); m_pAtHorzPosED->SaveValue(); m_pFollowTextFlowCB->SaveValue(); - bNoModifyHdl = sal_False; + bNoModifyHdl = false; //lock PercentFields m_aWidthED.LockAutoCalculation(true); m_aHeightED.LockAutoCalculation(true); @@ -1068,10 +1068,10 @@ bool SwFrmPage::FillItemSet(SfxItemSet &rSet) } pOldItem = GetOldItem(rSet, FN_HORI_ORIENT); - sal_Bool bSame = sal_False; + bool bSame = false; if ((bNew == bFormat) && pOldItem) { - bSame = static_cast< sal_Bool >(aHoriOrient == (SwFmtHoriOrient&)*pOldItem); + bSame = aHoriOrient == (SwFmtHoriOrient&)*pOldItem; } if ((bNew && !bFormat) || ((bAtHorzPosModified || bMod) && !bSame)) { @@ -1092,7 +1092,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet &rSet) aVertOrient.SetVertOrient ( eVOri); aVertOrient.SetRelationOrient( eRel ); - sal_Bool bMod = m_pAtVertPosED->GetText() != m_pAtVertPosED->GetSavedValue(); + bool bMod = m_pAtVertPosED->GetText() != m_pAtVertPosED->GetSavedValue(); if ( eVOri == text::VertOrientation::NONE && ( bNew || (bAtVertPosModified || bMod) || nOldV != eVOri) ) @@ -1107,15 +1107,14 @@ bool SwFrmPage::FillItemSet(SfxItemSet &rSet) aVertOrient.SetPos( nY ); } pOldItem = GetOldItem(rSet, FN_VERT_ORIENT); - sal_Bool bSame = sal_False; + bool bSame = false; if((bNew == bFormat) && pOldItem) { - bSame = static_cast< sal_Bool >( bFormat ? - aVertOrient.GetVertOrient() == ((SwFmtVertOrient*)pOldItem)->GetVertOrient() && - aVertOrient.GetRelationOrient() == ((SwFmtVertOrient*)pOldItem)->GetRelationOrient() && - aVertOrient.GetPos() == ((SwFmtVertOrient*)pOldItem)->GetPos() - - : aVertOrient == (SwFmtVertOrient&)*pOldItem ); + bSame = bFormat ? + aVertOrient.GetVertOrient() == ((SwFmtVertOrient*)pOldItem)->GetVertOrient() && + aVertOrient.GetRelationOrient() == ((SwFmtVertOrient*)pOldItem)->GetRelationOrient() && + aVertOrient.GetPos() == ((SwFmtVertOrient*)pOldItem)->GetPos() + : aVertOrient == (SwFmtVertOrient&)*pOldItem; } if( ( bNew && !bFormat ) || ((bAtVertPosModified || bMod) && !bSame )) { @@ -1248,7 +1247,7 @@ void SwFrmPage::InitPos(RndStdIds eId, nOldHRel = ((RelationMap *)m_pHoriRelationLB->GetEntryData(nPos))->nRelation; } - sal_Bool bEnable = sal_True; + bool bEnable = true; if ( eId == FLY_AT_PAGE ) { pVMap = bHtmlMode ? aVPageHtmlMap : aVPageMap; @@ -1291,7 +1290,7 @@ void SwFrmPage::InitPos(RndStdIds eId, { pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap; pHMap = 0; - bEnable = sal_False; + bEnable = false; } m_pHorizontalDLB->Enable( bEnable ); m_pHorizontalFT->Enable( bEnable ); @@ -1694,9 +1693,9 @@ RndStdIds SwFrmPage::GetAnchor() // Bsp - Update void SwFrmPage::ActivatePage(const SfxItemSet& rSet) { - bNoModifyHdl = sal_True; + bNoModifyHdl = true; Init(rSet); - bNoModifyHdl = sal_False; + bNoModifyHdl = false; //lock PercentFields m_aWidthED.LockAutoCalculation(true); m_aHeightED.LockAutoCalculation(true); @@ -1923,13 +1922,13 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) if (bHori) { - sal_Bool bEnable = text::HoriOrientation::NONE == nAlign; + bool bEnable = text::HoriOrientation::NONE == nAlign; m_pAtHorzPosED->Enable( bEnable ); m_pAtHorzPosFT->Enable( bEnable ); } else { - sal_Bool bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning; + bool bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning; m_pAtVertPosED->Enable( bEnable ); m_pAtVertPosFT->Enable( bEnable ); } @@ -1951,9 +1950,9 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) UpdateExample(); if (bHori) - bAtHorzPosModified = sal_True; + bAtHorzPosModified = true; else - bAtVertPosModified = sal_True; + bAtVertPosModified = true; // special treatment for HTML-Mode with horizonal-vertical-dependencies if(bHtmlMode && (FLY_AT_CHAR == GetAnchor())) @@ -2021,9 +2020,9 @@ IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB ) UpdateExample(); if (bHori) - bAtHorzPosModified = sal_True; + bAtHorzPosModified = true; else - bAtVertPosModified = sal_True; + bAtVertPosModified = true; if (bHtmlMode && (FLY_AT_CHAR == GetAnchor())) { @@ -2119,14 +2118,14 @@ void SwFrmPage::UpdateExample() m_pExampleWN->Invalidate(); } -void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset) +void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) { if(!bFormat) { SwWrtShell* pSh = getFrmDlgParentShell(); // size - const sal_Bool bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED ); + const bool bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED ); m_aWidthED .Enable( !bSizeFixed ); m_aHeightED.Enable( !bSizeFixed ); @@ -2203,7 +2202,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset) if (!IsInGraficMode()) { SwFrmSize eSize = rSize.GetHeightSizeType(); - sal_Bool bCheck = eSize != ATT_FIX_SIZE; + bool bCheck = eSize != ATT_FIX_SIZE; m_pAutoHeightCB->Check( bCheck ); HandleAutoCB( bCheck, *m_pHeightFT, *m_pHeightAutoFT, *m_aWidthED.get() ); if( eSize == ATT_VAR_SIZE ) @@ -2328,7 +2327,7 @@ const sal_uInt16* SwFrmPage::GetRanges() return aPageRg; } -void SwFrmPage::SetFormatUsed(sal_Bool bFmt) +void SwFrmPage::SetFormatUsed(bool bFmt) { bFormat = bFmt; if(bFormat) @@ -2399,11 +2398,11 @@ void SwGrfExtPage::Reset(const SfxItemSet &rSet) void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) { const SvxProtectItem& rProt = (const SvxProtectItem& )rSet.Get(RES_PROTECT); - sal_Bool bProtCntnt = rProt.IsCntntProtected(); + bool bProtCntnt = rProt.IsCntntProtected(); const SfxPoolItem* pItem = 0; - sal_Bool bEnable = sal_False; - sal_Bool bEnableMirrorRB = sal_False; + bool bEnable = false; + bool bEnableMirrorRB = false; SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, true, &pItem); if( SFX_ITEM_UNKNOWN != eState && !bProtCntnt && !bHtmlMode ) @@ -2411,7 +2410,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) if( SFX_ITEM_SET != eState ) pItem = &rSet.Get( RES_GRFATR_MIRRORGRF ); - bEnable = sal_True; + bEnable = true; MirrorGraph eMirror = static_cast< MirrorGraph >(((const SwMirrorGrf* )pItem)->GetValue()); switch( eMirror ) @@ -2486,14 +2485,14 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet ) { - sal_Bool bModified = sal_False; + bool bModified = false; if ( m_pMirrorHorzBox->GetSavedValue() != TriState(m_pMirrorHorzBox->IsChecked()) || m_pMirrorVertBox->GetSavedValue() != TriState(m_pMirrorVertBox->IsChecked()) || m_pAllPagesRB->GetSavedValue() != m_pAllPagesRB->IsChecked() || m_pLeftPagesRB->GetSavedValue() != m_pLeftPagesRB->IsChecked() || m_pRightPagesRB->GetSavedValue() != m_pRightPagesRB->IsChecked()) { - bModified = sal_True; + bModified = true; bool bHori = false; @@ -2507,7 +2506,7 @@ bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet ) RES_MIRROR_GRAPH_VERT : m_pMirrorVertBox->IsChecked() ? RES_MIRROR_GRAPH_HOR : RES_MIRROR_GRAPH_DONT; - sal_Bool bMirror = !m_pAllPagesRB->IsChecked(); + bool bMirror = !m_pAllPagesRB->IsChecked(); SwMirrorGrf aMirror( eMirror ); aMirror.SetGrfToggle(bMirror ); rSet.Put( aMirror ); @@ -2515,7 +2514,7 @@ bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet ) if( aGrfName != aNewGrfName || m_pConnectED->IsModified() ) { - bModified = sal_True; + bModified = true; aGrfName = m_pConnectED->GetText(); rSet.Put( SvxBrushItem( aGrfName, aFilterName, GPOS_LT, SID_ATTR_GRAF_GRAPHIC )); @@ -2562,14 +2561,14 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl) m_pAllPagesRB->Enable(false); m_pLeftPagesRB->Enable(false); m_pRightPagesRB->Enable(false); - m_pBmpWin->MirrorHorz(sal_False); - m_pBmpWin->MirrorVert(sal_False); + m_pBmpWin->MirrorHorz(false); + m_pBmpWin->MirrorVert(false); Graphic aGraphic; GraphicFilter::LoadGraphic( pGrfDlg->GetPath(), aEmptyOUStr, aGraphic ); m_pBmpWin->SetGraphic(aGraphic); - sal_Bool bEnable = GRAPHIC_BITMAP == aGraphic.GetType() || + bool bEnable = GRAPHIC_BITMAP == aGraphic.GetType() || GRAPHIC_GDIMETAFILE == aGraphic.GetType(); m_pMirrorVertBox->Enable(bEnable); m_pMirrorHorzBox->Enable(bEnable); @@ -2582,7 +2581,7 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl) IMPL_LINK_NOARG(SwGrfExtPage, MirrorHdl) { - sal_Bool bEnable = m_pMirrorHorzBox->IsChecked(); + bool bEnable = m_pMirrorHorzBox->IsChecked(); m_pBmpWin->MirrorHorz( m_pMirrorVertBox->IsChecked() ); m_pBmpWin->MirrorVert( bEnable ); @@ -2754,7 +2753,7 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet ) bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet) { - sal_Bool bModified = sal_False; + bool bModified = false; const SwFmtURL* pOldURL = (SwFmtURL*)GetOldItem(rSet, RES_URL); SwFmtURL* pFmtURL; if(pOldURL) @@ -2771,20 +2770,20 @@ bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet) { pFmtURL->SetURL( sText, pServerCB->IsChecked() ); pFmtURL->SetName( pNameED->GetText() ); - bModified = sal_True; + bModified = true; } } if(!pClientCB->IsChecked() && pFmtURL->GetMap() != 0) { pFmtURL->SetMap(0); - bModified = sal_True; + bModified = true; } if(pFmtURL->GetTargetFrameName() != pFrameCB->GetText()) { pFmtURL->SetTargetFrameName(pFrameCB->GetText()); - bModified = sal_True; + bModified = true; } rSet.Put(*pFmtURL); delete pFmtURL; @@ -2822,9 +2821,9 @@ IMPL_LINK_NOARG(SwFrmURLPage, InsertFileHdl) SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage(pParent, "FrmAddPage" , "modules/swriter/ui/frmaddpage.ui", rSet) , pWrtSh(0) - , bHtmlMode(sal_False) - , bFormat(sal_False) - , bNew(sal_False) + , bHtmlMode(false) + , bFormat(false) + , bNew(false) { get(pNameFrame, "nameframe"); get(pNameFT,"name_label"); @@ -2952,7 +2951,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) ::std::vector< OUString > aThisPageFrames; ::std::vector< OUString > aNextPageFrames; ::std::vector< OUString > aRemainFrames; - pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, sal_False, + pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, false, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(*pPrevLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); if(!sPrevChain.isEmpty()) @@ -2968,7 +2967,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) aThisPageFrames.erase(aThisPageFrames.begin(), aThisPageFrames.end()); aRemainFrames.erase(aRemainFrames.begin(), aRemainFrames.end()); - pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, sal_True, + pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, true, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(*pNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); if(!sNextChain.isEmpty()) @@ -3061,11 +3060,11 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet) aProt != *pOldItem ) bRet |= 0 != rSet.Put( aProt); - sal_Bool bChecked; - if ( (bChecked = pEditInReadonlyCB->IsChecked()) != pEditInReadonlyCB->GetSavedValue() ) + bool bChecked; + if ( (bChecked = pEditInReadonlyCB->IsChecked()) != (pEditInReadonlyCB->GetSavedValue() == 1) ) bRet |= 0 != rSet.Put( SwFmtEditInReadonly( RES_EDIT_IN_READONLY, bChecked)); - if ( (bChecked = pPrintFrameCB->IsChecked()) != pPrintFrameCB->GetSavedValue() ) + if ( (bChecked = pPrintFrameCB->IsChecked()) != (pPrintFrameCB->GetSavedValue() == 1) ) bRet |= 0 != rSet.Put( SvxPrintItem( RES_PRINT, bChecked)); // textflow @@ -3127,14 +3126,14 @@ const sal_uInt16* SwFrmAddPage::GetRanges() IMPL_LINK_NOARG(SwFrmAddPage, EditModifyHdl) { - sal_Bool bEnable = !pNameED->GetText().isEmpty(); + bool bEnable = !pNameED->GetText().isEmpty(); pAltNameED->Enable(bEnable); pAltNameFT->Enable(bEnable); return 0; } -void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt) +void SwFrmAddPage::SetFormatUsed(bool bFmt) { bFormat = bFmt; if (bFormat) diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index f5079d749eaf..03d6384c063d 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -57,7 +57,7 @@ SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bD { // create TabPage SwWrapTabPage* pNewPage = (SwWrapTabPage*) SwWrapTabPage::Create(get_content_area(), rSet); - pNewPage->SetFormatUsed(sal_False, bDrawMode); + pNewPage->SetFormatUsed(false, bDrawMode); pNewPage->SetShell(pWrtShell); SetTabPage(pNewPage); } @@ -149,14 +149,14 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet) } else { - sal_Bool bShowCB = bFormat; + bool bShowCB = bFormat; if( !bFormat ) { int nSelType = pWrtSh->GetSelectionType(); if( ( nSelType & nsSelectionType::SEL_GRF ) || ( nSelType & nsSelectionType::SEL_OLE && GRAPHIC_NONE != pWrtSh->GetIMapGraphic().GetType() )) - bShowCB = sal_True; + bShowCB = true; } if( bShowCB ) { @@ -190,7 +190,7 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet) m_pWrapAnchorOnlyCB->Enable( false ); } - sal_Bool bContour = rSurround.IsContour(); + bool bContour = rSurround.IsContour(); m_pWrapOutlineCB->Check( bContour ); m_pWrapOutsideCB->Check( rSurround.IsOutside() ); m_pWrapThroughRB->Enable(!m_pWrapOutlineCB->IsChecked()); @@ -302,7 +302,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet) aSur.SetSurround(SURROUND_IDEAL); aSur.SetAnchorOnly( m_pWrapAnchorOnlyCB->IsChecked() ); - sal_Bool bContour = m_pWrapOutlineCB->IsChecked() && m_pWrapOutlineCB->IsEnabled(); + bool bContour = m_pWrapOutlineCB->IsChecked() && m_pWrapOutlineCB->IsEnabled(); aSur.SetContour( bContour ); if ( bContour ) @@ -325,8 +325,8 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet) } } - sal_Bool bTopMod = m_pTopMarginED->IsValueModified(); - sal_Bool bBottomMod = m_pBottomMarginED->IsValueModified(); + bool bTopMod = m_pTopMarginED->IsValueModified(); + bool bBottomMod = m_pBottomMarginED->IsValueModified(); SvxULSpaceItem aUL( RES_UL_SPACE ); aUL.SetUpper((sal_uInt16)m_pTopMarginED->Denormalize(m_pTopMarginED->GetValue(FUNIT_TWIP))); @@ -342,8 +342,8 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet) } } - sal_Bool bLeftMod = m_pLeftMarginED->IsValueModified(); - sal_Bool bRightMod = m_pRightMarginED->IsValueModified(); + bool bLeftMod = m_pLeftMarginED->IsValueModified(); + bool bRightMod = m_pRightMarginED->IsValueModified(); SvxLRSpaceItem aLR( RES_LR_SPACE ); aLR.SetLeft((sal_uInt16)m_pLeftMarginED->Denormalize(m_pLeftMarginED->GetValue(FUNIT_TWIP))); @@ -361,8 +361,8 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet) if ( bDrawMode ) { - sal_Bool bChecked = m_pWrapTransparentCB->IsChecked() && m_pWrapTransparentCB->IsEnabled(); - if (m_pWrapTransparentCB->GetSavedValue() != bChecked) + bool bChecked = m_pWrapTransparentCB->IsChecked() && m_pWrapTransparentCB->IsEnabled(); + if ((m_pWrapTransparentCB->GetSavedValue() == 1) != bChecked) bModified |= 0 != rSet.Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1)); } @@ -377,7 +377,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) // anchor const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); nAnchorId = rAnch.GetAnchorId(); - sal_Bool bEnable = (nAnchorId != FLY_AS_CHAR); + bool bEnable = (nAnchorId != FLY_AS_CHAR); if (!bDrawMode) { @@ -612,7 +612,7 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, RadioButton *, pBtn ) IMPL_LINK_NOARG(SwWrapTabPage, ContourHdl) { - sal_Bool bEnable = !(m_pWrapOutlineCB->IsChecked() && m_pWrapOutlineCB->IsEnabled()); + bool bEnable = !(m_pWrapOutlineCB->IsChecked() && m_pWrapOutlineCB->IsEnabled()); m_pWrapOutsideCB->Enable(!bEnable); @@ -643,7 +643,7 @@ void SwWrapTabPage::DataChanged( const DataChangedEvent& rDCEvt ) void SwWrapTabPage::ApplyImageList() { m_pWrapThroughRB->SetModeRadioImage(get<FixedImage>("imgthrough")->GetImage()); - sal_Bool bWrapOutline = !m_pWrapOutlineCB->IsChecked(); + bool bWrapOutline = !m_pWrapOutlineCB->IsChecked(); if(bWrapOutline) { m_pNoWrapRB->SetModeRadioImage(get<FixedImage>("imgnone")->GetImage()); diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 094ea5f793eb..adb42c3853a7 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -88,7 +88,7 @@ static void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, static void lcl_SetBOOLProp( uno::Reference< beans::XPropertySetInfo > & xInfo, uno::Reference< beans::XPropertySet > & xProps, - OUString const & aPropName, sal_Bool bValue ) + OUString const & aPropName, bool bValue ) { if(xInfo->hasPropertyByName(aPropName)) { @@ -107,7 +107,7 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl) SwXTextDocument* pDoc = reinterpret_cast<SwXTextDocument*>(xDocTunnel->getSomething(SwXTextDocument::getUnoTunnelId())); if( pDoc ) - pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), sal_True ); + pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), true ); uno::Reference< lang::XMultiServiceFactory > xFact( xModel, uno::UNO_QUERY); @@ -167,10 +167,10 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( pxIndexSectionsArr[nTOXIndex]->xContainerSection.is(), "Section not created"); uno::Reference< frame::XModel > & xModel = pExampleFrame->GetModel(); - sal_Bool bInitialCreate = sal_True; + bool bInitialCreate = true; if(!pxIndexSectionsArr[nTOXIndex]->xDocumentIndex.is()) { - bInitialCreate = sal_True; + bInitialCreate = true; if(!pxIndexSectionsArr[nTOXIndex]->xContainerSection.is()) throw uno::RuntimeException(); uno::Reference< text::XTextRange > xAnchor = pxIndexSectionsArr[nTOXIndex]->xContainerSection->getAnchor(); @@ -214,7 +214,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( sal_uInt16 nContentOptions = rDesc.GetContentOptions(); if(xInfo->hasPropertyByName(UNO_NAME_LEVEL_PARAGRAPH_STYLES)) { - sal_Bool bOn = 0!=(nContentOptions&nsSwTOXElement::TOX_TEMPLATE ); + bool bOn = 0!=(nContentOptions&nsSwTOXElement::TOX_TEMPLATE ); uno::Any aStyleNames(xIdxProps->getPropertyValue(UNO_NAME_LEVEL_PARAGRAPH_STYLES)); uno::Reference< container::XIndexReplace > xAcc; aStyleNames >>= xAcc; diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 31bcf3707c0e..9934fb5f01c5 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -126,12 +126,12 @@ struct AutoMarkEntry OUString sPrimKey; OUString sSecKey; OUString sComment; - sal_Bool bCase; - sal_Bool bWord; + bool bCase; + bool bWord; AutoMarkEntry() : - bCase(sal_False), - bWord(sal_False){} + bCase(false), + bWord(false){} }; typedef boost::ptr_vector<AutoMarkEntry> AutoMarkEntryArr; @@ -213,7 +213,7 @@ sal_uInt16 CurTOXType::GetFlatIndex() const SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, SwTOXBase* pCurTOX, - sal_uInt16 nToxType, sal_Bool bGlobal) + sal_uInt16 nToxType, bool bGlobal) : SfxTabDialog(pParent, "TocDialog", "modules/swriter/ui/tocdialog.ui", &rSet) , pMgr( new SwTOXMgr( &rShell ) ) @@ -245,7 +245,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet //all user user indexes follow after position TOX_AUTHORITIES if(pCurTOX) { - bEditTOX = sal_True; + bEditTOX = true; } for(int i = nTypeCount - 1; i > -1; i--) { @@ -468,7 +468,7 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl ) { if(!pExampleFrame && !bExampleCreated) { - bExampleCreated = sal_True; + bExampleCreated = true; OUString sTemplate("internal/idxexample.odt"); SvtPathOptions aOpt; @@ -496,7 +496,7 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl ) m_pShowExampleCB->Show(pExampleFrame && pExampleFrame->IsServiceAvailable()); } } - sal_Bool bSetViewWindow = m_pShowExampleCB->IsChecked() + bool bSetViewWindow = m_pShowExampleCB->IsChecked() && pExampleFrame && pExampleFrame->IsServiceAvailable(); m_pExampleContainerWIN->Show( bSetViewWindow ); @@ -507,19 +507,19 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl ) return 0; } -sal_Bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const OUString& rName) +bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const OUString& rName) { SwTxtFmtColl* pColl = rSh.GetParaStyle(rName); if(pColl && ! pColl->IsAssignedToListLevelOfOutlineStyle()) - return sal_True; + return true; const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if(nId != USHRT_MAX && ! rSh.GetTxtCollFromPool(nId)->IsAssignedToListLevelOfOutlineStyle()) - return sal_True; + return true; - return sal_False; + return false; } class SwIndexTreeLB : public SvSimpleTable @@ -559,7 +559,7 @@ void SwIndexTreeLB::KeyInput( const KeyEvent& rKEvt ) { SvTreeListEntry* pEntry = FirstSelected(); KeyCode aCode = rKEvt.GetKeyCode(); - sal_Bool bChanged = sal_False; + bool bChanged = false; if(pEntry) { sal_IntPtr nLevel = (sal_IntPtr)pEntry->GetUserData(); @@ -569,7 +569,7 @@ void SwIndexTreeLB::KeyInput( const KeyEvent& rKEvt ) nLevel++; else if(nLevel == USHRT_MAX) nLevel = 0; - bChanged = sal_True; + bChanged = true; } else if(aCode.GetCode() == KEY_SUBTRACT) { @@ -577,7 +577,7 @@ void SwIndexTreeLB::KeyInput( const KeyEvent& rKEvt ) nLevel = USHRT_MAX; else if(nLevel != USHRT_MAX) nLevel--; - bChanged = sal_True; + bChanged = true; } if(bChanged) { @@ -740,7 +740,7 @@ IMPL_LINK_NOARG(SwAddStylesDlg_Impl, HeaderDragHdl) IMPL_LINK(SwAddStylesDlg_Impl, LeftRightHdl, PushButton*, pBtn) { - sal_Bool bLeft = pBtn == m_pLeftPB; + bool bLeft = pBtn == m_pLeftPB; SvTreeListEntry* pEntry = m_pHeaderTree->FirstSelected(); if(pEntry) { @@ -987,12 +987,12 @@ void SwTOXSelectTabPage::ApplyTOXDescription() sal_uInt16 nCreateType = rDesc.GetContentOptions(); //user + content - sal_Bool bHasStyleNames = sal_False; + bool bHasStyleNames = false; for( sal_uInt16 i = 0; i < MAXLEVEL; i++) if(!rDesc.GetStyleNames(i).isEmpty()) { - bHasStyleNames = sal_True; + bHasStyleNames = true; break; } m_pAddStylesCB->Check(bHasStyleNames && (nCreateType & nsSwTOXElement::TOX_TEMPLATE)); @@ -1360,7 +1360,7 @@ IMPL_LINK(SwTOXSelectTabPage, CheckBoxHdl, CheckBox*, pBox ) IMPL_LINK_NOARG(SwTOXSelectTabPage, RadioButtonHdl) { - sal_Bool bEnable = m_pFromCaptionsRB->IsChecked(); + bool bEnable = m_pFromCaptionsRB->IsChecked(); m_pCaptionSequenceFT->Enable(bEnable); m_pCaptionSequenceLB->Enable(bEnable); m_pDisplayTypeFT->Enable(bEnable); @@ -1646,7 +1646,7 @@ void SwTOXButton::KeyInput( const KeyEvent& rKEvt ) } else if(aCode.GetCode() == KEY_DELETE) { - m_pParent->RemoveControl(this, sal_True); + m_pParent->RemoveControl(this, true); //this is invalid here return; } @@ -1832,7 +1832,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet m_pCommaSeparatedCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); m_pRelToStyleCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); - FieldUnit aMetric = ::GetDfltMetric(sal_False); + FieldUnit aMetric = ::GetDfltMetric(false); SetMetric(*m_pTabPosMF, aMetric); m_pSortDocPosRB->Check(); @@ -1933,10 +1933,10 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/) m_pCurrentForm = pTOXDlg->GetForm(aCurType); if( !( aLastTOXType == aCurType )) { - sal_Bool bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType; - sal_Bool bToxIsIndex = TOX_INDEX == aCurType.eType; - sal_Bool bToxIsContent = TOX_CONTENT == aCurType.eType; - sal_Bool bToxIsSequence = TOX_ILLUSTRATIONS == aCurType.eType; + bool bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType; + bool bToxIsIndex = TOX_INDEX == aCurType.eType; + bool bToxIsContent = TOX_CONTENT == aCurType.eType; + bool bToxIsSequence = TOX_ILLUSTRATIONS == aCurType.eType; m_pLevelLB->Clear(); for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++) @@ -2336,7 +2336,7 @@ IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken) m_pNumberFormatLB->SelectEntryPos(nFormat); } - sal_Bool bTabStop = TOKEN_TAB_STOP == pToken->eTokenType; + bool bTabStop = TOKEN_TAB_STOP == pToken->eTokenType; m_pFillCharFT->Show(bTabStop); m_pFillCharCB->Show(bTabStop); m_pTabPosFT->Show(bTabStop); @@ -2356,8 +2356,8 @@ IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken) m_pTabPosMF->Enable(false); } - sal_Bool bIsChapterInfo = pToken->eTokenType == TOKEN_CHAPTER_INFO; - sal_Bool bIsEntryNumber = pToken->eTokenType == TOKEN_ENTRY_NO; + bool bIsChapterInfo = pToken->eTokenType == TOKEN_CHAPTER_INFO; + bool bIsEntryNumber = pToken->eTokenType == TOKEN_ENTRY_NO; m_pChapterEntryFT->Show( bIsChapterInfo ); m_pChapterEntryLB->Show( bIsChapterInfo ); m_pEntryOutlineLevelFT->Show( bIsChapterInfo || bIsEntryNumber ); @@ -2519,7 +2519,7 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox) "no style::TabStop selected!"); const SwFormToken& rToken = ((SwTOXButton*)pCurCtrl)->GetFormToken(); - sal_Bool bChecked = pBox->IsChecked(); + bool bChecked = pBox->IsChecked(); if(rToken.eTokenType == TOKEN_TAB_STOP) ((SwTOXButton*)pCurCtrl)->SetTabAlign( bChecked ? SVX_TAB_ADJUST_END : SVX_TAB_ADJUST_LEFT); @@ -3024,7 +3024,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken& AdjustPositions(); } -void SwTokenWindow::RemoveControl(SwTOXButton* pDel, sal_Bool bInternalCall ) +void SwTokenWindow::RemoveControl(SwTOXButton* pDel, bool bInternalCall ) { if(bInternalCall && TOX_AUTHORITIES == pForm->GetTOXType()) m_pParent->PreTokenButtonRemoved(pDel->GetFormToken()); @@ -3265,7 +3265,7 @@ OUString SwTokenWindow::GetPattern() const } // Check if a control of the specified TokenType is already contained in the list -sal_Bool SwTokenWindow::Contains(FormTokenType eSearchFor) const +bool SwTokenWindow::Contains(FormTokenType eSearchFor) const { bool bRet = false; @@ -3287,14 +3287,14 @@ sal_Bool SwTokenWindow::Contains(FormTokenType eSearchFor) const return bRet; } -sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl, +bool SwTokenWindow::CreateQuickHelp(Control* pCtrl, const SwFormToken& rToken, const HelpEvent& rHEvt) { - sal_Bool bRet = sal_False; + bool bRet = false; if( rHEvt.GetMode() & HELPMODE_QUICK ) { - sal_Bool bBalloon = Help::IsBalloonHelpEnabled(); + bool bBalloon = Help::IsBalloonHelpEnabled(); OUString sEntry; if(bBalloon || rToken.eTokenType != TOKEN_AUTHORITY) sEntry = (aButtonHelpTexts[rToken.eTokenType]); @@ -3321,7 +3321,7 @@ sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl, else Help::ShowQuickHelp( this, aItemRect, sEntry, QUICKHELP_LEFT|QUICKHELP_VCENTER ); - bRet = sal_True; + bRet = true; } return bRet; } @@ -3857,7 +3857,7 @@ bool SwEntryBrowseBox::SaveModified() const sal_uInt16 nCol = GetCurColumnId(); OUString sNew; - sal_Bool bVal = sal_False; + bool bVal = false; ::svt::CellController* pController = 0; if(nCol < ITEM_CASE) { diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 6cc70867a795..1a837d001822 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -79,17 +79,17 @@ using namespace ::com::sun::star; /*-------------------------------------------------------------------- Description: dialog to insert a directory selection --------------------------------------------------------------------*/ -SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, sal_Bool bNewDlg, +SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, bool bNewDlg, SwWrtShell& rWrtShell) : m_rDialog(rDialog) , bDel(false) , bNewMark(bNewDlg) - , bSelected(sal_False) - , bPhoneticED0_ChangedByUser(sal_False) - , bPhoneticED1_ChangedByUser(sal_False) - , bPhoneticED2_ChangedByUser(sal_False) + , bSelected(false) + , bPhoneticED0_ChangedByUser(false) + , bPhoneticED1_ChangedByUser(false) + , bPhoneticED2_ChangedByUser(false) , nLangForPhoneticReading(LANGUAGE_CHINESE_SIMPLIFIED) - , bIsPhoneticReadingEnabled(sal_False) + , bIsPhoneticReadingEnabled(false) , xExtendedIndexEntrySupplier(NULL) , pTOXMgr(0) , pSh(&rWrtShell) @@ -271,7 +271,7 @@ void SwIndexMarkPane::InitControls() //to include all equal entries may only be allowed in the body and even there //only when a simple selection exists - const sal_uInt16 nFrmType = pSh->GetFrmType(0,sal_True); + const sal_uInt16 nFrmType = pSh->GetFrmType(0,true); m_pApplyToAllCB->Show(); m_pSearchCaseSensitiveCB->Show(); m_pSearchCaseWordOnlyCB->Show(); @@ -295,10 +295,10 @@ void SwIndexMarkPane::UpdateLanguageDependenciesForPhoneticReading() //no phonetic reading if no global cjk support if( !xExtendedIndexEntrySupplier.is() ) { - bIsPhoneticReadingEnabled = sal_False; + bIsPhoneticReadingEnabled = false; return; } - bIsPhoneticReadingEnabled = sal_True; + bIsPhoneticReadingEnabled = true; //get the current language if(!bNewMark) //if dialog is opened to iterate existing marks @@ -361,7 +361,7 @@ void SwIndexMarkPane::Activate() //to include all equal entries may only be allowed in the body and even there //only when a simple selection exists - const sal_uInt16 nFrmType = pSh->GetFrmType(0,sal_True); + const sal_uInt16 nFrmType = pSh->GetFrmType(0,true); m_pApplyToAllCB->Show(); m_pSearchCaseSensitiveCB->Show(); m_pSearchCaseWordOnlyCB->Show(); @@ -380,7 +380,7 @@ void SwIndexMarkPane::Apply() { InsertUpdate(); if(bSelected) - pSh->ResetSelect(0, sal_False); + pSh->ResetSelect(0, false); } /*-------------------------------------------------------------------- @@ -425,7 +425,7 @@ void SwIndexMarkPane::InsertUpdate() /*-------------------------------------------------------------------- Description: insert mark --------------------------------------------------------------------*/ -static void lcl_SelectSameStrings(SwWrtShell& rSh, sal_Bool bWordOnly, sal_Bool bCaseSensitive) +static void lcl_SelectSameStrings(SwWrtShell& rSh, bool bWordOnly, bool bCaseSensitive) { rSh.Push(); @@ -440,12 +440,12 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, sal_Bool bWordOnly, sal_Bool : static_cast<int>(TransliterationModules_IGNORE_CASE)) ); rSh.ClearMark(); - sal_Bool bCancel; + bool bCancel; //todo/mba: assuming that notes should not be searched - sal_Bool bSearchInNotes = sal_False; + bool bSearchInNotes = false; rSh.Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel, - (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), sal_False ); + (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), false ); } void SwIndexMarkPane::InsertMark() @@ -478,9 +478,9 @@ void SwIndexMarkPane::InsertMark() } if (aOrgStr != m_pEntryED->GetText()) aDesc.SetAltStr(m_pEntryED->GetText()); - sal_Bool bApplyAll = m_pApplyToAllCB->IsChecked(); - sal_Bool bWordOnly = m_pSearchCaseWordOnlyCB->IsChecked(); - sal_Bool bCaseSensitive = m_pSearchCaseSensitiveCB->IsChecked(); + bool bApplyAll = m_pApplyToAllCB->IsChecked(); + bool bWordOnly = m_pSearchCaseWordOnlyCB->IsChecked(); + bool bCaseSensitive = m_pSearchCaseSensitiveCB->IsChecked(); pSh->StartAllAction(); // all equal strings have to be selected here so that the @@ -493,7 +493,7 @@ void SwIndexMarkPane::InsertMark() SwTOXMgr aMgr(pSh); aMgr.InsertTOXMark(aDesc); if(bApplyAll) - pSh->Pop(sal_False); + pSh->Pop(false); pSh->EndAllAction(); } @@ -612,7 +612,7 @@ IMPL_LINK_NOARG(SwIndexMarkPane, NewUserIdxHdl) IMPL_LINK( SwIndexMarkPane, SearchTypeHdl, CheckBox*, pBox) { - sal_Bool bEnable = pBox->IsChecked() && pBox->IsEnabled(); + bool bEnable = pBox->IsChecked() && pBox->IsEnabled(); m_pSearchCaseWordOnlyCB->Enable(bEnable); m_pSearchCaseSensitiveCB->Enable(bEnable); return 0; @@ -651,37 +651,37 @@ IMPL_LINK( SwIndexMarkPane, ModifyHdl, ListBox *, pBox ) { // set index type sal_Int32 nPos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry()); - sal_Bool bLevelEnable = sal_False, - bKeyEnable = sal_False, - bSetKey2 = sal_False, - bKey2Enable = sal_False, - bEntryHasText = sal_False, - bKey1HasText = sal_False, - bKey2HasText = sal_False; + bool bLevelEnable = false, + bKeyEnable = false, + bSetKey2 = false, + bKey2Enable = false, + bEntryHasText = false, + bKey1HasText = false, + bKey2HasText = false; if(nPos == POS_INDEX) { if(!m_pEntryED->GetText().isEmpty()) - bEntryHasText = sal_True; + bEntryHasText = true; m_pPhoneticED0->SetText(GetDefaultPhoneticReading(m_pEntryED->GetText())); - bKeyEnable = sal_True; + bKeyEnable = true; m_pKey1DCB->SetText(m_pKey1DCB->GetEntry(nKey1Pos)); m_pPhoneticED1->SetText(GetDefaultPhoneticReading(m_pKey1DCB->GetText())); if(!m_pKey1DCB->GetText().isEmpty()) { - bKey1HasText = bSetKey2 = bKey2Enable = sal_True; + bKey1HasText = bSetKey2 = bKey2Enable = true; m_pKey2DCB->SetText(m_pKey2DCB->GetEntry(nKey2Pos)); m_pPhoneticED2->SetText(GetDefaultPhoneticReading(m_pKey2DCB->GetText())); if(!m_pKey2DCB->GetText().isEmpty()) - bKey2HasText = sal_True; + bKey2HasText = true; } } else { - bLevelEnable = sal_True; + bLevelEnable = true; m_pLevelNF->SetMax(MAXLEVEL); m_pLevelNF->SetValue(m_pLevelNF->Normalize(0)); - bSetKey2 = sal_True; + bSetKey2 = true; } m_pLevelFT->Show(bLevelEnable); m_pLevelNF->Show(bLevelEnable); @@ -707,7 +707,7 @@ IMPL_LINK( SwIndexMarkPane, ModifyHdl, ListBox *, pBox ) if(!bHasText) { m_pPhoneticED0->SetText(OUString()); - bPhoneticED0_ChangedByUser = sal_False; + bPhoneticED0_ChangedByUser = false; } else if(!bPhoneticED0_ChangedByUser) m_pPhoneticED0->SetText(GetDefaultPhoneticReading(m_pEntryED->GetText())); @@ -716,7 +716,7 @@ IMPL_LINK( SwIndexMarkPane, ModifyHdl, ListBox *, pBox ) m_pPhoneticED0->Enable(bHasText&&bIsPhoneticReadingEnabled); } m_pOKBT->Enable(!pSh->HasReadonlySel() && - (!m_pEntryED->GetText().isEmpty() || pSh->GetCrsrCnt(sal_False))); + (!m_pEntryED->GetText().isEmpty() || pSh->GetCrsrCnt(false))); return 0; } @@ -732,7 +732,7 @@ IMPL_LINK_NOARG_INLINE_END(SwIndexMarkPane, NextHdl) IMPL_LINK_NOARG_INLINE_START(SwIndexMarkPane, NextSameHdl) { InsertUpdate(); - pTOXMgr->NextTOXMark(sal_True); + pTOXMgr->NextTOXMark(true); UpdateDialog(); return 0; } @@ -750,7 +750,7 @@ IMPL_LINK_NOARG_INLINE_END(SwIndexMarkPane, PrevHdl) IMPL_LINK_NOARG_INLINE_START(SwIndexMarkPane, PrevSameHdl) { InsertUpdate(); - pTOXMgr->PrevTOXMark(sal_True); + pTOXMgr->PrevTOXMark(true); UpdateDialog(); return 0; @@ -759,9 +759,9 @@ IMPL_LINK_NOARG_INLINE_END(SwIndexMarkPane, PrevSameHdl) IMPL_LINK_NOARG(SwIndexMarkPane, DelHdl) { - bDel = sal_True; + bDel = true; InsertUpdate(); - bDel = sal_False; + bDel = false; if(pTOXMgr->GetCurTOXMark()) UpdateDialog(); @@ -790,18 +790,18 @@ void SwIndexMarkPane::UpdateDialog() m_pEntryED->SetText(aOrgStr); // set index type - sal_Bool bLevelEnable = sal_True, - bKeyEnable = sal_False, - bKey2Enable = sal_False, - bEntryHasText = sal_False, - bKey1HasText = sal_False, - bKey2HasText = sal_False; + bool bLevelEnable = true, + bKeyEnable = false, + bKey2Enable = false, + bEntryHasText = false, + bKey1HasText = false, + bKey2HasText = false; TOXTypes eCurType = pMark->GetTOXType()->GetType(); if(TOX_INDEX == eCurType) { - bLevelEnable = sal_False; - bKeyEnable = sal_True; + bLevelEnable = false; + bKeyEnable = true; bKey1HasText = bKey2Enable = !pMark->GetPrimaryKey().isEmpty(); bKey2HasText = !pMark->GetSecondaryKey().isEmpty(); bEntryHasText = !pMark->GetText().isEmpty(); @@ -862,7 +862,7 @@ void SwIndexMarkPane::UpdateDialog() m_pNextSameBT->Enable( pMoveMark != pMark ); } - sal_Bool bEnable = !pSh->HasReadonlySel(); + bool bEnable = !pSh->HasReadonlySel(); m_pOKBT->Enable( bEnable ); m_pDelBT->Enable( bEnable ); m_pEntryED->SetReadOnly( !bEnable ); @@ -904,21 +904,21 @@ IMPL_LINK( SwIndexMarkPane, KeyDCBModifyHdl, ComboBox *, pBox ) { if (m_pKey1DCB == pBox) { - sal_Bool bEnable = !pBox->GetText().isEmpty(); + bool bEnable = !pBox->GetText().isEmpty(); if(!bEnable) { m_pKey2DCB->SetText(OUString()); m_pPhoneticED1->SetText(OUString()); m_pPhoneticED2->SetText(OUString()); - bPhoneticED1_ChangedByUser = sal_False; - bPhoneticED2_ChangedByUser = sal_False; + bPhoneticED1_ChangedByUser = false; + bPhoneticED2_ChangedByUser = false; } else { if(pBox->IsInDropDown()) { //reset bPhoneticED1_ChangedByUser if a completely new string is selected - bPhoneticED1_ChangedByUser = sal_False; + bPhoneticED1_ChangedByUser = false; } if(!bPhoneticED1_ChangedByUser) m_pPhoneticED1->SetText(GetDefaultPhoneticReading(pBox->GetText())); @@ -931,14 +931,14 @@ IMPL_LINK( SwIndexMarkPane, KeyDCBModifyHdl, ComboBox *, pBox ) if(pBox->GetText().isEmpty()) { m_pPhoneticED2->SetText(OUString()); - bPhoneticED2_ChangedByUser = sal_False; + bPhoneticED2_ChangedByUser = false; } else { if(pBox->IsInDropDown()) { //reset bPhoneticED1_ChangedByUser if a completely new string is selected - bPhoneticED2_ChangedByUser = sal_False; + bPhoneticED2_ChangedByUser = false; } if(!bPhoneticED2_ChangedByUser) m_pPhoneticED2->SetText(GetDefaultPhoneticReading(pBox->GetText())); @@ -983,7 +983,7 @@ void SwIndexMarkPane::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark SwIndexMarkFloatDlg::SwIndexMarkFloatDlg(SfxBindings* _pBindings, SfxChildWindow* pChild, Window *pParent, - SfxChildWinInfo* pInfo, sal_Bool bNew) + SfxChildWinInfo* pInfo, bool bNew) : SfxModelessDialog(_pBindings, pChild, pParent, "IndexEntryDialog", "modules/swriter/ui/indexentry.ui") , m_aContent(*this, bNew, *::GetActiveWrtShell()) { @@ -1004,7 +1004,7 @@ void SwIndexMarkFloatDlg::ReInitDlg(SwWrtShell& rWrtShell) SwIndexMarkModalDlg::SwIndexMarkModalDlg(Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark) : SvxStandardDialog(pParent, "IndexEntryDialog", "modules/swriter/ui/indexentry.ui") - , m_aContent(*this, sal_False, rSh) + , m_aContent(*this, false, rSh) { m_aContent.ReInitDlg(rSh, pCurTOXMark); } @@ -1027,8 +1027,8 @@ class SwCreateAuthEntryDlg_Impl : public ModalDialog SwWrtShell& rWrtSh; - sal_Bool m_bNewEntryMode; - sal_Bool m_bNameAllowed; + bool m_bNewEntryMode; + bool m_bNameAllowed; DECL_LINK(IdentifierHdl, ComboBox*); DECL_LINK(ShortNameHdl, Edit*); @@ -1038,7 +1038,7 @@ public: SwCreateAuthEntryDlg_Impl(Window* pParent, const OUString pFields[], SwWrtShell& rSh, - sal_Bool bNewEntry, + bool bNewEntry, bool bCreate); virtual ~SwCreateAuthEntryDlg_Impl(); @@ -1089,12 +1089,12 @@ static const TextInfo aTextInfoArr[] = {AUTH_FIELD_CUSTOM5, HID_AUTH_FIELD_CUSTOM5 } }; -sal_Bool SwAuthorMarkPane::bIsFromComponent = sal_True; +bool SwAuthorMarkPane::bIsFromComponent = true; -SwAuthorMarkPane::SwAuthorMarkPane(Dialog &rDialog, sal_Bool bNewDlg) +SwAuthorMarkPane::SwAuthorMarkPane(Dialog &rDialog, bool bNewDlg) : m_rDialog(rDialog) , bNewEntry(bNewDlg) - , bBibAccessInitialized(sal_False) + , bBibAccessInitialized(false) , pSh(0) { m_rDialog.get(m_pFromComponentRB, "frombibliography"); @@ -1315,7 +1315,7 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton) IMPL_LINK(SwAuthorMarkPane, ChangeSourceHdl, RadioButton*, pButton) { - sal_Bool bFromComp = (pButton == m_pFromComponentRB); + bool bFromComp = (pButton == m_pFromComponentRB); bIsFromComponent = bFromComp; m_pCreateEntryPB->Enable(!bIsFromComponent); m_pEntryLB->Clear(); @@ -1344,7 +1344,7 @@ IMPL_LINK(SwAuthorMarkPane, ChangeSourceHdl, RadioButton*, pButton) } } } - bBibAccessInitialized = sal_True; + bBibAccessInitialized = true; } if(xBibAccess.is()) { @@ -1392,7 +1392,7 @@ IMPL_LINK(SwAuthorMarkPane, EditModifyHdl, Edit*, pEdit) IMPL_LINK(SwAuthorMarkPane, IsEntryAllowedHdl, Edit*, pEdit) { OUString sEntry = pEdit->GetText(); - sal_Bool bAllowed = sal_False; + bool bAllowed = false; if(!sEntry.isEmpty()) { if(m_pEntryLB->GetEntryPos(sEntry) != LISTBOX_ENTRY_NOTFOUND) @@ -1408,7 +1408,7 @@ IMPL_LINK(SwAuthorMarkPane, IsEntryAllowedHdl, Edit*, pEdit) bAllowed = !xBibAccess.is() || !xBibAccess->hasByName(sEntry); } } - return bAllowed; + return bAllowed ? 1 : 0; } void SwAuthorMarkPane::InitControls() @@ -1449,7 +1449,7 @@ void SwAuthorMarkPane::Activate() SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, const OUString pFields[], SwWrtShell& rSh, - sal_Bool bNewEntry, + bool bNewEntry, bool bCreate) : ModalDialog(pParent, "CreateAuthorEntryDialog", "modules/swriter/ui/createauthorentry.ui") @@ -1459,7 +1459,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pIdentifierBox(0), rWrtSh(rSh), m_bNewEntryMode(bNewEntry), - m_bNameAllowed(sal_True) + m_bNameAllowed(true) { get(m_pOKBT, "ok"); @@ -1619,7 +1619,7 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, ShortNameHdl, Edit*, pEdit) { if(aShortNameCheckLink.IsSet()) { - sal_Bool bEnable = 0 != aShortNameCheckLink.Call(pEdit); + bool bEnable = 0 != aShortNameCheckLink.Call(pEdit); m_bNameAllowed |= bEnable; m_pOKBT->Enable(pTypeListBox->GetSelectEntryCount() && bEnable); } @@ -1635,8 +1635,8 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, EnableHdl, ListBox*, pBox) SwAuthMarkFloatDlg::SwAuthMarkFloatDlg(SfxBindings* _pBindings, SfxChildWindow* pChild, Window *pParent, - SfxChildWinInfo* pInfo, - sal_Bool bNew) + SfxChildWinInfo* pInfo, + bool bNew) : SfxModelessDialog(_pBindings, pChild, pParent, "BibliographyEntryDialog", "modules/swriter/ui/bibliographyentry.ui") , m_aContent(*this, bNew) @@ -1661,7 +1661,7 @@ void SwAuthMarkFloatDlg::ReInitDlg(SwWrtShell& rWrtShell) SwAuthMarkModalDlg::SwAuthMarkModalDlg(Window *pParent, SwWrtShell& rSh) : SvxStandardDialog(pParent, "BibliographyEntryDialog", "modules/swriter/ui/bibliographyentry.ui") - , m_aContent(*this, sal_False) + , m_aContent(*this, false) { m_aContent.ReInitDlg(rSh); } diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index e612bd2247e4..8405492215f5 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -34,7 +34,7 @@ const OUString BookmarkCombo::aForbiddenChars("/\\@:*?\";,.#"); IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox ) { - sal_Bool bSelEntries = pBox->GetSelectEntryCount() != 0; + bool bSelEntries = pBox->GetSelectEntryCount() != 0; // if a string has been pasted from the clipboard then // there may be illegal characters in the box if(!bSelEntries) diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 76ee933e26e2..04d223afa9c2 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -298,10 +298,10 @@ IMPL_LINK_NOARG(SwEndNoteOptionPage, PosPageHdl) IMPL_LINK_NOARG(SwEndNoteOptionPage, NumCountHdl) { - sal_Bool bEnable = sal_True; + bool bEnable = true; if( m_pNumCountBox->GetEntryCount() - 1 != m_pNumCountBox->GetSelectEntryPos() ) { - bEnable = sal_False; + bEnable = false; m_pOffsetFld->SetValue(1); } m_pOffsetLbl->Enable(bEnable); @@ -380,7 +380,7 @@ bool SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) // page template pInf->ChgPageDesc( pSh->FindPageDescByName( - m_pPageTemplBox->GetSelectEntry(), sal_True ) ); + m_pPageTemplBox->GetSelectEntry(), true ) ); if ( bEndNote ) { diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index c7e16f9cedcf..8a6762f8c675 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -315,14 +315,14 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl) IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl) { OUString sEntry(m_pNameED->GetText()); - sal_Bool bEnableNew = sal_True; - sal_Bool bEnableDel = sal_False; + bool bEnableNew = true; + bool bEnableDel = false; sal_uLong nCaseReadonly = (sal_uLong)m_pPathLB->GetEntryData(m_pPathLB->GetSelectEntryPos()); bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY); if(sEntry.isEmpty() || bDirReadonly) - bEnableNew = sal_False; + bEnableNew = false; else if(!sEntry.isEmpty()) { sal_uLong nPos = m_pGroupTLB->GetEntryPos(sEntry, 0); @@ -346,7 +346,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl) } if( 0xffffffff > nPos) { - bEnableNew = sal_False; + bEnableNew = false; m_pGroupTLB->Select(m_pGroupTLB->GetEntry( nPos )); m_pGroupTLB->MakeVisible(m_pGroupTLB->GetEntry( nPos )); } @@ -364,9 +364,9 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl) return 0; } -sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const OUString &rGroup) +bool SwGlossaryGroupDlg::IsDeleteAllowed(const OUString &rGroup) { - sal_Bool bDel = (!pGlosHdl->IsReadOnly(&rGroup)); + bool bDel = (!pGlosHdl->IsReadOnly(&rGroup)); // OM: if the name is among the new region name, it is deletable // as well! Because for non existing region names ReadOnly issues @@ -377,7 +377,7 @@ sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const OUString &rGroup) { if (*it == rGroup) { - bDel = sal_True; + bDel = true; break; } } diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index cec5ce2baea6..c45df95a09c4 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -301,7 +301,7 @@ void SwGlossaryDlg::Apply() } } -void SwGlossaryDlg::EnableShortName(sal_Bool bOn) +void SwGlossaryDlg::EnableShortName(bool bOn) { m_pShortNameLbl->Enable(bOn); m_pShortNameEdit->Enable(bOn); @@ -435,7 +435,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) m_pShortNameEdit->GrabFocus(); return 1; } - if(pGlossaryHdl->NewGlossary(aStr, aShortName, sal_False, bNoAttr )) + if(pGlossaryHdl->NewGlossary(aStr, aShortName, false, bNoAttr )) { SvTreeListEntry* pEntry = m_pCategoryBox->FirstSelected(); if(m_pCategoryBox->GetParent(pEntry)) @@ -698,7 +698,7 @@ void SwGlossaryDlg::Init() // fill entries for the groups { - pGlossaryHdl->SetCurGroup(sGroupName, sal_False, sal_True); + pGlossaryHdl->SetCurGroup(sGroupName, false, true); const sal_uInt16 nCount = pGlossaryHdl->GetGlossaryCnt(); for(sal_uInt16 i = 0; i < nCount; ++i) { @@ -761,7 +761,7 @@ IMPL_LINK_NOARG_INLINE_START(SwGlossaryDlg, EditHdl) if (m_pEditBtn->GetCurItemIdent() == "edit") { SwTextBlocks *pGroup = ::GetGlossaries()->GetGroupDoc ( GetCurrGrpName () ); - sal_Bool bRet = pGlossaryHdl->ConvertToNew ( *pGroup ); + bool bRet = pGlossaryHdl->ConvertToNew ( *pGroup ); delete pGroup; if ( bRet ) EndDialog(RET_EDIT); @@ -781,7 +781,7 @@ IMPL_LINK( SwNewGlosNameDlg, Modify, Edit *, pBox ) if (pBox == m_pNewName) m_pNewShort->SetText( lcl_GetValidShortCut( aName ) ); - sal_Bool bEnable = !aName.isEmpty() && !m_pNewShort->GetText().isEmpty() && + bool bEnable = !aName.isEmpty() && !m_pNewShort->GetText().isEmpty() && (!pDlg->DoesBlockExist(aName, m_pNewShort->GetText()) || aName == m_pOldName->GetText()); m_pOk->Enable(bEnable); @@ -969,7 +969,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving( SvTreeListEntry* pSrcParent = GetParent(pEntry); SvTreeListEntry* pDestParent = GetParent(pTarget) ? GetParent(pTarget) : pTarget; - sal_Bool bRet = sal_False; + bool bRet = false; if(pDestParent != pSrcParent) { SwGlossaryDlg* pDlg = (SwGlossaryDlg*)GetParentDialog(); @@ -1033,7 +1033,7 @@ IMPL_LINK( SwGlossaryDlg, PathHdl, Button *, pBtn ) if(sTmp != sGlosPath) { aPathOpt.SetAutoTextPath( sTmp ); - ::GetGlossaries()->UpdateGlosPath( sal_True ); + ::GetGlossaries()->UpdateGlosPath( true ); Init(); } } @@ -1072,7 +1072,7 @@ void SwGlossaryDlg::ShowAutoText(const OUString& rGroup, const OUString& rShortN { SetResumeData(rGroup, rShortName); //try to make an Undo() - pExampleFrame->ClearDocument( sal_True ); + pExampleFrame->ClearDocument( true ); } } diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index 308512077dab..de9b9bfc45fa 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -40,7 +40,7 @@ #include <boost/scoped_ptr.hpp> -static sal_Bool bFootnote = sal_True; +static bool bFootnote = true; /*------------------------------------------------------------------------ Description: inserting a footnote with OK @@ -56,14 +56,14 @@ void SwInsFootNoteDlg::Apply() if ( bEdit ) { rSh.StartAction(); - rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); + rSh.Left(CRSR_SKIP_CHARS, false, 1, false ); rSh.StartUndo( UNDO_START ); SwFmtFtn aNote( m_pEndNoteBtn->IsChecked() ); aNote.SetNumStr( aStr ); if( rSh.SetCurFtn( aNote ) && bExtCharAvailable ) { - rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); + rSh.Right(CRSR_SKIP_CHARS, true, 1, false ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); @@ -72,8 +72,8 @@ void SwInsFootNoteDlg::Apply() eCharSet, RES_CHRATR_FONT ); aSet.Put( aFont ); rSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND ); - rSh.ResetSelect(0, sal_False); - rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); + rSh.ResetSelect(0, false); + rSh.Left(CRSR_SKIP_CHARS, false, 1, false ); } rSh.EndUndo( UNDO_END ); rSh.EndAction(); @@ -143,7 +143,7 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl) m_pNumberCharEdit->SetFont( aFont ); } - bExtCharAvailable = sal_True; + bExtCharAvailable = true; m_pOkBtn->Enable(!m_pNumberCharEdit->GetText().isEmpty()); } } @@ -156,7 +156,7 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn ) Apply(); // go to the next foot/endnote here - rSh.ResetSelect(0, sal_False); + rSh.ResetSelect(0, false); if (pBtn == m_pNextBT) rSh.GotoNextFtnAnchor(); else @@ -167,10 +167,10 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn ) return 0; } -SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool bEd) : +SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, bool bEd) : SvxStandardDialog(pParent, "InsertFootnoteDialog", "modules/swriter/ui/insertfootnote.ui"), rSh(rShell), - bExtCharAvailable(sal_False), + bExtCharAvailable(false), bEdit(bEd) { get(m_pNumberFrame, "numberingframe"); @@ -210,7 +210,7 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg() rSh.SetCareWin(0); if (bEdit) - rSh.ResetSelect(0, sal_False); + rSh.ResetSelect(0, false); } void SwInsFootNoteDlg::Init() @@ -218,7 +218,7 @@ void SwInsFootNoteDlg::Init() SwFmtFtn aFtnNote; OUString sNumStr; Font aFont; - bExtCharAvailable = sal_False; + bExtCharAvailable = false; rSh.StartAction(); @@ -228,7 +228,7 @@ void SwInsFootNoteDlg::Init() { sNumStr = aFtnNote.GetNumStr(); - rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); + rSh.Right(CRSR_SKIP_CHARS, true, 1, false ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); @@ -238,8 +238,8 @@ void SwInsFootNoteDlg::Init() eCharSet = rFont.GetCharSet(); aFont.SetName(m_aFontName); aFont.SetCharSet(eCharSet); - bExtCharAvailable = sal_True; - rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False ); + bExtCharAvailable = true; + rSh.Left( CRSR_SKIP_CHARS, false, 1, false ); } bFootnote = !aFtnNote.IsEndNote(); } @@ -258,12 +258,12 @@ void SwInsFootNoteDlg::Init() else m_pEndNoteBtn->Check(); - sal_Bool bNext = rSh.GotoNextFtnAnchor(); + bool bNext = rSh.GotoNextFtnAnchor(); if (bNext) rSh.GotoPrevFtnAnchor(); - sal_Bool bPrev = rSh.GotoPrevFtnAnchor(); + bool bPrev = rSh.GotoPrevFtnAnchor(); if (bPrev) rSh.GotoNextFtnAnchor(); @@ -271,7 +271,7 @@ void SwInsFootNoteDlg::Init() m_pPrevBT->Enable(bPrev); m_pNextBT->Enable(bNext); - rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); + rSh.Right(CRSR_SKIP_CHARS, true, 1, false ); rSh.EndAction(); } diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 02cf75d6ee06..9890ee088ecb 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -54,7 +54,7 @@ #include <svl/aeitem.hxx> #include <svl/slstitm.hxx> -static sal_Bool bLastRelative = sal_False; +static bool bLastRelative = false; //See cui/uiconfig/ui/numberingpositionpage.ui for effectively a duplicate //dialog to this one, except with a different preview window impl. @@ -68,8 +68,8 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, , pSaveNum(0) , pWrtSh(0) , pOutlineDlg(0) - , bPreset( sal_False ) - , bInInintControl(sal_False) + , bPreset( false ) + , bInInintControl(false) , bLabelAlignmentPosAndSpaceModeActive( false ) { get(m_pLevelLB, "levellb"); @@ -166,7 +166,7 @@ SwNumPositionTabPage::~SwNumPositionTabPage() void SwNumPositionTabPage::InitControls() { - bInInintControl = sal_True; + bInInintControl = true; const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive && m_pRelativeCB->IsEnabled() && m_pRelativeCB->IsChecked(); const bool bSingleSelection = m_pLevelLB->GetSelectEntryCount() == 1 && @@ -355,7 +355,7 @@ void SwNumPositionTabPage::InitControls() if(bSetDistEmpty) m_pDistBorderMF->SetText(aEmptyOUStr); - bInInintControl = sal_False; + bInInintControl = false; } void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) @@ -454,7 +454,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet ) InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); InitControls(); - bModified = sal_False; + bModified = false; } void SwNumPositionTabPage::InitPosAndSpaceMode() @@ -690,7 +690,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox ) { - sal_Bool bOn = pBox->IsChecked(); + bool bOn = pBox->IsChecked(); bool bSingleSelection = m_pLevelLB->GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl; bool bSetValue = false; long nValue = 0; @@ -900,9 +900,9 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, StandardHdl) } #ifdef DBG_UTIL -void SwNumPositionTabPage::SetModified(sal_Bool bRepaint) +void SwNumPositionTabPage::SetModified(bool bRepaint) { - bModified = sal_True; + bModified = true; if(bRepaint) { m_pPreviewWIN->SetLevel(nActNumLvl); diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 6a19d904dfc8..6110b650cddd 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -336,7 +336,7 @@ short SwOutlineTabDialog::Ok() if( !rTxtColl.IsDefault() ) { const SfxPoolItem & rItem = - rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, sal_False); + rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, false); if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == MAXLEVEL) { diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index ec6a4f0275d3..60add9d67454 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -125,7 +125,7 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) get(m_pLineDistEdit, "spacingtocontents"); SetExchangeSupport(); - FieldUnit aMetric = ::GetDfltMetric(sal_False); + FieldUnit aMetric = ::GetDfltMetric(false); SetMetric(*m_pMaxHeightEdit, aMetric); SetMetric(*m_pDistEdit, aMetric); SetMetric(*m_pLineDistEdit, aMetric); diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 1060896e61b1..96c7669d5fc0 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -43,12 +43,12 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage(pParent, "TextGridPage", "modules/swriter/ui/textgridpage.ui", rSet), m_nRubyUserValue(0), - m_bRubyUserValue(sal_False), + m_bRubyUserValue(false), m_aPageSize(MM50, MM50), m_bVertical(false), - m_bSquaredMode(sal_False), - m_bHRulerChanged( sal_False ), - m_bVRulerChanged( sal_False ) + m_bSquaredMode(false), + m_bHRulerChanged( false ), + m_bVRulerChanged( false ) { get(m_pNoGridRB,"radioRB_NOGRID"); get(m_pLinesGridRB,"radioRB_LINESGRID"); @@ -160,7 +160,7 @@ SfxTabPage *SwTextGridPage::Create(Window *pParent, const SfxItemSet &rSet) bool SwTextGridPage::FillItemSet(SfxItemSet &rSet) { - sal_Bool bRet = sal_False; + bool bRet = false; if(m_pNoGridRB->GetSavedValue() != m_pNoGridRB->IsChecked()|| m_pLinesGridRB->GetSavedValue() != m_pLinesGridRB->IsChecked()|| m_pLinesPerPageNF->GetSavedValue().toInt32() @@ -177,7 +177,7 @@ bool SwTextGridPage::FillItemSet(SfxItemSet &rSet) m_pColorLB->GetSavedValue() != m_pColorLB->GetSelectEntryPos()) { PutGridItem(rSet); - bRet = sal_True; + bRet = true; } // draw ticks of ruler @@ -208,7 +208,7 @@ void SwTextGridPage::Reset(const SfxItemSet &rSet) m_pLinesPerPageNF->SetValue(rGridItem.GetLines()); SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() ); m_nRubyUserValue = rGridItem.GetBaseHeight(); - m_bRubyUserValue = sal_True; + m_bRubyUserValue = true; m_pTextSizeMF->SetValue(m_pTextSizeMF->Normalize(m_nRubyUserValue), FUNIT_TWIP); m_pRubySizeMF->SetValue(m_pRubySizeMF->Normalize(rGridItem.GetRubyHeight()), FUNIT_TWIP); m_pCharWidthMF->SetValue(m_pCharWidthMF->Normalize(rGridItem.GetBaseWidth()), FUNIT_TWIP); @@ -270,9 +270,9 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet) { if ( aGridItem.GetGridType() == GRID_LINES_CHARS ) { - m_bHRulerChanged = sal_True; + m_bHRulerChanged = true; } - m_bVRulerChanged = sal_True; + m_bVRulerChanged = true; pView->GetHRuler().SetCharWidth((long)(m_pCharWidthMF->GetValue(FUNIT_TWIP)/56.7)); pView->GetVRuler().SetLineHeight((long)(m_pTextSizeMF->GetValue(FUNIT_TWIP)/56.7)); } @@ -372,7 +372,7 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField) m_pTextSizeMF->SetValue(m_pTextSizeMF->Normalize(nWidth), FUNIT_TWIP); //prevent rounding errors in the MetricField by saving the used value m_nRubyUserValue = nWidth; - m_bRubyUserValue = sal_True; + m_bRubyUserValue = true; } //set maximum line per page @@ -395,7 +395,7 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField) SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() ); m_nRubyUserValue = nHeight; - m_bRubyUserValue = sal_True; + m_bRubyUserValue = true; } else if (m_pCharsPerLineNF == pField) { @@ -415,7 +415,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField) { if (m_pTextSizeMF == pField) { - m_bRubyUserValue = sal_False; + m_bRubyUserValue = false; // fdo#50941: set maximum characters per line sal_Int32 nTextSize = static_cast< sal_Int32 >(m_pTextSizeMF->Denormalize(m_pTextSizeMF->GetValue(FUNIT_TWIP))); @@ -442,7 +442,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField) { sal_Int32 nTextSize = static_cast< sal_Int32 >(m_pTextSizeMF->Denormalize(m_pTextSizeMF->GetValue(FUNIT_TWIP))); m_pLinesPerPageNF->SetValue(m_aPageSize.Height() / nTextSize); - m_bRubyUserValue = sal_False; + m_bRubyUserValue = false; SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() ); } else if (m_pCharWidthMF == pField) @@ -462,7 +462,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField) IMPL_LINK(SwTextGridPage, GridTypeHdl, RadioButton*, pButton) { - sal_Bool bEnable = m_pNoGridRB != pButton; + bool bEnable = m_pNoGridRB != pButton; m_pLayoutFL->Enable(bEnable); m_pDisplayFL->Enable(bEnable); @@ -489,7 +489,7 @@ IMPL_LINK(SwTextGridPage, GridTypeHdl, RadioButton*, pButton) IMPL_LINK_NOARG(SwTextGridPage, DisplayGridHdl) { - sal_Bool bChecked = m_pDisplayCB->IsChecked(); + bool bChecked = m_pDisplayCB->IsChecked(); m_pPrintCB->Enable(bChecked); m_pPrintCB->Check(bChecked); return 0; diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 6c6bf518df81..a4e78417e704 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -40,9 +40,9 @@ #include <tblsel.hxx> #include <sfx2/request.hxx> -static sal_Bool bCheck1 = sal_True; -static sal_Bool bCheck2 = sal_False; -static sal_Bool bCheck3 = sal_False; +static bool bCheck1 = true; +static bool bCheck2 = false; +static bool bCheck3 = false; static sal_uInt16 nCol1 = 1; static sal_uInt16 nCol2 = 1; @@ -54,11 +54,11 @@ static sal_uInt16 nType3 = 0; static sal_uInt16 nLang = LANGUAGE_NONE; -static sal_Bool bAsc1 = sal_True; -static sal_Bool bAsc2 = sal_True; -static sal_Bool bAsc3 = sal_True; -static sal_Bool bCol = sal_False; -static sal_Bool bCsSens= sal_False; +static bool bAsc1 = true; +static bool bAsc2 = true; +static bool bAsc3 = true; +static bool bCol = false; +static bool bCsSens= false; static sal_Unicode cDeli = '\t'; @@ -346,11 +346,11 @@ void SwSortDlg::Apply() aOptions.bTable = rSh.IsTableMode(); aOptions.bIgnoreCase = !bCsSens; - sal_Bool bRet; + bool bRet; { SwWait aWait( *rSh.GetView().GetDocShell(), true ); rSh.StartAllAction(); - if( 0 != (bRet = rSh.Sort( aOptions ))) + if( (bRet = rSh.Sort( aOptions ))) rSh.SetModified(); rSh.EndAllAction(); } @@ -361,7 +361,7 @@ void SwSortDlg::Apply() IMPL_LINK( SwSortDlg, DelimHdl, RadioButton*, pButton ) { - sal_Bool bEnable = pButton == m_pDelimFreeRB && m_pDelimFreeRB->IsEnabled(); + bool bEnable = pButton == m_pDelimFreeRB && m_pDelimFreeRB->IsEnabled(); m_pDelimEdt->Enable( bEnable ); m_pDelimPB->Enable( bEnable ); return 0; diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx index 81d3c18c6623..67d0f03d07fd 100644 --- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx +++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx @@ -46,7 +46,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) : SfxModalDialog(pParent, "AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui") { - pImplDlg = new SwRedlineAcceptDlg(this, sal_True); + pImplDlg = new SwRedlineAcceptDlg(this, true); pImplDlg->Initialize(GetExtraData()); pImplDlg->Activate(); // for data's initialisation @@ -54,7 +54,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg() { - AcceptAll(sal_False); // refuse everything remaining + AcceptAll(false); // refuse everything remaining pImplDlg->FillInfo(GetExtraData()); delete pImplDlg; @@ -64,7 +64,7 @@ void SwModalRedlineAcceptDlg::Activate() { } -void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept ) +void SwModalRedlineAcceptDlg::AcceptAll( bool bAccept ) { SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage(); @@ -78,7 +78,7 @@ void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept ) pImplDlg->FilterChangedHdl(); } - pImplDlg->CallAcceptReject( sal_False, bAccept ); + pImplDlg->CallAcceptReject( false, bAccept ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index 70ce11bf5c24..b31cba9504b5 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -104,16 +104,16 @@ namespace void lcl_PushCursor(SwWrtShell *pSh) { - pSh->LockView( sal_True ); + pSh->LockView( true ); pSh->StartAllAction(); pSh->SwCrsrShell::Push(); } void lcl_PopCursor(SwWrtShell *pSh) { - pSh->SwCrsrShell::Pop( sal_False ); + pSh->SwCrsrShell::Pop( false ); pSh->EndAllAction(); - pSh->LockView( sal_False ); + pSh->LockView( false ); } sal_uInt16 lcl_GetCurrentPage(SwWrtShell *pSh) diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx index 16207f89191e..434872fca3c0 100644 --- a/sw/source/ui/table/colwd.cxx +++ b/sw/source/ui/table/colwd.cxx @@ -48,10 +48,9 @@ SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) get(m_pColNF, "column"); get(m_pWidthMF, "width"); - sal_Bool bIsWeb = rTableFnc.GetShell() - ? static_cast< sal_Bool >(0 != PTR_CAST( SwWebDocShell, - rTableFnc.GetShell()->GetView().GetDocShell()) ) - : sal_False; + bool bIsWeb = rTableFnc.GetShell() + && (0 != PTR_CAST( SwWebDocShell, + rTableFnc.GetShell()->GetView().GetDocShell()) ); FieldUnit eFieldUnit = SW_MOD()->GetUsrPref( bIsWeb )->GetMetric(); ::SetFieldUnit(*m_pWidthMF, eFieldUnit); diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index fd2e827fbdb0..96d2ae1d6097 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -42,7 +42,7 @@ namespace swui //keep the state of the buttons on runtime static int nSaveButtonState = -1; // 0: tab, 1: semicolon, 2: paragraph, 3: other, -1: not yet used -static sal_Bool bIsKeepColumn = sal_True; +static bool bIsKeepColumn = true; static sal_Unicode uOther = ','; void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, @@ -159,7 +159,7 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); + bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; @@ -185,7 +185,7 @@ IMPL_LINK( SwConvertTableDlg, AutoFmtHdl, PushButton*, pButton ) SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, sal_False, pTAutoFmt); + AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, false, pTAutoFmt); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFmtOfIndex( pTAutoFmt ); diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 097ad74b0d56..fd4f34afb173 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -97,7 +97,7 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView ) m_pInsertBtn->SetClickHdl(LINK(this, SwInsTableDlg, OKHdl)); - sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); + bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); @@ -190,7 +190,7 @@ IMPL_LINK( SwInsTableDlg, AutoFmtHdl, PushButton*, pButton ) SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, sal_False, pTAutoFmt); + AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, false, pTAutoFmt); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFmtOfIndex( pTAutoFmt ); diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx index bafb3fc14134..851244f3e85e 100644 --- a/sw/source/ui/table/mergetbl.cxx +++ b/sw/source/ui/table/mergetbl.cxx @@ -20,7 +20,7 @@ #include <swtypes.hxx> #include <mergetbl.hxx> -SwMergeTblDlg::SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev ) +SwMergeTblDlg::SwMergeTblDlg( Window *pParent, bool& rWithPrev ) : SvxStandardDialog(pParent, "MergeTableDialog", "modules/swriter/ui/mergetabledialog.ui") , m_rMergePrev(rWithPrev) { diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index d5c6fa22f2e0..9c4dce4dcbb0 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -67,9 +67,9 @@ SwFormatTablePage::SwFormatTablePage(Window* pParent, const SfxItemSet& rSet) , nSaveWidth(0) , nMinTableWidth(MINLAY) , nOldAlign(0) - , bModified(sal_False) - , bFull(0) - , bHtmlMode(sal_False) + , bModified(false) + , bFull(false) + , bHtmlMode(false) { get(m_pNameED, "name"); get(m_pWidthFT, "widthft"); @@ -142,7 +142,7 @@ void SwFormatTablePage::Init() IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) { OSL_ENSURE(pTblData, "table data not available?"); - sal_Bool bIsChecked = pBtn->IsChecked(); + bool bIsChecked = pBtn->IsChecked(); sal_Int64 nLeft = m_aLeftMF.DenormalizePercent(m_aLeftMF.GetValue(FUNIT_TWIP )); sal_Int64 nRight = m_aRightMF.DenormalizePercent(m_aRightMF.GetValue(FUNIT_TWIP )); m_aWidthMF.ShowPercent(bIsChecked); @@ -166,56 +166,56 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) if(m_pFreeBtn->IsChecked()) { - sal_Bool bEnable = !pBtn->IsChecked(); + bool bEnable = !pBtn->IsChecked(); m_aRightMF.Enable(bEnable); m_pRightFT->Enable(bEnable); } - bModified = sal_True; + bModified = true; return 0; } IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox ) { - sal_Bool bRestore = sal_True, - bLeftEnable = sal_False, - bRightEnable= sal_False, - bWidthEnable= sal_False, - bOthers = sal_True; + bool bRestore = true, + bLeftEnable = false, + bRightEnable= false, + bWidthEnable= false, + bOthers = true; if ((RadioButton *)pBox == m_pFullBtn) { m_aLeftMF.SetPrcntValue(0); m_aRightMF.SetPrcntValue(0); nSaveWidth = static_cast< SwTwips >(m_aWidthMF.DenormalizePercent(m_aWidthMF.GetValue(FUNIT_TWIP ))); m_aWidthMF.SetPrcntValue(m_aWidthMF.NormalizePercent(pTblData->GetSpace() ), FUNIT_TWIP ); - bFull = sal_True; - bRestore = sal_False; + bFull = true; + bRestore = false; } else if ((RadioButton *)pBox == m_pLeftBtn) { - bRightEnable = bWidthEnable = sal_True; + bRightEnable = bWidthEnable = true; m_aLeftMF.SetPrcntValue(0); } else if ((RadioButton *) pBox == m_pFromLeftBtn) { - bLeftEnable = bWidthEnable = sal_True; + bLeftEnable = bWidthEnable = true; m_aRightMF.SetPrcntValue(0); } else if ((RadioButton *) pBox == m_pRightBtn) { - bLeftEnable = bWidthEnable = sal_True; + bLeftEnable = bWidthEnable = true; m_aRightMF.SetPrcntValue(0); } else if ((RadioButton *) pBox == m_pCenterBtn) { - bLeftEnable = bWidthEnable = sal_True; + bLeftEnable = bWidthEnable = true; } else if ((RadioButton *) pBox == m_pFreeBtn) { RightModify(); - bLeftEnable = sal_True; - bWidthEnable = sal_True; - bOthers = sal_False; + bLeftEnable = true; + bWidthEnable = true; + bOthers = false; } m_aLeftMF.Enable(bLeftEnable); m_pLeftFT->Enable(bLeftEnable); @@ -232,11 +232,11 @@ IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox ) { //After being switched on automatic, the width was pinned //in order to restore the width while switching back to. - bFull = sal_False; + bFull = false; m_aWidthMF.SetPrcntValue(m_aWidthMF.NormalizePercent(nSaveWidth ), FUNIT_TWIP ); } ModifyHdl(m_aWidthMF.get()); - bModified = sal_True; + bModified = true; return 0; } @@ -244,7 +244,7 @@ void SwFormatTablePage::RightModify() { if(m_pFreeBtn->IsChecked()) { - sal_Bool bEnable = m_aRightMF.GetValue() == 0; + bool bEnable = m_aRightMF.GetValue() == 0; m_pRelWidthCB->Enable(bEnable); if ( !bEnable ) { @@ -340,7 +340,7 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit) { if(!m_pFromLeftBtn->IsChecked()) { - sal_Bool bCenter = m_pCenterBtn->IsChecked(); + bool bCenter = m_pCenterBtn->IsChecked(); if( bCenter ) nRight = nLeft; if(nRight + nLeft > pTblData->GetSpace() - MINLAY ) @@ -365,7 +365,7 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit) m_aWidthMF.SetPrcntValue( m_aWidthMF.NormalizePercent( nCurWidth ), FUNIT_TWIP ); m_aRightMF.SetPrcntValue( m_aRightMF.NormalizePercent( nRight ), FUNIT_TWIP ); m_aLeftMF.SetPrcntValue( m_aLeftMF.NormalizePercent( nLeft ), FUNIT_TWIP ); - bModified = sal_True; + bModified = true; } SfxTabPage* SwFormatTablePage::Create( Window* pParent, @@ -403,7 +403,7 @@ bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) if(m_pNameED->GetText() != m_pNameED->GetSavedValue()) { rCoreSet.Put(SfxStringItem( FN_PARAM_TABLE_NAME, m_pNameED->GetText())); - bModified = sal_True; + bModified = true; } if( m_pTextDirectionLB->IsVisible() ) @@ -414,7 +414,7 @@ bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) const sal_uInt32 nDirection = (sal_uInt32)(sal_uIntPtr)m_pTextDirectionLB->GetEntryData( nPos ); rCoreSet.Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR)); - bModified = sal_True; + bModified = true; } } @@ -804,7 +804,7 @@ void SwTableColumnPage::Reset( const SfxItemSet& ) } -void SwTableColumnPage::Init(sal_Bool bWeb) +void SwTableColumnPage::Init(bool bWeb) { FieldUnit aMetric = ::GetDfltMetric(bWeb); Link aLkUp = LINK( this, SwTableColumnPage, UpHdl ); @@ -869,7 +869,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) IMPL_LINK_INLINE_START( SwTableColumnPage, UpHdl, MetricField*, pEdit ) { - bModified = sal_True; + bModified = true; ModifyHdl( pEdit ); return 0; } @@ -877,7 +877,7 @@ IMPL_LINK_INLINE_END( SwTableColumnPage, UpHdl, MetricField*, pEdit ) IMPL_LINK_INLINE_START( SwTableColumnPage, DownHdl, MetricField*, pEdit ) { - bModified = sal_True; + bModified = true; ModifyHdl( pEdit ); return 0; } @@ -887,7 +887,7 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, LoseFocusHdl, MetricField*, pEdit ) { if (pEdit->IsModified()) { - bModified = sal_True; + bModified = true; ModifyHdl( pEdit ); } return 0; @@ -896,7 +896,7 @@ IMPL_LINK_INLINE_END( SwTableColumnPage, LoseFocusHdl, MetricField*, pEdit ) IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox ) { - sal_Bool bCheck = pBox->IsChecked(); + bool bCheck = pBox->IsChecked(); if (pBox == m_pProportionalCB) { if(bCheck) @@ -959,8 +959,8 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) } SwTwips nDiff = nSum - nTableWidth; - sal_Bool bModifyTable = m_pModifyTableCB->IsChecked(); - sal_Bool bProp = m_pProportionalCB->IsChecked(); + bool bModifyTable = m_pModifyTableCB->IsChecked(); + bool bProp = m_pProportionalCB->IsChecked(); if(!bModifyTable && !bProp ) { @@ -1018,7 +1018,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) nTableWidth += nDiff; } } - else if(bModifyTable & bProp) + else if(bModifyTable && bProp) { //All columns will be changed proportionally with, //the table width is adjusted accordingly. @@ -1080,11 +1080,11 @@ void SwTableColumnPage::ActivatePage( const SfxItemSet& ) pTblData->GetWidth(); UpdateCols(0); } - bModifyTbl = sal_True; + bModifyTbl = true; if(pTblData->GetWidthPercent() || text::HoriOrientation::FULL == nTblAlign || pTblData->IsLineSelected() ) - bModifyTbl = sal_False; + bModifyTbl = false; if(bPercentMode) { m_pModifyTableCB->Check(false); @@ -1237,7 +1237,7 @@ void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) else if (nId == m_nTextFlowId) { ((SwTextFlowPage&)rPage).SetShell(pShell); - const sal_uInt16 eType = pShell->GetFrmType(0,sal_True); + const sal_uInt16 eType = pShell->GetFrmType(0,true); if( !(FRMTYPE_BODY & eType) ) ((SwTextFlowPage&)rPage).DisablePageBreak(); } @@ -1344,11 +1344,11 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) const SvxFmtBreakItem* pBreak = (const SvxFmtBreakItem*)GetOldItem( rSet, RES_BREAK ); const SwFmtPageDesc* pDesc = (const SwFmtPageDesc*) GetOldItem( rSet, RES_PAGEDESC ); - sal_Bool bState = m_pPageCollCB->IsChecked(); + bool bState = m_pPageCollCB->IsChecked(); //If we have a page style, then there's no break - sal_Bool bPageItemPut = sal_False; - if ( bState != m_pPageCollCB->GetSavedValue() || + bool bPageItemPut = false; + if ( bState != (m_pPageCollCB->GetSavedValue() == 1) || ( bState && m_pPageCollLB->GetSelectEntryPos() != m_pPageCollLB->GetSavedValue() ) || (m_pPageNoNF->IsEnabled() && m_pPageNoNF->IsValueModified()) ) @@ -1364,16 +1364,16 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) ( pDesc->GetPageDesc() && ((pDesc->GetPageDesc()->GetName() != sPage) || !comphelper::string::equals(m_pPageNoNF->GetSavedValue(), nPgNum)))) { - SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, sal_True ) ); + SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, true ) ); aFmt.SetNumOffset(bState ? nPgNum : 0); bModified |= 0 != rSet.Put( aFmt ); bPageItemPut = bState; } } - sal_Bool bIsChecked = m_pPgBrkCB->IsChecked(); + bool bIsChecked = m_pPgBrkCB->IsChecked(); if ( !bPageItemPut && - ( bState != m_pPageCollCB->GetSavedValue() || - bIsChecked != m_pPgBrkCB->GetSavedValue() || + ( bState != (m_pPageCollCB->GetSavedValue() == 1) || + bIsChecked != (m_pPgBrkCB->GetSavedValue() ==1) || m_pPgBrkBeforeRB->IsChecked() != m_pPgBrkBeforeRB->GetSavedValue() || m_pPgBrkRB->IsChecked() != m_pPgBrkRB->GetSavedValue() )) { @@ -1382,7 +1382,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) if(bIsChecked) { - sal_Bool bBefore = m_pPgBrkBeforeRB->IsChecked(); + bool bBefore = m_pPgBrkBeforeRB->IsChecked(); if ( m_pPgBrkRB->IsChecked() ) { @@ -1650,7 +1650,7 @@ IMPL_LINK_NOARG(SwTextFlowPage, PageBreakHdl_Impl) { m_pPageCollCB->Enable(); - sal_Bool bEnable = m_pPageCollCB->IsChecked() && + bool bEnable = m_pPageCollCB->IsChecked() && m_pPageCollLB->GetEntryCount(); m_pPageCollLB->Enable(bEnable); if(!bHtmlMode) @@ -1677,11 +1677,11 @@ IMPL_LINK_NOARG(SwTextFlowPage, PageBreakHdl_Impl) IMPL_LINK_NOARG(SwTextFlowPage, ApplyCollClickHdl_Impl) { - sal_Bool bEnable = sal_False; + bool bEnable = false; if ( m_pPageCollCB->IsChecked() && m_pPageCollLB->GetEntryCount() ) { - bEnable = sal_True; + bEnable = true; m_pPageCollLB->SelectEntryPos( 0 ); } else @@ -1705,7 +1705,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn ) { m_pPageCollCB->Enable(); - sal_Bool bEnable = m_pPageCollCB->IsChecked() && + bool bEnable = m_pPageCollCB->IsChecked() && m_pPageCollLB->GetEntryCount(); m_pPageCollLB->Enable(bEnable); @@ -1763,7 +1763,7 @@ IMPL_LINK_NOARG(SwTextFlowPage, HeadLineCBClickHdl) void SwTextFlowPage::DisablePageBreak() { - bPageBreak = sal_False; + bPageBreak = false; m_pPgBrkCB->Disable(); m_pPgBrkRB->Disable(); m_pColBrkRB->Disable(); diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 75ddf1658b4d..0efd198edcdb 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -62,7 +62,7 @@ private: VirtualDevice aVD; SvtScriptedTextHelper aScriptedText; svx::frame::Array maArray; /// Implementation to draw the frame borders. - sal_Bool bFitWidth; + bool bFitWidth; bool mbRTL; Size aPrvSize; long nLabelColWidth; @@ -82,7 +82,7 @@ private: void Init (); void DoPaint ( const Rectangle& rRect ); - void CalcCellArray ( sal_Bool bFitWidth ); + void CalcCellArray ( bool bFitWidth ); void CalcLineMap (); void PaintCells (); @@ -134,7 +134,7 @@ SwStringInputDlg::~SwStringInputDlg() // AutoFormat-Dialogue: SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell, - sal_Bool bSetAutoFormat, const SwTableAutoFmt* pSelFmt ) + bool bSetAutoFormat, const SwTableAutoFmt* pSelFmt ) : SfxModalDialog(pParent, "AutoFormatTableDialog", "modules/swriter/ui/autoformattable.ui") , aStrTitle(SW_RES(STR_ADD_AUTOFORMAT_TITLE)) , aStrLabel(SW_RES(STR_ADD_AUTOFORMAT_LABEL)) @@ -146,7 +146,7 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell, , pShell(pWrtShell) , nIndex(0) , nDfltStylePos(0) - , bCoreDataChanged(sal_False) + , bCoreDataChanged(false) , bSetAutoFmt(bSetAutoFormat) { get(m_pLbFormat, "formatlb"); @@ -217,7 +217,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt ) SelFmtHdl( 0 ); } -void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, sal_Bool bEnable ) +void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, bool bEnable ) { m_pBtnNumFormat->Enable( bEnable ); m_pBtnNumFormat->Check( rFmt.IsValueFormat() ); @@ -253,7 +253,7 @@ void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) { SwTableAutoFmt* pData = &(*pTableTbl)[nIndex]; - sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = sal_True; + bool bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = true; if( pBtn == m_pBtnNumFormat ) pData->SetValueFormat( bCheck ); @@ -266,14 +266,14 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) else if ( pBtn == m_pBtnAlignment ) pData->SetJustify( bCheck ); else - bDataChgd = sal_False; + bDataChgd = false; if( bDataChgd ) { if( !bCoreDataChanged ) { m_pBtnCancel->SetText( aStrClose ); - bCoreDataChanged = sal_True; + bCoreDataChanged = true; } m_pWndPreview->NotifyChange( *pData ); @@ -321,7 +321,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) if ( !bCoreDataChanged ) { m_pBtnCancel->SetText( aStrClose ); - bCoreDataChanged = sal_True; + bCoreDataChanged = true; } SelFmtHdl( 0 ); @@ -369,7 +369,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl) if( !bCoreDataChanged ) { m_pBtnCancel->SetText( aStrClose ); - bCoreDataChanged = sal_True; + bCoreDataChanged = true; } } delete pBox; @@ -422,7 +422,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) if ( !bCoreDataChanged ) { m_pBtnCancel->SetText( aStrClose ); - bCoreDataChanged = sal_True; + bCoreDataChanged = true; } SelFmtHdl( 0 ); @@ -446,30 +446,30 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) IMPL_LINK_NOARG(SwAutoFormatDlg, SelFmtHdl) { - sal_Bool bBtnEnable = sal_False; + bool bBtnEnable = false; sal_uInt8 nSelPos = (sal_uInt8) m_pLbFormat->GetSelectEntryPos(), nOldIdx = nIndex; if( nSelPos >= nDfltStylePos ) { nIndex = nSelPos - nDfltStylePos; m_pWndPreview->NotifyChange( (*pTableTbl)[nIndex] ); bBtnEnable = 0 != nIndex; - UpdateChecks( (*pTableTbl)[nIndex], sal_True ); + UpdateChecks( (*pTableTbl)[nIndex], true ); } else { nIndex = 255; SwTableAutoFmt aTmp( SwViewShell::GetShellRes()->aStrNone ); - aTmp.SetFont( sal_False ); - aTmp.SetJustify( sal_False ); - aTmp.SetFrame( sal_False ); - aTmp.SetBackground( sal_False ); - aTmp.SetValueFormat( sal_False ); - aTmp.SetWidthHeight( sal_False ); + aTmp.SetFont( false ); + aTmp.SetJustify( false ); + aTmp.SetFrame( false ); + aTmp.SetBackground( false ); + aTmp.SetValueFormat( false ); + aTmp.SetWidthHeight( false ); if( nOldIdx != nIndex ) m_pWndPreview->NotifyChange( aTmp ); - UpdateChecks( aTmp, sal_False ); + UpdateChecks( aTmp, false ); } m_pBtnRemove->Enable( bBtnEnable ); @@ -494,7 +494,7 @@ AutoFmtPreview::AutoFmtPreview(Window* pParent) : aCurData ( OUString() ), aVD ( *this ), aScriptedText ( aVD ), - bFitWidth ( sal_False ), + bFitWidth ( false ), mbRTL ( false ), aStrJan ( SW_RES( STR_JAN ) ), aStrFeb ( SW_RES( STR_FEB ) ), @@ -789,11 +789,11 @@ void AutoFmtPreview::Init() SetBorderStyle( GetBorderStyle() | WINDOW_BORDER_MONO ); maArray.Initialize( 5, 5 ); maArray.SetUseDiagDoubleClipping( false ); - CalcCellArray( sal_False ); + CalcCellArray( false ); CalcLineMap(); } -void AutoFmtPreview::CalcCellArray( sal_Bool _bFitWidth ) +void AutoFmtPreview::CalcCellArray( bool _bFitWidth ) { maArray.SetXOffset( 2 ); maArray.SetAllColWidths( _bFitWidth ? nDataColWidth2 : nDataColWidth1 ); diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index 69b7d9ee42fb..f0b253fe6981 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -89,11 +89,11 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor // opening as template is done when a parameter tells to do so and a template filter can be detected // (otherwise no valid filter would be found) or if the detected filter is a template filter and // there is no parameter that forbids to open as template - sal_Bool bOpenAsTemplate = sal_False; - sal_Bool bWasReadOnly = sal_False, bReadOnly = sal_False; + bool bOpenAsTemplate = false; + bool bWasReadOnly = false, bReadOnly = false; - sal_Bool bRepairPackage = sal_False; - sal_Bool bRepairAllowed = sal_False; + bool bRepairPackage = false; + bool bRepairAllowed = false; bool bDeepDetection = false; // now some parameters that can already be in the array, but may be overwritten or new inserted here @@ -188,7 +188,7 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor xContent = aMedium.GetContent(); bReadOnly = aMedium.IsReadOnly(); - sal_Bool bIsStorage = aMedium.IsStorage(); + bool bIsStorage = aMedium.IsStorage(); if ( bIsStorage ) { Reference< embed::XStorage > xStorage = aMedium.GetStorage( false ); @@ -384,7 +384,7 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor lDescriptor[nPropertyCount].Name = "RepairPackage"; lDescriptor[nPropertyCount].Value <<= bRepairAllowed; nPropertyCount++; - bOpenAsTemplate = sal_True; + bOpenAsTemplate = true; // TODO/LATER: set progress bar that should be used } @@ -427,7 +427,7 @@ sal_uLong SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** pp OUString aPrefFlt = (*ppFilter)->GetUserData(); // detection for TextFilter needs an additional checking - sal_Bool bDetected = SwIoSystem::IsFileFilter(rMedium, aPrefFlt); + bool bDetected = SwIoSystem::IsFileFilter(rMedium, aPrefFlt); return bDetected ? nRet : ERRCODE_ABORT; } diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx index 319dea512e90..2153b5800ca3 100644 --- a/sw/source/ui/vba/vbaaddin.cxx +++ b/sw/source/ui/vba/vbaaddin.cxx @@ -25,7 +25,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaAddin::SwVbaAddin( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const OUString& rFileURL, sal_Bool bAutoload ) throw ( uno::RuntimeException ) : +SwVbaAddin::SwVbaAddin( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const OUString& rFileURL, bool bAutoload ) throw ( uno::RuntimeException ) : SwVbaAddin_BASE( rParent, rContext ), msFileURL( rFileURL ), mbAutoload( bAutoload ), mbInstalled( bAutoload ) { } @@ -67,7 +67,7 @@ sal_Bool SAL_CALL SwVbaAddin::getInstalled() throw (uno::RuntimeException, std:: void SAL_CALL SwVbaAddin::setInstalled( sal_Bool _installed ) throw (uno::RuntimeException, std::exception) { - if( _installed != mbInstalled ) + if( _installed != (mbInstalled ? 1 : 0) ) { mbInstalled = _installed; // TODO: should call AutoExec and AutoExit etc. diff --git a/sw/source/ui/vba/vbaaddin.hxx b/sw/source/ui/vba/vbaaddin.hxx index 9dd8ad8cd876..2573ee0c583a 100644 --- a/sw/source/ui/vba/vbaaddin.hxx +++ b/sw/source/ui/vba/vbaaddin.hxx @@ -29,11 +29,11 @@ class SwVbaAddin : public SwVbaAddin_BASE { private: OUString msFileURL; - sal_Bool mbAutoload; - sal_Bool mbInstalled; + bool mbAutoload; + bool mbInstalled; public: - SwVbaAddin( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const OUString& rFileURL, sal_Bool bAutoload ) throw ( css::uno::RuntimeException ); + SwVbaAddin( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const OUString& rFileURL, bool bAutoload ) throw ( css::uno::RuntimeException ); virtual ~SwVbaAddin(); // Attributes diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx index cb199e55ae9a..0531edbf8512 100644 --- a/sw/source/ui/vba/vbaaddins.cxx +++ b/sw/source/ui/vba/vbaaddins.cxx @@ -46,7 +46,7 @@ static uno::Reference< container::XIndexAccess > lcl_getAddinCollection( const u OUString sUrl = sEntries[ index ]; if( !xSFA->isFolder( sUrl ) && sUrl.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) ) { - maAddins.push_back( uno::Reference< word::XAddin >( new SwVbaAddin( xParent, xContext, sUrl, sal_True ) ) ); + maAddins.push_back( uno::Reference< word::XAddin >( new SwVbaAddin( xParent, xContext, sUrl, true ) ) ); } } } diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index e6bf8707b043..44c0ca61681d 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -50,7 +50,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R xTC->goRight( 1, sal_True ); xTC->setString( OUString("") ); // remove marker // remove the blank paragraph if it is a rich text - sal_Bool bRich = sal_False; + bool bRich = false; _richtext >>= bRich; if( bRich ) { diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index 9c6bdd2c0165..8e8e65f4f56a 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -200,7 +200,7 @@ SwVbaBookmarks::setShowHidden( sal_Bool /*_hidden*/ ) throw (css::uno::RuntimeEx sal_Bool SAL_CALL SwVbaBookmarks::Exists( const OUString& rName ) throw (css::uno::RuntimeException, std::exception) { - sal_Bool bExist = m_xNameAccess->hasByName( rName ); + bool bExist = m_xNameAccess->hasByName( rName ); return bExist; } diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 75d0aa6cd2cd..35ea653e51e0 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -77,7 +77,7 @@ SwVbaDocument::getContent() throw ( uno::RuntimeException, std::exception ) { uno::Reference< text::XTextRange > xStart = mxTextDocument->getText()->getStart(); uno::Reference< text::XTextRange > xEnd; - return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, xStart, xEnd, sal_True ) ); + return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, xStart, xEnd, true ) ); } uno::Reference< word::XRange > SAL_CALL @@ -325,7 +325,7 @@ void SAL_CALL SwVbaDocument::setUpdateStylesOnOpen( sal_Bool /*_updatestylesonop sal_Bool SAL_CALL SwVbaDocument::getAutoHyphenation() throw (uno::RuntimeException, std::exception) { // check this property only in default paragraph style - sal_Bool IsAutoHyphenation = sal_False; + bool IsAutoHyphenation = false; uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); xParaProps->getPropertyValue("ParaIsHyphenation") >>= IsAutoHyphenation; return IsAutoHyphenation; diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 9dddd9467a98..4c931e5e24c7 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -310,7 +310,7 @@ public: SwFEShell* pFEShell = mpDocShell->GetFEShell(); if(pFEShell) { - aReturn <<= pFEShell->GetLineCount(sal_False); + aReturn <<= pFEShell->GetLineCount(false); } } } diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index 62f41724d97a..aa3e5df97c99 100644 --- a/sw/source/ui/vba/vbafind.cxx +++ b/sw/source/ui/vba/vbafind.cxx @@ -117,9 +117,9 @@ uno::Reference< text::XTextRange > SwVbaFind::FindOneElement() throw ( uno::Runt return xFoundOne; } -sal_Bool SwVbaFind::SearchReplace() throw (uno::RuntimeException) +bool SwVbaFind::SearchReplace() throw (uno::RuntimeException) { - sal_Bool result = sal_False; + bool result = false; // TODO: map wildcards in area to OOo wildcards @@ -129,7 +129,7 @@ sal_Bool SwVbaFind::SearchReplace() throw (uno::RuntimeException) { case word::WdReplace::wdReplaceNone: { - result = sal_True; + result = true; break; } case word::WdReplace::wdReplaceOne: @@ -153,7 +153,7 @@ sal_Bool SwVbaFind::SearchReplace() throw (uno::RuntimeException) if( mnWrap == word::WdFindWrap::wdFindContinue || mnWrap == word::WdFindWrap::wdFindAsk || InRange( xTextRange ) ) { xTextRange->setString( GetReplaceWith() ); - result = sal_True; + result = true; } } } @@ -161,7 +161,7 @@ sal_Bool SwVbaFind::SearchReplace() throw (uno::RuntimeException) } default: { - result = sal_False; + result = false; } } } @@ -197,14 +197,14 @@ void SAL_CALL SwVbaFind::setReplacement( const uno::Any& /*_replacement */ ) thr sal_Bool SAL_CALL SwVbaFind::getForward() throw (uno::RuntimeException, std::exception) { - sal_Bool bBackward = sal_False; + bool bBackward = false; mxPropertyReplace->getPropertyValue("SearchBackwards") >>= bBackward; return !bBackward; } void SAL_CALL SwVbaFind::setForward( sal_Bool _forward ) throw (uno::RuntimeException, std::exception) { - sal_Bool bBackward = !_forward; + bool bBackward = !_forward; mxPropertyReplace->setPropertyValue("SearchBackwards", uno::makeAny( bBackward ) ); } @@ -232,7 +232,7 @@ void SAL_CALL SwVbaFind::setFormat( sal_Bool _format ) throw (uno::RuntimeExcept sal_Bool SAL_CALL SwVbaFind::getMatchCase() throw (uno::RuntimeException, std::exception) { - sal_Bool value = sal_False; + bool value = false; mxPropertyReplace->getPropertyValue("SearchCaseSensitive") >>= value; return value; } @@ -244,7 +244,7 @@ void SAL_CALL SwVbaFind::setMatchCase( sal_Bool _matchcase ) throw (uno::Runtime sal_Bool SAL_CALL SwVbaFind::getMatchWholeWord() throw (uno::RuntimeException, std::exception) { - sal_Bool value = sal_False; + bool value = false; mxPropertyReplace->getPropertyValue("SearchWords") >>= value; return value; } @@ -256,7 +256,7 @@ void SAL_CALL SwVbaFind::setMatchWholeWord( sal_Bool _matchwholeword ) throw (un sal_Bool SAL_CALL SwVbaFind::getMatchWildcards() throw (uno::RuntimeException, std::exception) { - sal_Bool value = sal_False; + bool value = false; mxPropertyReplace->getPropertyValue("SearchRegularExpression") >>= value; return value; } @@ -268,7 +268,7 @@ void SAL_CALL SwVbaFind::setMatchWildcards( sal_Bool _matchwildcards ) throw (un sal_Bool SAL_CALL SwVbaFind::getMatchSoundsLike() throw (uno::RuntimeException, std::exception) { - sal_Bool value = sal_False; + bool value = false; mxPropertyReplace->getPropertyValue("SearchSimilarity") >>= value; return value; } @@ -281,7 +281,7 @@ void SAL_CALL SwVbaFind::setMatchSoundsLike( sal_Bool _matchsoundslike ) throw ( sal_Bool SAL_CALL SwVbaFind::getMatchAllWordForms() throw (uno::RuntimeException, std::exception) { - sal_Bool value = sal_False; + bool value = false; mxPropertyReplace->getPropertyValue("SearchSimilarity") >>= value; if( value ) mxPropertyReplace->getPropertyValue("SearchSimilarityRelax") >>= value; @@ -308,7 +308,7 @@ void SAL_CALL SwVbaFind::setStyle( const uno::Any& /*_style */ ) throw (uno::Run sal_Bool SAL_CALL SwVbaFind::Execute( const uno::Any& FindText, const uno::Any& MatchCase, const uno::Any& MatchWholeWord, const uno::Any& MatchWildcards, const uno::Any& MatchSoundsLike, const uno::Any& MatchAllWordForms, const uno::Any& Forward, const uno::Any& Wrap, const uno::Any& Format, const uno::Any& ReplaceWith, const uno::Any& Replace, const uno::Any& /*MatchKashida*/, const uno::Any& /*MatchDiacritics*/, const uno::Any& /*MatchAlefHamza*/, const uno::Any& /*MatchControl*/, const uno::Any& /*MatchPrefix*/, const uno::Any& /*MatchSuffix*/, const uno::Any& /*MatchPhrase*/, const uno::Any& /*IgnoreSpace*/, const uno::Any& /*IgnorePunct*/ ) throw (uno::RuntimeException, std::exception) { - sal_Bool result = sal_False; + bool result = false; if( FindText.hasValue() ) { OUString sText; @@ -316,7 +316,7 @@ SwVbaFind::Execute( const uno::Any& FindText, const uno::Any& MatchCase, const u setText( sText ); } - sal_Bool bValue = sal_False; + bool bValue = false; if( MatchCase.hasValue() ) { MatchCase >>= bValue; diff --git a/sw/source/ui/vba/vbafind.hxx b/sw/source/ui/vba/vbafind.hxx index d2b69ce35a06..f2ff6bbbc141 100644 --- a/sw/source/ui/vba/vbafind.hxx +++ b/sw/source/ui/vba/vbafind.hxx @@ -51,7 +51,7 @@ private: void SetReplaceWith( const OUString& rText ) throw ( css::uno::RuntimeException ); OUString GetReplaceWith() throw ( css::uno::RuntimeException ); css::uno::Reference< css::text::XTextRange > FindOneElement() throw ( css::uno::RuntimeException ); - sal_Bool SearchReplace() throw ( css::uno::RuntimeException ); + bool SearchReplace() throw ( css::uno::RuntimeException ); public: SwVbaFind( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextRange >& xTextRange ) throw ( css::uno::RuntimeException ); diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx index fd2922f44ba5..d75b5226c4f8 100644 --- a/sw/source/ui/vba/vbafont.cxx +++ b/sw/source/ui/vba/vbafont.cxx @@ -163,7 +163,7 @@ SwVbaFont::getColorIndex() throw ( uno::RuntimeException, std::exception ) uno::Any SAL_CALL SwVbaFont::getSubscript() throw ( uno::RuntimeException, std::exception ) { - sal_Bool bRes = sal_False; + bool bRes = false; SwVbaFont_BASE::getSubscript() >>= bRes; if ( bRes ) return aLongAnyTrue; @@ -173,7 +173,7 @@ SwVbaFont::getSubscript() throw ( uno::RuntimeException, std::exception ) uno::Any SAL_CALL SwVbaFont::getSuperscript() throw ( uno::RuntimeException, std::exception ) { - sal_Bool bRes = sal_False; + bool bRes = false; SwVbaFont_BASE::getSuperscript() >>= bRes; if ( bRes ) return aLongAnyTrue; @@ -183,7 +183,7 @@ SwVbaFont::getSuperscript() throw ( uno::RuntimeException, std::exception ) uno::Any SAL_CALL SwVbaFont::getBold() throw (uno::RuntimeException, std::exception) { - sal_Bool bRes = sal_False; + bool bRes = false; SwVbaFont_BASE::getBold() >>= bRes; if ( bRes ) return aLongAnyTrue; @@ -193,7 +193,7 @@ SwVbaFont::getBold() throw (uno::RuntimeException, std::exception) uno::Any SAL_CALL SwVbaFont::getItalic() throw (uno::RuntimeException, std::exception) { - sal_Bool bRes = sal_False; + bool bRes = false; SwVbaFont_BASE::getItalic() >>= bRes; if ( bRes ) return aLongAnyTrue; @@ -203,7 +203,7 @@ SwVbaFont::getItalic() throw (uno::RuntimeException, std::exception) uno::Any SAL_CALL SwVbaFont::getStrikethrough() throw (css::uno::RuntimeException, std::exception) { - sal_Bool bRes = sal_False; + bool bRes = false; SwVbaFont_BASE::getStrikethrough() >>= bRes; if ( bRes ) return aLongAnyTrue; @@ -213,7 +213,7 @@ SwVbaFont::getStrikethrough() throw (css::uno::RuntimeException, std::exception) uno::Any SAL_CALL SwVbaFont::getShadow() throw (uno::RuntimeException, std::exception) { - sal_Bool bRes = sal_False; + bool bRes = false; SwVbaFont_BASE::getShadow() >>= bRes; if ( bRes ) return aLongAnyTrue; diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx index 66d0e3afae0d..f12ce3d9f7bf 100644 --- a/sw/source/ui/vba/vbaheaderfooter.cxx +++ b/sw/source/ui/vba/vbaheaderfooter.cxx @@ -29,7 +29,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaHeaderFooter::SwVbaHeaderFooter( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& rProps, sal_Bool isHeader, sal_Int32 index ) throw ( uno::RuntimeException ) : SwVbaHeaderFooter_BASE( rParent, rContext ), mxModel( xModel ), mxPageStyleProps( rProps ), mbHeader( isHeader ), mnIndex( index ) +SwVbaHeaderFooter::SwVbaHeaderFooter( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& rProps, bool isHeader, sal_Int32 index ) throw ( uno::RuntimeException ) : SwVbaHeaderFooter_BASE( rParent, rContext ), mxModel( xModel ), mxPageStyleProps( rProps ), mbHeader( isHeader ), mnIndex( index ) { } diff --git a/sw/source/ui/vba/vbaheaderfooter.hxx b/sw/source/ui/vba/vbaheaderfooter.hxx index eef807ee25a6..382f7bfb31d1 100644 --- a/sw/source/ui/vba/vbaheaderfooter.hxx +++ b/sw/source/ui/vba/vbaheaderfooter.hxx @@ -31,11 +31,11 @@ class SwVbaHeaderFooter : public SwVbaHeaderFooter_BASE private: css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::beans::XPropertySet > mxPageStyleProps; - sal_Bool mbHeader; + bool mbHeader; sal_Int32 mnIndex; public: - SwVbaHeaderFooter( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps, sal_Bool isHeader, sal_Int32 index ) throw ( css::uno::RuntimeException ); + SwVbaHeaderFooter( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps, bool isHeader, sal_Int32 index ) throw ( css::uno::RuntimeException ); virtual ~SwVbaHeaderFooter(){} // Attributes diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx index d68162cdf5f7..271334503b75 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx @@ -34,31 +34,31 @@ using namespace ::ooo::vba; #define FIRST_PAGE 1 // Class HeaderFooterHelper -sal_Bool HeaderFooterHelper::isHeaderFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) +bool HeaderFooterHelper::isHeaderFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) { return isHeaderFooter( word::getCurrentXText( xModel ) ); } -sal_Bool HeaderFooterHelper::isHeaderFooter( const uno::Reference< text::XText >& xText ) throw (uno::RuntimeException) +bool HeaderFooterHelper::isHeaderFooter( const uno::Reference< text::XText >& xText ) throw (uno::RuntimeException) { uno::Reference< lang::XServiceInfo > xServiceInfo( xText, uno::UNO_QUERY_THROW ); OUString aImplName = xServiceInfo->getImplementationName(); if ( aImplName == "SwXHeadFootText" ) - return sal_True; - return sal_False; + return true; + return false; } -sal_Bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) +bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) { const uno::Reference< text::XText > xCurrentText = word::getCurrentXText( xModel ); if( !isHeaderFooter( xCurrentText ) ) - return sal_False; + return false; OUString aPropIsShared = "HeaderIsShared"; OUString aPropText = "HeaderText"; uno::Reference< style::XStyle > xPageStyle = word::getCurrentPageStyle( xModel ); uno::Reference< beans::XPropertySet > xPageProps( xPageStyle, uno::UNO_QUERY_THROW ); - sal_Bool isShared = sal_True; + bool isShared = true; xPageProps->getPropertyValue( aPropIsShared ) >>= isShared; if( !isShared ) { @@ -76,17 +76,17 @@ sal_Bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xM try { if( xTRC->compareRegionStarts( xTR1, xTR2 ) == 0 ) - return sal_True; + return true; } catch (const lang::IllegalArgumentException&) { - return sal_False; + return false; } - return sal_False; + return false; } -sal_Bool HeaderFooterHelper::isFirstPageHeader( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) +bool HeaderFooterHelper::isFirstPageHeader( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) { if( isHeader( xModel ) ) { @@ -95,15 +95,15 @@ sal_Bool HeaderFooterHelper::isFirstPageHeader( const uno::Reference< frame::XMo sal_Int32 nPage = xPageCursor->getPage(); return nPage == FIRST_PAGE; } - return sal_False; + return false; } -sal_Bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) +bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) { if( isHeader( xModel ) ) { uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); - sal_Bool isShared = sal_False; + bool isShared = false; xStyleProps->getPropertyValue("HeaderIsShared") >>= isShared; if( !isShared ) { @@ -111,20 +111,20 @@ sal_Bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XMo return ( 0 == xPageCursor->getPage() % 2 ); } } - return sal_False; + return false; } -sal_Bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) +bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) { const uno::Reference< text::XText > xCurrentText = word::getCurrentXText( xModel ); if( !isHeaderFooter( xCurrentText ) ) - return sal_False; + return false; OUString aPropIsShared = "FooterIsShared"; OUString aPropText = "FooterText"; uno::Reference< style::XStyle > xPageStyle = word::getCurrentPageStyle( xModel ); uno::Reference< beans::XPropertySet > xPageProps( xPageStyle, uno::UNO_QUERY_THROW ); - sal_Bool isShared = sal_True; + bool isShared = true; xPageProps->getPropertyValue( aPropIsShared ) >>= isShared; if( !isShared ) { @@ -142,17 +142,17 @@ sal_Bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xM try { if( xTRC->compareRegionStarts( xTR1, xTR2 ) == 0 ) - return sal_True; + return true; } catch (const lang::IllegalArgumentException&) { - return sal_False; + return false; } - return sal_False; + return false; } -sal_Bool HeaderFooterHelper::isFirstPageFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) +bool HeaderFooterHelper::isFirstPageFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) { if( isFooter( xModel ) ) { @@ -160,15 +160,15 @@ sal_Bool HeaderFooterHelper::isFirstPageFooter( const uno::Reference< frame::XMo sal_Int32 nPage = xPageCursor->getPage(); return nPage == FIRST_PAGE; } - return sal_False; + return false; } -sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) +bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) { if( isFooter( xModel ) ) { uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); - sal_Bool isShared = sal_False; + bool isShared = false; xStyleProps->getPropertyValue("FooterIsShared") >>= isShared; if( !isShared ) { @@ -176,7 +176,7 @@ sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XMo return ( 0 == xPageCursor->getPage() % 2 ); } } - return sal_False; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.hxx b/sw/source/ui/vba/vbaheaderfooterhelper.hxx index dbcdbe3da8cc..28a12b4d4b71 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.hxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.hxx @@ -28,16 +28,16 @@ class HeaderFooterHelper { public: - static sal_Bool isHeaderFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); - static sal_Bool isHeaderFooter( const css::uno::Reference< css::text::XText >& xText ) throw (css::uno::RuntimeException); - static sal_Bool isHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); - static sal_Bool isFirstPageHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); - static sal_Bool isEvenPagesHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); - static sal_Bool isFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); - static sal_Bool isFirstPageFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); - static sal_Bool isEvenPagesFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); - static sal_Bool isPrimaryHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); - static sal_Bool isPrimaryFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); + static bool isHeaderFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); + static bool isHeaderFooter( const css::uno::Reference< css::text::XText >& xText ) throw (css::uno::RuntimeException); + static bool isHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); + static bool isFirstPageHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); + static bool isEvenPagesHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); + static bool isFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); + static bool isFirstPageFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); + static bool isEvenPagesFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); + static bool isPrimaryHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); + static bool isPrimaryFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); }; #endif diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx index 613e31050e88..d46b91407bad 100644 --- a/sw/source/ui/vba/vbaheadersfooters.cxx +++ b/sw/source/ui/vba/vbaheadersfooters.cxx @@ -32,10 +32,10 @@ private: uno::Reference< uno::XComponentContext > mxContext; uno::Reference< frame::XModel > mxModel; uno::Reference< beans::XPropertySet > mxPageStyleProps; - sal_Bool mbHeader; + bool mbHeader; public: - HeadersFootersIndexAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xPageStyleProps, sal_Bool bHeader ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxPageStyleProps( xPageStyleProps ), mbHeader( bHeader ) {} + HeadersFootersIndexAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xPageStyleProps, bool bHeader ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxPageStyleProps( xPageStyleProps ), mbHeader( bHeader ) {} virtual ~HeadersFootersIndexAccess(){} // XIndexAccess @@ -79,7 +79,7 @@ public: } }; -SwVbaHeadersFooters::SwVbaHeadersFooters( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xPageStyleProps, sal_Bool isHeader ): SwVbaHeadersFooters_BASE( xParent, xContext, new HeadersFootersIndexAccess( xParent, xContext, xModel, xPageStyleProps, isHeader ) ), mxModel( xModel ), mxPageStyleProps( xPageStyleProps ), mbHeader( isHeader ) +SwVbaHeadersFooters::SwVbaHeadersFooters( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xPageStyleProps, bool isHeader ): SwVbaHeadersFooters_BASE( xParent, xContext, new HeadersFootersIndexAccess( xParent, xContext, xModel, xPageStyleProps, isHeader ) ), mxModel( xModel ), mxPageStyleProps( xPageStyleProps ), mbHeader( isHeader ) { } diff --git a/sw/source/ui/vba/vbaheadersfooters.hxx b/sw/source/ui/vba/vbaheadersfooters.hxx index 8d8253dfa2b2..7e62f1ab3b39 100644 --- a/sw/source/ui/vba/vbaheadersfooters.hxx +++ b/sw/source/ui/vba/vbaheadersfooters.hxx @@ -30,10 +30,10 @@ class SwVbaHeadersFooters : public SwVbaHeadersFooters_BASE private: css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::beans::XPropertySet > mxPageStyleProps; - sal_Bool mbHeader; + bool mbHeader; public: - SwVbaHeadersFooters( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps, sal_Bool isHeader ); + SwVbaHeadersFooters( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps, bool isHeader ); virtual ~SwVbaHeadersFooters() {} virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException) SAL_OVERRIDE; diff --git a/sw/source/ui/vba/vbalistformat.cxx b/sw/source/ui/vba/vbalistformat.cxx index 8121296a7e8e..e749b78f29e3 100644 --- a/sw/source/ui/vba/vbalistformat.cxx +++ b/sw/source/ui/vba/vbalistformat.cxx @@ -39,7 +39,7 @@ SwVbaListFormat::~SwVbaListFormat() void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< word::XListTemplate >& ListTemplate, const css::uno::Any& ContinuePreviousList, const css::uno::Any& ApplyTo, const css::uno::Any& DefaultListBehavior ) throw (css::uno::RuntimeException, std::exception) { - sal_Bool bContinuePreviousList = sal_True; + bool bContinuePreviousList = true; if( ContinuePreviousList.hasValue() ) ContinuePreviousList >>= bContinuePreviousList; @@ -61,20 +61,20 @@ void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< wor uno::Reference< container::XEnumerationAccess > xEnumAccess( mxTextRange, uno::UNO_QUERY_THROW ); uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration(); - sal_Bool isFirstElement = sal_True; + bool isFirstElement = true; while( xEnum->hasMoreElements() ) { uno::Reference< beans::XPropertySet > xProps( xEnum->nextElement(), uno::UNO_QUERY_THROW ); if( isFirstElement ) { - sal_Bool isNumberingRestart = !bContinuePreviousList; + bool isNumberingRestart = !bContinuePreviousList; xProps->setPropertyValue("ParaIsNumberingRestart", uno::makeAny( isNumberingRestart ) ); if( isNumberingRestart ) { sal_Int16 nStartValue = 1; xProps->setPropertyValue("NumberingStartValue", uno::makeAny( nStartValue ) ); } - isFirstElement = sal_False; + isFirstElement = false; } else { diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index 9654618de899..8c75691e9509 100644 --- a/sw/source/ui/vba/vbapagesetup.cxx +++ b/sw/source/ui/vba/vbapagesetup.cxx @@ -58,7 +58,7 @@ void SAL_CALL SwVbaPageSetup::setGutter( double _gutter ) throw (uno::RuntimeExc double SAL_CALL SwVbaPageSetup::getHeaderDistance() throw (uno::RuntimeException, std::exception) { - sal_Bool isHeaderOn = sal_False; + bool isHeaderOn = false; mxPageProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; if( !isHeaderOn ) mxPageProps->setPropertyValue("HeaderIsOn", uno::makeAny( sal_True ) ); @@ -77,7 +77,7 @@ double SAL_CALL SwVbaPageSetup::getHeaderDistance() throw (uno::RuntimeException void SAL_CALL SwVbaPageSetup::setHeaderDistance( double _headerdistance ) throw (uno::RuntimeException, std::exception) { sal_Int32 newHeaderDistance = Millimeter::getInHundredthsOfOneMillimeter( _headerdistance ); - sal_Bool isHeaderOn = sal_False; + bool isHeaderOn = false; sal_Int32 aktTopMargin = 0; sal_Int32 aktSpacing = 0; sal_Int32 aktHeaderHeight = 0; @@ -101,7 +101,7 @@ void SAL_CALL SwVbaPageSetup::setHeaderDistance( double _headerdistance ) throw double SAL_CALL SwVbaPageSetup::getFooterDistance() throw (uno::RuntimeException, std::exception) { - sal_Bool isFooterOn = sal_False; + bool isFooterOn = false; mxPageProps->getPropertyValue("FooterIsOn") >>= isFooterOn; if( !isFooterOn ) mxPageProps->setPropertyValue("FooterIsOn", uno::makeAny( sal_True ) ); @@ -111,7 +111,7 @@ double SAL_CALL SwVbaPageSetup::getFooterDistance() throw (uno::RuntimeException void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) throw (uno::RuntimeException, std::exception) { sal_Int32 newFooterDistance = Millimeter::getInHundredthsOfOneMillimeter( _footerdistance ); - sal_Bool isFooterOn = sal_False; + bool isFooterOn = false; sal_Int32 aktBottomMargin = 0; sal_Int32 aktSpacing = 0; sal_Int32 aktFooterHeight = 0; @@ -167,7 +167,7 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status sal_Int32 nFooterHeight = 0; xStyleProps->getPropertyValue("FooterHeight") >>= nFooterHeight; - sal_Bool isHeaderOn = sal_False; + bool isHeaderOn = false; xStyleProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; if( isHeaderOn ) { diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx index 4ade338a7328..8ae1ef4b5b51 100644 --- a/sw/source/ui/vba/vbaparagraph.cxx +++ b/sw/source/ui/vba/vbaparagraph.cxx @@ -37,7 +37,7 @@ SwVbaParagraph::~SwVbaParagraph() uno::Reference< word::XRange > SAL_CALL SwVbaParagraph::getRange( ) throw ( uno::RuntimeException, std::exception ) { - return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, mxTextRange->getStart(), mxTextRange->getEnd(), mxTextRange->getText(), sal_True ) ); + return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, mxTextRange->getStart(), mxTextRange->getEnd(), mxTextRange->getText(), true ) ); } uno::Any SAL_CALL diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index aa5d0c9b12ba..60ac894f6399 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -72,14 +72,14 @@ void SAL_CALL SwVbaParagraphFormat::setFirstLineIndent( float _firstlineindent ) uno::Any SAL_CALL SwVbaParagraphFormat::getKeepTogether() throw (uno::RuntimeException, std::exception) { - sal_Bool bKeep = sal_False; + bool bKeep = false; mxParaProps->getPropertyValue("ParaKeepTogether") >>= bKeep; return uno::makeAny ( bKeep ); } void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogether ) throw (uno::RuntimeException, std::exception) { - sal_Bool bKeep = sal_False; + bool bKeep = false; if( _keeptogether >>= bKeep ) { mxParaProps->setPropertyValue("ParaKeepTogether", uno::makeAny( bKeep ) ); @@ -92,14 +92,14 @@ void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogeth uno::Any SAL_CALL SwVbaParagraphFormat::getKeepWithNext() throw (uno::RuntimeException, std::exception) { - sal_Bool bKeep = sal_False; + bool bKeep = false; mxParaProps->getPropertyValue("ParaSplit") >>= bKeep; return uno::makeAny ( bKeep ); } void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithnext ) throw (uno::RuntimeException, std::exception) { - sal_Bool bKeep = sal_False; + bool bKeep = false; if( _keepwithnext >>= bKeep ) { mxParaProps->setPropertyValue("ParaSplit", uno::makeAny( bKeep ) ); @@ -112,14 +112,14 @@ void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithne uno::Any SAL_CALL SwVbaParagraphFormat::getHyphenation() throw (uno::RuntimeException, std::exception) { - sal_Bool bHypn = sal_False; + bool bHypn = false; mxParaProps->getPropertyValue("ParaIsHyphenation") >>= bHypn; return uno::makeAny ( bHypn ); } void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation ) throw (uno::RuntimeException, std::exception) { - sal_Bool bHypn = sal_False; + bool bHypn = false; if( _hyphenation >>= bHypn ) { mxParaProps->setPropertyValue("ParaIsHyphenation", uno::makeAny( bHypn ) ); @@ -160,14 +160,14 @@ void SAL_CALL SwVbaParagraphFormat::setLineSpacingRule( sal_Int32 _linespacingru uno::Any SAL_CALL SwVbaParagraphFormat::getNoLineNumber() throw (uno::RuntimeException, std::exception) { - sal_Bool noLineNum = sal_False; + bool noLineNum = false; mxParaProps->getPropertyValue("ParaLineNumberCount") >>= noLineNum; return uno::makeAny ( noLineNum ); } void SAL_CALL SwVbaParagraphFormat::setNoLineNumber( const uno::Any& _nolinenumber ) throw (uno::RuntimeException, std::exception) { - sal_Bool noLineNum = sal_False; + bool noLineNum = false; if( _nolinenumber >>= noLineNum ) { mxParaProps->setPropertyValue("ParaLineNumberCount", uno::makeAny( noLineNum ) ); @@ -204,13 +204,13 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getPageBreakBefore() throw (uno::Runtime { style::BreakType aBreakType; mxParaProps->getPropertyValue("BreakType") >>= aBreakType; - sal_Bool bBreakBefore = ( aBreakType == style::BreakType_PAGE_BEFORE || aBreakType == style::BreakType_PAGE_BOTH ); + bool bBreakBefore = ( aBreakType == style::BreakType_PAGE_BEFORE || aBreakType == style::BreakType_PAGE_BOTH ); return uno::makeAny( bBreakBefore ); } void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbefore ) throw (uno::RuntimeException, std::exception) { - sal_Bool bBreakBefore = sal_False; + bool bBreakBefore = false; if( _breakbefore >>= bBreakBefore ) { style::BreakType aBreakType; @@ -307,7 +307,7 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() throw (uno::RuntimeExc mxParaProps->getPropertyValue("ParaOrphans") >>= nOrphan; // if the amount of single lines on one page > 1 and the same of start and end of the paragraph, // true is retured. - sal_Bool bWidow = ( nWidow > 1 && nOrphan == nWidow ); + bool bWidow = ( nWidow > 1 && nOrphan == nWidow ); return uno::makeAny( bWidow ); } @@ -315,7 +315,7 @@ void SAL_CALL SwVbaParagraphFormat::setWidowControl( const uno::Any& _widowcontr { // if we get true, the part of the paragraph on one page has to be // at least two lines - sal_Bool bWidow = sal_False; + bool bWidow = false; if( _widowcontrol >>= bWidow ) { sal_Int8 nControl = bWidow? 2:1; diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index 7457d0dc6f6f..3bd95e21ad08 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -43,18 +43,18 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, sal_Bool _bMaySpanEndOfDocument ) throw (uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument ), mbMaySpanEndOfDocument( _bMaySpanEndOfDocument ) +SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, bool _bMaySpanEndOfDocument ) throw (uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument ), mbMaySpanEndOfDocument( _bMaySpanEndOfDocument ) { uno::Reference< text::XTextRange > xEnd; initialize( rStart, xEnd ); } -SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, sal_Bool _bMaySpanEndOfDocument ) throw (uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument ), mbMaySpanEndOfDocument( _bMaySpanEndOfDocument ) +SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, bool _bMaySpanEndOfDocument ) throw (uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument ), mbMaySpanEndOfDocument( _bMaySpanEndOfDocument ) { initialize( rStart, rEnd ); } -SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, const uno::Reference< text::XText >& rText, sal_Bool _bMaySpanEndOfDocument ) throw (uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ),mxTextDocument( rTextDocument ), mxText( rText ), mbMaySpanEndOfDocument( _bMaySpanEndOfDocument ) +SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, const uno::Reference< text::XText >& rText, bool _bMaySpanEndOfDocument ) throw (uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ),mxTextDocument( rTextDocument ), mxText( rText ), mbMaySpanEndOfDocument( _bMaySpanEndOfDocument ) { initialize( rStart, rEnd ); } @@ -147,7 +147,7 @@ SwVbaRange::setText( const OUString& rText ) throw ( uno::RuntimeException, std: { mxTextCursor->setString( OUString() ); // process CR in strings - SwVbaRangeHelper::insertString( xRange, mxText, rText, sal_True ); + SwVbaRangeHelper::insertString( xRange, mxText, rText, true ); } else { diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx index 7d695bbd5153..408c47cd2ed1 100644 --- a/sw/source/ui/vba/vbarange.hxx +++ b/sw/source/ui/vba/vbarange.hxx @@ -38,15 +38,15 @@ private: css::uno::Reference< css::text::XTextDocument > mxTextDocument; css::uno::Reference< css::text::XTextCursor > mxTextCursor; css::uno::Reference< css::text::XText > mxText; - sal_Bool mbMaySpanEndOfDocument; + bool mbMaySpanEndOfDocument; private: void initialize( const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd ) throw (css::uno::RuntimeException); void GetStyleInfo(OUString& aStyleName, OUString& aStyleType ) throw ( css::uno::RuntimeException ); public: - SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException); - SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException); - SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, const css::uno::Reference< css::text::XText >& rText, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException); + SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, bool _bMaySpanEndOfDocument = false ) throw (css::uno::RuntimeException); + SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, bool _bMaySpanEndOfDocument = false ) throw (css::uno::RuntimeException); + SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, const css::uno::Reference< css::text::XText >& rText, bool _bMaySpanEndOfDocument = false ) throw (css::uno::RuntimeException); virtual ~SwVbaRange(); css::uno::Reference< css::text::XTextDocument > getDocument() const { return mxTextDocument; } diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx index 57cb19602cde..78ef5fec9ba7 100644 --- a/sw/source/ui/vba/vbarangehelper.cxx +++ b/sw/source/ui/vba/vbarangehelper.cxx @@ -43,7 +43,7 @@ uno::Reference< text::XTextRange > SwVbaRangeHelper::getRangeByPosition( const u sal_Int32 nPos = 0; uno::Reference< text::XTextCursor > xCursor = rText->createTextCursor(); xCursor->collapseToStart(); - sal_Bool bCanGo = sal_True; + bool bCanGo = true; while( !xRange.is() && bCanGo ) { if( _position == nPos ) @@ -60,7 +60,7 @@ uno::Reference< text::XTextRange > SwVbaRangeHelper::getRangeByPosition( const u return xRange; } -void SwVbaRangeHelper::insertString( uno::Reference< text::XTextRange >& rTextRange, uno::Reference< text::XText >& rText, const OUString& rStr, sal_Bool _bAbsorb ) throw ( uno::RuntimeException ) +void SwVbaRangeHelper::insertString( uno::Reference< text::XTextRange >& rTextRange, uno::Reference< text::XText >& rText, const OUString& rStr, bool _bAbsorb ) throw ( uno::RuntimeException ) { sal_Int32 nlastIndex = 0; sal_Int32 nIndex = 0; @@ -143,7 +143,7 @@ sal_Int32 SwVbaRangeHelper::getPosition( const uno::Reference< text::XText >& rT uno::Reference< text::XTextRangeCompare > xCompare( rText, uno::UNO_QUERY_THROW ); // compareValue is 0 if the ranges are equal sal_Int32 nCompareValue = xCompare->compareRegionStarts( xCursor->getStart(), rTextRange ); - sal_Bool canGo = sal_True; + bool canGo = true; while( nCompareValue !=0 && canGo ) { diff --git a/sw/source/ui/vba/vbarangehelper.hxx b/sw/source/ui/vba/vbarangehelper.hxx index 85f7b067a8f5..417f9c7c93a6 100644 --- a/sw/source/ui/vba/vbarangehelper.hxx +++ b/sw/source/ui/vba/vbarangehelper.hxx @@ -29,7 +29,7 @@ class SwVbaRangeHelper { public: static css::uno::Reference< css::text::XTextRange > getRangeByPosition( const css::uno::Reference< css::text::XText >& rText, sal_Int32 _position )throw ( css::uno::RuntimeException ); - static void insertString( css::uno::Reference< css::text::XTextRange >& rTextRange, css::uno::Reference< css::text::XText >& rText, const OUString& rStr, sal_Bool _bAbsorb ) throw ( css::uno::RuntimeException ); + static void insertString( css::uno::Reference< css::text::XTextRange >& rTextRange, css::uno::Reference< css::text::XText >& rText, const OUString& rStr, bool _bAbsorb ) throw ( css::uno::RuntimeException ); static css::uno::Reference< css::text::XTextCursor > initCursor( const css::uno::Reference< css::text::XTextRange >& rTextRange, const css::uno::Reference< css::text::XText >& rText ) throw ( css::uno::RuntimeException ); static sal_Int32 getPosition( const css::uno::Reference< css::text::XText >& rText, const css::uno::Reference< css::text::XTextRange >& rTextRange ) throw ( css::uno::RuntimeException ); static css::uno::Reference< css::text::XTextContent > findBookmarkByPosition( const css::uno::Reference< css::text::XTextDocument >& xTextDoc, const css::uno::Reference< css::text::XTextRange >& xTextRange ) throw ( css::uno::RuntimeException ); diff --git a/sw/source/ui/vba/vbarow.cxx b/sw/source/ui/vba/vbarow.cxx index f764c4d0ceec..27db78bd8cfd 100644 --- a/sw/source/ui/vba/vbarow.cxx +++ b/sw/source/ui/vba/vbarow.cxx @@ -62,14 +62,14 @@ void SAL_CALL SwVbaRow::setHeight( const uno::Any& _height ) throw (css::uno::Ru ::sal_Int32 SAL_CALL SwVbaRow::getHeightRule() throw (css::uno::RuntimeException, std::exception) { - sal_Bool isAutoHeight = sal_False; + bool isAutoHeight = false; mxRowProps->getPropertyValue("IsAutoHeight") >>= isAutoHeight; return isAutoHeight ? word::WdRowHeightRule::wdRowHeightAuto : word::WdRowHeightRule::wdRowHeightExactly; } void SAL_CALL SwVbaRow::setHeightRule( ::sal_Int32 _heightrule ) throw (css::uno::RuntimeException, std::exception) { - sal_Bool isAutoHeight = ( _heightrule == word::WdRowHeightRule::wdRowHeightAuto ); + bool isAutoHeight = ( _heightrule == word::WdRowHeightRule::wdRowHeightAuto ); mxRowProps->setPropertyValue("IsAutoHeight", uno::makeAny( isAutoHeight ) ); } diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx index 96dc412c246a..b21b64b90c08 100644 --- a/sw/source/ui/vba/vbarows.cxx +++ b/sw/source/ui/vba/vbarows.cxx @@ -127,12 +127,12 @@ void SAL_CALL SwVbaRows::setAlignment( ::sal_Int32 _alignment ) throw (uno::Runt uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() throw (uno::RuntimeException, std::exception) { - sal_Bool bAllowBreak = sal_False; + bool bAllowBreak = false; uno::Reference< container::XIndexAccess > xRowsAccess( mxTableRows, uno::UNO_QUERY_THROW ); for( sal_Int32 index = mnStartRowIndex; index <= mnEndRowIndex; ++index ) { uno::Reference< beans::XPropertySet > xRowProps( xRowsAccess->getByIndex( index ), uno::UNO_QUERY_THROW ); - sal_Bool bSplit = sal_False; + bool bSplit = false; xRowProps->getPropertyValue("IsSplitAllowed") >>= bSplit; if( index == 0 ) { @@ -149,7 +149,7 @@ uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() throw (uno::RuntimeExcep void SAL_CALL SwVbaRows::setAllowBreakAcrossPages( const uno::Any& _allowbreakacrosspages ) throw (uno::RuntimeException, std::exception) { - sal_Bool bAllowBreak = sal_False; + bool bAllowBreak = false; _allowbreakacrosspages >>= bAllowBreak; uno::Reference< container::XIndexAccess > xRowsAccess( mxTableRows, uno::UNO_QUERY_THROW ); for( sal_Int32 index = mnStartRowIndex; index <= mnEndRowIndex; ++index ) diff --git a/sw/source/ui/vba/vbasection.cxx b/sw/source/ui/vba/vbasection.cxx index 3a09874a6f76..3995c5f705a0 100644 --- a/sw/source/ui/vba/vbasection.cxx +++ b/sw/source/ui/vba/vbasection.cxx @@ -45,7 +45,7 @@ void SAL_CALL SwVbaSection::setProtectedForForms( sal_Bool /*_protectedforforms* uno::Any SAL_CALL SwVbaSection::Headers( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { - uno::Reference< XCollection > xCol( new SwVbaHeadersFooters( this, mxContext, mxModel, mxPageProps, sal_True ) ); + uno::Reference< XCollection > xCol( new SwVbaHeadersFooters( this, mxContext, mxModel, mxPageProps, true ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); return uno::makeAny( xCol ); @@ -53,7 +53,7 @@ uno::Any SAL_CALL SwVbaSection::Headers( const uno::Any& index ) throw (uno::Run uno::Any SAL_CALL SwVbaSection::Footers( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { - uno::Reference< XCollection > xCol( new SwVbaHeadersFooters( this, mxContext, mxModel, mxPageProps, sal_False ) ); + uno::Reference< XCollection > xCol( new SwVbaHeadersFooters( this, mxContext, mxModel, mxPageProps, false ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); return uno::makeAny( xCol ); diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index bba8cf7f06c5..ef5ad0622cbd 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -131,7 +131,7 @@ SwVbaSelection::HomeKey( const uno::Any& _unit, const uno::Any& _extend ) throw sal_Int32 nExtend = word::WdMovementType::wdMove; _unit >>= nUnit; _extend >>= nExtend; - sal_Bool bExtend = ( nExtend == word::WdMovementType::wdExtend ) ? sal_True : sal_False; + bool bExtend = ( nExtend == word::WdMovementType::wdExtend ) ? sal_True : sal_False; switch( nUnit ) { @@ -166,7 +166,7 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw ( sal_Int32 nExtend = word::WdMovementType::wdMove; _unit >>= nUnit; _extend >>= nExtend; - sal_Bool bExtend = ( nExtend == word::WdMovementType::wdExtend ) ? sal_True : sal_False; + bool bExtend = ( nExtend == word::WdMovementType::wdExtend ) ? sal_True : sal_False; switch( nUnit ) { @@ -240,7 +240,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: if( nCount == 0 ) return; - sal_Bool bExpand = ( nExtend == word::WdMovementType::wdMove ) ? sal_False : sal_True; + bool bExpand = ( nExtend == word::WdMovementType::wdMove ) ? sal_False : sal_True; switch( nUnit ) { @@ -482,7 +482,7 @@ SwVbaSelection::TypeParagraph() throw ( uno::RuntimeException, std::exception ) { // #FIXME: if the selection is an entire paragraph, it's replaced // by the new paragraph - sal_Bool isCollapsed = mxTextViewCursor->isCollapsed(); + bool isCollapsed = mxTextViewCursor->isCollapsed(); InsertParagraph(); if( isCollapsed ) mxTextViewCursor->collapseToStart(); @@ -840,7 +840,7 @@ SwVbaSelection::getHeaderFooter() throw ( uno::RuntimeException, std::exception { uno::Reference< beans::XPropertySet > xPageStyleProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); sal_Int32 nIndex = word::WdHeaderFooterIndex::wdHeaderFooterPrimary; - sal_Bool isHeader = HeaderFooterHelper::isHeader( mxModel ); + bool isHeader = HeaderFooterHelper::isHeader( mxModel ); if( HeaderFooterHelper::isEvenPagesHeader( mxModel ) || HeaderFooterHelper::isEvenPagesFooter( mxModel ) ) nIndex = word::WdHeaderFooterIndex::wdHeaderFooterEvenPages; else if( HeaderFooterHelper::isFirstPageHeader( mxModel ) || HeaderFooterHelper::isFirstPageFooter( mxModel ) ) diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx index 7b889ea2044d..8ca495d78805 100644 --- a/sw/source/ui/vba/vbastyle.cxx +++ b/sw/source/ui/vba/vbastyle.cxx @@ -139,7 +139,7 @@ uno::Reference< word::XParagraphFormat > SAL_CALL SwVbaStyle::getParagraphFormat sal_Bool SAL_CALL SwVbaStyle::getAutomaticallyUpdate() throw (uno::RuntimeException, std::exception) { - sal_Bool isAutoUpdate = sal_False; + bool isAutoUpdate = false; mxStyleProps->getPropertyValue("IsAutoUpdate") >>= isAutoUpdate; return isAutoUpdate; } diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index 9f659b1757b0..8dda034c0f7d 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -123,7 +123,7 @@ OUString SwVbaTableHelper::getColumnStr( sal_Int32 nCol ) sal_Int32 SwVbaTableHelper::getTableWidth( ) throw (uno::RuntimeException) { sal_Int32 nWidth = 0; - sal_Bool isWidthRelatvie = sal_False; + bool isWidthRelatvie = false; uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); xTableProps->getPropertyValue("IsWidthRelative") >>= isWidthRelatvie; if( isWidthRelatvie ) @@ -163,7 +163,7 @@ void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, rCols.SetLeft ( 0 ); rCols.SetRight ( UNO_TABLE_COLUMN_SUM ); rCols.SetRightMax( UNO_TABLE_COLUMN_SUM ); - pTable->GetTabCols( rCols, pStart, sal_False, sal_False ); + pTable->GetTabCols( rCols, pStart, false, false ); } sal_Int32 SwVbaTableHelper::GetColCount( SwTabCols& rCols ) const diff --git a/sw/source/ui/vba/vbatableofcontents.cxx b/sw/source/ui/vba/vbatableofcontents.cxx index 0c6ab3cf781d..2f0c69e35d6c 100644 --- a/sw/source/ui/vba/vbatableofcontents.cxx +++ b/sw/source/ui/vba/vbatableofcontents.cxx @@ -59,7 +59,7 @@ void SAL_CALL SwVbaTableOfContents::setTabLeader( ::sal_Int32 /*_tableader*/ ) t sal_Bool SAL_CALL SwVbaTableOfContents::getUseFields() throw (css::uno::RuntimeException, std::exception) { - sal_Bool bUseFields = sal_False; + bool bUseFields = false; mxTocProps->getPropertyValue("CreateFromMarks") >>= bUseFields; return bUseFields; } @@ -71,7 +71,7 @@ void SAL_CALL SwVbaTableOfContents::setUseFields( sal_Bool _useFields ) throw (c sal_Bool SAL_CALL SwVbaTableOfContents::getUseOutlineLevels() throw (css::uno::RuntimeException, std::exception) { - sal_Bool bUseOutlineLevels = sal_False; + bool bUseOutlineLevels = false; mxTocProps->getPropertyValue("CreateFromOutline") >>= bUseOutlineLevels; return bUseOutlineLevels; } diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx index 0fd9c8efe5cb..9827666d7566 100644 --- a/sw/source/ui/vba/vbatablesofcontents.cxx +++ b/sw/source/ui/vba/vbatablesofcontents.cxx @@ -115,7 +115,7 @@ SwVbaTablesOfContents::Add( const uno::Reference< word::XRange >& Range, const u uno::Reference< text::XDocumentIndex > xDocumentIndex( xDocMSF->createInstance("com.sun.star.text.ContentIndex"), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xTocProps( xDocumentIndex, uno::UNO_QUERY_THROW ); - sal_Bool isProtected = sal_False; + bool isProtected = false; xTocProps->setPropertyValue("IsProtected", uno::makeAny( isProtected ) ); uno::Reference< word::XTableOfContents > xToc( new SwVbaTableOfContents( this, mxContext, mxTextDocument, xDocumentIndex ) ); @@ -125,12 +125,12 @@ SwVbaTablesOfContents::Add( const uno::Reference< word::XRange >& Range, const u LowerHeadingLevel >>= nLowerHeadingLevel; xToc->setLowerHeadingLevel( nLowerHeadingLevel ); - sal_Bool bUseFields = sal_False; + bool bUseFields = false; if( UseFields.hasValue() ) UseFields >>= bUseFields; xToc->setUseFields( bUseFields ); - sal_Bool bUseOutlineLevels = sal_True; + bool bUseOutlineLevels = true; xToc->setUseOutlineLevels( bUseOutlineLevels ); SwVbaRange* pVbaRange = dynamic_cast<SwVbaRange*>( Range.get() ); diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index 666d2aab65a3..af40d8ea7870 100644 --- a/sw/source/ui/vba/vbaview.cxx +++ b/sw/source/ui/vba/vbaview.cxx @@ -192,7 +192,7 @@ SwVbaView::setSplitSpecial( ::sal_Int32/* _splitspecial */) throw (css::uno::Run sal_Bool SAL_CALL SwVbaView::getTableGridLines() throw (css::uno::RuntimeException, std::exception) { - sal_Bool bShowTableGridLine = sal_False; + bool bShowTableGridLine = false; mxViewSettings->getPropertyValue("ShowTableBoundaries") >>= bShowTableGridLine; return bShowTableGridLine; } @@ -207,7 +207,7 @@ SwVbaView::setTableGridLines( sal_Bool _tablegridlines ) throw (css::uno::Runtim SwVbaView::getType() throw (css::uno::RuntimeException, std::exception) { // FIXME: handle wdPrintPreview type - sal_Bool bOnlineLayout = sal_False; + bool bOnlineLayout = false; mxViewSettings->getPropertyValue("ShowOnlineLayout") >>= bOnlineLayout; return bOnlineLayout ? word::WdViewType::wdWebView : word::WdViewType::wdPrintView; } @@ -307,7 +307,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) if ( aPageStyleName == "First Page" ) { // go to the beginning of where the next style is used - sal_Bool hasNextPage = sal_False; + bool hasNextPage = false; xStyle = word::getCurrentPageStyle( mxModel ); do { @@ -328,9 +328,9 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) xStyle = word::getCurrentPageStyle( mxModel ); uno::Reference< beans::XPropertySet > xPageProps( xStyle, uno::UNO_QUERY_THROW ); - sal_Bool isOn = sal_False; + bool isOn = false; xPageProps->getPropertyValue( aPropIsOn ) >>= isOn; - sal_Bool isShared = sal_False; + bool isShared = false; xPageProps->getPropertyValue( aPropIsShared ) >>= isShared; if( !isOn ) { diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx index cc9ffec06050..a08cf9c6359b 100644 --- a/sw/source/ui/vba/vbawrapformat.cxx +++ b/sw/source/ui/vba/vbawrapformat.cxx @@ -99,7 +99,7 @@ void SwVbaWrapFormat::makeWrap() throw (uno::RuntimeException) } case text::WrapTextMode_PARALLEL: { - sal_Bool bContour = sal_False; + bool bContour = false; m_xPropertySet->getPropertyValue("SurroundContour") >>= bContour; if( bContour ) nType = word::WdWrapType::wdWrapTight; |