basic/source/runtime/methods.cxx | 2 basic/source/runtime/methods1.cxx | 4 canvas/source/cairo/cairo_canvasfont.cxx | 2 canvas/source/vcl/canvasfont.cxx | 2 chart2/source/controller/dialogs/res_ErrorBar.cxx | 4 chart2/source/controller/dialogs/tp_DataSource.cxx | 4 chart2/source/controller/dialogs/tp_RangeChooser.cxx | 4 compilerplugins/clang/implicitboolconversion.cxx | 81 +++++++--- compilerplugins/clang/literaltoboolconversion.cxx | 105 ++++++++------ connectivity/source/drivers/kab/KStatement.cxx | 4 connectivity/source/drivers/mork/MQueryHelper.cxx | 16 +- cui/source/dialogs/cuifmsearch.cxx | 6 cui/source/options/connpooloptions.cxx | 2 cui/source/tabpages/backgrnd.cxx | 2 cui/source/tabpages/page.cxx | 6 cui/source/tabpages/swpossizetabpage.cxx | 4 cui/source/tabpages/transfrm.cxx | 8 - dbaccess/source/core/api/RowSetBase.cxx | 2 dbaccess/source/filter/xml/xmlComponent.cxx | 2 dbaccess/source/ui/app/AppController.cxx | 2 dbaccess/source/ui/control/TableGrantCtrl.cxx | 2 dbaccess/source/ui/dlg/dbwiz.cxx | 2 dbaccess/source/ui/dlg/dbwizsetup.cxx | 2 dbaccess/source/ui/misc/WCPage.cxx | 2 dbaccess/source/ui/querydesign/JoinTableView.cxx | 2 dbaccess/source/ui/tabledesign/TEditControl.cxx | 2 dbaccess/source/ui/tabledesign/TableController.cxx | 6 drawinglayer/source/primitive2d/textlayoutdevice.cxx | 2 editeng/source/editeng/editdoc.cxx | 2 editeng/source/editeng/editdoc.hxx | 6 editeng/source/editeng/eertfpar.cxx | 4 editeng/source/editeng/impedit.cxx | 4 editeng/source/editeng/impedit.hxx | 2 editeng/source/editeng/impedit2.cxx | 16 +- editeng/source/editeng/impedit3.cxx | 6 editeng/source/editeng/impedit4.cxx | 12 - editeng/source/items/bulitem.cxx | 2 editeng/source/items/paperinf.cxx | 2 editeng/source/items/paraitem.cxx | 2 editeng/source/misc/txtrange.cxx | 2 editeng/source/outliner/paralist.cxx | 6 extensions/source/plugin/inc/plugin/impl.hxx | 2 extensions/source/scanner/sane.cxx | 2 extensions/source/scanner/sane.hxx | 4 extensions/source/scanner/sanedlg.cxx | 2 filter/source/msfilter/escherex.cxx | 4 filter/source/msfilter/msdffimp.cxx | 4 filter/source/msfilter/svdfppt.cxx | 2 filter/source/pdf/impdialog.cxx | 2 filter/source/svg/svgexport.cxx | 6 forms/source/component/navigationbar.cxx | 10 - framework/source/uielement/menubarmanager.cxx | 2 i18npool/source/localedata/localedata.cxx | 2 idl/source/objects/bastype.cxx | 4 idlc/source/astexpression.cxx | 40 ++--- include/editeng/svxacorr.hxx | 2 include/filter/msfilter/svdfppt.hxx | 2 include/svx/graphctl.hxx | 2 include/tools/bigint.hxx | 2 jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx | 2 lotuswordpro/source/filter/lwpdivinfo.hxx | 4 lotuswordpro/source/filter/lwplayout.cxx | 30 ++-- lotuswordpro/source/filter/lwppara.cxx | 6 lotuswordpro/source/filter/lwptblcell.hxx | 6 lotuswordpro/source/filter/lwptoc.cxx | 4 lotuswordpro/source/filter/lwptoc.hxx | 4 lotuswordpro/source/filter/lwptools.hxx | 4 mysqlc/source/mysqlc_connection.cxx | 2 mysqlc/source/mysqlc_databasemetadata.cxx | 4 mysqlc/source/mysqlc_preparedstatement.cxx | 2 mysqlc/source/mysqlc_statement.cxx | 2 package/source/zipapi/XUnbufferedStream.cxx | 4 package/source/zippackage/ZipPackageStream.cxx | 2 reportdesign/source/core/sdr/ReportUndoFactory.cxx | 8 - sc/source/core/data/attrib.cxx | 2 sc/source/ui/app/inputwin.cxx | 2 sc/source/ui/dbgui/validate.cxx | 2 sc/source/ui/unoobj/docuno.cxx | 2 sc/source/ui/vba/vbarange.cxx | 2 sc/source/ui/view/cellsh1.cxx | 30 ++-- sc/source/ui/view/cellsh2.cxx | 6 sc/source/ui/view/cellsh3.cxx | 10 - sc/source/ui/view/tabvwsh3.cxx | 4 sc/source/ui/view/tabvwsha.cxx | 2 sc/source/ui/view/tabvwshc.cxx | 4 sd/source/core/drawdoc4.cxx | 2 sd/source/core/undo/undoobjects.cxx | 4 sd/source/filter/eppt/pptx-stylesheet.cxx | 2 sd/source/filter/html/pubdlg.cxx | 2 sd/source/ui/animations/CustomAnimationDialog.cxx | 6 sd/source/ui/animations/CustomAnimationPane.cxx | 2 sd/source/ui/animations/SlideTransitionPane.cxx | 2 sd/source/ui/annotations/annotationmanager.cxx | 4 sd/source/ui/dlg/LayerTabBar.cxx | 2 sd/source/ui/func/fudraw.cxx | 4 sd/source/ui/func/fupage.cxx | 4 sd/source/ui/func/fuparagr.cxx | 2 sd/source/ui/func/smarttag.cxx | 4 sd/source/ui/unoidl/unoobj.cxx | 6 sd/source/ui/view/ViewShellBase.cxx | 2 sd/source/ui/view/sdruler.cxx | 2 sd/source/ui/view/sdview.cxx | 4 sd/source/ui/view/sdview2.cxx | 2 sfx2/source/appl/newhelp.cxx | 6 sfx2/source/appl/opengrf.cxx | 2 sfx2/source/dialog/filtergrouping.cxx | 2 sfx2/source/dialog/templdlg.cxx | 10 - sfx2/source/dialog/tplcitem.cxx | 2 sfx2/source/doc/SfxDocumentMetaData.cxx | 2 sfx2/source/doc/doctemplates.cxx | 2 sfx2/source/doc/oleprops.cxx | 2 sfx2/source/doc/sfxbasemodel.cxx | 2 sfx2/source/inc/statcach.hxx | 2 sfx2/source/sidebar/SidebarController.cxx | 6 sfx2/source/view/viewfrm2.cxx | 2 starmath/source/mathmlexport.cxx | 2 svtools/source/config/menuoptions.cxx | 4 svtools/source/control/filectrl.cxx | 2 svtools/source/uno/toolboxcontroller.cxx | 2 svtools/source/uno/treecontrolpeer.cxx | 4 svx/source/dialog/_contdlg.cxx | 2 svx/source/dialog/imapdlg.cxx | 2 svx/source/dialog/svxruler.cxx | 4 svx/source/dialog/swframeexample.cxx | 2 svx/source/fmcomp/fmgridcl.cxx | 2 svx/source/form/fmshell.cxx | 4 svx/source/form/fmshimp.cxx | 2 svx/source/form/fmview.cxx | 2 svx/source/form/formcontroller.cxx | 2 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 2 svx/source/svdraw/svdocirc.cxx | 2 svx/source/svdraw/svdotextpathdecomposition.cxx | 2 svx/source/svdraw/svdundo.cxx | 14 - svx/source/table/tablecontroller.cxx | 2 svx/source/unodraw/unoshap2.cxx | 4 svx/source/unodraw/unoshtxt.cxx | 2 svx/source/xml/xmlgrhlp.cxx | 2 sw/source/filter/ww8/wrtww8.cxx | 4 toolkit/source/awt/vclxfont.cxx | 2 toolkit/source/awt/vclxwindows.cxx | 6 toolkit/source/controls/unocontrolmodel.cxx | 2 toolkit/source/helper/property.cxx | 2 toolkit/source/helper/unopropertyarrayhelper.cxx | 2 toolkit/source/helper/unowrapper.cxx | 2 tools/source/generic/bigint.cxx | 2 ucb/source/ucp/ftp/ftpcontent.cxx | 4 unotools/source/config/configvaluecontainer.cxx | 2 unotools/source/config/searchopt.cxx | 2 xmloff/source/draw/shapeimport.cxx | 2 xmloff/source/meta/xmlmetae.cxx | 2 xmloff/source/style/WordWrapPropertyHdl.cxx | 4 xmloff/source/text/txtlists.cxx | 4 xmloff/source/transform/Oasis2OOo.cxx | 2 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx | 4 154 files changed, 424 insertions(+), 378 deletions(-)
New commits: commit 4d7b194dd5910f19652e9fa997efbd947b20e570 Author: Stephan Bergmann <[email protected]> Date: Thu Apr 23 18:38:38 2015 +0200 Improved loplugin:literaltoboolconversion looking into cond. exprs. Change-Id: If54ab99fc82c7895da6bb88ebf18a11570f597ed diff --git a/compilerplugins/clang/literaltoboolconversion.cxx b/compilerplugins/clang/literaltoboolconversion.cxx index c6d6381..588b75d 100644 --- a/compilerplugins/clang/literaltoboolconversion.cxx +++ b/compilerplugins/clang/literaltoboolconversion.cxx @@ -29,6 +29,9 @@ public: private: bool isFromCIncludeFile(SourceLocation spellingLocation) const; + + void handleImplicitCastSubExpr( + ImplicitCastExpr const * castExpr, Expr const * subExpr); }; bool LiteralToBoolConversion::VisitImplicitCastExpr( @@ -40,25 +43,53 @@ bool LiteralToBoolConversion::VisitImplicitCastExpr( if (!expr->getType()->isBooleanType()) { return true; } - Expr const * sub = expr->getSubExpr()->IgnoreParenCasts(); - Expr const * expr2 = expr; + handleImplicitCastSubExpr(expr, expr->getSubExpr()); + return true; +} + +bool LiteralToBoolConversion::isFromCIncludeFile( + SourceLocation spellingLocation) const +{ + return !compat::isInMainFile(compiler.getSourceManager(), spellingLocation) + && (StringRef( + compiler.getSourceManager().getPresumedLoc(spellingLocation) + .getFilename()) + .endswith(".h")); +} + +void LiteralToBoolConversion::handleImplicitCastSubExpr( + ImplicitCastExpr const * castExpr, Expr const * subExpr) +{ + Expr const * expr2 = subExpr; + // track sub-expr with potential parens, to e.g. rewrite all of expanded + // + // #define sal_False ((sal_Bool)0) + // + // including the parens + subExpr = expr2->IgnoreParenCasts(); for (;;) { - BinaryOperator const * op = dyn_cast<BinaryOperator>(sub); + BinaryOperator const * op = dyn_cast<BinaryOperator>(subExpr); if (op == nullptr || op->getOpcode() != BO_Comma) { break; } - expr2 = op->getRHS()->IgnoreParenCasts(); - sub = expr2; + expr2 = op->getRHS(); + subExpr = expr2->IgnoreParenCasts(); } - if (sub->getType()->isBooleanType()) { - return true; + if (subExpr->getType()->isBooleanType()) { + return; + } + ConditionalOperator const * op = dyn_cast<ConditionalOperator>(subExpr); + if (op != nullptr) { + handleImplicitCastSubExpr(castExpr, op->getTrueExpr()); + handleImplicitCastSubExpr(castExpr, op->getFalseExpr()); + return; } APSInt res; - if (!sub->isValueDependent() - && sub->isIntegerConstantExpr(res, compiler.getASTContext()) + if (!subExpr->isValueDependent() + && subExpr->isIntegerConstantExpr(res, compiler.getASTContext()) && res.getLimitedValue() <= 1) { - SourceLocation loc { sub->getLocStart() }; + SourceLocation loc { subExpr->getLocStart() }; while (compiler.getSourceManager().isMacroArgExpansion(loc)) { loc = compiler.getSourceManager().getImmediateMacroCallerLoc(loc); } @@ -72,46 +103,46 @@ bool LiteralToBoolConversion::VisitImplicitCastExpr( if (isFromCIncludeFile( compiler.getSourceManager().getSpellingLoc(loc))) { - return true; + return; } } } - if (isa<StringLiteral>(sub)) { - SourceLocation loc { sub->getLocStart() }; + if (isa<StringLiteral>(subExpr)) { + SourceLocation loc { subExpr->getLocStart() }; if (compiler.getSourceManager().isMacroArgExpansion(loc) && (Lexer::getImmediateMacroName( loc, compiler.getSourceManager(), compiler.getLangOpts()) == "assert")) { - return true; + return; } } - if (isa<IntegerLiteral>(sub) || isa<CharacterLiteral>(sub) - || isa<FloatingLiteral>(sub) || isa<ImaginaryLiteral>(sub) - || isa<StringLiteral>(sub)) + if (isa<IntegerLiteral>(subExpr) || isa<CharacterLiteral>(subExpr) + || isa<FloatingLiteral>(subExpr) || isa<ImaginaryLiteral>(subExpr) + || isa<StringLiteral>(subExpr)) { bool rewritten = false; if (rewriter != nullptr) { SourceLocation loc { compiler.getSourceManager().getExpansionLoc( - expr->getLocStart()) }; - if (compiler.getSourceManager().getExpansionLoc(expr->getLocEnd()) + expr2->getLocStart()) }; + if (compiler.getSourceManager().getExpansionLoc(expr2->getLocEnd()) == loc) { char const * s = compiler.getSourceManager().getCharacterData( loc); unsigned n = Lexer::MeasureTokenLength( - expr->getLocEnd(), compiler.getSourceManager(), + expr2->getLocEnd(), compiler.getSourceManager(), compiler.getLangOpts()); std::string tok { s, n }; if (tok == "sal_False" || tok == "0") { rewritten = replaceText( compiler.getSourceManager().getExpansionLoc( - expr->getLocStart()), + expr2->getLocStart()), n, "false"); } else if (tok == "sal_True" || tok == "1") { rewritten = replaceText( compiler.getSourceManager().getExpansionLoc( - expr->getLocStart()), + expr2->getLocStart()), n, "true"); } } @@ -121,10 +152,10 @@ bool LiteralToBoolConversion::VisitImplicitCastExpr( DiagnosticsEngine::Warning, "implicit conversion (%0) of literal of type %1 to %2", expr2->getLocStart()) - << expr->getCastKindName() << expr->getSubExpr()->getType() - << expr->getType() << expr2->getSourceRange(); + << castExpr->getCastKindName() << subExpr->getType() + << castExpr->getType() << expr2->getSourceRange(); } - } else if (sub->isNullPointerConstant( + } else if (subExpr->isNullPointerConstant( compiler.getASTContext(), Expr::NPC_ValueDependentIsNull) > Expr::NPCK_ZeroExpression) { @@ -138,30 +169,20 @@ bool LiteralToBoolConversion::VisitImplicitCastExpr( ("implicit conversion (%0) of null pointer constant of type %1 to" " %2"), expr2->getLocStart()) - << expr->getCastKindName() << expr->getSubExpr()->getType() - << expr->getType() << expr2->getSourceRange(); - } else if (!sub->isValueDependent() - && sub->isIntegerConstantExpr(res, compiler.getASTContext())) + << castExpr->getCastKindName() << subExpr->getType() + << castExpr->getType() << expr2->getSourceRange(); + } else if (!subExpr->isValueDependent() + && subExpr->isIntegerConstantExpr(res, compiler.getASTContext())) { report( DiagnosticsEngine::Warning, ("implicit conversion (%0) of integer constant expression of type" " %1 with value %2 to %3"), expr2->getLocStart()) - << expr->getCastKindName() << expr->getSubExpr()->getType() - << res.toString(10) << expr->getType() << expr2->getSourceRange(); + << castExpr->getCastKindName() << subExpr->getType() + << res.toString(10) << castExpr->getType() + << expr2->getSourceRange(); } - return true; -} - -bool LiteralToBoolConversion::isFromCIncludeFile( - SourceLocation spellingLocation) const -{ - return !compat::isInMainFile(compiler.getSourceManager(), spellingLocation) - && (StringRef( - compiler.getSourceManager().getPresumedLoc(spellingLocation) - .getFilename()) - .endswith(".h")); } loplugin::Plugin::Registration<LiteralToBoolConversion> X( commit 22401181774dfb3882e7ad0335f1267d7885ff48 Author: Stephan Bergmann <[email protected]> Date: Thu Apr 23 18:30:45 2015 +0200 Improved loplugin:literaltoboolconversion looking into cond. exprs. ...automatic rewriter fixes Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 575ce6a..b994330 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2517,7 +2517,7 @@ RTLFUNC(IsArray) } else { - rPar.Get(0)->PutBool((rPar.Get(1)->GetType() & SbxARRAY) ? sal_True : sal_False ); + rPar.Get(0)->PutBool((rPar.Get(1)->GetType() & SbxARRAY) ? true : false ); } } diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index be21232..9e6ad47 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -1084,7 +1084,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, { pStrm->Seek( nFPos + nBlockLen ); } - return pStrm->GetErrorCode() ? sal_False : sal_True; + return pStrm->GetErrorCode() ? false : true; } static bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, @@ -1195,7 +1195,7 @@ static bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, { pStrm->Seek( nFPos + nBlockLen ); } - return pStrm->GetErrorCode() ? sal_False : sal_True; + return pStrm->GetErrorCode() ? false : true; } diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx index 62bf3e2..f668b85 100644 --- a/canvas/source/cairo/cairo_canvasfont.cxx +++ b/canvas/source/cairo/cairo_canvasfont.cxx @@ -49,7 +49,7 @@ namespace cairocanvas { maFont->SetAlign( ALIGN_BASELINE ); maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); - maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False ); + maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? true : false ); // TODO(F2): improve panose->vclenum conversion maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index a7e6f48..7efcd31 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -51,7 +51,7 @@ namespace vclcanvas { maFont->SetAlign( ALIGN_BASELINE ); maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); - maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False ); + maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? true : false ); // TODO(F2): improve panose->vclenum conversion maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index a211f3d..b43578b 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -41,8 +41,8 @@ void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog ) { if( pDialog ) { - pDialog->Show( bEnable ? sal_False : sal_True ); - pDialog->SetModalInputMode( bEnable ? sal_False : sal_True ); + pDialog->Show( bEnable ? false : true ); + pDialog->SetModalInputMode( bEnable ? false : true ); } } diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index e2c30c5..f106dec 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -136,8 +136,8 @@ void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog ) { if( pDialog ) { - pDialog->Show( bEnable ? sal_False : sal_True ); - pDialog->SetModalInputMode( bEnable ? sal_False : sal_True ); + pDialog->Show( bEnable ? false : true ); + pDialog->SetModalInputMode( bEnable ? false : true ); } } diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index 00f16fd..7541f67 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -46,8 +46,8 @@ namespace { if( pDialog ) { - pDialog->Show( bEnable ? sal_False : sal_True ); - pDialog->SetModalInputMode( bEnable ? sal_False : sal_True ); + pDialog->Show( bEnable ? false : true ); + pDialog->SetModalInputMode( bEnable ? false : true ); } } diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx index c776bd8..ec619ee 100644 --- a/connectivity/source/drivers/kab/KStatement.cxx +++ b/connectivity/source/drivers/kab/KStatement.cxx @@ -272,8 +272,8 @@ KabOrder *KabCommonStatement::analyseOrderByClause(const OSQLParseNode *pParseNo pColumnRef->getChild(0)->getTokenValue(); bool bAscending = SQL_ISTOKEN(pAscendingDescending, DESC)? - sal_False: - sal_True; + false: + true; return new KabSimpleOrder(sColumnName, bAscending); } diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx index fdfcd91..5cfb9b7 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.cxx +++ b/connectivity/source/drivers/mork/MQueryHelper.cxx @@ -298,22 +298,22 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression OUString searchedValue = evStr->getValue(); if (evStr->getCond() == MQueryOp::Is) { SAL_INFO("connectivity.mork", "MQueryOp::Is; done"); - resultVector.push_back((currentValue == searchedValue) ? sal_True : sal_False); + resultVector.push_back((currentValue == searchedValue) ? true : false); } else if (evStr->getCond() == MQueryOp::IsNot) { SAL_INFO("connectivity.mork", "MQueryOp::IsNot; done"); - resultVector.push_back((currentValue == searchedValue) ? sal_False : sal_True); + resultVector.push_back((currentValue == searchedValue) ? false : true); } else if (evStr->getCond() == MQueryOp::EndsWith) { SAL_INFO("connectivity.mork", "MQueryOp::EndsWith; done"); - resultVector.push_back((currentValue.endsWith(searchedValue)) ? sal_True : sal_False); + resultVector.push_back((currentValue.endsWith(searchedValue)) ? true : false); } else if (evStr->getCond() == MQueryOp::BeginsWith) { SAL_INFO("connectivity.mork", "MQueryOp::BeginsWith; done"); - resultVector.push_back((currentValue.startsWith(searchedValue)) ? sal_True : sal_False); + resultVector.push_back((currentValue.startsWith(searchedValue)) ? true : false); } else if (evStr->getCond() == MQueryOp::Contains) { SAL_INFO("connectivity.mork", "MQueryOp::Contains; done"); - resultVector.push_back((currentValue.indexOf(searchedValue) == -1) ? sal_False : sal_True); + resultVector.push_back((currentValue.indexOf(searchedValue) == -1) ? false : true); } else if (evStr->getCond() == MQueryOp::DoesNotContain) { SAL_INFO("connectivity.mork", "MQueryOp::DoesNotContain; done"); - resultVector.push_back((currentValue.indexOf(searchedValue) == -1) ? sal_True : sal_False); + resultVector.push_back((currentValue.indexOf(searchedValue) == -1) ? true : false); } else if (evStr->getCond() == MQueryOp::RegExp) { SAL_INFO("connectivity.mork", "MQueryOp::RegExp; done"); utl::SearchParam param( @@ -326,10 +326,10 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression } } else if (evStr->getCond() == MQueryOp::Exists) { SAL_INFO("connectivity.mork", "MQueryOp::Exists; done"); - resultVector.push_back((currentValue.isEmpty()) ? sal_False : sal_True); + resultVector.push_back((currentValue.isEmpty()) ? false : true); } else if (evStr->getCond() == MQueryOp::DoesNotExist) { SAL_INFO("connectivity.mork", "MQueryOp::DoesNotExist; done"); - resultVector.push_back((currentValue.isEmpty()) ? sal_True : sal_False); + resultVector.push_back((currentValue.isEmpty()) ? true : false); } } else if ( (*evIter)->isExpr() ) { diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 1dbd644..15ba21a 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -437,9 +437,9 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox) } // pass on to the engine - m_pSearchEngine->SetWildcard(m_pcbWildCard->IsEnabled() ? m_pcbWildCard->IsChecked() : sal_False); - m_pSearchEngine->SetRegular(m_pcbRegular->IsEnabled() ? m_pcbRegular->IsChecked() : sal_False); - m_pSearchEngine->SetLevenshtein(m_pcbApprox->IsEnabled() ? m_pcbApprox->IsChecked() : sal_False); + m_pSearchEngine->SetWildcard(m_pcbWildCard->IsEnabled() ? m_pcbWildCard->IsChecked() : false); + m_pSearchEngine->SetRegular(m_pcbRegular->IsEnabled() ? m_pcbRegular->IsChecked() : false); + m_pSearchEngine->SetLevenshtein(m_pcbApprox->IsEnabled() ? m_pcbApprox->IsChecked() : false); // (disabled boxes have to be passed to the engine as sal_False) // adjust the Position-Listbox (which is not allowed during Wildcard-search) diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index a025522..95c5990 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -338,7 +338,7 @@ namespace offapp // the enabled flag SFX_ITEMSET_GET( _rSet, pEnabled, SfxBoolItem, SID_SB_POOLING_ENABLED, true ); OSL_ENSURE(pEnabled, "ConnectionPoolOptionsPage::implInitControls: missing the Enabled item!"); - m_pEnablePooling->Check(pEnabled ? pEnabled->GetValue() : sal_True); + m_pEnablePooling->Check(pEnabled ? pEnabled->GetValue() : true); m_pEnablePooling->SaveValue(); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 09cb920..b31d3a1 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1463,7 +1463,7 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Idle* , pIdle ) // new file chosen aBgdGraphicPath = pImportDlg->GetPath(); aBgdGraphicFilter = pImportDlg->GetCurrentFilter(); - bool bLink = ( nHtmlMode & HTMLMODE_ON ) || bLinkOnly ? sal_True : pImportDlg->IsAsLink(); + bool bLink = ( nHtmlMode & HTMLMODE_ON ) || bLinkOnly ? true : pImportDlg->IsAsLink(); m_pBtnLink->Check( bLink ); m_pBtnLink->Enable(); diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index c69f732..a20e262 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -568,12 +568,12 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet ) // horizontal alignment pItem = GetItem( *rSet, SID_ATTR_PAGE_EXT1 ); m_pHorzBox->Check( pItem ? static_cast<const SfxBoolItem*>(pItem)->GetValue() - : sal_False ); + : false ); // vertical alignment pItem = GetItem( *rSet, SID_ATTR_PAGE_EXT2 ); m_pVertBox->Check( pItem ? static_cast<const SfxBoolItem*>(pItem)->GetValue() - : sal_False ); + : false ); // set example window on the table m_pBspWin->SetTable( true ); @@ -589,7 +589,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet ) m_pAdaptBox->Show(); pItem = GetItem( *rSet, SID_ATTR_PAGE_EXT1 ); m_pAdaptBox->Check( pItem ? - static_cast<const SfxBoolItem*>(pItem)->GetValue() : sal_False ); + static_cast<const SfxBoolItem*>(pItem)->GetValue() : false ); //!!! hidden, because not implemented by StarDraw m_pLayoutBox->Hide(); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index b1fb610..5fae3ff 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -744,7 +744,7 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet) else rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ), - m_pPositionCB->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) ); + m_pPositionCB->GetState() == TRISTATE_TRUE ? true : false ) ); bModified = true; } @@ -755,7 +755,7 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet) else rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ), - m_pSizeCB->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) ); + m_pSizeCB->GetState() == TRISTATE_TRUE ? true : false ) ); bModified = true; } diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 5de0107..79cf18a 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -788,7 +788,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) { rOutAttrs->Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ), - m_pTsbPosProtect->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) ); + m_pTsbPosProtect->GetState() == TRISTATE_TRUE ? true : false ) ); } bModified = true; @@ -827,7 +827,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) else rOutAttrs->Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ), - m_pTsbSizeProtect->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) ); + m_pTsbSizeProtect->GetState() == TRISTATE_TRUE ? true : false ) ); bModified = true; } @@ -840,7 +840,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) else rOutAttrs->Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOWIDTH ), - m_pTsbAutoGrowWidth->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) ); + m_pTsbAutoGrowWidth->GetState() == TRISTATE_TRUE ? true : false ) ); } bModified = true; } @@ -854,7 +854,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) else rOutAttrs->Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOHEIGHT ), - m_pTsbAutoGrowHeight->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) ); + m_pTsbAutoGrowHeight->GetState() == TRISTATE_TRUE ? true : false ) ); } bModified = true; } diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index a90f33c..941d880 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -195,7 +195,7 @@ sal_Bool SAL_CALL ORowSetBase::wasNull( ) throw(SQLException, RuntimeException, bool ORowSetBase::impl_wasNull() { - return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is()) ? ((*m_aCurrentRow)->get())[m_nLastColumnIndex].isNull() : sal_True; + return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is()) ? ((*m_aCurrentRow)->get())[m_nLastColumnIndex].isNull() : true; } const ORowSetValue& ORowSetBase::getValue(sal_Int32 columnIndex) diff --git a/dbaccess/source/filter/xml/xmlComponent.cxx b/dbaccess/source/filter/xml/xmlComponent.cxx index b96a36a..3fd01d4 100644 --- a/dbaccess/source/filter/xml/xmlComponent.cxx +++ b/dbaccess/source/filter/xml/xmlComponent.cxx @@ -73,7 +73,7 @@ OXMLComponent::OXMLComponent( ODBFilter& rImport m_sName = m_sName.replace( '/', '_' ); break; case XML_TOK_AS_TEMPLATE: - m_bAsTemplate = (sValue == s_sTRUE ? sal_True : sal_False); + m_bAsTemplate = (sValue == s_sTRUE ? true : false); break; } } diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 7188a95..f97686b 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -589,7 +589,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const break; case ID_BROWSER_CUT: aReturn.bEnabled = !isDataSourceReadOnly() && getContainer()->getSelectionCount() >= 1; - aReturn.bEnabled = aReturn.bEnabled && ( (ID_BROWSER_CUT == _nId && getContainer()->getElementType() == E_TABLE) ? getContainer()->isCutAllowed() : sal_True); + aReturn.bEnabled = aReturn.bEnabled && ( (ID_BROWSER_CUT == _nId && getContainer()->getElementType() == E_TABLE) ? getContainer()->isCutAllowed() : true); break; case ID_BROWSER_PASTE: switch( getContainer()->getElementType() ) diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx index b007531..68159f6 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -276,7 +276,7 @@ void OTableGrantControl::InitController( CellControllerRef& /*rController*/, lon { // get the privileges from the user TTablePrivilegeMap::const_iterator aFind = findPrivilege(nRow); - m_pCheckCell->GetBox().Check(aFind != m_aPrivMap.end() ? isAllowed(nColumnId,aFind->second.nRights) : sal_False); + m_pCheckCell->GetBox().Check(aFind != m_aPrivMap.end() ? isAllowed(nColumnId,aFind->second.nRights) : false); } } diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 27c57af..67ff416 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -288,7 +288,7 @@ TabPage* ODbTypeWizDialog::createPage(WizardState _nState) static_cast<OGenericAdministrationPage*>(pPage)->SetAdminDialog(this,this); pPage->SetText(ModuleRes(nStringId)); defaultButton( _nState == START_PAGE ? WZB_NEXT : WZB_FINISH ); - enableButtons( WZB_FINISH, _nState == START_PAGE ? sal_False : sal_True); + enableButtons( WZB_FINISH, _nState == START_PAGE ? false : true); pPage->Show(); } return pPage; diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 30240f2..e07d254 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -559,7 +559,7 @@ TabPage* ODbTypeWizDialogSetup::createPage(WizardState _nState) defaultButton( _nState == PAGE_DBSETUPWIZARD_FINAL ? WZB_FINISH : WZB_NEXT ); enableButtons( WZB_FINISH, _nState == PAGE_DBSETUPWIZARD_FINAL ); - enableButtons( WZB_NEXT, _nState == PAGE_DBSETUPWIZARD_FINAL ? sal_False : sal_True); + enableButtons( WZB_NEXT, _nState == PAGE_DBSETUPWIZARD_FINAL ? false : true); pPage->Show(); } return pPage; diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx index 5d2b824..b4056a4 100644 --- a/dbaccess/source/ui/misc/WCPage.cxx +++ b/dbaccess/source/ui/misc/WCPage.cxx @@ -150,7 +150,7 @@ IMPL_LINK( OCopyTable, KeyClickHdl, Button*, /*pButton*/ ) bool OCopyTable::LeavePage() { - m_pParent->m_bCreatePrimaryKeyColumn = (m_bPKeyAllowed && m_pCB_PrimaryColumn->IsEnabled()) ? m_pCB_PrimaryColumn->IsChecked() : sal_False; + m_pParent->m_bCreatePrimaryKeyColumn = (m_bPKeyAllowed && m_pCB_PrimaryColumn->IsEnabled()) ? m_pCB_PrimaryColumn->IsChecked() : false; m_pParent->m_aKeyName = m_pParent->m_bCreatePrimaryKeyColumn ? m_pEdKeyName->GetText() : OUString(); m_pParent->setUseHeaderLine( m_pCB_UseHeaderLine->IsChecked() ); diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index eb76c32..c26f187 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1183,7 +1183,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab if ((!pLhs || pLhs->ExistsAConn()) && (!pRhs || pRhs->ExistsAConn())) { - bool bFoundStart = _rpFirstAfter ? sal_False : sal_True; + bool bFoundStart = _rpFirstAfter ? false : true; ::std::vector<OTableConnection*>::const_iterator aIter = m_vTableConnection.begin(); ::std::vector<OTableConnection*>::const_iterator aEnd = m_vTableConnection.end(); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index fa78833..ec4ac8a 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -475,7 +475,7 @@ sal_Int32 OTableEditorCtrl::HasFieldName( const OUString& rFieldName ) Reference<XConnection> xCon = GetView()->getController().getConnection(); Reference< XDatabaseMetaData> xMetaData = xCon.is() ? xCon->getMetaData() : Reference< XDatabaseMetaData>(); - ::comphelper::UStringMixEqual bCase(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : sal_True); + ::comphelper::UStringMixEqual bCase(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : true); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_pRowList->begin(); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_pRowList->end(); diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index e01e065..6cdbbde 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -918,7 +918,7 @@ bool OTableController::checkColumns(bool _bNew) Reference< XDatabaseMetaData > xMetaData = getMetaData( ); DatabaseMetaData aMetaData( getConnection() ); - ::comphelper::UStringMixEqual bCase(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : sal_True); + ::comphelper::UStringMixEqual bCase(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : true); ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = m_vRowList.begin(); ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aEnd = m_vRowList.end(); for(;aIter != aEnd;++aIter) @@ -1001,7 +1001,7 @@ void OTableController::alterColumns() // contains all columns names which are already handled those which are not in the list will be deleted Reference< XDatabaseMetaData> xMetaData = getMetaData( ); - ::std::map< OUString,sal_Bool,::comphelper::UStringMixLess> aColumns(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : sal_True); + ::std::map< OUString,sal_Bool,::comphelper::UStringMixLess> aColumns(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : true); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_vRowList.begin(); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_vRowList.end(); // first look for columns where something other than the name changed @@ -1465,7 +1465,7 @@ OUString OTableController::createUniqueName(const OUString& _rName) OUString sName = _rName; Reference< XDatabaseMetaData> xMetaData = getMetaData( ); - ::comphelper::UStringMixEqual bCase(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : sal_True); + ::comphelper::UStringMixEqual bCase(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : true); ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = m_vRowList.begin(); ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aEnd = m_vRowList.end(); diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 9196259..cecd780 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -403,7 +403,7 @@ namespace drawinglayer // define various other FontAttribute aRetval.SetAlign(ALIGN_BASELINE); aRetval.SetCharSet(rFontAttribute.getSymbol() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE); - aRetval.SetVertical(rFontAttribute.getVertical() ? sal_True : sal_False); + aRetval.SetVertical(rFontAttribute.getVertical() ? true : false); aRetval.SetWeight(static_cast<FontWeight>(rFontAttribute.getWeight())); aRetval.SetItalic(rFontAttribute.getItalic() ? ITALIC_NORMAL : ITALIC_NONE); aRetval.SetOutline(rFontAttribute.getOutline()); diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 4d67332..5ca790b82 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -3085,7 +3085,7 @@ SvStream& EditEngineItemPool::Store( SvStream& rStream ) const long nVersion = rStream.GetVersion(); bool b31Format = ( nVersion && ( nVersion <= SOFFICE_FILEFORMAT_31 ) ) - ? sal_True : sal_False; + ? true : false; EditEngineItemPool* pThis = const_cast<EditEngineItemPool*>(this); if ( b31Format ) diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 61e8a34..bfc2df2 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -70,12 +70,12 @@ struct EPaM inline bool EPaM::operator < ( const EPaM& r ) const { return ( ( nPara < r.nPara ) || - ( ( nPara == r.nPara ) && nIndex < r.nIndex ) ) ? sal_True : sal_False; + ( ( nPara == r.nPara ) && nIndex < r.nIndex ) ) ? true : false; } inline bool EPaM::operator == ( const EPaM& r ) const { - return ( ( nPara == r.nPara ) && ( nIndex == r.nIndex ) ) ? sal_True : sal_False; + return ( ( nPara == r.nPara ) && ( nIndex == r.nIndex ) ) ? true : false; } struct ScriptTypePosInfo @@ -546,7 +546,7 @@ public: void SetInvalid() { bInvalid = true; } void SetValid() { bInvalid = false; } - bool IsEmpty() const { return (nEnd > nStart) ? sal_False : sal_True; } + bool IsEmpty() const { return (nEnd > nStart) ? false : true; } CharPosArrayType& GetCharPosArray() { return aPositions;} const CharPosArrayType& GetCharPosArray() const { return aPositions;} diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index e3ab1db..db79813 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -127,12 +127,12 @@ SvParserState EditRTFParser::CallParser() // Problem: Paragraph attributes may not possibly be taken over // => Do Character attributes. - bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True; + bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? false : true; if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() ) mpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() ); aCurSel.Min() = mpEditEngine->ConnectParagraphs( aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward ); - bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False; + bSpecialBackward = aEnd1PaM.GetNode()->Len() ? true : false; // when bOnlyOnePara, then the node is gone on Connect. if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() ) mpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() ); diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 118fc01..e8dd94a 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -945,7 +945,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16 unsigned char nCursorDir = CURSOR_DIRECTION_NONE; if ( IsInsertMode() && !aEditSelection.HasRange() && ( pEditEngine->pImpEditEngine->HasDifferentRTLLevels( aPaM.GetNode() ) ) ) { - sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, nShowCursorFlags & GETCRSR_PREFERPORTIONSTART ? sal_True : sal_False ); + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, nShowCursorFlags & GETCRSR_PREFERPORTIONSTART ? true : false ); const TextPortion* pTextPortion = pParaPortion->GetTextPortions()[nTextPortion]; sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft(); if ( nRTLLevel%2 ) @@ -1556,7 +1556,7 @@ bool ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) SetEditSelection( aNewEditSelection ); } - bool bForceCursor = ( pDragAndDropInfo ? sal_False : sal_True ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); + bool bForceCursor = ( pDragAndDropInfo ? false : true ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); ShowCursor( bGotoCursor, bForceCursor ); return true; } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 45dc28a..328f622 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -525,7 +525,7 @@ private: void InsertUndo( EditUndo* pUndo, bool bTryMerge = false ); void ResetUndoManager(); - bool HasUndoManager() const { return pUndoManager ? sal_True : sal_False; } + bool HasUndoManager() const { return pUndoManager ? true : false; } EditUndoSetAttribs* CreateAttribUndo( EditSelection aSel, const SfxItemSet& rSet ); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index b0593cd..1de08af 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -763,7 +763,7 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE KeyEvent aTranslatedKeyEvent = rKeyEvent.LogicalTextDirectionality( eTextDirection ); - bool bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? sal_True : sal_False; + bool bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? true : false; sal_uInt16 nCode = aTranslatedKeyEvent.GetKeyCode().GetCode(); if ( DoVisualCursorTraveling( aPaM.GetNode() ) ) @@ -954,7 +954,7 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& sal_Int32 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, true ); const TextPortion* pTextPortion = pParaPortion->GetTextPortions()[nTextPortion]; sal_Int32 nRTLLevel = pTextPortion->GetRightToLeft(); - bool bPortionRTL = (nRTLLevel%2) ? sal_True : sal_False; + bool bPortionRTL = (nRTLLevel%2) ? true : false; if ( bStart ) { @@ -1026,7 +1026,7 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM if ( bPortionBoundary && aPaM.GetIndex() && ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) { sal_Int32 nTmp; - sal_Int32 nNextTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex()+1, nTmp, bLogicalBackward ? sal_False : sal_True ); + sal_Int32 nNextTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex()+1, nTmp, bLogicalBackward ? false : true ); const TextPortion* pNextTextPortion = pParaPortion->GetTextPortions()[nNextTextPortion]; nRTLLevelNextPortion = pNextTextPortion->GetRightToLeft(); } @@ -2374,7 +2374,7 @@ EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, sal_uInt8 n // Decide now if to delete selection (RESTOFCONTENTS) bool bSpecialBackward = ( ( nMode == DEL_LEFT ) && ( nDelMode == DELMODE_SIMPLE ) ) - ? sal_True : sal_False; + ? true : false; if ( aStatus.IsAnyOutliner() ) bSpecialBackward = false; @@ -2550,7 +2550,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel, EditPaM aPaM( rCurSel.Min() ); bool bDoOverwrite = ( bOverwrite && - ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) ? sal_True : sal_False; + ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) ? true : false; bool bUndoAction = ( rCurSel.HasRange() || bDoOverwrite ); @@ -2626,7 +2626,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel, if ( IsUndoEnabled() && !IsInUndo() ) { EditUndoInsertChars* pNewUndo = new EditUndoInsertChars(pEditEngine, CreateEPaM(aPaM), OUString(c)); - bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? sal_True : sal_False; + bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? true : false; InsertUndo( pNewUndo, bTryMerge ); } @@ -4151,7 +4151,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, if (nLineCount == 0) return Rectangle(); const EditLine* pLine = NULL; - bool bEOL = ( nFlags & GETCRSR_ENDOFLINE ) ? sal_True : sal_False; + bool bEOL = ( nFlags & GETCRSR_ENDOFLINE ) ? true : false; for (sal_Int32 nLine = 0; nLine < nLineCount; ++nLine) { const EditLine* pTmpLine = pPortion->GetLines()[nLine]; @@ -4199,7 +4199,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, } else { - nX = GetXPos( pPortion, pLine, nIndex, ( nFlags & GETCRSR_PREFERPORTIONSTART ) ? sal_True : sal_False ); + nX = GetXPos( pPortion, pLine, nIndex, ( nFlags & GETCRSR_PREFERPORTIONSTART ) ? true : false ); } aEditCursor.Left() = aEditCursor.Right() = nX; diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index eb9f2eb..0cc0826 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1818,7 +1818,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te nBreakPos++; } - bHangingPunctuation = ( nBreakPos > nMaxBreakPos ) ? sal_True : sal_False; + bHangingPunctuation = ( nBreakPos > nMaxBreakPos ) ? true : false; pLine->SetHangingPunctuation( bHangingPunctuation ); // Whether a separator or not, push the word after the separator through @@ -2526,7 +2526,7 @@ void ImpEditEngine::SetVertical( bool bVertical ) if ( IsVertical() != bVertical ) { GetEditDoc().SetVertical( bVertical ); - bool bUseCharAttribs = ( aStatus.GetControlWord() & EEControlBits::USECHARATTRIBS ) ? sal_True : sal_False; + bool bUseCharAttribs = ( aStatus.GetControlWord() & EEControlBits::USECHARATTRIBS ) ? true : false; GetEditDoc().CreateDefFont( bUseCharAttribs ); if ( IsFormatted() ) { @@ -4327,7 +4327,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara, short nScriptType = GetI18NScriptType( EditPaM( pNode, nIndex+1 ) ); bCTL = nScriptType == i18n::ScriptType::COMPLEX; // this change was discussed in issue 37190 - bR2L = (GetRightToLeft( nPara, nIndex + 1) % 2) ? sal_True : sal_False; + bR2L = (GetRightToLeft( nPara, nIndex + 1) % 2) ? true : false; // it also works for issue 55927 } diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 6067a90..5effa6e 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -270,7 +270,7 @@ bool ImpEditEngine::WriteItemListAsRTF( ItemList& rLst, SvStream& rOutput, sal_I WriteItemAsRTF( *pAttrItem, rOutput, nPara, nPos,rFontTable, rColorList ); pAttrItem = rLst.Next(); } - return ( rLst.Count() ? sal_True : sal_False ); + return ( rLst.Count() ? true : false ); } static void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_Int32 nIndex, sal_uInt16 nScriptType ) @@ -1031,7 +1031,7 @@ EditTextObject* ImpEditEngine::CreateTextObject( EditSelection aSel, SfxItemPool bool bOnlyFullParagraphs = ( aSel.Min().GetIndex() || ( aSel.Max().GetIndex() < aSel.Max().GetNode()->Len() ) ) ? - sal_False : sal_True; + false : true; // Templates are not saved! // (Only the name and family, template itself must be in App!) @@ -1053,7 +1053,7 @@ EditTextObject* ImpEditEngine::CreateTextObject( EditSelection aSel, SfxItemPool sal_Int32 nStartPos = 0; sal_Int32 nEndPos = pNode->Len(); - bool bEmptyPara = nEndPos ? sal_False : sal_True; + bool bEmptyPara = nEndPos ? false : true; if ( ( nNode == nStartNode ) && !bOnlyFullParagraphs ) nStartPos = aSel.Min().GetIndex(); @@ -1233,7 +1233,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject for (sal_Int32 n = 0; n < nContents; ++n, ++nPara) { const ContentInfo* pC = &rTextObject.mpImpl->GetContents()[n]; - bool bNewContent = aPaM.GetNode()->Len() ? sal_False: sal_True; + bool bNewContent = aPaM.GetNode()->Len() ? false: true; const sal_Int32 nStartPos = aPaM.GetIndex(); aPaM = ImpFastInsertText( aPaM, pC->GetText() ); @@ -1243,7 +1243,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject pPortion->MarkInvalid( nStartPos, pC->GetText().getLength() ); // Character attributes ... - bool bAllreadyHasAttribs = aPaM.GetNode()->GetCharAttribs().Count() ? sal_True : sal_False; + bool bAllreadyHasAttribs = aPaM.GetNode()->GetCharAttribs().Count() ? true : false; size_t nNewAttribs = pC->GetAttribs().size(); if ( nNewAttribs ) { @@ -1302,7 +1302,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject { // only style and ParaAttribs when new paragraph, or // completely internal ... - bParaAttribs = pC->GetParaAttribs().Count() ? sal_True : sal_False; + bParaAttribs = pC->GetParaAttribs().Count() ? true : false; if ( GetStyleSheetPool() && pC->GetStyle().getLength() ) { SfxStyleSheet* pStyle = static_cast<SfxStyleSheet*>(GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() )); diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index b064667..f02266a 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -127,7 +127,7 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) const sal_Size nOldPos = rStrm.Tell(); // Ignore Errorcode when reading Bitmap, // see comment in SvxBulletItem::Store() - bool bOldError = rStrm.GetError() ? sal_True : sal_False; + bool bOldError = rStrm.GetError() ? true : false; ReadDIB(aBmp, rStrm, true); if ( !bOldError && rStrm.GetError() ) diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx index 579c7ae..398c8aa 100644 --- a/editeng/source/items/paperinf.cxx +++ b/editeng/source/items/paperinf.cxx @@ -29,7 +29,7 @@ inline bool IsValidPrinter( const Printer* pPtr ) { - return pPtr->GetName().isEmpty() ? sal_False : sal_True; + return pPtr->GetName().isEmpty() ? false : true; } diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 2f9ed16..2f826de 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -100,7 +100,7 @@ bool SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const && nPropLineSpace == rLineSpace.nPropLineSpace) || (eInterLineSpace == SVX_INTER_LINE_SPACE_FIX && (nInterLineSpace == rLineSpace.nInterLineSpace)))) ? - 1 : 0; + true : false; } /* Who does still know why the LineSpacingItem is so complicated? diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index 6d7d67d..6293cbb 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -257,7 +257,7 @@ void SvxBoundArgs::NoteRange( bool bToggle ) DBG_ASSERT( nCount == 2 * aBoolArr.size(), "NoteRange: Incompatible Sizes" ); while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin ) ++nIdx; - bool bOdd = (nIdx % 2) ? sal_True : sal_False; + bool bOdd = (nIdx % 2) ? true : false; // No overlap with existing intervals? if( nIdx == nCount || ( !bOdd && nMax < (*pLongArr)[ nIdx ] ) ) { // Then a new one is inserted ... diff --git a/editeng/source/outliner/paralist.cxx b/editeng/source/outliner/paralist.cxx index d4a9e13f..5766433 100644 --- a/editeng/source/outliner/paralist.cxx +++ b/editeng/source/outliner/paralist.cxx @@ -166,21 +166,21 @@ bool ParagraphList::HasChildren( Paragraph* pParagraph ) const { sal_Int32 n = GetAbsPos( pParagraph ); Paragraph* pNext = GetParagraph( ++n ); - return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) ) ? sal_True : sal_False; + return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) ) ? true : false; } bool ParagraphList::HasHiddenChildren( Paragraph* pParagraph ) const { sal_Int32 n = GetAbsPos( pParagraph ); Paragraph* pNext = GetParagraph( ++n ); - return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && !pNext->IsVisible() ) ? sal_True : sal_False; + return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && !pNext->IsVisible() ) ? true : false; } bool ParagraphList::HasVisibleChildren( Paragraph* pParagraph ) const { sal_Int32 n = GetAbsPos( pParagraph ); Paragraph* pNext = GetParagraph( ++n ); - return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && pNext->IsVisible() ) ? sal_True : sal_False; + return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && pNext->IsVisible() ) ? true : false; } sal_Int32 ParagraphList::GetChildCount( Paragraph* pParent ) const diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx index d39d52c..b79159c 100644 --- a/extensions/source/plugin/inc/plugin/impl.hxx +++ b/extensions/source/plugin/inc/plugin/impl.hxx @@ -202,7 +202,7 @@ public: void enterPluginCallback() { m_nCalledFromPlugin++; } void leavePluginCallback() { m_nCalledFromPlugin--; } - bool isDisposable() { return m_nCalledFromPlugin < 1 ? sal_True : sal_False; } + bool isDisposable() { return m_nCalledFromPlugin < 1 ? true : false; } DECL_LINK( secondLevelDispose, XPlugin_Impl* ); void addPluginEventListener( PluginEventListener* pListener ) diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 023aa85..29db0ac 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -907,7 +907,7 @@ int Sane::GetRange( int n, double*& rpDouble ) rpDouble = 0; int nItems, i; - bool bIsFixed = mppOptions[n]->type == SANE_TYPE_FIXED ? sal_True : sal_False; + bool bIsFixed = mppOptions[n]->type == SANE_TYPE_FIXED ? true : false; dbg_msg( "Sane::GetRange of option %s ", mppOptions[n]->name ); if(mppOptions[n]->constraint_type == SANE_CONSTRAINT_RANGE ) diff --git a/extensions/source/scanner/sane.hxx b/extensions/source/scanner/sane.hxx index 0a5a432..f94402d 100644 --- a/extensions/source/scanner/sane.hxx +++ b/extensions/source/scanner/sane.hxx @@ -112,9 +112,9 @@ public: ~Sane(); static bool IsSane() - { return pSaneLib ? sal_True : sal_False; } + { return pSaneLib ? true : false; } bool IsOpen() - { return maHandle ? sal_True : sal_False; } + { return maHandle ? true : false; } static int CountDevices() { return nDevices; } static OUString GetName( int n ) diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 9a4e50c..84c00c2 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -490,7 +490,7 @@ void SaneDlg::InitFields() OUString aOption=mrSane.GetOptionName( i ); bool bInsertAdvanced = mrSane.GetOptionCap( i ) & SANE_CAP_ADVANCED && - ! mpAdvancedBox->IsChecked() ? sal_False : sal_True; + ! mpAdvancedBox->IsChecked() ? false : true; if( mrSane.GetOptionType( i ) == SANE_TYPE_GROUP ) { if( bInsertAdvanced ) diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index a3a3a5b..fdf5806 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -967,14 +967,14 @@ void EscherPropertyContainer::CreateLineProperties( bSwapLineEnds = true; } } - if ( GetLineArrow( bSwapLineEnds ? sal_False : sal_True, rXPropSet, eLineEnd, nArrowLength, nArrowWidth ) ) + if ( GetLineArrow( bSwapLineEnds ? false : true, rXPropSet, eLineEnd, nArrowLength, nArrowWidth ) ) { AddOpt( ESCHER_Prop_lineStartArrowLength, nArrowLength ); AddOpt( ESCHER_Prop_lineStartArrowWidth, nArrowWidth ); AddOpt( ESCHER_Prop_lineStartArrowhead, eLineEnd ); nLineFlags |= 0x100010; } - if ( GetLineArrow( bSwapLineEnds ? sal_True : sal_False, rXPropSet, eLineEnd, nArrowLength, nArrowWidth ) ) + if ( GetLineArrow( bSwapLineEnds ? true : false, rXPropSet, eLineEnd, nArrowLength, nArrowWidth ) ) { AddOpt( ESCHER_Prop_lineEndArrowLength, nArrowLength ); AddOpt( ESCHER_Prop_lineEndArrowWidth, nArrowWidth ); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index c1be035..3f99bf1 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1508,7 +1508,7 @@ void DffPropertyReader::ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const rSet.Put( makeSdrTextUpperDistItem( nTextTop ) ); rSet.Put( makeSdrTextLowerDistItem( nTextBottom ) ); - rSet.Put( makeSdrTextWordWrapItem( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone ? sal_True : sal_False ) ); + rSet.Put( makeSdrTextWordWrapItem( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone ? true : false ) ); rSet.Put( makeSdrTextAutoGrowHeightItem( ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) != 0 ) ); } @@ -5992,7 +5992,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt, // Can the shape be replaced with a frame? // (provided that it is a TextBox and the text is not rotated) - bool bCanBeReplaced = (ULONG_MAX > nPosGroup) ? sal_False : sal_True; + bool bCanBeReplaced = (ULONG_MAX > nPosGroup) ? false : true; // we don't know yet whether it's a TextBox MSO_SPT eShapeType = mso_sptNil; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index c47f9d5..823a583 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -3671,7 +3671,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx break; } } - return ( nHardCount ) ? sal_True : sal_False; + return ( nHardCount ) ? true : false; } void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, sal_uInt32 /*nLevel*/) diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 64224bd..00fd14d 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -885,7 +885,7 @@ void ImpPDFTabOpnFtrPage::GetFilterConfigItem( ImpPDFTabDialog* paParent ) else if( mpRbPgLyContinueFacing->IsChecked() ) paParent->mnPageLayout = 3; - paParent->mbFirstPageLeft = ( mbUseCTLFont ) ? mpCbPgLyFirstOnLeft->IsChecked() : sal_False; + paParent->mbFirstPageLeft = ( mbUseCTLFont ) ? mpCbPgLyFirstOnLeft->IsChecked() : false; } diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 7ed8a0a..049b6fc 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -341,8 +341,8 @@ SVGExport::SVGExport( const char* pSVGDisableFontEmbedding = getenv( "SVG_DISABLE_FONT_EMBEDDING" ); OUString aEmbedFontEnv("${SVG_DISABLE_FONT_EMBEDDING}"); rtl::Bootstrap::expandMacros(aEmbedFontEnv); - mbIsEmbedFonts=pSVGDisableFontEmbedding ? sal_False : ( - aEmbedFontEnv.getLength() ? sal_False : sal_True); + mbIsEmbedFonts=pSVGDisableFontEmbedding ? false : ( + aEmbedFontEnv.getLength() ? false : true); } else { @@ -351,7 +351,7 @@ SVGExport::SVGExport( } // Native Decoration - mbIsUseNativeTextDecoration = mbIsUseTinyProfile ? sal_False : aFilterDataHashMap.getUnpackedValueOrDefault(SVG_PROP_NATIVEDECORATION, false); + mbIsUseNativeTextDecoration = mbIsUseTinyProfile ? false : aFilterDataHashMap.getUnpackedValueOrDefault(SVG_PROP_NATIVEDECORATION, false); // Tiny Opacity (supported from SVG Tiny 1.2) mbIsUseOpacity = aFilterDataHashMap.getUnpackedValueOrDefault(SVG_PROP_OPACITY, true); diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx index acc4c37..e5a712e 100644 --- a/forms/source/component/navigationbar.cxx +++ b/forms/source/component/navigationbar.cxx @@ -310,12 +310,12 @@ namespace frm // our boolean flags sal_Int32 nFlags = _rxInStream->readLong( ); - m_bEnabled = ( nFlags & PERSIST_ENABLED ) ? sal_True : sal_False; + m_bEnabled = ( nFlags & PERSIST_ENABLED ) ? true : false; m_nIconSize = ( nFlags & PERSIST_LARGEICONS ) ? 1 : 0; - m_bShowPosition = ( nFlags & PERSIST_SHOW_POSITION ) ? sal_True : sal_False; - m_bShowNavigation = ( nFlags & PERSIST_SHOW_NAVIGATION ) ? sal_True : sal_False; - m_bShowActions = ( nFlags & PERSIST_SHOW_ACTIONS ) ? sal_True : sal_False; - m_bShowFilterSort = ( nFlags & PERSIST_SHOW_FILTERSORT ) ? sal_True : sal_False; + m_bShowPosition = ( nFlags & PERSIST_SHOW_POSITION ) ? true : false; + m_bShowNavigation = ( nFlags & PERSIST_SHOW_NAVIGATION ) ? true : false; + m_bShowActions = ( nFlags & PERSIST_SHOW_ACTIONS ) ? true : false; + m_bShowFilterSort = ( nFlags & PERSIST_SHOW_FILTERSORT ) ? true : false; // our strings m_sHelpText = _rxInStream->readUTF( ); diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 845791a..5981cb3 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1906,7 +1906,7 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,Menu* pAddonMenu,boo if ( pPopupMenu ) { Reference< XDispatchProvider > xDispatchProvider; - MenuBarManager* pSubMenuManager = new MenuBarManager( m_xContext, rFrame, m_xURLTransformer,xDispatchProvider, aModuleIdentifier, pPopupMenu, _bHandlePopUp ? sal_False : bDeleteChildren, _bHandlePopUp ? sal_False : bDeleteChildren ); + MenuBarManager* pSubMenuManager = new MenuBarManager( m_xContext, rFrame, m_xURLTransformer,xDispatchProvider, aModuleIdentifier, pPopupMenu, _bHandlePopUp ? false : bDeleteChildren, _bHandlePopUp ? false : bDeleteChildren ); Reference< XStatusListener > xSubMenuManager( static_cast< OWeakObject *>( pSubMenuManager ), UNO_QUERY ); diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 4ab8cd2..e49e28b 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -1071,7 +1071,7 @@ bool SAL_CALL LocaleDataImpl::isPhonetic( const Locale& rLocale, const OUString& algorithm ) throw(RuntimeException) { sal_Unicode **indexArray = getIndexArrayForAlgorithm(rLocale, algorithm); - return (indexArray && indexArray[4][0]) ? sal_True : sal_False; + return (indexArray && indexArray[4][0]) ? true : false; } OUString SAL_CALL diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index e799444..6eba84d 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -69,8 +69,8 @@ SvStream& operator >> (SvStream & rStm, SvBOOL & rb ) { sal_uInt8 n; rStm.ReadUChar( n ); - rb.nVal = (n & 0x01) ? sal_True : sal_False; - rb.bSet = (n & 0x02) ? sal_True : sal_False; + rb.nVal = (n & 0x01) ? true : false; + rb.bSet = (n & 0x02) ? true : false; if( n & ~0x03 ) { rStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx index f076f95..75265b9 100644 --- a/idlc/source/astexpression.cxx +++ b/idlc/source/astexpression.cxx @@ -799,34 +799,34 @@ bool AstExpression::operator==(AstExpression *pExpr) switch (m_exprValue->et) { case ET_short: - bRet = (m_exprValue->u.sval == pExpr->getExprValue()->u.sval) ? sal_True : sal_False; + bRet = (m_exprValue->u.sval == pExpr->getExprValue()->u.sval) ? true : false; break; case ET_ushort: - bRet = (m_exprValue->u.usval == pExpr->getExprValue()->u.usval) ? sal_True : sal_False; + bRet = (m_exprValue->u.usval == pExpr->getExprValue()->u.usval) ? true : false; break; case ET_long: - bRet = (m_exprValue->u.lval == pExpr->getExprValue()->u.lval) ? sal_True : sal_False; + bRet = (m_exprValue->u.lval == pExpr->getExprValue()->u.lval) ? true : false; break; case ET_ulong: - bRet = (m_exprValue->u.ulval == pExpr->getExprValue()->u.ulval) ? sal_True : sal_False; + bRet = (m_exprValue->u.ulval == pExpr->getExprValue()->u.ulval) ? true : false; break; case ET_hyper: - bRet = (m_exprValue->u.hval == pExpr->getExprValue()->u.hval) ? sal_True : sal_False; + bRet = (m_exprValue->u.hval == pExpr->getExprValue()->u.hval) ? true : false; break; case ET_uhyper: - bRet = (m_exprValue->u.uhval == pExpr->getExprValue()->u.uhval) ? sal_True : sal_False; + bRet = (m_exprValue->u.uhval == pExpr->getExprValue()->u.uhval) ? true : false; break; case ET_float: - bRet = (m_exprValue->u.fval == pExpr->getExprValue()->u.fval) ? sal_True : sal_False; + bRet = (m_exprValue->u.fval == pExpr->getExprValue()->u.fval) ? true : false; break; case ET_double: - bRet = (m_exprValue->u.dval == pExpr->getExprValue()->u.dval) ? sal_True : sal_False; + bRet = (m_exprValue->u.dval == pExpr->getExprValue()->u.dval) ? true : false; break; case ET_byte: - bRet = (m_exprValue->u.byval == pExpr->getExprValue()->u.byval) ? sal_True : sal_False; + bRet = (m_exprValue->u.byval == pExpr->getExprValue()->u.byval) ? true : false; break; case ET_boolean: - bRet = (m_exprValue->u.lval == pExpr->getExprValue()->u.lval) ? sal_True : sal_False; + bRet = (m_exprValue->u.lval == pExpr->getExprValue()->u.lval) ? true : false; break; default: OSL_ASSERT(false); @@ -851,34 +851,34 @@ bool AstExpression::compare(AstExpression *pExpr) switch (m_exprValue->et) { case ET_short: - bRet = (m_exprValue->u.sval == pExpr->getExprValue()->u.sval) ? sal_True : sal_False; + bRet = (m_exprValue->u.sval == pExpr->getExprValue()->u.sval) ? true : false; break; case ET_ushort: - bRet = (m_exprValue->u.usval == pExpr->getExprValue()->u.usval) ? sal_True : sal_False; + bRet = (m_exprValue->u.usval == pExpr->getExprValue()->u.usval) ? true : false; break; case ET_long: - bRet = (m_exprValue->u.lval == pExpr->getExprValue()->u.lval) ? sal_True : sal_False; + bRet = (m_exprValue->u.lval == pExpr->getExprValue()->u.lval) ? true : false; break; case ET_ulong: - bRet = (m_exprValue->u.ulval == pExpr->getExprValue()->u.ulval) ? sal_True : sal_False; + bRet = (m_exprValue->u.ulval == pExpr->getExprValue()->u.ulval) ? true : false; break; case ET_hyper: - bRet = (m_exprValue->u.hval == pExpr->getExprValue()->u.hval) ? sal_True : sal_False; + bRet = (m_exprValue->u.hval == pExpr->getExprValue()->u.hval) ? true : false; break; case ET_uhyper: - bRet = (m_exprValue->u.uhval == pExpr->getExprValue()->u.uhval) ? sal_True : sal_False; + bRet = (m_exprValue->u.uhval == pExpr->getExprValue()->u.uhval) ? true : false; break; case ET_float: - bRet = (m_exprValue->u.fval == pExpr->getExprValue()->u.fval) ? sal_True : sal_False; + bRet = (m_exprValue->u.fval == pExpr->getExprValue()->u.fval) ? true : false; break; case ET_double: - bRet = (m_exprValue->u.dval == pExpr->getExprValue()->u.dval) ? sal_True : sal_False; + bRet = (m_exprValue->u.dval == pExpr->getExprValue()->u.dval) ? true : false; break; case ET_byte: - bRet = (m_exprValue->u.byval == pExpr->getExprValue()->u.byval) ? sal_True : sal_False; + bRet = (m_exprValue->u.byval == pExpr->getExprValue()->u.byval) ? true : false; break; case ET_boolean: - bRet = (m_exprValue->u.lval == pExpr->getExprValue()->u.lval) ? sal_True : sal_False; + bRet = (m_exprValue->u.lval == pExpr->getExprValue()->u.lval) ? true : false; break; default: OSL_ASSERT(false); diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx index e1f0ab2..93b2a74 100644 --- a/include/editeng/svxacorr.hxx +++ b/include/editeng/svxacorr.hxx @@ -329,7 +329,7 @@ public: long GetFlags() const { return nFlags; } inline SvxSwAutoFmtFlags& GetSwFlags() { return aSwFlags;} bool IsAutoCorrFlag( long nFlag ) const - { return nFlags & nFlag ? sal_True : sal_False; } + { return nFlags & nFlag ? true : false; } void SetAutoCorrFlag( long nFlag, bool bOn = true ); // Load, Set, Get - the replacement list diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index 480f29c..2202947 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -588,7 +588,7 @@ protected: SdrPage* MakeBlancPage(bool bMaster) const; bool ReadFontCollection(); bool ForceFontCollection() const - { return pFonts!=NULL?sal_True:const_cast<SdrPowerPointImport*>(this)->ReadFontCollection(); } + { return pFonts!=NULL?true:const_cast<SdrPowerPointImport*>(this)->ReadFontCollection(); } PptSlidePersistList* GetPageList(PptPageKind ePageKind) const; sal_uInt32 GetAktPageId(); sal_uInt32 GetMasterPageId(sal_uInt16 nPageNum, PptPageKind ePageKind) const; diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx index 8cd389c..4f2db5a 100644 --- a/include/svx/graphctl.hxx +++ b/include/svx/graphctl.hxx @@ -104,7 +104,7 @@ public: SdrModel* GetSdrModel() const { return pModel; } SdrView* GetSdrView() const { return pView; } SdrObject* GetSelectedSdrObject() const; - bool IsChanged() const { return bSdrMode ? pModel->IsChanged() : sal_False; } + bool IsChanged() const { return bSdrMode ? pModel->IsChanged() : false; } void SetMousePosLink( const Link& rLink ) { aMousePosLink = rLink; } const Link& GetMousePosLink() const { return aMousePosLink; } diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx index c5564e7..cabff6b 100644 --- a/include/tools/bigint.hxx +++ b/include/tools/bigint.hxx @@ -114,7 +114,7 @@ public: operator sal_uInt16() const; operator sal_uIntPtr() const; - void Set( bool bSet ) { bIsSet = bSet ? sal_True : sal_False; } + void Set( bool bSet ) { bIsSet = bSet ? true : false; } bool IsSet() const { return (bool)bIsSet; } bool IsNeg() const; diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx index f2f2ae0..54ba4d0 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx @@ -94,7 +94,7 @@ bool SunVersion::init(const char *szVersion) (nPart < 2 && *pCur == '.') ) && ( //prevent 1.4.0. 1.4.0- - pCur + 1 == pEnd ? isdigit(*(pCur)) : 1) ) + pCur + 1 == pEnd ? isdigit(*(pCur)) : true) ) { int len = pCur - pLast; if (len >= 127) diff --git a/lotuswordpro/source/filter/lwpdivinfo.hxx b/lotuswordpro/source/filter/lwpdivinfo.hxx index f99d807..cb073d7 100644 --- a/lotuswordpro/source/filter/lwpdivinfo.hxx +++ b/lotuswordpro/source/filter/lwpdivinfo.hxx @@ -139,7 +139,7 @@ private: inline bool LwpDivInfo::HasContents() { - return (m_nFlags & DI_HASCONTENTS) ? sal_True : sal_False; + return (m_nFlags & DI_HASCONTENTS) ? true : false; } inline bool LwpDivInfo::IsOleDivision() @@ -152,7 +152,7 @@ inline bool LwpDivInfo::IsOleDivision() inline bool LwpDivInfo::IsScrollable() { - return (m_nFlags & DI_SCROLLABLE) ? sal_True : sal_False; + return (m_nFlags & DI_SCROLLABLE) ? true : false; } inline bool LwpDivInfo::IsGotoable() diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index 14036a2..cc37eb4 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -109,7 +109,7 @@ void LwpVirtualLayout::Read() bool LwpVirtualLayout::MarginsSameAsParent() { - return m_nAttributes2 & STYLE2_MARGINSSAMEASPARENT ? sal_True : sal_False; + return m_nAttributes2 & STYLE2_MARGINSSAMEASPARENT ? true : false; } /** @@ -218,7 +218,7 @@ bool LwpVirtualLayout::HasProtection() */ bool LwpVirtualLayout::IsComplex() { - return m_nAttributes & STYLE_COMPLEX ? sal_True : sal_False; + return m_nAttributes & STYLE_COMPLEX ? true : false; } /** @@ -1054,7 +1054,7 @@ bool LwpMiddleLayout::IsSizeRightToContainer() else if (m_BasedOnStyle.obj().is()) { LwpMiddleLayout * pLayout = dynamic_cast<LwpMiddleLayout *>(m_BasedOnStyle.obj().get()); - return pLayout ? pLayout->IsSizeRightToContainer() : sal_False; + return pLayout ? pLayout->IsSizeRightToContainer() : false; } else return false; @@ -1073,7 +1073,7 @@ bool LwpMiddleLayout::IsSizeRightToContent() else if (m_BasedOnStyle.obj().is()) { LwpMiddleLayout * pLayout = dynamic_cast<LwpMiddleLayout *>(m_BasedOnStyle.obj().get()); - return pLayout ? pLayout->IsSizeRightToContent() : sal_False; + return pLayout ? pLayout->IsSizeRightToContent() : false; } else return false; @@ -1161,12 +1161,12 @@ bool LwpMiddleLayout::IsAutoGrow() return m_nDirection & ((LAY_AUTOGROW << SHIFT_UP) | (LAY_AUTOGROW << SHIFT_DOWN) | (LAY_AUTOGROW << SHIFT_RIGHT) | (LAY_AUTOGROW << SHIFT_LEFT)) - ? sal_True : sal_False; + ? true : false; } else if( !m_BasedOnStyle.IsNull() ) { LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() ); - return pLay ? pLay->IsAutoGrow() : sal_False; + return pLay ? pLay->IsAutoGrow() : false; } return LwpVirtualLayout::IsAutoGrow(); } @@ -1179,12 +1179,12 @@ bool LwpMiddleLayout::IsAutoGrowDown() { if(m_nOverrideFlag & OVER_SIZE) { - return m_nDirection & (LAY_AUTOGROW << SHIFT_DOWN) ? sal_True : sal_False; + return m_nDirection & (LAY_AUTOGROW << SHIFT_DOWN) ? true : false; } else if( !m_BasedOnStyle.IsNull() ) { LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() ); - return pLay ? pLay->IsAutoGrowDown() : sal_False; + return pLay ? pLay->IsAutoGrowDown() : false; } return LwpVirtualLayout::IsAutoGrowDown(); } @@ -1197,12 +1197,12 @@ bool LwpMiddleLayout::IsAutoGrowUp() { if(m_nOverrideFlag & OVER_SIZE) { - return m_nDirection & (LAY_AUTOGROW << SHIFT_UP) ? sal_True : sal_False; + return m_nDirection & (LAY_AUTOGROW << SHIFT_UP) ? true : false; } else if( !m_BasedOnStyle.IsNull() ) { LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() ); - return pLay ? pLay->IsAutoGrowUp() : sal_False; + return pLay ? pLay->IsAutoGrowUp() : false; } return LwpVirtualLayout::IsAutoGrowUp(); } @@ -1215,7 +1215,7 @@ bool LwpMiddleLayout::IsAutoGrowLeft() { if(m_nOverrideFlag & OVER_SIZE) { - return m_nDirection & (LAY_AUTOGROW << SHIFT_LEFT) ? sal_True : sal_False; + return m_nDirection & (LAY_AUTOGROW << SHIFT_LEFT) ? true : false; } else if( !m_BasedOnStyle.IsNull() ) { @@ -1234,12 +1234,12 @@ bool LwpMiddleLayout::IsAutoGrowRight() { if(m_nOverrideFlag & OVER_SIZE) { - return m_nDirection & (LAY_AUTOGROW << SHIFT_RIGHT) ? sal_True : sal_False; + return m_nDirection & (LAY_AUTOGROW << SHIFT_RIGHT) ? true : false; } else if( !m_BasedOnStyle.IsNull() ) { LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() ); - return pLay ? pLay->IsAutoGrowRight() : sal_False; + return pLay ? pLay->IsAutoGrowRight() : false; } return LwpVirtualLayout::IsAutoGrowRight(); } @@ -1316,7 +1316,7 @@ bool LwpMiddleLayout::IsProtected() else if( !m_BasedOnStyle.IsNull() ) { LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() ); - bProtected = pLay ? pLay->IsProtected() : sal_False; + bProtected = pLay ? pLay->IsProtected() : false; } else bProtected = LwpVirtualLayout::IsProtected(); @@ -1442,7 +1442,7 @@ bool LwpMiddleLayout::GetUsePrinterSettings() else if( !m_BasedOnStyle.IsNull() ) { LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*> ( m_BasedOnStyle.obj().get() ); - return pLay ? pLay->GetUsePrinterSettings() : sal_False; + return pLay ? pLay->GetUsePrinterSettings() : false; } return false; } diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx index 50d7e9b..d1c2e5f 100644 --- a/lotuswordpro/source/filter/lwppara.cxx +++ b/lotuswordpro/source/filter/lwppara.cxx @@ -174,8 +174,8 @@ void LwpPara::Read() const int DISK_SIMPLE = 1; const int DISK_NOTIFY = 2; - Simple = (Flag & DISK_SIMPLE) ? sal_True : sal_False; - Notify = (Flag & DISK_NOTIFY) ? sal_True : sal_False; + Simple = (Flag & DISK_SIMPLE) ? true : false; + Notify = (Flag & DISK_NOTIFY) ? true : false; } if(!Simple) @@ -613,7 +613,7 @@ void LwpPara::RegisterStyle() * higher than our current level. */ // restart based on Outline level? - if (pNumbering && bLesser && (bHeading ? pNumbering->IsHeading() : sal_True)) + if (pNumbering && bLesser && (bHeading ? pNumbering->IsHeading() : true)) { if (nFoundLevel != 0xffff) { diff --git a/lotuswordpro/source/filter/lwptblcell.hxx b/lotuswordpro/source/filter/lwptblcell.hxx index 8c72b4e..ed66cf7 100644 --- a/lotuswordpro/source/filter/lwptblcell.hxx +++ b/lotuswordpro/source/filter/lwptblcell.hxx @@ -290,19 +290,19 @@ LwpRowColumnQualifier::LwpRowColumnQualifier() inline bool LwpRowColumnQualifier::IsAfter() { - return cFlags & REF_AFTER ? sal_True : sal_False; + return cFlags & REF_AFTER ? true : false; } inline bool LwpRowColumnQualifier::IsBad() { - return cFlags & REF_BAD ? sal_True : sal_False; + return cFlags & REF_BAD ? true : false; } inline bool LwpRowColumnQualifier::IsAbsolute() { - return cFlags & REF_ABSOLUTE ? sal_True : sal_False; + return cFlags & REF_ABSOLUTE ? true : false; } /** * @brief diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx index 2020e93..e209557 100644 --- a/lotuswordpro/source/filter/lwptoc.cxx +++ b/lotuswordpro/source/filter/lwptoc.cxx @@ -337,7 +337,7 @@ void LwpTocSuperLayout::AddSourceStyle(XFIndex* pToc, LwpTocLevelData * pLevel, bool LwpTocSuperLayout::GetRightAlignPageNumber(sal_uInt16 index) { if (index < MAX_LEVELS) - return (m_nFlags[index] & TS_RIGHTALIGN) ? sal_True : sal_False; + return (m_nFlags[index] & TS_RIGHTALIGN) ? true : false; return false; } /** @@ -348,7 +348,7 @@ bool LwpTocSuperLayout::GetRightAlignPageNumber(sal_uInt16 index) bool LwpTocSuperLayout::GetUsePageNumber(sal_uInt16 index) { if (index < MAX_LEVELS) - return (m_nFlags[index] & TS_PAGENUMBER) ? sal_True : sal_False; + return (m_nFlags[index] & TS_PAGENUMBER) ? true : false; return false; } /** diff --git a/lotuswordpro/source/filter/lwptoc.hxx b/lotuswordpro/source/filter/lwptoc.hxx index 8303143..84a859d 100644 --- a/lotuswordpro/source/filter/lwptoc.hxx +++ b/lotuswordpro/source/filter/lwptoc.hxx @@ -153,9 +153,9 @@ public: void RegisterStyle() SAL_OVERRIDE; virtual void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE; inline sal_uInt16 GetLevel(){return m_nLevel;} - inline bool GetUseText(){ return (m_nFlags & USETEXT) ? sal_True : sal_False;} + inline bool GetUseText(){ return (m_nFlags & USETEXT) ? true : false;} inline OUString GetSearchStyle(){return m_SearchName.str();} - inline bool GetUseLeadingText(){ return (m_nFlags & USENUMBER) ? sal_True : sal_False;} + inline bool GetUseLeadingText(){ return (m_nFlags & USENUMBER) ? true : false;} private: virtual ~LwpTocLevelData(); diff --git a/lotuswordpro/source/filter/lwptools.hxx b/lotuswordpro/source/filter/lwptools.hxx index f240214..584b418 100644 --- a/lotuswordpro/source/filter/lwptools.hxx +++ b/lotuswordpro/source/filter/lwptools.hxx @@ -135,11 +135,11 @@ inline sal_Int32 LwpTools::ConvertToUnits(const double& fInch) } inline bool LwpTools::IsOddNumber(sal_uInt16& nNumber) { - return (nNumber%2)? sal_True : sal_False; + return (nNumber%2)? true : false; } inline bool LwpTools::IsEvenNumber(sal_uInt16& nNumber) { - return (nNumber%2)? sal_False : sal_True; + return (nNumber%2)? false : true; } class BadSeek : public std::runtime_error diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx index 42df27d..50185a7 100644 --- a/mysqlc/source/mysqlc_connection.cxx +++ b/mysqlc/source/mysqlc_connection.cxx @@ -324,7 +324,7 @@ sal_Bool SAL_CALL OConnection::getAutoCommit() bool autoCommit = false; try { - autoCommit = m_settings.cppConnection->getAutoCommit() == true ? sal_True : sal_False; + autoCommit = m_settings.cppConnection->getAutoCommit() == true ? true : false; } catch (const sql::SQLException & e) { mysqlc_sdbc_driver::translateAndThrow(e, *this, getConnectionEncoding()); } diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx index 9aa9d93..c37cfbc 100644 --- a/mysqlc/source/mysqlc_databasemetadata.cxx +++ b/mysqlc/source/mysqlc_databasemetadata.cxx @@ -182,7 +182,7 @@ bool ODatabaseMetaData::impl_getBoolMetaData(const sal_Char* _methodName, bool ( OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); bool boolMetaData(false); try { - boolMetaData = (meta->*_Method)() ? sal_True : sal_False; + boolMetaData = (meta->*_Method)() ? true : false; } catch (const sql::MethodNotImplementedException &) { mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); } catch (const sql::InvalidArgumentException &) { @@ -198,7 +198,7 @@ bool ODatabaseMetaData::impl_getBoolMetaData(const sal_Char* _methodName, bool ( OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); bool boolMetaData(false); try { - boolMetaData = (meta->*_Method)( _arg ) ? sal_True : sal_False; + boolMetaData = (meta->*_Method)( _arg ) ? true : false; } catch (const sql::MethodNotImplementedException &) { mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); } catch (const sql::InvalidArgumentException &) { diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx b/mysqlc/source/mysqlc_preparedstatement.cxx index 6b68f6e..0de7c8f 100644 --- a/mysqlc/source/mysqlc_preparedstatement.cxx +++ b/mysqlc/source/mysqlc_preparedstatement.cxx @@ -179,7 +179,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute() bool success = false; try { - success = static_cast<sql::PreparedStatement *>(cppStatement)->execute()? sal_True:sal_False; + success = static_cast<sql::PreparedStatement *>(cppStatement)->execute()? true:false; } catch (const sql::SQLException &e) { mysqlc_sdbc_driver::translateAndThrow(e, *this, m_pConnection->getConnectionEncoding()); } diff --git a/mysqlc/source/mysqlc_statement.cxx b/mysqlc/source/mysqlc_statement.cxx index 209d31a..5590acf 100644 --- a/mysqlc/source/mysqlc_statement.cxx +++ b/mysqlc/source/mysqlc_statement.cxx @@ -158,7 +158,7 @@ sal_Bool SAL_CALL OCommonStatement::execute(const rtl::OUString& sql) bool success = false; try { - success = cppStatement->execute(rtl::OUStringToOString(sSqlStatement, m_pConnection->getConnectionSettings().encoding).getStr())? sal_True:sal_False; + success = cppStatement->execute(rtl::OUStringToOString(sSqlStatement, m_pConnection->getConnectionSettings().encoding).getStr())? true:false; } catch (const sql::SQLException &e) { mysqlc_sdbc_driver::translateAndThrow(e, *this, m_pConnection->getConnectionEncoding()); } diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx index c4fbcfa..b596b40 100644 --- a/package/source/zipapi/XUnbufferedStream.cxx +++ b/package/source/zipapi/XUnbufferedStream.cxx @@ -81,8 +81,8 @@ XUnbufferedStream::XUnbufferedStream( if (mnZipSize < 0) throw ZipIOException("The stream seems to be broken!"); - bool bHaveEncryptData = ( rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0 ) ? sal_True : sal_False; - bool bMustDecrypt = ( nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted ) ? sal_True : sal_False; + bool bHaveEncryptData = ( rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0 ) ? true : false; + bool bMustDecrypt = ( nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted ) ? true : false; if ( bMustDecrypt ) { diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 0676ce5..aaddc3a 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -525,7 +525,7 @@ bool ZipPackageStream::saveChild( pTempEntry->nPathLen = (sal_Int16)( OUStringToOString( pTempEntry->sPath, RTL_TEXTENCODING_UTF8 ).getLength() ); const bool bToBeEncrypted = m_bToBeEncrypted && (rEncryptionKey.getLength() || m_bHaveOwnKey); - const bool bToBeCompressed = bToBeEncrypted ? sal_True : m_bToBeCompressed; + const bool bToBeCompressed = bToBeEncrypted ? true : m_bToBeCompressed; aPropSet[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty; aPropSet[PKG_MNFST_MEDIATYPE].Value <<= GetMediaType( ); diff --git a/reportdesign/source/core/sdr/ReportUndoFactory.cxx b/reportdesign/source/core/sdr/ReportUndoFactory.cxx index 0c6617d..dd9ac74 100644 --- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx +++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx @@ -68,12 +68,12 @@ SdrUndoAction* OReportUndoFactory::CreateUndoGeoObject( SdrObject& rObject ) SdrUndoAction* OReportUndoFactory::CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText ) { - return m_pUndoFactory->CreateUndoAttrObject( rObject, bStyleSheet1 ? sal_True : sal_False, bSaveText ? sal_True : sal_False ); + return m_pUndoFactory->CreateUndoAttrObject( rObject, bStyleSheet1 ? true : false, bSaveText ? true : false ); } SdrUndoAction* OReportUndoFactory::CreateUndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect ) { - return m_pUndoFactory->CreateUndoRemoveObject( rObject, bOrdNumDirect ? sal_True : sal_False ); + return m_pUndoFactory->CreateUndoRemoveObject( rObject, bOrdNumDirect ? true : false ); } SdrUndoAction* OReportUndoFactory::CreateUndoInsertObject( SdrObject& rObject, bool /*bOrdNumDirect*/ ) @@ -93,7 +93,7 @@ SdrUndoAction* OReportUndoFactory::CreateUndoNewObject( SdrObject& rObject, bool SdrUndoAction* OReportUndoFactory::CreateUndoCopyObject( SdrObject& rObject, bool bOrdNumDirect ) { - return m_pUndoFactory->CreateUndoCopyObject( rObject, bOrdNumDirect ? sal_True : sal_False ); + return m_pUndoFactory->CreateUndoCopyObject( rObject, bOrdNumDirect ? true : false ); } SdrUndoAction* OReportUndoFactory::CreateUndoObjectOrdNum( SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1) @@ -103,7 +103,7 @@ SdrUndoAction* OReportUndoFactory::CreateUndoObjectOrdNum( SdrObject& rObject, s SdrUndoAction* OReportUndoFactory::CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect ) { - return m_pUndoFactory->CreateUndoReplaceObject( rOldObject, rNewObject, bOrdNumDirect ? sal_True : sal_False ); + return m_pUndoFactory->CreateUndoReplaceObject( rOldObject, rNewObject, bOrdNumDirect ? true : false ); } SdrUndoAction* OReportUndoFactory::CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer ) diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index 047bd1d..dbfcd9e 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -977,7 +977,7 @@ bool ScPageScaleToItem::operator==( const SfxPoolItem& rCmp ) const { assert(SfxPoolItem::operator==(rCmp)); const ScPageScaleToItem& rPageCmp = static_cast< const ScPageScaleToItem& >( rCmp ); - return ((mnWidth == rPageCmp.mnWidth) && (mnHeight == rPageCmp.mnHeight)) ? 1 : 0; + return ((mnWidth == rPageCmp.mnWidth) && (mnHeight == rPageCmp.mnHeight)) ? true : false; } namespace { diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index bbc73c9..9566050 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2416,7 +2416,7 @@ void ScPosWnd::DoEnter() SfxViewFrame* pViewFrm = pViewSh->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - SC_MOD()->SetRefDialog( nId, pWnd ? false : sal_True ); + SC_MOD()->SetRefDialog( nId, pWnd ? false : true ); } else { diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 5d52c71..605e3ea 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -812,7 +812,7 @@ bool ScValidationDlg::EnterRefStatus() if ( pWnd && pWnd->GetWindow()!= this ) pWnd = NULL; - SC_MOD()->SetRefDialog( nId, pWnd ? false : sal_True ); + SC_MOD()->SetRefDialog( nId, pWnd ? false : true ); return true; } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 2c84022..2af8c1a 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2126,7 +2126,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName ) { // default for no model is TRUE ScDrawLayer* pModel = rDoc.GetDrawLayer(); - bool bOpenInDesign = pModel ? pModel->GetOpenInDesignMode() : sal_True; + bool bOpenInDesign = pModel ? pModel->GetOpenInDesignMode() : true; ScUnoHelpFunctions::SetBoolInAny( aRet, bOpenInDesign ); } else if ( aString == SC_UNO_AUTOCONTFOC ) diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index d371e94..57cabd9 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -4848,7 +4848,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException, std::ex if( (thisAddress.StartRow == thisAddress.EndRow && thisAddress.EndRow == aOutlineAddress.EndRow ) || (thisAddress.StartColumn == thisAddress.EndColumn && thisAddress.EndColumn == aOutlineAddress.EndColumn )) { - bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? false:sal_True; + bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? false:true; ScDocument& rDoc = getDocumentFromRange( mxRange ); ScOutlineTable* pOutlineTable = rDoc.GetOutlineTable(static_cast<SCTAB>(thisAddress.Sheet), true); const ScOutlineArray& rOutlineArray = bColumn ? pOutlineTable->GetColArray(): pOutlineTable->GetRowArray(); diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 2fb91e4..0999e22 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -905,7 +905,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; @@ -915,7 +915,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; case SID_DESCRIPTIVE_STATISTICS_DIALOG: @@ -924,7 +924,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; case SID_ANALYSIS_OF_VARIANCE_DIALOG: @@ -933,7 +933,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; case SID_CORRELATION_DIALOG: @@ -942,7 +942,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; case SID_COVARIANCE_DIALOG: @@ -951,7 +951,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; case SID_EXPONENTIAL_SMOOTHING_DIALOG: @@ -960,7 +960,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; case SID_MOVING_AVERAGE_DIALOG: @@ -969,7 +969,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; case SID_TTEST_DIALOG: @@ -978,7 +978,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; @@ -988,7 +988,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; @@ -998,7 +998,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; @@ -1008,7 +1008,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; @@ -1889,7 +1889,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; case FID_ADD_NAME: @@ -1898,7 +1898,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; @@ -2050,7 +2050,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } break; diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 6e5bf88..2cc7924 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -559,7 +559,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? false : sal_True ); + pScMod->SetRefDialog( nId, pWnd ? false : true ); } } break; @@ -580,7 +580,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
