Ejemplo n.º 1
0
        /**
         * Used to calculate value that should be encoded at the start of the encoded Ptg token array;
         * @return the size of the encoded Ptg tokens not including any trailing array data.
         */
        public static int GetEncodedSizeWithoutArrayData(Ptg[] ptgs)
        {
            int result = 0;

            for (int i = 0; i < ptgs.Length; i++)
            {
                Ptg ptg = ptgs[i];
                if (ptg is ArrayPtg)
                {
                    result += ArrayPtg.PLAIN_TOKEN_SIZE;
                }
                else
                {
                    result += ptg.Size;
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
 private static bool IsDeletedCellRef(Ptg ptg)
 {
     if (ptg == ErrPtg.REF_INVALID)
     {
         return(true);
     }
     if (ptg is DeletedArea3DPtg)
     {
         return(true);
     }
     if (ptg is DeletedRef3DPtg)
     {
         return(true);
     }
     if (ptg is AreaErrPtg)
     {
         return(true);
     }
     if (ptg is RefErrorPtg)
     {
         return(true);
     }
     return(false);
 }