[Libreoffice-commits] core.git: 32 commits - basic/source bridges/source comphelper/source connectivity/source cui/source dbaccess/source desktop/source extensions/source forms/source framework/source include/tools jvmfwk/plugins jvmfwk/source mysqlc/source oox/source registry/source reportdesign/source sal/qa scripting/source sd/source sfx2/source shell/source sot/source stoc/source svtools/source svx/source sw/source test/source toolkit/source ucb/source unoxml/source vbahelper/source xmloff/source
Stephan Bergmann
sbergman at redhat.com
Thu Jul 16 05:00:54 PDT 2015
basic/source/runtime/methods.cxx | 18 ++++++------
bridges/source/jni_uno/jni_java2uno.cxx | 2 -
bridges/source/jni_uno/jni_uno2java.cxx | 6 ++--
comphelper/source/misc/anytostring.cxx | 2 -
connectivity/source/drivers/dbase/DResultSet.cxx | 2 -
connectivity/source/drivers/evoab2/NResultSet.cxx | 2 -
connectivity/source/drivers/file/FResultSet.cxx | 12 ++++----
cui/source/dialogs/scriptdlg.cxx | 6 ++--
dbaccess/source/filter/xml/xmlDataSource.cxx | 18 ++++++------
dbaccess/source/filter/xml/xmlLogin.cxx | 4 +-
dbaccess/source/ui/misc/DExport.cxx | 2 -
desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 2 -
extensions/source/update/check/updatecheckconfig.cxx | 4 +-
forms/source/component/FormComponent.cxx | 4 +-
forms/source/richtext/attributedispatcher.cxx | 2 -
forms/source/xforms/namedcollection.hxx | 2 -
framework/source/helper/ocomponentenumeration.cxx | 2 -
framework/source/services/frame.cxx | 5 ---
include/tools/inetmime.hxx | 2 -
jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx | 2 -
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 2 -
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 4 +-
jvmfwk/source/framework.cxx | 4 +-
mysqlc/source/mysqlc_connection.cxx | 2 -
mysqlc/source/mysqlc_databasemetadata.cxx | 4 +-
mysqlc/source/mysqlc_resultset.cxx | 22 +++++++--------
mysqlc/source/mysqlc_resultsetmetadata.cxx | 14 ++++-----
oox/source/ppt/timenodelistcontext.cxx | 2 -
registry/source/regkey.cxx | 2 -
reportdesign/source/core/api/Section.cxx | 2 -
reportdesign/source/ui/report/ReportController.cxx | 2 -
sal/qa/osl/file/osl_File.cxx | 2 -
scripting/source/provider/MasterScriptProvider.cxx | 4 +-
scripting/source/vbaevents/eventhelper.cxx | 2 -
sd/source/core/EffectMigration.cxx | 2 -
sd/source/core/annotations/AnnotationEnumeration.cxx | 2 -
sd/source/core/stlfamily.cxx | 2 -
sd/source/core/stlsheet.cxx | 4 +-
sd/source/filter/html/pubdlg.cxx | 4 +-
sd/source/filter/ppt/pptinanimations.cxx | 4 +-
sd/source/ui/animations/CustomAnimationPane.cxx | 2 -
sd/source/ui/slideshow/slideshowimpl.cxx | 2 -
sd/source/ui/unoidl/unopage.cxx | 2 -
sfx2/source/doc/plugin.cxx | 2 -
sfx2/source/doc/sfxbasemodel.cxx | 6 ++--
sfx2/source/view/sfxbasecontroller.cxx | 2 -
shell/source/sessioninstall/SyncDbusSessionHelper.cxx | 2 -
sot/source/unoolestorage/xolesimplestorage.cxx | 4 +-
stoc/source/invocation_adapterfactory/iafactory.cxx | 4 +-
stoc/source/javavm/javavm.cxx | 2 -
svtools/source/uno/treecontrolpeer.cxx | 12 ++++----
svtools/source/uno/unoiface.cxx | 8 ++---
svx/source/fmcomp/fmgridif.cxx | 2 -
svx/source/fmcomp/gridcell.cxx | 2 -
svx/source/table/cellcursor.cxx | 2 -
svx/source/table/propertyset.cxx | 2 -
svx/source/table/tabledesign.cxx | 4 +-
svx/source/tbxctrls/tbxdrctl.cxx | 2 -
svx/source/toolbars/extrusionbar.cxx | 2 -
sw/source/ui/vba/vbaselection.cxx | 8 ++---
test/source/sheet/xprintareas.cxx | 4 +-
toolkit/source/awt/vclxmenu.cxx | 4 +-
toolkit/source/awt/vclxwindows.cxx | 12 ++++----
toolkit/source/controls/unocontrol.cxx | 2 -
toolkit/source/controls/unocontrols.cxx | 2 -
ucb/source/core/ucbcmds.cxx | 2 -
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 2 -
unoxml/source/rdf/librdf_repository.cxx | 3 --
vbahelper/source/msforms/vbacheckbox.cxx | 2 -
vbahelper/source/msforms/vbaradiobutton.cxx | 2 -
xmloff/source/draw/ximppage.cxx | 2 -
xmloff/source/style/impastpl.cxx | 2 -
72 files changed, 146 insertions(+), 150 deletions(-)
New commits:
commit ec7e3c6dfe6262f2d09629d5c1152cfdf2a4b19b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:59:40 2015 +0200
loplugin:simplifybool
Change-Id: I2a112a1e0b1761e1d05f789c6defb9d2bb6aa8de
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index 4706467..1b6e52c 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -222,7 +222,7 @@ jobject Bridge::call_uno(
java_arg.l = jo_arg.get();
map_to_uno(
jni, uno_args[ nPos ], java_arg, type, 0,
- false /* no assign */, sal_False != param.bOut,
+ false /* no assign */, param.bOut,
true /* special wrapped integral types */ );
}
catch (...)
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index 749db52..b461ead 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -167,8 +167,8 @@ void Bridge::call_java(
jni, &java_args[ nPos ],
uno_args[ nPos ],
param.pTypeRef, 0,
- sal_False != param.bIn /* convert uno value */,
- sal_False != param.bOut /* build up array[ 1 ] */ );
+ param.bIn /* convert uno value */,
+ param.bOut /* build up array[ 1 ] */ );
}
catch (...)
{
@@ -318,7 +318,7 @@ void Bridge::call_java(
map_to_uno(
jni, uno_args[ nPos ],
java_args[ nPos ], param.pTypeRef, 0,
- sal_False != param.bIn /* assign if inout */,
+ param.bIn /* assign if inout */,
true /* out param */ );
}
catch (...)
commit 89e33144731aacdb03fb8a82b6283c0effca8a3b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:58:27 2015 +0200
loplugin:simplifybool
Change-Id: I06df26c474689126f80236866bd547332e293969
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 3be50c6..14c816d 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -577,7 +577,7 @@ Type SAL_CALL XoNavigationOrderAccess::getElementType( ) throw (RuntimeExceptio
sal_Bool SAL_CALL XoNavigationOrderAccess::hasElements( ) throw (RuntimeException, std::exception)
{
- return maShapes.empty() ? sal_False : sal_True;
+ return !maShapes.empty();
}
void SdXMLGenericPageContext::SetNavigationOrder()
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx
index a2a34ff..0bc2d51 100644
--- a/xmloff/source/style/impastpl.cxx
+++ b/xmloff/source/style/impastpl.cxx
@@ -106,7 +106,7 @@ data2string(void *data,
case typelib_TypeClass_VOID:
break;
case typelib_TypeClass_BOOLEAN:
- result.append((*static_cast<const sal_Bool*>(data) == sal_False ) ? OUString("false") : OUString("true"));
+ result.append(*static_cast<const sal_Bool*>(data) ? OUString("true") : OUString("false"));
break;
case typelib_TypeClass_BYTE:
result.append(OUString::number((*static_cast<const sal_Int8*>(data))));
commit 8f12dcbf606e0ec73fe87df5c696682e792a7605
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:58:05 2015 +0200
loplugin:simplifybool
Change-Id: I06135270e460cd554cca9153292dcc1984d50d43
diff --git a/vbahelper/source/msforms/vbacheckbox.cxx b/vbahelper/source/msforms/vbacheckbox.cxx
index 75c3d21e..bd00682 100644
--- a/vbahelper/source/msforms/vbacheckbox.cxx
+++ b/vbahelper/source/msforms/vbacheckbox.cxx
@@ -53,7 +53,7 @@ ScVbaCheckbox::getValue() throw (css::uno::RuntimeException, std::exception)
// return uno::makeAny( nValue );
// I must be missing something MSO says value should be -1 if selected, 0 if not
// selected
- return uno::makeAny( ( nValue == -1 ) ? sal_True : sal_False );
+ return uno::makeAny( nValue == -1 );
}
void SAL_CALL
diff --git a/vbahelper/source/msforms/vbaradiobutton.cxx b/vbahelper/source/msforms/vbaradiobutton.cxx
index 612371c..4f62e84 100644
--- a/vbahelper/source/msforms/vbaradiobutton.cxx
+++ b/vbahelper/source/msforms/vbaradiobutton.cxx
@@ -52,7 +52,7 @@ ScVbaRadioButton::getValue() throw (css::uno::RuntimeException, std::exception)
// return uno::makeAny( nValue );
// I must be missing something MSO says value should be -1 if selected, 0 if not
// selected
- return uno::makeAny( ( nValue == -1 ) ? sal_True : sal_False );
+ return uno::makeAny( nValue == -1 );
}
commit eac10bd2db973365cbbfd5379a64c5e02e7527cc
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:57:53 2015 +0200
loplugin:simplifybool
Change-Id: Ic38df50884b370417ed62b65ac7f90a13faea230
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index b993c1f..aefdc8d 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -1489,8 +1489,7 @@ throw (uno::RuntimeException, rdf::QueryException, rdf::RepositoryException, std
"librdf_Repository::queryAsk: "
"query result is null or not boolean", *this);
}
- return librdf_query_results_get_boolean(pResults.get())
- ? sal_True : sal_False;
+ return bool(librdf_query_results_get_boolean(pResults.get()));
}
// css::rdf::XDocumentRepository:
commit 6003732e3b7d58c60a36634c56673ec60cbe8180
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:57:41 2015 +0200
loplugin:simplifybool
Change-Id: I164b62e2c98fad49d581b2ee282b6329b83bdbfb
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 2c652e2..0669335 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -1483,7 +1483,7 @@ void globalTransfer_(
// break;
case OVERWRITE:
- OSL_ENSURE( aArg.ReplaceExisting == sal_False,
+ OSL_ENSURE( !aArg.ReplaceExisting,
"Hu? ReplaceExisting already true?"
);
aArg.ReplaceExisting = sal_True;
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 88d780d..8862b42 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -2590,7 +2590,7 @@ void Content::transfer(
xResAccess->getSessionFactory(),
sourceURI.GetURI() );
- if ( rArgs.MoveData == sal_True )
+ if ( rArgs.MoveData )
{
uno::Reference< ucb::XContentIdentifier > xId
= new ::ucbhelper::ContentIdentifier( rArgs.SourceURL );
commit d291fb6f283084e173165c577a531d8148d05fb6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:57:29 2015 +0200
loplugin:simplifybool
Change-Id: I33d58658b51798d667999df85318a9c649b2fc02
diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx
index 1e7672c..11d5ee7 100644
--- a/include/tools/inetmime.hxx
+++ b/include/tools/inetmime.hxx
@@ -693,7 +693,7 @@ inline rtl_TextEncoding INetMIME::translateFromMIME(rtl_TextEncoding
// static
inline bool INetMIME::isMIMECharsetEncoding(rtl_TextEncoding eEncoding)
{
- return ( rtl_isOctetTextEncoding(eEncoding) == sal_True );
+ return rtl_isOctetTextEncoding(eEncoding);
}
// static
commit 93f0c1fdd8bd618b5f624d33f4ba0b678b9e7f7d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:57:13 2015 +0200
loplugin:simplifybool
Change-Id: I9875ceec4276382d4bf96bc7e150d594df646602
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index c30ad50..91db85b 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -390,7 +390,7 @@ throw(css::uno::RuntimeException, std::exception)
SolarMutexGuard aSolarGuard;
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- return mpMenu ? mpMenu->IsItemEnabled( nItemId ) : sal_False;
+ return mpMenu && mpMenu->IsItemEnabled( nItemId );
}
void VCLXMenu::setItemText(
@@ -522,7 +522,7 @@ throw(css::uno::RuntimeException, std::exception)
SolarMutexGuard aSolarGuard;
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- return mpMenu ? mpMenu->IsItemChecked( nItemId ) : sal_False;
+ return mpMenu && mpMenu->IsItemChecked( nItemId );
}
sal_Int16 VCLXMenu::execute(
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index a02ac47..c24324f 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -740,7 +740,7 @@ void VCLXImageControl::setProperty( const OUString& PropertyName, const ::com::s
break;
case BASEPROPERTY_SCALEIMAGE:
- aProp <<= ( pImageControl && pImageControl->GetScaleMode() != ImageScaleMode::NONE ) ? sal_True : sal_False;
+ aProp <<= ( pImageControl && pImageControl->GetScaleMode() != ImageScaleMode::NONE );
break;
default:
@@ -1254,7 +1254,7 @@ sal_Bool VCLXRadioButton::getState() throw(::com::sun::star::uno::RuntimeExcepti
SolarMutexGuard aGuard;
VclPtr< RadioButton > pRadioButton = GetAs< RadioButton >();
- return pRadioButton ? pRadioButton->IsChecked() : sal_False;
+ return pRadioButton && pRadioButton->IsChecked();
}
::com::sun::star::awt::Size VCLXRadioButton::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception)
@@ -3923,7 +3923,7 @@ sal_Bool VCLXEdit::isEditable() throw(::com::sun::star::uno::RuntimeException, s
SolarMutexGuard aGuard;
VclPtr< Edit > pEdit = GetAs< Edit >();
- return ( pEdit && !pEdit->IsReadOnly() && pEdit->IsEnabled() ) ? sal_True : sal_False;
+ return pEdit && !pEdit->IsReadOnly() && pEdit->IsEnabled();
}
void VCLXEdit::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException, std::exception)
@@ -5042,7 +5042,7 @@ sal_Bool VCLXDateField::isLongFormat() throw(::com::sun::star::uno::RuntimeExcep
SolarMutexGuard aGuard;
VclPtr< DateField > pDateField = GetAs< DateField >();
- return pDateField ? pDateField->IsLongFormat() : sal_False;
+ return pDateField && pDateField->IsLongFormat();
}
void VCLXDateField::setEmpty() throw(::com::sun::star::uno::RuntimeException, std::exception)
@@ -5067,7 +5067,7 @@ sal_Bool VCLXDateField::isEmpty() throw(::com::sun::star::uno::RuntimeException,
SolarMutexGuard aGuard;
VclPtr< DateField > pDateField = GetAs< DateField >();
- return pDateField ? pDateField->IsEmptyDate() : sal_False;
+ return pDateField && pDateField->IsEmptyDate();
}
void VCLXDateField::setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException, std::exception)
@@ -5275,7 +5275,7 @@ sal_Bool VCLXTimeField::isEmpty() throw(::com::sun::star::uno::RuntimeException,
SolarMutexGuard aGuard;
VclPtr< TimeField > pTimeField = GetAs< TimeField >();
- return pTimeField ? pTimeField->IsEmptyTime() : sal_False;
+ return pTimeField && pTimeField->IsEmptyTime();
}
void VCLXTimeField::setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException, std::exception)
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 0952e97..56e1fc0 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -982,7 +982,7 @@ sal_Bool UnoControl::setGraphics( const Reference< XGraphics >& rDevice ) throw(
mxGraphics = rDevice;
xView.set(getPeer(), css::uno::UNO_QUERY);
}
- return xView.is() ? xView->setGraphics( rDevice ) : sal_True;
+ return !xView.is() || xView->setGraphics( rDevice );
}
Reference< XGraphics > UnoControl::getGraphics( ) throw(RuntimeException, std::exception)
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 1101e57..8e2d3c9 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -1311,7 +1311,7 @@ sal_Bool UnoRadioButtonControl::getState() throw(uno::RuntimeException, std::exc
sal_Int16 nState = 0;
uno::Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ) );
aVal >>= nState;
- return nState ? sal_True : sal_False;
+ return nState != 0;
}
void UnoRadioButtonControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(uno::RuntimeException, std::exception)
commit 7a044db51d35748f17b05f6d80ef90ad9000ad7a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:56:37 2015 +0200
loplugin:simplifybool
Change-Id: Idb065bab0285a5db209e75e29a9f6f4d72091e8c
diff --git a/test/source/sheet/xprintareas.cxx b/test/source/sheet/xprintareas.cxx
index 5e1fb60..cd470ca 100644
--- a/test/source/sheet/xprintareas.cxx
+++ b/test/source/sheet/xprintareas.cxx
@@ -23,7 +23,7 @@ namespace apitest {
uno::Reference< sheet::XPrintAreas > xPrintAreas(init(), UNO_QUERY_THROW);
xPrintAreas->setPrintTitleColumns(sal_True);
- CPPUNIT_ASSERT_MESSAGE("Wrong attribution at PrintTitleColumns", xPrintAreas->getPrintTitleColumns() == sal_True);
+ CPPUNIT_ASSERT_MESSAGE("Wrong attribution at PrintTitleColumns", xPrintAreas->getPrintTitleColumns());
}
@@ -32,7 +32,7 @@ namespace apitest {
uno::Reference< sheet::XPrintAreas > xPrintAreas(init(), UNO_QUERY_THROW);
xPrintAreas->setPrintTitleRows(sal_True);
- CPPUNIT_ASSERT_MESSAGE("Wrong attribution at PrintTitleRows", xPrintAreas->getPrintTitleRows() == sal_True);
+ CPPUNIT_ASSERT_MESSAGE("Wrong attribution at PrintTitleRows", xPrintAreas->getPrintTitleRows());
}
// the rest is right now in progress...
commit db33fc46213be19daeff7e7a3c55b9f1d48eb01e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:56:29 2015 +0200
loplugin:simplifybool
Change-Id: Ibdfb3a4f66513ef6844c8b7df0c07ffef6258e89
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 23074c8..3cc96db 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -316,9 +316,9 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno::
uno::Reference< text::XParagraphCursor > xParagraphCursor( xTextCursor, uno::UNO_QUERY_THROW );
for( sal_Int32 i=0; i<nCount; i++ )
{
- if( ( eDirection == word::MOVE_UP ) && ( xParagraphCursor->gotoPreviousParagraph( bExpand ) == sal_False ) )
+ if( ( eDirection == word::MOVE_UP ) && !xParagraphCursor->gotoPreviousParagraph( bExpand ) )
break;
- else if( ( eDirection == word::MOVE_DOWN ) && ( xParagraphCursor->gotoNextParagraph( bExpand ) == sal_False ) )
+ else if( ( eDirection == word::MOVE_DOWN ) && !xParagraphCursor->gotoNextParagraph( bExpand ) )
break;
}
}
@@ -331,9 +331,9 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno::
uno::Reference< text::XWordCursor > xWordCursor( xTextCursor, uno::UNO_QUERY_THROW );
for( sal_Int32 i=0; i<nCount; i++ )
{
- if( (eDirection == word::MOVE_LEFT ) && ( xWordCursor->gotoPreviousWord( bExpand ) == sal_False ) )
+ if( (eDirection == word::MOVE_LEFT ) && !xWordCursor->gotoPreviousWord( bExpand ) )
break;
- else if( ( eDirection == word::MOVE_RIGHT ) && ( xWordCursor->gotoNextWord( bExpand ) == sal_False ) )
+ else if( ( eDirection == word::MOVE_RIGHT ) && !xWordCursor->gotoNextWord( bExpand ) )
break;
}
}
commit 678c738b982a51978d9495019aea69b580747e0f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:56:10 2015 +0200
loplugin:simplifybool
Change-Id: Ibe187d7a2600c9f6a8524b5fc5665aa95099f512
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index f69d1da..5a50175 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -971,7 +971,7 @@ OUString SAL_CALL FmXGridControl::getMode() throw( RuntimeException, std::except
sal_Bool SAL_CALL FmXGridControl::supportsMode(const OUString& Mode) throw( RuntimeException, std::exception )
{
Reference< ::com::sun::star::util::XModeSelector > xPeer(getPeer(), UNO_QUERY);
- return xPeer.is() ? xPeer->supportsMode(Mode) : sal_False;
+ return xPeer.is() && xPeer->supportsMode(Mode);
}
// helper class which prevents that in the peer's header the FmGridListener must be known
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 08e3932..9a5a28d 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -3744,7 +3744,7 @@ sal_Bool SAL_CALL FmXEditCell::isEditable() throw( RuntimeException, std::except
{
::osl::MutexGuard aGuard( m_aMutex );
- return ( m_pEditImplementation && !m_pEditImplementation->IsReadOnly() && m_pEditImplementation->GetControl().IsEnabled() ) ? sal_True : sal_False;
+ return m_pEditImplementation && !m_pEditImplementation->IsReadOnly() && m_pEditImplementation->GetControl().IsEnabled();
}
diff --git a/svx/source/table/cellcursor.cxx b/svx/source/table/cellcursor.cxx
index 830a882..70a572c 100644
--- a/svx/source/table/cellcursor.cxx
+++ b/svx/source/table/cellcursor.cxx
@@ -550,7 +550,7 @@ void SAL_CALL CellCursor::split( sal_Int32 nColumns, sal_Int32 nRows ) throw (No
sal_Bool SAL_CALL CellCursor::isMergeable( ) throw (RuntimeException, std::exception)
{
CellPos aStart, aEnd;
- return GetMergedSelection( aStart, aEnd ) ? sal_True : sal_False;
+ return GetMergedSelection( aStart, aEnd );
}
diff --git a/svx/source/table/propertyset.cxx b/svx/source/table/propertyset.cxx
index db14b3a..2530261 100644
--- a/svx/source/table/propertyset.cxx
+++ b/svx/source/table/propertyset.cxx
@@ -94,7 +94,7 @@ Property SAL_CALL FastPropertySetInfo::getPropertyByName( const OUString& aName
sal_Bool SAL_CALL FastPropertySetInfo::hasPropertyByName( const OUString& aName ) throw (RuntimeException, std::exception)
{
- return hasProperty( aName ) != 0 ? sal_True : sal_False;
+ return hasProperty( aName ) != 0;
}
FastPropertySet::FastPropertySet( const rtl::Reference< FastPropertySetInfo >& xInfo )
diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx
index 66c0544..6480c72 100644
--- a/svx/source/table/tabledesign.cxx
+++ b/svx/source/table/tabledesign.cxx
@@ -321,7 +321,7 @@ sal_Bool SAL_CALL TableDesignStyle::hasByName( const OUString& rName ) throw(Ru
const CellStyleNameMap& rMap = getCellStyleNameMap();
CellStyleNameMap::const_iterator iter = rMap.find( rName );
- return ( iter != rMap.end() ) ? sal_True : sal_False;
+ return iter != rMap.end();
}
@@ -563,7 +563,7 @@ sal_Bool SAL_CALL TableDesignFamily::hasElements() throw(RuntimeException, std::
{
SolarMutexGuard aGuard;
- return maDesigns.empty() ? sal_False : sal_True;
+ return !maDesigns.empty();
}
diff --git a/svx/source/tbxctrls/tbxdrctl.cxx b/svx/source/tbxctrls/tbxdrctl.cxx
index 37f18fd..f70805c 100644
--- a/svx/source/tbxctrls/tbxdrctl.cxx
+++ b/svx/source/tbxctrls/tbxdrctl.cxx
@@ -63,7 +63,7 @@ void SvxTbxCtlDraw::StateChanged( sal_uInt16 nSID, SfxItemState eState,
Reference< XLayoutManager > xLayoutMgr = getLayoutManager();
if ( xLayoutMgr.is() )
GetToolBox().CheckItem(
- GetId(), xLayoutMgr->isElementVisible( m_sToolboxName ) != sal_False );
+ GetId(), xLayoutMgr->isElementVisible( m_sToolboxName ) );
}
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index 79c0fdf..21d84ba 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -307,7 +307,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem
com::sun::star::beans::PropertyValue aPropValue;
aPropValue.Name = sExtrusionColor;
- aPropValue.Value <<= bAuto ? sal_False : sal_True;
+ aPropValue.Value <<= !bAuto;
rGeometryItem.SetPropertyValue( sExtrusion, aPropValue );
if( bAuto )
commit 6a6fad992ecbc90f8280e125a3680278559693b2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:55:42 2015 +0200
loplugin:simplifybool
Change-Id: Ic1bfcea9deab50c3c61e5c45525c5b9a09619d2c
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index 6ec90e4..26cc5b4 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -778,7 +778,7 @@ sal_Bool SAL_CALL TreeControlPeer::isNodeExpanded( const Reference< XTreeNode >&
UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
UnoTreeListEntry* pEntry = getEntry( xNode );
- return ( pEntry && rTree.IsExpanded( pEntry ) ) ? sal_True : sal_False;
+ return pEntry && rTree.IsExpanded( pEntry );
}
@@ -809,7 +809,7 @@ sal_Bool SAL_CALL TreeControlPeer::isNodeVisible( const Reference< XTreeNode >&
UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
UnoTreeListEntry* pEntry = getEntry( xNode );
- return ( pEntry && rTree.IsEntryVisible( pEntry ) ) ? sal_True : sal_False;
+ return pEntry && rTree.IsEntryVisible( pEntry );
}
@@ -906,7 +906,7 @@ sal_Bool SAL_CALL TreeControlPeer::isEditing( ) throw (RuntimeException, std::e
SolarMutexGuard aGuard;
UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
- return rTree.IsEditingActive() ? sal_True : sal_False;
+ return rTree.IsEditingActive();
}
@@ -1406,15 +1406,15 @@ Any TreeControlPeer::getProperty( const OUString& PropertyName ) throw(RuntimeEx
case BASEPROPERTY_TREE_DATAMODEL:
return Any( mxDataModel );
case BASEPROPERTY_TREE_EDITABLE:
- return Any( rTree.IsInplaceEditingEnabled() ? sal_True : sal_False );
+ return Any( rTree.IsInplaceEditingEnabled() );
case BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING:
return Any( sal_True ); // @todo
case BASEPROPERTY_TREE_ROOTDISPLAYED:
return Any( mbIsRootDisplayed );
case BASEPROPERTY_TREE_SHOWSHANDLES:
- return Any( (rTree.GetStyle() & WB_HASLINES) != 0 ? sal_True : sal_False );
+ return Any( (rTree.GetStyle() & WB_HASLINES) != 0 );
case BASEPROPERTY_TREE_SHOWSROOTHANDLES:
- return Any( (rTree.GetStyle() & WB_HASLINESATROOT) != 0 ? sal_True : sal_False );
+ return Any( (rTree.GetStyle() & WB_HASLINESATROOT) != 0 );
}
}
return VCLXWindow::getProperty( PropertyName );
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 1223e18..39e0497 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -294,7 +294,7 @@ sal_Bool VCLXMultiLineEdit::isEditable() throw(::com::sun::star::uno::RuntimeExc
SolarMutexGuard aGuard;
VclPtr< MultiLineEdit > pMultiLineEdit = GetAs< MultiLineEdit >();
- return ( pMultiLineEdit && !pMultiLineEdit->IsReadOnly() && pMultiLineEdit->IsEnabled() ) ? sal_True : sal_False;
+ return pMultiLineEdit && !pMultiLineEdit->IsReadOnly() && pMultiLineEdit->IsEnabled();
}
void VCLXMultiLineEdit::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException, std::exception)
@@ -692,7 +692,7 @@ sal_Bool VCLXFileControl::isEditable() throw(::com::sun::star::uno::RuntimeExcep
SolarMutexGuard aGuard;
VclPtr< FileControl > pFileControl = GetAs< FileControl >();
- return ( pFileControl && !pFileControl->GetEdit().IsReadOnly() && pFileControl->GetEdit().IsEnabled() ) ? sal_True : sal_False;
+ return pFileControl && !pFileControl->GetEdit().IsReadOnly() && pFileControl->GetEdit().IsEnabled();
}
void VCLXFileControl::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException, std::exception)
@@ -1814,7 +1814,7 @@ sal_Bool SVTXNumericField::isStrictFormat() throw(::com::sun::star::uno::Runtime
SolarMutexGuard aGuard;
FormattedField* pField = GetAs< FormattedField >();
- return pField ? pField->IsStrictFormat() : sal_False;
+ return pField && pField->IsStrictFormat();
}
void SVTXNumericField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
@@ -1980,7 +1980,7 @@ sal_Bool SVTXCurrencyField::isStrictFormat() throw(::com::sun::star::uno::Runtim
SolarMutexGuard aGuard;
FormattedField* pField = GetAs< FormattedField >();
- return pField ? pField->IsStrictFormat() : sal_False;
+ return pField && pField->IsStrictFormat();
}
void SVTXCurrencyField::setProperty( const OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException, std::exception)
commit 96839e398c980f4b9ac3a348ac7f7af4f5218336
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:55:22 2015 +0200
loplugin:simplifybool
Change-Id: Ib53ce4a10877361274dd9d4499d5eb797889cae9
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index 447264c..102fdeb 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -285,8 +285,8 @@ bool AdapterImpl::coerce_assign(
}
else
{
- bool succ = (sal_False != ::uno_type_assignData(
- pDest, pType, ret.pData, ret.pType, 0, 0, 0 ));
+ bool succ = ::uno_type_assignData(
+ pDest, pType, ret.pData, ret.pType, 0, 0, 0 );
::uno_any_destruct( &ret, 0 );
OSL_ENSURE(
succ, "### conversion succeeded, but assignment failed!?" );
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index dc35b20..46571c1 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -819,7 +819,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
sal_Bool bExist = sal_False;
if (JFW_E_NONE == jfw_existJRE(pJavaInfo, &bExist))
{
- if (bExist == sal_False
+ if (!bExist
&& ! (pJavaInfo->nRequirements & JFW_REQUIRE_NEEDRESTART))
{
info.clear();
commit 367bf4d300d60e721d65b03834d117b485d87dcb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:55:06 2015 +0200
loplugin:simplifybool
Change-Id: Ifb229db31ba6d97c4ec9ca586210c1f3c4b89521
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index a1d4f6d..4a76aa7 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -586,7 +586,7 @@ sal_Bool SAL_CALL OLESimpleStorage::hasByName( const OUString& aName )
throw uno::RuntimeException(); // TODO:
}
- return bResult ? sal_True : sal_False;
+ return bResult;
}
@@ -622,7 +622,7 @@ sal_Bool SAL_CALL OLESimpleStorage::hasElements()
throw uno::RuntimeException(); // TODO:
}
- return aList.size() != 0 ? sal_True : sal_False;
+ return aList.size() != 0;
}
commit 4bf8384d970cf382d928925e6c3052f148c65904
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:54:57 2015 +0200
loplugin:simplifybool
Change-Id: I822967265cbe9f58641e2d9bd1260fd724df8ad1
diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
index 8f0a865..9ffb880 100644
--- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
+++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
@@ -177,7 +177,7 @@ void SyncDbusSessionHelper::InstallPrinterDrivers(
NULL, /* cancellable */
&error.getRef()),GVariantDeleter());
if(result.get())
- o_isInstalled = g_variant_get_boolean(g_variant_get_child_value(result.get(),0)) ? sal_True : sal_False;
+ o_isInstalled = bool(g_variant_get_boolean(g_variant_get_child_value(result.get(),0)));
}
}}
commit e7d7a1edb4a867d434a9b33c991a5ae9cded7a8e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:54:32 2015 +0200
loplugin:simplifybool
Change-Id: If72974c49113c64b3ac6269779c5013c554ebdcc
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index b5b0e14..f51d381 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -207,7 +207,7 @@ throw( uno::RuntimeException, std::exception )
// we must destroy the plugin before the parent is destroyed
xWindow->addEventListener( this );
xFrame->setComponent( xWindow, uno::Reference < frame::XController >() );
- return mxPlugin.is() ? sal_True : sal_False;
+ return mxPlugin.is();
}
return sal_False;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index f28a43b..0cd2ab3 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1317,7 +1317,7 @@ sal_Bool SAL_CALL SfxBaseModel::isModified() throw(RuntimeException, std::except
{
SfxModelGuard aGuard( *this );
- return m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->IsModified() : sal_False;
+ return m_pData->m_pObjectShell.Is() && m_pData->m_pObjectShell->IsModified();
}
@@ -1480,7 +1480,7 @@ sal_Bool SAL_CALL SfxBaseModel::hasLocation() throw(RuntimeException, std::excep
{
SfxModelGuard aGuard( *this );
- return m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->HasName() : sal_False;
+ return m_pData->m_pObjectShell.Is() && m_pData->m_pObjectShell->HasName();
}
@@ -1511,7 +1511,7 @@ sal_Bool SAL_CALL SfxBaseModel::isReadonly() throw(RuntimeException, std::except
{
SfxModelGuard aGuard( *this );
- return m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->IsReadOnly() : sal_True;
+ return !m_pData->m_pObjectShell.Is() || m_pData->m_pObjectShell->IsReadOnly();
}
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 1ab147b..42ef7098 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -623,7 +623,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( Runtime
if (bool(bSuspend) == m_pData->m_bSuspendState)
return sal_True;
- if ( bSuspend == sal_True )
+ if ( bSuspend )
{
if ( !m_pData->m_pViewShell )
{
commit b36e8678bc6e6b272cc116dcd4fbdb90dca12e28
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:54:14 2015 +0200
loplugin:simplifybool
Change-Id: Id87047cb49eabe0c5ef3463f437e47f0eeeae990
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index cc5c20c..abfa321 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -1350,7 +1350,7 @@ void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, S
xAnimate->setAttributeName(OUString("Visibility"));
// set attribute value
- aAny <<= bVisible ? sal_True : sal_False;
+ aAny <<= bVisible;
xAnimate->setTo(aAny);
// ad set node to par node
diff --git a/sd/source/core/annotations/AnnotationEnumeration.cxx b/sd/source/core/annotations/AnnotationEnumeration.cxx
index 838995e..efa3e57 100644
--- a/sd/source/core/annotations/AnnotationEnumeration.cxx
+++ b/sd/source/core/annotations/AnnotationEnumeration.cxx
@@ -65,7 +65,7 @@ AnnotationEnumeration::AnnotationEnumeration( const AnnotationVector& rAnnotatio
// ::com::sun::star::office::XAnnotationEnumeration:
sal_Bool SAL_CALL AnnotationEnumeration::hasMoreElements() throw (css::uno::RuntimeException, std::exception)
{
- return maIter != maAnnotations.end() ? sal_True : sal_False;
+ return maIter != maAnnotations.end();
}
css::uno::Reference< css::office::XAnnotation > SAL_CALL AnnotationEnumeration::nextElement() throw (css::uno::RuntimeException, css::container::NoSuchElementException, std::exception)
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx
index 7f52b4c..fa23953 100644
--- a/sd/source/core/stlfamily.cxx
+++ b/sd/source/core/stlfamily.cxx
@@ -271,7 +271,7 @@ sal_Bool SAL_CALL SdStyleFamily::hasByName( const OUString& aName ) throw(Runtim
{
PresStyleMap& rStyleSheets = mpImpl->getStyleSheets();
PresStyleMap::iterator iter( rStyleSheets.find(aName) );
- return ( iter != rStyleSheets.end() ) ? sal_True : sal_False;
+ return iter != rStyleSheets.end();
}
else
{
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 050b1c0..fb0fd7f 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -895,14 +895,14 @@ sal_Bool SAL_CALL SdStyleSheet::isUserDefined() throw(RuntimeException, std::exc
{
SolarMutexGuard aGuard;
throwIfDisposed();
- return IsUserDefined() ? sal_True : sal_False;
+ return IsUserDefined();
}
sal_Bool SAL_CALL SdStyleSheet::isInUse() throw(RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
throwIfDisposed();
- return IsUsed() ? sal_True : sal_False;
+ return IsUsed();
}
OUString SAL_CALL SdStyleSheet::getParentStyle() throw(RuntimeException, std::exception)
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 9bdf9cf..099d3fe 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -854,11 +854,11 @@ void SdPublishingDlg::GetParameterSequence( Sequence< PropertyValue >& rParams )
aProps.push_back( aValue );
aValue.Name = "SlideSound";
- aValue.Value <<= pPage3_SldSound->IsChecked() ? sal_True : sal_False;
+ aValue.Value <<= pPage3_SldSound->IsChecked();
aProps.push_back( aValue );
aValue.Name = "HiddenSlides";
- aValue.Value <<= pPage3_HiddenSlides->IsChecked() ? sal_True : sal_False;
+ aValue.Value <<= pPage3_HiddenSlides->IsChecked();
aProps.push_back( aValue );
// Page 4
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index f1e8b22..3783d7e 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -999,7 +999,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
OUString aString;
if( rValue >>= aString )
{
- rValue <<= aString == "visible" ? sal_True : sal_False;
+ rValue <<= aString == "visible";
bRet = true;
}
}
@@ -1687,7 +1687,7 @@ void AnimationImporter::importAnimateAttributeTargetContainer( const Atom* pAtom
if( nBits & 2 )
{
- xAnimate->setAccumulate( (nAccumulate == 0) ? sal_True : sal_False );
+ xAnimate->setAccumulate( nAccumulate == 0 );
}
}
}
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index f6446ae..aece524 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1075,7 +1075,7 @@ STLPropertySet* CustomAnimationPane::createSelectionSet()
}
addValue( pSet, nHandleHasAfterEffect, makeAny( pEffect->hasAfterEffect() ) );
- addValue( pSet, nHandleAfterEffectOnNextEffect, makeAny( pEffect->IsAfterEffectOnNext() ? sal_True : sal_False ) );
+ addValue( pSet, nHandleAfterEffectOnNextEffect, makeAny( pEffect->IsAfterEffectOnNext() ) );
addValue( pSet, nHandleDimColor, pEffect->getDimColor() );
addValue( pSet, nHandleIterateType, makeAny( pEffect->getIterateType() ) );
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 6abb3ac2..e83929f 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -2767,7 +2767,7 @@ void SlideshowImpl::setAutoSaveState( bool bOn)
Sequence< beans::PropertyValue > aArgs(1);
aArgs[0].Name = "AutoSaveState";
- aArgs[0].Value <<= bOn ? sal_True : sal_False;
+ aArgs[0].Value <<= bOn;
uno::Reference< frame::XDispatch > xAutoSave = frame::theAutoRecovery::get(xContext);
xAutoSave->dispatch(aURL, aArgs);
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 0455f55..57c957b 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2664,7 +2664,7 @@ Type SAL_CALL SdNavigationOrderAccess::getElementType( ) throw (RuntimeExceptio
sal_Bool SAL_CALL SdNavigationOrderAccess::hasElements( ) throw (RuntimeException, std::exception)
{
- return maShapes.empty() ? sal_False : sal_True;
+ return !maShapes.empty();
}
Any SdGenericDrawPage::getNavigationOrder()
commit 35279a7e2d9bb18373c69c6922c240447be92104
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:53:48 2015 +0200
loplugin:simplifybool
Change-Id: Ic179c3012ad99a97b11914bf7aefca58829621e0
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index b2e229b..5c8422e 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -267,8 +267,8 @@ throw ( provider::ScriptFrameworkErrorException,
OUString langKey("language");
OUString locKey("location");
- if ( sfUri->hasParameter( langKey ) == sal_False ||
- sfUri->hasParameter( locKey ) == sal_False ||
+ if ( !sfUri->hasParameter( langKey ) ||
+ !sfUri->hasParameter( locKey ) ||
( sfUri->getName().isEmpty() ) )
{
OUString errorMsg = "Incorrect format for Script URI: ";
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index a34c273..976f153 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -491,7 +491,7 @@ public:
virtual Type SAL_CALL getElementType( ) throw (RuntimeException, std::exception) SAL_OVERRIDE
{ return cppu::UnoType<OUString>::get(); }
virtual sal_Bool SAL_CALL hasElements( ) throw (RuntimeException, std::exception) SAL_OVERRIDE
- { return ( ( m_hEvents.empty() ? sal_False : sal_True ) ); }
+ { return !m_hEvents.empty(); }
private:
typedef std::unordered_map< OUString, Any, OUStringHash,
commit e82bc17d87762f99594ab046a02d1f358e77e30b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:53:36 2015 +0200
loplugin:simplifybool
Change-Id: I9c4be053a8e39683e0d557a7a6be109507374d70
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 5ea14ee..dbb9b12 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -2588,7 +2588,7 @@ namespace osl_File
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
CPPUNIT_ASSERT_MESSAGE( "test for isEndOfFile function: set the position to end, check if reach end",
- sal_True == *pEOF );
+ *pEOF );
}
void isEndOfFile_002()
commit b0494019dfb9224c8f0e83f55f4dbd639fe4fc78
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:53:16 2015 +0200
loplugin:simplifybool
Change-Id: Ia11e61456f6d915aab9da798ce4a2f89e82c189d
diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx
index 0007774..c5b1443 100644
--- a/reportdesign/source/core/api/Section.cxx
+++ b/reportdesign/source/core/api/Section.cxx
@@ -458,7 +458,7 @@ uno::Type SAL_CALL OSection::getElementType( ) throw (uno::RuntimeException, st
sal_Bool SAL_CALL OSection::hasElements( ) throw (uno::RuntimeException, std::exception)
{
::osl::MutexGuard aGuard(m_aMutex);
- return m_xDrawPage.is() ? m_xDrawPage->hasElements() : sal_False;
+ return m_xDrawPage.is() && m_xDrawPage->hasElements();
}
// XIndexAccess
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index f3a6bea..b87c2c1 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2762,7 +2762,7 @@ uno::Any SAL_CALL OReportController::getViewData() throw( uno::RuntimeException,
Any aCommandState;
if ( !!aFeatureState.bChecked )
- aCommandState <<= (*aFeatureState.bChecked) ? sal_True : sal_False;
+ aCommandState <<= *aFeatureState.bChecked;
else if ( aFeatureState.aValue.hasValue() )
aCommandState = aFeatureState.aValue;
commit aa8f7902d45dfe094d1ddbae01736c1e182b265e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:52:47 2015 +0200
loplugin:simplifybool
Change-Id: Ic0115e76076e84cc132a9fc9b0ce6a90cd9f639c
diff --git a/registry/source/regkey.cxx b/registry/source/regkey.cxx
index ed624db..5229838 100644
--- a/registry/source/regkey.cxx
+++ b/registry/source/regkey.cxx
@@ -61,7 +61,7 @@ void REGISTRY_CALLTYPE releaseKey(RegKeyHandle hKey)
sal_Bool REGISTRY_CALLTYPE isKeyReadOnly(RegKeyHandle hKey)
{
ORegKey* pKey = static_cast< ORegKey* >(hKey);
- return (pKey != 0) ? pKey->isReadOnly() : sal_False;
+ return pKey != 0 && pKey->isReadOnly();
}
commit 3f2b3e0bd64e36ba1b23908c2d880fa28073e68b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:52:38 2015 +0200
loplugin:simplifybool
Change-Id: I5e87ac88a2e0f20892ef89f36ccf8cac0bdc90c4
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index b6d978e..e094d90 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -187,7 +187,7 @@ namespace oox { namespace ppt {
if( maTo >>= aString )
{
OSL_TRACE( "Magic conversion %s", OUSTRING_TO_CSTR( aString ) );
- maTo = makeAny( aString == "visible" ? sal_True : sal_False );
+ maTo = makeAny( aString == "visible" );
if( !maTo.has<sal_Bool>() )
OSL_TRACE( "conversion failed" );
}
commit e2462a3897bc5122bada288efa53daae7a4ede81
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:52:11 2015 +0200
loplugin:simplifybool
Change-Id: I2520ff8ca5f9c0dd68cc4c5cdc377d455c87898d
diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx
index 836d6740..fa975f7 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -306,7 +306,7 @@ void SAL_CALL OConnection::setAutoCommit(sal_Bool autoCommit)
MutexGuard aGuard(m_aMutex);
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
try {
- m_settings.cppConnection->setAutoCommit(autoCommit == sal_True);
+ m_settings.cppConnection->setAutoCommit(autoCommit);
} 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 b35023e..1f3986b 100644
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ b/mysqlc/source/mysqlc_databasemetadata.cxx
@@ -620,7 +620,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert(sal_Int32 /* fromType */, s
OSL_TRACE("ODatabaseMetaData::supportsConvert");
try {
/* ToDo -> use supportsConvert( fromType, toType) */
- return meta->supportsConvert()? sal_True:sal_False;
+ return meta->supportsConvert();
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::supportsConvert", *this);
} catch (const sql::InvalidArgumentException &) {
@@ -979,7 +979,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency(sal_Int32 setT
return meta->supportsResultSetConcurrency(setType, concurrency==com::sun::star::sdbc::TransactionIsolation::READ_COMMITTED?
sql::TRANSACTION_READ_COMMITTED:
(concurrency == com::sun::star::sdbc::TransactionIsolation::SERIALIZABLE?
- sql::TRANSACTION_SERIALIZABLE:sql::TRANSACTION_SERIALIZABLE))? sal_True:sal_False;
+ sql::TRANSACTION_SERIALIZABLE:sql::TRANSACTION_SERIALIZABLE));
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::supportsResultSetConcurrency", *this);
} catch (const sql::InvalidArgumentException &) {
diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx
index 65e4987..9294338 100644
--- a/mysqlc/source/mysqlc_resultset.cxx
+++ b/mysqlc/source/mysqlc_resultset.cxx
@@ -189,7 +189,7 @@ sal_Bool SAL_CALL OResultSet::getBoolean(sal_Int32 column)
checkColumnIndex(column);
try {
- return m_result->getBoolean(column)? sal_True:sal_False;
+ return m_result->getBoolean(column);
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
@@ -523,7 +523,7 @@ sal_Bool SAL_CALL OResultSet::isBeforeFirst()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
- return m_result->isBeforeFirst()? sal_True:sal_False;
+ return m_result->isBeforeFirst();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
@@ -538,7 +538,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
- return m_result->isAfterLast()? sal_True:sal_False;
+ return m_result->isAfterLast();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
@@ -568,7 +568,7 @@ sal_Bool SAL_CALL OResultSet::isLast()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
- return m_result->isLast()? sal_True:sal_False;
+ return m_result->isLast();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
@@ -625,7 +625,7 @@ sal_Bool SAL_CALL OResultSet::first() throw(SQLException, RuntimeException, std:
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
- return m_result->first()? sal_True:sal_False;
+ return m_result->first();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
@@ -640,7 +640,7 @@ sal_Bool SAL_CALL OResultSet::last()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
- return m_result->last()? sal_True:sal_False;
+ return m_result->last();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
@@ -655,7 +655,7 @@ sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 row)
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
- return m_result->absolute(row)? sal_True:sal_False;
+ return m_result->absolute(row);
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
@@ -670,7 +670,7 @@ sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row)
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
- return m_result->relative(row)? sal_True:sal_False;
+ return m_result->relative(row);
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
@@ -685,7 +685,7 @@ sal_Bool SAL_CALL OResultSet::previous()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
- return m_result->previous()? sal_True:sal_False;
+ return m_result->previous();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
@@ -740,7 +740,7 @@ sal_Bool SAL_CALL OResultSet::next()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
- return m_result->next()? sal_True:sal_False;
+ return m_result->next();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
@@ -755,7 +755,7 @@ sal_Bool SAL_CALL OResultSet::wasNull()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
- return m_result->wasNull()? sal_True:sal_False;
+ return m_result->wasNull();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
diff --git a/mysqlc/source/mysqlc_resultsetmetadata.cxx b/mysqlc/source/mysqlc_resultsetmetadata.cxx
index 2f6b83f..464eab0 100644
--- a/mysqlc/source/mysqlc_resultsetmetadata.cxx
+++ b/mysqlc/source/mysqlc_resultsetmetadata.cxx
@@ -212,7 +212,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isCurrency(sal_Int32 column)
checkColumnIndex(column);
try {
- return meta->isCurrency(column)? sal_True:sal_False;
+ return meta->isCurrency(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
@@ -228,7 +228,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement(sal_Int32 column)
checkColumnIndex(column);
try {
- return meta->isAutoIncrement(column)? sal_True:sal_False;
+ return meta->isAutoIncrement(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
@@ -244,7 +244,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSigned(sal_Int32 column)
checkColumnIndex(column);
try {
- return meta->isSigned(column)? sal_True:sal_False;
+ return meta->isSigned(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
@@ -307,7 +307,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSearchable(sal_Int32 column)
checkColumnIndex(column);
try {
- return meta->isSearchable(column)? sal_True:sal_False;
+ return meta->isSearchable(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
@@ -323,7 +323,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isReadOnly(sal_Int32 column)
checkColumnIndex(column);
try {
- return meta->isReadOnly(column)? sal_True:sal_False;
+ return meta->isReadOnly(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
@@ -339,7 +339,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable(sal_Int32 column)
checkColumnIndex(column);
try {
- return meta->isDefinitelyWritable(column)? sal_True:sal_False;
+ return meta->isDefinitelyWritable(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
@@ -355,7 +355,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isWritable(sal_Int32 column)
checkColumnIndex(column);
try {
- return meta->isWritable(column)? sal_True:sal_False;
+ return meta->isWritable(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
commit a52ad6b1cca7ef4cd21386866c1e9b56d027db18
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:51:43 2015 +0200
loplugin:simplifybool
Change-Id: Iaa3c04ba936512f511de238f5a3ca5b0f9afc06d
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index f1ef2cd..d4d67f6 100644
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -53,7 +53,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
}
sal_Bool bEnabled = sal_False;
javaFrameworkError errcode = jfw_getEnabled( & bEnabled);
- if (errcode == JFW_E_NONE && bEnabled == sal_False)
+ if (errcode == JFW_E_NONE && !bEnabled)
{
//Do not do any preparation because that may only slow startup time.
return 0;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index c7a273c..44a9020 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -890,7 +890,7 @@ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
//contained within JAVA_HOME. Then the check for JAVA_HOME would return
//true although the runtime library may not be loadable.
//Or the JAVA_HOME directory of a deinstalled JRE left behind.
- if (ret == JFW_PLUGIN_E_NONE && *exist == sal_True)
+ if (ret == JFW_PLUGIN_E_NONE && *exist)
{
OUString sRuntimeLib = getRuntimeLib(pInfo->arVendorData);
JFW_TRACE2("Checking existence of Java runtime library");
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 6b5f8a2..18dac9b 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -421,8 +421,8 @@ bool getJavaProps(const OUString & exePath,
//next to the plugin, except on OS X where it is in ../Resources/java relative
//to the plugin.
OUString sThisLib;
- if (osl_getModuleURLFromAddress(reinterpret_cast<void *>(&getJavaProps),
- & sThisLib.pData) == sal_False)
+ if (!osl_getModuleURLFromAddress(reinterpret_cast<void *>(&getJavaProps),
+ & sThisLib.pData))
{
return false;
}
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index f15a045..5d18738 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -808,7 +808,7 @@ javaFrameworkError SAL_CALL jfw_setSelectedJRE(JavaInfo const *pInfo)
if (errcode != JFW_E_NONE && errcode != JFW_E_INVALID_SETTINGS)
return errcode;
- if (jfw_areEqualJavaInfo(currentInfo, pInfo) == sal_False)
+ if (!jfw_areEqualJavaInfo(currentInfo, pInfo))
{
jfw::NodeJava node(jfw::NodeJava::USER);
node.setJavaInfo(pInfo, false);
@@ -836,7 +836,7 @@ javaFrameworkError SAL_CALL jfw_setEnabled(sal_Bool bEnabled)
if (jfw::getMode() == jfw::JFW_MODE_DIRECT)
return JFW_E_DIRECT_MODE;
- if (!g_bEnabledSwitchedOn && bEnabled == sal_True)
+ if (!g_bEnabledSwitchedOn && bEnabled)
{
//When the process started then Enabled was false.
//This is first time enabled is set to true.
commit ecc9fc12f1fe60b3d6abf1b14f8b7a078e1c1151
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:51:12 2015 +0200
loplugin:simplifybool
Change-Id: I1ad92d1496759007f770b86f9d24e322b3ae194b
diff --git a/framework/source/helper/ocomponentenumeration.cxx b/framework/source/helper/ocomponentenumeration.cxx
index 260c963..dce0ead 100644
--- a/framework/source/helper/ocomponentenumeration.cxx
+++ b/framework/source/helper/ocomponentenumeration.cxx
@@ -79,7 +79,7 @@ Any SAL_CALL OComponentEnumeration::nextElement() throw( NoSuchElementExcepti
SolarMutexGuard g;
// If we have no elements or end of enumeration is arrived ...
- if ( hasMoreElements() == sal_False )
+ if ( !hasMoreElements() )
{
// .. throw an exception!
throw NoSuchElementException();
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index a3f7bd7..92c4ff3 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -733,10 +733,7 @@ void SAL_CALL Frame::setActiveFrame( const css::uno::Reference< css::frame::XFra
// If last active frame was active ...
// but new one is not it ...
// ... set it as active one.
- if (
- ( eActiveState == E_ACTIVE ) &&
- ( xFrame->isActive() == sal_False )
- )
+ if ( eActiveState == E_ACTIVE && !xFrame->isActive() )
{
xFrame->activate();
}
commit 891c80e1723c4aac2457d5a76b1b0e042e78b70b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:50:53 2015 +0200
loplugin:simplifybool
Change-Id: I8b704401233fa865c8ec4d4663d720a3d7d8de69
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 1b978d1..cc27283 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -321,12 +321,12 @@ void SAL_CALL OControl::setDesignMode(sal_Bool bOn) throw ( RuntimeException, st
sal_Bool SAL_CALL OControl::isDesignMode() throw ( RuntimeException, std::exception)
{
- return m_xControl.is() ? m_xControl->isDesignMode() : sal_True;
+ return !m_xControl.is() || m_xControl->isDesignMode();
}
sal_Bool SAL_CALL OControl::isTransparent() throw ( RuntimeException, std::exception)
{
- return m_xControl.is() ? m_xControl->isTransparent() : sal_True;
+ return !m_xControl.is() || m_xControl->isTransparent();
}
OBoundControl::OBoundControl( const Reference< XComponentContext >& _rxContext,
diff --git a/forms/source/richtext/attributedispatcher.cxx b/forms/source/richtext/attributedispatcher.cxx
index e6493b9..971d66a 100644
--- a/forms/source/richtext/attributedispatcher.cxx
+++ b/forms/source/richtext/attributedispatcher.cxx
@@ -68,7 +68,7 @@ namespace frm
FeatureStateEvent OAttributeDispatcher::buildStatusEvent() const
{
FeatureStateEvent aEvent( ORichTextFeatureDispatcher::buildStatusEvent() );
- aEvent.IsEnabled = getEditView() ? !getEditView()->IsReadOnly() : sal_False;
+ aEvent.IsEnabled = getEditView() && !getEditView()->IsReadOnly();
AttributeState aState;
if ( m_pMasterDispatcher )
diff --git a/forms/source/xforms/namedcollection.hxx b/forms/source/xforms/namedcollection.hxx
index dd4498d..f411595 100644
--- a/forms/source/xforms/namedcollection.hxx
+++ b/forms/source/xforms/namedcollection.hxx
@@ -127,7 +127,7 @@ public:
const OUString& aName )
throw( css::uno::RuntimeException ) SAL_OVERRIDE
{
- return hasItem( aName ) ? sal_True : sal_False;
+ return hasItem( aName );
}
};
commit d9dd11e16d2a6c7b9ed1a152db5d9a0c055399cb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:50:26 2015 +0200
loplugin:simplifybool
Change-Id: Ib1af2097743f81c0bdd237941eab017a5d463b37
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index dfc62d8..3588180 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -438,7 +438,7 @@ UpdateCheckConfig::storeUpdateFound( const UpdateInfo& rInfo, const OUString& aC
uno::makeAny(rInfo.BuildId),
uno::makeAny(rInfo.Description),
uno::makeAny(rInfo.Sources[0].URL),
- uno::makeAny(rInfo.Sources[0].IsDirect ? sal_True : sal_False),
+ uno::makeAny(rInfo.Sources[0].IsDirect),
uno::makeAny(getReleaseNote(rInfo, 1, autoDownloadEnabled) ),
uno::makeAny(getReleaseNote(rInfo, 2, autoDownloadEnabled) ),
uno::makeAny(getReleaseNote(rInfo, 3, autoDownloadEnabled) ),
@@ -596,7 +596,7 @@ UpdateCheckConfig::commitChanges()
{
sal_Bool bEnabled = sal_False;
aChangesSet[i].Element >>= bEnabled;
- m_rListener->autoCheckStatusChanged(sal_True == bEnabled);
+ m_rListener->autoCheckStatusChanged(bEnabled);
}
else if( aString.endsWith(CHECK_INTERVAL "']") )
{
commit 2b88d7f90edefdaa95a1afe77596fae11daf6f4d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:50:03 2015 +0200
loplugin:simplifybool
Change-Id: I3ad64faba0e162d404668789ae4aa410004eaee2
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 9ff8405..e6a775e 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -203,7 +203,7 @@ ExtensionDescription::ExtensionDescription(
Reference<css::xml::dom::XDocumentBuilder> xDocBuilder(
css::xml::dom::DocumentBuilder::create(xContext) );
- if (xDocBuilder->isNamespaceAware() == sal_False)
+ if (!xDocBuilder->isNamespaceAware())
{
throw css::uno::Exception(
"Service com.sun.star.xml.dom.DocumentBuilder is not namespace aware.", 0);
commit 7cc9ebcaeee2a2f34a12b1e6817d8d1ef506ded1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:49:48 2015 +0200
loplugin:simplifybool
Change-Id: Ifaae5adf238dd24438cc321202271e898fd01543
diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx
index c84b028..f1bff58 100644
--- a/dbaccess/source/filter/xml/xmlDataSource.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSource.cxx
@@ -83,7 +83,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
case XML_TOK_SUPPRESS_VERSION_COLUMNS:
try
{
- xDataSource->setPropertyValue(PROPERTY_SUPPRESSVERSIONCL,makeAny(sValue == s_sTRUE ? sal_True : sal_False));
+ xDataSource->setPropertyValue(PROPERTY_SUPPRESSVERSIONCL,makeAny(sValue == s_sTRUE));
bFoundSuppressVersionColumns = true;
}
catch(const Exception&)
@@ -99,15 +99,15 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
break;
case XML_TOK_IS_FIRST_ROW_HEADER_LINE:
aProperty.Name = INFO_TEXTFILEHEADER;
- aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False);
+ aProperty.Value <<= (sValue == s_sTRUE);
break;
case XML_TOK_SHOW_DELETED:
aProperty.Name = INFO_SHOWDELETEDROWS;
- aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False);
+ aProperty.Value <<= (sValue == s_sTRUE);
break;
case XML_TOK_IS_TABLE_NAME_LENGTH_LIMITED:
aProperty.Name = INFO_ALLOWLONGTABLENAMES;
- aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False);
+ aProperty.Value <<= (sValue == s_sTRUE);
bFoundTableNameLengthLimited = true;
break;
case XML_TOK_SYSTEM_DRIVER_SETTINGS:
@@ -115,21 +115,21 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
break;
case XML_TOK_ENABLE_SQL92_CHECK:
aProperty.Name = PROPERTY_ENABLESQL92CHECK;
- aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False);
+ aProperty.Value <<= (sValue == s_sTRUE);
break;
case XML_TOK_APPEND_TABLE_ALIAS_NAME:
aProperty.Name = INFO_APPEND_TABLE_ALIAS;
- aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False);
+ aProperty.Value <<= (sValue == s_sTRUE);
bFoundAppendTableAliasName = true;
break;
case XML_TOK_PARAMETER_NAME_SUBSTITUTION:
aProperty.Name = INFO_PARAMETERNAMESUBST;
- aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False);
+ aProperty.Value <<= (sValue == s_sTRUE);
bFoundParamNameSubstitution = true;
break;
case XML_TOK_IGNORE_DRIVER_PRIVILEGES:
aProperty.Name = INFO_IGNOREDRIVER_PRIV;
- aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False);
+ aProperty.Value <<= (sValue == s_sTRUE);
break;
case XML_TOK_BOOLEAN_COMPARISON_MODE:
aProperty.Name = PROPERTY_BOOLEANCOMPARISONMODE;
@@ -144,7 +144,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
break;
case XML_TOK_USE_CATALOG:
aProperty.Name = INFO_USECATALOG;
- aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False);
+ aProperty.Value <<= (sValue == s_sTRUE);
break;
case XML_TOK_BASE_DN:
aProperty.Name = INFO_CONN_LDAP_BASEDN;
diff --git a/dbaccess/source/filter/xml/xmlLogin.cxx b/dbaccess/source/filter/xml/xmlLogin.cxx
index b35e187..bad2b88 100644
--- a/dbaccess/source/filter/xml/xmlLogin.cxx
+++ b/dbaccess/source/filter/xml/xmlLogin.cxx
@@ -78,7 +78,7 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport,
case XML_TOK_IS_PASSWORD_REQUIRED:
try
{
- xDataSource->setPropertyValue(PROPERTY_ISPASSWORDREQUIRED,makeAny((sValue == s_sTRUE ? sal_True : sal_False)));
+ xDataSource->setPropertyValue(PROPERTY_ISPASSWORDREQUIRED,makeAny(sValue == s_sTRUE));
}
catch(const Exception&)
{
@@ -91,7 +91,7 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport,
bUserFound = true;
PropertyValue aProperty;
aProperty.Name = "UseSystemUser";
- aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False);
+ aProperty.Value <<= (sValue == s_sTRUE);
rImport.addInfo(aProperty);
}
break;
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index bc949e7..fbdeab6 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -143,7 +143,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
const TColumnVector* pList,
const OTypeInfoMap* _pInfoMap,
SvStream& _rInputStream)
- :m_aDestColumns(_rxConnection->getMetaData().is() && _rxConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers() == sal_True)
+ :m_aDestColumns(_rxConnection->getMetaData().is() && _rxConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
,m_xConnection(_rxConnection)
,m_xFormatter(_rxNumberF)
,m_xContext(_rxContext)
commit 5456d59651c65165038c9cee82e7970f44426e36
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:49:17 2015 +0200
loplugin:simplifybool
Change-Id: Idab14666c3ffdc6c1a20e14bd1a7745a844468a1
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 4bddaae..3e90388 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -179,7 +179,7 @@ void SFTreeListBox::Init( const OUString& language )
rootNode.set( xFac->createView(
browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) );
- if ( rootNode.is() && rootNode->hasChildNodes() == sal_True )
+ if ( rootNode.is() && rootNode->hasChildNodes() )
{
children = rootNode->getChildNodes();
}
@@ -859,7 +859,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
// no children => ok to create Parcel1 or Script1 without checking
try
{
- if( node->hasChildNodes() == sal_False )
+ if( !node->hasChildNodes() )
{
aNewName = aNewStdName + OUString::number(i);
bValid = true;
@@ -1157,7 +1157,7 @@ OUString SvxScriptOrgDialog::getListOfChildren( Reference< browse::XBrowseNode >
try
{
- if ( node->hasChildNodes() == sal_True )
+ if ( node->hasChildNodes() )
{
Sequence< Reference< browse::XBrowseNode > > children
= node->getChildNodes();
commit 139acde5dc900b8b1e44da09a0c66d285eba860f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:48:46 2015 +0200
loplugin:simplifybool
Change-Id: Idb1aa3801ab09022f68aea512df1ddd64348a5b0
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx
index 22089c5..a323208 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -94,7 +94,7 @@ sal_Bool SAL_CALL ODbaseResultSet::moveToBookmark( const Any& bookmark ) throw(
m_bRowDeleted = m_bRowInserted = m_bRowUpdated = false;
- return m_pTable ? Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),true) : sal_False;
+ return m_pTable && Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),true);
}
sal_Bool SAL_CALL ODbaseResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException, std::exception)
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 45fb438..322770d 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -779,7 +779,7 @@ sal_Bool SAL_CALL OEvoabResultSet::getBoolean( sal_Int32 nColumnNum ) throw(SQLE
if ( getValue( getCur(), nFieldNumber, G_TYPE_BOOLEAN, &aValue, m_bWasNull ) )
bResult = valueToBool( aValue );
}
- return bResult ? sal_True : sal_False;
+ return bResult;
}
sal_Int64 SAL_CALL OEvoabResultSet::getLong( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException, std::exception)
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 12023b9..9433b1e 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -418,7 +418,7 @@ sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException, st
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::FIRST,1,true) : sal_False;
+ return m_pTable && m_aSkipDeletedSet.skipDeleted(IResultSetHelper::FIRST,1,true);
}
@@ -427,28 +427,28 @@ sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException, std
// here I know definitely that I stand on the last record
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,true) : sal_False;
+ return m_pTable && m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,true);
}
sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::ABSOLUTE1,row,true) : sal_False;
+ return m_pTable && m_aSkipDeletedSet.skipDeleted(IResultSetHelper::ABSOLUTE1,row,true);
}
sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::RELATIVE1,row,true) : sal_False;
+ return m_pTable && m_aSkipDeletedSet.skipDeleted(IResultSetHelper::RELATIVE1,row,true);
}
sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::PRIOR,0,true) : sal_False;
+ return m_pTable && m_aSkipDeletedSet.skipDeleted(IResultSetHelper::PRIOR,0,true);
}
Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException, RuntimeException, std::exception)
@@ -502,7 +502,7 @@ sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException, std
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::NEXT,1,true) : sal_False;
+ return m_pTable && m_aSkipDeletedSet.skipDeleted(IResultSetHelper::NEXT,1,true);
}
commit e363123a245dca2b94575e560809b34696edf42f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:48:17 2015 +0200
loplugin:simplifybool
Change-Id: I928325376b97ddd312af0f0a71187f29be607c6a
diff --git a/comphelper/source/misc/anytostring.cxx b/comphelper/source/misc/anytostring.cxx
index 9922136..11b1ade 100644
--- a/comphelper/source/misc/anytostring.cxx
+++ b/comphelper/source/misc/anytostring.cxx
@@ -251,7 +251,7 @@ void appendValue( OUStringBuffer & buf,
break;
}
case typelib_TypeClass_BOOLEAN:
- if (*static_cast< sal_Bool const * >(val) != sal_False)
+ if (*static_cast< sal_Bool const * >(val))
buf.append( "true" );
else
buf.append( "false" );
commit 5a80e3272876f2883cb3329f7b690915958b9146
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jul 16 13:47:35 2015 +0200
loplugin:simplifybool
Change-Id: I2dc7883e23c1437c4a8bf9fce19acfd3fe700ec0
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index f06076f..15f8bfe 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -921,16 +921,16 @@ RTLFUNC(InStr)
}
SbiInstance* pInst = GetSbData()->pInst;
- int bTextMode;
+ bool bTextMode;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
{
SbiRuntime* pRT = pInst->pRun;
- bTextMode = pRT ? pRT->IsImageFlag( SbiImageFlags::COMPARETEXT ) : sal_False;
+ bTextMode = pRT && pRT->IsImageFlag( SbiImageFlags::COMPARETEXT );
}
else
{
- bTextMode = 1;;
+ bTextMode = true;
}
if ( nArgCount == 4 )
{
@@ -996,16 +996,16 @@ RTLFUNC(InStrRev)
}
SbiInstance* pInst = GetSbData()->pInst;
- int bTextMode;
+ bool bTextMode;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
{
SbiRuntime* pRT = pInst->pRun;
- bTextMode = pRT ? pRT->IsImageFlag( SbiImageFlags::COMPARETEXT ) : sal_False;
+ bTextMode = pRT && pRT->IsImageFlag( SbiImageFlags::COMPARETEXT );
}
else
{
- bTextMode = 1;;
+ bTextMode = true;
}
if ( nArgCount == 4 )
{
@@ -1377,16 +1377,16 @@ RTLFUNC(Replace)
}
SbiInstance* pInst = GetSbData()->pInst;
- int bTextMode;
+ bool bTextMode;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
{
SbiRuntime* pRT = pInst->pRun;
- bTextMode = pRT ? pRT->IsImageFlag( SbiImageFlags::COMPARETEXT ) : sal_False;
+ bTextMode = pRT && pRT->IsImageFlag( SbiImageFlags::COMPARETEXT );
}
else
{
- bTextMode = 1;
+ bTextMode = true;
}
if ( nArgCount == 6 )
{
More information about the Libreoffice-commits
mailing list