LibreOffice Module sc (master) 1
sheetdatacontext.cxx
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#include <sheetdatacontext.hxx>
21
25#include <oox/token/namespaces.hxx>
26#include <oox/token/tokens.hxx>
27#include <addressconverter.hxx>
28#include <biffhelper.hxx>
29#include <formulaparser.hxx>
30#include <richstringcontext.hxx>
31#include <sal/log.hxx>
32#include <o3tl/string_view.hxx>
33
34namespace oox::xls {
35
36using ::oox::core::ContextHandlerRef;
37
38namespace {
39
40// record constants -----------------------------------------------------------
41
42const sal_uInt32 BIFF12_CELL_SHOWPHONETIC = 0x01000000;
43
44const sal_uInt8 BIFF12_DATATABLE_ROW = 0x01;
45const sal_uInt8 BIFF12_DATATABLE_2D = 0x02;
46const sal_uInt8 BIFF12_DATATABLE_REF1DEL = 0x04;
47const sal_uInt8 BIFF12_DATATABLE_REF2DEL = 0x08;
48
49const sal_uInt16 BIFF12_ROW_THICKTOP = 0x0001;
50const sal_uInt16 BIFF12_ROW_THICKBOTTOM = 0x0002;
51const sal_uInt16 BIFF12_ROW_COLLAPSED = 0x0800;
52const sal_uInt16 BIFF12_ROW_HIDDEN = 0x1000;
53const sal_uInt16 BIFF12_ROW_CUSTOMHEIGHT = 0x2000;
54const sal_uInt16 BIFF12_ROW_CUSTOMFORMAT = 0x4000;
55const sal_uInt8 BIFF12_ROW_SHOWPHONETIC = 0x01;
56
57} // namespace
58
60 WorksheetContextBase( rFragment ),
61 mrAddressConv( rFragment.getAddressConverter() ),
62 mrSheetData( rFragment.getSheetData() ),
63 mnSheet( rFragment.getSheetIndex() ),
64 mbHasFormula( false ),
65 mbValidRange( false ),
66 mnRow( -1 ),
67 mnCol( -1 )
68{
69 SAL_INFO( "sc.filter", "start safe sheet data context - unlock" );
70 mxFormulaParser.reset(rFragment.createFormulaParser());
71}
72
74{
75 SAL_INFO( "sc.filter", "end safe sheet data context - relock" );
76}
77
79{
80 switch( getCurrentElement() )
81 {
82 case XLS_TOKEN( sheetData ):
83 if( nElement == XLS_TOKEN( row ) ) { importRow( rAttribs ); return this; }
84 break;
85
86 case XLS_TOKEN( row ):
87 // do not process cell elements with invalid (out-of-range) address
88 if( nElement == XLS_TOKEN( c ) && importCell( rAttribs ) )
89 return this;
90 break;
91
92 case XLS_TOKEN( c ):
93 switch( nElement )
94 {
95 case XLS_TOKEN( is ):
96 mxInlineStr = std::make_shared<RichString>();
97 return new RichStringContext( *this, mxInlineStr );
98 case XLS_TOKEN( v ):
99 return this; // characters contain cell value
100 case XLS_TOKEN( f ):
101 importFormula( rAttribs );
102 return this; // characters contain formula string
103 }
104 break;
105 }
106 return nullptr;
107}
108
109void SheetDataContext::onCharacters( const OUString& rChars )
110{
111 switch( getCurrentElement() )
112 {
113 case XLS_TOKEN( v ):
114 maCellValue = rChars;
115 break;
116 case XLS_TOKEN( f ):
118 {
119 maFormulaStr = rChars;
120 }
121 break;
122 }
123}
124
126{
127 if( getCurrentElement() != XLS_TOKEN( c ) )
128 return;
129
130 // try to create a formula cell
132 {
133 // will buffer formulas but need to
134 // a) need to set format first
135 // :/
136 case XML_normal:
139
140 // If a number cell has some preloaded value, stick it into the buffer
141 // but do this only for real cell formulas (not array, shared etc.)
142 if (!maCellValue.isEmpty())
144 break;
145
146 case XML_shared:
147 if( maFmlaData.mnSharedId >= 0 )
148 {
151
154 }
155 else
156 // no success, set plain cell value and formatting below
157 mbHasFormula = false;
158 break;
159 case XML_array:
161 {
163 }
164 // set cell formatting, but do not set result as cell value
166 break;
167 case XML_dataTable:
168 if( mbValidRange )
170 // set cell formatting, but do not set result as cell value
172 break;
173 default:
174 OSL_ENSURE( maFmlaData.mnFormulaType == XML_TOKEN_INVALID, "SheetDataContext::onEndElement - unknown formula type" );
175 mbHasFormula = false;
176 }
177
178 if( mbHasFormula )
179 return;
180
181 // no formula created: try to set the cell value
182 if( !maCellValue.isEmpty() ) switch( maCellData.mnCellType )
183 {
184 case XML_n:
186 break;
187 case XML_b:
188 {
189 // Some generators may write true or false instead of 1 or 0.
190 /* XXX NOTE: PivotCacheItem::readBool() may suffer from this as
191 * well, but for now let's assume that software writing this
192 * here wrong won't write pivot caches at all.. */
193 bool bValue = (maCellValue.toDouble() != 0.0);
194 if (!bValue && maCellValue.equalsIgnoreAsciiCase(u"true"))
195 bValue = true;
197 }
198 break;
199 case XML_e:
201 break;
202 case XML_str:
204 break;
205 case XML_s:
207 break;
208 case XML_d:
210 break;
211 }
212 else if( (maCellData.mnCellType == XML_inlineStr) && mxInlineStr )
213 {
214 mxInlineStr->finalizeImport(*this);
216 }
217 else
218 {
219 // empty cell, update cell type
222 }
223}
224
226{
227 switch( getCurrentElement() )
228 {
230 if( nRecId == BIFF12_ID_ROW ) { importRow( rStrm ); return this; }
231 break;
232
233 case BIFF12_ID_ROW:
234 switch( nRecId )
235 {
236 case BIFF12_ID_ARRAY: importArray( rStrm ); break;
259 }
260 break;
261 }
262 return nullptr;
263}
264
265// private --------------------------------------------------------------------
266
268{
269 RowModel aModel;
270 sal_Int32 nRow = rAttribs.getInteger( XML_r, -1 ); // 1-based row index
271 if(nRow != -1)
272 {
273 aModel.mnRow = nRow;
274 mnRow = nRow-1; // to 0-based row index.
275 }
276 else
277 aModel.mnRow = (++mnRow + 1); // increment 0-based row index, to 1-based model row
279 mnCol = -1;
280
281 aModel.mfHeight = rAttribs.getDouble( XML_ht, -1.0 );
282 aModel.mnXfId = rAttribs.getInteger( XML_s, -1 );
283 aModel.mnLevel = rAttribs.getInteger( XML_outlineLevel, 0 );
284 aModel.mbCustomHeight = rAttribs.getBool( XML_customHeight, false );
285 aModel.mbCustomFormat = rAttribs.getBool( XML_customFormat, false );
286 aModel.mbShowPhonetic = rAttribs.getBool( XML_ph, false );
287 aModel.mbHidden = rAttribs.getBool( XML_hidden, false );
288 aModel.mbCollapsed = rAttribs.getBool( XML_collapsed, false );
289 aModel.mbThickTop = rAttribs.getBool( XML_thickTop, false );
290 aModel.mbThickBottom = rAttribs.getBool( XML_thickBot, false );
291
292 if (aModel.mfHeight > 0 && getFilter().isMSODocument())
293 {
294 aModel.mfHeight -= fmod(aModel.mfHeight, 0.75); //round down to 0.75pt
295 }
296
297 // decode the column spans (space-separated list of colon-separated integer pairs)
298 OUString aColSpansText = rAttribs.getString( XML_spans, OUString() );
299 sal_Int32 nIndex = 0;
300 while( nIndex >= 0 )
301 {
302 std::u16string_view aColSpanToken = o3tl::getToken(aColSpansText, 0, ' ', nIndex );
303 size_t nSepPos = aColSpanToken.find( ':' );
304 if( (0 < nSepPos) && (nSepPos + 1 < aColSpanToken.size()) )
305 {
306 // OOXML uses 1-based integer column indexes, row model expects 0-based colspans
307 const sal_Int32 nCol1 = o3tl::toInt32(aColSpanToken.substr( 0, nSepPos )) - 1;
308 const bool bValid1 = mrAddressConv.checkCol( nCol1, true);
309 if (bValid1)
310 {
311 const sal_Int32 nCol2 = o3tl::toInt32(aColSpanToken.substr( nSepPos + 1 )) - 1;
312 mrAddressConv.checkCol( nCol2, true);
313 }
314 }
315 }
316
317 // set row properties in the current sheet
318 setRowModel( aModel );
319}
320
322{
323 bool bValid = true;
324 std::string_view p = rAttribs.getView(XML_r);
325
326 if (p.empty())
327 {
328 ++mnCol;
329 ScAddress aAddress( mnCol, mnRow, mnSheet );
330 bValid = mrAddressConv.checkCellAddress( aAddress, true );
331 maCellData.maCellAddr = aAddress;
332 }
333 else
334 {
337 }
338
339 if( bValid )
340 {
341 maCellData.mnCellType = rAttribs.getToken( XML_t, XML_n );
342 maCellData.mnXfId = rAttribs.getInteger( XML_s, -1 );
343 maCellData.mbShowPhonetic = rAttribs.getBool( XML_ph, false );
344
345 // reset cell value, formula settings, and inline string
346 maCellValue.clear();
347 mxInlineStr.reset();
348 mbHasFormula = false;
349
350 // update used area of the sheet
352 }
353 return bValid;
354}
355
357{
358 mbHasFormula = true;
359 mbValidRange = mrAddressConv.convertToCellRange( maFmlaData.maFormulaRef, rAttribs.getString( XML_ref, OUString() ), mnSheet, true, true );
360
361 maFmlaData.mnFormulaType = rAttribs.getToken( XML_t, XML_normal );
362 maFmlaData.mnSharedId = rAttribs.getInteger( XML_si, -1 );
363
364 if( maFmlaData.mnFormulaType == XML_dataTable )
365 {
366 maTableData.maRef1 = rAttribs.getString( XML_r1, OUString() );
367 maTableData.maRef2 = rAttribs.getString( XML_r2, OUString() );
368 maTableData.mb2dTable = rAttribs.getBool( XML_dt2D, false );
369 maTableData.mbRowTable = rAttribs.getBool( XML_dtr, false );
370 maTableData.mbRef1Deleted = rAttribs.getBool( XML_del1, false );
371 maTableData.mbRef2Deleted = rAttribs.getBool( XML_del2, false );
372 }
373
374 maFormulaStr.clear();
375}
376
378{
379 RowModel aModel;
380 sal_Int32 nSpanCount;
381 sal_uInt16 nHeight, nFlags1;
382 sal_uInt8 nFlags2;
383 maCurrPos.mnRow = rStrm.readInt32();
384 aModel.mnXfId = rStrm.readInt32();
385 nHeight = rStrm.readuInt16();
386 nFlags1 = rStrm.readuInt16();
387 nFlags2 = rStrm.readuChar();
388 nSpanCount = rStrm.readInt32();
389 maCurrPos.mnCol = 0;
390
392 // row index is 0-based in BIFF12, but RowModel expects 1-based
393 aModel.mnRow = maCurrPos.mnRow + 1;
394 // row height is in twips in BIFF12, convert to points
395 aModel.mfHeight = nHeight / 20.0;
396 aModel.mnLevel = extractValue< sal_Int32 >( nFlags1, 8, 3 );
397 aModel.mbCustomHeight = getFlag( nFlags1, BIFF12_ROW_CUSTOMHEIGHT );
398 aModel.mbCustomFormat = getFlag( nFlags1, BIFF12_ROW_CUSTOMFORMAT );
399 aModel.mbShowPhonetic = getFlag( nFlags2, BIFF12_ROW_SHOWPHONETIC );
400 aModel.mbHidden = getFlag( nFlags1, BIFF12_ROW_HIDDEN );
401 aModel.mbCollapsed = getFlag( nFlags1, BIFF12_ROW_COLLAPSED );
402 aModel.mbThickTop = getFlag( nFlags1, BIFF12_ROW_THICKTOP );
403 aModel.mbThickBottom = getFlag( nFlags1, BIFF12_ROW_THICKBOTTOM );
404
405 // read the column spans
406 for( sal_Int32 nSpanIdx = 0; (nSpanIdx < nSpanCount) && !rStrm.isEof(); ++nSpanIdx )
407 {
408 sal_Int32 nFirstCol, nLastCol;
409 nFirstCol = rStrm.readInt32();
410 mrAddressConv.checkCol( nFirstCol, true);
411 nLastCol = rStrm.readInt32();
412 mrAddressConv.checkCol( nLastCol, true);
413 }
414
415 // set row properties in the current sheet
416 setRowModel( aModel );
417}
418
420{
421 switch( eCellType )
422 {
423 case CELLTYPE_VALUE:
424 case CELLTYPE_FORMULA: maCurrPos.mnCol = rStrm.readInt32(); break;
425 case CELLTYPE_MULTI: ++maCurrPos.mnCol; break;
426 }
427
428 sal_uInt32 nXfId = rStrm.readuInt32();
429
431 maCellData.mnXfId = extractValue< sal_Int32 >( nXfId, 0, 24 );
432 maCellData.mbShowPhonetic = getFlag( nXfId, BIFF12_CELL_SHOWPHONETIC );
433
434 // update used area of the sheet
435 if( bValidAddr )
437 return bValidAddr;
438}
439
441{
442 rStrm.skip( 2 );
444}
445
447{
448 BinRange aRange;
449 rStrm >> aRange;
450 return mrAddressConv.convertToCellRange( maFmlaData.maFormulaRef, aRange, mnSheet, true, true );
451}
452
454{
455 if( readCellHeader( rStrm, eCellType ) )
456 {
457 maCellData.mnCellType = XML_b;
458 bool bValue = rStrm.readuInt8() != 0;
459 if( eCellType == CELLTYPE_FORMULA )
461 else
463 }
464}
465
467{
468 OSL_ENSURE( eCellType != CELLTYPE_FORMULA, "SheetDataContext::importCellBlank - no formula cells supported" );
469 if( readCellHeader( rStrm, eCellType ) )
471}
472
474{
475 if( readCellHeader( rStrm, eCellType ) )
476 {
477 maCellData.mnCellType = XML_n;
478 double fValue = rStrm.readDouble();
479 if( eCellType == CELLTYPE_FORMULA )
481 else
483 }
484}
485
487{
488 if( readCellHeader( rStrm, eCellType ) )
489 {
490 maCellData.mnCellType = XML_e;
491 sal_uInt8 nErrorCode = rStrm.readuInt8();
492 if( eCellType == CELLTYPE_FORMULA )
494 else
495 mrSheetData.setErrorCell( maCellData, nErrorCode );
496 }
497}
498
500{
501 OSL_ENSURE( eCellType != CELLTYPE_FORMULA, "SheetDataContext::importCellRk - no formula cells supported" );
502 if( readCellHeader( rStrm, eCellType ) )
503 {
504 maCellData.mnCellType = XML_n;
506 }
507}
508
510{
511 OSL_ENSURE( eCellType != CELLTYPE_FORMULA, "SheetDataContext::importCellRString - no formula cells supported" );
512 if( readCellHeader( rStrm, eCellType ) )
513 {
514 maCellData.mnCellType = XML_inlineStr;
515 RichStringRef xString = std::make_shared<RichString>();
516 xString->importString( rStrm, true, *this );
517 xString->finalizeImport( *this );
519 }
520}
521
523{
524 OSL_ENSURE( eCellType != CELLTYPE_FORMULA, "SheetDataContext::importCellSi - no formula cells supported" );
525 if( readCellHeader( rStrm, eCellType ) )
526 {
527 maCellData.mnCellType = XML_s;
529 }
530}
531
533{
534 if( readCellHeader( rStrm, eCellType ) )
535 {
536 maCellData.mnCellType = XML_inlineStr;
537 // always import the string, stream will point to formula afterwards, if existing
538 RichStringRef xString = std::make_shared<RichString>();
539 xString->importString( rStrm, false, *this );
540 xString->finalizeImport( *this );
541 if( eCellType == CELLTYPE_FORMULA )
543 else
545 }
546}
547
549{
551 {
552 rStrm.skip( 1 );
555 }
556}
557
559{
560 if( !readFormulaRef( rStrm ) )
561 return;
562
563 BinAddress aRef1, aRef2;
564 sal_uInt8 nFlags;
565 rStrm >> aRef1 >> aRef2;
566 nFlags = rStrm.readuChar();
569 maTableData.mbRowTable = getFlag( nFlags, BIFF12_DATATABLE_ROW );
570 maTableData.mb2dTable = getFlag( nFlags, BIFF12_DATATABLE_2D );
571 maTableData.mbRef1Deleted = getFlag( nFlags, BIFF12_DATATABLE_REF1DEL );
572 maTableData.mbRef2Deleted = getFlag( nFlags, BIFF12_DATATABLE_REF2DEL );
574}
575
577{
579 {
582 }
583}
584
585} // namespace oox
586
587/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SCCOL Col() const
Definition: address.hxx:279
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
std::string_view getView(sal_Int32 nAttrToken) const
std::optional< OUString > getString(sal_Int32 nAttrToken) const
std::optional< bool > getBool(sal_Int32 nAttrToken) const
std::optional< sal_Int32 > getToken(sal_Int32 nAttrToken) const
std::optional< double > getDouble(sal_Int32 nAttrToken) const
XmlFilterBase & getFilter() const
bool isMSODocument() const
bool convertToCellAddress(ScAddress &orAddress, const OUString &rString, sal_Int16 nSheet, bool bTrackOverflow)
Tries to convert the passed string to a single cell address.
bool checkCellAddress(const ScAddress &rAddress, bool bTrackOverflow)
Checks the passed cell address if it fits into the spreadsheet limits.
bool checkRow(sal_Int32 nRow, bool bTrackOverflow)
Checks if the passed row index is valid.
bool checkCol(sal_Int32 nCol, bool bTrackOverflow)
Checks if the passed column index is valid.
bool convertToCellRange(ScRange &orRange, std::u16string_view aString, sal_Int16 nSheet, bool bAllowOverflow, bool bTrackOverflow)
Tries to convert the passed string to a cell range address.
static double calcDoubleFromRk(sal_Int32 nRkValue)
Converts the passed packed number to a double.
Definition: biffhelper.cxx:39
static OUString generateAddress2dString(const ScAddress &rAddress, bool bAbsolute)
Generates a cell address string in A1 notation from the passed cell address.
void setErrorCell(const CellModel &rModel, const OUString &rErrorCode)
Inserts an error cell from the passed error code into the sheet.
void setBlankCell(const CellModel &rModel)
Inserts a blank cell (with formatting) into the sheet.
void createTableOperation(const ScRange &rRange, const DataTableModel &rModel)
Sets a multiple table operation to the passed range.
void setDateCell(const CellModel &rModel, const OUString &rDateString)
Inserts an ISO 8601 date cell into the sheet.
void setCellFormat(const CellModel &rModel)
Processes the cell formatting data of the passed cell.
void setValueCell(const CellModel &rModel, double fValue)
Inserts a value cell into the sheet.
void createSharedFormula(const ScAddress &rRange, const ApiTokenSequence &rTokens)
void setFormulaCell(const CellModel &rModel, const ApiTokenSequence &rTokens)
Inserts a formula cell into the sheet.
void setBooleanCell(const CellModel &rModel, bool bValue)
Inserts a boolean cell into the sheet and adjusts number format.
void setStringCell(const CellModel &rModel, const OUString &rText)
Inserts a simple string cell into the sheet.
void createArrayFormula(const ScRange &rRange, const ApiTokenSequence &rTokens)
Inserts the passed token array as array formula.
void importCellString(SequenceInputStream &rStrm, CellType eCellType)
Imports a string cell from a CELL_STRING, MULTCELL_STRING, or FORMULA_STRING record.
CellFormulaModel maFmlaData
Position, contents, formatting of current imported cell.
SheetDataContext(WorksheetFragmentBase &rFragment)
void importCellBool(SequenceInputStream &rStrm, CellType eCellType)
Imports a boolean cell from a CELL_BOOL, MULTCELL_BOOL, or FORMULA_BOOL record.
void importSharedFmla(SequenceInputStream &rStrm)
Imports a shared formula from a SHAREDFORMULA record.
void importCellRString(SequenceInputStream &rStrm, CellType eCellType)
Imports a rich-string cell from a CELL_RSTRING or MULTCELL_RSTRING record.
bool readFormulaRef(SequenceInputStream &rStrm)
Reads the formula range used by shared formulas, arrays, and data tables.
RichStringRef mxInlineStr
Cell value string (OOXML only).
SheetDataBuffer & mrSheetData
The formula parser, different one for each SheetDataContext.
bool mbValidRange
True = current cell has formula data (OOXML only).
virtual void onCharacters(const OUString &rChars) override
void importCellDouble(SequenceInputStream &rStrm, CellType eCellType)
Imports a numeric cell from a CELL_DOUBLE, MULTCELL_DOUBLE, or FORMULA_DOUBLE record.
virtual ::oox::core::ContextHandlerRef onCreateRecordContext(sal_Int32 nRecId, SequenceInputStream &rStrm) override
sal_Int32 mnRow
True = maFmlaData.maFormulaRef is valid (OOXML only).
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
void importCellBlank(SequenceInputStream &rStrm, CellType eCellType)
Imports an empty cell from a CELL_BLANK or MULTCELL_BLANK record.
virtual ~SheetDataContext() override
BinAddress maCurrPos
Settings for table operations.
void importCellRk(SequenceInputStream &rStrm, CellType eCellType)
Imports an encoded numeric cell from a CELL_RK or MULTCELL_RK record.
void importDataTable(SequenceInputStream &rStrm)
Imports table operation from a DATATABLE record.
sal_Int16 mnSheet
Settings for a cell formula.
void importArray(SequenceInputStream &rStrm)
Imports an array formula from an ARRAY record.
void importCellError(SequenceInputStream &rStrm, CellType eCellType)
Imports an error code cell from a CELL_ERROR, MULTCELL_ERROR, or FORMULA_ERROR record.
bool importCell(const AttributeList &rAttribs)
Imports cell settings from a c element.
CellType
Different types of cell records.
virtual void onEndElement() override
void importRow(const AttributeList &rAttribs)
Imports row settings from a row element.
void importCellSi(SequenceInputStream &rStrm, CellType eCellType)
Imports a string cell from a CELL_SI or MULTCELL_SI record.
CellModel maCellData
The sheet data buffer for cell content and formatting.
std::unique_ptr< FormulaParser > mxFormulaParser
The address converter.
bool readCellHeader(SequenceInputStream &rStrm, CellType eCellType)
Reads a cell address and the following XF identifier.
bool mbHasFormula
Current cell position (BIFF12 only).
AddressConverter & mrAddressConv
void importFormula(const AttributeList &rAttribs)
Imports cell settings from an f element.
sal_Int32 mnCol
row index (0-based)
OUString maFormulaStr
Inline rich string (OOXML only).
ApiTokenSequence readCellFormula(SequenceInputStream &rStrm)
Reads a cell formula for the current cell.
FormulaParser * createFormulaParser() const
Returns an unshared import formula parser (import filter only!).
Context handler derived from the WorksheetHelper helper class.
Fragment handler derived from the WorksheetHelper helper class.
void setCellFormula(const ScAddress &rTokenAddress, const OUString &)
void extendUsedArea(const ScAddress &rAddress)
Extends the used area of this sheet by the passed cell position.
void createSharedFormulaMapEntry(const ScAddress &rAddress, sal_Int32 nSharedId, const OUString &rTokens)
void setCellArrayFormula(const ScRange &rRangeAddress, const ScAddress &rTokenAddress, const OUString &rTokenStr)
void setRowModel(const RowModel &rModel)
Sets row settings for a specific range of rows.
void setCellFormulaValue(const ScAddress &rAddress, const OUString &rValueStr, sal_Int32 nCellType)
sal_Int32 mnRow
sal_Int32 mnCol
float v
float u
sal_Int32 nIndex
void * p
#define SAL_INFO(area, stream)
void SvStream & rStrm
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
const sal_Int32 BIFF12_ID_MULTCELL_SI
Definition: biffhelper.hxx:145
const sal_Int32 BIFF12_ID_DATATABLE
Definition: biffhelper.hxx:85
const sal_Int32 BIFF12_ID_CELL_RK
Definition: biffhelper.hxx:45
css::uno::Sequence< ApiToken > ApiTokenSequence
const sal_Int32 BIFF12_ID_CELL_BOOL
Definition: biffhelper.hxx:42
const sal_Int32 BIFF12_ID_SHAREDFMLA
Definition: biffhelper.hxx:213
const sal_Int32 BIFF12_ID_MULTCELL_BOOL
Definition: biffhelper.hxx:140
const sal_Int32 BIFF12_ID_MULTCELL_RSTRING
Definition: biffhelper.hxx:144
@ Array
Simple cell formula, or reference to a shared formula name.
@ SharedFormula
Array (matrix) formula.
const sal_Int32 BIFF12_ID_CELL_RSTRING
Definition: biffhelper.hxx:46
const sal_Int32 BIFF12_ID_FORMULA_STRING
Definition: biffhelper.hxx:124
const sal_Int32 BIFF12_ID_CELL_BLANK
Definition: biffhelper.hxx:41
const sal_Int32 BIFF12_ID_CELL_SI
Definition: biffhelper.hxx:47
const sal_Int32 BIFF12_ID_MULTCELL_RK
Definition: biffhelper.hxx:143
const sal_Int32 BIFF12_ID_ROW
Definition: biffhelper.hxx:208
const sal_Int32 BIFF12_ID_FORMULA_DOUBLE
Definition: biffhelper.hxx:125
const sal_Int32 BIFF12_ID_CELL_STRING
Definition: biffhelper.hxx:48
const sal_Int32 BIFF12_ID_MULTCELL_BLANK
Definition: biffhelper.hxx:139
const sal_Int32 BIFF12_ID_CELL_DOUBLE
Definition: biffhelper.hxx:43
const sal_Int32 BIFF12_ID_MULTCELL_ERROR
Definition: biffhelper.hxx:142
const sal_Int32 BIFF12_ID_MULTCELL_DOUBLE
Definition: biffhelper.hxx:141
const sal_Int32 BIFF12_ID_FORMULA_BOOL
Definition: biffhelper.hxx:126
const sal_Int32 BIFF12_ID_FORMULA_ERROR
Definition: biffhelper.hxx:127
const sal_Int32 BIFF12_ID_ARRAY
Definition: biffhelper.hxx:31
const sal_Int32 BIFF12_ID_MULTCELL_STRING
Definition: biffhelper.hxx:146
const sal_Int32 BIFF12_ID_CELL_ERROR
Definition: biffhelper.hxx:44
const sal_Int32 BIFF12_ID_SHEETDATA
Definition: biffhelper.hxx:215
std::shared_ptr< RichString > RichStringRef
Definition: richstring.hxx:263
bool getFlag(Type nBitField, Type nMask)
XML_TOKEN_INVALID
A 2D cell address struct for binary filters.
A 2D cell range address struct for binary filters.
bool isValidArrayRef(const ScAddress &rCellAddr)
Returns true, if the passed cell address is valid for an array formula.
bool isValidSharedRef(const ScAddress &rCellAddr)
Returns true, if the passed cell address is valid for a shared formula.
sal_Int32 mnSharedId
Type of the formula (regular, array, shared, table).
sal_Int32 mnFormulaType
Formula range for array/shared formulas and data tables.
bool mbShowPhonetic
XF (cell formatting) identifier.
sal_Int32 mnXfId
Data type of the cell value.
sal_Int32 mnCellType
The address of the current cell.
bool mbRef2Deleted
True = first reference cell deleted.
bool mb2dTable
Second reference cell for table operations.
OUString maRef2
First reference cell for table operations.
bool mbRowTable
True = 2-dimensional data table.
bool mbRef1Deleted
True = row oriented data table.
Stores settings and formatting data about a sheet row.
double mfHeight
1-based (!) index of the described row.
bool mbCustomHeight
Row outline level.
sal_Int32 mnLevel
Row default formatting (see mbIsFormatted).
bool mbCollapsed
True = row is hidden.
bool mbThickBottom
True = row has extra space above text.
sal_Int32 mnXfId
Row height in points.
bool mbShowPhonetic
True = cells in row have explicit formatting.
bool mbCustomFormat
True = row has custom height.
bool mbThickTop
True = row outline is collapsed.
bool mbHidden
True = cells in row show phonetic settings.
unsigned char sal_uInt8