From 2fdcd75eabb7453302920da796b80ffc23de80bc Mon Sep 17 00:00:00 2001 From: Vladimir Gorshenkov Date: Mon, 20 Dec 2021 20:02:19 +0300 Subject: [PATCH] [xlsb] fix bugs and add chart sheet (records, unions, fill inside objects) --- .../source/XlsFormat/Logic/Biff_records/Dv.h | 2 +- .../XlsFormat/Logic/Biff_records/Setup.cpp | 51 ++- .../XlsFormat/Logic/Biff_records/Setup.h | 6 +- .../XlsFormat/Logic/Biff_records/Window2.cpp | 58 ++- .../XlsFormat/Logic/Biff_records/Window2.h | 6 +- .../source/XlsFormat/Logic/XlsElementsType.h | 17 +- .../DocxFormatLib/XlsbFormatLib.pro | 46 +- .../Biff12_records/BeginCsViews.cpp | 58 +++ .../XlsbFormat/Biff12_records/BeginCsViews.h | 54 +++ .../Biff12_records/BeginUserCsView.cpp | 67 +++ .../Biff12_records/BeginUserCsView.h | 60 +++ .../Biff12_records/BeginUserCsViews.cpp | 59 +++ .../Biff12_records/BeginUserCsViews.h | 55 +++ .../Biff12_records/BeginWebPubItem.cpp | 84 ++++ .../Biff12_records/BeginWebPubItem.h | 70 +++ .../Biff12_records/BeginWebPubItems.cpp | 59 +++ .../Biff12_records/BeginWebPubItems.h | 57 +++ .../XlsbFormat/Biff12_records/CommonRecords.h | 67 ++- .../XlsbFormat/Biff12_records/CsProp.cpp | 65 +++ .../Source/XlsbFormat/Biff12_records/CsProp.h | 62 +++ .../Biff12_records/CsProtection.cpp | 60 +++ .../XlsbFormat/Biff12_records/CsProtection.h | 62 +++ .../Biff12_records/CsProtectionIso.cpp | 61 +++ .../Biff12_records/CsProtectionIso.h | 62 +++ .../XlsbFormat/Biff12_records/EndCsView.cpp | 59 +++ .../XlsbFormat/Biff12_records/EndCsView.h | 56 +++ .../XlsbFormat/Biff12_records/EndCsViews.cpp | 59 +++ .../XlsbFormat/Biff12_records/EndCsViews.h | 56 +++ .../Biff12_records/EndUserCsView.cpp | 59 +++ .../XlsbFormat/Biff12_records/EndUserCsView.h | 55 +++ .../Biff12_records/EndUserCsViews.cpp | 59 +++ .../Biff12_records/EndUserCsViews.h | 55 +++ .../Biff12_records/EndWebPubItem.cpp | 59 +++ .../XlsbFormat/Biff12_records/EndWebPubItem.h | 55 +++ .../Biff12_records/EndWebPubItems.cpp | 59 +++ .../Biff12_records/EndWebPubItems.h | 55 +++ .../Biff12_records/SheetProtection.h | 2 + .../Biff12_records/SheetProtectionIso.h | 2 + .../Source/XlsbFormat/Biff12_records/WsProp.h | 2 + .../XlsbFormat/Biff12_structures/Tws.cpp | 46 ++ .../Source/XlsbFormat/Biff12_structures/Tws.h | 59 +++ .../XlsbFormat/Biff12_unions/CSVIEW.cpp | 91 ++++ .../Source/XlsbFormat/Biff12_unions/CSVIEW.h | 60 +++ .../XlsbFormat/Biff12_unions/CSVIEWS.cpp | 94 ++++ .../Source/XlsbFormat/Biff12_unions/CSVIEWS.h | 60 +++ .../XlsbFormat/Biff12_unions/USERCSVIEW.cpp | 95 +++++ .../XlsbFormat/Biff12_unions/USERCSVIEW.h | 59 +++ .../XlsbFormat/Biff12_unions/USERCSVIEWS.cpp | 83 ++++ .../XlsbFormat/Biff12_unions/USERCSVIEWS.h | 57 +++ .../XlsbFormat/Biff12_unions/WEBPUBITEM.cpp | 74 ++++ .../XlsbFormat/Biff12_unions/WEBPUBITEM.h | 56 +++ .../XlsbFormat/Biff12_unions/WEBPUBITEMS.cpp | 83 ++++ .../XlsbFormat/Biff12_unions/WEBPUBITEMS.h | 57 +++ .../Source/XlsbFormat/Biff12_unions/WSVIEW2.h | 4 +- .../XlsbFormat/Biff12_unions/WSVIEWS2.h | 2 + .../Source/XlsbFormat/ChartSheetStream.cpp | 227 ++++++++++ .../Source/XlsbFormat/ChartSheetStream.h | 87 ++++ .../XlsxFormat/FileFactory_Spreadsheet.cpp | 6 +- .../XlsxFormat/Worksheets/Worksheet.cpp | 179 +++++--- .../Source/XlsxFormat/Worksheets/Worksheet.h | 5 +- .../Worksheets/WorksheetChildOther.h | 402 ++++++++++++------ 61 files changed, 3567 insertions(+), 259 deletions(-) create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginCsViews.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginCsViews.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsView.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsView.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsViews.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsViews.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItem.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItem.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItems.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItems.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProp.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProp.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtection.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtection.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtectionIso.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtectionIso.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsView.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsView.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsViews.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsViews.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsView.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsView.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsViews.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsViews.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItem.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItem.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItems.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItems.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_structures/Tws.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_structures/Tws.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEW.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEW.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEWS.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEWS.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEW.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEW.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEWS.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEWS.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEM.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEM.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.h create mode 100644 Common/DocxFormat/Source/XlsbFormat/ChartSheetStream.cpp create mode 100644 Common/DocxFormat/Source/XlsbFormat/ChartSheetStream.h diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.h b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.h index 29e9f05d57..3a193ede2a 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.h +++ b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.h @@ -72,7 +72,7 @@ public: void readFields(CFRecord& record); - static const ElementType type = typeDv; + static const ElementType type = typeDv; int serialize(std::wostream & stream); diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.cpp b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.cpp index 2aa59962c0..1e047503de 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.cpp +++ b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.cpp @@ -32,13 +32,14 @@ #include "Setup.h" #include "../../../../../Common/DocxFormat/Source/XlsbFormat/Biff12_structures/XLWideString.h" +#include "../../../../../Common/DocxFormat/Source/XlsbFormat/Biff12_structures/RelID.h" namespace XLS { -Setup::Setup() +Setup::Setup(bool isChart) // the following may appear uninitialized but we have to store them -: iPaperSize(0), iScale(255), iRes(0), iVRes(0), iCopies(0), fNoOrient(false), fPortrait(false), iPageStart(1), iErrors(0) +: _isChart(isChart), iPaperSize(0), iScale(255), iRes(0), iVRes(0), iCopies(0), fNoOrient(false), fPortrait(false), iPageStart(1), iErrors(0) { } @@ -94,21 +95,41 @@ void Setup::readFields(CFRecord& record) } else { - record >> iPaperSize >> iScale >> iRes >> iVRes >> iCopies >> iPageStart >> iFitWidth >> iFitHeight >> flags; + if(_isChart) + { + _INT16 iPageStart_2b; + record >> iPaperSize >> iRes >> iVRes >> iCopies >> iPageStart_2b >> flags; - fLeftToRight = GETBIT(flags, 0); - fLandscape = GETBIT(flags, 1); - fNoColor = GETBIT(flags, 3); - fDraft = GETBIT(flags, 4); - fNotes = GETBIT(flags, 5); - fNoOrient = GETBIT(flags, 6); - fUsePage = GETBIT(flags, 7); - fEndNotes = GETBIT(flags, 8); - iErrors = GETBITS(flags, 9, 10); + iPageStart = iPageStart_2b; - XLSB::XLNullableWideString str; - record >> str; - szRelID = str.value(); + fLandscape = GETBIT(flags, 0); + fNoColor = GETBIT(flags, 2); + fNoOrient = GETBIT(flags, 3); + fUsePage = GETBIT(flags, 4); + fDraft = GETBIT(flags, 5); + + XLSB::RelID str; + record >> str; + szRelID = str.value.value(); + } + else + { + record >> iPaperSize >> iScale >> iRes >> iVRes >> iCopies >> iPageStart >> iFitWidth >> iFitHeight >> flags; + + fLeftToRight = GETBIT(flags, 0); + fLandscape = GETBIT(flags, 1); + fNoColor = GETBIT(flags, 3); + fDraft = GETBIT(flags, 4); + fNotes = GETBIT(flags, 5); + fNoOrient = GETBIT(flags, 6); + fUsePage = GETBIT(flags, 7); + fEndNotes = GETBIT(flags, 8); + iErrors = GETBITS(flags, 9, 10); + + XLSB::XLNullableWideString str; + record >> str; + szRelID = str.value(); + } } } diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.h b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.h index 4c279cc07b..420c5c65d6 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.h +++ b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.h @@ -42,14 +42,14 @@ class Setup: public BiffRecord BIFF_RECORD_DEFINE_TYPE_INFO(Setup) BASE_OBJECT_DEFINE_CLASS_NAME(Setup) public: - Setup(); + Setup(bool isChart = false); ~Setup(); BaseObjectPtr clone(); void readFields(CFRecord& record); - static const ElementType type = typeSetup; + static const ElementType type = typeSetup; //----------------------------- _UINT32 iPaperSize; @@ -78,6 +78,8 @@ public: std::wstring szRelID; // biff12 bool fLandscape; // biff12 + bool _isChart; + }; } // namespace XLS diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Window2.cpp b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Window2.cpp index 14604ffdf0..515e4475fe 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Window2.cpp +++ b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Window2.cpp @@ -35,7 +35,7 @@ namespace XLS { -Window2::Window2() +Window2::Window2(bool isChart) { is_contained_in_chart_substream = false; @@ -53,6 +53,8 @@ Window2::Window2() fSLV = false; wScaleSLV = wScaleNormal = 0; + + _isChart = isChart; } @@ -119,33 +121,47 @@ void Window2::readFields(CFRecord& record) else { + if(_isChart) + { + _UINT16 flags; + _UINT32 wScale_4b; - unsigned short flags; - record >> flags; + record >> flags; - fWnProt = GETBIT(flags, 0); - fDspFmlaRt = GETBIT(flags, 1); - fDspGridRt = GETBIT(flags, 2); - fDspRwColRt = GETBIT(flags, 3); - fDspZerosRt = GETBIT(flags, 4); - fRightToLeft = GETBIT(flags, 5); - fSelected = GETBIT(flags, 6); - fDspRuler = GETBIT(flags, 7); - fDspGuts = GETBIT(flags, 8); - fDefaultHdr = GETBIT(flags, 9); - fWhitespaceHidden = GETBIT(flags, 10); + fSelected = GETBIT(flags, 0); - record >> xlView >> rwTop >> colLeft; + record >> wScale_4b >> iWbkView; + wScale = wScale_4b; + } + else + { + unsigned short flags; + record >> flags; - topLeftCell = static_cast(CellRef(rwTop, colLeft, true, true)); + fWnProt = GETBIT(flags, 0); + fDspFmlaRt = GETBIT(flags, 1); + fDspGridRt = GETBIT(flags, 2); + fDspRwColRt = GETBIT(flags, 3); + fDspZerosRt = GETBIT(flags, 4); + fRightToLeft = GETBIT(flags, 5); + fSelected = GETBIT(flags, 6); + fDspRuler = GETBIT(flags, 7); + fDspGuts = GETBIT(flags, 8); + fDefaultHdr = GETBIT(flags, 9); + fWhitespaceHidden = GETBIT(flags, 10); - BYTE icvHdr_1b; - record >> icvHdr_1b; - icvHdr = icvHdr_1b; + record >> xlView >> rwTop >> colLeft; - record.skipNunBytes(3); // reserved + topLeftCell = static_cast(CellRef(rwTop, colLeft, true, true)); - record >> wScale >> wScaleNormal >> wScaleSLV >> wScalePLV >> iWbkView; + BYTE icvHdr_1b; + record >> icvHdr_1b; + icvHdr = icvHdr_1b; + + record.skipNunBytes(3); // reserved + + record >> wScale >> wScaleNormal >> wScaleSLV >> wScalePLV >> iWbkView; + } } } diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Window2.h b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Window2.h index 7b6a574c3e..d998fc6cb5 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Window2.h +++ b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Window2.h @@ -43,14 +43,14 @@ class Window2: public BiffRecord BIFF_RECORD_DEFINE_TYPE_INFO(Window2) BASE_OBJECT_DEFINE_CLASS_NAME(Window2) public: - Window2(); + Window2(bool isChart = false); ~Window2(); BaseObjectPtr clone(); void readFields(CFRecord& record); - static const ElementType type = typeWindow2; + static const ElementType type = typeWindow2; bool fDspFmlaRt; //fDspFmla in biff12 bool fDspGridRt; //fDspGrid in biff12 @@ -89,6 +89,8 @@ public: _UINT16 wScalePLV; _UINT32 iWbkView; + bool _isChart; + }; } // namespace XLS diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Logic/XlsElementsType.h b/ASCOfficeXlsFile2/source/XlsFormat/Logic/XlsElementsType.h index 959d7a2ae4..24b4e18f63 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Logic/XlsElementsType.h +++ b/ASCOfficeXlsFile2/source/XlsFormat/Logic/XlsElementsType.h @@ -739,7 +739,7 @@ enum ElementType typeOfficeArtSplitMenuColorContainer, typeOfficeArtTertiaryFOPT, typeOfficeArtClientData, - typeOfficeArtClientTextbox, + typeOfficeArtClientTextbox, //xlsb static const XLS::ElementType type = XLS::typeSLICERCACHEOLAPIMPL; typeCONDITIONALFORMATTING = 4000, @@ -817,6 +817,21 @@ enum ElementType typeBeginColBrk, typeRangeProtection, typeRangeProtectionIso, + typeCsProtection, + typeCsProtectionIso, + typeSheetProtection, + typeSheetProtectionIso, + typeCSVIEWS, + typeCSVIEW, + typeBeginCsView, + typeWSVIEWS2, + typeWSVIEW2, + typeBeginWsView, + typeCsPageSetup, + typePageSetup, + typeCsProp, + typeWsProp, + }; diff --git a/Common/DocxFormat/DocxFormatLib/XlsbFormatLib.pro b/Common/DocxFormat/DocxFormatLib/XlsbFormatLib.pro index 0b8288fd7f..fbbcc04769 100644 --- a/Common/DocxFormat/DocxFormatLib/XlsbFormatLib.pro +++ b/Common/DocxFormat/DocxFormatLib/XlsbFormatLib.pro @@ -1,6 +1,6 @@ #------------------------------------------------- # -# Project created by QtCreator 2014-07-03T15:22:54 +# Project created by QtCreator 2ChartSheetStream014-07-03T15:22:54 # #------------------------------------------------- @@ -40,6 +40,7 @@ SOURCES += \ ../Source/XlsbFormat/ConnectionsStream.cpp \ ../Source/XlsbFormat/SlicersStream.cpp \ ../Source/XlsbFormat/SlicerCachesStream.cpp \ + ../Source/XlsbFormat/ChartSheetStream.cpp \ ### Biff12_records ../Source/XlsbFormat/Biff12_records/BeginBook.cpp \ ../Source/XlsbFormat/Biff12_records/FRTBegin.cpp \ @@ -394,6 +395,20 @@ SOURCES += \ ../Source/XlsbFormat/Biff12_records/BeginDRefs.cpp \ ../Source/XlsbFormat/Biff12_records/DRef.cpp \ ../Source/XlsbFormat/Biff12_records/EndDRefs.cpp \ + ../Source/XlsbFormat/Biff12_records/CsProp.cpp \ + ../Source/XlsbFormat/Biff12_records/CsProtection.cpp \ + ../Source/XlsbFormat/Biff12_records/CsProtectionIso.cpp \ + ../Source/XlsbFormat/Biff12_records/BeginCsViews.cpp \ + ../Source/XlsbFormat/Biff12_records/EndCsViews.cpp \ + ../Source/XlsbFormat/Biff12_records/EndCsView.cpp \ + ../Source/XlsbFormat/Biff12_records/BeginUserCsViews.cpp \ + ../Source/XlsbFormat/Biff12_records/EndUserCsViews.cpp \ + ../Source/XlsbFormat/Biff12_records/BeginUserCsView.cpp \ + ../Source/XlsbFormat/Biff12_records/EndUserCsView.cpp \ + ../Source/XlsbFormat/Biff12_records/BeginWebPubItems.cpp \ + ../Source/XlsbFormat/Biff12_records/EndWebPubItems.cpp \ + ../Source/XlsbFormat/Biff12_records/BeginWebPubItem.cpp \ + ../Source/XlsbFormat/Biff12_records/EndWebPubItem.cpp \ ### Biff12_structures ../Source/XlsbFormat/Biff12_structures/LPByteBuf.cpp \ ../Source/XlsbFormat/Biff12_structures/IsoPasswordData.cpp \ @@ -447,6 +462,7 @@ SOURCES += \ ../Source/XlsbFormat/Biff12_structures/SlicerCacheNativeItemStruct.cpp \ ../Source/XlsbFormat/Biff12_structures/SlicerCacheLevelData.cpp \ ../Source/XlsbFormat/Biff12_structures/RangeProtectionTitleSDRel.cpp \ + ../Source/XlsbFormat/Biff12_structures/Tws.cpp \ ### Biff12_unions ../Source/XlsbFormat/Biff12_unions/FRT.cpp \ ../Source/XlsbFormat/Biff12_unions/ACUID.cpp \ @@ -612,6 +628,12 @@ SOURCES += \ ../Source/XlsbFormat/Biff12_unions/COLBRK.cpp \ ../Source/XlsbFormat/Biff12_unions/DCON.cpp \ ../Source/XlsbFormat/Biff12_unions/DREFS.cpp \ + ../Source/XlsbFormat/Biff12_unions/CSVIEWS.cpp \ + ../Source/XlsbFormat/Biff12_unions/CSVIEW.cpp \ + ../Source/XlsbFormat/Biff12_unions/USERCSVIEWS.cpp \ + ../Source/XlsbFormat/Biff12_unions/USERCSVIEW.cpp \ + ../Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.cpp \ + ../Source/XlsbFormat/Biff12_unions/WEBPUBITEM.cpp \ } HEADERS += \ ../Source/XlsbFormat/CommentsStream.h \ @@ -624,6 +646,7 @@ HEADERS += \ ../Source/XlsbFormat/ConnectionsStream.h \ ../Source/XlsbFormat/SlicersStream.h \ ../Source/XlsbFormat/SlicerCachesStream.h \ + ../Source/XlsbFormat/ChartSheetStream.h \ ../Source/XlsbFormat/Xlsb.h \ ../Source/XlsbFormat/XlsbElementsType.h \ ### Biff12_records @@ -984,6 +1007,20 @@ HEADERS += \ ../Source/XlsbFormat/Biff12_records/BeginDRefs.h \ ../Source/XlsbFormat/Biff12_records/DRef.h \ ../Source/XlsbFormat/Biff12_records/EndDRefs.h \ + ../Source/XlsbFormat/Biff12_records/CsProp.h \ + ../Source/XlsbFormat/Biff12_records/CsProtection.h \ + ../Source/XlsbFormat/Biff12_records/CsProtectionIso.h \ + ../Source/XlsbFormat/Biff12_records/BeginCsViews.h \ + ../Source/XlsbFormat/Biff12_records/EndCsViews.h \ + ../Source/XlsbFormat/Biff12_records/EndCsView.h \ + ../Source/XlsbFormat/Biff12_records/BeginUserCsViews.h \ + ../Source/XlsbFormat/Biff12_records/EndUserCsViews.h \ + ../Source/XlsbFormat/Biff12_records/BeginUserCsView.h \ + ../Source/XlsbFormat/Biff12_records/EndUserCsView.h \ + ../Source/XlsbFormat/Biff12_records/BeginWebPubItems.h \ + ../Source/XlsbFormat/Biff12_records/EndWebPubItems.h \ + ../Source/XlsbFormat/Biff12_records/BeginWebPubItem.h \ + ../Source/XlsbFormat/Biff12_records/EndWebPubItem.h \ ### Biff12_structures ../Source/XlsbFormat/Biff12_structures/ACProductVersion.h \ ../Source/XlsbFormat/Biff12_structures/Blxf.h \ @@ -1040,6 +1077,7 @@ HEADERS += \ ../Source/XlsbFormat/Biff12_structures/SlicerCacheNativeItemStruct.h \ ../Source/XlsbFormat/Biff12_structures/SlicerCacheLevelData.h \ ../Source/XlsbFormat/Biff12_structures/RangeProtectionTitleSDRel.h \ + ../Source/XlsbFormat/Biff12_structures/Tws.h \ ### Biff12_unions ../Source/XlsbFormat/Biff12_unions/ACABSPATH.h \ ../Source/XlsbFormat/Biff12_unions/ACCELLTABLE.h \ @@ -1205,3 +1243,9 @@ HEADERS += \ ../Source/XlsbFormat/Biff12_unions/COLBRK.h \ ../Source/XlsbFormat/Biff12_unions/DCON.h \ ../Source/XlsbFormat/Biff12_unions/DREFS.h \ + ../Source/XlsbFormat/Biff12_unions/CSVIEWS.h \ + ../Source/XlsbFormat/Biff12_unions/CSVIEW.h \ + ../Source/XlsbFormat/Biff12_unions/USERCSVIEWS.h \ + ../Source/XlsbFormat/Biff12_unions/USERCSVIEW.h \ + ../Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.h \ + ../Source/XlsbFormat/Biff12_unions/WEBPUBITEM.h \ diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginCsViews.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginCsViews.cpp new file mode 100644 index 0000000000..78d68642c4 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginCsViews.cpp @@ -0,0 +1,58 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "BeginCsViews.h" + +using namespace XLS; + +namespace XLSB +{ + + BeginCsViews::BeginCsViews() + { + } + + BeginCsViews::~BeginCsViews() + { + } + + BaseObjectPtr BeginCsViews::clone() + { + return BaseObjectPtr(new BeginCsViews(*this)); + } + + void BeginCsViews::readFields(XLS::CFRecord& record) + { + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginCsViews.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginCsViews.h new file mode 100644 index 0000000000..846a2cf822 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginCsViews.h @@ -0,0 +1,54 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + +namespace XLSB +{ + // Logical representation of BrtBeginCsViews record in BIFF12 + class BeginCsViews: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(BeginCsViews) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginCsViews) + public: + BeginCsViews(); + virtual ~BeginCsViews(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsView.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsView.cpp new file mode 100644 index 0000000000..f867f94641 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsView.cpp @@ -0,0 +1,67 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "BeginUserCsView.h" + +using namespace XLS; + +namespace XLSB +{ + + BeginUserCsView::BeginUserCsView() + { + } + + BeginUserCsView::~BeginUserCsView() + { + } + + BaseObjectPtr BeginUserCsView::clone() + { + return BaseObjectPtr(new BeginUserCsView(*this)); + } + + void BeginUserCsView::readFields(XLS::CFRecord& record) + { + _GUID_ guid_; + _UINT32 flags; + + record >> guid_ >> iTabId >> dwScale >> flags; + + guid = STR::guid2bstr(guid_); + + hsState = GETBITS(flags, 0, 1); + fZoomToFit = GETBIT(flags, 2); + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsView.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsView.h new file mode 100644 index 0000000000..cf42a83126 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsView.h @@ -0,0 +1,60 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + +namespace XLSB +{ + // Logical representation of BrtBeginUserCsView record in BIFF12 + class BeginUserCsView: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(BeginUserCsView) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginUserCsView) + public: + BeginUserCsView(); + virtual ~BeginUserCsView(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + std::wstring guid; + _UINT32 iTabId; + _UINT32 dwScale; + BYTE hsState; + bool fZoomToFit; + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsViews.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsViews.cpp new file mode 100644 index 0000000000..5c24243280 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsViews.cpp @@ -0,0 +1,59 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "BeginUserCsViews.h" + +using namespace XLS; + +namespace XLSB +{ + + BeginUserCsViews::BeginUserCsViews() + { + } + + BeginUserCsViews::~BeginUserCsViews() + { + } + + BaseObjectPtr BeginUserCsViews::clone() + { + return BaseObjectPtr(new BeginUserCsViews(*this)); + } + + void BeginUserCsViews::readFields(XLS::CFRecord& record) + { + // No data in this record + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsViews.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsViews.h new file mode 100644 index 0000000000..3e47b2db17 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginUserCsViews.h @@ -0,0 +1,55 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + +namespace XLSB +{ + // Logical representation of BrtBeginUserCsViews record in BIFF12 + class BeginUserCsViews: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(BeginUserCsViews) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginUserCsViews) + public: + BeginUserCsViews(); + virtual ~BeginUserCsViews(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItem.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItem.cpp new file mode 100644 index 0000000000..13145c267b --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItem.cpp @@ -0,0 +1,84 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "BeginWebPubItem.h" + +using namespace XLS; + +namespace XLSB +{ + + BeginWebPubItem::BeginWebPubItem() + { + } + + BeginWebPubItem::~BeginWebPubItem() + { + } + + BaseObjectPtr BeginWebPubItem::clone() + { + return BaseObjectPtr(new BeginWebPubItem(*this)); + } + + void BeginWebPubItem::readFields(XLS::CFRecord& record) + { + _UINT32 flags1; + BYTE flags2; + record >> tws; + + fAutoRepublish = GETBIT(flags1, 1); + fMhtml = GETBIT(flags1, 3); + + record >> nStyleId; + + if(tws.value().get() == Tws::TWSREF) + record >> rfx; + else + record.skipNunBytes(16); + + fName = GETBIT(flags2, 1); + fTitle = GETBIT(flags2, 3); + + record >> stBkmk; + + if(fName) + record >> stBkmk; + + record >> stFile; + + if(fTitle) + record >> stTitle; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItem.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItem.h new file mode 100644 index 0000000000..1da826ed43 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItem.h @@ -0,0 +1,70 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" +#include "../Biff12_structures/Tws.h" +#include "../Biff12_structures/CellRangeRef.h" +#include "../Biff12_structures/XLWideString.h" + +namespace XLSB +{ + // Logical representation of BrtBeginWebPubItem record in BIFF12 + class BeginWebPubItem: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(BeginWebPubItem) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginWebPubItem) + public: + BeginWebPubItem(); + virtual ~BeginWebPubItem(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + Tws tws; + bool fAutoRepublish; + bool fMhtml; + _UINT32 nStyleId; + UncheckedRfX rfx; + bool fName; + bool fTitle; + XLWideString stBkmk; + XLNameWideString stName; + XLWideString stFile; + XLWideString stTitle; + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItems.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItems.cpp new file mode 100644 index 0000000000..d25102b400 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItems.cpp @@ -0,0 +1,59 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "BeginWebPubItems.h" + +using namespace XLS; + +namespace XLSB +{ + + BeginWebPubItems::BeginWebPubItems() + { + } + + BeginWebPubItems::~BeginWebPubItems() + { + } + + BaseObjectPtr BeginWebPubItems::clone() + { + return BaseObjectPtr(new BeginWebPubItems(*this)); + } + + void BeginWebPubItems::readFields(XLS::CFRecord& record) + { + record >> cItems; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItems.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItems.h new file mode 100644 index 0000000000..76b1839563 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/BeginWebPubItems.h @@ -0,0 +1,57 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + +namespace XLSB +{ + // Logical representation of BrtBeginWebPubItems record in BIFF12 + class BeginWebPubItems: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(BeginWebPubItems) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginWebPubItems) + public: + BeginWebPubItems(); + virtual ~BeginWebPubItems(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + _UINT32 cItems; + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CommonRecords.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CommonRecords.h index bc6d3763bf..07932b552e 100644 --- a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CommonRecords.h +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CommonRecords.h @@ -69,6 +69,7 @@ namespace XLSB class FileSharing: public XLS::FileSharing { BIFF_RECORD_DEFINE_TYPE_INFO(FileSharing) + BASE_OBJECT_DEFINE_CLASS_NAME(FileSharing) XLS::BaseObjectPtr clone() override { @@ -80,6 +81,7 @@ namespace XLSB class ExternSheet: public XLS::ExternSheet { BIFF_RECORD_DEFINE_TYPE_INFO(ExternSheet) + BASE_OBJECT_DEFINE_CLASS_NAME(ExternSheet) XLS::BaseObjectPtr clone() override { @@ -91,6 +93,7 @@ namespace XLSB class BookView: public XLS::Window1 { BIFF_RECORD_DEFINE_TYPE_INFO(BookView) + BASE_OBJECT_DEFINE_CLASS_NAME(BookView) XLS::BaseObjectPtr clone() override { @@ -101,6 +104,7 @@ namespace XLSB class Name: public XLS::Lbl { BIFF_RECORD_DEFINE_TYPE_INFO(Name) + BASE_OBJECT_DEFINE_CLASS_NAME(Name) XLS::BaseObjectPtr clone() override { @@ -111,6 +115,7 @@ namespace XLSB class UserBookView: public XLS::UserBView { BIFF_RECORD_DEFINE_TYPE_INFO(UserBookView) + BASE_OBJECT_DEFINE_CLASS_NAME(UserBookView) XLS::BaseObjectPtr clone() override { @@ -121,6 +126,7 @@ namespace XLSB class WebOpt: public XLS::WOpt { BIFF_RECORD_DEFINE_TYPE_INFO(WebOpt) + BASE_OBJECT_DEFINE_CLASS_NAME(WebOpt) XLS::BaseObjectPtr clone() override { @@ -131,6 +137,7 @@ namespace XLSB class FileRecover: public XLS::BookExt { BIFF_RECORD_DEFINE_TYPE_INFO(FileRecover) + BASE_OBJECT_DEFINE_CLASS_NAME(FileRecover) XLS::BaseObjectPtr clone() override { @@ -141,6 +148,7 @@ namespace XLSB class ColInfo: public XLS::ColInfo { BIFF_RECORD_DEFINE_TYPE_INFO(ColInfo) + BASE_OBJECT_DEFINE_CLASS_NAME(ColInfo) XLS::BaseObjectPtr clone() override { @@ -151,6 +159,7 @@ namespace XLSB class RowHdr: public XLS::Row { BIFF_RECORD_DEFINE_TYPE_INFO(RowHdr) + BASE_OBJECT_DEFINE_CLASS_NAME(RowHdr) XLS::BaseObjectPtr clone() override { @@ -161,6 +170,7 @@ namespace XLSB class Table: public XLS::Table { BIFF_RECORD_DEFINE_TYPE_INFO(Table) + BASE_OBJECT_DEFINE_CLASS_NAME(Table) XLS::BaseObjectPtr clone() override { @@ -171,6 +181,7 @@ namespace XLSB class ShrFmla: public XLS::ShrFmla { BIFF_RECORD_DEFINE_TYPE_INFO(ShrFmla) + BASE_OBJECT_DEFINE_CLASS_NAME(ShrFmla) ShrFmla(const XLS::CellRef& cell_base_ref_init) : XLS::ShrFmla(cell_base_ref_init) {} XLS::BaseObjectPtr clone() override @@ -182,6 +193,7 @@ namespace XLSB class ArrFmla: public XLS::Array { BIFF_RECORD_DEFINE_TYPE_INFO(ArrFmla) + BASE_OBJECT_DEFINE_CLASS_NAME(ArrFmla) ArrFmla(const XLS::CellRef& cell_base_ref_init) : XLS::Array(cell_base_ref_init) {} XLS::BaseObjectPtr clone() override @@ -193,6 +205,9 @@ namespace XLSB class BeginWsView: public XLS::Window2 { BIFF_RECORD_DEFINE_TYPE_INFO(BeginWsView) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginWsView) + + static const XLS::ElementType type = XLS::typeBeginWsView; XLS::BaseObjectPtr clone() override { @@ -203,6 +218,7 @@ namespace XLSB class Pane: public XLS::Pane { BIFF_RECORD_DEFINE_TYPE_INFO(Pane) + BASE_OBJECT_DEFINE_CLASS_NAME(Pane) XLS::BaseObjectPtr clone() override { @@ -213,6 +229,7 @@ namespace XLSB class Sel: public XLS::Selection { BIFF_RECORD_DEFINE_TYPE_INFO(Sel) + BASE_OBJECT_DEFINE_CLASS_NAME(Sel) XLS::BaseObjectPtr clone() override { @@ -223,6 +240,7 @@ namespace XLSB class BeginSortState: public XLS::SortData { BIFF_RECORD_DEFINE_TYPE_INFO(BeginSortState) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginSortState) XLS::BaseObjectPtr clone() override { @@ -233,6 +251,7 @@ namespace XLSB class Font: public XLS::Font { BIFF_RECORD_DEFINE_TYPE_INFO(Font) + BASE_OBJECT_DEFINE_CLASS_NAME(Font) XLS::BaseObjectPtr clone() override { @@ -243,6 +262,7 @@ namespace XLSB class XF: public XLS::XF { BIFF_RECORD_DEFINE_TYPE_INFO(XF) + BASE_OBJECT_DEFINE_CLASS_NAME(XF) XF(size_t& cell_xf_current_id, size_t& style_xf_current_id) : XLS::XF(cell_xf_current_id, style_xf_current_id) {} @@ -256,6 +276,7 @@ namespace XLSB class DXF: public XLS::DXF { BIFF_RECORD_DEFINE_TYPE_INFO(DXF) + BASE_OBJECT_DEFINE_CLASS_NAME(DXF) XLS::BaseObjectPtr clone() override { @@ -266,6 +287,7 @@ namespace XLSB class BeginTableStyles: public XLS::TableStyles { BIFF_RECORD_DEFINE_TYPE_INFO(BeginTableStyles) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginTableStyles) XLS::BaseObjectPtr clone() override { @@ -276,6 +298,7 @@ namespace XLSB class BeginTableStyle: public XLS::TableStyle { BIFF_RECORD_DEFINE_TYPE_INFO(BeginTableStyle) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginTableStyle) XLS::BaseObjectPtr clone() override { @@ -286,6 +309,7 @@ namespace XLSB class TableStyleElement: public XLS::TableStyleElement { BIFF_RECORD_DEFINE_TYPE_INFO(TableStyleElement) + BASE_OBJECT_DEFINE_CLASS_NAME(TableStyleElement) XLS::BaseObjectPtr clone() override { @@ -296,6 +320,7 @@ namespace XLSB class DXF14: public XLS::DXF { BIFF_RECORD_DEFINE_TYPE_INFO(DXF14) + BASE_OBJECT_DEFINE_CLASS_NAME(DXF14) XLS::BaseObjectPtr clone() override { @@ -314,6 +339,7 @@ namespace XLSB class DXF15: public DXF14 { BIFF_RECORD_DEFINE_TYPE_INFO(DXF15) + BASE_OBJECT_DEFINE_CLASS_NAME(DXF15) XLS::BaseObjectPtr clone() override { @@ -324,6 +350,9 @@ namespace XLSB class PageSetup : public XLS::Setup { BIFF_RECORD_DEFINE_TYPE_INFO(PageSetup) + BASE_OBJECT_DEFINE_CLASS_NAME(PageSetup) + + static const XLS::ElementType type = XLS::typePageSetup; XLS::BaseObjectPtr clone() override { @@ -334,18 +363,20 @@ namespace XLSB class DVal : public XLS::Dv { BIFF_RECORD_DEFINE_TYPE_INFO(DVal) + BASE_OBJECT_DEFINE_CLASS_NAME(DVal) XLS::BaseObjectPtr clone() override { return XLS::BaseObjectPtr(new DVal(*this)); } - //static const XLS::ElementType type = XLS::typeDVal; + static const XLS::ElementType type = XLS::typeDVal; }; class DVal14 : public XLS::Dv { BIFF_RECORD_DEFINE_TYPE_INFO(DVal14) + BASE_OBJECT_DEFINE_CLASS_NAME(DVal14) DVal14(bool ext14 = true) : XLS::Dv(ext14) {} @@ -360,6 +391,7 @@ namespace XLSB class BeginQSI: public XLS::Qsi { BIFF_RECORD_DEFINE_TYPE_INFO(BeginQSI) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginQSI) XLS::BaseObjectPtr clone() override { @@ -370,6 +402,7 @@ namespace XLSB class BeginQSIR: public XLS::Qsir { BIFF_RECORD_DEFINE_TYPE_INFO(BeginQSIR) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginQSIR) XLS::BaseObjectPtr clone() override { @@ -380,6 +413,7 @@ namespace XLSB class BeginQSIF: public XLS::Qsif { BIFF_RECORD_DEFINE_TYPE_INFO(BeginQSIF) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginQSIF) XLS::BaseObjectPtr clone() override { @@ -387,4 +421,35 @@ namespace XLSB } }; + class CsPageSetup : public XLS::Setup + { + BIFF_RECORD_DEFINE_TYPE_INFO(CsPageSetup) + BASE_OBJECT_DEFINE_CLASS_NAME(CsPageSetup) + + static const XLS::ElementType type = XLS::typeCsPageSetup; + + CsPageSetup(bool isChart = true) : XLS::Setup(isChart) {} + + XLS::BaseObjectPtr clone() override + { + return XLS::BaseObjectPtr(new CsPageSetup(*this)); + } + }; + + class BeginCsView: public XLS::Window2 + { + BIFF_RECORD_DEFINE_TYPE_INFO(BeginCsView) + BASE_OBJECT_DEFINE_CLASS_NAME(BeginCsView) + + static const XLS::ElementType type = XLS::typeBeginCsView; + + BeginCsView(bool isChart = true) : XLS::Window2(isChart) {} + + XLS::BaseObjectPtr clone() override + { + return XLS::BaseObjectPtr(new BeginCsView(*this)); + } + }; + + } // namespace XLSB diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProp.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProp.cpp new file mode 100644 index 0000000000..67ef34b1cc --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProp.cpp @@ -0,0 +1,65 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "CsProp.h" + +using namespace XLS; + +namespace XLSB +{ + + CsProp::CsProp() + { + } + + CsProp::~CsProp() + { + } + + BaseObjectPtr CsProp::clone() + { + return BaseObjectPtr(new CsProp(*this)); + } + + void CsProp::readFields(XLS::CFRecord& record) + { + _UINT16 flags; + record >> flags; + + fPublish = GETBIT(flags, 0); + + brtcolorTab.readFields(record); + record >> strName; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProp.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProp.h new file mode 100644 index 0000000000..f173a6175a --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProp.h @@ -0,0 +1,62 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" +#include "../Biff12_records/Color.h" +#include "../Biff12_structures/CodeName.h" + +namespace XLSB +{ + // Logical representation of BrtCsProp record in BIFF12 + class CsProp: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(CsProp) + BASE_OBJECT_DEFINE_CLASS_NAME(CsProp) + public: + CsProp(); + virtual ~CsProp(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + static const XLS::ElementType type = XLS::typeCsProp; + + bool fPublish; + Color brtcolorTab; + CodeName strName; + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtection.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtection.cpp new file mode 100644 index 0000000000..2cad2ed4dc --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtection.cpp @@ -0,0 +1,60 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "CsProtection.h" + +using namespace XLS; + +namespace XLSB +{ + + CsProtection::CsProtection() + { + } + + CsProtection::~CsProtection() + { + } + + BaseObjectPtr CsProtection::clone() + { + return BaseObjectPtr(new CsProtection(*this)); + } + + void CsProtection::readFields(XLS::CFRecord& record) + { + record >> protpwd; + record >> fLocked >> fObjects; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtection.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtection.h new file mode 100644 index 0000000000..0d72344deb --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtection.h @@ -0,0 +1,62 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + + +namespace XLSB +{ + // Logical representation of BrtCsProtection record in BIFF12 + class CsProtection: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(CsProtection) + BASE_OBJECT_DEFINE_CLASS_NAME(CsProtection) + public: + CsProtection(); + virtual ~CsProtection(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + static const XLS::ElementType type = XLS::typeCsProtection; + + _UINT16 protpwd; + XLS::Boolean fLocked; + XLS::Boolean fObjects; + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtectionIso.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtectionIso.cpp new file mode 100644 index 0000000000..71b52a9b91 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtectionIso.cpp @@ -0,0 +1,61 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "CsProtectionIso.h" + +using namespace XLS; + +namespace XLSB +{ + + CsProtectionIso::CsProtectionIso() + { + } + + CsProtectionIso::~CsProtectionIso() + { + } + + BaseObjectPtr CsProtectionIso::clone() + { + return BaseObjectPtr(new CsProtectionIso(*this)); + } + + void CsProtectionIso::readFields(XLS::CFRecord& record) + { + record >> dwSpinCount; + record >> fLocked >> fObjects; + record >> ipdPasswordData; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtectionIso.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtectionIso.h new file mode 100644 index 0000000000..dc48b7adcb --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/CsProtectionIso.h @@ -0,0 +1,62 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" +#include "../Biff12_structures/IsoPasswordData.h" + +namespace XLSB +{ + // Logical representation of BrtCsProtectionIso record in BIFF12 + class CsProtectionIso: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(CsProtectionIso) + BASE_OBJECT_DEFINE_CLASS_NAME(CsProtectionIso) + public: + CsProtectionIso(); + virtual ~CsProtectionIso(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + static const XLS::ElementType type = XLS::typeCsProtectionIso; + + _UINT32 dwSpinCount; + XLS::Boolean fLocked; + XLS::Boolean fObjects; + IsoPasswordData ipdPasswordData; + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsView.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsView.cpp new file mode 100644 index 0000000000..e178185437 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsView.cpp @@ -0,0 +1,59 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "EndCsView.h" + +using namespace XLS; + +namespace XLSB +{ + + EndCsView::EndCsView() + { + } + + EndCsView::~EndCsView() + { + } + + BaseObjectPtr EndCsView::clone() + { + return BaseObjectPtr(new EndCsView(*this)); + } + + void EndCsView::readFields(XLS::CFRecord& record) + { + // No data in this record + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsView.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsView.h new file mode 100644 index 0000000000..6ac7ecf3f0 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsView.h @@ -0,0 +1,56 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + +namespace XLSB +{ + // Logical representation of BrtEndCsView record in BIFF12 + class EndCsView: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(EndCsView) + BASE_OBJECT_DEFINE_CLASS_NAME(EndCsView) + public: + EndCsView(); + virtual ~EndCsView(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + //static const XLS::ElementType type = XLS::typeEndCsView; + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsViews.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsViews.cpp new file mode 100644 index 0000000000..be1905e636 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsViews.cpp @@ -0,0 +1,59 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "EndCsViews.h" + +using namespace XLS; + +namespace XLSB +{ + + EndCsViews::EndCsViews() + { + } + + EndCsViews::~EndCsViews() + { + } + + BaseObjectPtr EndCsViews::clone() + { + return BaseObjectPtr(new EndCsViews(*this)); + } + + void EndCsViews::readFields(XLS::CFRecord& record) + { + // No data in this record + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsViews.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsViews.h new file mode 100644 index 0000000000..15739fe45c --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndCsViews.h @@ -0,0 +1,56 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + +namespace XLSB +{ + // Logical representation of BrtEndCsViews record in BIFF12 + class EndCsViews: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(EndCsViews) + BASE_OBJECT_DEFINE_CLASS_NAME(EndCsViews) + public: + EndCsViews(); + virtual ~EndCsViews(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + //static const XLS::ElementType type = XLS::typeEndCsViews; + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsView.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsView.cpp new file mode 100644 index 0000000000..60d06b1e0f --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsView.cpp @@ -0,0 +1,59 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "EndUserCsView.h" + +using namespace XLS; + +namespace XLSB +{ + + EndUserCsView::EndUserCsView() + { + } + + EndUserCsView::~EndUserCsView() + { + } + + BaseObjectPtr EndUserCsView::clone() + { + return BaseObjectPtr(new EndUserCsView(*this)); + } + + void EndUserCsView::readFields(XLS::CFRecord& record) + { + // No data in this record + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsView.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsView.h new file mode 100644 index 0000000000..1167d1efb6 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsView.h @@ -0,0 +1,55 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + +namespace XLSB +{ + // Logical representation of BrtEndUserCsView record in BIFF12 + class EndUserCsView: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(EndUserCsView) + BASE_OBJECT_DEFINE_CLASS_NAME(EndUserCsView) + public: + EndUserCsView(); + virtual ~EndUserCsView(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsViews.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsViews.cpp new file mode 100644 index 0000000000..ba897145d0 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsViews.cpp @@ -0,0 +1,59 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "EndUserCsViews.h" + +using namespace XLS; + +namespace XLSB +{ + + EndUserCsViews::EndUserCsViews() + { + } + + EndUserCsViews::~EndUserCsViews() + { + } + + BaseObjectPtr EndUserCsViews::clone() + { + return BaseObjectPtr(new EndUserCsViews(*this)); + } + + void EndUserCsViews::readFields(XLS::CFRecord& record) + { + // No data in this record + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsViews.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsViews.h new file mode 100644 index 0000000000..a81961f041 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndUserCsViews.h @@ -0,0 +1,55 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + +namespace XLSB +{ + // Logical representation of BrtEndUserCsViews record in BIFF12 + class EndUserCsViews: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(EndUserCsViews) + BASE_OBJECT_DEFINE_CLASS_NAME(EndUserCsViews) + public: + EndUserCsViews(); + virtual ~EndUserCsViews(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItem.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItem.cpp new file mode 100644 index 0000000000..07d1657c23 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItem.cpp @@ -0,0 +1,59 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "EndWebPubItem.h" + +using namespace XLS; + +namespace XLSB +{ + + EndWebPubItem::EndWebPubItem() + { + } + + EndWebPubItem::~EndWebPubItem() + { + } + + BaseObjectPtr EndWebPubItem::clone() + { + return BaseObjectPtr(new EndWebPubItem(*this)); + } + + void EndWebPubItem::readFields(XLS::CFRecord& record) + { + // No data in this record + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItem.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItem.h new file mode 100644 index 0000000000..e5f0dd57a8 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItem.h @@ -0,0 +1,55 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + +namespace XLSB +{ + // Logical representation of BrtEndWebPubItem record in BIFF12 + class EndWebPubItem: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(EndWebPubItem) + BASE_OBJECT_DEFINE_CLASS_NAME(EndWebPubItem) + public: + EndWebPubItem(); + virtual ~EndWebPubItem(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItems.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItems.cpp new file mode 100644 index 0000000000..e1a10606da --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItems.cpp @@ -0,0 +1,59 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "EndWebPubItems.h" + +using namespace XLS; + +namespace XLSB +{ + + EndWebPubItems::EndWebPubItems() + { + } + + EndWebPubItems::~EndWebPubItems() + { + } + + BaseObjectPtr EndWebPubItems::clone() + { + return BaseObjectPtr(new EndWebPubItems(*this)); + } + + void EndWebPubItems::readFields(XLS::CFRecord& record) + { + // No data in this record + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItems.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItems.h new file mode 100644 index 0000000000..022cacd128 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/EndWebPubItems.h @@ -0,0 +1,55 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BiffRecord.h" +#include "../../XlsxFormat/WritingElement.h" + +namespace XLSB +{ + // Logical representation of BrtEndWebPubItems record in BIFF12 + class EndWebPubItems: public XLS::BiffRecord + { + BIFF_RECORD_DEFINE_TYPE_INFO(EndWebPubItems) + BASE_OBJECT_DEFINE_CLASS_NAME(EndWebPubItems) + public: + EndWebPubItems(); + virtual ~EndWebPubItems(); + + XLS::BaseObjectPtr clone(); + + void readFields(XLS::CFRecord& record); + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/SheetProtection.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/SheetProtection.h index 0d39409adb..40b33cc692 100644 --- a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/SheetProtection.h +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/SheetProtection.h @@ -51,6 +51,8 @@ namespace XLSB void readFields(XLS::CFRecord& record); + static const XLS::ElementType type = XLS::typeSheetProtection; + _UINT16 protpwd; XLS::Boolean fLocked; XLS::Boolean fObjects; diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/SheetProtectionIso.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/SheetProtectionIso.h index 631d818fe2..8533c50fd6 100644 --- a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/SheetProtectionIso.h +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/SheetProtectionIso.h @@ -52,6 +52,8 @@ namespace XLSB void readFields(XLS::CFRecord& record); + static const XLS::ElementType type = XLS::typeSheetProtectionIso; + _UINT32 dwSpinCount; XLS::Boolean fLocked; XLS::Boolean fObjects; diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/WsProp.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/WsProp.h index 9ff62b450a..465fcd99a6 100644 --- a/Common/DocxFormat/Source/XlsbFormat/Biff12_records/WsProp.h +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_records/WsProp.h @@ -51,6 +51,8 @@ namespace XLSB void readFields(XLS::CFRecord& record); + static const XLS::ElementType type = XLS::typeWsProp; + bool fShowAutoBreaks; bool fPublish; bool fDialog; diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_structures/Tws.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_structures/Tws.cpp new file mode 100644 index 0000000000..459ecdc28c --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_structures/Tws.cpp @@ -0,0 +1,46 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "Tws.h" + +using namespace XLS; + +namespace XLSB +{ + +BiffStructurePtr Tws::clone() +{ + return BiffStructurePtr(new Tws(*this)); +} + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_structures/Tws.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_structures/Tws.h new file mode 100644 index 0000000000..4ec30f3e7a --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_structures/Tws.h @@ -0,0 +1,59 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/BiffAttribute.h" + +namespace XLSB +{ + +class Tws : public XLS::BiffAttributeSimple +{ +public: + XLS::BiffStructurePtr clone(); + + enum + { + TWSWORKBOOK = 0x00, + TWSSHEET = 0x01, + TWSPRINTAREA = 0x02, + TWSAUTOFILTER = 0x03, + TWSREF = 0x04, + TWSCHART = 0x05, + TWSPIVOTTABLE = 0x06, + TWSQUERY = 0x07, + TWSLABEL = 0x08 + }; +}; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEW.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEW.cpp new file mode 100644 index 0000000000..be8ca51690 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEW.cpp @@ -0,0 +1,91 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "CSVIEW.h" +#include "../Biff12_records/CommonRecords.h" +#include "../Biff12_records/EndCsView.h" +#include "../Biff12_unions/ACUID.h" +#include "../Biff12_unions/FRT.h" + +using namespace XLS; + +namespace XLSB +{ + + CSVIEW::CSVIEW() + { + } + + CSVIEW::~CSVIEW() + { + } + + BaseObjectPtr CSVIEW::clone() + { + return BaseObjectPtr(new CSVIEW(*this)); + } + + // CSVIEW = [ACUID] BrtBeginCsView *FRT BrtEndCsView + const bool CSVIEW::loadContent(BinProcessor& proc) + { + if (proc.optional()) + { + m_ACUID = elements_.back(); + elements_.pop_back(); + } + + if (proc.optional()) + { + m_BrtBeginCsView = elements_.back(); + elements_.pop_back(); + } + + int count = proc.repeated(0, 0); + + while(count > 0) + { + m_arFRT.insert(m_arFRT.begin(), elements_.back()); + elements_.pop_back(); + count--; + } + + if (proc.optional()) + { + m_BrtEndCsView = elements_.back(); + elements_.pop_back(); + } + + return m_BrtBeginCsView && m_BrtEndCsView; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEW.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEW.h new file mode 100644 index 0000000000..be37739871 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEW.h @@ -0,0 +1,60 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/CompositeObject.h" + +namespace XLSB +{ + + class CSVIEW: public XLS::CompositeObject + { + BASE_OBJECT_DEFINE_CLASS_NAME(CSVIEW) + public: + CSVIEW(); + virtual ~CSVIEW(); + + XLS::BaseObjectPtr clone(); + + virtual const bool loadContent(XLS::BinProcessor& proc); + + static const XLS::ElementType type = XLS::typeCSVIEW; + + XLS::BaseObjectPtr m_ACUID; + XLS::BaseObjectPtr m_BrtBeginCsView; + std::vector m_arFRT; + XLS::BaseObjectPtr m_BrtEndCsView; + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEWS.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEWS.cpp new file mode 100644 index 0000000000..bbf3d2eef2 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEWS.cpp @@ -0,0 +1,94 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "CSVIEWS.h" +#include "../Biff12_records/BeginCsViews.h" +#include "../Biff12_unions/CSVIEW.h" +#include "../Biff12_unions/FRT.h" +#include "../Biff12_records/EndCsViews.h" + +using namespace XLS; + +namespace XLSB +{ + + CSVIEWS::CSVIEWS() + { + } + + CSVIEWS::~CSVIEWS() + { + } + + BaseObjectPtr CSVIEWS::clone() + { + return BaseObjectPtr(new CSVIEWS(*this)); + } + + // CSVIEWS = BrtBeginCsViews 1*CSVIEW *FRT BrtEndCsViews + const bool CSVIEWS::loadContent(BinProcessor& proc) + { + if (proc.optional()) + { + m_BrtBeginCsViews = elements_.back(); + elements_.pop_back(); + } + + int countCSVIEW = proc.repeated(0, 0); + + while(countCSVIEW > 0) + { + m_arCSVIEW.insert(m_arCSVIEW.begin(), elements_.back()); + elements_.pop_back(); + countCSVIEW--; + } + + int count = proc.repeated(0, 0); + + while(count > 0) + { + m_arFRT.insert(m_arFRT.begin(), elements_.back()); + elements_.pop_back(); + count--; + } + + if (proc.optional()) + { + m_BrtEndCsViews = elements_.back(); + elements_.pop_back(); + } + + return m_BrtBeginCsViews && !m_arCSVIEW.empty() && m_BrtEndCsViews; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEWS.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEWS.h new file mode 100644 index 0000000000..4f55616d60 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/CSVIEWS.h @@ -0,0 +1,60 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/CompositeObject.h" + +namespace XLSB +{ + + class CSVIEWS: public XLS::CompositeObject + { + BASE_OBJECT_DEFINE_CLASS_NAME(CSVIEWS) + public: + CSVIEWS(); + virtual ~CSVIEWS(); + + XLS::BaseObjectPtr clone(); + + virtual const bool loadContent(XLS::BinProcessor& proc); + + static const XLS::ElementType type = XLS::typeCSVIEWS; + + XLS::BaseObjectPtr m_BrtBeginCsViews; + std::vector m_arCSVIEW; + std::vector m_arFRT; + XLS::BaseObjectPtr m_BrtEndCsViews; + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEW.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEW.cpp new file mode 100644 index 0000000000..cc2c59ede6 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEW.cpp @@ -0,0 +1,95 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "USERCSVIEW.h" +#include "../Biff12_records/BeginUserCsView.h" +#include "../Biff12_records/Margins.h" +#include "../Biff12_records/CommonRecords.h" +#include "../Biff12_unions/HEADERFOOTER.h" +#include "../Biff12_records/EndUserCsView.h" + +using namespace XLS; + +namespace XLSB +{ + + USERCSVIEW::USERCSVIEW() + { + } + + USERCSVIEW::~USERCSVIEW() + { + } + + BaseObjectPtr USERCSVIEW::clone() + { + return BaseObjectPtr(new USERCSVIEW(*this)); + } + + // USERCSVIEW = BrtBeginUserCsView [BrtMargins] [BrtCsPageSetup] [HEADERFOOTER] BrtEndUserCsView + const bool USERCSVIEW::loadContent(BinProcessor& proc) + { + if (proc.optional()) + { + m_BrtBeginUserCsView = elements_.back(); + elements_.pop_back(); + } + + if (proc.optional()) + { + m_BrtMargins = elements_.back(); + elements_.pop_back(); + } + + if (proc.optional()) + { + m_BrtCsPageSetup = elements_.back(); + elements_.pop_back(); + } + + if (proc.optional()) + { + m_HEADERFOOTER = elements_.back(); + elements_.pop_back(); + } + + if (proc.optional()) + { + m_BrtEndUserCsView = elements_.back(); + elements_.pop_back(); + } + + return m_BrtBeginUserCsView && m_BrtEndUserCsView; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEW.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEW.h new file mode 100644 index 0000000000..a719a9a32a --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEW.h @@ -0,0 +1,59 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/CompositeObject.h" + +namespace XLSB +{ + + class USERCSVIEW: public XLS::CompositeObject + { + BASE_OBJECT_DEFINE_CLASS_NAME(USERCSVIEW) + public: + USERCSVIEW(); + virtual ~USERCSVIEW(); + + XLS::BaseObjectPtr clone(); + + virtual const bool loadContent(XLS::BinProcessor& proc); + + XLS::BaseObjectPtr m_BrtBeginUserCsView; + XLS::BaseObjectPtr m_BrtMargins; + XLS::BaseObjectPtr m_BrtCsPageSetup; + XLS::BaseObjectPtr m_HEADERFOOTER; + XLS::BaseObjectPtr m_BrtEndUserCsView; + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEWS.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEWS.cpp new file mode 100644 index 0000000000..2a20b574e9 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEWS.cpp @@ -0,0 +1,83 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "USERCSVIEWS.h" +#include "../Biff12_records/BeginUserCsViews.h" +#include "../Biff12_unions/USERCSVIEW.h" +#include "../Biff12_records/EndUserCsViews.h" + +using namespace XLS; + +namespace XLSB +{ + + USERCSVIEWS::USERCSVIEWS() + { + } + + USERCSVIEWS::~USERCSVIEWS() + { + } + + BaseObjectPtr USERCSVIEWS::clone() + { + return BaseObjectPtr(new USERCSVIEWS(*this)); + } + + //USERCSVIEWS = BrtBeginUserCsViews *USERCSVIEW BrtEndUserCsViews + const bool USERCSVIEWS::loadContent(BinProcessor& proc) + { + if (proc.optional()) + { + m_BrtBeginUserCsViews = elements_.back(); + elements_.pop_back(); + } + + auto count = proc.repeated(0, 0); + while(count > 0) + { + m_arUSERCSVIEW.insert(m_arUSERCSVIEW.begin(), elements_.back()); + elements_.pop_back(); + count--; + } + + if (proc.optional()) + { + m_BrtEndUserCsViews = elements_.back(); + elements_.pop_back(); + } + + return m_BrtBeginUserCsViews && !m_arUSERCSVIEW.empty() && m_BrtEndUserCsViews; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEWS.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEWS.h new file mode 100644 index 0000000000..f1556f7936 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/USERCSVIEWS.h @@ -0,0 +1,57 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/CompositeObject.h" + +namespace XLSB +{ + + class USERCSVIEWS: public XLS::CompositeObject + { + BASE_OBJECT_DEFINE_CLASS_NAME(USERCSVIEWS) + public: + USERCSVIEWS(); + virtual ~USERCSVIEWS(); + + XLS::BaseObjectPtr clone(); + + virtual const bool loadContent(XLS::BinProcessor& proc); + + XLS::BaseObjectPtr m_BrtBeginUserCsViews; + std::vector m_arUSERCSVIEW; + XLS::BaseObjectPtr m_BrtEndUserCsViews; + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEM.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEM.cpp new file mode 100644 index 0000000000..84b4ba0ca1 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEM.cpp @@ -0,0 +1,74 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "WEBPUBITEM.h" +#include "../Biff12_records/BeginWebPubItem.h" +#include "../Biff12_records/EndWebPubItem.h" + +using namespace XLS; + +namespace XLSB +{ + + WEBPUBITEM::WEBPUBITEM() + { + } + + WEBPUBITEM::~WEBPUBITEM() + { + } + + BaseObjectPtr WEBPUBITEM::clone() + { + return BaseObjectPtr(new WEBPUBITEM(*this)); + } + + //WEBPUBITEM = BrtBeginWebPubItem BrtEndWebPubItem + const bool WEBPUBITEM::loadContent(BinProcessor& proc) + { + if (proc.optional()) + { + m_BrtBeginWebPubItem = elements_.back(); + elements_.pop_back(); + } + + if (proc.optional()) + { + m_BrtEndWebPubItem = elements_.back(); + elements_.pop_back(); + } + + return m_BrtBeginWebPubItem && m_BrtEndWebPubItem; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEM.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEM.h new file mode 100644 index 0000000000..c0c65ae0f0 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEM.h @@ -0,0 +1,56 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/CompositeObject.h" + +namespace XLSB +{ + + class WEBPUBITEM: public XLS::CompositeObject + { + BASE_OBJECT_DEFINE_CLASS_NAME(WEBPUBITEM) + public: + WEBPUBITEM(); + virtual ~WEBPUBITEM(); + + XLS::BaseObjectPtr clone(); + + virtual const bool loadContent(XLS::BinProcessor& proc); + + XLS::BaseObjectPtr m_BrtBeginWebPubItem; + XLS::BaseObjectPtr m_BrtEndWebPubItem; + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.cpp b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.cpp new file mode 100644 index 0000000000..f7ec8ba6c1 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.cpp @@ -0,0 +1,83 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "WEBPUBITEMS.h" +#include "../Biff12_records/BeginWebPubItems.h" +#include "../Biff12_unions/WEBPUBITEM.h" +#include "../Biff12_records/EndWebPubItems.h" + +using namespace XLS; + +namespace XLSB +{ + + WEBPUBITEMS::WEBPUBITEMS() + { + } + + WEBPUBITEMS::~WEBPUBITEMS() + { + } + + BaseObjectPtr WEBPUBITEMS::clone() + { + return BaseObjectPtr(new WEBPUBITEMS(*this)); + } + + //WEBPUBITEMS = BrtBeginWebPubItems 1*WEBPUBITEM BrtEndWebPubItems + const bool WEBPUBITEMS::loadContent(BinProcessor& proc) + { + if (proc.optional()) + { + m_BrtBeginWebPubItems = elements_.back(); + elements_.pop_back(); + } + + auto count = proc.repeated(0, 0); + while(count > 0) + { + m_arWEBPUBITEM.insert(m_arWEBPUBITEM.begin(), elements_.back()); + elements_.pop_back(); + count--; + } + + if (proc.optional()) + { + m_BrtEndWebPubItems = elements_.back(); + elements_.pop_back(); + } + + return m_BrtBeginWebPubItems && !m_arWEBPUBITEM.empty() && m_BrtEndWebPubItems; + } + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.h new file mode 100644 index 0000000000..fa3a00a30f --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WEBPUBITEMS.h @@ -0,0 +1,57 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +#pragma once + +#include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/CompositeObject.h" + +namespace XLSB +{ + + class WEBPUBITEMS: public XLS::CompositeObject + { + BASE_OBJECT_DEFINE_CLASS_NAME(WEBPUBITEMS) + public: + WEBPUBITEMS(); + virtual ~WEBPUBITEMS(); + + XLS::BaseObjectPtr clone(); + + virtual const bool loadContent(XLS::BinProcessor& proc); + + XLS::BaseObjectPtr m_BrtBeginWebPubItems; + std::vector m_arWEBPUBITEM; + XLS::BaseObjectPtr m_BrtEndWebPubItems; + + }; + +} // namespace XLSB + diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WSVIEW2.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WSVIEW2.h index 02f697c702..72530aa3be 100644 --- a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WSVIEW2.h +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WSVIEW2.h @@ -33,8 +33,6 @@ #include "../../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/CompositeObject.h" - - namespace XLSB { @@ -49,6 +47,8 @@ namespace XLSB virtual const bool loadContent(XLS::BinProcessor& proc); + static const XLS::ElementType type = XLS::typeWSVIEW2; + XLS::BaseObjectPtr m_ACUID; XLS::BaseObjectPtr m_BrtBeginWsView; XLS::BaseObjectPtr m_BrtPane; diff --git a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WSVIEWS2.h b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WSVIEWS2.h index 1d4c313669..b55ec4f2e6 100644 --- a/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WSVIEWS2.h +++ b/Common/DocxFormat/Source/XlsbFormat/Biff12_unions/WSVIEWS2.h @@ -47,6 +47,8 @@ namespace XLSB virtual const bool loadContent(XLS::BinProcessor& proc); + static const XLS::ElementType type = XLS::typeWSVIEWS2; + XLS::BaseObjectPtr m_BrtBeginWsViews; std::vector m_arWSVIEW2; std::vector m_arFRT; diff --git a/Common/DocxFormat/Source/XlsbFormat/ChartSheetStream.cpp b/Common/DocxFormat/Source/XlsbFormat/ChartSheetStream.cpp new file mode 100644 index 0000000000..3577467294 --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/ChartSheetStream.cpp @@ -0,0 +1,227 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "ChartSheetStream.h" + +#include "Biff12_records/CommonRecords.h" +#include "Biff12_records/BeginSheet.h" +#include "Biff12_records/Drawing.h" +#include "Biff12_records/LegacyDrawing.h" +#include "Biff12_records/LegacyDrawingHF.h" +#include "Biff12_unions/CSVIEWS.h" +#include "Biff12_records/Margins.h" +#include "Biff12_unions/HEADERFOOTER.h" +#include "Biff12_records/CsProp.h" +#include "Biff12_records/CsProtectionIso.h" +#include "Biff12_records/CsProtection.h" +#include "Biff12_unions/USERCSVIEWS.h" +#include "Biff12_records/BkHim.h" +#include "Biff12_unions/WEBPUBITEMS.h" +#include "Biff12_records/EndSheet.h" + +using namespace XLS; + +namespace XLSB +{; + +ChartSheetStream::ChartSheetStream() +{ +} + +ChartSheetStream::~ChartSheetStream() +{ +} + + +BaseObjectPtr ChartSheetStream::clone() +{ + return BaseObjectPtr(new ChartSheetStream(*this)); +} + +const bool ChartSheetStream::loadContent(BinProcessor& proc) +{ + int count = 0; + std::vector shared_formulas_locations; + while (true) + { + CFRecordType::TypeId type = proc.getNextRecordType(); + + if (type == rt_NONE) break; + + switch(type) + { + case rt_BeginSheet: + { + if (proc.optional()) + { + m_BrtBeginSheet = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_Drawing: + { + if (proc.optional()) + { + m_BrtDrawing = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_LegacyDrawing: + { + if (proc.optional()) + { + m_BrtLegacyDrawing = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_LegacyDrawingHF: + { + if (proc.optional()) + { + m_BrtLegacyDrawingHF = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_BeginCsViews: + { + if (proc.optional()) + { + m_CSVIEWS = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_Margins: + { + if (proc.optional()) + { + m_BrtMargins = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_CsPageSetup: + { + if (proc.optional()) + { + m_BrtCsPageSetup = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_CsProp: + { + if (proc.optional()) + { + m_BrtCsProp = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_BeginHeaderFooter: + { + if (proc.optional()) + { + m_HEADERFOOTER = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_CsProtectionIso: + { + if (proc.optional()) + { + m_BrtCsProtectionIso = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_CsProtection: + { + if (proc.optional()) + { + m_BrtCsProtection = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_BkHim: + { + if (proc.optional()) + { + m_BrtBkHim = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_BeginUserCsViews: + { + if (proc.optional()) + { + m_USERCSVIEWS = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_BeginWebPubItems: + { + if (proc.optional()) + { + m_WEBPUBITEMS = elements_.back(); + elements_.pop_back(); + } + }break; + + case rt_EndSheet: + { + if (proc.optional()) + { + m_BrtEndSheet = elements_.back(); + elements_.pop_back(); + } + }break; + + default://skip + { + proc.SkipRecord(); + }break; + } + } + + return true; +} + +} // namespace XLSB diff --git a/Common/DocxFormat/Source/XlsbFormat/ChartSheetStream.h b/Common/DocxFormat/Source/XlsbFormat/ChartSheetStream.h new file mode 100644 index 0000000000..d596841b1c --- /dev/null +++ b/Common/DocxFormat/Source/XlsbFormat/ChartSheetStream.h @@ -0,0 +1,87 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#ifndef CHARTSHEETSTREAM_H +#define CHARTSHEETSTREAM_H + + +#include "../../../../DesktopEditor/common/Types.h" +#include "../Base/Types_32.h" +#include "../XlsxFormat/WritingElement.h" +#include +#include +#include +#include "../../../../ASCOfficeXlsFile2/source/XlsFormat/Logic/CompositeObject.h" +typedef BYTE *LPBYTE; + +namespace XLSB +{ + class StreamCacheReader; + + class ChartSheetStream; + typedef std::shared_ptr ChartSheetStreamPtr; + + class ChartSheetStream: public XLS::CompositeObject + { + BASE_OBJECT_DEFINE_CLASS_NAME(WorkBookStream) + public: + ChartSheetStream(); + virtual ~ChartSheetStream(); + + XLS::BaseObjectPtr clone(); + + virtual const bool loadContent(XLS::BinProcessor& proc); + + //static const XLS::ElementType type = XLS::typeWorksheetSubstream; + + XLS::BaseObjectPtr m_BrtBeginSheet; + XLS::BaseObjectPtr m_BrtCsProp; + XLS::BaseObjectPtr m_CSVIEWS; + XLS::BaseObjectPtr m_BrtCsProtectionIso; + XLS::BaseObjectPtr m_BrtCsProtection; + XLS::BaseObjectPtr m_USERCSVIEWS; + XLS::BaseObjectPtr m_BrtMargins; + XLS::BaseObjectPtr m_BrtCsPageSetup; + XLS::BaseObjectPtr m_HEADERFOOTER; + XLS::BaseObjectPtr m_BrtDrawing; + XLS::BaseObjectPtr m_BrtLegacyDrawing; + XLS::BaseObjectPtr m_BrtLegacyDrawingHF; + XLS::BaseObjectPtr m_BrtBkHim; + XLS::BaseObjectPtr m_WEBPUBITEMS; + XLS::BaseObjectPtr m_BrtEndSheet; + + }; + +} + +#endif // CHARTSHEETSTREAM_H + diff --git a/Common/DocxFormat/Source/XlsxFormat/FileFactory_Spreadsheet.cpp b/Common/DocxFormat/Source/XlsxFormat/FileFactory_Spreadsheet.cpp index f350a8c739..9a00812a9f 100644 --- a/Common/DocxFormat/Source/XlsxFormat/FileFactory_Spreadsheet.cpp +++ b/Common/DocxFormat/Source/XlsxFormat/FileFactory_Spreadsheet.cpp @@ -101,7 +101,7 @@ namespace OOX else if ( oRelation.Type() == FileTypes::CalcChain ) return smart_ptr(new CCalcChain( pMain, oRootPath, oFileName )); else if ( oRelation.Type() == FileTypes::Chartsheets ) - return smart_ptr(new CWorksheet( pMain, oRootPath, oFileName, oRelation.rId().ToString() )); + return smart_ptr(new CWorksheet( pMain, oRootPath, oFileName, oRelation.rId().ToString(), true )); else if ( oRelation.Type() == FileTypes::Table ) return smart_ptr(new CTableFile( pMain, oRootPath, oFileName )); else if ( oRelation.Type() == FileTypes::QueryTable ) @@ -200,7 +200,7 @@ namespace OOX else if ( pRelation->Type() == FileTypes::Styles ) return smart_ptr(new CStyles( pMain, oRootPath, oFileName )); else if ( pRelation->Type() == FileTypes::Worksheet ) - return smart_ptr(new CWorksheet( pMain, oRootPath, oFileName, pRelation->rId().ToString() )); + return smart_ptr(new CWorksheet( pMain, oRootPath, oFileName, pRelation->rId().ToString() )); else if ( pRelation->Type() == OOX::FileTypes::Theme ) { smart_ptr pFile; @@ -228,7 +228,7 @@ namespace OOX else if ( pRelation->Type() == OOX::FileTypes::Image ) return smart_ptr(new Image( pMain, oFileName )); else if ( pRelation->Type() == FileTypes::Chartsheets ) - return smart_ptr(new CWorksheet( pMain, oRootPath, oFileName, pRelation->rId().ToString() )); + return smart_ptr(new CWorksheet( pMain, oRootPath, oFileName, pRelation->rId().ToString(), true )); else if ( pRelation->Type() == FileTypes::Table ) return smart_ptr(new CTableFile( pMain, oRootPath, oFileName )); else if ( pRelation->Type() == FileTypes::QueryTable ) diff --git a/Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.cpp b/Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.cpp index 15f1543a06..5402841c7e 100644 --- a/Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.cpp +++ b/Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.cpp @@ -43,6 +43,7 @@ #include "../../XlsbFormat/Xlsb.h" #include "../../XlsbFormat/WorkSheetStream.h" +#include "../../XlsbFormat/ChartSheetStream.h" #include "../../XlsbFormat/Biff12_unions/HLINKS.h" #include "../../XlsbFormat/Biff12_unions/MERGECELLS.h" @@ -57,6 +58,7 @@ namespace OOX m_bWriteDirectlyToFile = false; m_pComments = NULL; m_pThreadedComments = NULL; + m_bIsChartSheet = false; CXlsx* xlsx = dynamic_cast(pMain); if (xlsx) @@ -69,12 +71,13 @@ namespace OOX else m_bPrepareForBinaryWriter = false; } - CWorksheet::CWorksheet(OOX::Document* pMain, const CPath& oRootPath, const CPath& oPath, const std::wstring & rId) : OOX::File(pMain), OOX::IFileContainer(pMain), WritingElement(pMain) + CWorksheet::CWorksheet(OOX::Document* pMain, const CPath& oRootPath, const CPath& oPath, const std::wstring & rId, bool isChartSheet) : OOX::File(pMain), OOX::IFileContainer(pMain), WritingElement(pMain) { m_bSpreadsheets = true; m_bWriteDirectlyToFile = false; m_pComments = NULL; m_pThreadedComments = NULL; + m_bIsChartSheet = isChartSheet; CXlsx* xlsx = dynamic_cast(pMain); if (xlsx) @@ -99,80 +102,118 @@ namespace OOX CXlsb* xlsb = dynamic_cast(File::m_pMainDocument); if (xlsb) { - XLSB::WorkSheetStreamPtr workSheetStream = std::make_shared(); - - xlsb->ReadBin(oPath, workSheetStream.get()); - - if (workSheetStream != nullptr) + if(m_bIsChartSheet) { - if (!workSheetStream->m_arCOLINFOS.empty()) - m_oCols = workSheetStream->m_arCOLINFOS; - if (workSheetStream->m_BrtWsDim != nullptr) - m_oDimension = workSheetStream->m_BrtWsDim; - if (workSheetStream->m_BrtDrawing != nullptr) - m_oDrawing = workSheetStream->m_BrtDrawing; - if (workSheetStream->m_BrtLegacyDrawing != nullptr) - m_oLegacyDrawing = workSheetStream->m_BrtLegacyDrawing; - if (workSheetStream->m_BrtLegacyDrawingHF != nullptr) - m_oLegacyDrawingHF = workSheetStream->m_BrtLegacyDrawingHF; - if (workSheetStream->m_HLINKS != nullptr) - m_oHyperlinks = static_cast(workSheetStream->m_HLINKS.get())->m_arHlinks; - if (workSheetStream->m_MERGECELLS != nullptr) - m_oMergeCells = static_cast(workSheetStream->m_MERGECELLS.get())->m_arBrtMergeCell; - if (workSheetStream->m_CELLTABLE != nullptr) - m_oSheetData = workSheetStream->m_CELLTABLE; - if (workSheetStream->m_BrtWsFmtInfo != nullptr) - m_oSheetFormatPr = workSheetStream->m_BrtWsFmtInfo; - if (workSheetStream->m_WSVIEWS2 != nullptr) - m_oSheetViews = workSheetStream->m_WSVIEWS2; - if (workSheetStream->m_BrtMargins != nullptr) - m_oPageMargins = workSheetStream->m_BrtMargins; - if (workSheetStream->m_BrtPageSetup != nullptr) - m_oPageSetup = workSheetStream->m_BrtPageSetup; - if (workSheetStream->m_BrtPrintOptions != nullptr) - m_oPrintOptions = workSheetStream->m_BrtPrintOptions; - if (workSheetStream->m_HEADERFOOTER != nullptr) - m_oHeaderFooter = workSheetStream->m_HEADERFOOTER; + XLSB::ChartSheetStreamPtr chartSheetStream = std::make_shared(); - if (workSheetStream->m_BrtSheetProtectionIso != nullptr) - m_oSheetProtection = workSheetStream->m_BrtSheetProtectionIso; - else if(workSheetStream->m_BrtSheetProtection != nullptr) - m_oSheetProtection = workSheetStream->m_BrtSheetProtection; + xlsb->ReadBin(oPath, chartSheetStream.get()); - if (workSheetStream->m_LISTPARTS != nullptr) - m_oTableParts = workSheetStream->m_LISTPARTS; - if (workSheetStream->m_SORTSTATE != nullptr) - m_oSortState = workSheetStream->m_SORTSTATE; - if (!workSheetStream->m_arCONDITIONALFORMATTING.empty()) - for(auto &item : workSheetStream->m_arCONDITIONALFORMATTING) - m_arrConditionalFormatting.push_back(new OOX::Spreadsheet::CConditionalFormatting(item)); + if(chartSheetStream != nullptr) + { + if (chartSheetStream->m_BrtMargins != nullptr) + m_oPageMargins = chartSheetStream->m_BrtMargins; + if (chartSheetStream->m_HEADERFOOTER != nullptr) + m_oHeaderFooter = chartSheetStream->m_HEADERFOOTER; + if (chartSheetStream->m_BrtDrawing != nullptr) + m_oDrawing = chartSheetStream->m_BrtDrawing; + if (chartSheetStream->m_BrtLegacyDrawing != nullptr) + m_oLegacyDrawing = chartSheetStream->m_BrtLegacyDrawing; + if (chartSheetStream->m_BrtLegacyDrawingHF != nullptr) + m_oLegacyDrawingHF = chartSheetStream->m_BrtLegacyDrawingHF; + if (chartSheetStream->m_BrtBkHim != nullptr) + m_oPicture = chartSheetStream->m_BrtBkHim; + if (chartSheetStream->m_CSVIEWS != nullptr) + m_oSheetViews = chartSheetStream->m_CSVIEWS; + if (chartSheetStream->m_BrtCsProp != nullptr) + m_oSheetPr = chartSheetStream->m_BrtCsProp; + if (chartSheetStream->m_BrtCsPageSetup != nullptr) + m_oPageSetup = chartSheetStream->m_BrtCsPageSetup; - if (workSheetStream->m_AUTOFILTER != nullptr) - m_oAutofilter = workSheetStream->m_AUTOFILTER; - if (workSheetStream->m_DVALS != nullptr) - m_oDataValidations = workSheetStream->m_DVALS; - if (workSheetStream->m_OLEOBJECTS != nullptr) - m_oOleObjects = workSheetStream->m_OLEOBJECTS; - if (workSheetStream->m_ACTIVEXCONTROLS != nullptr) - m_oControls = workSheetStream->m_ACTIVEXCONTROLS; - if (workSheetStream->m_BrtWsProp != nullptr) - m_oSheetPr = workSheetStream->m_BrtWsProp; - if (workSheetStream->m_BrtBkHim != nullptr) - m_oPicture = workSheetStream->m_BrtBkHim; - if (workSheetStream->m_RWBRK != nullptr) - m_oRowBreaks = workSheetStream->m_RWBRK; - if (workSheetStream->m_COLBRK != nullptr) - m_oColBreaks = workSheetStream->m_COLBRK; - if (workSheetStream->m_DCON != nullptr) - m_oDataConsolidate = workSheetStream->m_DCON; + if (chartSheetStream->m_BrtCsProtectionIso != nullptr) + m_oSheetProtection = chartSheetStream->m_BrtCsProtectionIso; + else if(chartSheetStream->m_BrtCsProtection != nullptr) + m_oSheetProtection = chartSheetStream->m_BrtCsProtection; - if (!workSheetStream->m_arBrtRangeProtectionIso.empty()) - m_oProtectedRanges = workSheetStream->m_arBrtRangeProtectionIso; - else if(!workSheetStream->m_arBrtRangeProtection.empty()) - m_oProtectedRanges = workSheetStream->m_arBrtRangeProtection; + } + } + else + { + XLSB::WorkSheetStreamPtr workSheetStream = std::make_shared(); + + xlsb->ReadBin(oPath, workSheetStream.get()); + + if (workSheetStream != nullptr) + { + if (!workSheetStream->m_arCOLINFOS.empty()) + m_oCols = workSheetStream->m_arCOLINFOS; + if (workSheetStream->m_BrtWsDim != nullptr) + m_oDimension = workSheetStream->m_BrtWsDim; + if (workSheetStream->m_BrtDrawing != nullptr) + m_oDrawing = workSheetStream->m_BrtDrawing; + if (workSheetStream->m_BrtLegacyDrawing != nullptr) + m_oLegacyDrawing = workSheetStream->m_BrtLegacyDrawing; + if (workSheetStream->m_BrtLegacyDrawingHF != nullptr) + m_oLegacyDrawingHF = workSheetStream->m_BrtLegacyDrawingHF; + if (workSheetStream->m_HLINKS != nullptr) + m_oHyperlinks = static_cast(workSheetStream->m_HLINKS.get())->m_arHlinks; + if (workSheetStream->m_MERGECELLS != nullptr) + m_oMergeCells = static_cast(workSheetStream->m_MERGECELLS.get())->m_arBrtMergeCell; + if (workSheetStream->m_CELLTABLE != nullptr) + m_oSheetData = workSheetStream->m_CELLTABLE; + if (workSheetStream->m_BrtWsFmtInfo != nullptr) + m_oSheetFormatPr = workSheetStream->m_BrtWsFmtInfo; + if (workSheetStream->m_WSVIEWS2 != nullptr) + m_oSheetViews = workSheetStream->m_WSVIEWS2; + if (workSheetStream->m_BrtMargins != nullptr) + m_oPageMargins = workSheetStream->m_BrtMargins; + if (workSheetStream->m_BrtPageSetup != nullptr) + m_oPageSetup = workSheetStream->m_BrtPageSetup; + if (workSheetStream->m_BrtPrintOptions != nullptr) + m_oPrintOptions = workSheetStream->m_BrtPrintOptions; + if (workSheetStream->m_HEADERFOOTER != nullptr) + m_oHeaderFooter = workSheetStream->m_HEADERFOOTER; + + if (workSheetStream->m_BrtSheetProtectionIso != nullptr) + m_oSheetProtection = workSheetStream->m_BrtSheetProtectionIso; + else if(workSheetStream->m_BrtSheetProtection != nullptr) + m_oSheetProtection = workSheetStream->m_BrtSheetProtection; + + if (workSheetStream->m_LISTPARTS != nullptr) + m_oTableParts = workSheetStream->m_LISTPARTS; + if (workSheetStream->m_SORTSTATE != nullptr) + m_oSortState = workSheetStream->m_SORTSTATE; + if (!workSheetStream->m_arCONDITIONALFORMATTING.empty()) + for(auto &item : workSheetStream->m_arCONDITIONALFORMATTING) + m_arrConditionalFormatting.push_back(new OOX::Spreadsheet::CConditionalFormatting(item)); + + if (workSheetStream->m_AUTOFILTER != nullptr) + m_oAutofilter = workSheetStream->m_AUTOFILTER; + if (workSheetStream->m_DVALS != nullptr) + m_oDataValidations = workSheetStream->m_DVALS; + if (workSheetStream->m_OLEOBJECTS != nullptr) + m_oOleObjects = workSheetStream->m_OLEOBJECTS; + if (workSheetStream->m_ACTIVEXCONTROLS != nullptr) + m_oControls = workSheetStream->m_ACTIVEXCONTROLS; + if (workSheetStream->m_BrtWsProp != nullptr) + m_oSheetPr = workSheetStream->m_BrtWsProp; + if (workSheetStream->m_BrtBkHim != nullptr) + m_oPicture = workSheetStream->m_BrtBkHim; + if (workSheetStream->m_RWBRK != nullptr) + m_oRowBreaks = workSheetStream->m_RWBRK; + if (workSheetStream->m_COLBRK != nullptr) + m_oColBreaks = workSheetStream->m_COLBRK; + if (workSheetStream->m_DCON != nullptr) + m_oDataConsolidate = workSheetStream->m_DCON; + + if (!workSheetStream->m_arBrtRangeProtectionIso.empty()) + m_oProtectedRanges = workSheetStream->m_arBrtRangeProtectionIso; + else if(!workSheetStream->m_arBrtRangeProtection.empty()) + m_oProtectedRanges = workSheetStream->m_arBrtRangeProtection; + + if (workSheetStream->m_FRTWORKSHEET != nullptr) + m_oExtLst = workSheetStream->m_FRTWORKSHEET; + } - if (workSheetStream->m_FRTWORKSHEET != nullptr) - m_oExtLst = workSheetStream->m_FRTWORKSHEET; } } diff --git a/Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.h b/Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.h index aa29d46542..3bca67ff58 100644 --- a/Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.h +++ b/Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.h @@ -72,7 +72,7 @@ namespace OOX { public: CWorksheet(OOX::Document* pMain); - CWorksheet(OOX::Document* pMain, const CPath& oRootPath, const CPath& oPath, const std::wstring & rId); + CWorksheet(OOX::Document* pMain, const CPath& oRootPath, const CPath& oPath, const std::wstring & rId, bool isChartSheet = false); virtual ~CWorksheet(); void readBin(const CPath& oPath); @@ -102,7 +102,7 @@ namespace OOX void toXMLEnd(NSStringUtils::CStringBuilder& writer) const; virtual const OOX::FileType type() const { - return OOX::Spreadsheet::FileTypes::Worksheet; + return m_bIsChartSheet?OOX::Spreadsheet::FileTypes::Chartsheets:OOX::Spreadsheet::FileTypes::Worksheet; } virtual const CPath DefaultDirectory() const { @@ -132,6 +132,7 @@ namespace OOX bool m_bPrepareForBinaryWriter; bool m_bWriteDirectlyToFile; + bool m_bIsChartSheet; nullable m_oCols; nullable m_oDimension; diff --git a/Common/DocxFormat/Source/XlsxFormat/Worksheets/WorksheetChildOther.h b/Common/DocxFormat/Source/XlsxFormat/Worksheets/WorksheetChildOther.h index fd06de7fc6..b64ba5c1df 100644 --- a/Common/DocxFormat/Source/XlsxFormat/Worksheets/WorksheetChildOther.h +++ b/Common/DocxFormat/Source/XlsxFormat/Worksheets/WorksheetChildOther.h @@ -56,6 +56,11 @@ #include "../../XlsbFormat/Biff12_records/BeginDCon.h" #include "../../XlsbFormat/Biff12_unions/DREFS.h" #include "../../XlsbFormat/Biff12_records/DRef.h" +#include "../../XlsbFormat/Biff12_unions/CSVIEWS.h" +#include "../../XlsbFormat/Biff12_unions/CSVIEW.h" +#include "../../XlsbFormat/Biff12_records/CsProp.h" +#include "../../XlsbFormat/Biff12_records/CsProtectionIso.h" +#include "../../XlsbFormat/Biff12_records/CsProtection.h" namespace OOX { @@ -436,44 +441,79 @@ namespace OOX } void ReadAttributes(XLS::BaseObjectPtr& obj) { - auto ptr = static_cast(obj.get()); - if(ptr != nullptr) + if(obj->get_type() == XLS::typePageSetup) { - m_oBlackAndWhite = ptr->fNoColor; - if(ptr->fNoColor) + auto ptr = static_cast(obj.get()); + if(ptr != nullptr) { - if(ptr->fNotes) - m_oCellComments = SimpleTypes::Spreadsheet::ECellComments::cellcommentsAtEnd; + m_oBlackAndWhite = ptr->fNoColor; + if(ptr->fNoColor) + { + if(ptr->fNotes) + m_oCellComments = SimpleTypes::Spreadsheet::ECellComments::cellcommentsAtEnd; + else + m_oCellComments = SimpleTypes::Spreadsheet::ECellComments::cellcommentsAsDisplayed; + } else - m_oCellComments = SimpleTypes::Spreadsheet::ECellComments::cellcommentsAsDisplayed; + m_oCellComments = SimpleTypes::Spreadsheet::ECellComments::cellcommentsNone; + + m_oCopies = ptr->iCopies; + m_oDraft = ptr->fDraft; + m_oErrors = (SimpleTypes::Spreadsheet::EPrintError)ptr->iErrors; + m_oFirstPageNumber = ptr->iPageStart; + m_oFitToHeight = ptr->iFitHeight; + m_oFitToWidth = ptr->iFitWidth; + m_oHorizontalDpi = ptr->iRes; + m_oRId = ptr->szRelID; + + if(ptr->fLandscape) + m_oOrientation = SimpleTypes::EPageOrientation::pageorientLandscape; + else + m_oOrientation = SimpleTypes::EPageOrientation::pageorientPortrait; + + if(ptr->fLeftToRight) + m_oPageOrder = SimpleTypes::Spreadsheet::EPageOrder::pageorderOverThenDown; + else + m_oPageOrder = SimpleTypes::Spreadsheet::EPageOrder::pageorderDownThenOver; + + m_oPaperSize = (SimpleTypes::Spreadsheet::EPageSize)ptr->iPaperSize; + m_oScale = ptr->iScale; + m_oUseFirstPageNumber = ptr->fUsePage; + m_oVerticalDpi = ptr->iVRes; + } - else - m_oCellComments = SimpleTypes::Spreadsheet::ECellComments::cellcommentsNone; + } + else if(obj->get_type() == XLS::typeCsPageSetup) + { + auto ptr = static_cast(obj.get()); + if(ptr != nullptr) + { + m_oBlackAndWhite = ptr->fNoColor; + if(ptr->fNoColor) + { + if(ptr->fNotes) + m_oCellComments = SimpleTypes::Spreadsheet::ECellComments::cellcommentsAtEnd; + else + m_oCellComments = SimpleTypes::Spreadsheet::ECellComments::cellcommentsAsDisplayed; + } + else + m_oCellComments = SimpleTypes::Spreadsheet::ECellComments::cellcommentsNone; - m_oCopies = ptr->iCopies; - m_oDraft = ptr->fDraft; - m_oErrors = (SimpleTypes::Spreadsheet::EPrintError)ptr->iErrors; - m_oFirstPageNumber = ptr->iPageStart; - m_oFitToHeight = ptr->iFitHeight; - m_oFitToWidth = ptr->iFitWidth; - m_oHorizontalDpi = ptr->iRes; - m_oRId = ptr->szRelID; + m_oCopies = ptr->iCopies; + m_oDraft = ptr->fDraft; + m_oFirstPageNumber = ptr->iPageStart; + m_oHorizontalDpi = ptr->iRes; + m_oRId = ptr->szRelID; - if(ptr->fLandscape) - m_oOrientation = SimpleTypes::EPageOrientation::pageorientLandscape; - else - m_oOrientation = SimpleTypes::EPageOrientation::pageorientPortrait; - - if(ptr->fLeftToRight) - m_oPageOrder = SimpleTypes::Spreadsheet::EPageOrder::pageorderOverThenDown; - else - m_oPageOrder = SimpleTypes::Spreadsheet::EPageOrder::pageorderDownThenOver; - - m_oPaperSize = (SimpleTypes::Spreadsheet::EPageSize)ptr->iPaperSize; - m_oScale = ptr->iScale; - m_oUseFirstPageNumber = ptr->fUsePage; - m_oVerticalDpi = ptr->iVRes; + if(ptr->fLandscape) + m_oOrientation = SimpleTypes::EPageOrientation::pageorientLandscape; + else + m_oOrientation = SimpleTypes::EPageOrientation::pageorientPortrait; + m_oPaperSize = (SimpleTypes::Spreadsheet::EPageSize)ptr->iPaperSize; + m_oUseFirstPageNumber = ptr->fUsePage; + m_oVerticalDpi = ptr->iVRes; + } } } nullable> m_oBlackAndWhite; @@ -975,21 +1015,31 @@ namespace OOX } void fromBin(XLS::BaseObjectPtr& obj) { - auto pWSVIEW2 = static_cast(obj.get()); - if (pWSVIEW2 == nullptr) - return; - - ReadAttributes(pWSVIEW2->m_BrtBeginWsView); - - m_oPane = pWSVIEW2->m_BrtPane; - - if (pWSVIEW2->m_arBrtSel.empty()) - return; - - for(auto &pSel : pWSVIEW2->m_arBrtSel) + if(obj->get_type() == XLS::typeWSVIEW2) { - m_arrItems.push_back(new CSelection(pSel)); + auto pWSVIEW2 = static_cast(obj.get()); + if (pWSVIEW2 == nullptr) + return; + ReadAttributes(pWSVIEW2->m_BrtBeginWsView); + + m_oPane = pWSVIEW2->m_BrtPane; + + if (pWSVIEW2->m_arBrtSel.empty()) + return; + + for(auto &pSel : pWSVIEW2->m_arBrtSel) + { + m_arrItems.push_back(new CSelection(pSel)); + } + } + else if(obj->get_type() == XLS::typeCSVIEW) + { + auto pCSVIEW = static_cast(obj.get()); + if (pCSVIEW == nullptr) + return; + + ReadAttributes(pCSVIEW->m_BrtBeginCsView); } } virtual EElementType getType () const @@ -1026,30 +1076,42 @@ namespace OOX void ReadAttributes(XLS::BaseObjectPtr& obj) { - auto pWsView = static_cast(obj.get()); - if(pWsView != nullptr) + if(obj->get_type() == XLS::typeBeginWsView) { - m_oColorId = pWsView->icvHdr; - m_oDefaultGridColor = pWsView->fDefaultHdr; - m_oRightToLeft = pWsView->fRightToLeft; - m_oShowFormulas = pWsView->fDspFmlaRt; - m_oShowGridLines = pWsView->fDspGridRt; - m_oShowOutlineSymbols = pWsView->fDspGuts; - m_oShowRowColHeaders = pWsView->fDspRwColRt; - m_oShowRuler = pWsView->fDspRuler; - m_oShowWhiteSpace = pWsView->fWhitespaceHidden; - m_oShowZeros = pWsView->fDspZerosRt; - m_oTabSelected = pWsView->fSelected; - m_oTopLeftCell = pWsView->topLeftCell; - m_oView = (SimpleTypes::Spreadsheet::ESheetViewType)pWsView->xlView; - m_oWindowProtection = pWsView->fWnProt; - m_oWorkbookViewId = pWsView->iWbkView; - m_oZoomScale = pWsView->wScale; - m_oZoomScaleNormal = pWsView->wScaleNormal; - m_oZoomScalePageLayoutView = pWsView->wScalePLV; - m_oZoomScaleSheetLayoutView = pWsView->wScaleSLV; + auto pWsView = static_cast(obj.get()); + if(pWsView != nullptr) + { + m_oColorId = pWsView->icvHdr; + m_oDefaultGridColor = pWsView->fDefaultHdr; + m_oRightToLeft = pWsView->fRightToLeft; + m_oShowFormulas = pWsView->fDspFmlaRt; + m_oShowGridLines = pWsView->fDspGridRt; + m_oShowOutlineSymbols = pWsView->fDspGuts; + m_oShowRowColHeaders = pWsView->fDspRwColRt; + m_oShowRuler = pWsView->fDspRuler; + m_oShowWhiteSpace = pWsView->fWhitespaceHidden; + m_oShowZeros = pWsView->fDspZerosRt; + m_oTabSelected = pWsView->fSelected; + m_oTopLeftCell = pWsView->topLeftCell; + m_oView = (SimpleTypes::Spreadsheet::ESheetViewType)pWsView->xlView; + m_oWindowProtection = pWsView->fWnProt; + m_oWorkbookViewId = pWsView->iWbkView; + m_oZoomScale = pWsView->wScale; + m_oZoomScaleNormal = pWsView->wScaleNormal; + m_oZoomScalePageLayoutView = pWsView->wScalePLV; + m_oZoomScaleSheetLayoutView = pWsView->wScaleSLV; + } + } + else if(obj->get_type() == XLS::typeBeginCsView) + { + auto pWsView = static_cast(obj.get()); + if(pWsView != nullptr) + { + m_oTabSelected = pWsView->fSelected; + m_oWorkbookViewId = pWsView->iWbkView; + m_oZoomScale = pWsView->wScale; + } } - } public: @@ -1125,15 +1187,31 @@ namespace OOX } void fromBin(XLS::BaseObjectPtr& obj) { - auto arView = static_cast(obj.get())->m_arWSVIEW2; - if (arView.empty()) - return; - - for(auto &pView : arView) + if(obj->get_type() == XLS::typeWSVIEWS2) { - CSheetView *pSheetView = new CSheetView(pView); - m_arrItems.push_back(pSheetView); + auto arView = static_cast(obj.get())->m_arWSVIEW2; + if (arView.empty()) + return; + for(auto &pView : arView) + { + CSheetView *pSheetView = new CSheetView(pView); + m_arrItems.push_back(pSheetView); + + } + } + else if(obj->get_type() == XLS::typeCSVIEWS) + { + auto arView = static_cast(obj.get())->m_arCSVIEW; + if (arView.empty()) + return; + + for(auto &pView : arView) + { + CSheetView *pSheetView = new CSheetView(pView); + m_arrItems.push_back(pSheetView); + + } } } virtual EElementType getType () const @@ -1345,8 +1423,11 @@ namespace OOX } void fromBin(XLS::BaseObjectPtr& obj) { - m_oPageSetUpPr = obj; - m_oOutlinePr = obj; + if(obj->get_type() == XLS::typeWsProp) + { + m_oPageSetUpPr = obj; + m_oOutlinePr = obj; + } ReadAttributes(obj); } @@ -1358,26 +1439,44 @@ namespace OOX private: void ReadAttributes(XLS::BaseObjectPtr& obj) { - auto ptr = static_cast(obj.get()); - if(ptr != nullptr) + if(obj->get_type() == XLS::typeWsProp) { - if(!ptr->strName.value.value().empty()) - m_oCodeName = ptr->strName.value.value(); + auto ptr = static_cast(obj.get()); + if(ptr != nullptr) + { + if(!ptr->strName.value.value().empty()) + m_oCodeName = ptr->strName.value.value(); - m_oEnableFormatConditionsCalculation = ptr->fCondFmtCalc; - m_oFilterMode = ptr->fFilterMode; - m_oPublished = ptr->fPublish; - m_oSyncHorizontal = ptr->fSyncHoriz; - m_oSyncVertical = ptr->fSyncVert; - m_oTransitionEntry = ptr->fAltFormulaEntry; - m_oTransitionEvaluation = ptr->fAltExprEval; + m_oEnableFormatConditionsCalculation = ptr->fCondFmtCalc; + m_oFilterMode = ptr->fFilterMode; + m_oPublished = ptr->fPublish; + m_oSyncHorizontal = ptr->fSyncHoriz; + m_oSyncVertical = ptr->fSyncVert; + m_oTransitionEntry = ptr->fAltFormulaEntry; + m_oTransitionEvaluation = ptr->fAltExprEval; - if(!ptr->syncRef.empty()) - m_oSyncRef = ptr->syncRef; + if(!ptr->syncRef.empty()) + m_oSyncRef = ptr->syncRef; - m_oTabColor.Init(); - m_oTabColor->fromBin(dynamic_cast(&ptr->brtcolorTab)); + m_oTabColor.Init(); + m_oTabColor->fromBin(dynamic_cast(&ptr->brtcolorTab)); + } } + else if(obj->get_type() == XLS::typeCsProp) + { + auto ptr = static_cast(obj.get()); + if(ptr != nullptr) + { + if(!ptr->strName.value.value().empty()) + m_oCodeName = ptr->strName.value.value(); + + m_oPublished = ptr->fPublish; + + m_oTabColor.Init(); + m_oTabColor->fromBin(dynamic_cast(&ptr->brtcolorTab)); + } + } + } void ReadAttributes(XmlUtils::CXmlLiteReader& oReader) { @@ -2101,61 +2200,86 @@ namespace OOX void ReadAttributes(XLS::BaseObjectPtr& obj) { - auto ptrRecord = static_cast(obj.get()); - - if(ptrRecord != nullptr && ptrRecord->getTypeId() == XLSB::rt_SheetProtection) + if(obj->get_type() == XLS::typeSheetProtection) { auto ptr = static_cast(obj.get()); - - m_oPassword = std::to_wstring(ptr->protpwd); - m_oAutoFilter = (bool)ptr->fAutoFilter; - m_oContent = true; - m_oDeleteColumns = (bool)ptr->fDeleteColumns; - m_oDeleteRows = (bool)ptr->fDeleteRows; - m_oFormatCells = (bool)ptr->fFormatCells; - m_oFormatColumns = (bool)ptr->fFormatColumns; - m_oFormatRows = (bool)ptr->fFormatRows; - m_oInsertColumns = (bool)ptr->fInsertColumns; - m_oInsertHyperlinks = (bool)ptr->fInsertHyperlinks; - m_oInsertRows = (bool)ptr->fInsertRows; - m_oObjects = (bool)ptr->fObjects; - m_oPivotTables = (bool)ptr->fPivotTables; - m_oScenarios = (bool)ptr->fScenarios; - m_oSelectLockedCells = (bool)ptr->fSelLockedCells; - m_oSelectUnlockedCells = (bool)ptr->fSelUnlockedCells; - m_oSheet = (bool)ptr->fLocked; - m_oSort = (bool)ptr->fSort; - + if(ptr != nullptr) + { + m_oPassword = std::to_wstring(ptr->protpwd); + m_oAutoFilter = (bool)ptr->fAutoFilter; + m_oContent = true; + m_oDeleteColumns = (bool)ptr->fDeleteColumns; + m_oDeleteRows = (bool)ptr->fDeleteRows; + m_oFormatCells = (bool)ptr->fFormatCells; + m_oFormatColumns = (bool)ptr->fFormatColumns; + m_oFormatRows = (bool)ptr->fFormatRows; + m_oInsertColumns = (bool)ptr->fInsertColumns; + m_oInsertHyperlinks = (bool)ptr->fInsertHyperlinks; + m_oInsertRows = (bool)ptr->fInsertRows; + m_oObjects = (bool)ptr->fObjects; + m_oPivotTables = (bool)ptr->fPivotTables; + m_oScenarios = (bool)ptr->fScenarios; + m_oSelectLockedCells = (bool)ptr->fSelLockedCells; + m_oSelectUnlockedCells = (bool)ptr->fSelUnlockedCells; + m_oSheet = (bool)ptr->fLocked; + m_oSort = (bool)ptr->fSort; + } } - else if(ptrRecord != nullptr && ptrRecord->getTypeId() == XLSB::rt_SheetProtectionIso) + else if(obj->get_type() == XLS::typeSheetProtectionIso) { auto ptr = static_cast(obj.get()); - - m_oAlgorithmName = ptr->ipdPasswordData.szAlgName.value(); - m_oSpinCount = ptr->dwSpinCount; - m_oHashValue = std::wstring(ptr->ipdPasswordData.rgbHash.rgbData.begin(), - ptr->ipdPasswordData.rgbHash.rgbData.end()); - m_oSaltValue = std::wstring(ptr->ipdPasswordData.rgbSalt.rgbData.begin(), - ptr->ipdPasswordData.rgbSalt.rgbData.end()); - m_oAutoFilter = (bool)ptr->fAutoFilter; - m_oContent = true; - m_oDeleteColumns = (bool)ptr->fDeleteColumns; - m_oDeleteRows = (bool)ptr->fDeleteRows; - m_oFormatCells = (bool)ptr->fFormatCells; - m_oFormatColumns = (bool)ptr->fFormatColumns; - m_oFormatRows = (bool)ptr->fFormatRows; - m_oInsertColumns = (bool)ptr->fInsertColumns; - m_oInsertHyperlinks = (bool)ptr->fInsertHyperlinks; - m_oInsertRows = (bool)ptr->fInsertRows; - m_oObjects = (bool)ptr->fObjects; - m_oPivotTables = (bool)ptr->fPivotTables; - m_oScenarios = (bool)ptr->fScenarios; - m_oSelectLockedCells = (bool)ptr->fSelLockedCells; - m_oSelectUnlockedCells = (bool)ptr->fSelUnlockedCells; - m_oSheet = (bool)ptr->fLocked; - m_oSort = (bool)ptr->fSort; + if(ptr != nullptr) + { + m_oAlgorithmName = ptr->ipdPasswordData.szAlgName.value(); + m_oSpinCount = ptr->dwSpinCount; + m_oHashValue = std::wstring(ptr->ipdPasswordData.rgbHash.rgbData.begin(), + ptr->ipdPasswordData.rgbHash.rgbData.end()); + m_oSaltValue = std::wstring(ptr->ipdPasswordData.rgbSalt.rgbData.begin(), + ptr->ipdPasswordData.rgbSalt.rgbData.end()); + m_oAutoFilter = (bool)ptr->fAutoFilter; + m_oContent = true; + m_oDeleteColumns = (bool)ptr->fDeleteColumns; + m_oDeleteRows = (bool)ptr->fDeleteRows; + m_oFormatCells = (bool)ptr->fFormatCells; + m_oFormatColumns = (bool)ptr->fFormatColumns; + m_oFormatRows = (bool)ptr->fFormatRows; + m_oInsertColumns = (bool)ptr->fInsertColumns; + m_oInsertHyperlinks = (bool)ptr->fInsertHyperlinks; + m_oInsertRows = (bool)ptr->fInsertRows; + m_oObjects = (bool)ptr->fObjects; + m_oPivotTables = (bool)ptr->fPivotTables; + m_oScenarios = (bool)ptr->fScenarios; + m_oSelectLockedCells = (bool)ptr->fSelLockedCells; + m_oSelectUnlockedCells = (bool)ptr->fSelUnlockedCells; + m_oSheet = (bool)ptr->fLocked; + m_oSort = (bool)ptr->fSort; + } + } + else if(obj->get_type() == XLS::typeCsProtection) + { + auto ptr = static_cast(obj.get()); + if(ptr != nullptr) + { + m_oPassword = std::to_wstring(ptr->protpwd); + m_oObjects = (bool)ptr->fObjects; + m_oSheet = (bool)ptr->fLocked; + } + } + else if(obj->get_type() == XLS::typeCsProtectionIso) + { + auto ptr = static_cast(obj.get()); + if(ptr != nullptr) + { + m_oAlgorithmName = ptr->ipdPasswordData.szAlgName.value(); + m_oSpinCount = ptr->dwSpinCount; + m_oHashValue = std::wstring(ptr->ipdPasswordData.rgbHash.rgbData.begin(), + ptr->ipdPasswordData.rgbHash.rgbData.end()); + m_oSaltValue = std::wstring(ptr->ipdPasswordData.rgbSalt.rgbData.begin(), + ptr->ipdPasswordData.rgbSalt.rgbData.end()); + m_oObjects = (bool)ptr->fObjects; + m_oSheet = (bool)ptr->fLocked; + } } - }