Esempio n. 1
0
 internal TLabelSSTRecord(int aCol, int aXF, TSST aSST, IFlexCelFontList aFontList, object Value)
     : base((int)xlr.LABELSST, aCol, aXF)
 {
     SST       = aSST;
     FontList  = aFontList;
     pSSTEntry = null;
     AsString  = FlxConvert.ToStringWithArrays(Value);
 }
Esempio n. 2
0
 internal TLabelSSTRecord(int aCol, int aXF, TSST aSST, IFlexCelFontList aFontList, TRichString Value)
     : base((int)xlr.LABELSST, aCol, aXF)
 {
     SST          = aSST;
     FontList     = aFontList;
     pSSTEntry    = null;
     AsRichString = Value;
 }
Esempio n. 3
0
 internal TXlsRecordLoader(TOle2File aDataStream, TBiff8XFMap aXFMap, TSST aSST, IFlexCelFontList aFontList, TBorderList aBorderList,
                           TPatternList aPatternList, TEncryptionData aEncryption, TXlsBiffVersion aXlsBiffVersion, TNameRecordList aNames, TVirtualReader VirtualReader)
     : base(aSST, aFontList, aEncryption, aXlsBiffVersion, aXFMap, aNames, VirtualReader)
 {
     DataStream  = aDataStream;
     BorderList  = aBorderList;
     PatternList = aPatternList;
 }
Esempio n. 4
0
 /// <summary>
 /// Should be called before we release SST.IndexData
 /// </summary>
 /// <param name="aSST"></param>
 /// <param name="index"></param>
 /// <param name="aFontList"></param>
 private void AttachToSST(long index, TSST aSST, IFlexCelFontList aFontList)
 {
     if (aSST == null || aFontList == null || index >= aSST.IndexData.Count)
     {
         XlsMessages.ThrowException(XlsErr.ErrExcelInvalid);
     }
     SST       = aSST;
     pSSTEntry = SST.IndexData[(int)index];
     pSSTEntry.AddRef();
     FontList = aFontList;
 }
Esempio n. 5
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
        }
Esempio n. 6
0
 protected TBaseRecordLoader(TSST aSST, IFlexCelFontList aFontList, TEncryptionData aEncryption, TXlsBiffVersion aXlsBiffVersion,
                             TBiff8XFMap aXFMap, TNameRecordList aNames, TVirtualReader aVirtualReader)
 {
     RecordHeader   = new TRecordHeader();
     SST            = aSST;
     FontList       = aFontList;
     Encryption     = aEncryption;
     XlsBiffVersion = aXlsBiffVersion;
     XFMap          = aXFMap;
     Names          = aNames;
     VirtualReader  = aVirtualReader;
 }
Esempio n. 7
0
        internal static TLabelSSTRecord CreateFromOtherString(int aCol, int aXF, TSST aSST, IFlexCelFontList aFontList, object Value)
        {
            TRichString rs = Value as TRichString;

            if (rs != null && rs.RTFRunCount > 0)
            {
                return(new TLabelSSTRecord(aCol, aXF, aSST, aFontList, rs));
            }
            else
            {
                return(new TLabelSSTRecord(aCol, aXF, aSST, aFontList, FlxConvert.ToStringWithArrays(Value)));
            }
        }
Esempio n. 8
0
        internal TPxlRecordLoader(Stream aDataStream, TExternSheetList aExternSheetList,
                                  TEncryptionData aEncryption, TSST aSST, IFlexCelFontList aFontList, TBorderList aBorderList,
                                  TPatternList aPatternList, ExcelFile aWorkbook, TBiff8XFMap aXFMap, int aMainBookXFCount, TNameRecordList aNames, TVirtualReader VirtualReader)
            : base(aSST, aFontList, aEncryption, aWorkbook.XlsBiffVersion, aXFMap, aNames, VirtualReader)
        {
            DataStream         = aDataStream;
            FExternSheetList   = aExternSheetList;
            FormatId           = 233;
            FWorkbook          = aWorkbook;
            BorderList         = aBorderList;
            PatternList        = aPatternList;
            DataStreamLength   = DataStream.Length;
            DataStreamPosition = DataStream.Position;  //cached for performance.

            MainBookXFCount = aMainBookXFCount;
        }
Esempio n. 9
0
        internal void MergeFromPxlGlobals(TWorkbookGlobals SourceGlobals)
        {
            sBOF         = SourceGlobals.sBOF;
            FSST         = SourceGlobals.FSST;
            FReferences  = SourceGlobals.FReferences;
            FBoundSheets = SourceGlobals.FBoundSheets;

            //Pxl doesn't have styles.
            CellXF.MergeFromPxlXF(SourceGlobals.CellXF, Fonts.Count - 1, this, SourceGlobals);  //-1 because fonts[0] will be merged
            FFonts.MergeFromPxlFont(SourceGlobals.Fonts);
            //Formats are added in FXF.Merge

            FNames  = SourceGlobals.FNames;
            Window1 = SourceGlobals.Window1;

            CodePage = SourceGlobals.CodePage;
            Country  = SourceGlobals.Country;
        }
Esempio n. 10
0
        private void EndLoading(TProtection Protection, TEncryptionData Encryption, TSST SST)
        {
            // References from LABELSST to SST have been loaded, we can sort
            // Globals.SST.Sort(); Not needed here, we are using a hash and entries are automatically sorted.
            SST.ClearIndexData(); //All labelSST records have been loaded. We can go on...

            //now we can safely sort, all BSEs are pointers, no integers
            if (Globals.DrawingGroup.RecordCache.BStore != null)
            {
                Globals.DrawingGroup.RecordCache.BStore.ContainedRecords.Sort();
            }

            FixRows();
            if (Encryption != null)
            {
                Protection.OpenPassword = Encryption.ReadPassword;                     //The read password might have been modified if the event was used.
            }
            Loaded = true;
        }
Esempio n. 11
0
 internal TLabelSSTRecord(int aCol, int aXF, long aPos, TSST aSST, IFlexCelFontList aFontList)
     : base((int)xlr.LABELSST, aCol, aXF)
 {
     AttachToSST(aPos, aSST, aFontList);
 }
Esempio n. 12
0
 internal TLabelSSTRecord(int aId, byte[] aData, TSST aSST, IFlexCelFontList aFontList, TBiff8XFMap XFMap)
     : base(aId, aData, XFMap)
 {
     AttachToSST(BitOps.GetCardinal(aData, 6), aSST, aFontList);
 }
Esempio n. 13
0
 protected TBinRecordLoader(TSST aSST, IFlexCelFontList aFontList, TEncryptionData aEncryption,
                            TXlsBiffVersion aXlsBiffVersion, TBiff8XFMap aXFMap, TNameRecordList aNames, TVirtualReader aVirtualReader)
     : base(aSST, aFontList, aEncryption, aXlsBiffVersion, aXFMap, aNames, aVirtualReader)
 {
 }