diff options
author | Noel Grandin <noel@peralex.com> | 2014-04-25 14:00:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-04-30 08:44:42 +0200 |
commit | 6aa35db39311dcd7965c9c9c21fcf4143a1f9b43 (patch) | |
tree | 04320eaf8c7481c1b496460624ee20ec11360ac2 /sw/source/ui/fldui | |
parent | 1417061d1b2c110e7e690523a544b58e7ffd05c0 (diff) |
sw: sal_Bool->bool
Change-Id: I324a0ffde2ddcca105451c19e7aadcfad15211d8
Diffstat (limited to 'sw/source/ui/fldui')
-rw-r--r-- | sw/source/ui/fldui/DropDownFieldDialog.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/changedb.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddb.cxx | 20 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddinf.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddok.cxx | 26 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldedt.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldfunc.cxx | 36 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldpage.cxx | 18 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldpage.hxx | 20 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 20 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldtdlg.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldvar.cxx | 68 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldvar.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/inpdlg.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/javaedit.cxx | 16 |
15 files changed, 139 insertions, 139 deletions
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); |