Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3BF5496CF for ; Fri, 28 Sep 2012 08:48:54 +0000 (UTC) Received: (qmail 16214 invoked by uid 500); 28 Sep 2012 08:48:54 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 16088 invoked by uid 500); 28 Sep 2012 08:48:53 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 16076 invoked by uid 99); 28 Sep 2012 08:48:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Sep 2012 08:48:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Sep 2012 08:48:50 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 913AA23889C5; Fri, 28 Sep 2012 08:48:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1391367 - /incubator/ooo/trunk/main/sw/source/core/txtnode/ndtxt.cxx Date: Fri, 28 Sep 2012 08:48:06 -0000 To: ooo-commits@incubator.apache.org From: orw@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120928084806.913AA23889C5@eris.apache.org> Author: orw Date: Fri Sep 28 08:48:06 2012 New Revision: 1391367 URL: http://svn.apache.org/viewvc?rev=1391367&view=rev Log: avoid assignments in if-conditions Modified: incubator/ooo/trunk/main/sw/source/core/txtnode/ndtxt.cxx Modified: incubator/ooo/trunk/main/sw/source/core/txtnode/ndtxt.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/txtnode/ndtxt.cxx?rev=1391367&r1=1391366&r2=1391367&view=diff ============================================================================== --- incubator/ooo/trunk/main/sw/source/core/txtnode/ndtxt.cxx (original) +++ incubator/ooo/trunk/main/sw/source/core/txtnode/ndtxt.cxx Fri Sep 28 08:48:06 2012 @@ -5080,17 +5080,22 @@ SwTxtNode::MakeUnoObject() //Bug 120881:Modify here for Directly Page Numbering bool SwTxtNode::HasPageNumberField() { - xub_StrLen nEnd = Len(); - for(xub_StrLen nStart=0;nStartGetFld().GetFld()) && - (pType=pSwField->GetTyp()) && pType->Which()==RES_PAGENUMBERFLD) - return true; - } - return false; + xub_StrLen nEnd = Len(); + for(xub_StrLen nStart=0;nStartGetFld().GetFld() + : NULL; + const SwFieldType* pType = pSwField + ? pSwField->GetTyp() + : NULL; + if ( pType && pType->Which() == RES_PAGENUMBERFLD ) + { + return true; + } + } + return false; } //Bug 120881(End)