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 <t...@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

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to