Package com.sun.star.report.pentaho.model

Examples of com.sun.star.report.pentaho.model.PageLayout


  private final PageLayout pageLayout;
  private final List childs;

  public PageLayoutReadHandler()
  {
    this.pageLayout = new PageLayout();
    this.childs = new ArrayList();
  }
View Full Code Here


    }

    final PageLayout[] allPageStyles = styles.getAllPageStyles();
    for (int i = 0; i < allPageStyles.length; i++)
    {
      final PageLayout style = allPageStyles[i];
      writeSection(style);
    }

    writeSectionChilds(styles.getOtherStyles());
  }
View Full Code Here

            final CSSNumericValue headerHeight,
            final CSSNumericValue footerHeight)
    {
        final PageLayoutKey key =
                new PageLayoutKey(null, headerHeight, footerHeight);
        final PageLayout derived = new PageLayout();
        final String name = pageLayoutNameGenerator.generateName("autogenerated");
        derived.setStyleName(name);
        commonStyles.addPageStyle(derived);

        if (headerHeight != null)
        {
            final Section headerStyle = new Section();
            headerStyle.setNamespace(OfficeNamespaces.STYLE_NS);
            headerStyle.setType("header-style");
            derived.addNode(headerStyle);
            MasterPageFactory.applyHeaderFooterHeight(headerStyle, headerHeight);
        }

        if (footerHeight != null)
        {
            final Section footerStyle = new Section();
            footerStyle.setNamespace(OfficeNamespaces.STYLE_NS);
            footerStyle.setType("footer-style");
            derived.addNode(footerStyle);
            MasterPageFactory.applyHeaderFooterHeight(footerStyle, footerHeight);
        }
        pageLayouts.put(key, name);
        return name;
    }
View Full Code Here

        {
            // there's already a suitable version included.
            return pageLayoutName;
        }

        final PageLayout original = predefined.getPageStyle(pageStyleTemplate);
        if (original == null)
        {
            throw new ReportProcessingException("Invalid page-layout '" + pageStyleTemplate + "', will not continue.");
        }

        try
        {
            final PageLayout derived = (PageLayout) original.clone();
            final String name = pageLayoutNameGenerator.generateName(
                    pageStyleTemplate);
            derived.setStyleName(name);
            commonStyles.addPageStyle(derived);

            if (headerHeight != null)
            {
                Section headerStyle = derived.getHeaderStyle();
                if (headerStyle == null)
                {
                    headerStyle = new Section();
                    headerStyle.setNamespace(OfficeNamespaces.STYLE_NS);
                    headerStyle.setType("header-style");
                    derived.addNode(headerStyle);
                }
                MasterPageFactory.applyHeaderFooterHeight(headerStyle, headerHeight);
            }

            if (footerHeight != null)
            {
                Section footerStyle = derived.getFooterStyle();
                if (footerStyle == null)
                {
                    footerStyle = new Section();
                    footerStyle.setNamespace(OfficeNamespaces.STYLE_NS);
                    footerStyle.setType("footer-style");
                    derived.addNode(footerStyle);
                }

                MasterPageFactory.applyHeaderFooterHeight(footerStyle, footerHeight);
            }
            pageLayouts.put(key, name);
View Full Code Here

            final CSSNumericValue headerHeight,
            final CSSNumericValue footerHeight)
    {
        final PageLayoutKey key =
                new PageLayoutKey(null, headerHeight, footerHeight);
        final PageLayout derived = new PageLayout();
        final String name = pageLayoutNameGenerator.generateName("autogenerated");
        derived.setStyleName(name);
        commonStyles.addPageStyle(derived);

        if (headerHeight != null)
        {
            final Section headerStyle = new Section();
            headerStyle.setNamespace(OfficeNamespaces.STYLE_NS);
            headerStyle.setType("header-style");
            derived.addNode(headerStyle);
            MasterPageFactory.applyHeaderFooterHeight(headerStyle, headerHeight);
        }

        if (footerHeight != null)
        {
            final Section footerStyle = new Section();
            footerStyle.setNamespace(OfficeNamespaces.STYLE_NS);
            footerStyle.setType("footer-style");
            derived.addNode(footerStyle);
            MasterPageFactory.applyHeaderFooterHeight(footerStyle, footerHeight);
        }
        pageLayouts.put(key, name);
        return name;
    }
