summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-10 12:00:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-10 12:13:30 +0100
commit52be3fcbd960238b717a6487f0e19156825c8159 (patch)
tree19ed7d757b6690ccb82d31aeec30d01d5886409a
parenteab0ae6a51667962dff04a0f1ed2b8411a344462 (diff)
cppcheck: badBitmaskCheck
Change-Id: I0a6787379317e5077c5a4520e5144fe091a01538
-rw-r--r--cui/source/dialogs/iconcdlg.cxx6
-rw-r--r--cui/source/options/optgenrl.cxx6
-rw-r--r--cui/source/options/optlingu.cxx6
-rw-r--r--cui/source/options/optsave.cxx18
-rw-r--r--cui/source/tabpages/backgrnd.cxx10
-rw-r--r--cui/source/tabpages/border.cxx4
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx4
-rw-r--r--sfx2/source/dialog/tabdlg.cxx6
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx4
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx2
10 files changed, 27 insertions, 39 deletions
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index bf90a98a1af4..da604982f671 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -820,7 +820,7 @@ short IconChoiceDialog::Ok()
if ( pPage->FillItemSet( &aTmp ) )
{
- _bModified |= true;
+ _bModified = true;
pExampleSet->Put( aTmp );
pOutSet->Put( aTmp );
}
@@ -829,13 +829,11 @@ short IconChoiceDialog::Ok()
}
if ( _bModified || ( pOutSet && pOutSet->Count() > 0 ) )
- _bModified |= true;
+ _bModified = true;
return _bModified ? RET_OK : RET_CANCEL;
}
-
-
void IconChoiceDialog::FocusOnIcon( sal_uInt16 nId )
{
// set focus to icon for the current visible page
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 824447bb59d4..a17991765d80 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -306,8 +306,6 @@ VclPtr<SfxTabPage> SvxGeneralTabPage::Create( vcl::Window* pParent, const SfxIte
return VclPtr<SvxGeneralTabPage>::Create( pParent, *rAttrSet );
}
-
-
bool SvxGeneralTabPage::FillItemSet( SfxItemSet* )
{
// remove leading and trailing whitespaces
@@ -320,13 +318,11 @@ bool SvxGeneralTabPage::FillItemSet( SfxItemSet* )
if ( m_pUseDataCB->IsChecked() != aSaveOpt.IsUseUserData() )
{
aSaveOpt.SetUseUserData( m_pUseDataCB->IsChecked() );
- bModified |= true;
+ bModified = true;
}
return bModified;
}
-
-
void SvxGeneralTabPage::Reset( const SfxItemSet* rSet )
{
SetAddress_Impl();
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index d4d9f1bd3ef4..5a6817984955 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1156,8 +1156,6 @@ VclPtr<SfxTabPage> SvxLinguTabPage::Create( vcl::Window* pParent,
return VclPtr<SvxLinguTabPage>::Create( pParent, *rAttrSet );
}
-
-
bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet )
{
bool bModified = true; // !!!!
@@ -1315,14 +1313,12 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet )
{
rCoreSet->Put( SfxBoolItem( GetWhich( SID_AUTOSPELL_CHECK ),
bNewAutoCheck ) );
- bModified |= true;
+ bModified = true;
}
return bModified;
}
-
-
sal_uLong SvxLinguTabPage::GetDicUserData( const uno::Reference< XDictionary > &rxDic, sal_uInt16 nIdx )
{
sal_uLong nRes = 0;
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index c617d64f1ace..2c049a5c7cc2 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -280,55 +280,55 @@ bool SfxSaveTabPage::FillItemSet( SfxItemSet* rSet )
{
rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_DOCINFO ),
aDocInfoCB->IsChecked() ) );
- bModified |= true;
+ bModified = true;
}
if ( aBackupCB->IsEnabled() && aBackupCB->IsValueChangedFromSaved() )
{
rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_BACKUP ),
aBackupCB->IsChecked() ) );
- bModified |= true;
+ bModified = true;
}
if ( aAutoSaveCB->IsValueChangedFromSaved() )
{
rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_AUTOSAVE ),
aAutoSaveCB->IsChecked() ) );
- bModified |= true;
+ bModified = true;
}
if ( aWarnAlienFormatCB->IsValueChangedFromSaved() )
{
rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_WARNALIENFORMAT ),
aWarnAlienFormatCB->IsChecked() ) );
- bModified |= true;
+ bModified = true;
}
if ( aAutoSaveEdit->IsValueChangedFromSaved() )
{
rSet->Put( SfxUInt16Item( GetWhich( SID_ATTR_AUTOSAVEMINUTE ),
(sal_uInt16)aAutoSaveEdit->GetValue() ) );
- bModified |= true;
+ bModified = true;
}
if ( aUserAutoSaveCB->IsValueChangedFromSaved() )
{
rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_USERAUTOSAVE ),
aUserAutoSaveCB->IsChecked() ) );
- bModified |= true;
+ bModified = true;
}
// save relatively
if ( aRelativeFsysCB->IsValueChangedFromSaved() )
{
rSet->Put( SfxBoolItem( GetWhich( SID_SAVEREL_FSYS ),
aRelativeFsysCB->IsChecked() ) );
- bModified |= true;
+ bModified = true;
}
if ( aRelativeInetCB->IsValueChangedFromSaved() )
{
rSet->Put( SfxBoolItem( GetWhich( SID_SAVEREL_INET ),
aRelativeInetCB->IsChecked() ) );
- bModified |= true;
+ bModified = true;
}
SvtModuleOptions aModuleOpt;
@@ -363,8 +363,6 @@ bool SfxSaveTabPage::FillItemSet( SfxItemSet* rSet )
return bModified;
}
-
-
bool isODFFormat( const OUString& sFilter )
{
static const char* aODFFormats[] =
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 51fbd3003259..70b602de1c48 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -797,7 +797,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
if ( *pTableBck_Impl->pCellBrush != *pOldCell )
{
rCoreSet->Put( *pTableBck_Impl->pCellBrush );
- bModified |= true;
+ bModified = true;
}
}
@@ -809,7 +809,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
if ( *pTableBck_Impl->pRowBrush != *pOldRow )
{
rCoreSet->Put( *pTableBck_Impl->pRowBrush );
- bModified |= true;
+ bModified = true;
}
}
@@ -821,7 +821,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
if ( *pTableBck_Impl->pTableBrush != *pOldTable )
{
rCoreSet->Put( *pTableBck_Impl->pTableBrush );
- bModified |= true;
+ bModified = true;
}
}
@@ -829,7 +829,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
{
rCoreSet->Put( SfxUInt16Item( SID_BACKGRND_DESTINATION,
m_pTblLBox->GetSelectEntryPos() ) );
- bModified |= true;
+ bModified = true;
}
}
else if( bHighlighting )
@@ -842,7 +842,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
(*pHighlighting != *pOldChar || *pHighlighting != SvxBrushItem(SID_ATTR_BRUSH_CHAR)))
{
rCoreSet->Put( *pHighlighting );
- bModified |= true;
+ bModified = true;
}
}
}
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 3daf13fb0317..f61e89b7a8e2 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -742,14 +742,14 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs )
if ( !pOldBoxItem || !( *pOldBoxItem == aBoxItem ) )
{
rCoreAttrs->Put( aBoxItem );
- bAttrsChanged |= true;
+ bAttrsChanged = true;
}
const SfxPoolItem* pOld = GetOldItem( *rCoreAttrs, SID_ATTR_BORDER_INNER, false );
if ( !pOld || !( *static_cast<const SvxBoxInfoItem*>(pOld) == aBoxInfoItem ) )
{
rCoreAttrs->Put( aBoxInfoItem );
- bAttrsChanged |= true;
+ bAttrsChanged = true;
}
}
else
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index d67f49610e87..d75cb3706d88 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -1268,7 +1268,7 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
xPackage->revokePackage(true, xAbortChannel, xCmdEnv);
removePackage(xPackage->getIdentifier().Value, xPackage->getName(),
xAbortChannel, xCmdEnv);
- bModified |= true;
+ bModified = true;
}
}
catch( const uno::Exception & e )
@@ -1404,7 +1404,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
//try to install the extension again.
dbData.failedPrerequisites = OUString::number(failedPrereq);
insertToActivationLayerDB(id, dbData);
- bModified |= true;
+ bModified = true;
}
}
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 9435f9a0085d..2b7111646b32 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -843,7 +843,7 @@ short SfxTabDialog::Ok()
if ( pTabPage->FillItemSet( &aTmp ) )
{
- bModified |= true;
+ bModified = true;
if (pExampleSet)
pExampleSet->Put( aTmp );
pOutSet->Put( aTmp );
@@ -853,10 +853,10 @@ short SfxTabDialog::Ok()
}
if ( pImpl->bModified || ( pOutSet && pOutSet->Count() > 0 ) )
- bModified |= true;
+ bModified = true;
if (bStandardPushed)
- bModified |= true;
+ bModified = true;
return bModified ? RET_OK : RET_CANCEL;
}
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 62a07c8117b5..e90f74b61937 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -977,7 +977,7 @@ namespace svx
bDisable |= !aDataHelper.HasFormat( SotClipboardFormatId::STRING );
}
else
- bDisable |= true;
+ bDisable = true;
bNeedTextComponent = true;
bNeedWriteableControl = true;
@@ -995,7 +995,7 @@ namespace svx
default:
// slot is unknown at all
- bDisable |= true;
+ bDisable = true;
break;
}
SAL_WARN_IF( bNeedSelection && !bNeedTextComponent, "svx.form", "FmTextControlShell::GetTextAttributeState: bNeedSelection should imply bNeedTextComponent!" );
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index 4ba2e99e391b..567916322b36 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -206,7 +206,7 @@ bool checkAttribute(
{
if (attribute & attributes[i]) {
if (!attributeValue.isEmpty()) {
- cast |= true;
+ cast = true;
attributeValue.append("|");
}
switch (attributes[i])