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#pragma once
21
22#include "xltable.hxx"
23
24#include <vector>
25#include "xladdress.hxx"
26#include "xecontent.hxx"
27#include "xerecord.hxx"
28#include "xestyle.hxx"
29#include "xlformula.hxx"
30
31#include <map>
32#include <memory>
33#include <unordered_map>
35
36class XclExtLst;
37
38/* ============================================================================
39Export of cell tables including row and column description.
40- Managing all used and formatted cells in a sheet.
41- Row and column properties, i.e. width/height, visibility.
42- Find default row formatting and default column formatting.
43- Merged cell ranges.
44============================================================================ */
45
46// Helper records for cell records
47
50{
51public:
52 explicit XclExpStringRec( const XclExpRoot& rRoot, const OUString& rResult );
53
54private:
55 virtual void WriteBody( XclExpStream& rStrm ) override;
56
57private:
59};
60
61// Additional records for special formula ranges
62
65{
66public:
68 bool IsBasePos( sal_uInt16 nXclCol, sal_uInt32 nXclRow ) const;
69
71 virtual XclTokenArrayRef CreateCellTokenArray( const XclExpRoot& rRoot ) const = 0;
73 virtual bool IsVolatile() const = 0;
74
75protected:
77 explicit XclExpRangeFmlaBase(
78 sal_uInt16 nRecId, sal_uInt32 nRecSize, const ScAddress& rScPos );
80 explicit XclExpRangeFmlaBase(
81 sal_uInt16 nRecId, sal_uInt32 nRecSize, const ScRange& rScRange );
82
84 void Extend( const ScAddress& rScPos );
85
87 void WriteRangeAddress( XclExpStream& rStrm ) const;
88
89protected:
92};
93
95
96// Array formulas =============================================================
97
98class ScTokenArray;
99
108{
109public:
110 explicit XclExpArray( const XclTokenArrayRef& xTokArr, const ScRange& rScRange );
111
113 virtual XclTokenArrayRef CreateCellTokenArray( const XclExpRoot& rRoot ) const override;
115 virtual bool IsVolatile() const override;
116
117private:
118 virtual void WriteBody( XclExpStream& rStrm ) override;
119
120private:
122};
123
125
128{
129public:
130 explicit XclExpArrayBuffer( const XclExpRoot& rRoot );
131
133 XclExpArrayRef CreateArray( const ScTokenArray& rScTokArr, const ScRange& rScRange );
135 XclExpArrayRef FindArray( const ScTokenArray& rScTokArr, const ScAddress& rBasePos ) const;
136
137private:
138 typedef ::std::map< ScAddress, XclExpArrayRef > XclExpArrayMap;
140};
141
142// Shared formulas ============================================================
143
152{
153public:
155 explicit XclExpShrfmla( const XclTokenArrayRef& xTokArr, const ScAddress& rScPos );
156
158 void ExtendRange( const ScAddress& rScPos );
159
161 virtual XclTokenArrayRef CreateCellTokenArray( const XclExpRoot& rRoot ) const override;
163 virtual bool IsVolatile() const override;
164
165private:
166 virtual void WriteBody( XclExpStream& rStrm ) override;
167
168private:
171};
172
174
177{
178public:
179 explicit XclExpShrfmlaBuffer( const XclExpRoot& rRoot );
180
187 XclExpShrfmlaRef CreateOrExtendShrfmla( const ScFormulaCell& rScCell, const ScAddress& rScPos );
188
189private:
195 bool IsValidTokenArray( const ScTokenArray& rArray ) const;
196
197 typedef std::unordered_map<const ScTokenArray*, XclExpShrfmlaRef> TokensType;
199
202};
203
204// Multiple operations ========================================================
205
208{
209public:
210 explicit XclExpTableop( const ScAddress& rScPos,
211 const XclMultipleOpRefs& rRefs, sal_uInt8 nScMode );
212
215 bool TryExtend( const ScAddress& rScPos, const XclMultipleOpRefs& rRefs );
216
218 void Finalize();
219
221 virtual XclTokenArrayRef CreateCellTokenArray( const XclExpRoot& rRoot ) const override;
223 virtual bool IsVolatile() const override;
225 virtual void Save( XclExpStream& rStrm ) override;
226
227private:
229 bool IsAppendable( sal_uInt16 nXclCol, sal_uInt16 nXclRow ) const;
230
232 virtual void WriteBody( XclExpStream& rStrm ) override;
233
234private:
235 sal_uInt16 mnLastAppXclCol;
236 sal_uInt16 mnColInpXclCol;
237 sal_uInt32 mnColInpXclRow;
238 sal_uInt16 mnRowInpXclCol;
239 sal_uInt32 mnRowInpXclRow;
241 bool mbValid;
242};
243
245
248{
249public:
250 explicit XclExpTableopBuffer( const XclExpRoot& rRoot );
251
257 const ScTokenArray& rScTokArr, const ScAddress& rScPos );
258
260 void Finalize();
261
262private:
264 XclExpTableopRef TryCreate( const ScAddress& rScPos, const XclMultipleOpRefs& rRefs );
265
266private:
268};
269
270// Cell records
271
274{
275public:
277 const XclAddress& GetXclPos() const { return maXclPos; }
279 sal_uInt16 GetXclCol() const { return maXclPos.mnCol; }
281 sal_uInt32 GetXclRow() const { return maXclPos.mnRow; }
282
284 virtual sal_uInt16 GetLastXclCol() const = 0;
286 virtual sal_uInt32 GetFirstXFId() const = 0;
288 virtual bool IsEmpty() const = 0;
290 virtual bool IsMultiLineText() const;
291
293 virtual bool TryMerge( const XclExpCellBase& rCell );
296 virtual void ConvertXFIndexes( const XclExpRoot& rRoot ) = 0;
298 virtual void GetBlankXFIndexes( ScfUInt16Vec& rXFIndexes ) const;
300 virtual void RemoveUnusedBlankCells( const ScfUInt16Vec& rXFIndexes, size_t nStartAllNotFound );
301
302protected:
303 explicit XclExpCellBase(
304 sal_uInt16 nRecId, std::size_t nContSize, const XclAddress& rXclPos );
305
307 void SetXclCol( sal_uInt16 nXclCol ) { maXclPos.mnCol = nXclCol; }
308
309private:
311};
312
314
315// Single cell records ========================================================
316
319{
320public:
322 virtual sal_uInt16 GetLastXclCol() const override;
324 virtual sal_uInt32 GetFirstXFId() const override;
326 virtual bool IsEmpty() const override;
328 virtual void ConvertXFIndexes( const XclExpRoot& rRoot ) override;
330 virtual void Save( XclExpStream& rStrm ) override;
331
332protected:
333 explicit XclExpSingleCellBase( sal_uInt16 nRecId, std::size_t nContSize,
334 const XclAddress& rXclPos, sal_uInt32 nXFId );
335
336 explicit XclExpSingleCellBase( const XclExpRoot& rRoot,
337 sal_uInt16 nRecId, std::size_t nContSize, const XclAddress& rXclPos,
338 const ScPatternAttr* pPattern, sal_Int16 nScript, sal_uInt32 nForcedXFId );
339
340 void SetContSize( std::size_t nContSize ) { mnContSize = nContSize; }
341 std::size_t GetContSize() const { return mnContSize; }
342
343 void SetXFId( sal_uInt32 nXFId ) { maXFId.mnXFId = nXFId; }
344 sal_uInt32 GetXFId() const { return maXFId.mnXFId; }
345
346private:
348 virtual void WriteBody( XclExpStream& rStrm ) override;
350 virtual void WriteContents( XclExpStream& rStrm ) = 0;
351
352private:
354 std::size_t mnContSize;
355};
356
359{
360public:
361 explicit XclExpNumberCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
362 const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
363 double fValue );
364
365 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
366private:
367 virtual void WriteContents( XclExpStream& rStrm ) override;
368
369private:
370 double mfValue;
371};
372
375{
376public:
377 explicit XclExpBooleanCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
378 const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
379 bool bValue );
380
381 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
382private:
383 virtual void WriteContents( XclExpStream& rStrm ) override;
384
385private:
386 bool mbValue;
387};
388
390class EditTextObject;
391
399{
400public:
402 explicit XclExpLabelCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
403 const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
404 const OUString& rStr );
405
407 explicit XclExpLabelCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
408 const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
409 const EditTextObject* pEditText, XclExpHyperlinkHelper& rHlinkHelper );
410
412 virtual bool IsMultiLineText() const override;
413
414 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
415private:
417 void Init( const XclExpRoot& rRoot,
418 const ScPatternAttr* pPattern, XclExpStringRef const & xText );
419
420 virtual void WriteContents( XclExpStream& rStrm ) override;
421
422private:
424 sal_uInt32 mnSstIndex;
426};
427
428class ScFormulaCell;
429
432{
433public:
434 explicit XclExpFormulaCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
435 const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
436 const ScFormulaCell& rScFmlaCell,
437 XclExpArrayBuffer& rArrayBfr,
438 XclExpShrfmlaBuffer& rShrfmlaBfr,
439 XclExpTableopBuffer& rTableopBfr );
440
442 virtual void Save( XclExpStream& rStrm ) override;
443 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
444
445private:
446 virtual void WriteContents( XclExpStream& rStrm ) override;
447
448private:
453};
454
455// Multiple cell records ======================================================
456
458{
459 sal_uInt16 mnCount;
460
461 explicit XclExpMultiXFId( sal_uInt32 nXFId, sal_uInt16 nCount = 1 ) :
462 XclExpXFId( nXFId ), mnCount( nCount ) {}
463};
464
467{
468public:
470 virtual sal_uInt16 GetLastXclCol() const override;
472 virtual sal_uInt32 GetFirstXFId() const override;
474 virtual bool IsEmpty() const override;
475
477 virtual void ConvertXFIndexes( const XclExpRoot& rRoot ) override;
480 virtual void Save( XclExpStream& rStrm ) override;
481 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
482
483protected:
484 explicit XclExpMultiCellBase( sal_uInt16 nRecId, sal_uInt16 nMulRecId,
485 std::size_t nContSize, const XclAddress& rXclPos );
486
488 sal_uInt16 GetCellCount() const;
489
491 void AppendXFId( const XclExpMultiXFId& rXFId );
493 void AppendXFId( const XclExpRoot& rRoot,
494 const ScPatternAttr* pPattern, sal_uInt16 nScript,
495 sal_uInt32 nForcedXFId, sal_uInt16 nCount = 1 );
496
498 bool TryMergeXFIds( const XclExpMultiCellBase& rCell );
500 void GetXFIndexes( ScfUInt16Vec& rXFIndexes ) const;
501
506 void RemoveUnusedXFIndexes( const ScfUInt16Vec& rXFIndexes, size_t nStartAllNotFound );
507
509 sal_uInt16 GetStartColAllDefaultCell() const;
510
511private:
514 virtual void WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol ) = 0;
515 virtual void WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol ) = 0;
516
517private:
518 typedef ::std::vector< XclExpMultiXFId > XclExpMultiXFIdDeq;
519
520 sal_uInt16 mnMulRecId;
521 std::size_t mnContSize;
523};
524
527{
528public:
529 explicit XclExpBlankCell( const XclAddress& rXclPos, const XclExpMultiXFId& rXFId );
530
531 explicit XclExpBlankCell( const XclExpRoot& rRoot,
532 const XclAddress& rXclPos, sal_uInt16 nLastXclCol,
533 const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId );
534
536 virtual bool TryMerge( const XclExpCellBase& rCell ) override;
538 virtual void GetBlankXFIndexes( ScfUInt16Vec& rXFIndexes ) const override;
540 virtual void RemoveUnusedBlankCells( const ScfUInt16Vec& rXFIndexes, size_t nStartAllNotFound ) override;
541
543
544private:
546 virtual void WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol ) override;
547 virtual void WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol ) override;
548};
549
552{
553public:
554 explicit XclExpRkCell( const XclExpRoot& rRoot, const XclAddress& rXclPos,
555 const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
556 sal_Int32 nRkValue );
557
559 virtual bool TryMerge( const XclExpCellBase& rCell ) override;
560
561private:
563 virtual void WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol ) override;
564 virtual void WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol ) override;
565
566private:
568};
569
570// Rows and Columns
571
572class ScOutlineArray;
573
576{
577public:
579 bool IsCollapsed() const { return mbCurrCollapse; }
581 sal_uInt8 GetLevel() const { return ::std::min( mnCurrLevel, EXC_OUTLINE_MAX ); }
582
583protected:
586 explicit XclExpOutlineBuffer( const XclExpRoot& rRoot, bool bRows );
587
589 void UpdateColRow( SCCOLROW nScPos );
590
591private:
594 {
596 bool mbHidden;
597 explicit XclExpLevelInfo() : mnScEndPos( 0 ), mbHidden( false ) {}
598 };
599
601 std::vector< XclExpLevelInfo >
605};
606
609{
610public:
611 explicit XclExpColOutlineBuffer( const XclExpRoot& rRoot ) :
612 XclExpOutlineBuffer( rRoot, false ) {}
613
615 void Update( SCCOL nScCol )
616 { UpdateColRow( static_cast< SCCOLROW >( nScCol ) ); }
617};
618
621{
622public:
623 explicit XclExpRowOutlineBuffer( const XclExpRoot& rRoot ) :
624 XclExpOutlineBuffer( rRoot, true ) {}
625
627 void Update( SCROW nScRow )
628 { UpdateColRow( static_cast< SCCOLROW >( nScRow ) ); }
629};
630
633{
634public:
635 explicit XclExpGuts( const XclExpRoot& rRoot );
636
637private:
638 virtual void WriteBody( XclExpStream& rStrm ) override;
639
640private:
641 sal_uInt16 mnColLevels;
642 sal_uInt16 mnColWidth;
643 sal_uInt16 mnRowLevels;
644 sal_uInt16 mnRowWidth;
645};
646
649{
650public:
651 explicit XclExpDimensions( const XclExpRoot& rRoot );
652
654 void SetDimensions(
655 sal_uInt16 nFirstUsedXclCol, sal_uInt32 nFirstUsedXclRow,
656 sal_uInt16 nFirstFreeXclCol, sal_uInt32 nFirstFreeXclRow );
657
658 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
659private:
661 virtual void WriteBody( XclExpStream& rStrm ) override;
662
663private:
665 sal_uInt32 mnFirstUsedXclRow;
666 sal_uInt32 mnFirstFreeXclRow;
667 sal_uInt16 mnFirstUsedXclCol;
668 sal_uInt16 mnFirstFreeXclCol;
669};
670
687{
688public:
689 explicit XclExpDefcolwidth( const XclExpRoot& rRoot );
690
692 bool IsDefWidth( sal_uInt16 nXclColWidth ) const;
693
695 void SetDefWidth( sal_uInt16 nXclColWidth, bool bXLS );
696
697 virtual void Save(XclExpStream& rStrm) override;
698};
699
706class XclExpColinfo : public XclExpRecord, protected XclExpRoot
707{
708public:
710 explicit XclExpColinfo( const XclExpRoot& rRoot,
711 SCCOL nScCol, SCROW nLastScRow,
712 XclExpColOutlineBuffer& rOutlineBfr );
713
715 void ConvertXFIndexes();
716
720 bool TryMerge( const XclExpColinfo& rColInfo );
721
723 sal_uInt16 GetColWidth() const { return mnWidth; }
725 sal_uInt16 GetXFIndex() const { return maXFId.mnXFIndex; }
727 sal_uInt16 GetColCount() const { return mnLastXclCol - mnFirstXclCol + 1; }
728
730 bool IsDefault( const XclExpDefcolwidth& rDefColWidth );
731
732 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
733
734private:
736 virtual void WriteBody( XclExpStream& rStrm ) override;
737
738private:
741 sal_uInt16 mnWidth;
742 sal_uInt16 mnScWidth;
743 sal_uInt16 mnFlags;
745 sal_uInt16 mnFirstXclCol;
746 sal_uInt16 mnLastXclCol;
747};
748
757{
758public:
759 explicit XclExpColinfoBuffer( const XclExpRoot& rRoot );
760
763 void Initialize( SCROW nLastScRow );
766 void Finalize( ScfUInt16Vec& rXFIndexes, bool bXLS );
767
769 virtual void Save( XclExpStream& rStrm ) override;
770 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
772 double GetDefColWidth() const { return maDefcolwidth.GetValue(); }
773
774private:
777
782};
783
784class XclExpRow;
785
788{
789 sal_uInt16 mnFlags;
790 sal_uInt16 mnHeight;
791
792 explicit XclExpDefaultRowData();
793 explicit XclExpDefaultRowData( const XclExpRow& rRow );
794
799};
800
803{
804public:
805 explicit XclExpDefrowheight();
806
808 void SetDefaultData( const XclExpDefaultRowData& rDefData );
810private:
812 virtual void WriteBody( XclExpStream& rStrm ) override;
813
814private:
816};
817
829class XclExpRow : public XclExpRecord, protected XclExpRoot
830{
831public:
835 explicit XclExpRow( const XclExpRoot& rRoot, sal_uInt32 nXclRow,
836 XclExpRowOutlineBuffer& rOutlineBfr, bool bAlwaysEmpty, bool bHidden, sal_uInt16 nHeight );
837
839 sal_uInt32 GetXclRow() const { return mnXclRow; }
841 sal_uInt16 GetHeight() const { return mnHeight; }
843 bool IsEmpty() const { return maCellList.IsEmpty(); }
849 bool IsEnabled() const { return mbEnabled; }
850
852 void AppendCell( XclExpCellRef const & xCell, bool bIsMergedBase );
853
855 void Finalize( const ScfUInt16Vec& rColXFIndexes,
856 ScfUInt16Vec& aXFIndexes,
857 size_t nStartColAllDefault,
858 bool bUpdateProgress );
859
862 sal_uInt16 GetFirstUsedXclCol() const;
865 sal_uInt16 GetFirstFreeXclCol() const;
866
871 bool IsDefaultable() const;
875 void DisableIfDefault( const XclExpDefaultRowData& rDefRowData );
876
878 void WriteCellList( XclExpStream& rStrm );
879
881 virtual void Save( XclExpStream& rStrm ) override;
882 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
883
884 sal_uInt32 GetXclRowRpt() const { return mnXclRowRpt; }
885 void SetXclRowRpt( sal_uInt32 nRpt ){ mnXclRowRpt = nRpt; }
886private:
888 void InsertCell( XclExpCellRef xCell, size_t nPos, bool bIsMergedBase );
889
891 virtual void WriteBody( XclExpStream& rStrm ) override;
892
893private:
896 sal_uInt32 mnXclRow;
897 sal_uInt16 mnHeight;
898 sal_uInt16 mnFlags;
899 sal_uInt16 mnXFIndex;
901 sal_uInt32 mnXclRowRpt;
902 sal_uInt32 mnCurrentRow;
905};
906
915{
916public:
917 explicit XclExpRowBuffer( const XclExpRoot& rRoot );
918
920 void AppendCell( XclExpCellRef const & xCell, bool bIsMergedBase );
922 void CreateRows( SCROW nFirstFreeScRow );
923
929 void Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt16Vec& rColXFIndexes,
930 size_t nStartColAllDefault );
931
933 virtual void Save( XclExpStream& rStrm ) override;
934 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
935
938
939private:
943 XclExpRow& GetOrCreateRow( sal_uInt32 nXclRow, bool bRowAlwaysEmpty );
944
945private:
946 typedef std::shared_ptr<XclExpRow> RowRef;
947 typedef ::std::map<sal_uInt32, RowRef> RowMap;
948
953};
954
955// Cell Table
956
957class XclExpNote;
959class XclExpHyperlink;
960class XclExpDval;
961
987{
988public:
989 explicit XclExpCellTable( const XclExpRoot& rRoot );
990
992 void Finalize(bool bXLS);
993
998 XclExpRecordRef CreateRecord( sal_uInt16 nRecId ) const;
1000 virtual void Save( XclExpStream& rStrm ) override;
1001 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
1002
1003private:
1006
1013
1026};
1027
1028/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Caches all ARRAY records.
Definition: xetable.hxx:128
XclExpArrayRef FindArray(const ScTokenArray &rScTokArr, const ScAddress &rBasePos) const
Tries to find an ARRAY record that corresponds to an ocMatRef token.
Definition: xetable.cxx:158
XclExpArrayBuffer(const XclExpRoot &rRoot)
Definition: xetable.cxx:142
XclExpArrayMap maRecMap
Definition: xetable.hxx:139
XclExpArrayRef CreateArray(const ScTokenArray &rScTokArr, const ScRange &rScRange)
Inserts a new ARRAY record into the buffer and returns it.
Definition: xetable.cxx:147
::std::map< ScAddress, XclExpArrayRef > XclExpArrayMap
Definition: xetable.hxx:138
Represents an ARRAY record that contains the token array of a matrix formula.
Definition: xetable.hxx:108
virtual bool IsVolatile() const override
Returns true, if the array formula contains volatile functions.
Definition: xetable.cxx:129
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xetable.cxx:134
virtual XclTokenArrayRef CreateCellTokenArray(const XclExpRoot &rRoot) const override
Creates and returns the token array for a corresponding FORMULA cell record.
Definition: xetable.cxx:124
XclTokenArrayRef mxTokArr
Definition: xetable.hxx:121
XclExpArray(const XclTokenArrayRef &xTokArr, const ScRange &rScRange)
Definition: xetable.cxx:118
Represents a BLANK or MULBLANK record that describes empty but formatted cells.
Definition: xetable.hxx:527
virtual void RemoveUnusedBlankCells(const ScfUInt16Vec &rXFIndexes, size_t nStartAllNotFound) override
Tries to remove unused Excel XF index(es).
Definition: xetable.cxx:1351
virtual void WriteXmlContents(XclExpXmlStream &rStrm, const XclAddress &rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol) override
Definition: xetable.cxx:1360
virtual void GetBlankXFIndexes(ScfUInt16Vec &rXFIndexes) const override
Inserts the Excel XF index(es) into the passed vector.
Definition: xetable.cxx:1346
XclExpBlankCell(const XclAddress &rXclPos, const XclExpMultiXFId &rXFId)
Definition: xetable.cxx:1323
virtual void WriteContents(XclExpStream &rStrm, sal_uInt16 nRelCol) override
Writes the remaining contents of the specified cell (without XF index).
Definition: xetable.cxx:1356
virtual bool TryMerge(const XclExpCellBase &rCell) override
Tries to merge the contents of the passed cell to own data.
Definition: xetable.cxx:1340
Represents a BOOLERR record that describes a cell with a Boolean value.
Definition: xetable.hxx:375
virtual void WriteContents(XclExpStream &rStrm) override
Derived classes write the contents of the specified cell (without XF index).
Definition: xetable.cxx:688
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:673
XclExpBooleanCell(const XclExpRoot &rRoot, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_uInt32 nForcedXFId, bool bValue)
Definition: xetable.cxx:664
The base class of all cell records.
Definition: xetable.hxx:274
virtual void ConvertXFIndexes(const XclExpRoot &rRoot)=0
Derived classes convert the XF identifier(s) into the Excel XF index(es).
sal_uInt16 GetXclCol() const
Returns the (first) Excel column index of the cell(s).
Definition: xetable.hxx:279
virtual bool IsEmpty() const =0
Derived classes return true, if this record does not contain at least one valid cell.
virtual void RemoveUnusedBlankCells(const ScfUInt16Vec &rXFIndexes, size_t nStartAllNotFound)
Derived classes for blank cells remove unused Excel XF index(es).
Definition: xetable.cxx:563
virtual sal_uInt16 GetLastXclCol() const =0
Derived classes return the column index of the last contained cell.
const XclAddress & GetXclPos() const
Returns the (first) address of the cell(s).
Definition: xetable.hxx:277
void SetXclCol(sal_uInt16 nXclCol)
Sets this record to a new column position.
Definition: xetable.hxx:307
virtual sal_uInt32 GetFirstXFId() const =0
Derived classes return the XF identifier of the first contained cell.
virtual void GetBlankXFIndexes(ScfUInt16Vec &rXFIndexes) const
Derived classes for blank cells insert the Excel XF index(es) into the passed vector.
Definition: xetable.cxx:558
virtual bool TryMerge(const XclExpCellBase &rCell)
Derived classes try to merge the contents of the passed cell to own data.
Definition: xetable.cxx:553
virtual bool IsMultiLineText() const
Derived classes return whether the cell contains multi-line text.
Definition: xetable.cxx:548
XclExpCellBase(sal_uInt16 nRecId, std::size_t nContSize, const XclAddress &rXclPos)
Definition: xetable.cxx:541
sal_uInt32 GetXclRow() const
Returns the Excel row index of the cell.
Definition: xetable.hxx:281
XclAddress maXclPos
Definition: xetable.hxx:310
This class contains the cell contents and more of an entire sheet.
Definition: xetable.hxx:987
XclExpRowBuffer maRowBfr
Buffer for column formatting.
Definition: xetable.hxx:1015
XclExpTableopBuffer maTableopBfr
Buffer for SHRFMLA records.
Definition: xetable.hxx:1018
rtl::Reference< XclExpMergedcells > XclExpMergedcellsRef
Definition: xetable.hxx:1009
virtual void Save(XclExpStream &rStrm) override
Saves the entire cell table.
Definition: xetable.cxx:2811
XclExpNoteListRef mxNoteList
GUTS record for outline areas.
Definition: xetable.hxx:1021
XclExpShrfmlaBuffer maShrfmlaBfr
Buffer for ARRAY records.
Definition: xetable.hxx:1017
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:2819
XclExpRecordList< XclExpNote > XclExpNoteList
Definition: xetable.hxx:1004
rtl::Reference< XclExpDval > XclExpDvalRef
Definition: xetable.hxx:1011
XclExpHyperlinkRef mxHyperlinkList
MERGEDCELLS record for merged cell ranges.
Definition: xetable.hxx:1023
XclExpMergedcellsRef mxMergedcells
List of NOTE records.
Definition: xetable.hxx:1022
XclExpDefrowhRef mxDefrowheight
Buffer for TABLEOP records.
Definition: xetable.hxx:1019
void Finalize(bool bXLS)
Converts all XF identifiers into the Excel XF indexes and calculates default formats.
Definition: xetable.cxx:2767
XclExtLstRef mxExtLst
Data validation with DVAL and DV records.
Definition: xetable.hxx:1025
rtl::Reference< XclExpDefrowheight > XclExpDefrowhRef
Definition: xetable.hxx:1007
XclExpRecordList< XclExpHyperlink > XclExpHyperlinkList
Definition: xetable.hxx:1005
XclExpColinfoBuffer maColInfoBfr
Definition: xetable.hxx:1014
rtl::Reference< XclExpNoteList > XclExpNoteListRef
Definition: xetable.hxx:1008
XclExpCellTable(const XclExpRoot &rRoot)
Definition: xetable.cxx:2523
XclExpRecordRef CreateRecord(sal_uInt16 nRecId) const
Returns the reference to an internal record specified by the passed record id.
Definition: xetable.cxx:2793
XclExpDvalRef mxDval
List of HLINK records.
Definition: xetable.hxx:1024
XclExpRecordRef mxGuts
DEFROWHEIGHT record for default row format.
Definition: xetable.hxx:1020
rtl::Reference< XclExtLst > XclExtLstRef
Definition: xetable.hxx:1012
rtl::Reference< XclExpHyperlinkList > XclExpHyperlinkRef
Definition: xetable.hxx:1010
XclExpArrayBuffer maArrayBfr
Rows and cell records.
Definition: xetable.hxx:1016
The outline buffer for column outlines.
Definition: xetable.hxx:609
void Update(SCCOL nScCol)
Updates the current state by processing the settings of the passed Calc column.
Definition: xetable.hxx:615
XclExpColOutlineBuffer(const XclExpRoot &rRoot)
Definition: xetable.hxx:611
Contains COLINFO records for all columns of a Calc sheet.
Definition: xetable.hxx:757
sal_uInt8 mnHighestOutlineLevel
Buffer for column outline groups.
Definition: xetable.hxx:781
XclExpRecordList< XclExpColinfo > XclExpColinfoList
Definition: xetable.hxx:775
double GetDefColWidth() const
Definition: xetable.hxx:772
XclExpColinfoList::RecordRefType XclExpColinfoRef
Definition: xetable.hxx:776
sal_uInt8 GetHighestOutlineLevel() const
Definition: xetable.hxx:771
XclExpDefcolwidth maDefcolwidth
List of COLINFO records.
Definition: xetable.hxx:779
void Initialize(SCROW nLastScRow)
Initializes the buffer: finds settings and formatting of all columns.
Definition: xetable.cxx:1740
XclExpColinfoList maColInfos
Definition: xetable.hxx:778
XclExpColinfoBuffer(const XclExpRoot &rRoot)
Definition: xetable.cxx:1732
void Finalize(ScfUInt16Vec &rXFIndexes, bool bXLS)
Converts the XF identifiers into the Excel XF indexes and merges equal columns.
Definition: xetable.cxx:1753
XclExpColOutlineBuffer maOutlineBfr
The DEFCOLWIDTH record.
Definition: xetable.hxx:780
virtual void Save(XclExpStream &rStrm) override
Writes all COLINFO records of this buffer.
Definition: xetable.cxx:1810
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:1818
Contains the column settings for a range of columns.
Definition: xetable.hxx:707
bool TryMerge(const XclExpColinfo &rColInfo)
Tries to merge this record with the passed record.
Definition: xetable.cxx:1677
XclExpColinfo(const XclExpRoot &rRoot, SCCOL nScCol, SCROW nLastScRow, XclExpColOutlineBuffer &rOutlineBfr)
Constructs the record with the settings in the Calc document.
Definition: xetable.cxx:1629
void ConvertXFIndexes()
Converts the XF identifier into the Excel XF index.
Definition: xetable.cxx:1663
sal_uInt16 mnScWidth
Excel width of the column.
Definition: xetable.hxx:742
sal_uInt16 mnLastXclCol
Index to first column.
Definition: xetable.hxx:746
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of this COLINFO record.
Definition: xetable.cxx:1691
sal_uInt8 mnOutlineLevel
Additional column flags.
Definition: xetable.hxx:744
XclExpXFId maXFId
Definition: xetable.hxx:739
sal_uInt16 GetColCount() const
Returns the number of columns represented by this record.
Definition: xetable.hxx:727
bool mbCustomWidth
The XF identifier for column default format.
Definition: xetable.hxx:740
sal_uInt16 mnFlags
Calc width of the column.
Definition: xetable.hxx:743
sal_uInt16 GetXFIndex() const
Returns the final Excel XF index of the column(s).
Definition: xetable.hxx:725
sal_uInt16 mnWidth
True = Column width is different from default width.
Definition: xetable.hxx:741
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:1706
sal_uInt16 GetColWidth() const
Returns the Excel width of the column(s).
Definition: xetable.hxx:723
sal_uInt16 mnFirstXclCol
Outline Level of column (for OOXML)
Definition: xetable.hxx:745
bool IsDefault(const XclExpDefcolwidth &rDefColWidth)
Returns true, if the column has default format and width.
Definition: xetable.cxx:1668
Represents the DEFCOLWIDTH record containing the default column width of a sheet.
Definition: xetable.hxx:687
void SetDefWidth(sal_uInt16 nXclColWidth, bool bXLS)
Sets the passed column width (in 1/256 character width) as default width.
Definition: xetable.cxx:1598
XclExpDefcolwidth(const XclExpRoot &rRoot)
Definition: xetable.cxx:1581
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
Definition: xetable.cxx:1620
bool IsDefWidth(sal_uInt16 nXclColWidth) const
Returns true, if the own default width exactly matches the passed width.
Definition: xetable.cxx:1587
Represents a DEFROWHEIGHT record containing default format for unused rows.
Definition: xetable.hxx:803
void SetDefaultData(const XclExpDefaultRowData &rDefData)
Sets the passed default data as current record contents.
Definition: xetable.cxx:1854
XclExpDefaultRowData maDefData
Definition: xetable.hxx:815
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the record.
Definition: xetable.cxx:1859
XclExpDefaultRowData & GetDefaultData()
Definition: xetable.hxx:809
Represents a DIMENSIONS record containing the used area of a sheet.
Definition: xetable.hxx:649
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:1534
void SetDimensions(sal_uInt16 nFirstUsedXclCol, sal_uInt32 nFirstUsedXclRow, sal_uInt16 nFirstFreeXclCol, sal_uInt32 nFirstFreeXclRow)
Sets the used area to the record.
Definition: xetable.cxx:1524
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the DIMENSIONS record.
Definition: xetable.cxx:1554
sal_uInt16 mnFirstFreeXclCol
First used column.
Definition: xetable.hxx:668
const XclExpRoot & mrRoot
Definition: xetable.hxx:664
XclExpDimensions(const XclExpRoot &rRoot)
Definition: xetable.cxx:1506
sal_uInt32 mnFirstFreeXclRow
First used row.
Definition: xetable.hxx:666
sal_uInt32 mnFirstUsedXclRow
Definition: xetable.hxx:665
sal_uInt16 mnFirstUsedXclCol
First unused row after used area.
Definition: xetable.hxx:667
This class contains the DV record list following the DVAL record.
Definition: xecontent.hxx:354
Represents a FORMULA record that describes a cell with a formula.
Definition: xetable.hxx:432
virtual void Save(XclExpStream &rStrm) override
Writes the FORMULA record and additional records related to the formula.
Definition: xetable.cxx:916
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:938
XclExpRecordRef mxStringRec
Additional record for matrix/shared formulas.
Definition: xetable.hxx:452
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:816
ScFormulaCell & mrScFmlaCell
Definition: xetable.hxx:449
XclTokenArrayRef mxTokArr
The Calc formula cell.
Definition: xetable.hxx:450
XclExpRangeFmlaRef mxAddRec
The token array of the formula.
Definition: xetable.hxx:451
virtual void WriteContents(XclExpStream &rStrm) override
Derived classes write the contents of the specified cell (without XF index).
Definition: xetable.cxx:1043
Represents a GUTS record containing the level count of row and column outlines.
Definition: xetable.hxx:633
XclExpGuts(const XclExpRoot &rRoot)
Definition: xetable.cxx:1471
sal_uInt16 mnRowLevels
Width of column outline area (pixels).
Definition: xetable.hxx:643
sal_uInt16 mnColLevels
Definition: xetable.hxx:641
sal_uInt16 mnRowWidth
Number of visible row outline levels.
Definition: xetable.hxx:644
sal_uInt16 mnColWidth
Number of visible column outline levels.
Definition: xetable.hxx:642
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xetable.cxx:1501
Helper to create HLINK records during creation of formatted cell strings.
Definition: xehelper.hxx:178
Represents a text cell record.
Definition: xetable.hxx:399
bool mbLineBreak
Index into Shared String Table (only used for BIFF8).
Definition: xetable.hxx:425
virtual bool IsMultiLineText() const override
Returns true if the cell contains multi-line text.
Definition: xetable.cxx:723
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:693
XclExpStringRef mxText
Definition: xetable.hxx:423
sal_uInt32 mnSstIndex
The cell text.
Definition: xetable.hxx:424
void Init(const XclExpRoot &rRoot, const ScPatternAttr *pPattern, XclExpStringRef const &xText)
Initializes the record contents.
Definition: xetable.cxx:728
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:782
virtual void WriteContents(XclExpStream &rStrm) override
Derived classes write the contents of the specified cell (without XF index).
Definition: xetable.cxx:797
Represents a MERGEDCELLS record containing all merged cell ranges in a sheet.
Definition: xecontent.hxx:74
Base class for all cell records supporting multiple contents.
Definition: xetable.hxx:467
virtual bool IsEmpty() const override
Returns true, if this record does not contain at least one valid cell.
Definition: xetable.cxx:1120
void GetXFIndexes(ScfUInt16Vec &rXFIndexes) const
Inserts the Excel XF index(es) into the passed vector.
Definition: xetable.cxx:1269
XclExpMultiXFIdDeq maXFIds
Data size of contents for one cell.
Definition: xetable.hxx:522
virtual sal_uInt32 GetFirstXFId() const override
Return the XF identifier of the first contained cell.
Definition: xetable.cxx:1115
virtual void ConvertXFIndexes(const XclExpRoot &rRoot) override
Convert all XF identifiers into the Excel XF indexes.
Definition: xetable.cxx:1125
virtual void WriteXmlContents(XclExpXmlStream &rStrm, const XclAddress &rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol)=0
sal_uInt16 GetStartColAllDefaultCell() const
Return starting column at which all indexes until the end are EXC_XF_DEFAULTCELL .
Definition: xetable.cxx:1310
bool TryMergeXFIds(const XclExpMultiCellBase &rCell)
Tries to merge the XF ID list of the passed cell with the own list.
Definition: xetable.cxx:1259
virtual void WriteContents(XclExpStream &rStrm, sal_uInt16 nRelCol)=0
Derived classes write the remaining contents of the specified cell (without XF index).
XclExpMultiCellBase(sal_uInt16 nRecId, sal_uInt16 nMulRecId, std::size_t nContSize, const XclAddress &rXclPos)
Definition: xetable.cxx:1102
::std::vector< XclExpMultiXFId > XclExpMultiXFIdDeq
Definition: xetable.hxx:518
sal_uInt16 GetCellCount() const
Returns the number of cells this record represents.
Definition: xetable.cxx:1237
std::size_t mnContSize
Record ID for multiple record variant.
Definition: xetable.hxx:521
void AppendXFId(const XclExpMultiXFId &rXFId)
Appends the passed XF identifier nCount times to the list of XF identifiers.
Definition: xetable.cxx:1243
virtual void Save(XclExpStream &rStrm) override
Writes the record, calls WriteContents() for each contained cell.
Definition: xetable.cxx:1131
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:1188
virtual sal_uInt16 GetLastXclCol() const override
Returns the column index of the last cell this record describes.
Definition: xetable.cxx:1110
sal_uInt16 mnMulRecId
Definition: xetable.hxx:520
void RemoveUnusedXFIndexes(const ScfUInt16Vec &rXFIndexes, size_t nStartAllNotFound)
Removes unused Excel XF index(es).
Definition: xetable.cxx:1280
Represents a NOTE record containing the relevant data of a cell note.
Definition: xeescher.hxx:344
Represents a NUMBER record that describes a cell with a double value.
Definition: xetable.hxx:359
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:644
XclExpNumberCell(const XclExpRoot &rRoot, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_uInt32 nForcedXFId, double fValue)
Definition: xetable.cxx:622
virtual void WriteContents(XclExpStream &rStrm) override
Derived classes write the contents of the specified cell (without XF index).
Definition: xetable.cxx:659
Base class for buffers containing row or column outline data.
Definition: xetable.hxx:576
XclExpOutlineBuffer(const XclExpRoot &rRoot, bool bRows)
Constructs the outline buffer.
Definition: xetable.cxx:1412
sal_uInt8 mnCurrLevel
Info for current row and all levels.
Definition: xetable.hxx:603
const ScOutlineArray * mpScOLArray
Definition: xetable.hxx:600
bool mbCurrCollapse
Highest level of an open group for current position.
Definition: xetable.hxx:604
sal_uInt8 GetLevel() const
Returns the highest level of an open group at the last processed position.
Definition: xetable.hxx:581
void UpdateColRow(SCCOLROW nScPos)
Updates the current state by processing the settings at the passed Calc position.
Definition: xetable.cxx:1427
std::vector< XclExpLevelInfo > maLevelInfos
Pointer to Calc outline array.
Definition: xetable.hxx:602
bool IsCollapsed() const
Returns true, if a collapsed group ends at the last processed position.
Definition: xetable.hxx:579
Base record for additional range formula records (i.e.
Definition: xetable.hxx:65
XclExpRangeFmlaBase(sal_uInt16 nRecId, sal_uInt32 nRecSize, const ScAddress &rScPos)
Constructs the record with a single cell.
Definition: xetable.cxx:72
virtual XclTokenArrayRef CreateCellTokenArray(const XclExpRoot &rRoot) const =0
Derived classes create the token array for a corresponding FORMULA cell record.
XclAddress maBaseXclPos
Range described by this record.
Definition: xetable.hxx:91
void Extend(const ScAddress &rScPos)
Extends the cell range to include the passed cell address.
Definition: xetable.cxx:101
XclRange maXclRange
Definition: xetable.hxx:90
virtual bool IsVolatile() const =0
Derived classes return true, if the own formula contains volatile functions.
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:96
void WriteRangeAddress(XclExpStream &rStrm) const
Writes the range address covered by this record.
Definition: xetable.cxx:111
Base class for all Excel records.
Definition: xerecord.hxx:39
bool IsEmpty() const
Definition: xerecord.hxx:326
Base class for single records with any content.
Definition: xerecord.hxx:143
Represents an RK or MULRK record that describes cells with a compressed double values.
Definition: xetable.hxx:552
ScfInt32Vec maRkValues
Definition: xetable.hxx:567
virtual void WriteContents(XclExpStream &rStrm, sal_uInt16 nRelCol) override
Writes the remaining contents of the specified cell (without XF index).
Definition: xetable.cxx:1404
XclExpRkCell(const XclExpRoot &rRoot, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_uInt32 nForcedXFId, sal_Int32 nRkValue)
Definition: xetable.cxx:1368
virtual bool TryMerge(const XclExpCellBase &rCell) override
Tries to merge the contents of the passed cell to own data.
Definition: xetable.cxx:1378
virtual void WriteXmlContents(XclExpXmlStream &rStrm, const XclAddress &rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol) override
Definition: xetable.cxx:1389
Access to global data from other classes.
Definition: xeroot.hxx:113
Collects all rows which contain all cells of a sheet.
Definition: xetable.hxx:915
XclExpRow & GetOrCreateRow(sal_uInt32 nXclRow, bool bRowAlwaysEmpty)
Returns access to the specified ROW record.
Definition: xetable.cxx:2445
RowMap maRowMap
Definition: xetable.hxx:949
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:2430
sal_uInt8 mnHighestOutlineLevel
DIMENSIONS record for used area.
Definition: xetable.hxx:952
virtual void Save(XclExpStream &rStrm) override
Writes the DIMENSIONS record, all ROW records and all cell records.
Definition: xetable.cxx:2402
XclExpDimensions & GetDimensions()
Definition: xetable.hxx:936
::std::map< sal_uInt32, RowRef > RowMap
Definition: xetable.hxx:947
void CreateRows(SCROW nFirstFreeScRow)
Forces insertion of all ROW records before the passed row.
Definition: xetable.cxx:2221
XclExpRowOutlineBuffer maOutlineBfr
Definition: xetable.hxx:950
sal_uInt8 GetHighestOutlineLevel() const
Definition: xetable.hxx:937
void AppendCell(XclExpCellRef const &xCell, bool bIsMergedBase)
Appends the passed cell object to the row that the cell specifies.
Definition: xetable.cxx:2215
std::shared_ptr< XclExpRow > RowRef
Definition: xetable.hxx:946
XclExpDimensions maDimensions
Buffer for row outline groups.
Definition: xetable.hxx:951
XclExpRowBuffer(const XclExpRoot &rRoot)
Definition: xetable.cxx:2207
void Finalize(XclExpDefaultRowData &rDefRowData, const ScfUInt16Vec &rColXFIndexes, size_t nStartColAllDefault)
Converts all XF identifiers into the Excel XF indexes and calculates default formats.
Definition: xetable.cxx:2257
The outline buffer for row outlines.
Definition: xetable.hxx:621
void Update(SCROW nScRow)
Updates the current state by processing the settings of the passed Calc row.
Definition: xetable.hxx:627
XclExpRowOutlineBuffer(const XclExpRoot &rRoot)
Definition: xetable.hxx:623
Represents a ROW record and additionally contains all cells records of a row.
Definition: xetable.hxx:830
sal_uInt16 mnFlags
Row height in twips.
Definition: xetable.hxx:898
bool IsDefaultable() const
Returns true, if this row may be omitted by using the DEFROWHEIGHT record.
Definition: xetable.cxx:2112
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xetable.cxx:2178
bool mbEnabled
true = Do not add blank cells in Finalize().
Definition: xetable.hxx:904
sal_uInt32 mnXclRowRpt
Outline Level of row (for OOXML)
Definition: xetable.hxx:901
XclExpRecordList< XclExpCellBase > maCellList
Definition: xetable.hxx:895
bool mbAlwaysEmpty
Definition: xetable.hxx:903
sal_uInt8 mnOutlineLevel
Default row formatting.
Definition: xetable.hxx:900
void AppendCell(XclExpCellRef const &xCell, bool bIsMergedBase)
Appends the passed cell object to this row.
Definition: xetable.cxx:1914
sal_uInt32 GetXclRow() const
Returns the excel row index of this ROW record.
Definition: xetable.hxx:839
sal_uInt16 GetFirstUsedXclCol() const
Returns the column index of the first used cell in this row.
Definition: xetable.cxx:2102
sal_uInt32 GetXclRowRpt() const
Definition: xetable.hxx:884
bool IsHidden() const
Returns true, if this row is hidden.
Definition: xetable.hxx:845
bool IsEnabled() const
Returns true, if this row is enabled (will be exported).
Definition: xetable.hxx:849
void Finalize(const ScfUInt16Vec &rColXFIndexes, ScfUInt16Vec &aXFIndexes, size_t nStartColAllDefault, bool bUpdateProgress)
Converts all XF identifiers into the Excel XF indexes.
Definition: xetable.cxx:1921
sal_uInt16 mnXFIndex
Flags for the ROW record.
Definition: xetable.hxx:899
bool IsEmpty() const
Returns true, if this row does not contain at least one valid cell.
Definition: xetable.hxx:843
void DisableIfDefault(const XclExpDefaultRowData &rDefRowData)
Disables this row, if it is defaultable and has the passed default format.
Definition: xetable.cxx:2119
virtual void Save(XclExpStream &rStrm) override
Writes the ROW record if the row is not disabled (see DisableIfDefault() function).
Definition: xetable.cxx:2133
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:2143
void WriteCellList(XclExpStream &rStrm)
Writes all cell records of this row.
Definition: xetable.cxx:2127
sal_uInt16 GetFirstFreeXclCol() const
Returns the column index of the first unused cell following all used cells in this row.
Definition: xetable.cxx:2107
sal_uInt32 mnCurrentRow
Definition: xetable.hxx:902
sal_uInt16 mnHeight
Excel row index of this row.
Definition: xetable.hxx:897
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:1865
void SetXclRowRpt(sal_uInt32 nRpt)
Definition: xetable.hxx:885
sal_uInt32 mnXclRow
List of cell records for this row.
Definition: xetable.hxx:896
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the ROW record.
Definition: xetable.cxx:2167
bool IsUnsynced() const
Returns true, if this row contains a manually set height.
Definition: xetable.hxx:847
sal_uInt16 GetHeight() const
Returns the height of the row in twips.
Definition: xetable.hxx:841
Caches all SHRFMLA records and provides functions to update their ranges.
Definition: xetable.hxx:177
o3tl::sorted_vector< const ScTokenArray * > BadTokenArraysType
Definition: xetable.hxx:198
XclExpShrfmlaRef CreateOrExtendShrfmla(const ScFormulaCell &rScCell, const ScAddress &rScPos)
Tries to create a new or to update an existing SHRFMLA record.
Definition: xetable.cxx:255
bool IsValidTokenArray(const ScTokenArray &rArray) const
Check for presence of token that's not allowed in Excel's shared formula.
Definition: xetable.cxx:216
std::unordered_map< const ScTokenArray *, XclExpShrfmlaRef > TokensType
Definition: xetable.hxx:197
TokensType maRecMap
Definition: xetable.hxx:200
XclExpShrfmlaBuffer(const XclExpRoot &rRoot)
Definition: xetable.cxx:211
BadTokenArraysType maBadTokens
Map containing the SHRFMLA records.
Definition: xetable.hxx:201
Represents a SHRFMLA record that contains the token array of a shared formula.
Definition: xetable.hxx:152
XclExpShrfmla(const XclTokenArrayRef &xTokArr, const ScAddress &rScPos)
Creates a SHRFMLA record that consists of the passed cell address only.
Definition: xetable.cxx:182
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xetable.cxx:205
virtual XclTokenArrayRef CreateCellTokenArray(const XclExpRoot &rRoot) const override
Creates and returns the token array for a corresponding FORMULA cell record.
Definition: xetable.cxx:195
XclTokenArrayRef mxTokArr
Definition: xetable.hxx:169
virtual bool IsVolatile() const override
Returns true, if the shared formula contains volatile functions.
Definition: xetable.cxx:200
sal_uInt8 mnUsedCount
The token array of a shared formula.
Definition: xetable.hxx:170
void ExtendRange(const ScAddress &rScPos)
Extends the cell range to include the passed cell address.
Definition: xetable.cxx:189
Base class for all cell records not supporting multiple contents.
Definition: xetable.hxx:319
virtual sal_uInt32 GetFirstXFId() const override
Return the XF identifier of the cell.
Definition: xetable.cxx:594
virtual void WriteContents(XclExpStream &rStrm)=0
Derived classes write the contents of the specified cell (without XF index).
virtual void WriteBody(XclExpStream &rStrm) override
Writes cell address, XF index, and calls WriteContents() for each cell.
Definition: xetable.cxx:616
void SetXFId(sal_uInt32 nXFId)
Definition: xetable.hxx:343
XclExpSingleCellBase(sal_uInt16 nRecId, std::size_t nContSize, const XclAddress &rXclPos, sal_uInt32 nXFId)
Definition: xetable.cxx:570
virtual sal_uInt16 GetLastXclCol() const override
Returns the last column, which is equal to the first column for single cells.
Definition: xetable.cxx:589
virtual void ConvertXFIndexes(const XclExpRoot &rRoot) override
Converts the XF identifier into the Excel XF index.
Definition: xetable.cxx:604
std::size_t mnContSize
The XF identifier of the cell formatting.
Definition: xetable.hxx:354
std::size_t GetContSize() const
Definition: xetable.hxx:341
void SetContSize(std::size_t nContSize)
Definition: xetable.hxx:340
sal_uInt32 GetXFId() const
Definition: xetable.hxx:344
virtual void Save(XclExpStream &rStrm) override
Writes cell address, XF index, and calls WriteContents() for each cell.
Definition: xetable.cxx:609
virtual bool IsEmpty() const override
Returns true, if this record does not contain at least one valid cell.
Definition: xetable.cxx:599
XclExpXFId maXFId
Definition: xetable.hxx:353
This class is used to export Excel record streams.
Definition: xestream.hxx:73
Represents a STRING record that contains the result of a string formula.
Definition: xetable.hxx:50
XclExpStringRec(const XclExpRoot &rRoot, const OUString &rResult)
Definition: xetable.cxx:56
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xetable.cxx:65
XclExpStringRef mxResult
Definition: xetable.hxx:58
Contains all created TABLEOP records and supports creating or updating them.
Definition: xetable.hxx:248
XclExpTableopRef CreateOrExtendTableop(const ScTokenArray &rScTokArr, const ScAddress &rScPos)
Tries to update an existing or to create a new TABLEOP record.
Definition: xetable.cxx:457
void Finalize()
Finalizes all contained TABLEOP records.
Definition: xetable.cxx:482
XclExpTableopRef TryCreate(const ScAddress &rScPos, const XclMultipleOpRefs &rRefs)
Tries to create a new TABLEOP record, if rRefs contains valid references.
Definition: xetable.cxx:488
XclExpRecordList< XclExpTableop > maTableopList
Definition: xetable.hxx:267
XclExpTableopBuffer(const XclExpRoot &rRoot)
Definition: xetable.cxx:452
Represents a TABLEOP record for a multiple operations range.
Definition: xetable.hxx:208
sal_uInt16 mnRowInpXclCol
Row index of column input cell.
Definition: xetable.hxx:238
sal_uInt32 mnRowInpXclRow
Column index of row input cell.
Definition: xetable.hxx:239
bool TryExtend(const ScAddress &rScPos, const XclMultipleOpRefs &rRefs)
Returns true, if the cell range has been extended to the passed position.
Definition: xetable.cxx:310
bool mbValid
Type of the multiple operation (Calc constant).
Definition: xetable.hxx:241
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the TABLEOP record.
Definition: xetable.cxx:434
sal_uInt16 mnColInpXclCol
Column index of last appended cell.
Definition: xetable.hxx:236
virtual bool IsVolatile() const override
Returns true, if the multiple operations range is volatile.
Definition: xetable.cxx:416
XclExpTableop(const ScAddress &rScPos, const XclMultipleOpRefs &rRefs, sal_uInt8 nScMode)
Definition: xetable.cxx:297
sal_uInt32 mnColInpXclRow
Column index of column input cell.
Definition: xetable.hxx:237
virtual void Save(XclExpStream &rStrm) override
Writes the record if it is valid.
Definition: xetable.cxx:421
void Finalize()
Finalizes the record.
Definition: xetable.cxx:374
sal_uInt16 mnLastAppXclCol
Definition: xetable.hxx:235
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:427
virtual XclTokenArrayRef CreateCellTokenArray(const XclExpRoot &rRoot) const override
Creates and returns the token array for a corresponding FORMULA cell record.
Definition: xetable.cxx:408
sal_uInt8 mnScMode
Row index of row input cell.
Definition: xetable.hxx:240
A record with a single value of type Type.
Definition: xerecord.hxx:199
const Type & GetValue() const
Returns the value of the record.
Definition: xerecord.hxx:208
int nCount
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:75
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:255
::std::vector< sal_Int32 > ScfInt32Vec
Definition: ftools.hxx:256
void SvStream & rStrm
A 2D cell address struct with Excel column and row indexes.
Definition: xladdress.hxx:30
sal_uInt16 mnCol
Definition: xladdress.hxx:31
sal_uInt32 mnRow
Definition: xladdress.hxx:32
Contains all possible default row settings.
Definition: xetable.hxx:788
XclExpDefaultRowData()
Default height for unspecified rows.
Definition: xetable.cxx:1829
sal_uInt16 mnFlags
Definition: xetable.hxx:789
sal_uInt16 mnHeight
Default flags for unspecified rows.
Definition: xetable.hxx:790
bool IsHidden() const
Returns true, if rows are hidden by default.
Definition: xetable.hxx:796
bool IsUnsynced() const
Returns true, if the rows have a manually set height by default.
Definition: xetable.hxx:798
sal_uInt16 mnCount
Definition: xetable.hxx:459
XclExpMultiXFId(sal_uInt32 nXFId, sal_uInt16 nCount=1)
Number of XF identifiers.
Definition: xetable.hxx:461
Data about an outline level.
Definition: xetable.hxx:594
bool mbHidden
The end position of a group in a level.
Definition: xetable.hxx:596
XclExpLevelInfo()
true = Group in this level is hidden.
Definition: xetable.hxx:597
A combination of unique XF identifier with real Excel XF index.
Definition: xestyle.hxx:422
sal_uInt16 mnXFIndex
Temporary XF identifier.
Definition: xestyle.hxx:424
sal_uInt32 mnXFId
Definition: xestyle.hxx:423
Contains all cell references that can be extracted from a multiple operations formula.
Definition: xlformula.hxx:469
A 2D cell range address struct with Excel column and row indexes.
Definition: xladdress.hxx:59
unsigned char sal_uInt8
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
std::shared_ptr< XclExpString > XclExpStringRef
Definition: xeroot.hxx:35
rtl::Reference< XclExpRangeFmlaBase > XclExpRangeFmlaRef
Definition: xetable.hxx:94
rtl::Reference< XclExpArray > XclExpArrayRef
Definition: xetable.hxx:124
rtl::Reference< XclExpCellBase > XclExpCellRef
Definition: xetable.hxx:313
rtl::Reference< XclExpShrfmla > XclExpShrfmlaRef
Definition: xetable.hxx:173
rtl::Reference< XclExpTableop > XclExpTableopRef
Definition: xetable.hxx:244
std::shared_ptr< XclTokenArray > XclTokenArrayRef
Definition: xlformula.hxx:416
const sal_uInt16 EXC_ROW_HIDDEN
Definition: xltable.hxx:83
const sal_uInt16 EXC_ROW_UNSYNCED
Definition: xltable.hxx:84
const sal_uInt8 EXC_OUTLINE_MAX
Definition: xltable.hxx:28
const sal_uInt16 EXC_DEFROW_UNSYNCED
Definition: xltable.hxx:114
const sal_uInt16 EXC_DEFROW_HIDDEN
Definition: xltable.hxx:115