Example #1
0
        /**
         * Specifies the alignment which shall be applied to the contents of this
         * run.in relation to the default appearance of the run.s text. This allows
         * the text to be repositioned as subscript or superscript without altering
         * the font size of the run.properties.
         * <p/>
         * If this element is not present, the default value is to leave the
         * formatting applied at previous level in the style hierarchy. If this
         * element is never applied in the style hierarchy, then the text shall not
         * be subscript or superscript relative to the default baseline location for
         * the contents of this run.
         * </p>
         *
         * @param valign
         * @see VerticalAlign
         */
        public void SetSubscript(VerticalAlign valign)
        {
            CT_RPr pr = run.IsSetRPr() ? run.rPr : run.AddNewRPr();
            CT_VerticalAlignRun ctValign = pr.IsSetVertAlign() ? pr.vertAlign : pr.AddNewVertAlign();

            ctValign.val = EnumConverter.ValueOf <ST_VerticalAlignRun, VerticalAlign>(valign);
        }
Example #2
0
        /**
         * Specifies the alignment which shall be applied to the contents of this
         * run.in relation to the default appearance of the run.s text.
         * This allows the text to be repositioned as subscript or superscript without
         * altering the font size of the run.properties.
         *
         * @return VerticalAlign
         * @see VerticalAlign all possible value that could be Applyed to this run
         */
        public VerticalAlign GetSubscript()
        {
            CT_RPr pr = run.rPr;

            return((pr != null && pr.IsSetVertAlign()) ?
                   EnumConverter.ValueOf <VerticalAlign, ST_VerticalAlignRun>(pr.vertAlign.val) : VerticalAlign.BASELINE);
        }
Example #3
0
        public VerticalAlign GetSubscript()
        {
            CT_RPr rPr = this.run.rPr;

            if (rPr == null || !rPr.IsSetVertAlign())
            {
                return(VerticalAlign.BASELINE);
            }
            return(EnumConverter.ValueOf <VerticalAlign, ST_VerticalAlignRun>(rPr.vertAlign.val));
        }
Example #4
0
        public void SetSubscript(VerticalAlign valign)
        {
            CT_RPr ctRpr = this.run.IsSetRPr() ? this.run.rPr : this.run.AddNewRPr();

            (ctRpr.IsSetVertAlign() ? ctRpr.vertAlign : ctRpr.AddNewVertAlign()).val = EnumConverter.ValueOf <ST_VerticalAlignRun, VerticalAlign>(valign);
        }