Examples of OfficeMasterPage


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

  private final OfficeMasterPage masterPage;
  private final List otherHandlers;

  public MasterPageReadHandler()
  {
    masterPage = new OfficeMasterPage();
    this.otherHandlers = new ArrayList();
  }
View Full Code Here

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

      masterPageName = currentMasterPage.getStyleName();
    }
    else
    {
      // retrieve the master-page.
      final OfficeMasterPage masterPage = masterPageFactory.getMasterPage("Standard", activePageHeader, activePageFooter);
      if (ObjectUtilities.equal(masterPage.getStyleName(), currentMasterPage.getStyleName()))
      {
        // They are the same,
        masterPageName = null;
      }
      else
View Full Code Here

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

  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) == false)
    {
      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);
    }
    return masterPage.getStyleName();
  }
View Full Code Here

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

    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);
        }
        return masterPage.getStyleName();
    }
View Full Code Here

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

      final OfficeStylesCollection collection = osc[sci];
      final OfficeMasterStyles officeStyles = collection.getMasterStyles();
      final OfficeMasterPage[] officeMasterPages = officeStyles.getAllMasterPages();
      for (int i = 0; i < officeMasterPages.length; i++)
      {
        final OfficeMasterPage masterPage = officeMasterPages[i];
        writeSection(masterPage);
      }

      writeSectionChilds(officeStyles.getOtherNodes().getNodeArray());
    }
View Full Code Here

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

            final String pageHeader,
            final String pageFooter)
    {
        final MasterPageFactoryKey key =
                new MasterPageFactoryKey(template, pageHeader, pageFooter);
        final OfficeMasterPage cached = (OfficeMasterPage) masterPages.get(key);
        if (cached != null)
        {
            return cached;
        }

        final String targetName = (masterPages.isEmpty()) ? "Standard" : template;

        OfficeMasterPage predef = predefinedStyles.getMasterPage(template);
        if (predef == null)
        {
            // This is a 'magic' name ..
            // todo: It could be that this should be called 'Standard' instead
            predef = predefinedStyles.getMasterPage(MasterPageFactory.DEFAULT_PAGE_NAME);
        }

        if (predef != null)
        {
            try
            {
                // derive
                final OfficeMasterPage derived = (OfficeMasterPage) predef.clone();
                return setupMasterPage(derived, targetName, pageHeader, pageFooter,
                        key);
            }
            catch (CloneNotSupportedException cne)
            {
                throw new IllegalStateException("Implementation error: Unable to derive page");
            }
        }

        final OfficeMasterPage masterPage = new OfficeMasterPage();
        masterPage.setNamespace(OfficeNamespaces.STYLE_NS);
        masterPage.setType("master-page");
        return setupMasterPage(masterPage, targetName, pageHeader, pageFooter, key);
    }
View Full Code Here

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

            masterPageName = currentMasterPage.getStyleName();
        }
        else
        {
            // retrieve the master-page.
            final OfficeMasterPage masterPage = masterPageFactory.getMasterPage(STANDARD, activePageHeader, activePageFooter);
            if (ObjectUtilities.equal(masterPage.getStyleName(), currentMasterPage.getStyleName()))
            {
                // They are the same,
                masterPageName = null;
            }
            else
View Full Code Here

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

            final String pageHeader,
            final String pageFooter)
    {
        final MasterPageFactoryKey key =
                new MasterPageFactoryKey(template, pageHeader, pageFooter);
        final OfficeMasterPage cached = (OfficeMasterPage) masterPages.get(key);
        if (cached != null)
        {
            return cached;
        }

        final String targetName = (masterPages.isEmpty()) ? "Standard" : template;

        OfficeMasterPage predef = predefinedStyles.getMasterPage(template);
        if (predef == null)
        {
            // This is a 'magic' name ..
            // todo: It could be that this should be called 'Standard' instead
            predef = predefinedStyles.getMasterPage(MasterPageFactory.DEFAULT_PAGE_NAME);
        }

        if (predef != null)
        {
            try
            {
                // derive
                final OfficeMasterPage derived = (OfficeMasterPage) predef.clone();
                return setupMasterPage(derived, targetName, pageHeader, pageFooter,
                        key);
            }
            catch (CloneNotSupportedException cne)
            {
                throw new IllegalStateException("Implementation error: Unable to derive page",cne);
            }
        }

        final OfficeMasterPage masterPage = new OfficeMasterPage();
        masterPage.setNamespace(OfficeNamespaces.STYLE_NS);
        masterPage.setType("master-page");
        return setupMasterPage(masterPage, targetName, pageHeader, pageFooter, key);
    }
View Full Code Here

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

            masterPageName = currentMasterPage.getStyleName();
        }
        else
        {
            // retrieve the master-page.
            final OfficeMasterPage masterPage = masterPageFactory.getMasterPage(STANDARD, activePageHeader, activePageFooter);
            if (ObjectUtilities.equal(masterPage.getStyleName(), currentMasterPage.getStyleName()))
            {
                // They are the same,
                masterPageName = null;
            }
            else
View Full Code Here

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

    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);
        }
        return masterPage.getStyleName();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.