Example #1
0
        /**
         * Compares the names of the Styles
         * @param compStyle
         */

        public bool HasSameName(XWPFStyle compStyle)
        {
            CT_Style ctCompStyle = compStyle.GetCTStyle();
            String   name        = ctCompStyle.name.val;

            return(name.Equals(ctStyle.name.val));
        }
Example #2
0
        /**
         * add a style to the document
         * @param style
         * @throws IOException
         */

        public void AddStyle(XWPFStyle style)
        {
            listStyle.Add(style);
            ctStyles.AddNewStyle();
            int pos = (ctStyles.GetStyleList().Count) - 1;

            ctStyles.SetStyleArray(pos, style.GetCTStyle());
        }