コード例 #1
0
        //.....................................................................
        /// <summary>
        ///
        /// </summary>
        /// <param name="strTextName"></param>
        /// <param name="parameter"></param>
        /// <returns></returns>
        public static M.MathFunction MakeMathFunction(string strTextName, params OpenXmlElement[] parameter)
        {
            M.MathFunction mathFunc = new M.MathFunction( );

            //---------------------------------------------
            M.FunctionProperties funcProperties = new M.FunctionProperties( );
            funcProperties.Append(OpenDocxMathExprs.MakeControlProperties( ));

            //---------------------------------------------
            M.FunctionName funcNaming = OpenDocxMathExprs.MakeFunctionName(strTextName);

            //---------------------------------------------
            M.DelimiterProperties delimProperties = new M.DelimiterProperties( );
            delimProperties.Append(OpenDocxMathExprs.MakeControlProperties(true));

            M.Base mathBaseParms = new M.Base( );
            foreach (OpenXmlElement value in parameter)
            {
                mathBaseParms.Append(value);
            }

            M.Delimiter delimiter = new M.Delimiter( );
            delimiter.Append(delimProperties);
            delimiter.Append(mathBaseParms);

            M.Base funcBase = new M.Base( );
            funcBase.Append(delimiter);

            //---------------------------------------------
            mathFunc.Append(funcProperties);
            mathFunc.Append(funcNaming);
            mathFunc.Append(funcBase);

            return(mathFunc);
        }