Пример #1
0
        /**
         * Create a new font formatting structure if it does not exist,
         * otherwise just return existing object.
         *
         * @return - font formatting object, never returns <code>null</code>.
         */
        public IFontFormatting CreateFontFormatting()
        {
            CT_Dxf  dxf = GetDxf(true);
            CT_Font font;

            if (!dxf.IsSetFont())
            {
                font = dxf.AddNewFont();
            }
            else
            {
                font = dxf.font;
            }

            return(new XSSFFontFormatting(font));
        }
        public IFontFormatting CreateFontFormatting()
        {
            CT_Dxf dxf = this.GetDxf(true);

            return((IFontFormatting) new XSSFFontFormatting(dxf.IsSetFont() ? dxf.font : dxf.AddNewFont()));
        }