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


Hi,

On building calc, I found a warning suggesting an ambiguous "else".
The attached patch is under LGPLv3+/MPL.

Cheers,
-- Takeshi Abe
From 5f9df0274b47fbf81bf2dc3789dd5e8719360549 Mon Sep 17 00:00:00 2001
From: Takeshi Abe <tabe@fixedpoint.jp>
Date: Thu, 3 Feb 2011 03:13:53 +0900
Subject: [PATCH] avoid ambiguous else

---
 sc/source/ui/miscdlgs/acredlin.cxx |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index ceba5b4..27b1150 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -343,10 +343,10 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
     aComment.EraseAllChars('\n');
 
     if(eType==SC_CAT_CONTENT)
-        if(!pScChangeAction->IsDialogParent())
-            pScChangeAction->GetDescription( aDesc, pDoc, TRUE);
-    else
-        pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete());
+    {
+        BOOL bTest = !pScChangeAction->IsDialogParent() || !pScChangeAction->IsMasterDelete();
+        pScChangeAction->GetDescription( aDesc, pDoc, bTest );
+    }
 
     if(aDesc.Len()>0)
     {
-- 
1.7.2.3


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.