View Full Code Here

        {
            // there's already a suitable version included.
            return pageLayoutName;
        }

        final PageLayout original = predefined.getPageStyle(pageStyleTemplate);
        if (original == null)
        {
            throw new ReportProcessingException("Invalid page-layout '" + pageStyleTemplate + "', will not continue.");
        }

        try
        {
            final PageLayout derived = (PageLayout) original.clone();
            final String name = pageLayoutNameGenerator.generateName(
                    pageStyleTemplate);
            derived.setStyleName(name);
            commonStyles.addPageStyle(derived);

            if (headerHeight != null)
            {
                Section headerStyle = derived.getHeaderStyle();
                if (headerStyle == null)
                {
                    headerStyle = new Section();
                    headerStyle.setNamespace(OfficeNamespaces.STYLE_NS);
                    headerStyle.setType("header-style");
                    derived.addNode(headerStyle);
                }
                MasterPageFactory.applyHeaderFooterHeight(headerStyle, headerHeight);
            }

            if (footerHeight != null)
            {
                Section footerStyle = derived.getFooterStyle();
                if (footerStyle == null)
                {
                    footerStyle = new Section();
                    footerStyle.setNamespace(OfficeNamespaces.STYLE_NS);
                    footerStyle.setType("footer-style");
                    derived.addNode(footerStyle);
                }

                MasterPageFactory.applyHeaderFooterHeight(footerStyle, footerHeight);
            }
            pageLayouts.put(key, name);
View Full Code Here

        }

        final PageLayout[] allPageStyles = styles.getAllPageStyles();
        for (int i = 0; i < allPageStyles.length; i++)
        {
            final PageLayout style = allPageStyles[i];
            writeSection(style);
        }

        writeSectionChilds(styles.getOtherStyles());
    }
View Full Code Here

    private final PageLayout pageLayout;
    private final List childs;

    public PageLayoutReadHandler()
    {
        this.pageLayout = new PageLayout();
        this.childs = new ArrayList();
    }
View Full Code Here

    }

    final PageLayout[] allPageStyles = styles.getAllPageStyles();
    for (int i = 0; i < allPageStyles.length; i++)
    {
      final PageLayout style = allPageStyles[i];
      writeSection(style);
    }

    writeSectionChilds(styles.getOtherStyles());
  }
View Full Code Here

            final CSSNumericValue headerHeight,
            final CSSNumericValue footerHeight)
    {
        final PageLayoutKey key =
                new PageLayoutKey(null, headerHeight, footerHeight);
        final PageLayout derived = new PageLayout();
        final String name = pageLayoutNameGenerator.generateName("autogenerated");
        derived.setStyleName(name);
        commonStyles.addPageStyle(derived);

        if (headerHeight != null)
        {
            final Section headerStyle = new Section();
            headerStyle.setNamespace(OfficeNamespaces.STYLE_NS);
            headerStyle.setType("header-style");
            derived.addNode(headerStyle);
            MasterPageFactory.applyHeaderFooterHeight(headerStyle, headerHeight);
        }

        if (footerHeight != null)
        {
            final Section footerStyle = new Section();
            footerStyle.setNamespace(OfficeNamespaces.STYLE_NS);
            footerStyle.setType("footer-style");
            derived.addNode(footerStyle);
            MasterPageFactory.applyHeaderFooterHeight(footerStyle, footerHeight);
        }
        pageLayouts.put(key, name);
        return name;
    }
View Full Code Here

TOP

Related Classes of com.sun.star.report.pentaho.model.PageLayout

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.