User: rt      
Date: 2008-01-29 14:34:48+0000
Modified:
   
dba/reportdesign/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java

Log:
 INTEGRATION: CWS pentaho2_SRC680 (1.3.74); FILE MERGED
 2008/01/21 09:00:24 oj 1.3.74.1: #i79173# #i78502# import changes from pentaho1

File Changes:

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

File [changed]: OfficeDocumentReportTarget.java
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java?r1=1.3&r2=1.4
Delta lines:  +22 -6
--------------------
--- OfficeDocumentReportTarget.java     2007-08-03 09:50:45+0000        1.3
+++ OfficeDocumentReportTarget.java     2008-01-29 14:34:45+0000        1.4
@@ -118,6 +118,8 @@
   public static final int ROLE_DETAIL = 9;
   public static final int ROLE_VARIABLES = 10;
   public static final int ROLE_TEMPLATE = 11;
+  public static final int ROLE_SPREADSHEET_PAGE_HEADER = 12;
+  public static final int ROLE_SPREADSHEET_PAGE_FOOTER = 13;
 
   public static final int STATE_IN_DOCUMENT = 0;
   public static final int STATE_IN_BODY = 1;
@@ -495,7 +497,7 @@
     // todo
     if (DEBUG_ELEMENTS)
     {
-      Log.debug("Starting " + getCurrentState() + "/" + states.size() + " " +
+      Log.debug("Starting " + getCurrentState() + '/' + states.size() + ' ' +
           ReportTargetUtil.getNamespaceFromAttribute(attrs) + " -> " +
           ReportTargetUtil.getElemenTypeFromAttribute(attrs));
     }
@@ -554,12 +556,26 @@
             }
             else if 
(ReportTargetUtil.isElementOfType(OfficeNamespaces.OOREPORT_NS, "page-header", 
attrs))
             {
+              if 
("spreadsheet-section".equals(attrs.getAttribute(OfficeNamespaces.INTERNAL_NS, 
"role")))
+              {
+                currentRole = 
OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER;
+              }
+              else
+              {
               currentRole = OfficeDocumentReportTarget.ROLE_PAGE_HEADER;
             }
+            }
             else if 
(ReportTargetUtil.isElementOfType(OfficeNamespaces.OOREPORT_NS, "page-footer", 
attrs))
             {
+              if 
("spreadsheet-section".equals(attrs.getAttribute(OfficeNamespaces.INTERNAL_NS, 
"role")))
+              {
+                currentRole = 
OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER;
+              }
+              else
+              {
               currentRole = OfficeDocumentReportTarget.ROLE_PAGE_FOOTER;
             }
+            }
             else if 
(ReportTargetUtil.isElementOfType(OfficeNamespaces.OOREPORT_NS, 
"report-header", attrs))
             {
               currentRole = OfficeDocumentReportTarget.ROLE_REPORT_HEADER;
@@ -1213,7 +1229,7 @@
     return CSSValueFactory.createLengthValue(cssValue);
   }
 
-  public boolean isRepeatingSection()
+  protected boolean isRepeatingSection()
   {
     return (currentRole == 
OfficeDocumentReportTarget.ROLE_REPEATING_GROUP_FOOTER ||
         currentRole == OfficeDocumentReportTarget.ROLE_REPEATING_GROUP_HEADER 
||
@@ -1268,7 +1284,7 @@
 
         if (imageAreaWidthVal == null || imageAreaHeightVal == null)
         {
-          Log.debug ("Image data returned from context is invalid. Maybe this 
is not an image?");
+          Log.debug("Image data returned from context is invalid. Maybe this 
is not an image?");
           return;
         }
         else




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

Reply via email to