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

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


            // todo: Store the page-layouts as well.
            // The page layouts are derived from a common template, but as the
            // header-heights differ, we have to derive these beasts instead
            // of copying them

            final OfficeStylesCollection officeStylesCollection = getGlobalStylesCollection();
            final OfficeMasterStyles officeMasterStyles = officeStylesCollection.getMasterStyles();
            final String pageLayoutTemplate = currentMasterPage.getPageLayout();
            if (pageLayoutTemplate == null)
            {
                // there is no pagelayout. Create one ..
                final String derivedLayout = masterPageFactory.createPageStyle(getGlobalStylesCollection().getAutomaticStyles(), headerSize, footerSize);
View Full Code Here


        contentProcessingState = TextRawReportTarget.CP_SETUP;

        activePageContext.clear();
        activePageContext.push(new PageContext());

        final OfficeStylesCollection predefStyles = getPredefinedStylesCollection();
        masterPageFactory = new MasterPageFactory(predefStyles.getMasterStyles());

        predefStyles.getAutomaticStyles().addStyle(createVariablesStyle(true));
        predefStyles.getAutomaticStyles().addStyle(createVariablesStyle(false));
    }
View Full Code Here

        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 ..
            startBuffering(new OfficeStylesCollection(), true);
        }
        else if (role == OfficeDocumentReportTarget.ROLE_PAGE_HEADER)
        {
            startBuffering(getGlobalStylesCollection(), true);
            pageHeaderOnReportHeader = PageSection.isPrintWithReportHeader(attrs);
View Full Code Here

        if ((role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER ||
                role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER) &&
                (!PageSection.isPrintWithReportHeader(attrs) ||
                !PageSection.isPrintWithReportFooter(attrs)))
        {
            startBuffering(new OfficeStylesCollection(), true);

        }
        else
        {
            super.startReportSection(attrs, role);
View Full Code Here

        }
    }

    private String generateInitialTableStyle() throws ReportProcessingException
    {
        final OfficeStylesCollection predefStyles = getPredefinedStylesCollection();
        final OfficeStyles commonStyles = predefStyles.getAutomaticStyles();
        if (!commonStyles.containsStyle(OfficeToken.TABLE, "Initial_Table"))
        {
            final String masterPageName = createMasterPage();

            final OfficeStyle tableStyle = new OfficeStyle();
View Full Code Here

        return "Initial_Table";
    }

    private String createMasterPage() throws ReportProcessingException
    {
        final OfficeStylesCollection predefStyles = getPredefinedStylesCollection();
        final MasterPageFactory masterPageFactory = new MasterPageFactory(predefStyles.getMasterStyles());
        final OfficeMasterPage masterPage;
        if (!masterPageFactory.containsMasterPage("Standard", null, null))
        {
            masterPage = masterPageFactory.createMasterPage("Standard", null, null);

            final CSSNumericValue zeroLength = CSSNumericValue.createValue(CSSNumericType.CM, 0);
            final String pageLayoutTemplate = masterPage.getPageLayout();
            if (pageLayoutTemplate == null)
            {
                // there is no pagelayout. Create one ..
                final String derivedLayout = masterPageFactory.createPageStyle(getGlobalStylesCollection().getAutomaticStyles(), zeroLength, zeroLength);
                masterPage.setPageLayout(derivedLayout);
            }
            else
            {
                final String derivedLayout = masterPageFactory.derivePageStyle(pageLayoutTemplate,
                        getPredefinedStylesCollection().getAutomaticStyles(),
                        getGlobalStylesCollection().getAutomaticStyles(), zeroLength, zeroLength);
                masterPage.setPageLayout(derivedLayout);
            }

            final OfficeStylesCollection officeStylesCollection = getGlobalStylesCollection();
            final OfficeMasterStyles officeMasterStyles = officeStylesCollection.getMasterStyles();
            officeMasterStyles.addMasterPage(masterPage);
        }
        else
        {
            masterPage = masterPageFactory.getMasterPage("Standard", null, null);
View Full Code Here

  private final OfficeStylesCollection officeStylesCollection;
  private FontFaceDeclsReadHandler fontFaceReadHandler;

  public DocumentStylesReadHandler()
  {
    officeStylesCollection = new OfficeStylesCollection();
  }
View Full Code Here

    protected void startReportSection(final AttributeMap attrs, final int role) throws IOException, DataSourceException, ReportProcessingException
    {
        if ((role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_HEADER || role == OfficeDocumentReportTarget.ROLE_SPREADSHEET_PAGE_FOOTER) && (!PageSection.isPrintWithReportHeader(attrs) || !PageSection.isPrintWithReportFooter(attrs)))
        {
            startBuffering(new OfficeStylesCollection(), true);
        }
        else
        {
            super.startReportSection(attrs, role);
        }
View Full Code Here

        }
    }

    private String generateInitialTableStyle() throws ReportProcessingException
    {
        final OfficeStylesCollection predefStyles = getPredefinedStylesCollection();
        final OfficeStyles commonStyles = predefStyles.getAutomaticStyles();
        if (!commonStyles.containsStyle(OfficeToken.TABLE, "Initial_Table"))
        {
            final String masterPageName = createMasterPage();

            final OfficeStyle tableStyle = new OfficeStyle();
View Full Code Here

        return "Initial_Table";
    }

    private String createMasterPage() throws ReportProcessingException
    {
        final OfficeStylesCollection predefStyles = getPredefinedStylesCollection();
        final MasterPageFactory masterPageFactory = new MasterPageFactory(predefStyles.getMasterStyles());
        final OfficeMasterPage masterPage;
        if (!masterPageFactory.containsMasterPage("Standard", null, null))
        {
            masterPage = masterPageFactory.createMasterPage("Standard", null, null);

            final CSSNumericValue zeroLength = CSSNumericValue.createValue(CSSNumericType.CM, 0);
            final String pageLayoutTemplate = masterPage.getPageLayout();
            if (pageLayoutTemplate == null)
            {
                // there is no pagelayout. Create one ..
                final String derivedLayout = masterPageFactory.createPageStyle(getGlobalStylesCollection().getAutomaticStyles(), zeroLength, zeroLength);
                masterPage.setPageLayout(derivedLayout);
            }
            else
            {
                final String derivedLayout = masterPageFactory.derivePageStyle(pageLayoutTemplate,
                        getPredefinedStylesCollection().getAutomaticStyles(),
                        getGlobalStylesCollection().getAutomaticStyles(), zeroLength, zeroLength);
                masterPage.setPageLayout(derivedLayout);
            }

            final OfficeStylesCollection officeStylesCollection = getGlobalStylesCollection();
            final OfficeMasterStyles officeMasterStyles = officeStylesCollection.getMasterStyles();
            officeMasterStyles.addMasterPage(masterPage);
        }
        else
        {
            masterPage = masterPageFactory.getMasterPage("Standard", null, null);
View Full Code Here

TOP

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

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.