Tag: mws_bea300
User: obo     
Date: 2008-04-28 15:23:05+0000
Modified:
   dba/reportdesign/java/com/sun/star/report/pentaho/model/PageSection.java

Log:
 INTEGRATION: CWS dba30beta_BEA300 (1.3.6); FILE MERGED
 2008/04/22 10:30:27 oj 1.3.6.1: #i88503# merge changes from rptchart02

File Changes:

Directory: /dba/reportdesign/java/com/sun/star/report/pentaho/model/
====================================================================

File [changed]: PageSection.java
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/model/PageSection.java?r1=1.3&r2=1.3.4.1
Delta lines:  +11 -28
---------------------
--- PageSection.java    2008-04-10 17:34:16+0000        1.3
+++ PageSection.java    2008-04-28 15:23:02+0000        1.3.4.1
@@ -27,8 +27,6 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
-
-
 package com.sun.star.report.pentaho.model;
 
 import org.jfree.report.structure.Section;
@@ -43,37 +41,22 @@
  */
 public class PageSection extends Section
 {
+
+    private static final String NOT_WITH_REPORT_HEADER_NOR_FOOTER = 
"not-with-report-header-nor-footer";
+
   public PageSection()
   {
   }
 
   public static boolean isPrintWithReportHeader(final AttributeMap attrs)
   {
-    final String pagePrintOption = (String) attrs.getAttribute
-        (OfficeNamespaces.OOREPORT_NS, "page-print-option");
-    if ("not-with-report-header".equals(pagePrintOption))
-    {
-      return false;
-    }
-    if ("not-with-report-header-nor-footer".equals(pagePrintOption))
-    {
-      return false;
-    }
-    return true;
+        final String pagePrintOption = (String) 
attrs.getAttribute(OfficeNamespaces.OOREPORT_NS, "page-print-option");
+        return !("not-with-report-header".equals(pagePrintOption) || 
NOT_WITH_REPORT_HEADER_NOR_FOOTER.equals(pagePrintOption));
   }
 
   public static boolean isPrintWithReportFooter(final AttributeMap attrs)
   {
-    final String pagePrintOption = (String) attrs.getAttribute
-        (OfficeNamespaces.OOREPORT_NS, "page-print-option");
-    if ("not-with-report-footer".equals(pagePrintOption))
-    {
-      return false;
-    }
-    if ("not-with-report-header-nor-footer".equals(pagePrintOption))
-    {
-      return false;
-    }
-    return true;
+        final String pagePrintOption = (String) 
attrs.getAttribute(OfficeNamespaces.OOREPORT_NS, "page-print-option");
+        return !("not-with-report-footer".equals(pagePrintOption) || 
NOT_WITH_REPORT_HEADER_NOR_FOOTER.equals(pagePrintOption));
   }
 }




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to