[ooo-build-commit] .: 2 commits - sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Oct 1 01:23:21 PDT 2010


 sw/source/core/doc/docfld.cxx |   22 ++++++++++++----------
 sw/source/ui/app/docsh.cxx    |    2 +-
 2 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit e7afab12ef8e9975709fb5a10e75aabaa65b9f01
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 1 09:23:13 2010 +0100

    && || warning

diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 5a1b860..a5a8bad 100755
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -1399,7 +1399,7 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword )
     IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
     Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword();
     if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem )
-        && ((SfxBoolItem*)pItem)->GetValue() == aPasswd.getLength() > 0)
+        && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0))
         return false;
 
     bool bRes = false;
commit d42559583400651e74aecabcff9585a35445be75
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 30 20:39:40 2010 +0100

    && || ambiguity in docfld.cxx

diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 63b2f57..bb40bcc 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -2464,24 +2464,26 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
             {
                 SwDBData aDBData(((SwDBNumSetField*)pFld)->GetDBData(&rDoc));
 
-                if( (bIsDBMgr &&
-                     rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand ) &&
-                     GETFLD_ALL == eGetMode) ||
-                    ( GETFLD_CALC & eGetMode &&
-                        ((SwDBNumSetField*)pFld)->IsCondValid()))
+                if (
+                     (bIsDBMgr && rDoc.GetNewDBMgr()->OpenDataSource(aDBData.sDataSource, aDBData.sCommand)) &&
+                     (GETFLD_ALL == eGetMode || (GETFLD_CALC & eGetMode && ((SwDBNumSetField*)pFld)->IsCondValid()))
+                   )
+                {
                     pFormel = &pFld->GetPar1();
+                }
             }
             break;
             case RES_DBNEXTSETFLD:
             {
                 SwDBData aDBData(((SwDBNextSetField*)pFld)->GetDBData(&rDoc));
 
-                if( (bIsDBMgr &&
-                     rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand ) &&
-                     GETFLD_ALL == eGetMode) ||
-                    ( GETFLD_CALC & eGetMode &&
-                        ((SwDBNextSetField*)pFld)->IsCondValid() ))
+                if (
+                     (bIsDBMgr && rDoc.GetNewDBMgr()->OpenDataSource(aDBData.sDataSource, aDBData.sCommand)) &&
+                     (GETFLD_ALL == eGetMode || (GETFLD_CALC & eGetMode && ((SwDBNextSetField*)pFld)->IsCondValid()))
+                   )
+                {
                     pFormel = &pFld->GetPar1();
+                }
             }
             break;
         }


More information about the ooo-build-commit mailing list