Re: [Libreoffice] [PATCH] Simple fix for frmsh.cxx to review (from cppcheck report)
On Sat, Jan 14, 2012 at 04:08:46AM -0800, julien2412 wrote: Hello, cppcheck reported this : core/sw/source/ui/shells/frmsh.cxx 516 duplicateExpression style Same expression on both sides of '' After a quick reading, i thought about this page but perhaps it's less straightforward than I think diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 718839c..7a6db74 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -513,7 +513,7 @@ void SwFrameShell::Execute(SfxRequest rReq) if(pArgs SFX_ITEM_SET == pArgs-GetItemState(GetPool().GetWhich(nSlot), sal_False, pItem)) { aMgr.SetAttrSet( *pArgs ); -if(SID_ATTR_ULSPACE == nSlot SID_ATTR_ULSPACE == nSlot) +if(SID_ATTR_ULSPACE == nSlot SID_ATTR_LRSPACE == nSlot) bCopyToFmt = sal_True; } } Any idea ? Yes, you changed the condition from always true to always false .-) I think it is not necessary at all. It is hard to tell what was the intent, because the code has not changed since the original CVS import. D. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] Simple fix for frmsh.cxx to review (from cppcheck report)
You're absolutely right ! It can't be both at the same time :-( Julien -- View this message in context: http://nabble.documentfoundation.org/PATCH-Simple-fix-for-frmsh-cxx-to-review-from-cppcheck-report-tp3658800p3662400.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PATCH] Simple fix for frmsh.cxx to review (from cppcheck report)
Hello, cppcheck reported this : core/sw/source/ui/shells/frmsh.cxx 516 duplicateExpression style Same expression on both sides of '' After a quick reading, i thought about this page but perhaps it's less straightforward than I think diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 718839c..7a6db74 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -513,7 +513,7 @@ void SwFrameShell::Execute(SfxRequest rReq) if(pArgs SFX_ITEM_SET == pArgs-GetItemState(GetPool().GetWhich(nSlot), sal_False, pItem)) { aMgr.SetAttrSet( *pArgs ); -if(SID_ATTR_ULSPACE == nSlot SID_ATTR_ULSPACE == nSlot) +if(SID_ATTR_ULSPACE == nSlot SID_ATTR_LRSPACE == nSlot) bCopyToFmt = sal_True; } } Any idea ? (if it's ok, I can commit/push it on master) Julien -- View this message in context: http://nabble.documentfoundation.org/PATCH-Simple-fix-for-frmsh-cxx-to-review-from-cppcheck-report-tp3658800p3658800.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice