Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 06/18/2012 02:35 PM, Stephan Bergmann wrote:
On 06/18/2012 10:01 AM, Brad Sowden wrote:
diff --git a/sw/source/ui/docvw/edtwin.cxx
b/sw/source/ui/docvw/edtwin.cxx
index 04e6e73..9f6d2f2 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -4992,12 +4992,9 @@ void SwEditWin::Command( const CommandEvent&
rCEvt )
rSh.IsCrsrReadonly();
if(!bIsDocReadOnly)
{
- QuickHelpData aTmpQHD;
if( pQuickHlpData->m_bIsDisplayed )
- {
- aTmpQHD.Move( *pQuickHlpData );
pQuickHlpData->Stop( rSh );
- }
+
String sWord;
if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{

Merely browsing through this quickly, just a minor nit that keeping {
... } even around a single statement is mostly preferable to removing
the (technically redundant) braces. All too easily, the next maintainer
(or somebody trying to quickly add a SAL_DEBUG locally) will
inadvertently forget to add the braces back when adding a second
statement to the conditional block.

...and looking closer, are you sure that aTmpQHD is really unnecessary anyway? Note that QuickHelpData::Move modifies its argument (which it takes by non-const reference)---what it effectively does is clear pQuickHlpData->m_aHelpStrings, and I'm not sure whether that is relevant or just some misguided optimization.

Stephan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.