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

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


        xmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "font-face-decls", XmlWriterSupport.OPEN);

        final TreeMap fontFaces = new TreeMap();
        for (int sci = 0; sci < osc.length; sci++)
        {
            final OfficeStylesCollection collection = osc[sci];
            final FontFaceDeclsSection fontFaceDecls = collection.getFontFaceDecls();
            final FontFaceElement[] fontFaceElements = fontFaceDecls.getAllFontFaces();
            for (int i = 0; i < fontFaceElements.length; i++)
            {
                final FontFaceElement element = fontFaceElements[i];
                fontFaces.put(element.getStyleName(), element);
View Full Code Here


    private final OfficeStylesCollection officeStylesCollection;
    private FontFaceDeclsReadHandler fontFaceReadHandler;

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

        {
            final ResourceKey key =
                    resourceManager.deriveKey(contextKey, "styles.xml");
            final Resource resource =
                    resourceManager.create(key, contextKey, OfficeStylesCollection.class);
            final OfficeStylesCollection styles =
                    (OfficeStylesCollection) resource.getResource();
            if (styles != null)
            {
                return styles;
            }
        }
        catch (ResourceKeyCreationException e)
        {
            // ignore ..
            LOGGER.debug("Failed to create resource-key for 'styles.xml'. Ignoring.", e);
        }
        catch (ResourceException e)
        {
            // ignore ..
            LOGGER.debug("Failed to parse resource for 'styles.xml'. Ignoring.", e);
        }

        return new OfficeStylesCollection();
    }
View Full Code Here

            }

            // Make sure that later generated styles do not overwrite existing styles.
            fillStyleNameGenerator(predefinedStylesCollection);

            contentStylesCollection = new OfficeStylesCollection();
            globalStylesCollection = new OfficeStylesCollection();

            startBuffering(contentStylesCollection, true);
        }
        catch (IOException e)
        {
View Full Code Here

    }

    protected void performStyleProcessing(final AttributeMap attrs)
            throws ReportProcessingException
    {
        final OfficeStylesCollection stylesCollection = getStylesCollection();
        final OfficeStylesCollection predefCollection = getPredefinedStylesCollection();
        final OfficeStylesCollection globalStylesCollection = getGlobalStylesCollection();

        final String elementNamespace =
                ReportTargetUtil.getNamespaceFromAttribute(attrs);
        final String elementName =
                ReportTargetUtil.getElemenTypeFromAttribute(attrs);
View Full Code Here

    protected void startReportSection(final AttributeMap attrs, final int role)
            throws IOException, DataSourceException, ReportProcessingException
    {
        if (allowBuffering(role))
        {
            startBuffering(new OfficeStylesCollection(), true);
        }
    }
View Full Code Here

        return calculator.getResult();
    }

    protected CSSNumericValue computeRowHeight(final String rowStyle)
    {
        final OfficeStylesCollection contentStyles = getContentStylesCollection();
        final OfficeStyle style = contentStyles.getStyle(OfficeToken.TABLE_ROW, rowStyle);
        if (style != null)
        {
            final Element element = style.getTableRowProperties();
            if (element != null)
            {
                final String height = (String) element.getAttribute(OfficeNamespaces.STYLE_NS, "row-height");
                if (height != null)
                {
                    return parseLength(height);
                }
            }

            final String styleParent = style.getStyleParent();
            if (styleParent != null)
            {
                return computeRowHeight(styleParent);
            }
        }

        final OfficeStylesCollection globalStyles = getGlobalStylesCollection();
        final OfficeStyle globalStyle = globalStyles.getStyle(OfficeToken.TABLE_ROW, rowStyle);
        if (globalStyle != null)
        {
            final Element element = globalStyle.getTableRowProperties();
            if (element != null)
            {
                final String height = (String) element.getAttribute(OfficeNamespaces.STYLE_NS, "row-height");
                if (height != null)
                {
                    return parseLength(height);
                }
            }
            final String styleParent = globalStyle.getStyleParent();
            if (styleParent != null)
            {
                return computeRowHeight(styleParent);
            }
        }

        final OfficeStylesCollection predefStyles = getPredefinedStylesCollection();
        final OfficeStyle predefStyle = predefStyles.getStyle(OfficeToken.TABLE_ROW, rowStyle);
        if (predefStyle != null)
        {
            final Element element = predefStyle.getTableRowProperties();
            if (element != null)
            {
View Full Code Here

        return null;
    }

    protected CSSNumericValue computeColumnWidth(final String colStyle)
    {
        final OfficeStylesCollection contentStyles = getContentStylesCollection();
        final OfficeStyle style = contentStyles.getStyle(OfficeToken.TABLE_COLUMN, colStyle);
        if (style != null)
        {
            final Element element = style.getTableColumnProperties();
            if (element != null)
            {
                final String height = (String) element.getAttribute(OfficeNamespaces.STYLE_NS, "column-width");
                if (height != null)
                {
                    return parseLength(height);
                }
            }

            final String styleParent = style.getStyleParent();
            if (styleParent != null)
            {
                return computeRowHeight(styleParent);
            }
        }

        final OfficeStylesCollection globalStyles = getGlobalStylesCollection();
        final OfficeStyle globalStyle = globalStyles.getStyle(OfficeToken.TABLE_COLUMN, colStyle);
        if (globalStyle != null)
        {
            final Element element = globalStyle.getTableColumnProperties();
            if (element != null)
            {
                final String height = (String) element.getAttribute(OfficeNamespaces.STYLE_NS, "column-width");
                if (height != null)
                {
                    return parseLength(height);
                }
            }
            final String styleParent = globalStyle.getStyleParent();
            if (styleParent != null)
            {
                return computeRowHeight(styleParent);
            }
        }

        final OfficeStylesCollection predefStyles = getPredefinedStylesCollection();
        final OfficeStyle predefStyle = predefStyles.getStyle(OfficeToken.TABLE_COLUMN, colStyle);
        if (predefStyle != null)
        {
            final Element element = predefStyle.getTableColumnProperties();
            if (element != null)
            {
View Full Code Here

  {
    xmlWriter.writeTag
        (OfficeNamespaces.OFFICE_NS, "master-styles", XmlWriterSupport.OPEN);
    for (int sci = 0; sci < osc.length; sci++)
    {
      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);
View Full Code Here

    xmlWriter.writeTag
        (OfficeNamespaces.OFFICE_NS, "styles", XmlWriterSupport.OPEN);

    for (int sci = 0; sci < osc.length; sci++)
    {
      final OfficeStylesCollection collection = osc[sci];
      final OfficeStyles officeStyles = collection.getCommonStyles();
      writeStyles(officeStyles);
    }

    xmlWriter.writeCloseTag();
  }
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.