summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/sdbtools/connection/objectnames.cxx14
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx14
-rw-r--r--dbaccess/source/ui/app/AppView.cxx44
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx7
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx4
-rw-r--r--dbaccess/source/ui/dlg/optionalboolitem.cxx5
-rw-r--r--dbaccess/source/ui/misc/propertysetitem.cxx5
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnectionData.cxx5
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx10
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx4
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx5
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx4
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx5
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx6
-rw-r--r--dtrans/source/cnttype/mcnttype.cxx5
-rw-r--r--editeng/source/editeng/editeng.cxx8
-rw-r--r--editeng/source/editeng/eehtml.cxx4
-rw-r--r--editeng/source/uno/unotext.cxx5
-rw-r--r--filter/source/graphicfilter/idxf/dxfvec.cxx2
-rw-r--r--filter/source/graphicfilter/itiff/ccidecom.cxx5
-rw-r--r--filter/source/msfilter/svdfppt.cxx5
-rw-r--r--filter/source/svg/svgfilter.cxx5
-rw-r--r--filter/source/textfilterdetect/filterdetect.cxx5
-rw-r--r--forms/source/component/CheckBox.cxx4
-rw-r--r--forms/source/runtime/formoperations.cxx10
-rw-r--r--fpicker/source/office/fpinteraction.cxx10
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx5
-rw-r--r--framework/source/layoutmanager/uielement.cxx10
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx7
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx12
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx5
31 files changed, 64 insertions, 175 deletions
diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx
index 7787f8e7df70..25452bd5a44c 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.cxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.cxx
@@ -131,13 +131,9 @@ namespace sdbtools
m_xConnection->getMetaData(), _rName, sCatalog, sSchema, sName, ::dbtools::EComposeRule::InTableDefinitions );
OUString sExtraNameCharacters( m_xConnection->getMetaData()->getExtraNameCharacters() );
- if ( ( !sCatalog.isEmpty() && !::dbtools::isValidSQLName( sCatalog, sExtraNameCharacters ) )
- || ( !sSchema.isEmpty() && !::dbtools::isValidSQLName( sSchema, sExtraNameCharacters ) )
- || ( !sName.isEmpty() && !::dbtools::isValidSQLName( sName, sExtraNameCharacters ) )
- )
- return false;
-
- return true;
+ return !( ( !sCatalog.isEmpty() && !::dbtools::isValidSQLName( sCatalog, sExtraNameCharacters ) )
+ || ( !sSchema.isEmpty() && !::dbtools::isValidSQLName( sSchema, sExtraNameCharacters ) )
+ || ( !sName.isEmpty() && !::dbtools::isValidSQLName( sName, sExtraNameCharacters ) ));
}
virtual void validateName_throw( const OUString& _rName ) override
@@ -182,9 +178,7 @@ namespace sdbtools
virtual bool validateName( const OUString& _rName ) override
{
- if ( validateName_getErrorCondition( _rName ) != 0 )
- return false;
- return true;
+ return validateName_getErrorCondition( _rName ) == 0;
}
virtual void validateName_throw( const OUString& _rName ) override
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index c53476d3b72f..950fbe17ac46 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -518,15 +518,11 @@ bool OAppDetailPageHelper::isLeaf(SvTreeListEntry* _pEntry)
if ( !_pEntry )
return false;
sal_Int32 nEntryType = reinterpret_cast< sal_IntPtr >( _pEntry->GetUserData() );
- if ( ( nEntryType == DatabaseObjectContainer::TABLES )
- || ( nEntryType == DatabaseObjectContainer::CATALOG )
- || ( nEntryType == DatabaseObjectContainer::SCHEMA )
- || ( nEntryType == DatabaseObjectContainer::FORMS_FOLDER )
- || ( nEntryType == DatabaseObjectContainer::REPORTS_FOLDER )
- )
- return false;
-
- return true;
+ return !( ( nEntryType == DatabaseObjectContainer::TABLES )
+ || ( nEntryType == DatabaseObjectContainer::CATALOG )
+ || ( nEntryType == DatabaseObjectContainer::SCHEMA )
+ || ( nEntryType == DatabaseObjectContainer::FORMS_FOLDER )
+ || ( nEntryType == DatabaseObjectContainer::REPORTS_FOLDER ));
}
bool OAppDetailPageHelper::isALeafSelected() const
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index 389a1bb5d628..6695065bb57e 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -149,22 +149,16 @@ void OAppBorderWindow::ImplInitSettings()
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if( true )
- {
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
- aFont.SetColor( rStyleSettings.GetWindowTextColor() );
- SetPointFont(*this, aFont);
- }
- if( true )
- {
- SetTextColor( rStyleSettings.GetFieldTextColor() );
- SetTextFillColor();
- }
+ vcl::Font aFont;
+ aFont = rStyleSettings.GetFieldFont();
+ aFont.SetColor( rStyleSettings.GetWindowTextColor() );
+ SetPointFont(*this, aFont);
+
+ SetTextColor( rStyleSettings.GetFieldTextColor() );
+ SetTextFillColor();
- if( true )
- SetBackground( rStyleSettings.GetDialogColor() );
+ SetBackground( rStyleSettings.GetDialogColor() );
}
@@ -547,22 +541,16 @@ void OApplicationView::ImplInitSettings()
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if( true )
- {
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
- aFont.SetColor( rStyleSettings.GetWindowTextColor() );
- SetPointFont(*this, aFont);
- }
- if( true )
- {
- SetTextColor( rStyleSettings.GetFieldTextColor() );
- SetTextFillColor();
- }
+ vcl::Font aFont;
+ aFont = rStyleSettings.GetFieldFont();
+ aFont.SetColor( rStyleSettings.GetWindowTextColor() );
+ SetPointFont(*this, aFont);
+
+ SetTextColor( rStyleSettings.GetFieldTextColor() );
+ SetTextFillColor();
- if( true )
- SetBackground( rStyleSettings.GetFieldColor() );
+ SetBackground( rStyleSettings.GetFieldColor() );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 340e1b863431..cdaddb7069b5 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -87,12 +87,9 @@ void OTableTreeListBox::implSetDefaultImages()
bool OTableTreeListBox::isFolderEntry( const SvTreeListEntry* _pEntry )
{
sal_Int32 nEntryType = reinterpret_cast< sal_IntPtr >( _pEntry->GetUserData() );
- if ( ( nEntryType == DatabaseObjectContainer::TABLES )
+ return ( nEntryType == DatabaseObjectContainer::TABLES )
|| ( nEntryType == DatabaseObjectContainer::CATALOG )
- || ( nEntryType == DatabaseObjectContainer::SCHEMA )
- )
- return true;
- return false;
+ || ( nEntryType == DatabaseObjectContainer::SCHEMA );
}
void OTableTreeListBox::notifyHiContrastChanged()
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 4a809983887c..3b59fcb383c6 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -464,9 +464,7 @@ namespace dbaui
{
DataSourceMetaData aMeta( _sURL );
const FeatureSet& rFeatures( aMeta.getFeatureSet() );
- if ( rFeatures.supportsGeneratedValues() || rFeatures.supportsAnySpecialSetting() )
- return true;
- return false;
+ return rFeatures.supportsGeneratedValues() || rFeatures.supportsAnySpecialSetting();
}
short AdvancedSettingsDialog::Execute()
diff --git a/dbaccess/source/ui/dlg/optionalboolitem.cxx b/dbaccess/source/ui/dlg/optionalboolitem.cxx
index ef561f12b779..08acf1c5e51c 100644
--- a/dbaccess/source/ui/dlg/optionalboolitem.cxx
+++ b/dbaccess/source/ui/dlg/optionalboolitem.cxx
@@ -41,10 +41,7 @@ namespace dbaui
if ( !pCompare )
return false;
- if ( m_aValue == pCompare->m_aValue )
- return true;
-
- return false;
+ return m_aValue == pCompare->m_aValue;
}
SfxPoolItem* OptionalBoolItem::Clone( SfxItemPool* /*_pPool*/ ) const
diff --git a/dbaccess/source/ui/misc/propertysetitem.cxx b/dbaccess/source/ui/misc/propertysetitem.cxx
index 26e5dabe70aa..d24ef05247b6 100644
--- a/dbaccess/source/ui/misc/propertysetitem.cxx
+++ b/dbaccess/source/ui/misc/propertysetitem.cxx
@@ -46,10 +46,7 @@ namespace dbaui
bool OPropertySetItem::operator==(const SfxPoolItem& _rItem) const
{
const OPropertySetItem* pCompare = dynamic_cast<const OPropertySetItem*>( &_rItem );
- if ((!pCompare) || (pCompare->m_xSet.get() != m_xSet.get()))
- return false;
-
- return true;
+ return pCompare && (pCompare->m_xSet.get() == m_xSet.get());
}
SfxPoolItem* OPropertySetItem::Clone(SfxItemPool* /* _pPool */) const
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index 59733aa125a4..2f48f8edca69 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -174,10 +174,7 @@ bool ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet
if ( nPrimKeysCount != aKeyColumns.getLength() )
return false;
}
- if ( !nPrimKeysCount || nPrimKeysCount != nValidLinesCount )
- return false;
-
- return true;
+ return nPrimKeysCount && nPrimKeysCount == nValidLinesCount;
}
bool ORelationTableConnectionData::IsConnectionPossible()
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 2f03578c9968..676e94283661 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -371,10 +371,7 @@ OUString DialogHelper::getResourceString(sal_uInt16 id)
bool DialogHelper::IsSharedPkgMgr( const uno::Reference< deployment::XPackage > &xPackage )
{
- if ( xPackage->getRepositoryName() == SHARED_PACKAGE_MANAGER )
- return true;
- else
- return false;
+ return xPackage->getRepositoryName() == SHARED_PACKAGE_MANAGER;
}
@@ -390,10 +387,7 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment::
VclMessageType::Warning, VclButtonsType::OkCancel);
bHadWarning = true;
- if ( RET_OK == aInfoBox->Execute() )
- return true;
- else
- return false;
+ return RET_OK == aInfoBox->Execute();
}
else
return true;
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 2e8e8094932c..e661ecc2fc89 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -55,9 +55,7 @@ struct FindWeakRef
bool FindWeakRef::operator () (uno::WeakReference< deployment::XPackage > const & ref)
{
const uno::Reference<deployment::XPackage> ext(ref);
- if (ext == m_extension)
- return true;
- return false;
+ return ext == m_extension;
}
} // end namespace
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index 12542e6f852a..8d97f786fd60 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -152,10 +152,7 @@ bool LicenseView::IsEndReached() const
Size aOutSize = pView->GetWindow()->GetOutputSizePixel();
Point aBottom( 0, aOutSize.Height() );
- if ( pView->GetDocPos( aBottom ).Y() >= nHeight - 1 )
- bEndReached = true;
- else
- bEndReached = false;
+ bEndReached = pView->GetDocPos( aBottom ).Y() >= nHeight - 1;
return bEndReached;
}
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 619412c31421..322210b5405e 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -78,9 +78,7 @@ struct CompIdentifiers
bool operator() (std::vector<Reference<css::deployment::XPackage> > const & a,
std::vector<Reference<css::deployment::XPackage> > const & b)
{
- if (getName(a).compareTo(getName(b)) < 0)
- return true;
- return false;
+ return getName(a).compareTo(getName(b)) < 0;
}
static OUString getName(std::vector<Reference<css::deployment::XPackage> > const & a);
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 8f8387788279..2748d27ddbc9 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -665,10 +665,7 @@ bool BackendImpl::PackageImpl::checkLicense(
throw css::deployment::DeploymentException(
"Could not interact with user.", nullptr, Any());
- if (approve)
- return true;
- else
- return false;
+ return approve;
}
return true;
} catch (const css::ucb::CommandFailedException&) {
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 7483a51cf9df..31a93cecea8a 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -63,10 +63,8 @@ struct ExtensionName
explicit ExtensionName( OUString const & str ) : m_str( str ) {}
bool operator () ( Reference<deployment::XPackage> const & e ) const
{
- if (m_str.equals(dp_misc::getIdentifier(e))
- || m_str.equals(e->getName()))
- return true;
- return false;
+ return m_str.equals(dp_misc::getIdentifier(e))
+ || m_str.equals(e->getName());
}
};
diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx
index e9c12c483882..20271ea17aab 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -291,10 +291,7 @@ OUString SAL_CALL CMimeContentType::quotedPValue( )
else if ( isInRange( m_nxtSym, OUStringLiteral(TOKEN) + TSPECIALS + SPACE ) )
{
pvalue += m_nxtSym;
- if ( m_nxtSym == "\"" )
- bAfterQuoteSign = true;
- else
- bAfterQuoteSign = false;
+ bAfterQuoteSign = m_nxtSym == "\"";
}
else
throw IllegalArgumentException( );
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 0a4c315bf970..33e04c4961c3 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2694,13 +2694,9 @@ bool EditEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
bool EditEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent )
{
- if( EditEngine::IsPrintable( rKeyEvent.GetCharCode() ) &&
+ return EditEngine::IsPrintable( rKeyEvent.GetCharCode() ) &&
( KEY_MOD2 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT ) ) &&
- ( KEY_MOD1 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT ) ) )
- {
- return true;
- }
- return false;
+ ( KEY_MOD1 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT ) );
}
bool EditEngine::HasValidData( const css::uno::Reference< css::datatransfer::XTransferable >& rTransferable )
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 06db8143e594..ca0d8a3d8b9a 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -740,9 +740,7 @@ bool EditHTMLParser::ThrowAwayBlank()
// A blank must be thrown away if the new text begins with a Blank and
// if the current paragraph is empty or ends with a Blank...
ContentNode* pNode = aCurSel.Max().GetNode();
- if ( pNode->Len() && ( pNode->GetChar( pNode->Len()-1 ) != ' ' ) )
- return false;
- return true;
+ return !(pNode->Len() && ( pNode->GetChar( pNode->Len()-1 ) != ' ' ));
}
bool EditHTMLParser::HasTextInCurrentPara()
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index e18a660e5df3..bd55ed046413 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -510,10 +510,7 @@ bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxIt
case EE_PARA_NUMBULLET:
{
uno::Reference< container::XIndexReplace > xRule;
- if( !aValue.hasValue() || ((aValue >>= xRule) && !xRule.is()) )
- return true;
-
- return false;
+ return !aValue.hasValue() || ((aValue >>= xRule) && !xRule.is());
}
case WID_NUMLEVEL:
diff --git a/filter/source/graphicfilter/idxf/dxfvec.cxx b/filter/source/graphicfilter/idxf/dxfvec.cxx
index 7ee4b694e92a..bda80dfe30e8 100644
--- a/filter/source/graphicfilter/idxf/dxfvec.cxx
+++ b/filter/source/graphicfilter/idxf/dxfvec.cxx
@@ -240,7 +240,7 @@ double DXFTransform::CalcRotAngle() const
bool DXFTransform::Mirror() const
{
- if (aMZ.SProd(aMX*aMY)<0) return true; else return false;
+ return aMZ.SProd(aMX*aMY)<0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx
index a7d0ffc49f14..cdca91fcea83 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.cxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.cxx
@@ -819,8 +819,7 @@ bool CCIDecompressor::Read2DTag()
nInputBitsBufSize=8;
}
nInputBitsBufSize--;
- if ( ((nInputBitsBuf>>nInputBitsBufSize)&0x0001) ) return false;
- else return true;
+ return ((nInputBitsBuf>>nInputBitsBufSize)&0x0001) == 0;
}
@@ -978,7 +977,7 @@ bool CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nBitsTo
}
// is that a 'Terminating-Code'?
- if (nDataBits<64) bTerminatingCode=true; else bTerminatingCode=false;
+ bTerminatingCode = nDataBits<64;
// remove the read bits from the input buffer:
nInputBitsBufSize = nInputBitsBufSize - nCodeBits;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 875e74385787..2748b61896ae 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1050,10 +1050,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr && ( eTextKind == OBJ_RECT ) )
{
bAutoGrowHeight = bFitShapeToText;
- if ( bWordWrap )
- bAutoGrowWidth = false;
- else
- bAutoGrowWidth = true;
+ bAutoGrowWidth = !bWordWrap;
pTObj = pRet;
pRet = nullptr;
}
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index f96f8005f4a7..61464b628641 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -333,10 +333,7 @@ bool SVGFilter::isStreamSvg(const uno::Reference<io::XInputStream>& xInput)
sal_Int8 aMagic2[] = {'D', 'O', 'C', 'T', 'Y', 'P', 'E', ' ', 's', 'v', 'g'};
sal_Int32 aMagic2Size = sizeof(aMagic2) / sizeof(*aMagic2);
- if (std::search(pBuffer, pBuffer + nBytes, aMagic2, aMagic2 + aMagic2Size) != pBuffer + nBytes)
- return true;
-
- return false;
+ return std::search(pBuffer, pBuffer + nBytes, aMagic2, aMagic2 + aMagic2Size) != pBuffer + nBytes;
}
OUString SAL_CALL SVGFilter::detect(Sequence<PropertyValue>& rDescriptor)
diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx
index 554fbc8a2a63..6a392ca79230 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -108,10 +108,7 @@ bool IsHTMLStream( const uno::Reference<io::XInputStream>& xInStream )
// The string following '<' has to be a known HTML token.
OString aToken = sHeader.copy( nStartOfTagIndex, i - nStartOfTagIndex );
- if ( GetHTMLToken( OStringToOUString( aToken.toAsciiLowerCase(), RTL_TEXTENCODING_ASCII_US ) ) != 0 )
- return true;
-
- return false;
+ return GetHTMLToken( OStringToOUString( aToken.toAsciiLowerCase(), RTL_TEXTENCODING_ASCII_US ) ) != 0;
}
}
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index 65178f68ddc4..9910ac26c9bf 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -181,9 +181,7 @@ void SAL_CALL OCheckBoxModel::read(const Reference<css::io::XObjectInputStream>&
bool OCheckBoxModel::DbUseBool()
{
- if ( ! (getReferenceValue().isEmpty() && getNoCheckReferenceValue().isEmpty()) )
- return false;
- return true;
+ return getReferenceValue().isEmpty() && getNoCheckReferenceValue().isEmpty();
}
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 4365661b9c60..665c61a8631f 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -486,10 +486,7 @@ namespace frm
}
}
- if(!commit1Form(xCntrl, needConfirmation, shouldCommit))
- return false;
-
- return true;
+ return commit1Form(xCntrl, needConfirmation, shouldCommit);
}
bool commit1Form(const Reference< XForm >& xFrm, bool &needConfirmation, bool &shouldCommit)
@@ -531,10 +528,7 @@ namespace frm
}
}
- if(!commit1Form(xFrm, needConfirmation, shouldCommit))
- return false;
-
- return true;
+ return commit1Form(xFrm, needConfirmation, shouldCommit);
}
}
diff --git a/fpicker/source/office/fpinteraction.cxx b/fpicker/source/office/fpinteraction.cxx
index 8da72d68d805..bff5dde565c6 100644
--- a/fpicker/source/office/fpinteraction.cxx
+++ b/fpicker/source/office/fpinteraction.cxx
@@ -130,14 +130,8 @@ namespace svt
bool OFilePickerInteractionHandler::wasAccessDenied() const
{
InteractiveIOException aIoException;
- if (
- (m_aException >>= aIoException ) &&
- (IOErrorCode_ACCESS_DENIED == aIoException.Code)
- )
- {
- return true;
- }
- return false;
+ return (m_aException >>= aIoException ) &&
+ (IOErrorCode_ACCESS_DENIED == aIoException.Code);
}
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 45ee6f67f135..d35cbf52bf87 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -418,10 +418,7 @@ bool LayoutManager::implts_isEmbeddedLayoutManager() const
aReadLock.clear();
Reference< awt::XWindow > xFrameContainerWindow = xFrame->getContainerWindow();
- if ( xFrameContainerWindow == xContainerWindow )
- return false;
- else
- return true;
+ return xFrameContainerWindow != xContainerWindow;
}
void LayoutManager::implts_destroyElements()
diff --git a/framework/source/layoutmanager/uielement.cxx b/framework/source/layoutmanager/uielement.cxx
index 4bb67b0f8fb8..44d42cafb186 100644
--- a/framework/source/layoutmanager/uielement.cxx
+++ b/framework/source/layoutmanager/uielement.cxx
@@ -68,10 +68,7 @@ namespace framework
bool bEqual = ( m_aDockedData.m_aPos.X == aUIElement.m_aDockedData.m_aPos.X );
if ( bEqual )
{
- if ( m_bUserActive && !aUIElement.m_bUserActive )
- return true;
- else
- return false;
+ return m_bUserActive && !aUIElement.m_bUserActive;
}
else
return ( m_aDockedData.m_aPos.X <= aUIElement.m_aDockedData.m_aPos.X );
@@ -86,10 +83,7 @@ namespace framework
bool bEqual = ( m_aDockedData.m_aPos.Y == aUIElement.m_aDockedData.m_aPos.Y );
if ( bEqual )
{
- if ( m_bUserActive && !aUIElement.m_bUserActive )
- return true;
- else
- return false;
+ return m_bUserActive && !aUIElement.m_bUserActive;
}
else
return ( m_aDockedData.m_aPos.Y <= aUIElement.m_aDockedData.m_aPos.Y );
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 24e98b0c7233..c44f7090ac8a 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -161,11 +161,8 @@ void SAL_CALL AddonsToolBarManager::dispose()
bool AddonsToolBarManager::MenuItemAllowed( sal_uInt16 nId ) const
{
- if (( nId == MENUITEM_TOOLBAR_VISIBLEBUTTON ) ||
- ( nId == MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR ))
- return false;
- else
- return true;
+ return ( nId != MENUITEM_TOOLBAR_VISIBLEBUTTON ) &&
+ ( nId != MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR );
}
void AddonsToolBarManager::RefreshImages()
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 9460afbcacfd..2cb2541c6c89 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -57,11 +57,8 @@ static bool isEnumCommand( const OUString& rCommand )
{
INetURLObject aURL( rCommand );
- if (( aURL.GetProtocol() == INetProtocol::Uno ) &&
- ( aURL.GetURLPath().indexOf( '.' ) != -1))
- return true;
-
- return false;
+ return ( aURL.GetProtocol() == INetProtocol::Uno ) &&
+ ( aURL.GetURLPath().indexOf( '.' ) != -1);
}
static OUString getEnumCommand( const OUString& rCommand )
@@ -203,10 +200,7 @@ void GenericToolbarController::statusChanged( const FeatureStateEvent& Event )
{
if ( m_bEnumCommand )
{
- if ( aStrValue == m_aEnumCommand )
- bValue = true;
- else
- bValue = false;
+ bValue = aStrValue == m_aEnumCommand;
m_pToolbar->CheckItem( m_nID, bValue );
if ( bValue )
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index bfc3fe587a23..4fb7f5f45ff0 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -89,10 +89,7 @@ bool CompareToolBarEntry( const ToolBarEntry& aOne, const ToolBarEntry& aTwo )
{
sal_Int32 nComp = aOne.pCollatorWrapper->compareString( aOne.aUIName, aTwo.aUIName );
- if ( nComp < 0 )
- return true;
- else
- return false;
+ return nComp < 0;
}
Reference< XLayoutManager > getLayoutManagerFromFrame( const Reference< XFrame >& rFrame )