예제 #1
0
        private bool IsInTable(string cellRef, out PredefinedTableData ptd)
        {
            foreach (KeyValuePair<string, PredefinedTableData> kvp in m_currentTableData)
            {
                ptd = kvp.Value;

                if (ptd.ResolveCurrentCellState(cellRef))
                {
                    m_inTable = true;
                    return true;
                }
            }
            ptd = null;
            return false;
        }
예제 #2
0
        private bool ShouldResolveCellStateBasedOnTableStyle(XmlNodeInformation nodeInfo, XlsxProcessingDictionaries processingDictionaries, out PredefinedTableData ptd)
        {
            string cellRef = nodeInfo.GetAttributeValue("r");

            if (!string.IsNullOrEmpty(cellRef))
            {

                if (m_targetHasChanged)
                {
                    if (processingDictionaries.GetActualTableData(m_currentTarget, out m_currentTableData))
                    {
                        foreach (KeyValuePair<string, PredefinedTableData> kvp in m_currentTableData)
                        {
                            ptd = kvp.Value;

                            if (ptd.ResolveCurrentCellState(cellRef))
                            {
                                m_inTable = true;
                                return true;
                            }
                        }
                    }
                }
                else
                {
                    if (m_currentTableData != null)
                    {
                        return IsInTable(cellRef, out ptd);
                    }
                }
            }

            ptd = null;
            return false;
          }