[Libreoffice-commits] core.git: accessibility/source android/abs-lib avmedia/source basctl/source basic/source canvas/source chart2/source cli_ure/source comphelper/source connectivity/source cui/source dbaccess/qa dbaccess/source desktop/source editeng/source extensions/source forms/source fpicker/source framework/source include/comphelper include/svl include/vcl l10ntools/source qadevOOo/runner rsc/source sal/qa scripting/java sc/source sdext/source sd/source sfx2/source slideshow/source starmath/source store/source store/workben svl/source svtools/source svx/source sw/inc sw/source toolkit/qa toolkit/source unodevtools/source vcl/generic vcl/inc vcl/osx vcl/source vcl/unx vcl/win xmlhelp/source xmloff/source xmlsecurity/source
Noel Grandin
noel at peralex.com
Mon May 5 03:48:45 PDT 2014
accessibility/source/extended/textwindowaccessibility.cxx | 2
accessibility/source/standard/vclxaccessiblelist.cxx | 2
android/abs-lib/src/com/actionbarsherlock/internal/widget/IcsSpinner.java | 2
avmedia/source/viewer/mediawindow_impl.cxx | 8 -
basctl/source/basicide/scriptdocument.cxx | 2
basic/source/classes/sbunoobj.cxx | 2
basic/source/comp/dim.cxx | 4
canvas/source/directx/dx_bitmapcanvashelper.cxx | 2
canvas/source/opengl/ogl_canvashelper.cxx | 2
canvas/source/vcl/impltools.hxx | 2
chart2/source/controller/dialogs/dlg_ObjectProperties.cxx | 2
chart2/source/controller/dialogs/res_LegendPosition.cxx | 2
chart2/source/controller/main/ChartController_Window.cxx | 2
chart2/source/controller/main/ControllerCommandDispatch.cxx | 2
cli_ure/source/uno_bridge/cli_data.cxx | 8 -
comphelper/source/misc/syntaxhighlight.cxx | 2
connectivity/source/manager/mdrivermanager.cxx | 2
cui/source/tabpages/autocdlg.cxx | 2
cui/source/tabpages/border.cxx | 2
dbaccess/qa/complex/dbaccess/TestCase.java | 2
dbaccess/source/ui/browser/genericcontroller.cxx | 2
dbaccess/source/ui/dlg/DbAdminImpl.cxx | 2
dbaccess/source/ui/inc/sbagrid.hxx | 2
dbaccess/source/ui/querydesign/QueryViewSwitch.cxx | 2
desktop/source/deployment/manager/dp_extensionmanager.cxx | 2
desktop/source/deployment/manager/dp_manager.cxx | 2
desktop/source/deployment/registry/component/dp_compbackenddb.cxx | 3
editeng/source/accessibility/AccessibleEditableTextPara.cxx | 2
editeng/source/outliner/outliner.cxx | 2
editeng/source/rtf/svxrtf.cxx | 2
extensions/source/ole/oleobjw.cxx | 2
extensions/source/propctrlr/cellbindinghelper.cxx | 2
extensions/source/propctrlr/formbrowsertools.hxx | 4
forms/source/solar/control/navtoolbar.cxx | 2
forms/source/xforms/binding.cxx | 2
fpicker/source/office/OfficeFilePicker.cxx | 4
framework/source/uielement/fontmenucontroller.cxx | 2
include/comphelper/property.hxx | 2
include/comphelper/stl_types.hxx | 4
include/svl/urlfilter.hxx | 2
include/vcl/bmpacc.hxx | 2
include/vcl/image.hxx | 2
include/vcl/keycod.hxx | 2
include/vcl/textdata.hxx | 10 +-
include/vcl/timer.hxx | 2
l10ntools/source/export.cxx | 2
qadevOOo/runner/complexlib/Assurance.java | 2
qadevOOo/runner/convwatch/IniFile.java | 2
qadevOOo/runner/convwatch/OfficePrint.java | 2
qadevOOo/runner/graphical/IniFile.java | 2
qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java | 2
rsc/source/res/rscclass.cxx | 6 -
sal/qa/osl/socket/osl_StreamSocket.cxx | 6 -
sc/source/core/data/column2.cxx | 2
sc/source/core/data/patattr.cxx | 2
sc/source/core/data/tabprotection.cxx | 2
sc/source/core/tool/interpr2.cxx | 4
sc/source/filter/excel/excrecds.cxx | 4
sc/source/filter/inc/xlview.hxx | 2
sc/source/ui/app/inputwin.cxx | 4
sc/source/ui/app/scmod.cxx | 2
sc/source/ui/dbgui/asciiopt.cxx | 4
sc/source/ui/dbgui/imoptdlg.cxx | 2
sc/source/ui/docshell/docfunc.cxx | 4
sc/source/ui/drawfunc/fusel.cxx | 2
sc/source/ui/miscdlgs/instbdlg.cxx | 2
sc/source/ui/miscdlgs/namecrea.cxx | 8 -
sc/source/ui/miscdlgs/sharedocdlg.cxx | 2
sc/source/ui/sidebar/AlignmentPropertyPanel.cxx | 2
sc/source/ui/unoobj/docuno.cxx | 2
sc/source/ui/vba/vbarange.cxx | 2
sc/source/ui/view/gridwin3.cxx | 2
sc/source/ui/view/select.cxx | 2
sc/source/ui/view/tabview3.cxx | 2
sc/source/ui/view/tabvwshb.cxx | 2
scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java | 5 -
sd/source/core/EffectMigration.cxx | 2
sd/source/core/drawdoc4.cxx | 2
sd/source/core/undo/undoobjects.cxx | 2
sd/source/ui/animations/CustomAnimationCreateDialog.cxx | 4
sd/source/ui/slideshow/slideshow.cxx | 10 +-
sd/source/ui/table/TableDesignPane.cxx | 4
sd/source/ui/unoidl/unoobj.cxx | 2
sd/source/ui/unoidl/unopage.cxx | 8 -
sd/source/ui/view/sdview3.cxx | 2
sdext/source/pdfimport/pdfparse/pdfentries.cxx | 2
sfx2/source/doc/docfile.cxx | 2
sfx2/source/doc/sfxbasemodel.cxx | 4
slideshow/source/engine/shapeattributelayer.cxx | 46 +++++-----
starmath/source/cfgitem.hxx | 2
starmath/source/edit.cxx | 6 -
starmath/source/mathmlexport.cxx | 2
store/source/storbase.hxx | 2
store/workben/t_page.cxx | 2
svl/source/items/style.cxx | 2
svl/source/numbers/zforlist.cxx | 8 -
svtools/source/contnr/imivctl1.cxx | 2
svtools/source/contnr/treelist.cxx | 2
svx/source/customshapes/EnhancedCustomShape2d.cxx | 2
svx/source/dialog/srchdlg.cxx | 2
svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx | 4
svx/source/svdraw/svdetc.cxx | 2
svx/source/svdraw/svdobj.cxx | 2
svx/source/unodraw/unoshtxt.cxx | 4
sw/inc/edimp.hxx | 4
sw/inc/ndtxt.hxx | 4
sw/source/core/SwNumberTree/SwNodeNum.cxx | 2
sw/source/core/SwNumberTree/SwNumberTree.cxx | 2
sw/source/core/access/accmap.cxx | 2
sw/source/core/access/accpara.cxx | 2
sw/source/core/crsr/crstrvl.cxx | 6 -
sw/source/core/doc/doclay.cxx | 2
sw/source/core/doc/docnum.cxx | 6 -
sw/source/core/doc/docredln.cxx | 7 -
sw/source/core/docnode/ndsect.cxx | 4
sw/source/core/frmedt/feshview.cxx | 4
sw/source/core/frmedt/fews.cxx | 8 -
sw/source/core/layout/paintfrm.cxx | 20 ++--
sw/source/core/layout/trvlfrm.cxx | 2
sw/source/core/table/swtable.cxx | 2
sw/source/core/text/itrform2.cxx | 2
sw/source/core/text/pormulti.hxx | 2
sw/source/core/txtnode/fmtatr2.cxx | 4
sw/source/core/uibase/app/docstyle.cxx | 2
sw/source/core/uibase/docvw/AnnotationWin.cxx | 4
sw/source/core/uibase/docvw/SidebarWin.cxx | 2
sw/source/core/uibase/docvw/edtwin.cxx | 2
sw/source/core/uibase/fldui/fldmgr.cxx | 4
sw/source/core/undo/unsect.cxx | 2
sw/source/core/unocore/unoftn.cxx | 7 -
sw/source/core/unocore/unoidx.cxx | 10 --
sw/source/core/unocore/unoparagraph.cxx | 3
sw/source/core/unocore/unoportenum.cxx | 3
sw/source/core/unocore/unorefmk.cxx | 12 --
sw/source/core/unocore/unosect.cxx | 3
sw/source/core/view/pagepreviewlayout.cxx | 2
sw/source/filter/ww8/writerhelper.cxx | 2
sw/source/filter/ww8/wrtww8gr.cxx | 2
sw/source/filter/ww8/ww8graf.cxx | 2
sw/source/filter/ww8/ww8par.cxx | 6 -
sw/source/filter/ww8/ww8par.hxx | 2
sw/source/filter/ww8/ww8par5.cxx | 3
toolkit/qa/complex/toolkit/Assert.java | 2
toolkit/source/awt/vclxwindow.cxx | 2
toolkit/source/controls/controlmodelcontainerbase.cxx | 4
toolkit/source/controls/geometrycontrolmodel.cxx | 6 -
unodevtools/source/skeletonmaker/cpptypemaker.cxx | 2
unodevtools/source/skeletonmaker/javatypemaker.cxx | 2
vcl/generic/print/common_gfx.cxx | 6 -
vcl/generic/print/genprnpsp.cxx | 2
vcl/generic/print/printerjob.cxx | 4
vcl/generic/print/text_gfx.cxx | 6 -
vcl/inc/fontmanager.hxx | 2
vcl/osx/salnativewidgets.cxx | 2
vcl/source/app/settings.cxx | 2
vcl/source/control/edit.cxx | 2
vcl/source/control/ilstbox.cxx | 2
vcl/source/edit/texteng.cxx | 2
vcl/source/edit/textview.cxx | 2
vcl/source/edit/xtextedt.cxx | 2
vcl/source/filter/wmf/enhwmf.cxx | 2
vcl/source/filter/wmf/winwmf.cxx | 2
vcl/source/gdi/bitmap.cxx | 2
vcl/source/gdi/bitmapex.cxx | 16 +--
vcl/source/gdi/impgraph.cxx | 2
vcl/source/gdi/pdfwriter_impl.hxx | 2
vcl/source/helper/lazydelete.cxx | 2
vcl/source/outdev/text.cxx | 4
vcl/source/window/builder.cxx | 6 -
vcl/source/window/dialog.cxx | 2
vcl/source/window/menu.cxx | 2
vcl/source/window/printdlg.cxx | 2
vcl/source/window/syswin.cxx | 2
vcl/source/window/toolbox.cxx | 6 -
vcl/source/window/toolbox2.cxx | 4
vcl/source/window/window.cxx | 2
vcl/unx/generic/dtrans/X11_selection.cxx | 2
vcl/unx/generic/gdi/salgdi.cxx | 2
vcl/unx/generic/gdi/salvd.cxx | 2
vcl/unx/generic/printer/ppdparser.cxx | 7 -
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 6 -
vcl/unx/gtk/window/gtksalframe.cxx | 4
vcl/win/source/window/salframe.cxx | 2
xmlhelp/source/cxxhelp/provider/databases.cxx | 2
xmloff/source/style/PageMasterPropHdl.cxx | 2
xmloff/source/style/xmlimppr.cxx | 2
xmloff/source/text/XMLTextNumRuleInfo.cxx | 2
xmloff/source/xforms/XFormsSubmissionContext.cxx | 2
xmlsecurity/source/dialogs/certificateviewer.cxx | 4
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 4
190 files changed, 315 insertions(+), 338 deletions(-)
New commits:
commit 4f9b21248ffdf55cef9f3f9d1da76778ee000775
Author: Noel Grandin <noel at peralex.com>
Date: Fri May 2 15:42:25 2014 +0200
simplify ternary conditions "xxx ? yyy : false"
Look for code like:
xxx ? yyy : false;
Which can be simplified to:
xxx && yyy
Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index caa9720..ad19eaf 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 6d3ba7e..beb252c 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 038d1e0..3e0bcd1 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 96f7a46..e52e524 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 8e3b0ac..c7bbb9f 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 4e40042..b0eca56 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 1987e92..9d20c6d 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 e9577e1..e8eeddd 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 6ee3dab..a1917dd 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 ab1391b..8f80939 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 2064541..f011de5 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 87734a5..2ca2bf6 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 a60f172..8437a57 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 2e0f7a5..fe3fbb3 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 219438a..a5e2f38 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 b747f79..374142a 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 9208b54..4e55147 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 15d202f..987a642 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 73a472f..83b1f58 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 7a37f5d..b30bf7c 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 dd7d6f8..dc5c00d 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 9a326fc..ccfb06a 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 6217817..49b9497 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 ae0adfa..4d97d18 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 73c11f3..11120f2 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 0b460e8..04c07b2 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 072de53..565efb4 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 fc7f689..0c9e494 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 69c3e75..08f0b79 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 0b9ee16..0746aa3 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 f96d005..f7070bf 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 41fbf95..e3bf34a 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 30c49e1..5dd9a8f 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 cc8382d..c1ad140 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 eb5ea49..72806b0 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 77add1d..7c2520a 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 86307fa..23d7453 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 5dc53bc..fd7ed83 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 28f3a14..b9bfbe3 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 e8065fa..c607dd3 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 e96f49c..153464f 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 fb618d1..82f53a2 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 4029c30..20e80cf 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 1f47587..8fbc62f 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 91db8cb..6659780 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 2fff37c..d3d4cfb 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 0a43aae..41f7ae4 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 fc870d0..649341e 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 5776567..080b685 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 c3a72ec..23a4290 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 361f105..4c04e22 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 0cb238a..a25f5a5 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 d99753c..05906f0 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 7cdd62a..3232497 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 79905b6..0599896 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 52bc0fe..9beb206 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 7042189..949bc9f 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 4f37aac..796b95c 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 ccdea67..37d88d0 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 c4418de..c547a9e 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 586686d..4a3c6c9 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 268e194..ef39fdf 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 4dbc1d45..39c44a3 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 9a9daa3..b57fc91 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 8d1a7ff..402cb4a 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 7b6571a..248504c 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 74b462e..722a395 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 478a56d..ca0e158 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 7d35b06..1e7ad55 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 6356d24..d85f22f 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 257c011..7d8f445 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 3dd7df2..22d9c43 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 af96c75..52d1907 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 5312c0d..9f002d3 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 e831738..7d70114 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 587ade3..fd3ee58 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 2c1e940..7c04a0b 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 716f008..061ac8d 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 ec2989d..d18b870 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 1e65803..7595837 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 279bd8b..aa81b00 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 d1c6f86..a72d8e6 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 f11c766..4062bc8 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 1228c06..3aaa96c 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 b54f8d1..89e7aeb 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 c1a8d29..540885e 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 c4ec5d3..1f52566 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 9d34b9b..79f268b 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 8352d5a..4925bb6 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 09201bf..7b40f8b 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 ca437e6..4376b7a 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 9a81705..57547dd 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 30d3260..1150a6b 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 54a32e1..2bf4ebb 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 5d26a0f..8bdf073 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 4acec41..c84f895 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 b4972f2..00e87f5 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 b1eff7b..c117a68 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 4cf1740..c39428e 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 eacce2d..f3efcc7 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 c442ff4..5b2b45f 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 e0007cb..04ff43d 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 a244176..b227d89 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 0e38520..d62d58d 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 d3f73f2..ea7f14f 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 1cefdf4..2bcc64b 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 09fae20..61c6410 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 60e5f99..b35a53d 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 40451b7..d6b949a 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 9f69d01..64ba629 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 5327f76..80febe1 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 13da404..4afd2ee 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 83773ef..45a1d48 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 8b1ef00..680d8d1 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 f66f4eb..94c3f2e 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 367b64c..03d3a39 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 7231e01..40c6c98 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 084f0cb..68606d8 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 );
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list