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

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


        {
            throw new JobDefinitionException("Report definition name must be given");
        }

        final Resource res = resourceManager.createDirectly("sun:oo://" + reportResource, OfficeDocument.class);
        final OfficeDocument tempReport = (OfficeDocument) res.getResource();
        tempReport.setDataFactory(new StarReportDataFactory(dataSourceFactory));
        tempReport.setJobProperties(definition.getProcessingParameters().copy());
        final ReportParameters inputParameters = tempReport.getInputParameters();

        final ParameterMap queryParameters = definition.getQueryParameters();
        final String[] paramKeys = queryParameters.keys();
        for (int i = 0; i < paramKeys.length; i++)
        {
View Full Code Here


    private OfficeDocument parseContentXml()
    {
        // Check whether this is a content.xml.
        if (!OfficeNamespaces.OFFICE_NS.equals(getUri()) || "document-content".equals(getTagName()))
        {
            return new OfficeDocument();
        }

        // we may have to parse an existing content.xml.
        final ResourceKey contextKey = getRootHandler().getContext();
        final ResourceManager resourceManager = getRootHandler().getResourceManager();
        try
        {
            final ResourceKey key =
                    resourceManager.deriveKey(contextKey, "content.xml");
            final Resource resource =
                    resourceManager.create(key, contextKey, JFreeReport.class);
            final OfficeDocument doc = (OfficeDocument) resource.getResource();
            if (doc != null)
            {
                return doc;
            }
        }
        catch (ResourceKeyCreationException e)
        {
            // ignore ..
            LOGGER.debug("Failed to create resource-key for 'content.xml'. Ignoring.");
        }
        catch (ResourceException e)
        {
            // ignore ..
            LOGGER.debug("Failed to parse resource for 'content.xml'. Ignoring.");
        }
        return new OfficeDocument();

    }
View Full Code Here

            autoStyleNameGenerator.reset();
            tableNameGenerator.reset();
            frameNameGenerator.reset();

            final OfficeDocument reportDoc = (OfficeDocument) report;
            predefinedStylesCollection = reportDoc.getStylesCollection();

            final OfficeStyles commonStyles = predefinedStylesCollection.getCommonStyles();
            if (!commonStyles.containsStyle(OfficeToken.GRAPHIC, OfficeToken.GRAPHICS))
            {
                final OfficeStyle graphicsDefaultStyle = new OfficeStyle();
View Full Code Here

        final String cellStyleName = (String) tce.getAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME);
        if (cellStyleName == null)
        {
            return null;
        }
        final OfficeDocument document = getDocument();
        if (document == null)
        {
            return null;
        }

        final OfficeStyle style = document.getStylesCollection().getStyle("table-cell", cellStyleName);
        return (String) style.getAttribute(OfficeNamespaces.STYLE_NS, "data-style-name");
    }
View Full Code Here

    final String cellStyleName = (String) tce.getAttribute(OfficeNamespaces.TABLE_NS, "style-name");
    if (cellStyleName == null)
    {
      return null;
    }
    final OfficeDocument document = getDocument();
    if (document == null)
    {
      return null;
    }

    final OfficeStyle style = document.getStylesCollection().getStyle("table-cell", cellStyleName);
    return (String) style.getAttribute(OfficeNamespaces.STYLE_NS, "data-style-name");
  }
View Full Code Here

      states.push(IntegerCache.getInteger(OfficeDocumentReportTarget.STATE_IN_DOCUMENT));

      autoStyleNameGenerator.reset();
      tableNameGenerator.reset();

      final OfficeDocument reportDoc = (OfficeDocument) report;
      predefinedStylesCollection = reportDoc.getStylesCollection();

      final OfficeStyles commonStyles = predefinedStylesCollection.getCommonStyles();
      if (commonStyles.containsStyle("graphic", "Graphics") == false)
      {
        final OfficeStyle graphicsDefaultStyle = new OfficeStyle();
View Full Code Here

            autoStyleNameGenerator.reset();
            tableNameGenerator.reset();
            frameNameGenerator.reset();

            final OfficeDocument reportDoc = (OfficeDocument) report;
            predefinedStylesCollection = reportDoc.getStylesCollection();

            final OfficeStyles commonStyles = predefinedStylesCollection.getCommonStyles();
            if (!commonStyles.containsStyle(OfficeToken.GRAPHIC, OfficeToken.GRAPHICS))
            {
                final OfficeStyle graphicsDefaultStyle = new OfficeStyle();
View Full Code Here

        {
            throw new JobDefinitionException("Report definition name must be given");
        }

        final Resource res = resourceManager.createDirectly("sun:oo://" + reportResource, OfficeDocument.class);
        final OfficeDocument tempReport = (OfficeDocument) res.getResource();
        tempReport.setDataFactory(new StarReportDataFactory(dataSourceFactory));
        tempReport.setJobProperties(definition.getProcessingParameters().copy());
        final ReportParameters inputParameters = tempReport.getInputParameters();

        final ParameterMap queryParameters = definition.getQueryParameters();
        final String[] paramKeys = queryParameters.keys();
        for (int i = 0; i < paramKeys.length; i++)
        {
View Full Code Here

            autoStyleNameGenerator.reset();
            tableNameGenerator.reset();
            frameNameGenerator.reset();

            final OfficeDocument reportDoc = (OfficeDocument) report;
            predefinedStylesCollection = reportDoc.getStylesCollection();

            final OfficeStyles commonStyles = predefinedStylesCollection.getCommonStyles();
            if (!commonStyles.containsStyle(OfficeToken.GRAPHIC, OfficeToken.GRAPHICS))
            {
                final OfficeStyle graphicsDefaultStyle = new OfficeStyle();
View Full Code Here

        {
            throw new JobDefinitionException("Report definition name must be given");
        }

        final Resource res = resourceManager.createDirectly("sun:oo://" + reportResource, OfficeDocument.class);
        final OfficeDocument tempReport = (OfficeDocument) res.getResource();
        tempReport.setDataFactory(new StarReportDataFactory(dataSourceFactory));
        tempReport.setJobProperties(definition.getProcessingParameters().copy());
        final ReportParameters inputParameters = tempReport.getInputParameters();

        final ParameterMap queryParameters = definition.getQueryParameters();
        final String[] paramKeys = queryParameters.keys();
        for (int i = 0; i < paramKeys.length; i++)
        {
View Full Code Here

TOP

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

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.