Examples of OfficeMasterPage


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

                                           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

  private OfficeMasterPage masterPage;
  private ArrayList otherHandlers;

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

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
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.