sw/inc/viewopt.hxx | 8 ++++---- sw/source/ui/config/caption.cxx | 2 +- sw/source/ui/config/fontcfg.cxx | 8 ++++---- sw/source/ui/config/modcfg.cxx | 12 ++++++------ sw/source/ui/config/optpage.cxx | 22 +++++++++++----------- sw/source/ui/config/viewopt.cxx | 2 +- sw/source/ui/dbui/dbinsdlg.cxx | 26 +++++++++++++------------- sw/source/ui/dbui/dbmgr.cxx | 16 ++++++++-------- sw/source/ui/inc/caption.hxx | 4 ++-- sw/source/ui/inc/fontcfg.hxx | 2 +- 10 files changed, 51 insertions(+), 51 deletions(-)
New commits: commit 3fa2c6da4a912856f4a0572fafe7b32fc7d57e88 Author: Takeshi Abe <t...@fixedpoint.jp> Date: Thu Jan 10 00:02:56 2013 +0900 sal_Bool to bool Change-Id: Ib83c02d53fbae6a70781d9d9d7ab015b016c72a8 diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index 6c21e73..8efc3d4 100644 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -431,9 +431,9 @@ public: SwViewOption& operator=( const SwViewOption &rOpt ); // Compare methods. - sal_Bool IsEqualFlags ( const SwViewOption &rOpt ) const; - inline sal_Bool operator == ( const SwViewOption &rOpt ) const; - inline sal_Bool operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); } + bool IsEqualFlags ( const SwViewOption &rOpt ) const; + inline bool operator == ( const SwViewOption &rOpt ) const; + inline bool operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); } /*--------------------------------------------------------------------------- @@ -572,7 +572,7 @@ public: }; -inline sal_Bool SwViewOption::operator==( const SwViewOption &rOpt ) const +inline bool SwViewOption::operator==( const SwViewOption &rOpt ) const { return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom(); } diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx index 82136c3..9fb8b63 100644 --- a/sw/source/ui/config/caption.cxx +++ b/sw/source/ui/config/caption.cxx @@ -66,7 +66,7 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt ) return *this; } -sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const +bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const { return (eObjType == rOpt.eObjType && aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx index c9cdcf5..d951355 100644 --- a/sw/source/ui/config/fontcfg.cxx +++ b/sw/source/ui/config/fontcfg.cxx @@ -168,9 +168,9 @@ SwStdFontConfig::~SwStdFontConfig() { } -sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const +bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const { - sal_Bool bSame = sal_False; + bool bSame = false; SvtLinguOptions aLinguOpt; SvtLinguConfig().GetOptions( aLinguOpt ); @@ -210,7 +210,7 @@ sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const case FONT_CAPTION_CJK : case FONT_INDEX_CJK : { - sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK; + bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK; bSame = b1 && sDefaultFonts[nFontType] == sDefFontCJK; } break; @@ -218,7 +218,7 @@ sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const case FONT_CAPTION_CTL : case FONT_INDEX_CTL : { - sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL; + bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL; bSame = b1 && sDefaultFonts[nFontType] == sDefFontCTL; } break; diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index f95b87b..765e4e1 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -74,7 +74,7 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption( } else { - sal_Bool bFound = sal_False; + bool bFound = false; if(eType == OLE_CAP && pOleId) { for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++) @@ -96,7 +96,7 @@ sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt } else if (pOpt) { - sal_Bool bFound = sal_False; + bool bFound = false; if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId()) { for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++) @@ -161,7 +161,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFro case 'x': { sal_Unicode nVal, nChar; - sal_Bool bValidData = sal_True; + bool bValidData = true; xub_StrLen n; for( n = 0, nChar = 0; n < 2 && i < rDelim.Len(); ++n, ++i ) { @@ -174,7 +174,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFro else { OSL_FAIL("wrong hex value" ); - bValidData = sal_False; + bValidData = false; break; } @@ -320,7 +320,7 @@ void SwRevisionConfig::Commit() PutProperties(aNames, aValues); } -static void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr, sal_Bool bDelete = sal_False) +static void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr, bool bDelete = false) { rAttr.nItemId = rAttr.nAttr = 0; switch(nVal) @@ -364,7 +364,7 @@ void SwRevisionConfig::Load() { case 0 : lcl_ConvertCfgToAttr(nVal, aInsertAttr); break; case 1 : aInsertAttr.nColor = nVal; break; - case 2 : lcl_ConvertCfgToAttr(nVal, aDeletedAttr, sal_True); break; + case 2 : lcl_ConvertCfgToAttr(nVal, aDeletedAttr, true); break; case 3 : aDeletedAttr.nColor = nVal; break; case 4 : lcl_ConvertCfgToAttr(nVal, aFormatAttr); break; case 5 : aFormatAttr.nColor = nVal; break; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index f23586e..d28bd4d 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -673,7 +673,7 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) { pWrtShell->StartAllAction(); SfxPrinter* pPrinter = pWrtShell->getIDocumentDeviceAccess()->getPrinter( false ); - sal_Bool bMod = sal_False; + bool bMod = false; sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT); @@ -689,7 +689,7 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFmtAttr(nFontWhich); - bMod = sal_True; + bMod = true; } if(bStandardHeightChanged) { @@ -697,52 +697,52 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) ); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFmtAttr(nFontHeightWhich); - bMod = sal_True; + bMod = true; } if(sTitle != sShellTitle ) { lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, pPrinter, sTitle, nFontWhich); - bMod = sal_True; + bMod = true; } if(bTitleHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, sal::static_int_cast< sal_uInt16, sal_Int64 >(aTitleHeightLB.GetValue()), nFontHeightWhich); - bMod = sal_True; + bMod = true; } if(sList != sShellList && (!bListDefault || !bSetListDefault )) { lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, pPrinter, sList, nFontWhich); - bMod = sal_True; + bMod = true; } if(bListHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, sal::static_int_cast< sal_uInt16, sal_Int64 >(aListHeightLB.GetValue()), nFontHeightWhich); - bMod = sal_True; + bMod = true; } if(sLabel != sShellLabel && (!bLabelDefault || !bSetLabelDefault)) { lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, pPrinter, sLabel, nFontWhich); - bMod = sal_True; + bMod = true; } if(bLabelHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, sal::static_int_cast< sal_uInt16, sal_Int64 >(aLabelHeightLB.GetValue()), nFontHeightWhich); - bMod = sal_True; + bMod = true; } if(sIdx != sShellIndex && (!bIdxDefault || !bSetIdxDefault)) { lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, pPrinter, sIdx, nFontWhich); - bMod = sal_True; + bMod = true; } if(bIndexHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, sal::static_int_cast< sal_uInt16, sal_Int64 >(aIndexHeightLB.GetValue()), nFontHeightWhich); - bMod = sal_True; + bMod = true; } if ( bMod ) pWrtShell->SetModified(); diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index c203525..73bed77 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -67,7 +67,7 @@ sal_uInt16 SwViewOption::nPixelTwips = 0; // one pixel on the screen static const char aPostItStr[] = " "; -sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const +bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const { return nCoreOptions == rOpt.nCoreOptions && nCore2Options == rOpt.nCore2Options diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index c53173f..99c0f31 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -646,10 +646,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox ) IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) { SwWrtShell& rSh = pView->GetWrtShell(); - sal_Bool bNewSet = sal_False; + bool bNewSet = false; if( !pTblSet ) { - bNewSet = sal_True; + bNewSet = true; pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() ); // At first acquire the simple attributes @@ -1054,7 +1054,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, for( sal_Int32 i = 0 ; ; ++i ) { - sal_Bool bBreak = sal_False; + bool bBreak = false; try { if(pSelection) @@ -1068,7 +1068,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } catch (const Exception&) { - bBreak = sal_True; + bBreak = true; } if(bBreak) break; @@ -1243,12 +1243,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, rtl::OUString("1"), aEmptyStr, aDBData ); - sal_Bool bSetCrsr = sal_True; + bool bSetCrsr = true; sal_uInt16 n = 0, nCols = aColArr.size(); ::sw::mark::IMark* pMark = NULL; for( sal_Int32 i = 0 ; ; ++i ) { - sal_Bool bBreak = sal_False; + bool bBreak = false; try { if(pSelection) @@ -1262,7 +1262,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } catch (const Exception&) { - bBreak = sal_True; + bBreak = true; } if(bBreak) @@ -1369,7 +1369,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, ::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK ); rSh.SwCrsrShell::MovePara( GetfnParaCurr(), GetfnParaEnd() ); - bSetCrsr = sal_False; + bSetCrsr = false; } } @@ -1526,15 +1526,15 @@ static rtl::OUString lcl_CreateUniqueName(const Sequence<rtl::OUString>& aNames) const rtl::OUString* pNames = aNames.getConstArray(); rtl::OUString sTest("_"); rtl::OUString sRet; - while(sal_True) + while(true) { sRet = sTest; sRet += rtl::OUString::valueOf(nIdx++); - sal_Bool bFound = sal_False; + bool bFound = false; for(sal_Int32 i = 0; i < aNames.getLength(); i++) { if(pNames[i] == sRet) { - bFound = sal_True; + bFound = true; break; } } @@ -1733,12 +1733,12 @@ void SwInsertDBColAutoPilot::Load() rtl::OUString sColumn; pSubProps[0] >>= sColumn; //check for existance of the loaded column name - sal_Bool bFound = sal_False; + bool bFound = false; for(sal_uInt16 nRealColumn = 0; nRealColumn < aDBColumns.size(); nRealColumn++) { if(aDBColumns[nRealColumn]->sColumn == sColumn) { - bFound = sal_True; + bFound = true; break; } } diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 65c5052..855f4df 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -826,9 +826,9 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, const SwMergeDescriptor& rMergeDescriptor) { //check if the doc is synchronized and contains at least one linked section - sal_Bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1; + bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1; sal_Bool bLoop = sal_True; - sal_Bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING; + bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING; const bool bAsSingleFile = rMergeDescriptor.nMergeType == DBMGR_MERGE_SINGLE_FILE; ::rtl::Reference< MailDispatcher > xMailDispatcher; @@ -853,7 +853,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, uno::Reference< XPropertySet > xColumnProp; { - sal_Bool bColumnName = sEMailAddrFld.Len() > 0; + bool bColumnName = sEMailAddrFld.Len() > 0; if (bColumnName) { @@ -1364,7 +1364,7 @@ sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName, { uno::Reference< XDataSource> xSource; uno::Reference< XConnection> xConnection; - sal_Bool bUseMergeData = sal_False; + bool bUseMergeData = false; uno::Reference< XColumnsSupplier> xColsSupp; bool bDisposeConnection = false; if(pImpl->pMergeData && @@ -1372,7 +1372,7 @@ sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName, { xConnection = pImpl->pMergeData->xConnection; xSource = SwNewDBMgr::getDataSourceAsParent(xConnection,rDBName); - bUseMergeData = sal_True; + bUseMergeData = true; xColsSupp = xColsSupp.query( pImpl->pMergeData->xResultSet ); } if(!xConnection.is()) @@ -1765,13 +1765,13 @@ sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTabl { //the destination has to be an element of the selection const Any* pSelection = pFound->aSelection.getConstArray(); - sal_Bool bFound = sal_False; + bool bFound = false; for(sal_Int32 nPos = 0; !bFound && nPos < pFound->aSelection.getLength(); nPos++) { sal_Int32 nSelection = 0; pSelection[nPos] >>= nSelection; if(nSelection == static_cast<sal_Int32>(nAbsRecordId)) - bFound = sal_True; + bFound = true; } if(!bFound) return sal_False; @@ -2715,7 +2715,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, } SwWrtShell& rSourceShell = rSourceView.GetWrtShell(); - sal_Bool bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1; + bool bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1; //save the settings of the first rSourceShell.SttEndDoc(sal_True); sal_uInt16 nStartingPageNo = rSourceShell.GetVirtPageNum(); diff --git a/sw/source/ui/inc/caption.hxx b/sw/source/ui/inc/caption.hxx index 8381887..b927e4e 100644 --- a/sw/source/ui/inc/caption.hxx +++ b/sw/source/ui/inc/caption.hxx @@ -87,9 +87,9 @@ public: inline sal_Bool& CopyAttributes() { return bCopyAttributes; } inline sal_Bool CopyAttributes() const { return bCopyAttributes; } - sal_Bool operator==( const InsCaptionOpt& rOpt ) const; + bool operator==( const InsCaptionOpt& rOpt ) const; InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt ); - inline sal_Bool operator< ( const InsCaptionOpt & rObj ) const + inline bool operator< ( const InsCaptionOpt & rObj ) const { return aOleId < rObj.aOleId; } }; diff --git a/sw/source/ui/inc/fontcfg.hxx b/sw/source/ui/inc/fontcfg.hxx index 9c03c26..6463601 100644 --- a/sw/source/ui/inc/fontcfg.hxx +++ b/sw/source/ui/inc/fontcfg.hxx @@ -86,7 +86,7 @@ public: const String& GetFontIndex (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_INDEX + FONT_PER_GROUP * nFontGroup];} const String& GetFontFor(sal_uInt16 nFontType) const {return sDefaultFonts[nFontType];} - sal_Bool IsFontDefault(sal_uInt16 nFontType) const; + bool IsFontDefault(sal_uInt16 nFontType) const; void SetFontStandard(const String& rSet, sal_uInt8 nFontGroup) {ChangeString(FONT_STANDARD + FONT_PER_GROUP * nFontGroup, rSet);} _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits