コード例 #1
0
        /// <summary>
        /// Set zoom. In the zoom tag inside settings.xml file it sets the value of zoom
        /// </summary>
        /// <param name="zoomPercent"></param>
        /// <example>
        /// sample snippet from Settings.xml
        ///
        /// &lt;w:zoom w:percent="50" /&gt;
        /// </example>
        public void SetZoomPercent(long zoomPercent)
        {
            if (!ctSettings.IsSetZoom())
            {
                ctSettings.AddNewZoom();
            }
            CT_Zoom zoom = ctSettings.zoom;

            zoom.percent = zoomPercent.ToString();
        }
コード例 #2
0
        /**
         * Set zoom.<br/>
         * In the zoom tag inside Settings.xml file <br/>
         * it Sets the value of zoom
         * <br/>
         * sample snippet from Settings.xml
         * <pre>
         *    &lt;w:zoom w:percent="50" /&gt;
         * <pre>
         */
        public void SetZoomPercent(long zoomPercent)
        {
            //if (!ctSettings.IsSetZoom())
            //{
            //    ctSettings.AddNewZoom();
            //}
            CT_Zoom zoom = ctSettings.zoom;

            //zoom.Percent = (BigInt32.ValueOf(zoomPercent));
            zoom.percent = zoomPercent.ToString();
        }
コード例 #3
0
        /**
         * Set zoom.<br/>
         * In the zoom tag inside Settings.xml file <br/>
         * it Sets the value of zoom
         * <br/>
         * sample snippet from Settings.xml
         * <pre>
         *    &lt;w:zoom w:percent="50" /&gt;
         * <pre>
         * @return percentage as an integer of zoom level
         */
        public long GetZoomPercent()
        {
            CT_Zoom zoom = ctSettings.zoom;

            //if (!ctSettings.IsSetZoom())
            //{
            //    zoom = ctSettings.AddNewZoom();
            //}
            //else
            //{
            //    zoom = ctSettings.zoom;
            //}

            return(long.Parse(zoom.percent));
        }
コード例 #4
0
        /**
         * In the zoom tag inside Settings.xml file <br/>
         * it Sets the value of zoom
         * @return percentage as an integer of zoom level
         */
        public long GetZoomPercent()
        {
            CT_Zoom zoom = ctSettings.zoom;

            if (!ctSettings.IsSetZoom())
            {
                zoom = ctSettings.AddNewZoom();
            }
            else
            {
                zoom = ctSettings.zoom;
            }

            return(long.Parse(zoom.percent));
        }
コード例 #5
0
ファイル: XWPFSettings.cs プロジェクト: thachgiasoft/shuijin
        public long GetZoomPercent()
        {
            CT_Zoom zoom = this.ctSettings.zoom;

            return(long.Parse((this.ctSettings.IsSetZoom() ? this.ctSettings.zoom : this.ctSettings.AddNewZoom()).percent));
        }