Exemple #1
0
        internal TCopiedGen DrawingGen; //used when copying to make sure we don't repeat.
        #endregion

        #region Constructor
        internal TWorkbookGlobals(ExcelFile aWorkbook)
        {
            FWorkbook = aWorkbook;

            FFileEncryption = new TFileEncryption();
            FLel            = new TMiscRecordList();
            FBoundSheets    = new TBoundSheetList();
            FFnGroups       = new TMiscRecordList();

            FWorkbookProtection = new TWorkbookProtection();
            FFonts       = new TFontRecordList();
            FFormats     = TFormatRecordList.Create();
            FStyleXF     = new TXFRecordList();
            FCellXF      = new TXFRecordList();
            FDXF         = new TDXFRecordList();
            FStyles      = new TStyleRecordList();
            FTableStyles = new TTableStyleRecordList();

            FPivotCache = new TMiscRecordList();
#if (FRAMEWORK30 && !COMPACTFRAMEWORK)
            FXlsxPivotCache  = new TXlsxPivotCacheList();
            FXlsxConnections = null;
#endif
            FDocRoute  = new TMiscRecordList();
            FUserBView = new TMiscRecordList();

            FMetaData     = new TMiscRecordList();
            FNames        = new TNameRecordList();
            FRealTimeData = new TMiscRecordList();

            FReferences = new TReferences();

            FHeaderImages = new TDrawingGroup(xlr.HEADERIMG, 14);
            FDrawingGroup = new TDrawingGroup(xlr.MSODRAWINGGROUP, 0);

            FSST    = new TSST();
            FWebPub = new TMiscRecordList();

            FFeatHdr = new TMiscRecordList();
            FDConn   = new TMiscRecordList();

            FBorders            = new TBorderList();
            FPatterns           = new TPatternList();
            FFutureRecords      = new TMiscRecordList();
            StylesFutureStorage = null;

            CalcOptions = new TCalcOptions();
            ThemeRecord = new TThemeRecord();

#if (FRAMEWORK30 && !COMPACTFRAMEWORK)
            CustomXMLData = new TCustomXMLDataStorageList();
#endif
        }
Exemple #2
0
        private void ReadCacheSource(TOpenXmlReader DataStream)
        {
            string SourceType = DataStream.GetAttribute("type");

            if (SourceType == "external")
            {
                FRecords.Add(new TXlsxPivotCacheRecord(DataStream.GetXml()));
                return;
            }

            if (DataStream.IsSimpleTag)
            {
                DataStream.NextTag(); return;
            }
            string StartElement = DataStream.RecordName();

            if (!DataStream.NextTag())
            {
                return;
            }

            TCacheSourceRecord R = new TCacheSourceRecord(SourceType, DataStream.GetAttributeAsLong("connectionId", -1));

            FRecords.Add(R);

            while (!DataStream.AtEndElement(StartElement))
            {
                switch (DataStream.RecordName())
                {
                case "consolidation":
                    ReadConsolidation(DataStream, R);
                    break;

                case "worksheetSource":
                    ReadWorksheetSource(DataStream, R);
                    break;

                case "extLst":
                default:
                    TFutureStorage.Add(ref R.FutureStorage, new TFutureStorageRecord(DataStream.GetXml()));
                    break;
                }
            }
        }
Exemple #3
0
        internal void Clear()
        {
            sBOF = null;
            sEOF = null;

            FFileEncryption.Clear();
            FLel.Clear();
            FBoundSheets.Clear();
            FFnGroups.Clear();

            FWorkbookProtection.Clear();
            FFonts.Clear();
            FFormats = TFormatRecordList.Create();
            FStyleXF.Clear();
            FCellXF.Clear();
            FDXF.Clear();
            FStyles.Clear();
            FTableStyles.Clear();

            FPivotCache.Clear();
#if (FRAMEWORK30 && !COMPACTFRAMEWORK)
            FXlsxPivotCache.Clear();
            FXlsxConnections = null;
#endif
            FDocRoute.Clear();
            FUserBView.Clear();

            FMetaData.Clear();
            FNames.Clear();
            FRealTimeData.Clear();

            FReferences.Clear();

            FHeaderImages.Clear();
            FDrawingGroup.Clear();

            FSST.Clear();
            FWebPub.Clear();

            FFeatHdr.Clear();
            FDConn.Clear();

            FBorders.Clear();
            FPatterns.Clear();
            FFutureRecords.Clear();
            StylesFutureStorage = null;

            FIsXltTemplate = false;
            CodePage       = null;
            Excel9File     = null;
            ObjProj        = null;
            ObNoMacros     = null;
            CodeNameRecord = null;

            OleObjectSize = null;

            Window1              = null;
            Backup               = false;
            HideObj              = THideObj.ShowAll;
            Dates1904            = false;
            PrecisionAsDisplayed = false;
            RefreshAll           = false;
            BookBool             = null;


            Palette    = null;
            ClrtClient = null;

            UsesELFs = false;

            MTRSettings          = null;
            ForceFullCalculation = null;

            Country  = null;
            RecalcId = null;
            WOpt     = null;
            BookExt  = null;

            ThemeRecord = new TThemeRecord();

#if (FRAMEWORK30 && !COMPACTFRAMEWORK)
            CustomXMLData.Clear();
#endif

            CalcOptions = new TCalcOptions();

            CompressPictures = null;
            Compat12         = null;
            GUIDTypeLib      = null;

            MruColors = null; //only xlsx

            LoadingInterfaceHdr = false;
        }
Exemple #4
0
 internal void AddStylesFutureStorage(TFutureStorageRecord R)
 {
     TFutureStorage.Add(ref StylesFutureStorage, R);
 }
Exemple #5
0
 internal void AddFutureStorage(TFutureStorageRecord R)
 {
     TFutureStorage.Add(ref FutureStorage, R);
 }
Exemple #6
0
 internal static TFutureStorage Clone(TFutureStorage a)
 {
     return(a);
 }
Exemple #7
0
 internal static void Add(ref TFutureStorage Fs, TFutureStorageRecord R)
 {
 }