summaryrefslogtreecommitdiff
path: root/cui
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 /cui
parenteab0ae6a51667962dff04a0f1ed2b8411a344462 (diff)
cppcheck: badBitmaskCheck
Change-Id: I0a6787379317e5077c5a4520e5144fe091a01538
Diffstat (limited to 'cui')
-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
6 files changed, 19 insertions, 31 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