Package com.sun.star.report.pentaho.styles

Examples of com.sun.star.report.pentaho.styles.LengthCalculator


  }

  protected void startReportSection(final AttributeMap attrs, final int role)
      throws IOException, DataSourceException, ReportProcessingException
  {
    sectionHeight = new LengthCalculator();
    if (role == OfficeDocumentReportTarget.ROLE_TEMPLATE ||
        role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER ||
        role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER)
    {
      // Start buffering with an dummy styles-collection, so that the global styles dont get polluted ..
View Full Code Here


        }
    }

    private CSSNumericValue computeImageWidth(final ImageElementContext imageElementContext)
    {
        final LengthCalculator calculator = new LengthCalculator();
        final String[] strings = imageElementContext.getColStyles();
        for (int i = 0; i < strings.length; i++)
        {
            final String styleName = strings[i];
            final CSSNumericValue value = computeColumnWidth(styleName);
            if (value != null)
            {
                calculator.add(value);
            }
        }
        return calculator.getResult();
    }
View Full Code Here

        return calculator.getResult();
    }

    private CSSNumericValue computeImageHeight(final ImageElementContext imageElementContext)
    {
        final LengthCalculator calculator = new LengthCalculator();
        final String[] strings = imageElementContext.getRowStyles();
        for (int i = 0; i < strings.length; i++)
        {
            final String styleName = strings[i];
            final CSSNumericValue value = computeRowHeight(styleName);
            if (value != null)
            {
                calculator.add(value);
            }
        }
        return calculator.getResult();
    }
View Full Code Here

        if (OfficeNamespaces.DRAWING_NS.equals(namespace) && OfficeToken.FRAME.equals(elementType))
        {
            if (isElementBoundaryCollectionPass() && getCurrentRole() != ROLE_TEMPLATE)
            {
                final LengthCalculator len = new LengthCalculator();
                for (int i = 0; i < rowHeights.size(); i++)
                {
                    len.add((CSSNumericValue) rowHeights.get(i));
                // val += ((CSSNumericValue)rowHeights.get(i)).getValue();
                }

                rowHeights.clear();
                final CSSNumericValue currentRowHeight = len.getResult();
                rowHeights.add(currentRowHeight);
                attrs.setAttribute(OfficeNamespaces.DRAWING_NS, "z-index", String.valueOf(shapes.size()));
                final String y = (String) attrs.getAttribute(OfficeNamespaces.SVG_NS, "y");
                if (y != null)
                {
                    len.add(parseLength(y));
                    final CSSNumericValue currentY = len.getResult();
                    attrs.setAttribute(OfficeNamespaces.SVG_NS, "y", currentY.getValue() + currentY.getType().getType());
                }
                shapes.add(attrs);
            }
            return;
View Full Code Here

        if (parent == null)
        {
            return footerHeight;
        }

        final LengthCalculator lnc = new LengthCalculator();
        PageContext pc = this;
        while (pc != null)
        {
            lnc.add(pc.getFooterHeight());
            pc = pc.getParent();
        }
        return lnc.getResult();
    }
View Full Code Here

        if (parent == null)
        {
            return headerHeight;
        }

        final LengthCalculator lnc = new LengthCalculator();
        PageContext pc = this;
        while (pc != null)
        {
            lnc.add(pc.getHeaderHeight());
            pc = pc.getParent();
        }
        return lnc.getResult();
    }
View Full Code Here

    }

    protected void startReportSection(final AttributeMap attrs, final int role)
            throws IOException, DataSourceException, ReportProcessingException
    {
        sectionHeight = new LengthCalculator();
        if (role == OfficeDocumentReportTarget.ROLE_TEMPLATE ||
                role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER ||
                role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER)
        {
            // Start buffering with an dummy styles-collection, so that the global styles dont get polluted ..
View Full Code Here

    }
  }

  private CSSNumericValue computeImageWidth(final ImageElementContext imageElementContext)
  {
    final LengthCalculator calculator = new LengthCalculator();
    final String[] strings = imageElementContext.getColStyles();
    for (int i = 0; i < strings.length; i++)
    {
      final String styleName = strings[i];
      final CSSNumericValue value = computeColumnWidth(styleName);
      if (value != null)
      {
        calculator.add(value);
      }
    }
    return calculator.getResult();
  }
View Full Code Here

    return calculator.getResult();
  }

  private CSSNumericValue computeImageHeight(final ImageElementContext imageElementContext)
  {
    final LengthCalculator calculator = new LengthCalculator();
    final String[] strings = imageElementContext.getRowStyles();
    for (int i = 0; i < strings.length; i++)
    {
      final String styleName = strings[i];
      final CSSNumericValue value = computeRowHeight(styleName);
      if (value != null)
      {
        calculator.add(value);
      }
    }
    return calculator.getResult();
  }
View Full Code Here

        }
    }

    private CSSNumericValue computeImageWidth(final ImageElementContext imageElementContext)
    {
        final LengthCalculator calculator = new LengthCalculator();
        final String[] strings = imageElementContext.getColStyles();
        for (int i = 0; i < strings.length; i++)
        {
            final String styleName = strings[i];
            final CSSNumericValue value = computeColumnWidth(styleName);
            if (value != null)
            {
                calculator.add(value);
            }
        }
        return calculator.getResult();
    }
View Full Code Here

TOP

Related Classes of com.sun.star.report.pentaho.styles.LengthCalculator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.