summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-02 15:42:25 +0200
committerNoel Grandin <noel@peralex.com>2014-05-05 12:47:48 +0200
commit4f9b21248ffdf55cef9f3f9d1da76778ee000775 (patch)
treeb059d288339a68aa4c3901f1100e99b04d05a23d
parentb4107411900f5bb4c215e2d9db09fc2b2b82939b (diff)
simplify ternary conditions "xxx ? yyy : false"
Look for code like: xxx ? yyy : false; Which can be simplified to: xxx && yyy Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx2
-rw-r--r--android/abs-lib/src/com/actionbarsherlock/internal/widget/IcsSpinner.java2
-rw-r--r--avmedia/source/viewer/mediawindow_impl.cxx8
-rw-r--r--basctl/source/basicide/scriptdocument.cxx2
-rw-r--r--basic/source/classes/sbunoobj.cxx2
-rw-r--r--basic/source/comp/dim.cxx4
-rw-r--r--canvas/source/directx/dx_bitmapcanvashelper.cxx2
-rw-r--r--canvas/source/opengl/ogl_canvashelper.cxx2
-rw-r--r--canvas/source/vcl/impltools.hxx2
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx2
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx2
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.cxx2
-rw-r--r--cli_ure/source/uno_bridge/cli_data.cxx8
-rw-r--r--comphelper/source/misc/syntaxhighlight.cxx2
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx2
-rw-r--r--cui/source/tabpages/autocdlg.cxx2
-rw-r--r--cui/source/tabpages/border.cxx2
-rw-r--r--dbaccess/qa/complex/dbaccess/TestCase.java2
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx2
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryViewSwitch.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx2
-rw-r--r--desktop/source/deployment/registry/component/dp_compbackenddb.cxx3
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx2
-rw-r--r--editeng/source/outliner/outliner.cxx2
-rw-r--r--editeng/source/rtf/svxrtf.cxx2
-rw-r--r--extensions/source/ole/oleobjw.cxx2
-rw-r--r--extensions/source/propctrlr/cellbindinghelper.cxx2
-rw-r--r--extensions/source/propctrlr/formbrowsertools.hxx4
-rw-r--r--forms/source/solar/control/navtoolbar.cxx2
-rw-r--r--forms/source/xforms/binding.cxx2
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx4
-rw-r--r--framework/source/uielement/fontmenucontroller.cxx2
-rw-r--r--include/comphelper/property.hxx2
-rw-r--r--include/comphelper/stl_types.hxx4
-rw-r--r--include/svl/urlfilter.hxx2
-rw-r--r--include/vcl/bmpacc.hxx2
-rw-r--r--include/vcl/image.hxx2
-rw-r--r--include/vcl/keycod.hxx2
-rw-r--r--include/vcl/textdata.hxx10
-rw-r--r--include/vcl/timer.hxx2
-rw-r--r--l10ntools/source/export.cxx2
-rw-r--r--qadevOOo/runner/complexlib/Assurance.java2
-rw-r--r--qadevOOo/runner/convwatch/IniFile.java2
-rw-r--r--qadevOOo/runner/convwatch/OfficePrint.java2
-rw-r--r--qadevOOo/runner/graphical/IniFile.java2
-rw-r--r--qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java2
-rw-r--r--rsc/source/res/rscclass.cxx6
-rw-r--r--sal/qa/osl/socket/osl_StreamSocket.cxx6
-rw-r--r--sc/source/core/data/column2.cxx2
-rw-r--r--sc/source/core/data/patattr.cxx2
-rw-r--r--sc/source/core/data/tabprotection.cxx2
-rw-r--r--sc/source/core/tool/interpr2.cxx4
-rw-r--r--sc/source/filter/excel/excrecds.cxx4
-rw-r--r--sc/source/filter/inc/xlview.hxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx4
-rw-r--r--sc/source/ui/app/scmod.cxx2
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx4
-rw-r--r--sc/source/ui/dbgui/imoptdlg.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx4
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx2
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/namecrea.cxx8
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx2
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx2
-rw-r--r--sc/source/ui/view/gridwin3.cxx2
-rw-r--r--sc/source/ui/view/select.cxx2
-rw-r--r--sc/source/ui/view/tabview3.cxx2
-rw-r--r--sc/source/ui/view/tabvwshb.cxx2
-rw-r--r--scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java5
-rw-r--r--sd/source/core/EffectMigration.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx2
-rw-r--r--sd/source/core/undo/undoobjects.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx4
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx10
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx4
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx8
-rw-r--r--sd/source/ui/view/sdview3.cxx2
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx4
-rw-r--r--slideshow/source/engine/shapeattributelayer.cxx46
-rw-r--r--starmath/source/cfgitem.hxx2
-rw-r--r--starmath/source/edit.cxx6
-rw-r--r--starmath/source/mathmlexport.cxx2
-rw-r--r--store/source/storbase.hxx2
-rw-r--r--store/workben/t_page.cxx2
-rw-r--r--svl/source/items/style.cxx2
-rw-r--r--svl/source/numbers/zforlist.cxx8
-rw-r--r--svtools/source/contnr/imivctl1.cxx2
-rw-r--r--svtools/source/contnr/treelist.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx2
-rw-r--r--svx/source/dialog/srchdlg.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx4
-rw-r--r--svx/source/svdraw/svdetc.cxx2
-rw-r--r--svx/source/svdraw/svdobj.cxx2
-rw-r--r--svx/source/unodraw/unoshtxt.cxx4
-rw-r--r--sw/inc/edimp.hxx4
-rw-r--r--sw/inc/ndtxt.hxx4
-rw-r--r--sw/source/core/SwNumberTree/SwNodeNum.cxx2
-rw-r--r--sw/source/core/SwNumberTree/SwNumberTree.cxx2
-rw-r--r--sw/source/core/access/accmap.cxx2
-rw-r--r--sw/source/core/access/accpara.cxx2
-rw-r--r--sw/source/core/crsr/crstrvl.cxx6
-rw-r--r--sw/source/core/doc/doclay.cxx2
-rw-r--r--sw/source/core/doc/docnum.cxx6
-rw-r--r--sw/source/core/doc/docredln.cxx7
-rw-r--r--sw/source/core/docnode/ndsect.cxx4
-rw-r--r--sw/source/core/frmedt/feshview.cxx4
-rw-r--r--sw/source/core/frmedt/fews.cxx8
-rw-r--r--sw/source/core/layout/paintfrm.cxx20
-rw-r--r--sw/source/core/layout/trvlfrm.cxx2
-rw-r--r--sw/source/core/table/swtable.cxx2
-rw-r--r--sw/source/core/text/itrform2.cxx2
-rw-r--r--sw/source/core/text/pormulti.hxx2
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx4
-rw-r--r--sw/source/core/uibase/app/docstyle.cxx2
-rw-r--r--sw/source/core/uibase/docvw/AnnotationWin.cxx4
-rw-r--r--sw/source/core/uibase/docvw/SidebarWin.cxx2
-rw-r--r--sw/source/core/uibase/docvw/edtwin.cxx2
-rw-r--r--sw/source/core/uibase/fldui/fldmgr.cxx4
-rw-r--r--sw/source/core/undo/unsect.cxx2
-rw-r--r--sw/source/core/unocore/unoftn.cxx7
-rw-r--r--sw/source/core/unocore/unoidx.cxx10
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx3
-rw-r--r--sw/source/core/unocore/unoportenum.cxx3
-rw-r--r--sw/source/core/unocore/unorefmk.cxx12
-rw-r--r--sw/source/core/unocore/unosect.cxx3
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par.hxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx3
-rw-r--r--toolkit/qa/complex/toolkit/Assert.java2
-rw-r--r--toolkit/source/awt/vclxwindow.cxx2
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx4
-rw-r--r--toolkit/source/controls/geometrycontrolmodel.cxx6
-rw-r--r--unodevtools/source/skeletonmaker/cpptypemaker.cxx2
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx2
-rw-r--r--vcl/generic/print/common_gfx.cxx6
-rw-r--r--vcl/generic/print/genprnpsp.cxx2
-rw-r--r--vcl/generic/print/printerjob.cxx4
-rw-r--r--vcl/generic/print/text_gfx.cxx6
-rw-r--r--vcl/inc/fontmanager.hxx2
-rw-r--r--vcl/osx/salnativewidgets.cxx2
-rw-r--r--vcl/source/app/settings.cxx2
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/ilstbox.cxx2
-rw-r--r--vcl/source/edit/texteng.cxx2
-rw-r--r--vcl/source/edit/textview.cxx2
-rw-r--r--vcl/source/edit/xtextedt.cxx2
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx2
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx2
-rw-r--r--vcl/source/gdi/bitmap.cxx2
-rw-r--r--vcl/source/gdi/bitmapex.cxx16
-rw-r--r--vcl/source/gdi/impgraph.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx2
-rw-r--r--vcl/source/helper/lazydelete.cxx2
-rw-r--r--vcl/source/outdev/text.cxx4
-rw-r--r--vcl/source/window/builder.cxx6
-rw-r--r--vcl/source/window/dialog.cxx2
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx2
-rw-r--r--vcl/source/window/syswin.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx6
-rw-r--r--vcl/source/window/toolbox2.cxx4
-rw-r--r--vcl/source/window/window.cxx2
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx2
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx2
-rw-r--r--vcl/unx/generic/gdi/salvd.cxx2
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx7
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx6
-rw-r--r--vcl/unx/gtk/window/gtksalframe.cxx4
-rw-r--r--vcl/win/source/window/salframe.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx2
-rw-r--r--xmloff/source/style/PageMasterPropHdl.cxx2
-rw-r--r--xmloff/source/style/xmlimppr.cxx2
-rw-r--r--xmloff/source/text/XMLTextNumRuleInfo.cxx2
-rw-r--r--xmloff/source/xforms/XFormsSubmissionContext.cxx2
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx4
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx4
190 files changed, 315 insertions, 338 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index caa9720142e3..ad19eafbdf16 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -986,7 +986,7 @@ struct IndexCompare
IndexCompare( const ::css::beans::PropertyValue* pVals ) : pValues(pVals) {}
bool operator() ( const sal_Int32& a, const sal_Int32& b ) const
{
- return (pValues[a].Name < pValues[b].Name) ? true : false;
+ return pValues[a].Name < pValues[b].Name;
}
};
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index 6d3ba7e55a0d..beb252cc3f9c 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -157,7 +157,7 @@ void VCLXAccessibleList::FillAccessibleStateSet (utl::AccessibleStateSetHelper&
void VCLXAccessibleList::notifyVisibleStates(bool _bSetNew )
{
- m_bVisible = _bSetNew ? true : false;
+ m_bVisible = _bSetNew;
Any aOldValue, aNewValue;
(_bSetNew ? aNewValue : aOldValue ) <<= AccessibleStateType::VISIBLE;
NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
diff --git a/android/abs-lib/src/com/actionbarsherlock/internal/widget/IcsSpinner.java b/android/abs-lib/src/com/actionbarsherlock/internal/widget/IcsSpinner.java
index 038d1e0318a3..3e0bcd175f9c 100644
--- a/android/abs-lib/src/com/actionbarsherlock/internal/widget/IcsSpinner.java
+++ b/android/abs-lib/src/com/actionbarsherlock/internal/widget/IcsSpinner.java
@@ -606,7 +606,7 @@ public class IcsSpinner extends IcsAbsSpinner implements OnClickListener {
}
public boolean isShowing() {
- return mPopup != null ? mPopup.isShowing() : false;
+ return mPopup && mPopup.isShowing();
}
public void setAdapter(ListAdapter adapter) {
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index 96f7a46b11d5..e52e52463ab1 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -331,7 +331,7 @@ Size MediaWindowImpl::getPreferredSize() const
bool MediaWindowImpl::start()
{
- return( mxPlayer.is() ? ( mxPlayer->start(), true ) : false );
+ return mxPlayer.is() && ( mxPlayer->start(), true );
}
void MediaWindowImpl::updateMediaItem( MediaItem& rItem ) const
@@ -414,7 +414,7 @@ void MediaWindowImpl::executeMediaItem( const MediaItem& rItem )
bool MediaWindowImpl::setZoom( ::com::sun::star::media::ZoomLevel eLevel )
{
- return( mxPlayerWindow.is() ? mxPlayerWindow->setZoomLevel( eLevel ) : false );
+ return mxPlayerWindow.is() && mxPlayerWindow->setZoomLevel( eLevel );
}
::com::sun::star::media::ZoomLevel MediaWindowImpl::getZoom() const
@@ -462,7 +462,7 @@ void MediaWindowImpl::setPlaybackLoop( bool bSet )
bool MediaWindowImpl::isPlaybackLoop() const
{
- return( mxPlayer.is() ? mxPlayer->isPlaybackLoop() : false );
+ return mxPlayer.is() && mxPlayer->isPlaybackLoop();
}
void MediaWindowImpl::setMute( bool bSet )
@@ -473,7 +473,7 @@ void MediaWindowImpl::setMute( bool bSet )
bool MediaWindowImpl::isMute() const
{
- return( mxPlayer.is() ? mxPlayer->isMute() : false );
+ return mxPlayer.is() && mxPlayer->isMute();
}
void MediaWindowImpl::setVolumeDB( sal_Int16 nVolumeDB )
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 8e3b0ac984ca..c7bbb9fbf968 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -215,7 +215,7 @@ namespace basctl
inline bool isValid() const { return m_bValid; }
/** determines whether the instance refers to a non-closed document
*/
- inline bool isAlive() const { return m_bValid ? ( m_bIsApplication ? true : !m_bDocumentClosed ) : false; }
+ inline bool isAlive() const { return m_bValid && ( m_bIsApplication || !m_bDocumentClosed ); }
/// determines whether the "document" refers to the application in real
inline bool isApplication() const { return m_bValid && m_bIsApplication; }
/// determines whether the document refers to a real document (instead of the application)
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 4e4004297060..b0eca563c9f8 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -4377,7 +4377,7 @@ ModuleInvocationProxy::ModuleInvocationProxy( const OUString& aPrefix, SbxObject
, m_xScopeObj( xScopeObj )
, m_aListeners( m_aMutex )
{
- m_bProxyIsClassModuleObject = xScopeObj.Is() ? xScopeObj->ISA(SbClassModuleObject) : false;
+ m_bProxyIsClassModuleObject = xScopeObj.Is() && xScopeObj->ISA(SbClassModuleObject);
}
Reference< XIntrospectionAccess > SAL_CALL ModuleInvocationProxy::getIntrospection() throw(std::exception)
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index 1987e92890cf..9d20c6d497e4 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -199,7 +199,7 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, bool bAsNewAlreadyParsed )
void SbiParser::Dim()
{
- DefVar( _DIM, ( pProc && bVBASupportOn ) ? pProc->IsStatic() : false );
+ DefVar( _DIM, pProc && bVBASupportOn && pProc->IsStatic() );
}
void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
@@ -549,7 +549,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
void SbiParser::ReDim()
{
- DefVar( _REDIM, ( pProc && bVBASupportOn ) ? pProc->IsStatic() : false );
+ DefVar( _REDIM, pProc && bVBASupportOn && pProc->IsStatic() );
}
// ERASE array, ...
diff --git a/canvas/source/directx/dx_bitmapcanvashelper.cxx b/canvas/source/directx/dx_bitmapcanvashelper.cxx
index e9577e1331b6..e8eeddd0adab 100644
--- a/canvas/source/directx/dx_bitmapcanvashelper.cxx
+++ b/canvas/source/directx/dx_bitmapcanvashelper.cxx
@@ -230,7 +230,7 @@ namespace dxcanvas
}
bool BitmapCanvasHelper::hasAlpha() const
{
- return mpTarget ? mpTarget->hasAlpha() : false;
+ return mpTarget && mpTarget->hasAlpha();
}
}
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index 6ee3dabd4263..a1917dd0a33d 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -746,7 +746,7 @@ namespace oglcanvas
aFont.SetAlign( ALIGN_BASELINE );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==util::TriState_YES) ? true : false );
+ aFont.SetVertical( rFontRequest.FontDescription.IsVertical==util::TriState_YES );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx
index ab1391bc2b0e..8f80939a2294 100644
--- a/canvas/source/vcl/impltools.hxx
+++ b/canvas/source/vcl/impltools.hxx
@@ -130,7 +130,7 @@ namespace vclcanvas
explicit OutDevStateKeeper( const OutDevProviderSharedPtr& rOutDev ) :
mpOutDev( rOutDev.get() ? &(rOutDev->getOutDev()) : NULL ),
- mbMappingWasEnabled( mpOutDev ? mpOutDev->IsMapModeEnabled() : false ),
+ mbMappingWasEnabled( mpOutDev && mpOutDev->IsMapModeEnabled() ),
mnAntiAliasing( mpOutDev ? mpOutDev->GetAntialiasing() : 0 )
{
init();
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 20645416fa42..f011de58fd90 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -139,7 +139,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
m_bProvidesStartingAngle = ChartTypeHelper::isSupportingStartingAngle( xChartType );
m_bProvidesMissingValueTreatments = ChartTypeHelper::getSupportedMissingValueTreatments( xChartType )
- .getLength() ? true : false;
+ .getLength();
}
}
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 87734a58d8c4..2ca2bf65a91f 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -125,7 +125,7 @@ void LegendPositionResources::writeToModel( const ::com::sun::star::uno::Referen
{
try
{
- bool bShowLegend = m_pCbxShow ? m_pCbxShow->IsChecked() : false;
+ bool bShowLegend = m_pCbxShow && m_pCbxShow->IsChecked();
ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
uno::Reference< beans::XPropertySet > xProp( LegendHelper::getLegend( *pModel,m_xCC,bShowLegend ), uno::UNO_QUERY );
if( xProp.is() )
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index a60f172b3018..8437a57758aa 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -816,7 +816,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
{
bool bDraggingDone = false;
SdrDragMethod* pDragMethod = pDrawViewWrapper->SdrView::GetDragMethod();
- bool bIsMoveOnly = pDragMethod ? pDragMethod->getMoveOnly() : false;
+ bool bIsMoveOnly = pDragMethod && pDragMethod->getMoveOnly();
DragMethod_Base* pChartDragMethod = dynamic_cast< DragMethod_Base* >(pDragMethod);
if( pChartDragMethod )
{
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 2e0f7a59227b..fe3fbb3e3c5b 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -523,7 +523,7 @@ void ControllerCommandDispatch::updateCommandAvailability()
// @todo: determine correctly
bool bHasSuitableClipboardContent = true;
- bool bShapeContext = ( m_pChartController ? m_pChartController->isShapeContext() : false );
+ bool bShapeContext = m_pChartController && m_pChartController->isShapeContext();
bool bDisableDataTableDialog = false;
if ( m_xController.is() )
diff --git a/cli_ure/source/uno_bridge/cli_data.cxx b/cli_ure/source/uno_bridge/cli_data.cxx
index 219438a2fb66..a5e2f38eab87 100644
--- a/cli_ure/source/uno_bridge/cli_data.cxx
+++ b/cli_ure/source/uno_bridge/cli_data.cxx
@@ -1103,11 +1103,11 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
void * p = (char *) uno_data + comp_td->pMemberOffsets[ nPos ];
//When using polymorphic structs then the parameterized members can be null.
//Then we set a default value.
- bool bDefault = ((struct_td != NULL
+ bool bDefault = (struct_td != NULL
&& struct_td->pParameterizedTypes != NULL
&& struct_td->pParameterizedTypes[nPos] == sal_True
- && val == nullptr)
- || cli_data == nullptr) ? true : false;
+ && val == nullptr)
+ || cli_data == nullptr;
switch (member_type->eTypeClass)
{
case typelib_TypeClass_CHAR:
@@ -1504,7 +1504,7 @@ void Bridge::map_to_cli(
*cli_data= *(__wchar_t const*)uno_data;
break;
case typelib_TypeClass_BOOLEAN:
- *cli_data = (*(bool const*)uno_data) == sal_True ? true : false;
+ *cli_data = (*(bool const*)uno_data) == sal_True;
break;
case typelib_TypeClass_BYTE:
*cli_data = *(unsigned char const*) uno_data;
diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx
index b747f79d6541..374142ae08b3 100644
--- a/comphelper/source/misc/syntaxhighlight.cxx
+++ b/comphelper/source/misc/syntaxhighlight.cxx
@@ -292,7 +292,7 @@ bool SyntaxHighlighter::Tokenizer::testCharFlags( sal_Unicode c, sal_uInt16 nTes
else if( c > 255 )
{
bRet = (( CHAR_START_IDENTIFIER | CHAR_IN_IDENTIFIER ) & nTestFlags) != 0
- ? isAlpha(c) : false;
+ && isAlpha(c);
}
return bRet;
}
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index 9208b54975b3..4e5514725176 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -227,7 +227,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W
bool operator()( const DriverAccess& lhs, const DriverAccess& rhs )
{
- return lhs.sImplementationName < rhs.sImplementationName ? true : false;
+ return lhs.sImplementationName < rhs.sImplementationName;
}
};
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 15d202fc6f7e..987a64274545 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2556,7 +2556,7 @@ bool OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& )
const bool bModifiedRecognize = ( !m_pMainCB->IsChecked() != !pSmartTagMgr->IsLabelTextWithSmartTags() );
if ( bModifiedSmartTagTypes || bModifiedRecognize )
{
- bool bLabelTextWithSmartTags = m_pMainCB->IsChecked() ? true : false;
+ bool bLabelTextWithSmartTags = m_pMainCB->IsChecked();
pSmartTagMgr->WriteConfiguration( bModifiedRecognize ? &bLabelTextWithSmartTags : 0,
bModifiedSmartTagTypes ? &aDisabledSmartTagTypes : 0 );
}
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 73a472f288eb..83b1f5898a99 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -708,7 +708,7 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs )
if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxWhich, false ))
{
- bPut = aBoxItem != (const SvxBoxItem&)(rOldSet.Get(nBoxWhich)) ? true : false;
+ bPut = aBoxItem != (const SvxBoxItem&)(rOldSet.Get(nBoxWhich));
}
if( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxInfoWhich, false ) )
{
diff --git a/dbaccess/qa/complex/dbaccess/TestCase.java b/dbaccess/qa/complex/dbaccess/TestCase.java
index 7a37f5d4890c..b30bf7c2a3c1 100644
--- a/dbaccess/qa/complex/dbaccess/TestCase.java
+++ b/dbaccess/qa/complex/dbaccess/TestCase.java
@@ -124,7 +124,7 @@ public abstract class TestCase
boolean noExceptionAllowed = ( _expectedExceptionClass == null );
- boolean caughtExpected = noExceptionAllowed ? true : false;
+ boolean caughtExpected = noExceptionAllowed;
try
{
Method method = objectClass.getMethod( _methodName, _argClasses );
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index dd7d6f800222..dc5c00d8e59a 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -946,7 +946,7 @@ bool OGenericUnoController::isUserDefinedFeature( const OUString& _rFeatureURL )
OSL_PRECOND( pos != m_aSupportedFeatures.end(),
"OGenericUnoController::isUserDefinedFeature: this is no supported feature at all!" );
- return ( pos != m_aSupportedFeatures.end() ) ? isUserDefinedFeature( pos->second.nFeatureId ) : false;
+ return ( pos != m_aSupportedFeatures.end() ) && isUserDefinedFeature( pos->second.nFeatureId );
}
sal_Bool SAL_CALL OGenericUnoController::supportsService(const OUString& ServiceName) throw(RuntimeException, std::exception)
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 9a326fcb2214..ccfb06a50471 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -554,7 +554,7 @@ OUString ODbDataSourceAdministrationHelper::getConnectionURL() const
struct PropertyValueLess
{
bool operator() (const PropertyValue& x, const PropertyValue& y) const
- { return x.Name < y.Name ? true : false; } // construct prevents a MSVC6 warning
+ { return x.Name < y.Name; } // construct prevents a MSVC6 warning
};
typedef std::set<PropertyValue, PropertyValueLess> PropertyValueSet;
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 62178173e65c..49b9497e118c 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -45,7 +45,7 @@ namespace dbaui
{
struct SbaURLCompare : public ::std::binary_function< ::com::sun::star::util::URL, ::com::sun::star::util::URL, bool>
{
- bool operator() (const ::com::sun::star::util::URL& x, const ::com::sun::star::util::URL& y) const {return x.Complete == y.Complete ? true : false;}
+ bool operator() (const ::com::sun::star::util::URL& x, const ::com::sun::star::util::URL& y) const { return x.Complete == y.Complete; }
};
class SbaXStatusMultiplexer;
diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
index ae0adfa4697a..4d97d18297d9 100644
--- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
+++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
@@ -176,7 +176,7 @@ void OQueryViewSwitch::impl_forceSQLView()
OAddTableDlg* pAddTabDialog( getAddTableDialog() );
// hide the "Add Table" dialog
- m_bAddTableDialogWasVisible = pAddTabDialog ? pAddTabDialog->IsVisible() : false;
+ m_bAddTableDialogWasVisible = pAddTabDialog && pAddTabDialog->IsVisible();
if ( m_bAddTableDialogWasVisible )
pAddTabDialog->Hide();
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 73c11f34075d..11120f2778c7 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -601,7 +601,7 @@ bool ExtensionManager::doChecksForAddExtension(
new NoLicenseCommandEnv(xCmdEnv->getInteractionHandler()));
bCanInstall = xTmpExtension->checkPrerequisites(
- xAbortChannel, _xCmdEnv, xOldExtension.is() || props.isExtensionUpdate()) == 0 ? true : false;
+ xAbortChannel, _xCmdEnv, xOldExtension.is() || props.isExtensionUpdate()) == 0;
return bCanInstall;
}
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 0b460e8d00ee..04c07b26ad5c 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -214,7 +214,7 @@ void PackageManagerImpl::initActivationLayer(
}
}
- bool bShared = (m_context == "shared") ? true : false;
+ bool bShared = (m_context == "shared");
for ( ::std::size_t pos = 0; pos < tempEntries.size(); ++pos )
{
OUString const & tempEntry = tempEntries[ pos ];
diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
index 072de5391ecb..565efb405137 100644
--- a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
+++ b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
@@ -111,8 +111,7 @@ ComponentBackendDb::Data ComponentBackendDb::getEntry(OUString const & url)
Reference<css::xml::dom::XNode> aNode = getKeyElement(url);
if (aNode.is())
{
- bool bJava = (readSimpleElement("java-type-library", aNode) ==
- "true") ? true : false;
+ bool bJava = readSimpleElement("java-type-library", aNode) == "true";
retData.javaTypeLibrary = bJava;
retData.implementationNames =
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index fc7f689111c9..0c9e494357d1 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -916,7 +916,7 @@ namespace accessibility
IndexCompare( const PropertyValue* pVals ) : pValues(pVals) {}
bool operator() ( const sal_Int32& a, const sal_Int32& b ) const
{
- return (pValues[a].Name < pValues[b].Name) ? true : false;
+ return pValues[a].Name < pValues[b].Name;
}
};
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 69c3e753b8fb..08f0b7968876 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -306,7 +306,7 @@ bool Outliner::IsParaIsNumberingRestart( sal_Int32 nPara )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
DBG_ASSERT( pPara, "Outliner::IsParaIsNumberingRestart - Paragraph not found!" );
- return pPara ? pPara->IsParaIsNumberingRestart() : false;
+ return pPara && pPara->IsParaIsNumberingRestart();
}
void Outliner::SetParaIsNumberingRestart( sal_Int32 nPara, bool bParaIsNumberingRestart )
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 0b9ee1624584..0746aa3847e3 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -1215,7 +1215,7 @@ void SvxRTFItemStackType::SetStartPos( const SvxPosition& rPos )
void SvxRTFItemStackType::MoveFullNode(const SvxNodeIdx &rOldNode,
const SvxNodeIdx &rNewNode)
{
- bool bSameEndAsStart = (pSttNd == pEndNd) ? true : false;
+ bool bSameEndAsStart = (pSttNd == pEndNd);
if (GetSttNodeIdx() == rOldNode.GetIdx())
{
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index f96d005cef29..f7070bfe6eb1 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -2249,7 +2249,7 @@ bool IUnknownWrapper_Impl::getDispid(const OUString& sFuncName, DISPID * id)
OSL_ASSERT(m_spDispatch);
LPOLESTR lpsz = const_cast<LPOLESTR> (reinterpret_cast<LPCOLESTR>(sFuncName.getStr()));
HRESULT hr = m_spDispatch->GetIDsOfNames(IID_NULL, &lpsz, 1, LOCALE_USER_DEFAULT, id);
- return hr == S_OK ? true : false;
+ return hr == S_OK;
}
void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** pFuncDesc)
diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx
index 41fbf95a2ce5..e3bf34a93eee 100644
--- a/extensions/source/propctrlr/cellbindinghelper.cxx
+++ b/extensions/source/propctrlr/cellbindinghelper.cxx
@@ -70,7 +70,7 @@ namespace pcr
inline bool operator()( const OUString& _rCompare )
{
- return ( _rCompare == m_sReference ) ? true : false;
+ return ( _rCompare == m_sReference );
}
};
}
diff --git a/extensions/source/propctrlr/formbrowsertools.hxx b/extensions/source/propctrlr/formbrowsertools.hxx
index 30c49e15bdb0..5dd9a8f4036c 100644
--- a/extensions/source/propctrlr/formbrowsertools.hxx
+++ b/extensions/source/propctrlr/formbrowsertools.hxx
@@ -72,7 +72,7 @@ namespace pcr
{
bool operator() (::com::sun::star::beans::Property _rLhs, ::com::sun::star::beans::Property _rRhs) const
{
- return _rLhs.Name < _rRhs.Name ? true : false;
+ return _rLhs.Name < _rRhs.Name;
}
};
@@ -85,7 +85,7 @@ namespace pcr
{
bool operator() (::com::sun::star::uno::Type _rLhs, ::com::sun::star::uno::Type _rRhs) const
{
- return _rLhs.getTypeName() < _rRhs.getTypeName() ? true : false;
+ return _rLhs.getTypeName() < _rRhs.getTypeName();
}
};
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index cc8382d2a812..c1ad14096799 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -190,7 +190,7 @@ namespace frm
continue;
// is this item enabled?
- bool bEnabled = m_pDispatcher ? m_pDispatcher->isEnabled( nItemId ) : false;
+ bool bEnabled = m_pDispatcher && m_pDispatcher->isEnabled( nItemId );
implEnableItem( nItemId, bEnabled );
}
}
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx
index eb5ea49c78ff..72806b0593fb 100644
--- a/forms/source/xforms/binding.cxx
+++ b/forms/source/xforms/binding.cxx
@@ -498,7 +498,7 @@ void Binding::checkModel()
bool Binding::isLive() const
{
const Model* pModel = getModelImpl();
- return ( pModel != NULL ) ? pModel->isInitialized() : false;
+ return pModel && pModel->isInitialized();
}
Model* Binding::getModelImpl() const
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 77add1dec9ac..7c2520ad102c 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -365,11 +365,11 @@ namespace {
*this
);
- return bMatch ? true : false;
+ return bMatch;
}
bool operator () ( const UnoFilterEntry& _rEntry )
{
- return _rEntry.First == rTitle ? true : false;
+ return _rEntry.First == rTitle;
}
};
}
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index 86307faf79a3..23d74535b6c9 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -48,7 +48,7 @@ using namespace std;
static bool lcl_I18nCompareString(const OUString& rStr1, const OUString& rStr2)
{
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
- return rI18nHelper.CompareString( rStr1, rStr2 ) < 0 ? true : false;
+ return rI18nHelper.CompareString( rStr1, rStr2 ) < 0;
}
namespace framework
diff --git a/include/comphelper/property.hxx b/include/comphelper/property.hxx
index 5dc53bc33ac0..fd7ed830b8d3 100644
--- a/include/comphelper/property.hxx
+++ b/include/comphelper/property.hxx
@@ -48,7 +48,7 @@ namespace comphelper
{
bool operator() (const ::com::sun::star::beans::Property& x, const ::com::sun::star::beans::Property& y) const
{
- return x.Name.compareTo(y.Name) < 0;// ? true : false;
+ return x.Name.compareTo(y.Name) < 0;
}
};
diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx
index 28f3a14ad6a6..b9bfbe3778b7 100644
--- a/include/comphelper/stl_types.hxx
+++ b/include/comphelper/stl_types.hxx
@@ -49,9 +49,9 @@ public:
bool operator() (const OUString& x, const OUString& y) const
{
if (m_bCaseSensitive)
- return rtl_ustr_compare(x.getStr(), y.getStr()) < 0 ? true : false;
+ return rtl_ustr_compare(x.getStr(), y.getStr()) < 0;
else
- return rtl_ustr_compareIgnoreAsciiCase(x.getStr(), y.getStr()) < 0 ? true : false;
+ return rtl_ustr_compareIgnoreAsciiCase(x.getStr(), y.getStr()) < 0;
}
bool isCaseSensitive() const {return m_bCaseSensitive;}
diff --git a/include/svl/urlfilter.hxx b/include/svl/urlfilter.hxx
index e8065fa8fae1..c607dd32c711 100644
--- a/include/svl/urlfilter.hxx
+++ b/include/svl/urlfilter.hxx
@@ -33,7 +33,7 @@ public:
bool operator()( const WildCard& _rMatcher )
{
- return _rMatcher.Matches( m_rCompareString ) ? true : false;
+ return _rMatcher.Matches( m_rCompareString );
}
static void createWildCardFilterList(const OUString& _rFilterList,::std::vector< WildCard >& _rFilters);
diff --git a/include/vcl/bmpacc.hxx b/include/vcl/bmpacc.hxx
index e96f49c02d5f..153464faabd9 100644
--- a/include/vcl/bmpacc.hxx
+++ b/include/vcl/bmpacc.hxx
@@ -254,7 +254,7 @@ inline Point BitmapReadAccess::BottomRight() const
inline bool BitmapReadAccess::IsTopDown() const
{
DBG_ASSERT( mpBuffer, "Access is not valid!" );
- return( mpBuffer ? sal::static_int_cast<bool>( BMP_SCANLINE_ADJUSTMENT( mpBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) : false );
+ return mpBuffer && ( BMP_SCANLINE_ADJUSTMENT( mpBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN );
}
diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index fb618d1a21d7..82f53a2d94c9 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -68,7 +68,7 @@ public:
Image GetColorTransformedImage( ImageColorTransform eColorTransform ) const;
- bool operator!() const { return( !mpImplData ? true : false ); }
+ bool operator!() const { return !mpImplData; }
Image& operator=( const Image& rImage );
bool operator==( const Image& rImage ) const;
bool operator!=( const Image& rImage ) const { return !(Image::operator==( rImage )); }
diff --git a/include/vcl/keycod.hxx b/include/vcl/keycod.hxx
index 4029c30bc618..20e80cf02eae 100644
--- a/include/vcl/keycod.hxx
+++ b/include/vcl/keycod.hxx
@@ -67,7 +67,7 @@ public:
OUString GetName( Window* pWindow = NULL ) const;
bool IsFunction() const
- { return ((eFunc != KEYFUNC_DONTKNOW) ? true : false); }
+ { return (eFunc != KEYFUNC_DONTKNOW); }
KeyFuncType GetFunction() const;
diff --git a/include/vcl/textdata.hxx b/include/vcl/textdata.hxx
index 1f475878a01e..8fbc62fd8146 100644
--- a/include/vcl/textdata.hxx
+++ b/include/vcl/textdata.hxx
@@ -52,7 +52,7 @@ public:
inline bool TextPaM::operator == ( const TextPaM& rPaM ) const
{
- return ( ( mnPara == rPaM.mnPara ) && ( mnIndex == rPaM.mnIndex ) ) ? true : false;
+ return ( mnPara == rPaM.mnPara ) && ( mnIndex == rPaM.mnIndex );
}
inline bool TextPaM::operator != ( const TextPaM& rPaM ) const
@@ -62,14 +62,14 @@ inline bool TextPaM::operator != ( const TextPaM& rPaM ) const
inline bool TextPaM::operator < ( const TextPaM& rPaM ) const
{
- return ( ( mnPara < rPaM.mnPara ) ||
- ( ( mnPara == rPaM.mnPara ) && mnIndex < rPaM.mnIndex ) ) ? true : false;
+ return ( mnPara < rPaM.mnPara ) ||
+ ( ( mnPara == rPaM.mnPara ) && mnIndex < rPaM.mnIndex );
}
inline bool TextPaM::operator > ( const TextPaM& rPaM ) const
{
- return ( ( mnPara > rPaM.mnPara ) ||
- ( ( mnPara == rPaM.mnPara ) && mnIndex > rPaM.mnIndex ) ) ? true : false;
+ return ( mnPara > rPaM.mnPara ) ||
+ ( ( mnPara == rPaM.mnPara ) && mnIndex > rPaM.mnIndex );
}
class VCL_DLLPUBLIC TextSelection
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 91db8cb0a3b5..665978076727 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -49,7 +49,7 @@ public:
/// set the timeout in milliseconds
void SetTimeout( sal_uLong nTimeoutMs );
sal_uLong GetTimeout() const { return mnTimeout; }
- bool IsActive() const { return mbActive ? true : false; }
+ bool IsActive() const { return mbActive; }
void SetTimeoutHdl( const Link& rLink ) { maTimeoutHdl = rLink; }
const Link& GetTimeoutHdl() const { return maTimeoutHdl; }
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 2fff37c61af9..d3d4cfb4b895 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -1156,7 +1156,7 @@ void Export::MergeRest( ResData *pResData )
MergeEntrys* pEntrys = pMergeDataFile->GetMergeEntrys( pResData );
OString sText;
- bool bText = pEntrys ? pEntrys->GetText( sText, STRING_TYP_TEXT, sCur, true ) : false;
+ bool bText = pEntrys && pEntrys->GetText( sText, STRING_TYP_TEXT, sCur, true );
if( bText && !sText.isEmpty())
{
diff --git a/qadevOOo/runner/complexlib/Assurance.java b/qadevOOo/runner/complexlib/Assurance.java
index 0a43aae6b1c9..41f7ae4ffc4c 100644
--- a/qadevOOo/runner/complexlib/Assurance.java
+++ b/qadevOOo/runner/complexlib/Assurance.java
@@ -263,7 +263,7 @@ public class Assurance
boolean noExceptionAllowed = ( _expectedExceptionClass == null );
- boolean caughtExpected = noExceptionAllowed ? true : false;
+ boolean caughtExpected = noExceptionAllowed;
try
{
Method method = objectClass.getMethod( _methodName, _argClasses );
diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java
index fc870d08b7c6..649341ecf45e 100644
--- a/qadevOOo/runner/convwatch/IniFile.java
+++ b/qadevOOo/runner/convwatch/IniFile.java
@@ -102,7 +102,7 @@ class IniFile
*/
public boolean is()
{
- return m_aList.size() > 1 ? true : false;
+ return m_aList.size() > 1;
}
diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java
index 5776567c471a..080b68534933 100644
--- a/qadevOOo/runner/convwatch/OfficePrint.java
+++ b/qadevOOo/runner/convwatch/OfficePrint.java
@@ -682,7 +682,7 @@ public class OfficePrint {
// System.out.println(aPrinterProps[nPropIndex].Name);
nPropIndex++;
}
- isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE) ? true : false;
+ isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE);
TimeHelper.waitInSeconds(1, "is print ready?");
nPrintCount++;
if (nPrintCount > 3600)
diff --git a/qadevOOo/runner/graphical/IniFile.java b/qadevOOo/runner/graphical/IniFile.java
index c3a72ecfd747..23a4290548ae 100644
--- a/qadevOOo/runner/graphical/IniFile.java
+++ b/qadevOOo/runner/graphical/IniFile.java
@@ -123,7 +123,7 @@ public class IniFile implements Enumeration<String>
*/
public boolean is()
{
- return m_aList.size() > 1 ? true : false;
+ return m_aList.size() > 1;
}
/**
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index 361f105ff6ed..4c04e2249eaa 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
@@ -652,7 +652,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// System.out.println(aPrinterProps[nPropIndex].Name);
nPropIndex++;
}
- isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE) ? true : false;
+ isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE);
TimeHelper.waitInSeconds(1, "is print ready?");
nPrintCount++;
if (nPrintCount > 3600)
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx
index 0cb238a87f80..a25f5a56ed8e 100644
--- a/rsc/source/res/rscclass.cxx
+++ b/rsc/source/res/rscclass.cxx
@@ -721,8 +721,7 @@ ERRTYPE RscClass::WriteInstRc( const RSCINST & rInst,
aError = aTmpI.pClass->
WriteRcHeader( aTmpI, rMem, pTC,
RscId(), nDeep,
- (nRsc_EXTRADATA == pVarTypeList[ i ].nVarName)
- ? bExtra : false );
+ (nRsc_EXTRADATA == pVarTypeList[ i ].nVarName) && bExtra );
}
sal_uInt32 nMask = rMem.GetLong( nMaskOff );
nMask |= pVarTypeList[ i ].nMask;
@@ -744,8 +743,7 @@ ERRTYPE RscClass::WriteInstRc( const RSCINST & rInst,
aError = aTmpI.pClass->
WriteRcHeader( aTmpI, rMem, pTC,
RscId(), nDeep,
- (nRsc_EXTRADATA == pVarTypeList[ i ].nVarName)
- ? bExtra : false );
+ (nRsc_EXTRADATA == pVarTypeList[ i ].nVarName) && bExtra );
}
}
}
diff --git a/sal/qa/osl/socket/osl_StreamSocket.cxx b/sal/qa/osl/socket/osl_StreamSocket.cxx
index d99753cf6763..05906f0f239b 100644
--- a/sal/qa/osl/socket/osl_StreamSocket.cxx
+++ b/sal/qa/osl/socket/osl_StreamSocket.cxx
@@ -970,9 +970,9 @@ namespace osl_StreamSocket
}
public:
- sal_Int32 getCount() {return m_nReadCount;}
- bool isOk() {return m_nReadCount == 0 ? false : true;}
- bool getFailed() {return m_bOk == false ? true : false;}
+ sal_Int32 getCount() { return m_nReadCount; }
+ bool isOk() { return m_nReadCount != 0; }
+ bool getFailed() { return m_bOk == false; }
ReadSocket2Thread(osl::Condition &_aCondition)
:m_aCondition(_aCondition),
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 7cdd62af311a..32324971a002 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -3197,7 +3197,7 @@ SCSIZE ScColumn::GetPatternCount( SCROW nRow1, SCROW nRow2 ) const
bool ScColumn::ReservePatternCount( SCSIZE nReserve )
{
- return pAttrArray ? pAttrArray->Reserve( nReserve ) : false;
+ return pAttrArray && pAttrArray->Reserve( nReserve );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 79905b68f76d..0599896315a1 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -118,7 +118,7 @@ SfxPoolItem* ScPatternAttr::Clone( SfxItemPool *pPool ) const
inline bool StrCmp( const OUString* pStr1, const OUString* pStr2 )
{
- return ( pStr1 ? ( pStr2 ? ( *pStr1 == *pStr2 ) : false ) : ( pStr2 ? false : true ) );
+ return ( pStr1 ? ( pStr2 && ( *pStr1 == *pStr2 ) ) : ( pStr2 ? false : true ) );
}
inline bool EqualPatternSets( const SfxItemSet& rSet1, const SfxItemSet& rSet2 )
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index 52bc0fea382c..9beb2063507a 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -293,7 +293,7 @@ void ScTableProtectionImpl::setPasswordHash(
const uno::Sequence<sal_Int8>& aPassword, ScPasswordHash eHash, ScPasswordHash eHash2)
{
sal_Int32 nLen = aPassword.getLength();
- mbEmptyPass = nLen <= 0 ? true : false;
+ mbEmptyPass = nLen <= 0;
meHash1 = eHash;
meHash2 = eHash2;
maPassHash = aPassword;
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 7042189beb4d..949bc9f2647d 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -800,7 +800,7 @@ void ScInterpreter::ScCeil()
sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
- bool bAbs = ( nParamCount == 3 ? GetBool() : false );
+ bool bAbs = nParamCount == 3 && GetBool();
double fDec = GetDouble();
double fVal = GetDouble();
if ( fDec == 0.0 )
@@ -845,7 +845,7 @@ void ScInterpreter::ScFloor()
sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
- bool bAbs = ( nParamCount == 3 ? GetBool() : false );
+ bool bAbs = nParamCount == 3 && GetBool();
double fDec = GetDouble();
double fVal = GetDouble();
if ( fDec == 0.0 )
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 4f37aac58c5a..796b95ca543e 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -302,8 +302,8 @@ const sal_uInt8* ExcDummy_041::GetData( void ) const
Exc1904::Exc1904( ScDocument& rDoc )
{
Date* pDate = rDoc.GetFormatTable()->GetNullDate();
- bVal = pDate ? (*pDate == Date( 1, 1, 1904 )) : false;
- bDateCompatibility = pDate ? !( *pDate == Date( 30, 12, 1899 )) : false;
+ bVal = pDate && (*pDate == Date( 1, 1, 1904 ));
+ bDateCompatibility = pDate && !( *pDate == Date( 30, 12, 1899 ));
}
diff --git a/sc/source/filter/inc/xlview.hxx b/sc/source/filter/inc/xlview.hxx
index ccdea673c039..37d88d0cf5f3 100644
--- a/sc/source/filter/inc/xlview.hxx
+++ b/sc/source/filter/inc/xlview.hxx
@@ -141,7 +141,7 @@ struct XclTabViewData
bool mbShowZeros; /// true = Show zero value zells.
bool mbShowOutline; /// true = Show outlines.
Color maTabBgColor; /// Tab Color default = (COL_AUTO )
- bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? sal_True : false; };
+ bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO); };
sal_uInt32 mnTabBgColorId; /// pallette color id
explicit XclTabViewData();
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index c4418de8b331..c547a9eafb6a 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -446,8 +446,8 @@ void ScInputWindow::Select()
for ( size_t i = 0; i < nCount; ++i )
{
const ScRange aRange( *aMarkRangeList[i] );
- const bool bSetCursor = ( i == nCount - 1 ? true : false );
- const bool bContinue = ( i != 0 ? true : false );
+ const bool bSetCursor = ( i == nCount - 1 );
+ const bool bContinue = ( i != 0 );
if ( !pViewSh->AutoSum( aRange, bSubTotal, bSetCursor, bContinue ) )
{
pViewSh->MarkRange( aRange, false, false );
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 586686de142c..4a3c6c94f3bc 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1449,7 +1449,7 @@ bool ScModule::IsInputMode()
bool ScModule::InputKeyEvent( const KeyEvent& rKEvt, bool bStartEdit )
{
ScInputHandler* pHdl = GetInputHdl();
- return ( pHdl ? pHdl->KeyInput( rKEvt, bStartEdit ) : false );
+ return pHdl && pHdl->KeyInput( rKEvt, bStartEdit );
}
void ScModule::InputEnterHandler( sal_uInt8 nBlockMode )
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 268e1949dbd8..ef39fdf1d3de 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -272,14 +272,14 @@ void ScAsciiOptions::ReadFromString( const OUString& rString )
if (nCount >= 7)
{
aToken = rString.getToken(6, ',');
- bQuotedFieldAsText = aToken.equalsAscii("true") ? true : false;
+ bQuotedFieldAsText = aToken.equalsAscii("true");
}
// Detect special numbers.
if (nCount >= 8)
{
aToken = rString.getToken(7, ',');
- bDetectSpecialNumber = aToken.equalsAscii("true") ? true : false;
+ bDetectSpecialNumber = aToken.equalsAscii("true");
}
else
bDetectSpecialNumber = true; // default of versions that didn't add the parameter
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
index 4dbc1d45b5d4..39c44a3d702b 100644
--- a/sc/source/ui/dbgui/imoptdlg.cxx
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
@@ -60,7 +60,7 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
if ( nTokenCount == 4 )
{
// compatibility with old options string: "Save as shown" as 4th token, numeric
- bSaveAsShown = (rStr.getToken( 3, ',' ).toInt32() ? sal_True : false);
+ bSaveAsShown = (rStr.getToken( 3, ',' ).toInt32() ? true : false);
bQuoteAllText = true; // use old default then
}
else
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 9a9daa3f42d7..b57fc91ce9f6 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2971,7 +2971,7 @@ bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, bool bRecord, bo
if( !rDocShell.GetDocument()->IsImportingXML() )
{
- bInsertDocModule = pDoc ? pDoc->IsInVBAMode() : false;
+ bInsertDocModule = pDoc && pDoc->IsInVBAMode();
}
if ( bInsertDocModule || ( bRecord && !pDoc->IsUndoEnabled() ) )
bRecord = false;
@@ -3017,7 +3017,7 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ )
bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
- bool bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false;
+ bool bVbaEnabled = pDoc && pDoc->IsInVBAMode();
if (bRecord && !pDoc->IsUndoEnabled())
bRecord = false;
if ( bVbaEnabled )
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 8d1a7ff001a3..402cb4ac1331 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -375,7 +375,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
SetMouseButtonCode(rMEvt.GetButtons());
bool bReturn = FuDraw::MouseButtonUp(rMEvt);
- bool bOle = pViewShell ? pViewShell->GetViewFrame()->GetFrame().IsInPlace() : false;
+ bool bOle = pViewShell && pViewShell->GetViewFrame()->GetFrame().IsInPlace();
SdrObject* pObj = NULL;
SdrPageView* pPV = NULL;
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 7b6571a13b12..248504c31696 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -101,7 +101,7 @@ void ScInsertTableDlg::Init_Impl( bool bFromFile )
m_pEdName->Disable();
}
- bool bShared = ( rViewData.GetDocShell() ? rViewData.GetDocShell()->IsDocShared() : false );
+ bool bShared = rViewData.GetDocShell() && rViewData.GetDocShell()->IsDocShared();
if ( !bFromFile || bShared )
{
diff --git a/sc/source/ui/miscdlgs/namecrea.cxx b/sc/source/ui/miscdlgs/namecrea.cxx
index 74b462e0f627..722a39500ca7 100644
--- a/sc/source/ui/miscdlgs/namecrea.cxx
+++ b/sc/source/ui/miscdlgs/namecrea.cxx
@@ -30,10 +30,10 @@ ScNameCreateDlg::ScNameCreateDlg( Window * pParent, sal_uInt16 nFlags )
get(m_pLeftBox, "left");
get(m_pBottomBox, "bottom");
get(m_pRightBox, "right");
- m_pTopBox->Check ( (nFlags & NAME_TOP) ? sal_True : false );
- m_pLeftBox->Check ( (nFlags & NAME_LEFT) ? sal_True : false );
- m_pBottomBox->Check( (nFlags & NAME_BOTTOM)? sal_True : false );
- m_pRightBox->Check ( (nFlags & NAME_RIGHT) ? sal_True : false );
+ m_pTopBox->Check ( (nFlags & NAME_TOP) ? true : false );
+ m_pLeftBox->Check ( (nFlags & NAME_LEFT) ? true : false );
+ m_pBottomBox->Check( (nFlags & NAME_BOTTOM)? true : false );
+ m_pRightBox->Check ( (nFlags & NAME_RIGHT) ? true : false );
}
sal_uInt16 ScNameCreateDlg::GetFlags() const
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 478a56da7614..ca0e15810a2d 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -93,7 +93,7 @@ ScShareDocumentDlg::ScShareDocumentDlg( Window* pParent, ScViewData* pViewData )
m_aStrUnknownUser = get<FixedText>("unknownuser")->GetText();
m_aStrExclusiveAccess = get<FixedText>("exclusive")->GetText();
- bool bIsDocShared = ( mpDocShell ? mpDocShell->IsDocShared() : false );
+ bool bIsDocShared = mpDocShell && mpDocShell->IsDocShared();
m_pCbShare->Check( bIsDocShared );
m_pCbShare->SetToggleHdl( LINK( this, ScShareDocumentDlg, ToggleHandle ) );
m_pFtWarning->Enable( bIsDocShared );
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 7d35b067a199..1e7ad55be0e7 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -173,7 +173,7 @@ IMPL_LINK( AlignmentPropertyPanel, RotationHdl, void *, EMPTYARG )
IMPL_LINK( AlignmentPropertyPanel, ClickStackHdl, void *, EMPTYARG )
{
- bool bVertical = mpCbStacked->IsChecked() ? true : false;
+ bool bVertical = mpCbStacked->IsChecked();
SfxBoolItem aStackItem( SID_ATTR_ALIGN_STACKED, bVertical );
GetBindings()->GetDispatcher()->Execute(
SID_ATTR_ALIGN_STACKED, SFX_CALLMODE_RECORD, &aStackItem, 0L );
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 6356d2475399..d85f22feb2cb 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1817,7 +1817,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
{
// default for no model is FALSE
ScDrawLayer* pModel = pDoc->GetDrawLayer();
- bool bAutoControlFocus = pModel ? pModel->GetAutoControlFocus() : false;
+ bool bAutoControlFocus = pModel && pModel->GetAutoControlFocus();
ScUnoHelpFunctions::SetBoolInAny( aRet, bAutoControlFocus );
}
else if ( aString.equalsAscii( SC_UNO_FORBIDDEN ) )
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 257c0119036b..7d8f4454bc33 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -4477,7 +4477,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
ScDocument* pDoc = pShell ? pShell->GetDocument() : NULL;
if (pDoc)
{
- bHasColHeader = pDoc->HasColHeader( static_cast< SCCOL >( autoFiltAddress.StartColumn ), static_cast< SCROW >( autoFiltAddress.StartRow ), static_cast< SCCOL >( autoFiltAddress.EndColumn ), static_cast< SCROW >( autoFiltAddress.EndRow ), static_cast< SCTAB >( autoFiltAddress.Sheet ) ) ? sal_True : false;
+ bHasColHeader = pDoc->HasColHeader( static_cast< SCCOL >( autoFiltAddress.StartColumn ), static_cast< SCROW >( autoFiltAddress.StartRow ), static_cast< SCCOL >( autoFiltAddress.EndColumn ), static_cast< SCROW >( autoFiltAddress.EndRow ), static_cast< SCTAB >( autoFiltAddress.Sheet ) ) ? true : false;
}
xFiltProps->setPropertyValue( "ContainsHeader", uno::Any( bHasColHeader ) );
}
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 3dd7df2ca2b6..22d9c435527c 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -386,7 +386,7 @@ void ScGridWindow::UpdateStatusPosSize()
bool ScGridWindow::DrawHasMarkedObj()
{
ScDrawView* p = pViewData->GetScDrawView();
- return p ? p->AreObjectsMarked() : false;
+ return p && p->AreObjectsMarked();
}
void ScGridWindow::DrawMarkDropObj( SdrObject* pObj )
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index af96c758714b..52d19072bde7 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -414,7 +414,7 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol
ScModule* pScMod = SC_MOD();
ScTabViewShell* pViewShell = pViewData->GetViewShell();
- bool bRefMode = ( pViewShell ? pViewShell->IsRefInputMode() : false );
+ bool bRefMode = pViewShell && pViewShell->IsRefInputMode();
bool bHide = !bRefMode && !pViewData->IsAnyFillMode() &&
( nPosX != (SCsCOL) pViewData->GetCurX() || nPosY != (SCsROW) pViewData->GetCurY() );
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 5312c0d58884..9f002d308aa7 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -288,7 +288,7 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew )
if ( nPosX != nOldX || nPosY != nOldY || bNew )
{
ScTabViewShell* pViewShell = aViewData.GetViewShell();
- bool bRefMode = ( pViewShell ? pViewShell->IsRefInputMode() : false );
+ bool bRefMode = pViewShell && pViewShell->IsRefInputMode();
if ( aViewData.HasEditView( aViewData.GetActivePart() ) && !bRefMode ) // 23259 oder so
{
UpdateInputLine();
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index e831738dc009..7d7011490571 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -434,7 +434,7 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
bool bOle = GetViewFrame()->GetFrame().IsInPlace();
bool bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo());
ScDocShell* pDocShell = ( GetViewData() ? GetViewData()->GetDocShell() : NULL );
- bool bShared = ( pDocShell ? pDocShell->IsDocShared() : false );
+ bool bShared = pDocShell && pDocShell->IsDocShared();
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java b/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java
index 587ade36a4ba..fd3ee589eed5 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java
@@ -553,7 +553,7 @@ System.out.println(" exception: " + ioe.getMessage());
public boolean readOnly(String name) {
synchronized(cache) {
Entry entry = (Entry)cache.get(zipName(name));
- return (entry != null)? entry.isReadOnly(): false;
+ return entry && entry.isReadOnly();
}
}
@@ -805,8 +805,7 @@ System.out.println(" exception: " + ioe.getMessage());
{
// recognizes all entries in a subtree of the
// 'scope' as editable entries
- return (entry != null)?
- entry.getName().startsWith(scope): false;
+ return entry && entry.getName().startsWith(scope);
}
}
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 2c1e94010dd6..7c04a0b31f37 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -990,7 +990,7 @@ void EffectMigration::SetDimHide( SvxShape* pShape, bool bDimHide )
CustomAnimationEffectPtr pEffect( (*aIter) );
if( pEffect->getTargetShape() == xShape )
{
- pEffect->setHasAfterEffect( bDimHide ? true : false );
+ pEffect->setHasAfterEffect( bDimHide );
if( bDimHide ) {
Any aEmpty;
pEffect->setDimColor( aEmpty );
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 716f008a9180..061ac8d4cc04 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1350,7 +1350,7 @@ void ModifyGuard::init()
}
mbIsEnableSetModified = mpDocShell ? mpDocShell->IsEnableSetModified() : sal_False;
- mbIsDocumentChanged = mpDoc ? mpDoc->IsChanged() : false;
+ mbIsDocumentChanged = mpDoc && mpDoc->IsChanged();
if( mbIsEnableSetModified )
mpDocShell->EnableSetModified( false );
diff --git a/sd/source/core/undo/undoobjects.cxx b/sd/source/core/undo/undoobjects.cxx
index ec2989da1e63..d18b8706ca5f 100644
--- a/sd/source/core/undo/undoobjects.cxx
+++ b/sd/source/core/undo/undoobjects.cxx
@@ -183,7 +183,7 @@ void UndoObjectSetText::Undo()
DBG_ASSERT( mxSdrObject.is(), "sd::UndoObjectSetText::Undo(), object already dead!" );
if( mxSdrObject.is() )
{
- mbNewEmptyPresObj = mxSdrObject->IsEmptyPresObj() ? true : false;
+ mbNewEmptyPresObj = mxSdrObject->IsEmptyPresObj();
SdrUndoObjSetText::Undo();
if( mpUndoAnimation )
mpUndoAnimation->Undo();
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 1e6580367152..7595837f041d 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -465,12 +465,12 @@ void CustomAnimationCreateTabPage::setDuration( double fDuration )
bool CustomAnimationCreateTabPage::getIsPreview() const
{
- return mpCBXPReview->IsChecked() ? true : false;
+ return mpCBXPReview->IsChecked();
}
void CustomAnimationCreateTabPage::setIsPreview( bool bIsPreview )
{
- mpCBXPReview->Check( bIsPreview ? sal_True : sal_False );
+ mpCBXPReview->Check( bIsPreview );
}
sal_uInt16 CustomAnimationCreateTabPage::getId() const
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 279bd8b45445..aa81b00be39c 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -1027,7 +1027,7 @@ void SlideShow::jumpToBookmark( const OUString& sBookmark )
bool SlideShow::isFullScreen()
{
- return mxController.is() ? mxController->maPresSettings.mbFullScreen : false;
+ return mxController.is() && mxController->maPresSettings.mbFullScreen;
}
@@ -1082,7 +1082,7 @@ void SlideShow::deactivate( ViewShellBase& /*rBase*/ )
bool SlideShow::keyInput(const KeyEvent& rKEvt)
{
- return mxController.is() ? mxController->keyInput(rKEvt) : false;
+ return mxController.is() && mxController->keyInput(rKEvt);
}
@@ -1097,7 +1097,7 @@ void SlideShow::paint( const Rectangle& rRect )
bool SlideShow::isAlwaysOnTop()
{
- return mxController.is() ? mxController->maPresSettings.mbAlwaysOnTop : false;
+ return mxController.is() && mxController->maPresSettings.mbAlwaysOnTop;
}
@@ -1140,14 +1140,14 @@ sal_Int32 SlideShow::getLastPageNumber()
bool SlideShow::isEndless()
{
- return mxController.is() ? mxController->isEndless() : false;
+ return mxController.is() && mxController->isEndless();
}
bool SlideShow::isDrawingPossible()
{
- return mxController.is() ? mxController->getUsePen() : false;
+ return mxController.is() && mxController->getUsePen();
}
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index d1c6f868caed..a72d8e6e116d 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -417,8 +417,8 @@ void TableDesignWidget::updateControls()
{
OSL_FAIL("sd::TableDesignWidget::updateControls(), exception caught!");
}
- m_aCheckBoxes[i]->Check(bUse ? true : false);
- m_aCheckBoxes[i]->Enable(bHasTable ? true : false);
+ m_aCheckBoxes[i]->Check(bUse);
+ m_aCheckBoxes[i]->Enable(bHasTable);
}
FillDesignPreviewControl();
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index f11c7660b4c6..4062bc85452a 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -892,7 +892,7 @@ SdAnimationInfo* SdXShape::GetAnimationInfo( bool bCreate ) const
SdrObject* pObj = mpShape->GetSdrObject();
if(pObj)
- pInfo = SdDrawDocument::GetShapeUserData(*pObj, bCreate ? true : false);
+ pInfo = SdDrawDocument::GetShapeUserData(*pObj, bCreate);
return pInfo;
}
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 1228c06f6a94..3aaa96c4b7fb 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -349,7 +349,7 @@ SdGenericDrawPage::SdGenericDrawPage( SdXImpressDocument* _pModel, SdPage* pInPa
{
mpSdrModel = SvxFmDrawPage::mpModel;
if( mpModel )
- mbIsImpressDocument = mpModel->IsImpressDocument() ? true : false;
+ mbIsImpressDocument = mpModel->IsImpressDocument();
}
@@ -373,7 +373,7 @@ SdXImpressDocument* SdGenericDrawPage::GetModel() const
uno::Reference< uno::XInterface > xModel( SvxFmDrawPage::mpModel->getUnoModel() );
const_cast< SdGenericDrawPage*>(this)->mpModel = SdXImpressDocument::getImplementation( xModel );
if( mpModel )
- const_cast< SdGenericDrawPage*>(this)->mbIsImpressDocument = mpModel->IsImpressDocument() ? true : false;
+ const_cast< SdGenericDrawPage*>(this)->mbIsImpressDocument = mpModel->IsImpressDocument();
}
else
{
@@ -712,7 +712,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
bool bStopSound = false;
if( aValue >>= bStopSound )
{
- GetPage()->SetStopSound( bStopSound ? true : false );
+ GetPage()->SetStopSound( bStopSound );
break;
}
}
@@ -726,7 +726,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
if( ! (aValue >>= bLoop) )
throw lang::IllegalArgumentException();
- GetPage()->SetLoopSound( bLoop ? true : false );
+ GetPage()->SetLoopSound( bLoop );
break;
}
case WID_PAGE_BACKFULL:
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index b54f8d185e61..89e7aeb9731c 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -1229,7 +1229,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
aInsertPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 );
}
- bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap, nFormat == 0 ? true : false ) ? sal_True : sal_False;
+ bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap, nFormat == 0 );
}
if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(FORMAT_BITMAP))
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index c1a8d29f3d06..540885e80e02 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -78,7 +78,7 @@ struct EmitImplData
unsigned int nObject, unsigned int nGeneration ) const
{
const PDFFile* pFile = dynamic_cast<const PDFFile*>(m_pObjectContainer);
- return pFile ? pFile->decrypt( pInBuffer, nLen, pOutBuffer, nObject, nGeneration ) : false;
+ return pFile && pFile->decrypt( pInBuffer, nLen, pOutBuffer, nObject, nGeneration );
}
void setDecryptObject( unsigned int nObject, unsigned int nGeneration )
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index c4ec5d362cd8..1f525660f864 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1587,7 +1587,7 @@ bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
bool bTransactStarted = false;
SFX_ITEMSET_ARG( GetItemSet(), pOverWrite, SfxBoolItem, SID_OVERWRITE, false );
SFX_ITEMSET_ARG( GetItemSet(), pRename, SfxBoolItem, SID_RENAME, false );
- bool bRename = pRename ? pRename->GetValue() : false;
+ bool bRename = pRename && pRename->GetValue();
bool bOverWrite = pOverWrite ? pOverWrite->GetValue() : !bRename;
try
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 9d34b9b1c262..79f268b068ba 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -514,8 +514,8 @@ SfxSaveGuard::~SfxSaveGuard()
SfxBaseModel::SfxBaseModel( SfxObjectShell *pObjectShell )
: BaseMutex()
, m_pData( new IMPL_SfxBaseModel_DataContainer( m_aMutex, pObjectShell ) )
-, m_bSupportEmbeddedScripts( pObjectShell && pObjectShell->Get_Impl() ? !pObjectShell->Get_Impl()->m_bNoBasicCapabilities : false )
-, m_bSupportDocRecovery( pObjectShell && pObjectShell->Get_Impl() ? pObjectShell->Get_Impl()->m_bDocRecoverySupport : false )
+, m_bSupportEmbeddedScripts( pObjectShell && pObjectShell->Get_Impl() && !pObjectShell->Get_Impl()->m_bNoBasicCapabilities )
+, m_bSupportDocRecovery( pObjectShell && pObjectShell->Get_Impl() && pObjectShell->Get_Impl()->m_bDocRecoverySupport )
{
if ( pObjectShell != NULL )
{
diff --git a/slideshow/source/engine/shapeattributelayer.cxx b/slideshow/source/engine/shapeattributelayer.cxx
index 8352d5a74551..4925bb67033b 100644
--- a/slideshow/source/engine/shapeattributelayer.cxx
+++ b/slideshow/source/engine/shapeattributelayer.cxx
@@ -83,7 +83,7 @@ namespace slideshow
// deviated from the (*shared_ptr).*mpFuncPtr notation
// here, since gcc does not seem to parse that as a member
// function call anymore.
- const bool bChildInstanceValueValid( haveChild() ? (mpChild.get()->*pIsValid)() : false );
+ const bool bChildInstanceValueValid( haveChild() && (mpChild.get()->*pIsValid)() );
if( bThisInstanceValid )
{
@@ -267,7 +267,7 @@ namespace slideshow
bool ShapeAttributeLayer::isWidthValid() const
{
- return mbWidthValid ? true : haveChild() ? mpChild->isWidthValid() : false;
+ return mbWidthValid || (haveChild() && mpChild->isWidthValid());
}
double ShapeAttributeLayer::getWidth() const
@@ -291,7 +291,7 @@ namespace slideshow
bool ShapeAttributeLayer::isHeightValid() const
{
- return mbHeightValid ? true : haveChild() ? mpChild->isHeightValid() : false;
+ return mbHeightValid || ( haveChild() && mpChild->isHeightValid() );
}
double ShapeAttributeLayer::getHeight() const
@@ -326,7 +326,7 @@ namespace slideshow
bool ShapeAttributeLayer::isPosXValid() const
{
- return mbPosXValid ? true : haveChild() ? mpChild->isPosXValid() : false;
+ return mbPosXValid || ( haveChild() && mpChild->isPosXValid() );
}
double ShapeAttributeLayer::getPosX() const
@@ -350,7 +350,7 @@ namespace slideshow
bool ShapeAttributeLayer::isPosYValid() const
{
- return mbPosYValid ? true : haveChild() ? mpChild->isPosYValid() : false;
+ return mbPosYValid || ( haveChild() && mpChild->isPosYValid() );
}
double ShapeAttributeLayer::getPosY() const
@@ -381,7 +381,7 @@ namespace slideshow
bool ShapeAttributeLayer::isRotationAngleValid() const
{
- return mbRotationAngleValid ? true : haveChild() ? mpChild->isRotationAngleValid() : false;
+ return mbRotationAngleValid || ( haveChild() && mpChild->isRotationAngleValid() );
}
double ShapeAttributeLayer::getRotationAngle() const
@@ -405,7 +405,7 @@ namespace slideshow
bool ShapeAttributeLayer::isShearXAngleValid() const
{
- return mbShearXAngleValid ? true : haveChild() ? mpChild->isShearXAngleValid() : false;
+ return mbShearXAngleValid || ( haveChild() && mpChild->isShearXAngleValid() );
}
double ShapeAttributeLayer::getShearXAngle() const
@@ -428,7 +428,7 @@ namespace slideshow
bool ShapeAttributeLayer::isShearYAngleValid() const
{
- return mbShearYAngleValid ? true : haveChild() ? mpChild->isShearYAngleValid() : false;
+ return mbShearYAngleValid || ( haveChild() && mpChild->isShearYAngleValid() );
}
double ShapeAttributeLayer::getShearYAngle() const
@@ -451,7 +451,7 @@ namespace slideshow
bool ShapeAttributeLayer::isAlphaValid() const
{
- return mbAlphaValid ? true : haveChild() ? mpChild->isAlphaValid() : false;
+ return mbAlphaValid || ( haveChild() && mpChild->isAlphaValid() );
}
double ShapeAttributeLayer::getAlpha() const
@@ -474,7 +474,7 @@ namespace slideshow
bool ShapeAttributeLayer::isClipValid() const
{
- return mbClipValid ? true : haveChild() ? mpChild->isClipValid() : false;
+ return mbClipValid || ( haveChild() && mpChild->isClipValid() );
}
::basegfx::B2DPolyPolygon ShapeAttributeLayer::getClip() const
@@ -497,7 +497,7 @@ namespace slideshow
bool ShapeAttributeLayer::isDimColorValid() const
{
- return mbDimColorValid ? true : haveChild() ? mpChild->isDimColorValid() : false;
+ return mbDimColorValid || ( haveChild() && mpChild->isDimColorValid() );
}
RGBColor ShapeAttributeLayer::getDimColor() const
@@ -517,7 +517,7 @@ namespace slideshow
bool ShapeAttributeLayer::isFillColorValid() const
{
- return mbFillColorValid ? true : haveChild() ? mpChild->isFillColorValid() : false;
+ return mbFillColorValid || ( haveChild() && mpChild->isFillColorValid() );
}
RGBColor ShapeAttributeLayer::getFillColor() const
@@ -537,7 +537,7 @@ namespace slideshow
bool ShapeAttributeLayer::isLineColorValid() const
{
- return mbLineColorValid ? true : haveChild() ? mpChild->isLineColorValid() : false;
+ return mbLineColorValid || ( haveChild() && mpChild->isLineColorValid() );
}
RGBColor ShapeAttributeLayer::getLineColor() const
@@ -557,7 +557,7 @@ namespace slideshow
bool ShapeAttributeLayer::isFillStyleValid() const
{
- return mbFillStyleValid ? true : haveChild() ? mpChild->isFillStyleValid() : false;
+ return mbFillStyleValid || ( haveChild() && mpChild->isFillStyleValid() );
}
sal_Int16 ShapeAttributeLayer::getFillStyle() const
@@ -582,7 +582,7 @@ namespace slideshow
bool ShapeAttributeLayer::isLineStyleValid() const
{
- return mbLineStyleValid ? true : haveChild() ? mpChild->isLineStyleValid() : false;
+ return mbLineStyleValid || ( haveChild() && mpChild->isLineStyleValid() );
}
sal_Int16 ShapeAttributeLayer::getLineStyle() const
@@ -607,7 +607,7 @@ namespace slideshow
bool ShapeAttributeLayer::isVisibilityValid() const
{
- return mbVisibilityValid ? true : haveChild() ? mpChild->isVisibilityValid() : false;
+ return mbVisibilityValid || ( haveChild() && mpChild->isVisibilityValid() );
}
bool ShapeAttributeLayer::getVisibility() const
@@ -631,7 +631,7 @@ namespace slideshow
bool ShapeAttributeLayer::isCharColorValid() const
{
- return mbCharColorValid ? true : haveChild() ? mpChild->isCharColorValid() : false;
+ return mbCharColorValid || ( haveChild() && mpChild->isCharColorValid() );
}
RGBColor ShapeAttributeLayer::getCharColor() const
@@ -651,7 +651,7 @@ namespace slideshow
bool ShapeAttributeLayer::isCharRotationAngleValid() const
{
- return mbCharRotationAngleValid ? true : haveChild() ? mpChild->isCharRotationAngleValid() : false;
+ return mbCharRotationAngleValid || ( haveChild() && mpChild->isCharRotationAngleValid() );
}
double ShapeAttributeLayer::getCharRotationAngle() const
@@ -674,7 +674,7 @@ namespace slideshow
bool ShapeAttributeLayer::isCharWeightValid() const
{
- return mbCharWeightValid ? true : haveChild() ? mpChild->isCharWeightValid() : false;
+ return mbCharWeightValid || ( haveChild() && mpChild->isCharWeightValid() );
}
double ShapeAttributeLayer::getCharWeight() const
@@ -699,7 +699,7 @@ namespace slideshow
bool ShapeAttributeLayer::isUnderlineModeValid() const
{
- return mbUnderlineModeValid ? true : haveChild() ? mpChild->isUnderlineModeValid() : false;
+ return mbUnderlineModeValid || ( haveChild() && mpChild->isUnderlineModeValid() );
}
sal_Int16 ShapeAttributeLayer::getUnderlineMode() const
@@ -724,7 +724,7 @@ namespace slideshow
bool ShapeAttributeLayer::isFontFamilyValid() const
{
- return mbFontFamilyValid ? true : haveChild() ? mpChild->isFontFamilyValid() : false;
+ return mbFontFamilyValid || ( haveChild() && mpChild->isFontFamilyValid() );
}
OUString ShapeAttributeLayer::getFontFamily() const
@@ -748,7 +748,7 @@ namespace slideshow
bool ShapeAttributeLayer::isCharPostureValid() const
{
- return mbCharPostureValid ? true : haveChild() ? mpChild->isCharPostureValid() : false;
+ return mbCharPostureValid || ( haveChild() && mpChild->isCharPostureValid() );
}
sal_Int16 ShapeAttributeLayer::getCharPosture() const
@@ -773,7 +773,7 @@ namespace slideshow
bool ShapeAttributeLayer::isCharScaleValid() const
{
- return mbCharScaleValid ? true : haveChild() ? mpChild->isCharScaleValid() : false;
+ return mbCharScaleValid || ( haveChild() && mpChild->isCharScaleValid() );
}
double ShapeAttributeLayer::getCharScale() const
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 09201bf5c60a..7b40f8b619a4 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -136,7 +136,7 @@ protected:
void SetFormatModified( bool bVal );
inline bool IsFormatModified() const { return bIsFormatModified; }
void SetFontFormatListModified( bool bVal );
- inline bool IsFontFormatListModified() const { return pFontFormatList ? pFontFormatList->IsModified(): false; }
+ inline bool IsFontFormatListModified() const { return pFontFormatList && pFontFormatList->IsModified(); }
SmFontFormatList & GetFontFormatList();
const SmFontFormatList & GetFontFormatList() const
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index ca437e621baa..4376b7ad8fb6 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -79,7 +79,7 @@ void SmGetLeftSelectionPart(const ESelection &rSel,
bool SmEditWindow::IsInlineEditEnabled()
{
SmViewShell *pView = GetView();
- return pView ? pView->IsInlineEditEnabled() : false;
+ return pView && pView->IsInlineEditEnabled();
}
@@ -947,13 +947,13 @@ void SmEditWindow::SetSelection(const ESelection &rSel)
bool SmEditWindow::IsEmpty() const
{
EditEngine *pEditEngine = ((SmEditWindow *) this)->GetEditEngine();
- bool bEmpty = ( pEditEngine ? pEditEngine->GetTextLen() == 0 : false);
+ bool bEmpty = ( pEditEngine && pEditEngine->GetTextLen() == 0 );
return bEmpty;
}
bool SmEditWindow::IsSelected() const
{
- return pEditView ? pEditView->HasSelection() : false;
+ return pEditView && pEditView->HasSelection();
}
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 9a8170546dad..57547dd49c7c 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -669,7 +669,7 @@ void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps)
if (pProps)
{
SmConfig *pConfig = SM_MOD()->GetConfig();
- const bool bUsedSymbolsOnly = pConfig ? pConfig->IsSaveOnlyUsedSymbols() : false;
+ const bool bUsedSymbolsOnly = pConfig && pConfig->IsSaveOnlyUsedSymbols();
const OUString sFormula ( "Formula" );
const OUString sBasicLibraries ( "BasicLibraries" );
diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
index 30d32605b2b1..1150a6bca570 100644
--- a/store/source/storbase.hxx
+++ b/store/source/storbase.hxx
@@ -156,7 +156,7 @@ public:
bool operator== (long count) const
{
- return (m_pCount != 0) ? *m_pCount == count : false;
+ return (m_pCount != 0) && (*m_pCount == count);
}
};
diff --git a/store/workben/t_page.cxx b/store/workben/t_page.cxx
index 54a32e15f2b1..2bf4ebbd53aa 100644
--- a/store/workben/t_page.cxx
+++ b/store/workben/t_page.cxx
@@ -78,7 +78,7 @@ public:
bool operator== (long count) const
{
- return (m_pCount != 0) ? *m_pCount == count : false;
+ return (m_pCount != 0) && (*m_pCount == count);
}
friend void swap<> (SharedCount & lhs, SharedCount & rhs); // nothrow
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 5d26a0faf4ac..8bdf0735e472 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -379,7 +379,7 @@ struct DoesStyleMatchStyleSheetPredicate SAL_FINAL : public svl::StyleSheetPredi
bool bMatchFamily = ((mIterator->GetSearchFamily() == SFX_STYLE_FAMILY_ALL) ||
( styleSheet.GetFamily() == mIterator->GetSearchFamily() ));
- bool bUsed = mIterator->SearchUsed() ? styleSheet.IsUsed( ) : false;
+ bool bUsed = mIterator->SearchUsed() && styleSheet.IsUsed( );
bool bSearchHidden = ( mIterator->GetSearchMask() & SFXSTYLEBIT_HIDDEN );
bool bMatchVisibility = !( !bSearchHidden && styleSheet.IsHidden() && !bUsed );
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 4acec41241b3..c84f895ae866 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -486,7 +486,7 @@ bool SvNumberFormatter::IsTextFormat(sal_uInt32 F_Index) const
{
const SvNumberformat* pFormat = GetFormatEntry(F_Index);
- return pFormat ? pFormat->IsTextFormat() : false;
+ return pFormat && pFormat->IsTextFormat();
}
bool SvNumberFormatter::PutEntry(OUString& rString,
@@ -3750,9 +3750,9 @@ void SvNumberFormatter::ImpInitCurrencyTable()
lcl_CheckCurrencySymbolPosition( *pEntry );
}
rCurrencyTable.insert( rCurrencyTable.begin() + nCurrencyPos++, pEntry );
- if ( !nSystemCurrencyPosition && (!aConfiguredCurrencyAbbrev.isEmpty() ?
- pEntry->GetBankSymbol() == aConfiguredCurrencyAbbrev &&
- pEntry->GetLanguage() == eConfiguredCurrencyLanguage : false) )
+ if ( !nSystemCurrencyPosition && !aConfiguredCurrencyAbbrev.isEmpty() &&
+ pEntry->GetBankSymbol() == aConfiguredCurrencyAbbrev &&
+ pEntry->GetLanguage() == eConfiguredCurrencyLanguage )
{
nSystemCurrencyPosition = nCurrencyPos-1;
}
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index b4972f2f8120..00e87f5564cb 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -2721,7 +2721,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd,
Rectangle aRect( rRect );
aRect.Justify();
- bool bCalcOverlap = (bAdd && pOtherRects && !pOtherRects->empty()) ? true : false;
+ bool bCalcOverlap = (bAdd && pOtherRects && !pOtherRects->empty());
sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() )
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index b1eff7b76e0e..c117a6822f34 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1026,7 +1026,7 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
if ( pEntry->HasChildListPos() )
{
size_t nListPos = pEntry->GetChildListPos();
- bLastEntry = (nListPos == (rList.size()-1)) ? true : false;
+ bLastEntry = (nListPos == (rList.size()-1));
SvTreeListEntries::iterator it = rList.begin();
std::advance(it, nListPos);
rList.release(it).release();
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 4cf1740ad3cc..c39428e688f2 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2386,7 +2386,7 @@ void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* pObj )
bool EnhancedCustomShape2d::IsPostRotate() const
{
- return pCustomShapeObj->ISA( SdrObjCustomShape ) ? ((SdrObjCustomShape*)pCustomShapeObj)->IsPostRotate() : false;
+ return pCustomShapeObj->ISA( SdrObjCustomShape ) && ((SdrObjCustomShape*)pCustomShapeObj)->IsPostRotate();
}
SdrObject* EnhancedCustomShape2d::CreateLineGeometry()
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index eacce2d8f7fc..f3efcc7a56d1 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -99,7 +99,7 @@ namespace
{
bool GetCheckBoxValue(const CheckBox *pBox)
{
- return pBox->IsEnabled() ? pBox->IsChecked() : false;
+ return pBox->IsEnabled() && pBox->IsChecked();
}
}
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index c442ff4273e4..5b2b45f0c65e 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -74,8 +74,8 @@ namespace drawinglayer
const attribute::SdrLineStartEndAttribute aLineStartEnd(
bLeftActive ? rLineStartEnd.getStartPolyPolygon() : aEmpty, bRightActive ? rLineStartEnd.getEndPolyPolygon() : aEmpty,
bLeftActive ? rLineStartEnd.getStartWidth() : 0.0, bRightActive ? rLineStartEnd.getEndWidth() : 0.0,
- bLeftActive ? rLineStartEnd.isStartActive() : false, bRightActive ? rLineStartEnd.isEndActive() : false,
- bLeftActive ? rLineStartEnd.isStartCentered() : false, bRightActive? rLineStartEnd.isEndCentered() : false);
+ bLeftActive && rLineStartEnd.isStartActive(), bRightActive && rLineStartEnd.isEndActive(),
+ bLeftActive && rLineStartEnd.isStartCentered(), bRightActive && rLineStartEnd.isEndCentered());
return createPolygonLinePrimitive(
aPolygon,
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index e0007cb0dec1..04ff43de6f86 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -634,7 +634,7 @@ namespace
return false;
bool bRet(false);
- bool bMaster(rList.GetPage() ? rList.GetPage()->IsMasterPage() : false);
+ bool bMaster(rList.GetPage() && rList.GetPage()->IsMasterPage());
for(sal_uIntPtr no(rList.GetObjCount()); !bRet && no > 0; )
{
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index a2441761d1f3..b227d89ef799 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1910,7 +1910,7 @@ SdrObjUserData* SdrObject::ImpGetMacroUserData() const
bool SdrObject::HasMacro() const
{
SdrObjUserData* pData=ImpGetMacroUserData();
- return pData!=NULL ? pData->HasMacro(this) : false;
+ return pData && pData->HasMacro(this);
}
SdrObject* SdrObject::CheckMacroHit(const SdrObjMacroHitRec& rRec) const
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 0e385200aafc..d62d58d7c113 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -115,7 +115,7 @@ private:
bool IsEditMode() const
{
SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
- return mbShapeIsEditMode && pTextObj && pTextObj->IsTextEditActive() ? true : false;
+ return mbShapeIsEditMode && pTextObj && pTextObj->IsTextEditActive();
}
void dispose();
@@ -661,7 +661,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
}
else
{
- bool bVertical = pOutlinerParaObject ? pOutlinerParaObject->IsVertical() : false;
+ bool bVertical = pOutlinerParaObject && pOutlinerParaObject->IsVertical();
// set objects style sheet on empty outliner
SfxStyleSheetPool* pPool = (SfxStyleSheetPool*)mpObject->GetModel()->GetStyleSheetPool();
diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx
index d3f73f20439d..ea7f14f7665a 100644
--- a/sw/inc/edimp.hxx
+++ b/sw/inc/edimp.hxx
@@ -46,9 +46,9 @@ struct SwPamRange
SwPamRange( sal_uLong nS, sal_uLong nE ) : nStart( nS ), nEnd( nE ) {}
bool operator==( const SwPamRange& rRg ) const
- { return nStart == rRg.nStart ? true : false; }
+ { return nStart == rRg.nStart; }
bool operator<( const SwPamRange& rRg ) const
- { return nStart < rRg.nStart ? true : false; }
+ { return nStart < rRg.nStart; }
};
class _SwPamRanges : public o3tl::sorted_vector<SwPamRange> {};
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 1cefdf479c1d..2bcc64bd4684 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -696,14 +696,14 @@ public:
/// Hidden Paragraph Field:
inline bool CalcHiddenParaField()
- { return m_pSwpHints ? m_pSwpHints->CalcHiddenParaField() : false; }
+ { return m_pSwpHints && m_pSwpHints->CalcHiddenParaField(); }
/// set CalcVisible flags
inline void SetCalcHiddenParaField()
{ if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
/// is the paragraph visible?
inline bool HasHiddenParaField() const
- { return m_pSwpHints ? m_pSwpHints->HasHiddenParaField() : false; }
+ { return m_pSwpHints && m_pSwpHints->HasHiddenParaField(); }
/// Hidden Paragraph Field:
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx
index 09fae2081264..61c6410024c5 100644
--- a/sw/source/core/SwNumberTree/SwNodeNum.cxx
+++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx
@@ -243,7 +243,7 @@ bool SwNodeNum::LessThan(const SwNumberTreeNode & rNode) const
{
// #i83479# - refactoring
// simplify comparison by comparing the indexes of the text nodes
- bResult = ( mpTxtNode->GetIndex() < rTmpNode.mpTxtNode->GetIndex() ) ? true : false;
+ bResult = ( mpTxtNode->GetIndex() < rTmpNode.mpTxtNode->GetIndex() );
}
return bResult;
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index 60e5f99e9eb6..b35a53d8eb90 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -690,7 +690,7 @@ void SwNumberTreeNode::RemoveMe()
bool SwNumberTreeNode::IsValid() const
{
- return mpParent ? mpParent->IsValid(this) : false;
+ return mpParent && mpParent->IsValid(this);
}
SwNumberTree::tSwNumTreeNumber SwNumberTreeNode::GetNumber(bool bValidate)
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 40451b7034d8..d6b949a119e8 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -719,7 +719,7 @@ struct ContainsPredicate
ContainsPredicate( const Point& rPoint ) : mrPoint(rPoint) {}
bool operator() ( const Rectangle& rRect ) const
{
- return rRect.IsInside( mrPoint ) ? true : false;
+ return rRect.IsInside( mrPoint );
}
};
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 9f69d01eec80..64ba629b1fce 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1435,7 +1435,7 @@ struct IndexCompare
IndexCompare( const PropertyValue* pVals ) : pValues(pVals) {}
bool operator() ( const sal_Int32& a, const sal_Int32& b ) const
{
- return (pValues[a].Name < pValues[b].Name) ? true : false;
+ return (pValues[a].Name < pValues[b].Name);
}
};
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 5327f7645ccc..80febe13fdb1 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -622,7 +622,7 @@ bool SwCrsrShell::MoveFldType(
}
// found Modify object, add all fields to array
- ::lcl_MakeFldLst( aSrtLst, *pFldType, ( IsReadOnlyAvailable() ? true : false ) );
+ ::lcl_MakeFldLst( aSrtLst, *pFldType, IsReadOnlyAvailable() );
if( RES_INPUTFLD == pFldType->Which() && bAddSetExpressionFldsToInputFlds )
{
@@ -634,7 +634,7 @@ bool SwCrsrShell::MoveFldType(
pFldType = rFldTypes[ i ];
if ( RES_SETEXPFLD == pFldType->Which() )
{
- ::lcl_MakeFldLst( aSrtLst, *pFldType, ( IsReadOnlyAvailable() ? true : false ), true );
+ ::lcl_MakeFldLst( aSrtLst, *pFldType, IsReadOnlyAvailable(), true );
}
}
}
@@ -648,7 +648,7 @@ bool SwCrsrShell::MoveFldType(
pFldType = rFldTypes[ i ];
if( nResType == pFldType->Which() )
{
- ::lcl_MakeFldLst( aSrtLst, *pFldType, ( IsReadOnlyAvailable() ? true : false ) );
+ ::lcl_MakeFldLst( aSrtLst, *pFldType, IsReadOnlyAvailable() );
}
}
}
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 13da404d4a5c..4afd2ee47e12 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1014,7 +1014,7 @@ SwPosFlyFrms SwDoc::GetAllFlyFmts( const SwPaM* pCmpRange, bool bDrawAlso,
for( sal_uInt16 n = 0; n < GetSpzFrmFmts()->size(); ++n )
{
pFly = (*GetSpzFrmFmts())[ n ];
- bool bDrawFmt = bDrawAlso ? RES_DRAWFRMFMT == pFly->Which() : false;
+ bool bDrawFmt = bDrawAlso && RES_DRAWFRMFMT == pFly->Which();
bool bFlyFmt = RES_FLYFRMFMT == pFly->Which();
if( bFlyFmt || bDrawFmt )
{
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 83773efc8589..45a1d48959a2 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -970,7 +970,7 @@ void SwDoc::SetNumRuleStart( const SwPosition& rPos, bool bFlag )
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
- pTxtNd->SetListRestart(bFlag ? true : false);
+ pTxtNd->SetListRestart(bFlag);
SetModified();
}
@@ -2065,8 +2065,8 @@ bool SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, bool bDel )
if ( !pTxtNd->IsCountedInList() == !bDel)
{
bool bOldNum = bDel;
- bool bNewNum = bDel ? sal_False : sal_True;
- pTxtNd->SetCountedInList(bNewNum ? true : false);
+ bool bNewNum = !bDel;
+ pTxtNd->SetCountedInList(bNewNum);
SetModified();
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 8b1ef00a800c..680d8d1d2702 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -252,10 +252,9 @@ inline bool IsPrevPos( const SwPosition rPos1, const SwPosition rPos2 )
{
const SwCntntNode* pCNd;
return 0 == rPos2.nContent.GetIndex() &&
- rPos2.nNode.GetIndex() - 1 == rPos1.nNode.GetIndex() &&
- 0 != ( pCNd = rPos1.nNode.GetNode().GetCntntNode() )
- ? rPos1.nContent.GetIndex() == pCNd->Len()
- : false;
+ rPos2.nNode.GetIndex() - 1 == rPos1.nNode.GetIndex() &&
+ 0 != ( pCNd = rPos1.nNode.GetNode().GetCntntNode() ) &&
+ rPos1.nContent.GetIndex() == pCNd->Len();
}
#if OSL_DEBUG_LEVEL > 0
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index f66f4eb71685..94c3f2e530bd 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -608,7 +608,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
SwSection* pSection = pFmt->GetSection();
/// remember hidden condition flag of SwSection before changes
- bool bOldCondHidden = pSection->IsCondHidden() ? true : false;
+ bool bOldCondHidden = pSection->IsCondHidden();
if (pSection->DataEquals(rNewData))
{
@@ -724,7 +724,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
/// This is necessary, because otherwise the <SetCondHidden> would have
/// no effect.
bool bCalculatedCondHidden =
- aCalc.Calculate( pSection->GetCondition() ).GetBool() ? true : false;
+ aCalc.Calculate( pSection->GetCondition() ).GetBool();
if ( bCalculatedCondHidden && !bOldCondHidden )
{
pSection->SetCondHidden( false );
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 367b64c95d3e..03d3a39b9977 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1816,7 +1816,7 @@ void SwFEShell::BreakCreate()
bool SwFEShell::IsDrawCreate() const
{
- return Imp()->HasDrawView() ? Imp()->GetDrawView()->IsCreateObj() : false;
+ return Imp()->HasDrawView() && Imp()->GetDrawView()->IsCreateObj();
}
bool SwFEShell::BeginMark( const Point &rPos )
@@ -2877,7 +2877,7 @@ bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const
OSL_ENSURE( pPageFrm, "inconsistent modell - no page!");
if ( pPageFrm )
{
- bRet = pPageFrm->IsRightToLeft() ? true : false;
+ bRet = pPageFrm->IsRightToLeft();
}
}
}
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 7231e01d1756..40c6c98815fd 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -697,8 +697,8 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
if( bVert || bVertL2R )
{
- bVertic = bVert ? true : false;
- bVerticalL2R = bVertL2R ? true : false;
+ bVertic = bVert;
+ bVerticalL2R = bVertL2R;
_bMirror = false; // no mirroring in vertical environment
switch ( _eHoriRelOrient )
{
@@ -1030,8 +1030,8 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
0;
if( bVert || bVertL2R )
{
- bVertic = bVert ? true : false;
- bVerticalL2R = bVertL2R ? true : false;
+ bVertic = bVert;
+ bVerticalL2R = bVertL2R;
_bMirror = false;
switch ( _eHoriRelOrient )
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 084f0cbcee62..68606d8d6594 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -195,7 +195,7 @@ public:
void LockLines( bool bLock );
//Limit lines to 100
- bool isFull() const { return aLineRects.size()>100 ? true : false; }
+ bool isFull() const { return aLineRects.size()>100; }
};
class SwSubsRects : public SwLineRects
@@ -3286,7 +3286,7 @@ void SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) c
pPrintData,
pPage->Frm(),
&aPageBackgrdColor,
- (pPage->IsRightToLeft() ? true : false),
+ pPage->IsRightToLeft(),
&aSwRedirector );
pLines->PaintLines( pSh->GetOut() );
pLines->LockLines( false );
@@ -3333,7 +3333,7 @@ void SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) c
pPrintData,
pPage->Frm(),
&aPageBackgrdColor,
- (pPage->IsRightToLeft() ? true : false),
+ pPage->IsRightToLeft(),
&aSwRedirector );
}
@@ -4110,7 +4110,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
bool bPaintCompleteBack( !pNoTxt );
// paint complete background for transparent graphic and contour,
// if own background color exists.
- const bool bIsGraphicTransparent = pNoTxt ? pNoTxt->IsTransparent() : false;
+ const bool bIsGraphicTransparent = pNoTxt && pNoTxt->IsTransparent();
if ( !bPaintCompleteBack &&
( bIsGraphicTransparent|| bContour ) )
{
@@ -5357,7 +5357,7 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
return;
}
- const bool bLine = rAttrs.IsLine() ? true : false;
+ const bool bLine = rAttrs.IsLine();
const bool bShadow = rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE;
// - flag to control,
@@ -7059,7 +7059,7 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
// top and bottom (vertical layout) lines painted.
// NOTE2: this does not hold for the new table model!!! We paint the top border
// of each non-covered table cell.
- const bool bVert = IsVertical() ? true : false;
+ const bool bVert = IsVertical();
if ( bFlys )
{
// OD 14.11.2002 #104822# - add control for drawing left and right lines
@@ -7304,11 +7304,11 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), 0,
aRetouchePart, &aPageBackgrdColor,
- (pPage->IsRightToLeft() ? true : false),
+ pPage->IsRightToLeft(),
&aSwRedirector );
pSh->Imp()->PaintLayer( pIDDMA->GetHeavenId(), 0,
aRetouchePart, &aPageBackgrdColor,
- (pPage->IsRightToLeft() ? true : false),
+ pPage->IsRightToLeft(),
&aSwRedirector );
}
@@ -7573,7 +7573,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
SwViewObjectContactRedirector aSwRedirector( *pSh );
// <--
pImp->PaintLayer( pIDDMA->GetHellId(), 0, aOut, &aPageBackgrdColor,
- (pFlyPage->IsRightToLeft() ? true : false),
+ pFlyPage->IsRightToLeft(),
&aSwRedirector );
pLines->PaintLines( &aDev );
if ( pFly->IsFlyInCntFrm() )
@@ -7581,7 +7581,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
pLines->PaintLines( &aDev );
// OD 30.08.2002 #102450# - add 3rd parameter
pImp->PaintLayer( pIDDMA->GetHeavenId(), 0, aOut, &aPageBackgrdColor,
- (pFlyPage->IsRightToLeft() ? true : false),
+ pFlyPage->IsRightToLeft(),
&aSwRedirector );
pLines->PaintLines( &aDev );
DELETEZ( pLines );
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 1e31b45dcb45..a7b786d5e8ef 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -81,7 +81,7 @@ namespace {
const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : 0;
if ( pFly && bBackgroundMatches &&
- ( ( pCMS ? pCMS->bSetInReadOnly : false ) ||
+ ( ( pCMS && pCMS->bSetInReadOnly ) ||
!pFly->IsProtected() ) &&
pFly->GetCrsrOfst( pPos, aPoint, pCMS ) )
{
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 1607856404de..db10a840b819 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -145,7 +145,7 @@ void SwTableBox::setRowSpan( long nNewRowSpan )
bool SwTableBox::getDummyFlag() const
{
- return pImpl ? pImpl->getDummyFlag() : false;
+ return pImpl && pImpl->getDummyFlag();
}
void SwTableBox::setDummyFlag( bool bDummy )
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 9c23db71c0b0..ac3afd1a28eb 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -439,7 +439,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
{
const OUString& rTxt = rInf.GetTxt();
sal_Int32 nIdx = rInf.GetIdx();
- bAllowBehind = nIdx < rTxt.getLength() ? rCC.isLetterNumeric(rTxt, nIdx) : false;
+ bAllowBehind = nIdx < rTxt.getLength() && rCC.isLetterNumeric(rTxt, nIdx);
}
const SwLinePortion* pLast = rInf.GetLast();
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index 85429dc13fcd..5becdc38ae4e 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -248,7 +248,7 @@ public:
inline bool SwMultiPortion::HasBrackets() const
{
- return IsDouble() ? 0 != ((SwDoubleLinePortion*)this)->GetBrackets() : false;
+ return IsDouble() && 0 != ((SwDoubleLinePortion*)this)->GetBrackets();
}
#endif
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index f0bb2d00d4a9..8b89a2ef9325 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -92,7 +92,7 @@ void SwFmtCharFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
// weiterleiten an das TextAttribut
bool SwFmtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
{
- return pTxtAttr ? pTxtAttr->GetInfo( rInfo ) : false;
+ return pTxtAttr && pTxtAttr->GetInfo( rInfo );
}
bool SwFmtCharFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
@@ -693,7 +693,7 @@ bool Meta::IsInClipboard() const
{
const SwTxtNode * const pTxtNode( GetTxtNode() );
// no text node: in UNDO OSL_ENSURE(pTxtNode, "IsInClipboard: no text node?");
- return (pTxtNode) ? pTxtNode->IsInClipboard() : false;
+ return pTxtNode && pTxtNode->IsInClipboard();
}
bool Meta::IsInUndo() const
diff --git a/sw/source/core/uibase/app/docstyle.cxx b/sw/source/core/uibase/app/docstyle.cxx
index 55db367c9ff6..500bc5954cfa 100644
--- a/sw/source/core/uibase/app/docstyle.cxx
+++ b/sw/source/core/uibase/app/docstyle.cxx
@@ -1972,7 +1972,7 @@ bool SwDocStyleSheet::IsUsed() const
case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break;
case SFX_STYLE_FAMILY_PSEUDO:
- return pNumRule ? rDoc.IsUsed( *pNumRule ) : false;
+ return pNumRule && rDoc.IsUsed( *pNumRule );
default:
OSL_ENSURE(!this, "unknown style family");
diff --git a/sw/source/core/uibase/docvw/AnnotationWin.cxx b/sw/source/core/uibase/docvw/AnnotationWin.cxx
index 4d8215efd400..9ef1e482bae0 100644
--- a/sw/source/core/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/core/uibase/docvw/AnnotationWin.cxx
@@ -78,7 +78,7 @@ void SwAnnotationWin::SetPostItText()
//If the cursor was visible, then make it visible again after
//changing text, e.g. fdo#33599
Cursor *pCursor = GetOutlinerView()->GetEditView().GetCursor();
- bool bCursorVisible = pCursor ? pCursor->IsVisible() : false;
+ bool bCursorVisible = pCursor && pCursor->IsVisible();
//If the new text is the same as the old text, keep the same insertion
//point .e.g. fdo#33599
@@ -295,7 +295,7 @@ bool SwAnnotationWin::IsProtected()
{
return SwSidebarWin::IsProtected() ||
GetLayoutStatus() == SwPostItHelper::DELETED ||
- ( mpFmtFld ? mpFmtFld->IsProtect() : false );
+ ( mpFmtFld && mpFmtFld->IsProtect() );
}
OUString SwAnnotationWin::GetAuthor()
diff --git a/sw/source/core/uibase/docvw/SidebarWin.cxx b/sw/source/core/uibase/docvw/SidebarWin.cxx
index 30905a0d79d5..1a7b6e67d5d2 100644
--- a/sw/source/core/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/core/uibase/docvw/SidebarWin.cxx
@@ -693,7 +693,7 @@ void SwSidebarWin::SetPosAndSize()
DocView(),
mColorAnchor,
aAnnotationTextRanges,
- mpAnchor != NULL ? mpAnchor->getLineSolid() : false );
+ mpAnchor && mpAnchor->getLineSolid() );
}
}
else
diff --git a/sw/source/core/uibase/docvw/edtwin.cxx b/sw/source/core/uibase/docvw/edtwin.cxx
index f391ca1009b8..1c37d91c7f03 100644
--- a/sw/source/core/uibase/docvw/edtwin.cxx
+++ b/sw/source/core/uibase/docvw/edtwin.cxx
@@ -1432,7 +1432,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
// pressing this inside a note will switch to next/previous note
if ((rKeyCode.IsMod1() && rKeyCode.IsMod2()) && ((rKeyCode.GetCode() == KEY_PAGEUP) || (rKeyCode.GetCode() == KEY_PAGEDOWN)))
{
- const bool bNext = rKeyCode.GetCode()==KEY_PAGEDOWN ? true : false;
+ const bool bNext = rKeyCode.GetCode()==KEY_PAGEDOWN;
const SwFieldType* pFldType = rSh.GetFldType( 0, RES_POSTITFLD );
rSh.MoveFldType( pFldType, bNext );
return;
diff --git a/sw/source/core/uibase/fldui/fldmgr.cxx b/sw/source/core/uibase/fldui/fldmgr.cxx
index eda301efb268..f69a1c5cb068 100644
--- a/sw/source/core/uibase/fldui/fldmgr.cxx
+++ b/sw/source/core/uibase/fldui/fldmgr.cxx
@@ -780,11 +780,11 @@ bool SwFldMgr::GoNextPrev( bool bNext, SwFieldType* pTyp )
if (pTyp && pTyp->Which() == RES_DBFLD)
{
// for fieldcommand-edit (hop to all DB fields)
- return pSh->MoveFldType( 0, (bNext ? true : false), RES_DBFLD );
+ return pSh->MoveFldType( 0, bNext, RES_DBFLD );
}
return (pTyp && pSh)
- ? pSh->MoveFldType( pTyp, (bNext ? true : false) )
+ ? pSh->MoveFldType( pTyp, bNext )
: sal_False;
}
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index a81fa6f311f1..b229aa32687d 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -356,7 +356,7 @@ void SwUndoDelSection::UndoImpl(::sw::UndoRedoContext & rContext)
SwCalc aCalc( rDoc );
rDoc.FldsToCalc(aCalc, pInsertedSectNd->GetIndex(), USHRT_MAX);
bool bRecalcCondHidden =
- aCalc.Calculate( aInsertedSect.GetCondition() ).GetBool() ? true : false;
+ aCalc.Calculate( aInsertedSect.GetCondition() ).GetBool();
aInsertedSect.SetCondHidden( bRecalcCondHidden );
}
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index 0687eae3b518..bdf91c63ad86 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -63,9 +63,7 @@ public:
, m_rThis(rThis)
, m_bIsEndnote(bIsEndnote)
, m_EventListeners(m_Mutex)
-// #i111177#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this
-// , m_bIsDescriptor(0 == pFootnote)
- , m_bIsDescriptor((0 == pFootnote) ? true : false)
+ , m_bIsDescriptor(0 == pFootnote)
, m_pFmtFtn(pFootnote)
{
}
@@ -322,8 +320,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
SwXTextCursor const*const pTextCursor(
dynamic_cast<SwXTextCursor*>(pCursor));
- const bool bForceExpandHints( (pTextCursor)
- ? pTextCursor->IsAtEndOfMeta() : false );
+ const bool bForceExpandHints( pTextCursor && pTextCursor->IsAtEndOfMeta() );
const SetAttrMode nInsertFlags = (bForceExpandHints)
? nsSetAttrMode::SETATTR_FORCEHINTEXPAND
: nsSetAttrMode::SETATTR_DEFAULT;
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index cc634733aa48..6bda22242f44 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -340,8 +340,7 @@ public:
, m_rPropSet(
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Index(eType)))
, m_eTOXType(eType)
- // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
- , m_bIsDescriptor((0 == pBaseSection) ? true : false)
+ , m_bIsDescriptor(0 == pBaseSection)
, m_pDoc(&rDoc)
, m_pProps((m_bIsDescriptor)
? new SwDocIndexDescriptorProperties_Impl(rDoc.GetTOXType(eType, 0))
@@ -1572,9 +1571,7 @@ public:
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType)))
, m_eTOXType(eType)
, m_EventListeners(m_Mutex)
-// #i112513#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this
-// , m_bIsDescriptor(0 == pMark)
- , m_bIsDescriptor((0 == pMark) ? true : false)
+ , m_bIsDescriptor(0 == pMark)
, m_TypeDepend(this, pType)
, m_pTOXMark(pMark)
, m_pDoc(pDoc)
@@ -1964,8 +1961,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
rMark.SetAlternativeText( OUString(' ') );
}
- const bool bForceExpandHints( (!bMark && pTextCursor)
- ? pTextCursor->IsAtEndOfMeta() : false );
+ const bool bForceExpandHints( !bMark && pTextCursor && pTextCursor->IsAtEndOfMeta() );
const SetAttrMode nInsertFlags = (bForceExpandHints)
? ( nsSetAttrMode::SETATTR_FORCEHINTEXPAND
| nsSetAttrMode::SETATTR_DONTEXPAND)
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index e5f9207d49ea..da5eed08c2dd 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -117,8 +117,7 @@ public:
, m_rThis(rThis)
, m_EventListeners(m_Mutex)
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH))
- // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
- , m_bIsDescriptor((0 == pTxtNode) ? true : false)
+ , m_bIsDescriptor(0 == pTxtNode)
, m_nSelectionStartPos(nSelStart)
, m_nSelectionEndPos(nSelEnd)
, m_xParentText(xParent)
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index bc6cf31c13bd..c6a7bc482481 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -599,8 +599,7 @@ static void lcl_ExportBookmark(
new SwXTextPortion(pUnoCrsr, xParent, PORTION_BOOKMARK_START);
rPortions.push_back(pPortion);
pPortion->SetBookmark(pPtr->xBookmark);
- pPortion->SetCollapsed( (BKM_TYPE_START_END == pPtr->nBkmType)
- ? true : false);
+ pPortion->SetCollapsed( BKM_TYPE_START_END == pPtr->nBkmType );
}
if (BKM_TYPE_END == pPtr->nBkmType)
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 2b747742ae03..eace1acde1c2 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -57,8 +57,7 @@ public:
: SwClient((pDoc) ? pDoc->GetUnoCallBack() : 0)
, m_rThis(rThis)
, m_EventListeners(m_Mutex)
- // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
- , m_bIsDescriptor((0 == pRefMark) ? true : false)
+ , m_bIsDescriptor(0 == pRefMark)
, m_pDoc(pDoc)
, m_pMarkFmt(pRefMark)
{
@@ -213,8 +212,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
SwFmtRefMark aRefMark(m_sMarkName);
bool bMark = *rPam.GetPoint() != *rPam.GetMark();
- const bool bForceExpandHints( (!bMark && pCursor)
- ? pCursor->IsAtEndOfMeta() : false );
+ const bool bForceExpandHints( !bMark && pCursor && pCursor->IsAtEndOfMeta() );
const SetAttrMode nInsertFlags = (bForceExpandHints)
? ( nsSetAttrMode::SETATTR_FORCEHINTEXPAND
| nsSetAttrMode::SETATTR_DONTEXPAND)
@@ -669,8 +667,7 @@ public:
, m_EventListeners(m_Mutex)
, m_pTextPortions( pPortions )
, m_bIsDisposed( false )
- // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
- , m_bIsDescriptor((0 == pMeta) ? true : false)
+ , m_bIsDescriptor(0 == pMeta)
, m_xParentText(xParentText)
, m_Text(rDoc, rThis)
{
@@ -1021,8 +1018,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
SwXTextCursor const*const pTextCursor(
dynamic_cast<SwXTextCursor*>(pCursor));
- const bool bForceExpandHints((pTextCursor)
- ? pTextCursor->IsAtEndOfMeta() : false);
+ const bool bForceExpandHints(pTextCursor && pTextCursor->IsAtEndOfMeta());
const SetAttrMode nInsertFlags( (bForceExpandHints)
? ( nsSetAttrMode::SETATTR_FORCEHINTEXPAND
| nsSetAttrMode::SETATTR_DONTEXPAND)
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 7da430f72f89..f2eb49adb3d5 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -124,8 +124,7 @@ public:
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_SECTION))
, m_EventListeners(m_Mutex)
, m_bIndexHeader(bIndexHeader)
- // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
- , m_bIsDescriptor((0 == pFmt) ? true : false)
+ , m_bIsDescriptor(0 == pFmt)
, m_pProps((pFmt) ? 0 : new SwTextSectionProperties_Impl())
{
}
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index dd84c4afff7e..fe0efbff88fe 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -917,7 +917,7 @@ struct PreviewPosInsidePagePred
if ( _pPreviewPage->bVisible )
{
Rectangle aPreviewPageRect( _pPreviewPage->aPreviewWinPos, _pPreviewPage->aPageSize );
- return aPreviewPageRect.IsInside( mnPreviewPos ) ? true : false;
+ return aPreviewPageRect.IsInside( mnPreviewPos );
}
else
return false;
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 2f2d6f94d94d..fe138639dfbf 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -772,7 +772,7 @@ namespace sw
if (pOne->aStamp == pTwo->aStamp)
return (pOne->eType == nsRedlineType_t::REDLINE_INSERT && pTwo->eType != nsRedlineType_t::REDLINE_INSERT);
else
- return (pOne->aStamp < pTwo->aStamp) ? true : false;
+ return (pOne->aStamp < pTwo->aStamp);
}
RedlineStack::~RedlineStack()
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index f8bdeab9991e..fd48f9bc146f 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -725,7 +725,7 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
else
{
Graphic& rGrf = const_cast<Graphic&>(rGrfNd.GetGrf());
- bool bSwapped = rGrf.IsSwapOut() ? true : false;
+ bool bSwapped = rGrf.IsSwapOut();
// immer ueber den Node einswappen!
const_cast<SwGrfNode&>(rGrfNd).SwapIn();
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 4f1b98ca1cd2..da3cfbb0bcdb 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1132,7 +1132,7 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
InsertAttrsAsDrawingAttrs(nStartCp, nEndCp, eType);
}
- bool bVertical = pTextObj->IsVerticalWriting() ? true : false;
+ bool bVertical = pTextObj->IsVerticalWriting();
EditTextObject* pTemporaryText = mpDrawEditEngine->CreateTextObject();
OutlinerParaObject* pOp = new OutlinerParaObject(*pTemporaryText);
pOp->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 829419bcfa61..03dff3824e65 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2317,7 +2317,7 @@ void SwWW8ImplReader::Read_HdFtText(long nStart, long nLen, SwFrmFmt* pHdFtFmt)
bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const
{
// Each CP of Plcfhdd MUST be less than FibRgLw97.ccpHdd
- return (nHeaderCP < pWwFib->ccpHdr) ? true : false;
+ return (nHeaderCP < pWwFib->ccpHdr);
}
bool SwWW8ImplReader::HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt,
@@ -4378,7 +4378,7 @@ void wwSectionManager::InsertSegments()
bool bThisAndPreviousAreCompatible = ((aIter->GetPageWidth() == aPrev->GetPageWidth()) &&
(aIter->GetPageHeight() == aPrev->GetPageHeight()) && (aIter->IsLandScape() == aPrev->IsLandScape()));
- bool bInsertSection = (aIter != aStart) ? (aIter->IsContinuous() && bThisAndPreviousAreCompatible): false;
+ bool bInsertSection = (aIter != aStart) && aIter->IsContinuous() && bThisAndPreviousAreCompatible;
bool bInsertPageDesc = !bInsertSection;
bool bProtected = SectionIsProtected(*aIter); // do we really need this ?? I guess I have a different logic in editshell which disables this...
if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected())
@@ -6174,7 +6174,7 @@ bool WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, bool bSaveRelFiles) const
WW8Glossary aGloss( refStrm, 8, pStg );
bRet = aGloss.Load( rBlocks, bSaveRelFiles ? true : false);
}
- return bRet ? true : false;
+ return bRet;
}
bool SwMSDffManager::GetOLEStorageName(long nOLEId, OUString& rStorageName,
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 0fc5859bec1d..02168178f5fc 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1666,7 +1666,7 @@ private:
bool SetLowerSpacing(SwPaM &rMyPam, int nSpace);
bool IsInlineEscherHack() const
- {return !maFieldStack.empty() ? maFieldStack.back().mnFieldId == 95 : false; };
+ { return !maFieldStack.empty() && maFieldStack.back().mnFieldId == 95; };
void StoreMacroCmds();
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 8554ff0d73ad..bf4b67ae5561 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2151,8 +2151,7 @@ eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, OUString& rStr)
aVText += aReadParam.GetResult();
if (bNewVText)
{
- bBracket = (aVText[0] == '[')
- ? true : false;
+ bBracket = (aVText[0] == '[');
bNewVText = false;
}
else if( aVText.endsWith("]") )
diff --git a/toolkit/qa/complex/toolkit/Assert.java b/toolkit/qa/complex/toolkit/Assert.java
index 609befcc3dd6..a413fb8e7ff3 100644
--- a/toolkit/qa/complex/toolkit/Assert.java
+++ b/toolkit/qa/complex/toolkit/Assert.java
@@ -51,7 +51,7 @@ public class Assert
boolean noExceptionAllowed = ( i_expectedExceptionClass == null );
- boolean caughtExpected = noExceptionAllowed ? true : false;
+ boolean caughtExpected = noExceptionAllowed;
try
{
Method method = impl_getMethod( objectClass, i_methodName, i_argClasses );
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index b7e48d50af36..d424479021aa 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -378,7 +378,7 @@ void VCLXWindow::SetWindow( Window* pWindow )
if ( GetWindow() )
{
GetWindow()->AddEventListener( LINK( this, VCLXWindow, WindowEventListener ) );
- bool bDirectVisible = pWindow ? pWindow->IsVisible() : false;
+ bool bDirectVisible = pWindow && pWindow->IsVisible();
mpImpl->setDirectVisible( bDirectVisible );
}
}
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index b1426faaa8d7..fe33e1ea40c1 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -134,7 +134,7 @@ public:
bool operator()( const ControlModelContainerBase::UnoControlModelHolder& _rCompare )
{
- return ( _rCompare.second == m_rName ) ? true : false;
+ return _rCompare.second == m_rName;
}
};
@@ -172,7 +172,7 @@ public:
bool operator()( const ControlModelContainerBase::UnoControlModelHolder& _rCompare )
{
- return ( _rCompare.first.get() == m_xReference.get() ) ? true : false;
+ return _rCompare.first.get() == m_xReference.get();
}
};
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx
index 786e0b3fcf17..18f470a6240a 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -498,7 +498,7 @@
{
bool operator()( const Property& _rLHS, const Property& _rRHS )
{
- return _rLHS.Name < _rRHS.Name ? true : false;
+ return _rLHS.Name < _rRHS.Name;
}
};
@@ -510,7 +510,7 @@
bool operator()( const Property& _rLHS )
{
- return _rLHS.Name == m_rCompare ? true : false;
+ return _rLHS.Name == m_rCompare;
}
};
@@ -593,7 +593,7 @@
bool operator()( sal_Int32 _nLHS )
{
- return _nLHS == m_nCompare ? true : false;
+ return _nLHS == m_nCompare;
}
};
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index 89adc8b339f0..0a587c359cfe 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -431,7 +431,7 @@ void printMethods(std::ostream & o,
static OString sd("_");
bool body = !delegate.isEmpty();
- bool defaultbody = ((delegate.equals(sd)) ? true : false);
+ bool defaultbody = delegate.equals(sd);
if (body && propertyhelper.getLength() > 1) {
if (name == "com.sun.star.beans.XPropertySet") {
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index 71764de0ada4..50244b10eda5 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -443,7 +443,7 @@ void printMethods(std::ostream & o,
static OString sd("_");
bool body = !delegate.isEmpty();
- bool defaultbody = ((delegate.equals(sd)) ? true : false);
+ bool defaultbody = delegate.equals(sd);
generated.add(u2b(name));
rtl::Reference< unoidl::Entity > ent;
diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx
index 71708590597b..1463492d8ac8 100644
--- a/vcl/generic/print/common_gfx.cxx
+++ b/vcl/generic/print/common_gfx.cxx
@@ -64,7 +64,7 @@ PrinterGfx::Init (PrinterJob &rPrinterJob)
mnDpi = rPrinterJob.GetResolution();
rPrinterJob.GetScale (mfScaleX, mfScaleY);
const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rPrinterJob.GetPrinterName() ) );
- mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? true : false ) : false;
+ mbUploadPS42Fonts = rInfo.m_pParser && rInfo.m_pParser->isType42Capable();
return true;
}
@@ -76,13 +76,13 @@ PrinterGfx::Init (const JobData& rData)
mpPageBody = NULL;
mnDepth = rData.m_nColorDepth;
mnPSLevel = rData.m_nPSLevel ? rData.m_nPSLevel : (rData.m_pParser ? rData.m_pParser->getLanguageLevel() : 2 );
- mbColor = rData.m_nColorDevice ? ( rData.m_nColorDevice == -1 ? false : true ) : (( rData.m_pParser ? (rData.m_pParser->isColorDevice() ? true : false ) : true ) );
+ mbColor = rData.m_nColorDevice ? ( rData.m_nColorDevice != -1 ) : ( rData.m_pParser ? rData.m_pParser->isColorDevice() : true );
int nRes = rData.m_aContext.getRenderResolution();
mnDpi = nRes;
mfScaleX = (double)72.0 / (double)mnDpi;
mfScaleY = (double)72.0 / (double)mnDpi;
const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rData.m_aPrinterName ) );
- mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? true : false ) : false;
+ mbUploadPS42Fonts = rInfo.m_pParser && rInfo.m_pParser->isType42Capable();
return true;
}
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx
index fc85e21e1afc..e80ec57b6b6c 100644
--- a/vcl/generic/print/genprnpsp.cxx
+++ b/vcl/generic/print/genprnpsp.cxx
@@ -970,7 +970,7 @@ bool PspSalPrinter::EndPage()
bool bResult = m_aPrintJob.EndPage();
m_aPrinterGfx.Clear();
OSL_TRACE("PspSalPrinter::EndPage");
- return bResult ? true : false;
+ return bResult;
}
sal_uLong PspSalPrinter::GetErrorCode()
diff --git a/vcl/generic/print/printerjob.cxx b/vcl/generic/print/printerjob.cxx
index dc3b84675665..19b19e86ab93 100644
--- a/vcl/generic/print/printerjob.cxx
+++ b/vcl/generic/print/printerjob.cxx
@@ -155,9 +155,9 @@ PrinterJob::IsColorPrinter () const
bool bColor = false;
if( m_aLastJobData.m_nColorDevice )
- bColor = m_aLastJobData.m_nColorDevice == -1 ? false : true;
+ bColor = m_aLastJobData.m_nColorDevice != -1;
else if( m_aLastJobData.m_pParser )
- bColor = m_aLastJobData.m_pParser->isColorDevice() ? true : false;
+ bColor = m_aLastJobData.m_pParser->isColorDevice();
return bColor;
}
diff --git a/vcl/generic/print/text_gfx.cxx b/vcl/generic/print/text_gfx.cxx
index 40a7dad60558..2513843d49e4 100644
--- a/vcl/generic/print/text_gfx.cxx
+++ b/vcl/generic/print/text_gfx.cxx
@@ -66,8 +66,8 @@ Font2::Font2(const PrinterGfx &rGfx)
mpFont[1] = rGfx.getFallbackID();
PrintFontManager &rMgr = PrintFontManager::get();
- mbSymbol = mpFont[0] != -1 ?
- rMgr.getFontEncoding(mpFont[0]) == RTL_TEXTENCODING_SYMBOL : false;
+ mbSymbol = mpFont[0] != -1 &&
+ rMgr.getFontEncoding(mpFont[0]) == RTL_TEXTENCODING_SYMBOL;
}
} // namespace psp
@@ -714,7 +714,7 @@ PrinterGfx::writeResources( osl::File* pFile, std::list< OString >& rSuppliedFon
{
if (aIter->GetFontType() == fonttype::TrueType)
{
- aIter->PSUploadFont (*pFile, *this, mbUploadPS42Fonts ? true : false, rSuppliedFonts );
+ aIter->PSUploadFont (*pFile, *this, mbUploadPS42Fonts, rSuppliedFonts );
}
else
{
diff --git a/vcl/inc/fontmanager.hxx b/vcl/inc/fontmanager.hxx
index acac65cf524d..e1203bd83a90 100644
--- a/vcl/inc/fontmanager.hxx
+++ b/vcl/inc/fontmanager.hxx
@@ -399,7 +399,7 @@ public:
bool getUseOnlyFontEncoding( fontID nFontID ) const
{
PrintFont* pFont = getFont( nFontID );
- return pFont ? pFont->m_bFontEncodingOnly : false;
+ return pFont && pFont->m_bFontEncodingOnly;
}
// get a specific fonts system dependent filename
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index dda41306a60f..da756f00fb6c 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -409,7 +409,7 @@ bool AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart
{
Rectangle aRect;
bool bValid = AquaGetScrollRect( /* TODO: m_nScreen */ nPart, rControlRegion, aRect );
- rIsInside = bValid ? aRect.IsInside( rPos ) : false;
+ rIsInside = bValid && aRect.IsInside( rPos );
if( NSAppKitVersionNumber < NSAppKitVersionNumber10_7 &&
GetSalData()->mbIsScrollbarDoubleMax )
{
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 2c46385d19cc..4174d5af59ae 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2340,7 +2340,7 @@ ImplMiscData::ImplMiscData()
mnEnableATT = TRISTATE_INDET;
mnDisablePrinting = TRISTATE_INDET;
static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
- mbEnableLocalizedDecimalSep = (pEnv != NULL) ? true : false;
+ mbEnableLocalizedDecimalSep = (pEnv != NULL);
}
ImplMiscData::ImplMiscData( const ImplMiscData& rData )
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 66082155c108..f117e3f73d9d 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -513,7 +513,7 @@ void Edit::ImplRepaint(bool bLayout)
}
Cursor* pCursor = GetCursor();
- bool bVisCursor = pCursor ? pCursor->IsVisible() : false;
+ bool bVisCursor = pCursor && pCursor->IsVisible();
if ( pCursor )
pCursor->Hide();
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index ea56541a1b24..52dd5890d67d 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -453,7 +453,7 @@ sal_Int32 ImplEntryList::GetSelectEntryPos( sal_Int32 nIndex ) const
bool ImplEntryList::IsEntryPosSelected( sal_Int32 nIndex ) const
{
ImplEntryType* pImplEntry = GetEntry( nIndex );
- return pImplEntry ? pImplEntry->mbIsSelected : false;
+ return pImplEntry && pImplEntry->mbIsSelected;
}
bool ImplEntryList::IsEntrySelectable( sal_Int32 nPos ) const
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index c19f5df28648..2223ff092e18 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -750,7 +750,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
if ( IsUndoEnabled() && !IsInUndo() )
{
TextUndoInsertChars* pNewUndo = new TextUndoInsertChars( this, aPaM, OUString(c) );
- bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? true : false;
+ bool bTryMerge = !bDoOverwrite && ( c != ' ' );
InsertUndo( pNewUndo, bTryMerge );
}
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index c3593f8e8d9e..2be376153832 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -2049,7 +2049,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
bool bStarterOfDD = false;
for ( sal_uInt16 nView = mpImpl->mpTextEngine->GetViewCount(); nView && !bStarterOfDD; )
- bStarterOfDD = mpImpl->mpTextEngine->GetView( --nView )->mpImpl->mpDDInfo ? mpImpl->mpTextEngine->GetView( nView )->mpImpl->mpDDInfo->mbStarterOfDD : false;
+ bStarterOfDD = mpImpl->mpTextEngine->GetView( --nView )->mpImpl->mpDDInfo && mpImpl->mpTextEngine->GetView( nView )->mpImpl->mpDDInfo->mbStarterOfDD;
HideSelection();
ImpSetSelection( mpImpl->mpDDInfo->maDropPos );
diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx
index 6f63ccecb9a0..6eff3dd2f22d 100644
--- a/vcl/source/edit/xtextedt.cxx
+++ b/vcl/source/edit/xtextedt.cxx
@@ -245,7 +245,7 @@ bool ExtTextView::MatchGroup()
if ( aMatchSel.HasRange() )
SetSelection( aMatchSel );
- return aMatchSel.HasRange() ? true : false;
+ return aMatchSel.HasRange();
}
bool ExtTextView::Search( const util::SearchOptions& rSearchOptions, bool bForward )
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 7be3492ccfb7..7aa84e22833c 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -860,7 +860,7 @@ bool EnhWMFReader::ReadEnhWMF()
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
pWMF->ReadUInt32( nStyle );
- pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? true : false ) );
+ pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ) );
}
}
break;
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 22940dd3ed57..8b1936b0e8c7 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -815,7 +815,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
sal_uInt16 nStyle = 0;
pWMF->ReadUInt16( nStyle );
- pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? true : false ) );
+ pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ) );
}
break;
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index dee0722356ba..dbdc6d2e400a 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -271,7 +271,7 @@ sal_uInt16 Bitmap::GetBitCount() const
bool Bitmap::HasGreyPalette() const
{
const sal_uInt16 nBitCount = GetBitCount();
- bool bRet = nBitCount == 1 ? true : false;
+ bool bRet = nBitCount == 1;
BitmapReadAccess* pRAcc = ( (Bitmap*) this )->AcquireReadAccess();
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index da9d07f66295..bc25f0490dba 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -467,12 +467,12 @@ bool BitmapEx::Crop( const Rectangle& rRectPixel )
bool BitmapEx::Convert( BmpConversion eConversion )
{
- return( !!aBitmap ? aBitmap.Convert( eConversion ) : false );
+ return !!aBitmap && aBitmap.Convert( eConversion );
}
bool BitmapEx::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce )
{
- return( !!aBitmap ? aBitmap.ReduceColors( nNewColorCount, eReduce ) : false );
+ return !!aBitmap && aBitmap.ReduceColors( nNewColorCount, eReduce );
}
bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor, bool bExpandTransparent )
@@ -614,31 +614,31 @@ bool BitmapEx::Erase( const Color& rFillColor )
bool BitmapEx::Dither( sal_uLong nDitherFlags )
{
- return( !!aBitmap ? aBitmap.Dither( nDitherFlags ) : false );
+ return !!aBitmap && aBitmap.Dither( nDitherFlags );
}
bool BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol )
{
- return( !!aBitmap ? aBitmap.Replace( rSearchColor, rReplaceColor, nTol ) : false );
+ return !!aBitmap && aBitmap.Replace( rSearchColor, rReplaceColor, nTol );
}
bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, const sal_uLong* pTols )
{
- return( !!aBitmap ? aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, (sal_uLong*) pTols ) : false );
+ return !!aBitmap && aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, (sal_uLong*) pTols );
}
bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent, short nChannelBPercent,
double fGamma, bool bInvert, bool msoBrightness )
{
- return( !!aBitmap ? aBitmap.Adjust( nLuminancePercent, nContrastPercent,
+ return !!aBitmap && aBitmap.Adjust( nLuminancePercent, nContrastPercent,
nChannelRPercent, nChannelGPercent, nChannelBPercent,
- fGamma, bInvert, msoBrightness ) : false );
+ fGamma, bInvert, msoBrightness );
}
bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
{
- return( !!aBitmap ? aBitmap.Filter( eFilter, pFilterParam, pProgress ) : false );
+ return !!aBitmap && aBitmap.Filter( eFilter, pFilterParam, pProgress );
}
void BitmapEx::Draw( OutputDevice* pOutDev, const Point& rDestPt ) const
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index a055283a54f5..ff8c044c9650 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1514,7 +1514,7 @@ GfxLink ImpGraphic::ImplGetLink()
bool ImpGraphic::ImplIsLink() const
{
- return ( mpGfxLink != NULL ) ? true : false;
+ return ( mpGfxLink != NULL );
}
sal_uLong ImpGraphic::ImplGetChecksum() const
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 26189b83651c..2766ef23a787 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -1152,7 +1152,7 @@ public:
void setTextFillColor( const Color& rColor )
{
m_aGraphicsStack.front().m_aFont.SetFillColor( rColor );
- m_aGraphicsStack.front().m_aFont.SetTransparent( ImplIsColorTransparent( rColor ) ? true : false );
+ m_aGraphicsStack.front().m_aFont.SetTransparent( ImplIsColorTransparent( rColor ) );
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFont;
}
void setTextFillColor()
diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx
index 996463b84eb7..abf06ff0d4a9 100644
--- a/vcl/source/helper/lazydelete.cxx
+++ b/vcl/source/helper/lazydelete.cxx
@@ -57,7 +57,7 @@ void LazyDelete::flush()
// specialized is_less function for Window
template<> bool LazyDeletor<Window>::is_less( Window* left, Window* right )
{
- return (left != right && right->IsChild( left, true )) ? true : false;
+ return left != right && right->IsChild( left, true );
}
#ifndef LINUX
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index af9eb1b0e0e6..c5030ad66200 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -746,7 +746,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
{
Color aColor( rColor );
- bool bTransFill = ImplIsColorTransparent( aColor ) ? true : false;
+ bool bTransFill = ImplIsColorTransparent( aColor );
if ( !bTransFill )
{
@@ -1334,7 +1334,7 @@ bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, sal_
bool bRTL = false;
int nCharPos = -1;
aArgs.GetNextPos( &nCharPos, &bRTL );
- return (nCharPos != nIndex) ? true : false;
+ return (nCharPos != nIndex);
}
sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 91a2b9769186..dfeff7320a73 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -176,7 +176,7 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString&
, m_pParserState(new ParserState)
, m_xFrame(rFrame)
{
- m_bToplevelHasDeferredInit = (pParent && pParent->IsDialog()) ? ((Dialog*)pParent)->isDeferredInit() : false;
+ m_bToplevelHasDeferredInit = pParent && pParent->IsDialog() && ((Dialog*)pParent)->isDeferredInit();
m_bToplevelHasDeferredProperties = m_bToplevelHasDeferredInit;
sal_Int32 nIdx = m_sHelpRoot.lastIndexOf('.');
@@ -1820,9 +1820,9 @@ bool VclBuilder::sortIntoBestTabTraversalOrder::operator()(const Window *pA, con
sal_Int32 nPackA = m_pBuilder->get_window_packing_data(pA).m_nPosition;
sal_Int32 nPackB = m_pBuilder->get_window_packing_data(pB).m_nPosition;
if (nPackA < nPackB)
- return ePackA == VCL_PACK_START ? true : false;
+ return ePackA == VCL_PACK_START;
if (nPackA > nPackB)
- return ePackA == VCL_PACK_START ? false : true;
+ return ePackA != VCL_PACK_START;
//sort labels of Frames before body
if (pA->GetParent() == pB->GetParent())
{
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 9a33284c5245..756a09b7343c 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1189,7 +1189,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal
bool Dialog::isLayoutEnabled() const
{
//pre dtor called, and single child is a container => we're layout enabled
- return mpDialogImpl ? ::isLayoutEnabled(this) : false;
+ return mpDialogImpl && ::isLayoutEnabled(this);
}
Size Dialog::GetOptimalSize() const
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 9ed5681a4b70..b06a9a5493d6 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1958,7 +1958,7 @@ void Menu::SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror )
( ! pData->bMirrorMode && bMirror )
)
{
- pData->bMirrorMode = bMirror ? true : false;
+ pData->bMirrorMode = bMirror;
if( !!pData->aImage )
pData->aImage = ImplMirrorImage( pData->aImage );
}
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 00e9e5f277c7..cf9642e4d21a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -787,7 +787,7 @@ bool PrintDialog::isPrintToFile()
bool PrintDialog::isCollate()
{
- return maJobPage.mpCopyCountField->GetValue() > 1 ? maJobPage.mpCollateBox->IsChecked() : false;
+ return maJobPage.mpCopyCountField->GetValue() > 1 && maJobPage.mpCollateBox->IsChecked();
}
bool PrintDialog::isSingleJobs()
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index d24f76bbdfbb..508b582d075d 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -897,7 +897,7 @@ void SystemWindow::SetMenuBar( MenuBar* pMenuBar )
ImplToBottomChild();
if ( pOldMenuBar )
{
- bool bDelete = (pMenuBar == 0) ? true : false;
+ bool bDelete = (pMenuBar == 0);
if( bDelete && pOldWindow )
{
if( mpImplData->mpTaskPaneList )
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 965a0871e220..6ca7338e7553 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3141,7 +3141,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
if( bHasOpenPopup )
ImplDrawFloatwinBorder( pItem );
else
- ImplDrawButton( this, aButtonRect, nHighlight, pItem->meState == TRISTATE_TRUE, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? true : false );
+ ImplDrawButton( this, aButtonRect, nHighlight, pItem->meState == TRISTATE_TRUE, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow );
if( nHighlight != 0 )
{
@@ -3195,7 +3195,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
if( bHasOpenPopup )
ImplDrawFloatwinBorder( pItem );
else
- ImplDrawButton( this, pItem->maRect, nHighlight, pItem->meState == TRISTATE_TRUE, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? true : false );
+ ImplDrawButton( this, pItem->maRect, nHighlight, pItem->meState == TRISTATE_TRUE, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow );
}
sal_uInt16 nTextStyle = 0;
@@ -4283,7 +4283,7 @@ bool ToolBox::Notify( NotifyEvent& rNEvt )
if( bNoTabCycling && ! (GetStyle() & WB_FORCETABCYCLE) )
return DockingWindow::Notify( rNEvt );
- else if( ImplChangeHighlightUpDn( aKeyCode.IsShift() ? true : false , bNoTabCycling ) )
+ else if( ImplChangeHighlightUpDn( aKeyCode.IsShift() , bNoTabCycling ) )
return false;
else
return DockingWindow::Notify( rNEvt );
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 5619b4cbba81..ea9a1fa14988 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1338,7 +1338,7 @@ void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror )
( ! pItem->mbMirrorMode && bMirror )
)
{
- pItem->mbMirrorMode = bMirror ? true : false;
+ pItem->mbMirrorMode = bMirror;
if( !!pItem->maImage )
{
pItem->maImage = ImplMirrorImage( pItem->maImage );
@@ -2134,7 +2134,7 @@ bool ToolBox::AlwaysLocked()
}
}
- return nAlwaysLocked == 1 ? true : false;
+ return nAlwaysLocked == 1;
}
bool ToolBox::WillUsePopupMode() const
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 2747c4547de1..3d05688e8abc 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -6503,7 +6503,7 @@ void Window::SetCallHandlersOnInputDisabled( bool bCall )
bool Window::IsCallHandlersOnInputDisabled() const
{
- return mpWindowImpl->mbCallHandlersDuringInputDisabled ? true : false;
+ return mpWindowImpl->mbCallHandlersDuringInputDisabled;
}
void Window::EnableInput( bool bEnable, bool bChild )
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index a476957b45ef..0d7889b51bb4 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -4023,7 +4023,7 @@ void SelectionManagerHolder::initialize( const Sequence< Any >& arguments ) thro
sal_Bool SelectionManagerHolder::isDragImageSupported() throw(std::exception)
{
- return m_xRealDragSource.is() ? m_xRealDragSource->isDragImageSupported() : false;
+ return m_xRealDragSource.is() && m_xRealDragSource->isDragImageSupported();
}
sal_Int32 SelectionManagerHolder::getDefaultCursor( sal_Int8 dragAction ) throw(std::exception)
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index bbc2b369fcbe..d99c406df8a8 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -113,7 +113,7 @@ X11SalGraphics::X11SalGraphics()
#if ENABLE_GRAPHITE
// check if graphite fonts have been disabled
static const char* pDisableGraphiteStr = getenv( "SAL_DISABLE_GRAPHITE" );
- bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : false;
+ bDisableGraphite_ = pDisableGraphiteStr && (pDisableGraphiteStr[0]!='0');
#endif
pBrushGC_ = NULL;
diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx
index 56aa036c8266..cd0d0b5c0aeb 100644
--- a/vcl/unx/generic/gdi/salvd.cxx
+++ b/vcl/unx/generic/gdi/salvd.cxx
@@ -156,7 +156,7 @@ bool X11SalVirtualDevice::Init( SalDisplay *pDisplay,
pGraphics_->Init( this, pColormap, bDeleteColormap );
- return hDrawable_ != None ? true : false;
+ return hDrawable_ != None;
}
X11SalVirtualDevice::X11SalVirtualDevice() :
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index d51577dd029a..3a818d242a50 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -821,10 +821,7 @@ const PPDKey* PPDParser::getKey( const OUString& rKey ) const
bool PPDParser::hasKey( const PPDKey* pKey ) const
{
- return
- pKey ?
- ( m_aKeys.find( pKey->getKey() ) != m_aKeys.end() ? true : false ) :
- false;
+ return pKey && ( m_aKeys.find( pKey->getKey() ) != m_aKeys.end() );
}
static sal_uInt8 getNibble( sal_Char cChar )
@@ -1676,7 +1673,7 @@ bool PPDContext::resetValue( const PPDKey* pKey, bool bDefaultable )
if( ! pResetValue && bDefaultable )
pResetValue = pKey->getDefaultValue();
- bool bRet = pResetValue ? ( setValue( pKey, pResetValue ) == pResetValue ? true : false ) : false;
+ bool bRet = pResetValue && ( setValue( pKey, pResetValue ) == pResetValue );
return bRet;
}
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 558eba0b63e6..30dd88c7569c 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -507,12 +507,12 @@ namespace {
*this
);
- return bMatch ? true : false;
+ return bMatch;
}
bool operator () ( const UnoFilterEntry& _rEntry )
{
OUString aShrunkName = shrinkFilterName( _rEntry.First );
- return aShrunkName == rTitle ? true : false;
+ return aShrunkName == rTitle;
}
};
}
@@ -1217,7 +1217,7 @@ void SalGtkFilePicker::HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nContr
//actually select something from the list.
gint nItems = gtk_tree_model_iter_n_children(
gtk_combo_box_get_model(pWidget), NULL);
- gtk_widget_set_sensitive(GTK_WIDGET(pWidget), nItems > 1 ? true : false);
+ gtk_widget_set_sensitive(GTK_WIDGET(pWidget), nItems > 1);
}
uno::Any SalGtkFilePicker::HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nControlAction) const
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index b5967e0c31dc..5f4fa94131fd 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -2932,7 +2932,7 @@ void GtkSalFrame::SetParent( SalFrame* pNewParent )
void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, SalX11Screen nXScreen )
{
- bool bWasVisible = m_pWindow ? IS_WIDGET_MAPPED(m_pWindow) : false;
+ bool bWasVisible = m_pWindow && IS_WIDGET_MAPPED(m_pWindow);
if( bWasVisible )
Show( false );
@@ -3035,7 +3035,7 @@ bool GtkSalFrame::SetPluginParent( SystemParentData* pSysParent )
{
#if !GTK_CHECK_VERSION(3,0,0)
GetGenericData()->ErrorTrapPush(); // permanantly ignore unruly children's errors
- createNewWindow( pSysParent->aWindow, (pSysParent->nSize > sizeof(long)) ? pSysParent->bXEmbedSupport : false, m_nXScreen );
+ createNewWindow( pSysParent->aWindow, (pSysParent->nSize > sizeof(long)) && pSysParent->bXEmbedSupport, m_nXScreen );
return true;
#else
(void)pSysParent;
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 2f00cfbbf52d..01d480668f04 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -3813,7 +3813,7 @@ static bool ImplHandlePaintMsg( HWND hWnd )
if ( bMutex )
ImplSalYieldMutexRelease();
- return bMutex ? true : false;
+ return bMutex;
}
static void ImplHandlePaintMsg2( HWND hWnd, RECT* pRect )
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 32ec580691f9..73bf69ea48f0 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -1287,7 +1287,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetHelpPackageFromP
OUString aExtensionPath = xPackage->getURL();
ExtensionHelpExistanceMap::iterator it = aHelpExistanceMap.find( aExtensionPath );
bool bFound = ( it != aHelpExistanceMap.end() );
- bool bHasHelp = bFound ? it->second : false;
+ bool bHasHelp = bFound && it->second;
if( bFound && !bHasHelp )
return xHelpPackage;
diff --git a/xmloff/source/style/PageMasterPropHdl.cxx b/xmloff/source/style/PageMasterPropHdl.cxx
index 715aab239b0e..ac2e7bebf691 100644
--- a/xmloff/source/style/PageMasterPropHdl.cxx
+++ b/xmloff/source/style/PageMasterPropHdl.cxx
@@ -48,7 +48,7 @@ XMLPMPropHdl_PageStyleLayout::~XMLPMPropHdl_PageStyleLayout()
bool XMLPMPropHdl_PageStyleLayout::equals( const Any& rAny1, const Any& rAny2 ) const
{
style::PageStyleLayout eLayout1, eLayout2;
- return ((rAny1 >>= eLayout1) && (rAny2 >>= eLayout2)) ? (eLayout1 == eLayout2) : false;
+ return (rAny1 >>= eLayout1) && (rAny2 >>= eLayout2) && (eLayout1 == eLayout2);
}
bool XMLPMPropHdl_PageStyleLayout::importXML(
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 87a37a5a2c33..118ad7c62633 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -560,7 +560,7 @@ struct PropertyPairLessFunctor :
{
bool operator()( const PropertyPair& a, const PropertyPair& b ) const
{
- return (*a.first < *b.first ? true : false);
+ return (*a.first < *b.first);
}
};
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx
index ca7d984c681a..9dc4e7112070 100644
--- a/xmloff/source/text/XMLTextNumRuleInfo.cxx
+++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx
@@ -121,7 +121,7 @@ void XMLTextNumRuleInfo::Set(
hasPropertyByName( msNumberingIsOutline ) )
{
xNumRulesProps->getPropertyValue( msNumberingIsOutline ) >>= bIsOutline;
- bSuppressListStyle = bIsOutline ? true : false;
+ bSuppressListStyle = bIsOutline;
}
}
}
diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx
index a0bc479ee798..2c2c84dd22ee 100644
--- a/xmloff/source/xforms/XFormsSubmissionContext.cxx
+++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx
@@ -92,7 +92,7 @@ Any toBool( const OUString& rValue )
bool bValue(false);
if (::sax::Converter::convertBool( bValue, rValue ))
{
- aValue <<= ( bValue ? true : false );
+ aValue <<= bValue;
}
return aValue;
}
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index d43e4c05881f..296ac47c06e2 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -107,7 +107,7 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif
sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(mpDlg->mxCert,
Sequence<Reference<css::security::XCertificate> >());
- bool bCertValid = certStatus == css::security::CertificateValidity::VALID ? true : false;
+ bool bCertValid = certStatus == css::security::CertificateValidity::VALID;
if ( !bCertValid )
{
@@ -419,7 +419,7 @@ void CertificateViewerCertPathTP::ActivatePage()
//Verify the certificate
sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(rCert,
Sequence<Reference<css::security::XCertificate> >());
- bool bCertValid = certStatus == css::security::CertificateValidity::VALID ? true : false;
+ bool bCertValid = certStatus == css::security::CertificateValidity::VALID;
pParent = InsertCert( pParent, sName, rCert, bCertValid);
}
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 1e471d95cdb4..94a9ba8f0c23 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -348,7 +348,7 @@ short DigitalSignaturesDialog::Execute()
IMPL_LINK_NOARG(DigitalSignaturesDialog, SignatureHighlightHdl)
{
- bool bSel = m_pSignaturesLB->FirstSelected() ? true : false;
+ bool bSel = m_pSignaturesLB->FirstSelected();
m_pViewBtn->Enable( bSel );
if ( m_pAddBtn->IsEnabled() ) // not read only
m_pRemoveBtn->Enable( bSel );
@@ -612,7 +612,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
sal_Int32 certResult = xSecEnv->verifyCertificate(xCert,
Sequence<css::uno::Reference<css::security::XCertificate> >());
- bCertValid = certResult == css::security::CertificateValidity::VALID ? true : false;
+ bCertValid = certResult == css::security::CertificateValidity::VALID;
if ( bCertValid )
nValidCerts++;