Exemple #1
0
        /**
         * Constructor called when creating a data validation from the API
         */
        public DVParser(int c1, int r1, int c2, int r2)
        {
            wasCopied  = false;
            type       = LIST;
            errorStyle = STOP;
            condition  = BETWEEN;
            hasExtendedCellsValidation = false;

            // the options
            stringListGiven   = false;
            emptyCellsAllowed = true;
            suppressArrow     = false;
            showPrompt        = true;
            showError         = true;

            promptTitle = "\0";
            errorTitle  = "\0";
            promptText  = "\0";
            errorText   = "\0";
            StringBuilder formulaString = new StringBuilder();

            CellReferenceHelper.getCellReference(c1, r1, formulaString);
            formulaString.Append(':');
            CellReferenceHelper.getCellReference(c2, r2, formulaString);
            formula1String = formulaString.ToString();
        }
        /**
         * To string method - primarily used during debugging
         *
         * @return the string version of this object
         */
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            CellReferenceHelper.getCellReference(column1, row1, sb);
            sb.Append('-');
            CellReferenceHelper.getCellReference(column2, row2, sb);
            return(sb.ToString());
        }