diff options
author | jailletc36 <christophe.jaillet@wanadoo.fr> | 2012-11-06 22:49:28 +0100 |
---|---|---|
committer | Radek Doulík <rodo@novell.com> | 2012-11-07 15:57:20 +0000 |
commit | c8eb6910cd41901daf2f4192c0b3e583a20adc90 (patch) | |
tree | e7bbadcbb678c74e9c4465068dd14de61f15dd3d /sw | |
parent | f3acd7232371fd67a80062a045a1a09e3c8d5ab9 (diff) |
cppCheck: Various clean-up
mailconfigpapge: shouldn't it be a logical AND instead of a bit-wise operation ?
HeaderFooterWin, drwtxtsh, formatclipboard, wview: redundant assignment
fldref: unused variable
Change-Id: I5016c12527a8811676ff10f07f7be9e855c66814
Signed-off-by: jailletc36 <christophe.jaillet@wanadoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/996
Reviewed-by: Radek Doulík <rodo@novell.com>
Tested-by: Radek Doulík <rodo@novell.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/config/mailconfigpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/docvw/HeaderFooterWin.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/shells/drwtxtsh.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/uiview/formatclipboard.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/web/wview.cxx | 1 |
6 files changed, 2 insertions, 11 deletions
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 430312c0883e..197259a2e4ef 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -548,7 +548,7 @@ IMPL_LINK_NOARG(SwAuthenticationSettingsDialog, RadioButtonHdl_Impl) { sal_Bool bSeparate = m_aSeparateAuthenticationRB.IsChecked(); sal_Bool bIsEnabled = m_aSeparateAuthenticationRB.IsEnabled(); - sal_Bool bNotSeparate = !bSeparate & bIsEnabled; + sal_Bool bNotSeparate = !bSeparate && bIsEnabled; bSeparate &= bIsEnabled; m_aOutgoingServerFT.Enable(bSeparate); diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index 82c663833284..25e291384ed9 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -276,8 +276,6 @@ void SwHeaderFooterWin::Paint( const Rectangle& ) const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); if ( rSettings.GetHighContrastMode() ) { - aLineColor = rSettings.GetDialogTextColor().getBColor(); - aFillColor = rSettings.GetDialogColor( ).getBColor(); aLineColor = rSettings.GetDialogTextColor( ).getBColor(); diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 837c7d42316b..e00fb78d3546 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -116,11 +116,7 @@ void SwFldRefPage::SaveSelectedTxtNode() if ( pEntry ) { const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); - SwWrtShell *pSh = GetWrtShell(); - if ( !pSh ) - { - pSh = ::GetActiveWrtShell(); - } + if ( nTypeId == REFFLDFLAG_HEADING ) { mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())); diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 82c6bee50660..fd5eb1a656b0 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -837,7 +837,6 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) SwWrtShell &rSh = GetShell(); pSdrView = rSh.GetDrawView(); SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner(); - pOutliner = pSdrView->GetTextEditOutliner(); return &pOutliner->GetUndoManager(); } diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx index dd6e65349ab7..f9077547aa44 100644 --- a/sw/source/ui/uiview/formatclipboard.cxx +++ b/sw/source/ui/uiview/formatclipboard.cxx @@ -160,7 +160,6 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) const SfxPoolItem* pItem = 0; sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); - pItem = 0; sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ); const SfxPoolItem* pRowItem = 0, *pTableItem = 0; bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem ); diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index d6541a2d605b..f9af40c483bd 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -197,7 +197,6 @@ void SwWebView::SelectShell() SetShell( new svx::ExtrusionBar( this ) ); rDispatcher.Push( *GetCurShell() ); - eShellMode = SHELL_MODE_DRAW; SetShell( new svx::FontworkBar( this ) ); rDispatcher.Push( *GetCurShell() ); |