LibreOffice Module sc (master)  1
xetable.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_XETABLE_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_XETABLE_HXX
22 
23 #include "xltable.hxx"
24 
25 #include <vector>
26 #include "xladdress.hxx"
27 #include "xecontent.hxx"
28 #include "xerecord.hxx"
29 #include "xestyle.hxx"
30 #include "xlformula.hxx"
31 
32 #include <map>
33 #include <memory>
34 #include <unordered_map>
35 #include <o3tl/sorted_vector.hxx>
36 
37 class XclExtLst;
38 
39 /* ============================================================================
40 Export of cell tables including row and column description.
41 - Managing all used and formatted cells in a sheet.
42 - Row and column properties, i.e. width/height, visibility.
43 - Find default row formatting and default column formatting.
44 - Merged cell ranges.
45 ============================================================================ */
46 
47 // Helper records for cell records
48 
51 {
52 public:
53  explicit XclExpStringRec( const XclExpRoot& rRoot, const OUString& rResult );
54 
55 private:
56  virtual void WriteBody( XclExpStream& rStrm ) override;
57 
58 private:
60 };
61 
62 // Additional records for special formula ranges
63 
66 {
67 public:
69  bool IsBasePos( sal_uInt16 nXclCol, sal_uInt32 nXclRow ) const;
70 
72  virtual XclTokenArrayRef CreateCellTokenArray( const XclExpRoot& rRoot ) const = 0;
74  virtual bool IsVolatile() const = 0;
75 
76 protected:
78  explicit XclExpRangeFmlaBase(
79  sal_uInt16 nRecId, sal_uInt32 nRecSize, const ScAddress& rScPos );
81  explicit XclExpRangeFmlaBase(
82  sal_uInt16 nRecId, sal_uInt32 nRecSize, const ScRange& rScRange );
83 
85  void Extend( const ScAddress& rScPos );
86 
88  void WriteRangeAddress( XclExpStream& rStrm ) const;
89 
90 protected:
93 };
94 
96 
97 // Array formulas =============================================================
98 
99 class ScTokenArray;
100 
109 {
110 public:
111  explicit XclExpArray( const XclTokenArrayRef& xTokArr, const ScRange& rScRange );
112 
114  virtual XclTokenArrayRef CreateCellTokenArray( const XclExpRoot& rRoot ) const override;
116  virtual bool IsVolatile() const override;
117 
118 private:
119  virtual void WriteBody( XclExpStream& rStrm ) override;
120 
121 private:
123 };
124 
126 
128 class XclExpArrayBuffer : protected XclExpRoot
129 {
130 public:
131  explicit XclExpArrayBuffer( const XclExpRoot& rRoot );
132 
134  XclExpArrayRef CreateArray( const ScTokenArray& rScTokArr, const ScRange& rScRange );
136  XclExpArrayRef FindArray( const ScTokenArray& rScTokArr, const ScAddress& rBasePos ) const;
137 
138 private:
139  typedef ::std::map< ScAddress, XclExpArrayRef > XclExpArrayMap;
140  XclExpArrayMap maRecMap;
141 };
142 
143 // Shared formulas ============================================================
144 
153 {
154 public:
156  explicit XclExpShrfmla( const XclTokenArrayRef& xTokArr, const ScAddress& rScPos );
157 
159  void ExtendRange( const ScAddress& rScPos );
160 
162  virtual XclTokenArrayRef CreateCellTokenArray( const XclExpRoot& rRoot ) const override;
164  virtual bool IsVolatile() const override;
165 
166 private:
167  virtual void WriteBody( XclExpStream& rStrm ) override;
168 
169 private:
172 };
173 
175 
178 {
179 public:
180  explicit XclExpShrfmlaBuffer( const XclExpRoot& rRoot );
181 
188  XclExpShrfmlaRef CreateOrExtendShrfmla( const ScFormulaCell& rScCell, const ScAddress& rScPos );
189 
190 private:
196  bool IsValidTokenArray( const ScTokenArray& rArray ) const;
197 
198  typedef std::unordered_map<const ScTokenArray*, XclExpShrfmlaRef> TokensType;
200 
201  TokensType maRecMap;
202  BadTokenArraysType maBadTokens;
203 };
204 
205 // Multiple operations ========================================================
206 
209 {
210 public:
211  explicit XclExpTableop( const ScAddress& rScPos,
212  const XclMultipleOpRefs& rRefs, sal_uInt8 nScMode );
213 
216  bool TryExtend( const ScAddress& rScPos, const XclMultipleOpRefs& rRefs );
217 
219  void Finalize();
220 
222  virtual XclTokenArrayRef CreateCellTokenArray( const XclExpRoot& rRoot ) const override;
224  virtual bool IsVolatile() const override;
226  virtual void Save( XclExpStream& rStrm ) override;
227 
228 private:
230  bool IsAppendable( sal_uInt16 nXclCol, sal_uInt16 nXclRow ) const;
231 
233  virtual void WriteBody( XclExpStream& rStrm ) override;
234 
235 private:
236  sal_uInt16 mnLastAppXclCol;
237  sal_uInt16 mnColInpXclCol;
238  sal_uInt32 mnColInpXclRow;
239  sal_uInt16 mnRowInpXclCol;
240  sal_uInt32 mnRowInpXclRow;
242  bool mbValid;
243 };
244 
246 
249 {
250 public:
251  explicit XclExpTableopBuffer( const XclExpRoot& rRoot );
252 
258  const ScTokenArray& rScTokArr, const ScAddress& rScPos );
259 
261  void Finalize();
262 
263 private:
265  XclExpTableopRef TryCreate( const ScAddress& rScPos, const XclMultipleOpRefs& rRefs );
266 
267 private:
269 };
270 
271 // Cell records
272 
275 {
276 public:
278  const XclAddress& GetXclPos() const { return maXclPos; }
280  sal_uInt16 GetXclCol() const { return maXclPos.mnCol; }
282  sal_uInt32 GetXclRow() const { return maXclPos.mnRow; }
283 
285  virtual sal_uInt16 GetLastXclCol() const = 0;
287  virtual sal_uInt32 GetFirstXFId() const = 0;
289  virtual bool IsEmpty() const = 0;
291  virtual bool IsMultiLineText() const;
292 
294  virtual bool TryMerge( const XclExpCellBase& rCell );
297  virtual void ConvertXFIndexes( const XclExpRoot& rRoot ) = 0;
299  virtual void GetBlankXFIndexes( ScfUInt16Vec& rXFIndexes ) const;
301  virtual void RemoveUnusedBlankCells( const ScfUInt16Vec& rXFIndexes );
302 
303 protected:
304  explicit XclExpCellBase(
305  sal_uInt16 nRecId, std::size_t nContSize, const XclAddress& rXclPos );
306 
308  void SetXclCol( sal_uInt16 nXclCol ) { maXclPos.mnCol = nXclCol; }
309 
310 private:
312 };
313 
315 
316 // Single cell records ========================================================
317 
320 {
321 public:
323  virtual sal_uInt16 GetLastXclCol() const override;
325  virtual sal_uInt32 GetFirstXFId() const override;
327  virtual bool IsEmpty() const override;
329  virtual void ConvertXFIndexes( const XclExpRoot& rRoot ) override;
331  virtual void Save( XclExpStream& rStrm ) override;
332 
333 protected:
334  explicit XclExpSingleCellBase( sal_uInt16 nRecId, std::size_t nContSize,
335  const XclAddress& rXclPos, sal_uInt32 nXFId );
336 
337  explicit XclExpSingleCellBase( const XclExpRoot& rRoot,
338  sal_uInt16 nRecId, std::size_t nContSize, const XclAddress& rXclPos,
339  const ScPatternAttr* pPattern, sal_Int16 nScript, sal_uInt32 nForcedXFId );
340 
341  void SetContSize( std::size_t nContSize ) { mnContSize = nContSize; }
342  std::size_t GetContSize() const { return mnContSize; }
343 
344  void SetXFId( sal_uInt32 nXFId ) { maXFId.mnXFId = nXFId; }
345  sal_uInt32 GetXFId() const { return maXFId.mnXFId; }
346 
347 private:
349  virtual void WriteBody( XclExpStream& rStrm ) override;
351  virtual void WriteContents( XclExpStream& rStrm ) = 0;
352 
353 private:
355  std::size_t mnContSize;
356 };
357 
360 {
361 public:
362  explicit XclExpNumberCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
363  const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
364  double fValue );
365 
366  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
367 private:
368  virtual void WriteContents( XclExpStream& rStrm ) override;
369 
370 private:
371  double mfValue;
372 };
373 
376 {
377 public:
378  explicit XclExpBooleanCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
379  const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
380  bool bValue );
381 
382  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
383 private:
384  virtual void WriteContents( XclExpStream& rStrm ) override;
385 
386 private:
387  bool mbValue;
388 };
389 
391 class EditTextObject;
392 
400 {
401 public:
403  explicit XclExpLabelCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
404  const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
405  const OUString& rStr );
406 
408  explicit XclExpLabelCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
409  const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
410  const EditTextObject* pEditText, XclExpHyperlinkHelper& rHlinkHelper );
411 
413  virtual bool IsMultiLineText() const override;
414 
415  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
416 private:
418  void Init( const XclExpRoot& rRoot,
419  const ScPatternAttr* pPattern, XclExpStringRef const & xText );
420 
421  virtual void WriteContents( XclExpStream& rStrm ) override;
422 
423 private:
425  sal_uInt32 mnSstIndex;
426  bool mbLineBreak;
427 };
428 
429 class ScFormulaCell;
430 
433 {
434 public:
435  explicit XclExpFormulaCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
436  const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
437  const ScFormulaCell& rScFmlaCell,
438  XclExpArrayBuffer& rArrayBfr,
439  XclExpShrfmlaBuffer& rShrfmlaBfr,
440  XclExpTableopBuffer& rTableopBfr );
441 
443  virtual void Save( XclExpStream& rStrm ) override;
444  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
445 
446 private:
447  virtual void WriteContents( XclExpStream& rStrm ) override;
448 
449 private:
454 };
455 
456 // Multiple cell records ======================================================
457 
459 {
460  sal_uInt16 mnCount;
461 
462  explicit XclExpMultiXFId( sal_uInt32 nXFId, sal_uInt16 nCount = 1 ) :
463  XclExpXFId( nXFId ), mnCount( nCount ) {}
464 };
465 
468 {
469 public:
471  virtual sal_uInt16 GetLastXclCol() const override;
473  virtual sal_uInt32 GetFirstXFId() const override;
475  virtual bool IsEmpty() const override;
476 
478  virtual void ConvertXFIndexes( const XclExpRoot& rRoot ) override;
481  virtual void Save( XclExpStream& rStrm ) override;
482  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
483 
484 protected:
485  explicit XclExpMultiCellBase( sal_uInt16 nRecId, sal_uInt16 nMulRecId,
486  std::size_t nContSize, const XclAddress& rXclPos );
487 
489  sal_uInt16 GetCellCount() const;
490 
492  void AppendXFId( const XclExpMultiXFId& rXFId );
494  void AppendXFId( const XclExpRoot& rRoot,
495  const ScPatternAttr* pPattern, sal_uInt16 nScript,
496  sal_uInt32 nForcedXFId, sal_uInt16 nCount = 1 );
497 
499  bool TryMergeXFIds( const XclExpMultiCellBase& rCell );
501  void GetXFIndexes( ScfUInt16Vec& rXFIndexes ) const;
502 
505  void RemoveUnusedXFIndexes( const ScfUInt16Vec& rXFIndexes );
506 
507 private:
510  virtual void WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol ) = 0;
511  virtual void WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol ) = 0;
512 
513 private:
514  typedef ::std::vector< XclExpMultiXFId > XclExpMultiXFIdDeq;
515 
516  sal_uInt16 mnMulRecId;
517  std::size_t mnContSize;
518  XclExpMultiXFIdDeq maXFIds;
519 };
520 
523 {
524 public:
525  explicit XclExpBlankCell( const XclAddress& rXclPos, const XclExpMultiXFId& rXFId );
526 
527  explicit XclExpBlankCell( const XclExpRoot& rRoot,
528  const XclAddress& rXclPos, sal_uInt16 nLastXclCol,
529  const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId );
530 
532  virtual bool TryMerge( const XclExpCellBase& rCell ) override;
534  virtual void GetBlankXFIndexes( ScfUInt16Vec& rXFIndexes ) const override;
536  virtual void RemoveUnusedBlankCells( const ScfUInt16Vec& rXFIndexes ) override;
537 
538 private:
540  virtual void WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol ) override;
541  virtual void WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol ) override;
542 };
543 
546 {
547 public:
548  explicit XclExpRkCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
549  const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
550  sal_Int32 nRkValue );
551 
553  virtual bool TryMerge( const XclExpCellBase& rCell ) override;
554 
555 private:
557  virtual void WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol ) override;
558  virtual void WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol ) override;
559 
560 private:
562 };
563 
564 // Rows and Columns
565 
566 class ScOutlineArray;
567 
570 {
571 public:
573  bool IsCollapsed() const { return mbCurrCollapse; }
575  sal_uInt8 GetLevel() const { return ::std::min( mnCurrLevel, EXC_OUTLINE_MAX ); }
576 
577 protected:
580  explicit XclExpOutlineBuffer( const XclExpRoot& rRoot, bool bRows );
581 
583  void UpdateColRow( SCCOLROW nScPos );
584 
585 private:
588  {
590  bool mbHidden;
591  explicit XclExpLevelInfo() : mnScEndPos( 0 ), mbHidden( false ) {}
592  };
593 
595  std::vector< XclExpLevelInfo >
599 };
600 
603 {
604 public:
605  explicit XclExpColOutlineBuffer( const XclExpRoot& rRoot ) :
606  XclExpOutlineBuffer( rRoot, false ) {}
607 
609  void Update( SCCOL nScCol )
610  { UpdateColRow( static_cast< SCCOLROW >( nScCol ) ); }
611 };
612 
615 {
616 public:
617  explicit XclExpRowOutlineBuffer( const XclExpRoot& rRoot ) :
618  XclExpOutlineBuffer( rRoot, true ) {}
619 
621  void Update( SCROW nScRow )
622  { UpdateColRow( static_cast< SCCOLROW >( nScRow ) ); }
623 };
624 
626 class XclExpGuts : public XclExpRecord
627 {
628 public:
629  explicit XclExpGuts( const XclExpRoot& rRoot );
630 
631 private:
632  virtual void WriteBody( XclExpStream& rStrm ) override;
633 
634 private:
635  sal_uInt16 mnColLevels;
636  sal_uInt16 mnColWidth;
637  sal_uInt16 mnRowLevels;
638  sal_uInt16 mnRowWidth;
639 };
640 
643 {
644 public:
645  explicit XclExpDimensions( const XclExpRoot& rRoot );
646 
648  void SetDimensions(
649  sal_uInt16 nFirstUsedXclCol, sal_uInt32 nFirstUsedXclRow,
650  sal_uInt16 nFirstFreeXclCol, sal_uInt32 nFirstFreeXclRow );
651 
652  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
653 private:
655  virtual void WriteBody( XclExpStream& rStrm ) override;
656 
657 private:
659  sal_uInt32 mnFirstUsedXclRow;
660  sal_uInt32 mnFirstFreeXclRow;
661  sal_uInt16 mnFirstUsedXclCol;
662  sal_uInt16 mnFirstFreeXclCol;
663 };
664 
681 {
682 public:
683  explicit XclExpDefcolwidth( const XclExpRoot& rRoot );
684 
686  bool IsDefWidth( sal_uInt16 nXclColWidth ) const;
687 
689  void SetDefWidth( sal_uInt16 nXclColWidth, bool bXLS );
690 
691  virtual void Save(XclExpStream& rStrm) override;
692 };
693 
700 class XclExpColinfo : public XclExpRecord, protected XclExpRoot
701 {
702 public:
704  explicit XclExpColinfo( const XclExpRoot& rRoot,
705  SCCOL nScCol, SCROW nLastScRow,
706  XclExpColOutlineBuffer& rOutlineBfr );
707 
709  void ConvertXFIndexes();
710 
714  bool TryMerge( const XclExpColinfo& rColInfo );
715 
717  sal_uInt16 GetColWidth() const { return mnWidth; }
719  sal_uInt16 GetXFIndex() const { return maXFId.mnXFIndex; }
721  sal_uInt16 GetColCount() const { return mnLastXclCol - mnFirstXclCol + 1; }
722 
724  bool IsDefault( const XclExpDefcolwidth& rDefColWidth );
725 
726  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
727 
728 private:
730  virtual void WriteBody( XclExpStream& rStrm ) override;
731 
732 private:
735  sal_uInt16 mnWidth;
736  sal_uInt16 mnScWidth;
737  sal_uInt16 mnFlags;
739  sal_uInt16 mnFirstXclCol;
740  sal_uInt16 mnLastXclCol;
741 };
742 
751 {
752 public:
753  explicit XclExpColinfoBuffer( const XclExpRoot& rRoot );
754 
757  void Initialize( SCROW nLastScRow );
760  void Finalize( ScfUInt16Vec& rXFIndexes, bool bXLS );
761 
763  virtual void Save( XclExpStream& rStrm ) override;
764  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
766  double GetDefColWidth() const { return maDefcolwidth.GetValue(); }
767 
768 private:
771 
772  XclExpColinfoList maColInfos;
776 };
777 
778 class XclExpRow;
779 
782 {
783  sal_uInt16 mnFlags;
784  sal_uInt16 mnHeight;
785 
786  explicit XclExpDefaultRowData();
787  explicit XclExpDefaultRowData( const XclExpRow& rRow );
788 
790  bool IsHidden() const { return ::get_flag( mnFlags, EXC_DEFROW_HIDDEN ); }
792  bool IsUnsynced() const { return ::get_flag( mnFlags, EXC_DEFROW_UNSYNCED ); }
793 };
794 
797 {
798 public:
799  explicit XclExpDefrowheight();
800 
802  void SetDefaultData( const XclExpDefaultRowData& rDefData );
804 private:
806  virtual void WriteBody( XclExpStream& rStrm ) override;
807 
808 private:
810 };
811 
823 class XclExpRow : public XclExpRecord, protected XclExpRoot
824 {
825 public:
829  explicit XclExpRow( const XclExpRoot& rRoot, sal_uInt32 nXclRow,
830  XclExpRowOutlineBuffer& rOutlineBfr, bool bAlwaysEmpty, bool bHidden, sal_uInt16 nHeight );
831 
833  sal_uInt32 GetXclRow() const { return mnXclRow; }
835  sal_uInt16 GetHeight() const { return mnHeight; }
837  bool IsEmpty() const { return maCellList.IsEmpty(); }
843  bool IsEnabled() const { return mbEnabled; }
844 
846  void AppendCell( XclExpCellRef const & xCell, bool bIsMergedBase );
847 
849  void Finalize( const ScfUInt16Vec& rColXFIndexes,
850  bool bUpdateProgress );
851 
854  sal_uInt16 GetFirstUsedXclCol() const;
857  sal_uInt16 GetFirstFreeXclCol() const;
858 
863  bool IsDefaultable() const;
867  void DisableIfDefault( const XclExpDefaultRowData& rDefRowData );
868 
870  void WriteCellList( XclExpStream& rStrm );
871 
873  virtual void Save( XclExpStream& rStrm ) override;
874  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
875 
876  sal_uInt32 GetXclRowRpt() const { return mnXclRowRpt; }
877  void SetXclRowRpt( sal_uInt32 nRpt ){ mnXclRowRpt = nRpt; }
878 private:
880  void InsertCell( XclExpCellRef xCell, size_t nPos, bool bIsMergedBase );
881 
883  virtual void WriteBody( XclExpStream& rStrm ) override;
884 
885 private:
888  sal_uInt32 mnXclRow;
889  sal_uInt16 mnHeight;
890  sal_uInt16 mnFlags;
891  sal_uInt16 mnXFIndex;
893  sal_uInt32 mnXclRowRpt;
894  sal_uInt32 mnCurrentRow;
896  bool mbEnabled;
897 };
898 
906 class XclExpRowBuffer : public XclExpRecordBase, protected XclExpRoot
907 {
908 public:
909  explicit XclExpRowBuffer( const XclExpRoot& rRoot );
910 
912  void AppendCell( XclExpCellRef const & xCell, bool bIsMergedBase );
914  void CreateRows( SCROW nFirstFreeScRow );
915 
919  void Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt16Vec& rColXFIndexes );
920 
922  virtual void Save( XclExpStream& rStrm ) override;
923  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
924 
927 
928 private:
932  XclExpRow& GetOrCreateRow( sal_uInt32 nXclRow, bool bRowAlwaysEmpty );
933 
934 private:
935  typedef std::shared_ptr<XclExpRow> RowRef;
936  typedef ::std::map<sal_uInt32, RowRef> RowMap;
937 
938  RowMap maRowMap;
942 };
943 
944 // Cell Table
945 
946 class XclExpNote;
947 class XclExpMergedcells;
948 class XclExpHyperlink;
949 class XclExpDval;
950 
975 class XclExpCellTable : public XclExpRecordBase, protected XclExpRoot
976 {
977 public:
978  explicit XclExpCellTable( const XclExpRoot& rRoot );
979 
981  void Finalize(bool bXLS);
982 
987  XclExpRecordRef CreateRecord( sal_uInt16 nRecId ) const;
989  virtual void Save( XclExpStream& rStrm ) override;
990  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
991 
992 private:
995 
1002 
1008  XclExpDefrowhRef mxDefrowheight;
1010  XclExpNoteListRef mxNoteList;
1011  XclExpMergedcellsRef mxMergedcells;
1012  XclExpHyperlinkRef mxHyperlinkList;
1013  XclExpDvalRef mxDval;
1014  XclExtLstRef mxExtLst;
1015 };
1016 
1017 #endif
1018 
1019 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool IsVolatile() const =0
Derived classes return true, if the own formula contains volatile functions.
XclExpStringRef mxText
Definition: xetable.hxx:424
sal_uInt16 GetFirstUsedXclCol() const
Returns the column index of the first used cell in this row.
Definition: xetable.cxx:2045
::std::map< sal_uInt32, RowRef > RowMap
Definition: xetable.hxx:936
virtual sal_uInt32 GetFirstXFId() const override
Return the XF identifier of the cell.
Definition: xetable.cxx:593
XclExpCellBase(sal_uInt16 nRecId, std::size_t nContSize, const XclAddress &rXclPos)
Definition: xetable.cxx:540
void Finalize()
Finalizes all contained TABLEOP records.
Definition: xetable.cxx:481
XclExpBlankCell(const XclAddress &rXclPos, const XclExpMultiXFId &rXFId)
Definition: xetable.cxx:1307
XclExpColinfoBuffer maColInfoBfr
Definition: xetable.hxx:1003
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:672
sal_uInt32 mnColInpXclRow
Column index of column input cell.
Definition: xetable.hxx:238
bool mbCustomWidth
The XF identifier for column default format.
Definition: xetable.hxx:734
virtual bool IsEmpty() const override
Returns true, if this record does not contain at least one valid cell.
Definition: xetable.cxx:1119
XclExpShrfmla(const XclTokenArrayRef &xTokArr, const ScAddress &rScPos)
Creates a SHRFMLA record that consists of the passed cell address only.
Definition: xetable.cxx:181
XclExpStringRec(const XclExpRoot &rRoot, const OUString &rResult)
Definition: xetable.cxx:55
virtual void WriteContents(XclExpStream &rStrm, sal_uInt16 nRelCol) override
Writes the remaining contents of the specified cell (without XF index).
Definition: xetable.cxx:1340
XclExpNumberCell(const XclExpRoot &rRoot, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_uInt32 nForcedXFId, double fValue)
Definition: xetable.cxx:621
sal_uInt16 mnColWidth
Number of visible column outline levels.
Definition: xetable.hxx:636
Data about an outline level.
Definition: xetable.hxx:587
void AppendCell(XclExpCellRef const &xCell, bool bIsMergedBase)
Appends the passed cell object to this row.
Definition: xetable.cxx:1889
bool IsEmpty() const
Returns true, if this row does not contain at least one valid cell.
Definition: xetable.hxx:837
Base class for buffers containing row or column outline data.
Definition: xetable.hxx:569
virtual bool IsEmpty() const =0
Derived classes return true, if this record does not contain at least one valid cell.
bool IsAppendable(sal_uInt16 nXclCol, sal_uInt16 nXclRow) const
Returns true, if the passed cell position can be appended to this record.
Definition: xetable.cxx:426
This class is used to export Excel record streams.
Definition: xestream.hxx:73
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:643
sal_uInt16 GetXclCol() const
Returns the (first) Excel column index of the cell(s).
Definition: xetable.hxx:280
virtual void WriteContents(XclExpStream &rStrm) override
Derived classes write the contents of the specified cell (without XF index).
Definition: xetable.cxx:1042
virtual bool IsMultiLineText() const
Derived classes return whether the cell contains multi-line text.
Definition: xetable.cxx:547
XclExpArrayBuffer maArrayBfr
Rows and cell records.
Definition: xetable.hxx:1005
sal_uInt32 mnCurrentRow
Definition: xetable.hxx:894
void Init(const XclExpRoot &rRoot, const ScPatternAttr *pPattern, XclExpStringRef const &xText)
Initializes the record contents.
Definition: xetable.cxx:727
XclExpLabelCell(const XclExpRoot &rRoot, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_uInt32 nForcedXFId, const OUString &rStr)
Constructs the record from an unformatted Calc string cell.
Definition: xetable.cxx:692
XclExpDimensions maDimensions
Buffer for row outline groups.
Definition: xetable.hxx:940
sal_uInt16 mnMulRecId
Definition: xetable.hxx:516
The outline buffer for row outlines.
Definition: xetable.hxx:614
virtual void Save(XclExpStream &rStrm) override
Writes cell address, XF index, and calls WriteContents() for each cell.
Definition: xetable.cxx:608
virtual bool IsMultiLineText() const override
Returns true if the cell contains multi-line text.
Definition: xetable.cxx:722
XclExpBooleanCell(const XclExpRoot &rRoot, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_uInt32 nForcedXFId, bool bValue)
Definition: xetable.cxx:663
sal_uInt16 mnCount
Definition: xetable.hxx:460
const Type & GetValue() const
Returns the value of the record.
Definition: xerecord.hxx:208
Base class for all cell records not supporting multiple contents.
Definition: xetable.hxx:319
virtual void WriteXmlContents(XclExpXmlStream &rStrm, const XclAddress &rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol)=0
XclExpRow(const XclExpRoot &rRoot, sal_uInt32 nXclRow, XclExpRowOutlineBuffer &rOutlineBfr, bool bAlwaysEmpty, bool bHidden, sal_uInt16 nHeight)
Constructs the ROW record and converts the Calc row settings.
Definition: xetable.cxx:1851
rtl::Reference< XclExpDval > XclExpDvalRef
Definition: xetable.hxx:1000
virtual sal_uInt16 GetLastXclCol() const override
Returns the column index of the last cell this record describes.
Definition: xetable.cxx:1109
rtl::Reference< XclExpDefrowheight > XclExpDefrowhRef
Definition: xetable.hxx:996
ScFormulaCell & mrScFmlaCell
Definition: xetable.hxx:450
const XclAddress & GetXclPos() const
Returns the (first) address of the cell(s).
Definition: xetable.hxx:278
sal_uInt32 mnXclRow
List of cell records for this row.
Definition: xetable.hxx:888
Represents an RK or MULRK record that describes cells with a compressed double values.
Definition: xetable.hxx:545
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the record.
Definition: xetable.cxx:1845
void Finalize(ScfUInt16Vec &rXFIndexes, bool bXLS)
Converts the XF identifiers into the Excel XF indexes and merges equal columns.
Definition: xetable.cxx:1737
sal_uInt16 mnRowWidth
Number of visible row outline levels.
Definition: xetable.hxx:638
const sal_uInt16 EXC_DEFROW_UNSYNCED
Definition: xltable.hxx:115
double GetDefColWidth() const
Definition: xetable.hxx:766
sal_uInt32 mnFirstFreeXclRow
First used row.
Definition: xetable.hxx:660
Represents the DEFCOLWIDTH record containing the default column width of a sheet. ...
Definition: xetable.hxx:680
Represents a NOTE record containing the relevant data of a cell note.
Definition: xeescher.hxx:339
void Update(SCROW nScRow)
Updates the current state by processing the settings of the passed Calc row.
Definition: xetable.hxx:621
virtual void WriteBody(XclExpStream &rStrm) override
Writes cell address, XF index, and calls WriteContents() for each cell.
Definition: xetable.cxx:615
void SetDefWidth(sal_uInt16 nXclColWidth, bool bXLS)
Sets the passed column width (in 1/256 character width) as default width.
Definition: xetable.cxx:1582
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:1804
XclExpDimensions(const XclExpRoot &rRoot)
Definition: xetable.cxx:1490
XclExpRecordList< XclExpColinfo > XclExpColinfoList
Definition: xetable.hxx:769
sal_uInt32 mnRow
Definition: xladdress.hxx:33
Contains the column settings for a range of columns.
Definition: xetable.hxx:700
Represents a BOOLERR record that describes a cell with a Boolean value.
Definition: xetable.hxx:375
XclExpRecordRef CreateRecord(sal_uInt16 nRecId) const
Returns the reference to an internal record specified by the passed record id.
Definition: xetable.cxx:2702
bool mbEnabled
true = Do not add blank cells in Finalize().
Definition: xetable.hxx:896
XclExpRowOutlineBuffer maOutlineBfr
Definition: xetable.hxx:939
sal_uInt8 mnHighestOutlineLevel
Buffer for column outline groups.
Definition: xetable.hxx:775
void Finalize()
Finalizes the record.
Definition: xetable.cxx:373
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of this COLINFO record.
Definition: xetable.cxx:1675
sal_uInt16 mnFlags
Row height in twips.
Definition: xetable.hxx:890
void ConvertXFIndexes()
Converts the XF identifier into the Excel XF index.
Definition: xetable.cxx:1647
Represents a BLANK or MULBLANK record that describes empty but formatted cells.
Definition: xetable.hxx:522
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the DIMENSIONS record.
Definition: xetable.cxx:1538
sal_uInt16 GetColCount() const
Returns the number of columns represented by this record.
Definition: xetable.hxx:721
std::size_t mnContSize
Record ID for multiple record variant.
Definition: xetable.hxx:517
sal_uInt16 GetHeight() const
Returns the height of the row in twips.
Definition: xetable.hxx:835
XclExpRecordRef mxStringRec
Additional record for matrix/shared formulas.
Definition: xetable.hxx:453
sal_uInt8 mnOutlineLevel
Default row formatting.
Definition: xetable.hxx:892
Contains COLINFO records for all columns of a Calc sheet.
Definition: xetable.hxx:750
sal_uInt32 GetXclRow() const
Returns the Excel row index of the cell.
Definition: xetable.hxx:282
virtual void WriteContents(XclExpStream &rStrm)=0
Derived classes write the contents of the specified cell (without XF index).
virtual XclTokenArrayRef CreateCellTokenArray(const XclExpRoot &rRoot) const override
Creates and returns the token array for a corresponding FORMULA cell record.
Definition: xetable.cxx:123
bool TryExtend(const ScAddress &rScPos, const XclMultipleOpRefs &rRefs)
Returns true, if the cell range has been extended to the passed position.
Definition: xetable.cxx:309
const ScOutlineArray * mpScOLArray
Definition: xetable.hxx:594
XclExpDefrowhRef mxDefrowheight
Buffer for TABLEOP records.
Definition: xetable.hxx:1008
void SetDimensions(sal_uInt16 nFirstUsedXclCol, sal_uInt32 nFirstUsedXclRow, sal_uInt16 nFirstFreeXclCol, sal_uInt32 nFirstFreeXclRow)
Sets the used area to the record.
Definition: xetable.cxx:1508
const XclExpRoot & mrRoot
Definition: xetable.hxx:658
sal_uInt8 mnOutlineLevel
Additional column flags.
Definition: xetable.hxx:738
sal_uInt16 mnLastXclCol
Index to first column.
Definition: xetable.hxx:740
sal_uInt16 mnFirstUsedXclCol
First unused row after used area.
Definition: xetable.hxx:661
XclExpArrayBuffer(const XclExpRoot &rRoot)
Definition: xetable.cxx:141
sal_uInt8 mnUsedCount
The token array of a shared formula.
Definition: xetable.hxx:171
const sal_uInt8 EXC_OUTLINE_MAX
Definition: xltable.hxx:29
XclExpRecordList< XclExpTableop > maTableopList
Definition: xetable.hxx:268
Represents an ARRAY record that contains the token array of a matrix formula.
Definition: xetable.hxx:108
void WriteRangeAddress(XclExpStream &rStrm) const
Writes the range address covered by this record.
Definition: xetable.cxx:110
XclExpMultiCellBase(sal_uInt16 nRecId, sal_uInt16 nMulRecId, std::size_t nContSize, const XclAddress &rXclPos)
Definition: xetable.cxx:1101
virtual bool IsVolatile() const override
Returns true, if the array formula contains volatile functions.
Definition: xetable.cxx:128
sal_uInt32 mnSstIndex
The cell text.
Definition: xetable.hxx:425
Access to global data from other classes.
Definition: xeroot.hxx:113
bool TryMergeXFIds(const XclExpMultiCellBase &rCell)
Tries to merge the XF ID list of the passed cell with the own list.
Definition: xetable.cxx:1258
sal_uInt16 mnHeight
Default flags for unspecified rows.
Definition: xetable.hxx:784
XclExpColinfoList::RecordRefType XclExpColinfoRef
Definition: xetable.hxx:770
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:24
virtual bool TryMerge(const XclExpCellBase &rCell) override
Tries to merge the contents of the passed cell to own data.
Definition: xetable.cxx:1362
Helper to create HLINK records during creation of formatted cell strings.
Definition: xehelper.hxx:178
XclExpTableopRef TryCreate(const ScAddress &rScPos, const XclMultipleOpRefs &rRefs)
Tries to create a new TABLEOP record, if rRefs contains valid references.
Definition: xetable.cxx:487
void DisableIfDefault(const XclExpDefaultRowData &rDefRowData)
Disables this row, if it is defaultable and has the passed default format.
Definition: xetable.cxx:2062
XclExpSingleCellBase(sal_uInt16 nRecId, std::size_t nContSize, const XclAddress &rXclPos, sal_uInt32 nXFId)
Definition: xetable.cxx:569
sal_uInt16 GetCellCount() const
Returns the number of cells this record represents.
Definition: xetable.cxx:1236
std::shared_ptr< XclExpRow > RowRef
Definition: xetable.hxx:935
Represents a SHRFMLA record that contains the token array of a shared formula.
Definition: xetable.hxx:152
std::vector< XclExpLevelInfo > maLevelInfos
Pointer to Calc outline array.
Definition: xetable.hxx:596
int nCount
virtual void ConvertXFIndexes(const XclExpRoot &rRoot) override
Convert all XF identifiers into the Excel XF indexes.
Definition: xetable.cxx:1124
void WriteCellList(XclExpStream &rStrm)
Writes all cell records of this row.
Definition: xetable.cxx:2070
sal_uInt16 mnWidth
True = Column width is different from default width.
Definition: xetable.hxx:735
virtual sal_uInt16 GetLastXclCol() const =0
Derived classes return the column index of the last contained cell.
XclExpColOutlineBuffer maOutlineBfr
The DEFCOLWIDTH record.
Definition: xetable.hxx:774
sal_uInt16 GetColWidth() const
Returns the Excel width of the column(s).
Definition: xetable.hxx:717
XclExtLstRef mxExtLst
Data validation with DVAL and DV records.
Definition: xetable.hxx:1014
XclExpShrfmlaBuffer maShrfmlaBfr
Buffer for ARRAY records.
Definition: xetable.hxx:1006
Represents a DEFROWHEIGHT record containing default format for unused rows.
Definition: xetable.hxx:796
Base class for all Excel records.
Definition: xerecord.hxx:38
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:2728
sal_uInt8 mnScMode
Row index of row input cell.
Definition: xetable.hxx:241
The outline buffer for column outlines.
Definition: xetable.hxx:602
XclExpHyperlinkRef mxHyperlinkList
MERGEDCELLS record for merged cell ranges.
Definition: xetable.hxx:1012
virtual XclTokenArrayRef CreateCellTokenArray(const XclExpRoot &rRoot) const override
Creates and returns the token array for a corresponding FORMULA cell record.
Definition: xetable.cxx:407
virtual void ConvertXFIndexes(const XclExpRoot &rRoot) override
Converts the XF identifier into the Excel XF index.
Definition: xetable.cxx:603
bool IsCollapsed() const
Returns true, if a collapsed group ends at the last processed position.
Definition: xetable.hxx:573
::std::vector< XclExpMultiXFId > XclExpMultiXFIdDeq
Definition: xetable.hxx:514
bool IsBasePos(sal_uInt16 nXclCol, sal_uInt32 nXclRow) const
Returns true, if the passed cell position is equal to own base position.
Definition: xetable.cxx:95
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xetable.cxx:64
void ExtendRange(const ScAddress &rScPos)
Extends the cell range to include the passed cell address.
Definition: xetable.cxx:188
void GetXFIndexes(ScfUInt16Vec &rXFIndexes) const
Inserts the Excel XF index(es) into the passed vector.
Definition: xetable.cxx:1268
virtual void GetBlankXFIndexes(ScfUInt16Vec &rXFIndexes) const
Derived classes for blank cells insert the Excel XF index(es) into the passed vector.
Definition: xetable.cxx:557
void SetDefaultData(const XclExpDefaultRowData &rDefData)
Sets the passed default data as current record contents.
Definition: xetable.cxx:1840
sal_uInt32 mnRowInpXclRow
Column index of row input cell.
Definition: xetable.hxx:240
bool mbLineBreak
Index into Shared String Table (only used for BIFF8).
Definition: xetable.hxx:426
bool IsDefaultable() const
Returns true, if this row may be omitted by using the DEFROWHEIGHT record.
Definition: xetable.cxx:2055
virtual void WriteXmlContents(XclExpXmlStream &rStrm, const XclAddress &rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol) override
Definition: xetable.cxx:1344
XclTokenArrayRef mxTokArr
Definition: xetable.hxx:122
rtl::Reference< XclExpHyperlinkList > XclExpHyperlinkRef
Definition: xetable.hxx:999
bool IsDefault(const XclExpDefcolwidth &rDefColWidth)
Returns true, if the column has default format and width.
Definition: xetable.cxx:1652
XclExpDimensions & GetDimensions()
Definition: xetable.hxx:925
XclExpArray(const XclTokenArrayRef &xTokArr, const ScRange &rScRange)
Definition: xetable.cxx:117
sal_uInt16 mnColInpXclCol
Column index of last appended cell.
Definition: xetable.hxx:237
sal_uInt16 mnHeight
Excel row index of this row.
Definition: xetable.hxx:889
bool TryMerge(const XclExpColinfo &rColInfo)
Tries to merge this record with the passed record.
Definition: xetable.cxx:1661
virtual void WriteContents(XclExpStream &rStrm, sal_uInt16 nRelCol) override
Writes the remaining contents of the specified cell (without XF index).
Definition: xetable.cxx:1388
sal_uInt32 GetXFId() const
Definition: xetable.hxx:345
sal_uInt16 mnFirstFreeXclCol
First used column.
Definition: xetable.hxx:662
A record with a single value of type Type.
Definition: xerecord.hxx:198
XclExpFormulaCell(const XclExpRoot &rRoot, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_uInt32 nForcedXFId, const ScFormulaCell &rScFmlaCell, XclExpArrayBuffer &rArrayBfr, XclExpShrfmlaBuffer &rShrfmlaBfr, XclExpTableopBuffer &rTableopBfr)
Definition: xetable.cxx:815
Base class for all cell records supporting multiple contents.
Definition: xetable.hxx:467
virtual void WriteContents(XclExpStream &rStrm) override
Derived classes write the contents of the specified cell (without XF index).
Definition: xetable.cxx:796
sal_uInt16 GetFirstFreeXclCol() const
Returns the column index of the first unused cell following all used cells in this row...
Definition: xetable.cxx:2050
XclExpTableopBuffer(const XclExpRoot &rRoot)
Definition: xetable.cxx:451
XclExpMultiXFIdDeq maXFIds
Data size of contents for one cell.
Definition: xetable.hxx:518
bool IsUnsynced() const
Returns true, if the rows have a manually set height by default.
Definition: xetable.hxx:792
TokensType maRecMap
Definition: xetable.hxx:201
This class contains the DV record list following the DVAL record.
Definition: xecontent.hxx:354
Caches all ARRAY records.
Definition: xetable.hxx:128
bool mbCurrCollapse
Highest level of an open group for current position.
Definition: xetable.hxx:598
XclExpGuts(const XclExpRoot &rRoot)
Definition: xetable.cxx:1455
sal_Int16 SCCOL
Definition: types.hxx:22
sal_uInt16 mnFlags
Calc width of the column.
Definition: xetable.hxx:737
void UpdateColRow(SCCOLROW nScPos)
Updates the current state by processing the settings at the passed Calc position. ...
Definition: xetable.cxx:1411
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:1518
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xetable.cxx:1485
XclExpMultiXFId(sal_uInt32 nXFId, sal_uInt16 nCount=1)
Number of XF identifiers.
Definition: xetable.hxx:462
XclExpTableopRef CreateOrExtendTableop(const ScTokenArray &rScTokArr, const ScAddress &rScPos)
Tries to update an existing or to create a new TABLEOP record.
Definition: xetable.cxx:456
sal_uInt16 mnXFIndex
Flags for the ROW record.
Definition: xetable.hxx:891
XclExpArrayRef FindArray(const ScTokenArray &rScTokArr, const ScAddress &rBasePos) const
Tries to find an ARRAY record that corresponds to an ocMatRef token.
Definition: xetable.cxx:157
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the ROW record.
Definition: xetable.cxx:2110
void Initialize(SCROW nLastScRow)
Initializes the buffer: finds settings and formatting of all columns.
Definition: xetable.cxx:1724
rtl::Reference< XclExpCellBase > XclExpCellRef
Definition: xetable.hxx:314
Represents a STRING record that contains the result of a string formula.
Definition: xetable.hxx:50
void CreateRows(SCROW nFirstFreeScRow)
Forces insertion of all ROW records before the passed row.
Definition: xetable.cxx:2164
XclExpCellTable(const XclExpRoot &rRoot)
Definition: xetable.cxx:2436
rtl::Reference< XclExpRangeFmlaBase > XclExpRangeFmlaRef
Definition: xetable.hxx:95
XclExpNoteListRef mxNoteList
GUTS record for outline areas.
Definition: xetable.hxx:1010
bool get_flag(Type nBitField, Type nMask)
Returns true, if at least one of the bits set in nMask is set in nBitField.
Definition: ftools.hxx:76
Collects all rows which contain all cells of a sheet.
Definition: xetable.hxx:906
The base class of all cell records.
Definition: xetable.hxx:274
This class contains the cell contents and more of an entire sheet.
Definition: xetable.hxx:975
bool IsDefWidth(sal_uInt16 nXclColWidth) const
Returns true, if the own default width exactly matches the passed width.
Definition: xetable.cxx:1571
XclExpStringRef mxResult
Definition: xetable.hxx:59
virtual XclTokenArrayRef CreateCellTokenArray(const XclExpRoot &rRoot) const override
Creates and returns the token array for a corresponding FORMULA cell record.
Definition: xetable.cxx:194
void Finalize(XclExpDefaultRowData &rDefRowData, const ScfUInt16Vec &rColXFIndexes)
Converts all XF identifiers into the Excel XF indexes and calculates default formats.
Definition: xetable.cxx:2195
Represents a TABLEOP record for a multiple operations range.
Definition: xetable.hxx:208
virtual void Save(XclExpStream &rStrm) override
Writes the FORMULA record and additional records related to the formula.
Definition: xetable.cxx:915
sal_uInt16 mnColLevels
Definition: xetable.hxx:635
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
Definition: xetable.cxx:1604
void Finalize(bool bXLS)
Converts all XF identifiers into the Excel XF indexes and calculates default formats.
Definition: xetable.cxx:2680
sal_uInt16 mnCol
Definition: xladdress.hxx:32
sal_uInt32 GetXclRow() const
Returns the excel row index of this ROW record.
Definition: xetable.hxx:833
void RemoveUnusedXFIndexes(const ScfUInt16Vec &rXFIndexes)
Removes unused Excel XF index(es).
Definition: xetable.cxx:1279
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:2365
sal_uInt16 mnRowInpXclCol
Row index of column input cell.
Definition: xetable.hxx:239
const sal_uInt16 EXC_ROW_HIDDEN
Definition: xltable.hxx:84
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xetable.cxx:133
virtual void RemoveUnusedBlankCells(const ScfUInt16Vec &rXFIndexes)
Derived classes for blank cells remove unused Excel XF index(es).
Definition: xetable.cxx:562
sal_uInt32 mnXclRowRpt
Outline Level of row (for OOXML)
Definition: xetable.hxx:893
A 2D cell address struct with Excel column and row indexes.
Definition: xladdress.hxx:30
XclExpDefaultRowData()
Default height for unspecified rows.
Definition: xetable.cxx:1815
XclExpRow & GetOrCreateRow(sal_uInt32 nXclRow, bool bRowAlwaysEmpty)
Returns access to the specified ROW record.
Definition: xetable.cxx:2380
Contains all possible default row settings.
Definition: xetable.hxx:781
const sal_uInt16 EXC_DEFROW_HIDDEN
Definition: xltable.hxx:116
void AppendXFId(const XclExpMultiXFId &rXFId)
Appends the passed XF identifier nCount times to the list of XF identifiers.
Definition: xetable.cxx:1242
sal_uInt16 GetXFIndex() const
Returns the final Excel XF index of the column(s).
Definition: xetable.hxx:719
std::shared_ptr< XclTokenArray > XclTokenArrayRef
Definition: xlformula.hxx:417
rtl::Reference< XclExpNoteList > XclExpNoteListRef
Definition: xetable.hxx:997
XclExpColinfoBuffer(const XclExpRoot &rRoot)
Definition: xetable.cxx:1716
virtual bool IsEmpty() const override
Returns true, if this record does not contain at least one valid cell.
Definition: xetable.cxx:598
sal_uInt8 GetHighestOutlineLevel() const
Definition: xetable.hxx:765
Represents a FORMULA record that describes a cell with a formula.
Definition: xetable.hxx:432
virtual bool TryMerge(const XclExpCellBase &rCell)
Derived classes try to merge the contents of the passed cell to own data.
Definition: xetable.cxx:552
sal_uInt8 mnCurrLevel
Info for current row and all levels.
Definition: xetable.hxx:597
virtual sal_uInt32 GetFirstXFId() const override
Return the XF identifier of the first contained cell.
Definition: xetable.cxx:1114
XclExpTableop(const ScAddress &rScPos, const XclMultipleOpRefs &rRefs, sal_uInt8 nScMode)
Definition: xetable.cxx:296
bool IsEnabled() const
Returns true, if this row is enabled (will be exported).
Definition: xetable.hxx:843
Base record for additional range formula records (i.e.
Definition: xetable.hxx:65
bool IsValidTokenArray(const ScTokenArray &rArray) const
Check for presence of token that's not allowed in Excel's shared formula.
Definition: xetable.cxx:215
rtl::Reference< XclExpMergedcells > XclExpMergedcellsRef
Definition: xetable.hxx:998
XclExpRowBuffer(const XclExpRoot &rRoot)
Definition: xetable.cxx:2150
XclExpDefcolwidth maDefcolwidth
List of COLINFO records.
Definition: xetable.hxx:773
virtual bool IsVolatile() const override
Returns true, if the shared formula contains volatile functions.
Definition: xetable.cxx:199
XclExpDefaultRowData & GetDefaultData()
Definition: xetable.hxx:803
virtual void GetBlankXFIndexes(ScfUInt16Vec &rXFIndexes) const override
Inserts the Excel XF index(es) into the passed vector.
Definition: xetable.cxx:1330
sal_Int32 SCROW
Definition: types.hxx:18
std::size_t mnContSize
The XF identifier of the cell formatting.
Definition: xetable.hxx:355
void SetContSize(std::size_t nContSize)
Definition: xetable.hxx:341
XclExpDefcolwidth(const XclExpRoot &rRoot)
Definition: xetable.cxx:1565
virtual bool TryMerge(const XclExpCellBase &rCell) override
Tries to merge the contents of the passed cell to own data.
Definition: xetable.cxx:1324
Represents a GUTS record containing the level count of row and column outlines.
Definition: xetable.hxx:626
XclExpOutlineBuffer(const XclExpRoot &rRoot, bool bRows)
Constructs the outline buffer.
Definition: xetable.cxx:1396
XclAddress maBaseXclPos
Range described by this record.
Definition: xetable.hxx:92
std::unordered_map< const ScTokenArray *, XclExpShrfmlaRef > TokensType
Definition: xetable.hxx:198
Represents a ROW record and additionally contains all cells records of a row.
Definition: xetable.hxx:823
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:781
XclAddress maXclPos
Definition: xetable.hxx:311
Contains all cell references that can be extracted from a multiple operations formula.
Definition: xlformula.hxx:469
XclExpRangeFmlaRef mxAddRec
The token array of the formula.
Definition: xetable.hxx:452
XclExpRecordList< XclExpHyperlink > XclExpHyperlinkList
Definition: xetable.hxx:994
XclTokenArrayRef mxTokArr
Definition: xetable.hxx:170
XclExpColinfo(const XclExpRoot &rRoot, SCCOL nScCol, SCROW nLastScRow, XclExpColOutlineBuffer &rOutlineBfr)
Constructs the record with the settings in the Calc document.
Definition: xetable.cxx:1613
XclExpShrfmlaBuffer(const XclExpRoot &rRoot)
Definition: xetable.cxx:210
bool mbAlwaysEmpty
Definition: xetable.hxx:895
virtual void RemoveUnusedBlankCells(const ScfUInt16Vec &rXFIndexes) override
Tries to remove unused Excel XF index(es).
Definition: xetable.cxx:1335
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:256
ScfInt32Vec maRkValues
Definition: xetable.hxx:561
virtual void Save(XclExpStream &rStrm) override
Writes all COLINFO records of this buffer.
Definition: xetable.cxx:1796
void Extend(const ScAddress &rScPos)
Extends the cell range to include the passed cell address.
Definition: xetable.cxx:100
void AppendCell(XclExpCellRef const &xCell, bool bIsMergedBase)
Appends the passed cell object to the row that the cell specifies.
Definition: xetable.cxx:2158
XclExpArrayRef CreateArray(const ScTokenArray &rScTokArr, const ScRange &rScRange)
Inserts a new ARRAY record into the buffer and returns it.
Definition: xetable.cxx:146
XclExpColOutlineBuffer(const XclExpRoot &rRoot)
Definition: xetable.hxx:605
sal_uInt32 GetXclRowRpt() const
Definition: xetable.hxx:876
unsigned char sal_uInt8
XclExpRowOutlineBuffer(const XclExpRoot &rRoot)
Definition: xetable.hxx:617
::std::map< ScAddress, XclExpArrayRef > XclExpArrayMap
Definition: xetable.hxx:139
sal_uInt32 mnXFId
Definition: xestyle.hxx:411
XclExpShrfmlaRef CreateOrExtendShrfmla(const ScFormulaCell &rScCell, const ScAddress &rScPos)
Tries to create a new or to update an existing SHRFMLA record.
Definition: xetable.cxx:254
XclRange maXclRange
Definition: xetable.hxx:91
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:2121
XclExpRangeFmlaBase(sal_uInt16 nRecId, sal_uInt32 nRecSize, const ScAddress &rScPos)
Constructs the record with a single cell.
Definition: xetable.cxx:71
XclExpDefaultRowData maDefData
Definition: xetable.hxx:809
std::size_t GetContSize() const
Definition: xetable.hxx:342
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:1690
Caches all SHRFMLA records and provides functions to update their ranges.
Definition: xetable.hxx:177
Represents a NUMBER record that describes a cell with a double value.
Definition: xetable.hxx:359
void Update(SCCOL nScCol)
Updates the current state by processing the settings of the passed Calc column.
Definition: xetable.hxx:609
A combination of unique XF identifier with real Excel XF index.
Definition: xestyle.hxx:409
rtl::Reference< XclExpTableop > XclExpTableopRef
Definition: xetable.hxx:245
virtual void Save(XclExpStream &rStrm) override
Saves the entire cell table.
Definition: xetable.cxx:2720
Represents a MERGEDCELLS record containing all merged cell ranges in a sheet.
Definition: xecontent.hxx:74
virtual sal_uInt32 GetFirstXFId() const =0
Derived classes return the XF identifier of the first contained cell.
virtual void WriteContents(XclExpStream &rStrm, sal_uInt16 nRelCol)=0
Derived classes write the remaining contents of the specified cell (without XF index).
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xetable.cxx:204
void InsertCell(XclExpCellRef xCell, size_t nPos, bool bIsMergedBase)
Inserts a cell at the specified list position, tries to merge with neighbors.
Definition: xetable.cxx:2086
Contains all created TABLEOP records and supports creating or updating them.
Definition: xetable.hxx:248
sal_uInt16 mnXFIndex
Temporary XF identifier.
Definition: xestyle.hxx:412
void SetXclCol(sal_uInt16 nXclCol)
Sets this record to a new column position.
Definition: xetable.hxx:308
o3tl::sorted_vector< const ScTokenArray * > BadTokenArraysType
Definition: xetable.hxx:199
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:1187
XclExpRecordList< XclExpCellBase > maCellList
Definition: xetable.hxx:887
virtual bool IsVolatile() const override
Returns true, if the multiple operations range is volatile.
Definition: xetable.cxx:415
bool mbHidden
The end position of a group in a level.
Definition: xetable.hxx:590
virtual XclTokenArrayRef CreateCellTokenArray(const XclExpRoot &rRoot) const =0
Derived classes create the token array for a corresponding FORMULA cell record.
XclExpXFId maXFId
Definition: xetable.hxx:733
virtual void WriteXmlContents(XclExpXmlStream &rStrm, const XclAddress &rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol) override
Definition: xetable.cxx:1373
bool mbValid
Type of the multiple operation (Calc constant).
Definition: xetable.hxx:242
sal_uInt16 mnRowLevels
Width of column outline area (pixels).
Definition: xetable.hxx:637
bool IsHidden() const
Returns true, if rows are hidden by default.
Definition: xetable.hxx:790
void SetXFId(sal_uInt32 nXFId)
Definition: xetable.hxx:344
rtl::Reference< XclExtLst > XclExtLstRef
Definition: xetable.hxx:1001
const sal_uInt16 EXC_ROW_UNSYNCED
Definition: xltable.hxx:85
virtual void WriteContents(XclExpStream &rStrm) override
Derived classes write the contents of the specified cell (without XF index).
Definition: xetable.cxx:687
sal_uInt8 mnHighestOutlineLevel
DIMENSIONS record for used area.
Definition: xetable.hxx:941
XclTokenArrayRef mxTokArr
The Calc formula cell.
Definition: xetable.hxx:451
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:937
Represents a DIMENSIONS record containing the used area of a sheet.
Definition: xetable.hxx:642
XclExpRowBuffer maRowBfr
Buffer for column formatting.
Definition: xetable.hxx:1004
std::shared_ptr< XclExpString > XclExpStringRef
Definition: xeroot.hxx:36
XclExpColinfoList maColInfos
Definition: xetable.hxx:772
sal_uInt16 mnFlags
Definition: xetable.hxx:783
::std::vector< sal_Int32 > ScfInt32Vec
Definition: ftools.hxx:257
void Finalize(const ScfUInt16Vec &rColXFIndexes, bool bUpdateProgress)
Converts all XF identifiers into the Excel XF indexes.
Definition: xetable.cxx:1896
bool IsHidden() const
Returns true, if this row is hidden.
Definition: xetable.hxx:839
XclExpRecordRef mxGuts
DEFROWHEIGHT record for default row format.
Definition: xetable.hxx:1009
virtual void Save(XclExpStream &rStrm) override
Writes the record, calls WriteContents() for each contained cell.
Definition: xetable.cxx:1130
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the TABLEOP record.
Definition: xetable.cxx:433
BadTokenArraysType maBadTokens
Map containing the SHRFMLA records.
Definition: xetable.hxx:202
bool IsEmpty() const
Definition: xerecord.hxx:326
sal_uInt16 mnScWidth
Excel width of the column.
Definition: xetable.hxx:736
sal_uInt16 mnLastAppXclCol
Definition: xetable.hxx:236
void SvStream & rStrm
sal_uInt8 GetLevel() const
Returns the highest level of an open group at the last processed position.
Definition: xetable.hxx:575
virtual void ConvertXFIndexes(const XclExpRoot &rRoot)=0
Derived classes convert the XF identifier(s) into the Excel XF index(es).
virtual void WriteContents(XclExpStream &rStrm) override
Derived classes write the contents of the specified cell (without XF index).
Definition: xetable.cxx:658
XclExpTableopBuffer maTableopBfr
Buffer for SHRFMLA records.
Definition: xetable.hxx:1007
rtl::Reference< XclExpArray > XclExpArrayRef
Definition: xetable.hxx:125
Represents a text cell record.
Definition: xetable.hxx:399
sal_uInt16 mnFirstXclCol
Outline Level of column (for OOXML)
Definition: xetable.hxx:739
sal_uInt8 GetHighestOutlineLevel() const
Definition: xetable.hxx:926
void SetXclRowRpt(sal_uInt32 nRpt)
Definition: xetable.hxx:877
XclExpArrayMap maRecMap
Definition: xetable.hxx:140
virtual void Save(XclExpStream &rStrm) override
Writes the DIMENSIONS record, all ROW records and all cell records.
Definition: xetable.cxx:2337
virtual sal_uInt16 GetLastXclCol() const override
Returns the last column, which is equal to the first column for single cells.
Definition: xetable.cxx:588
bool IsUnsynced() const
Returns true, if this row contains a manually set height.
Definition: xetable.hxx:841
RowMap maRowMap
Definition: xetable.hxx:938
XclExpRecordList< XclExpNote > XclExpNoteList
Definition: xetable.hxx:993
A 2D cell range address struct with Excel column and row indexes.
Definition: xladdress.hxx:58
sal_uInt32 mnFirstUsedXclRow
Definition: xetable.hxx:659
XclExpXFId maXFId
Definition: xetable.hxx:354
XclExpRkCell(const XclExpRoot &rRoot, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_uInt32 nForcedXFId, sal_Int32 nRkValue)
Definition: xetable.cxx:1352
virtual void Save(XclExpStream &rStrm) override
Writes the record if it is valid.
Definition: xetable.cxx:420
Base class for single records with any content.
Definition: xerecord.hxx:142
XclExpMergedcellsRef mxMergedcells
List of NOTE records.
Definition: xetable.hxx:1011
rtl::Reference< XclExpShrfmla > XclExpShrfmlaRef
Definition: xetable.hxx:174
XclExpLevelInfo()
true = Group in this level is hidden.
Definition: xetable.hxx:591
virtual void Save(XclExpStream &rStrm) override
Writes the ROW record if the row is not disabled (see DisableIfDefault() function).
Definition: xetable.cxx:2076
XclExpDvalRef mxDval
List of HLINK records.
Definition: xetable.hxx:1013