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 mrSheetData.setBooleanCell( maCellData, maCellValue.toDouble() != 0.0 );
189 break;
190 case XML_e:
192 break;
193 case XML_str:
195 break;
196 case XML_s:
198 break;
199 case XML_d:
201 break;
202 }
203 else if( (maCellData.mnCellType == XML_inlineStr) && mxInlineStr )
204 {
205 mxInlineStr->finalizeImport(*this);
207 }
208 else
209 {
210 // empty cell, update cell type
213 }
214}
215
217{
218 switch( getCurrentElement() )
219 {
221 if( nRecId == BIFF12_ID_ROW ) { importRow( rStrm ); return this; }
222 break;
223
224 case BIFF12_ID_ROW:
225 switch( nRecId )
226 {
227 case BIFF12_ID_ARRAY: importArray( rStrm ); break;
250 }
251 break;
252 }
253 return nullptr;
254}
255
256// private --------------------------------------------------------------------
257
259{
260 RowModel aModel;
261 sal_Int32 nRow = rAttribs.getInteger( XML_r, -1 ); // 1-based row index
262 if(nRow != -1)
263 {
264 aModel.mnRow = nRow;
265 mnRow = nRow-1; // to 0-based row index.
266 }
267 else
268 aModel.mnRow = (++mnRow + 1); // increment 0-based row index, to 1-based model row
270 mnCol = -1;
271
272 aModel.mfHeight = rAttribs.getDouble( XML_ht, -1.0 );
273 aModel.mnXfId = rAttribs.getInteger( XML_s, -1 );
274 aModel.mnLevel = rAttribs.getInteger( XML_outlineLevel, 0 );
275 aModel.mbCustomHeight = rAttribs.getBool( XML_customHeight, false );
276 aModel.mbCustomFormat = rAttribs.getBool( XML_customFormat, false );
277 aModel.mbShowPhonetic = rAttribs.getBool( XML_ph, false );
278 aModel.mbHidden = rAttribs.getBool( XML_hidden, false );
279 aModel.mbCollapsed = rAttribs.getBool( XML_collapsed, false );
280 aModel.mbThickTop = rAttribs.getBool( XML_thickTop, false );
281 aModel.mbThickBottom = rAttribs.getBool( XML_thickBot, false );
282
283 if (aModel.mfHeight > 0 && getFilter().isMSODocument())
284 {
285 aModel.mfHeight -= fmod(aModel.mfHeight, 0.75); //round down to 0.75pt
286 }
287
288 // decode the column spans (space-separated list of colon-separated integer pairs)
289 OUString aColSpansText = rAttribs.getString( XML_spans, OUString() );
290 sal_Int32 nIndex = 0;
291 while( nIndex >= 0 )
292 {
293 std::u16string_view aColSpanToken = o3tl::getToken(aColSpansText, 0, ' ', nIndex );
294 size_t nSepPos = aColSpanToken.find( ':' );
295 if( (0 < nSepPos) && (nSepPos + 1 < aColSpanToken.size()) )
296 {
297 // OOXML uses 1-based integer column indexes, row model expects 0-based colspans
298 const sal_Int32 nCol1 = o3tl::toInt32(aColSpanToken.substr( 0, nSepPos )) - 1;
299 const bool bValid1 = mrAddressConv.checkCol( nCol1, true);
300 if (bValid1)
301 {
302 const sal_Int32 nCol2 = o3tl::toInt32(aColSpanToken.substr( nSepPos + 1 )) - 1;
303 mrAddressConv.checkCol( nCol2, true);
304 }
305 }
306 }
307
308 // set row properties in the current sheet
309 setRowModel( aModel );
310}
311
313{
314 bool bValid = true;
315 std::string_view p = rAttribs.getView(XML_r);
316
317 if (p.empty())
318 {
319 ++mnCol;
320 ScAddress aAddress( mnCol, mnRow, mnSheet );
321 bValid = mrAddressConv.checkCellAddress( aAddress, true );
322 maCellData.maCellAddr = aAddress;
323 }
324 else
325 {
328 }
329
330 if( bValid )
331 {
332 maCellData.mnCellType = rAttribs.getToken( XML_t, XML_n );
333 maCellData.mnXfId = rAttribs.getInteger( XML_s, -1 );
334 maCellData.mbShowPhonetic = rAttribs.getBool( XML_ph, false );
335
336 // reset cell value, formula settings, and inline string
337 maCellValue.clear();
338 mxInlineStr.reset();
339 mbHasFormula = false;
340
341 // update used area of the sheet
343 }
344 return bValid;
345}
346
348{
349 mbHasFormula = true;
350 mbValidRange = mrAddressConv.convertToCellRange( maFmlaData.maFormulaRef, rAttribs.getString( XML_ref, OUString() ), mnSheet, true, true );
351
352 maFmlaData.mnFormulaType = rAttribs.getToken( XML_t, XML_normal );
353 maFmlaData.mnSharedId = rAttribs.getInteger( XML_si, -1 );
354
355 if( maFmlaData.mnFormulaType == XML_dataTable )
356 {
357 maTableData.maRef1 = rAttribs.getString( XML_r1, OUString() );
358 maTableData.maRef2 = rAttribs.getString( XML_r2, OUString() );
359 maTableData.mb2dTable = rAttribs.getBool( XML_dt2D, false );
360 maTableData.mbRowTable = rAttribs.getBool( XML_dtr, false );
361 maTableData.mbRef1Deleted = rAttribs.getBool( XML_del1, false );
362 maTableData.mbRef2Deleted = rAttribs.getBool( XML_del2, false );
363 }
364
365 maFormulaStr.clear();
366}
367
369{
370 RowModel aModel;
371 sal_Int32 nSpanCount;
372 sal_uInt16 nHeight, nFlags1;
373 sal_uInt8 nFlags2;
374 maCurrPos.mnRow = rStrm.readInt32();
375 aModel.mnXfId = rStrm.readInt32();
376 nHeight = rStrm.readuInt16();
377 nFlags1 = rStrm.readuInt16();
378 nFlags2 = rStrm.readuChar();
379 nSpanCount = rStrm.readInt32();
380 maCurrPos.mnCol = 0;
381
383 // row index is 0-based in BIFF12, but RowModel expects 1-based
384 aModel.mnRow = maCurrPos.mnRow + 1;
385 // row height is in twips in BIFF12, convert to points
386 aModel.mfHeight = nHeight / 20.0;
387 aModel.mnLevel = extractValue< sal_Int32 >( nFlags1, 8, 3 );
388 aModel.mbCustomHeight = getFlag( nFlags1, BIFF12_ROW_CUSTOMHEIGHT );
389 aModel.mbCustomFormat = getFlag( nFlags1, BIFF12_ROW_CUSTOMFORMAT );
390 aModel.mbShowPhonetic = getFlag( nFlags2, BIFF12_ROW_SHOWPHONETIC );
391 aModel.mbHidden = getFlag( nFlags1, BIFF12_ROW_HIDDEN );
392 aModel.mbCollapsed = getFlag( nFlags1, BIFF12_ROW_COLLAPSED );
393 aModel.mbThickTop = getFlag( nFlags1, BIFF12_ROW_THICKTOP );
394 aModel.mbThickBottom = getFlag( nFlags1, BIFF12_ROW_THICKBOTTOM );
395
396 // read the column spans
397 for( sal_Int32 nSpanIdx = 0; (nSpanIdx < nSpanCount) && !rStrm.isEof(); ++nSpanIdx )
398 {
399 sal_Int32 nFirstCol, nLastCol;
400 nFirstCol = rStrm.readInt32();
401 mrAddressConv.checkCol( nFirstCol, true);
402 nLastCol = rStrm.readInt32();
403 mrAddressConv.checkCol( nLastCol, true);
404 }
405
406 // set row properties in the current sheet
407 setRowModel( aModel );
408}
409
411{
412 switch( eCellType )
413 {
414 case CELLTYPE_VALUE:
415 case CELLTYPE_FORMULA: maCurrPos.mnCol = rStrm.readInt32(); break;
416 case CELLTYPE_MULTI: ++maCurrPos.mnCol; break;
417 }
418
419 sal_uInt32 nXfId = rStrm.readuInt32();
420
422 maCellData.mnXfId = extractValue< sal_Int32 >( nXfId, 0, 24 );
423 maCellData.mbShowPhonetic = getFlag( nXfId, BIFF12_CELL_SHOWPHONETIC );
424
425 // update used area of the sheet
426 if( bValidAddr )
428 return bValidAddr;
429}
430
432{
433 rStrm.skip( 2 );
435}
436
438{
439 BinRange aRange;
440 rStrm >> aRange;
441 return mrAddressConv.convertToCellRange( maFmlaData.maFormulaRef, aRange, mnSheet, true, true );
442}
443
445{
446 if( readCellHeader( rStrm, eCellType ) )
447 {
448 maCellData.mnCellType = XML_b;
449 bool bValue = rStrm.readuInt8() != 0;
450 if( eCellType == CELLTYPE_FORMULA )
452 else
454 }
455}
456
458{
459 OSL_ENSURE( eCellType != CELLTYPE_FORMULA, "SheetDataContext::importCellBlank - no formula cells supported" );
460 if( readCellHeader( rStrm, eCellType ) )
462}
463
465{
466 if( readCellHeader( rStrm, eCellType ) )
467 {
468 maCellData.mnCellType = XML_n;
469 double fValue = rStrm.readDouble();
470 if( eCellType == CELLTYPE_FORMULA )
472 else
474 }
475}
476
478{
479 if( readCellHeader( rStrm, eCellType ) )
480 {
481 maCellData.mnCellType = XML_e;
482 sal_uInt8 nErrorCode = rStrm.readuInt8();
483 if( eCellType == CELLTYPE_FORMULA )
485 else
486 mrSheetData.setErrorCell( maCellData, nErrorCode );
487 }
488}
489
491{
492 OSL_ENSURE( eCellType != CELLTYPE_FORMULA, "SheetDataContext::importCellRk - no formula cells supported" );
493 if( readCellHeader( rStrm, eCellType ) )
494 {
495 maCellData.mnCellType = XML_n;
497 }
498}
499
501{
502 OSL_ENSURE( eCellType != CELLTYPE_FORMULA, "SheetDataContext::importCellRString - no formula cells supported" );
503 if( readCellHeader( rStrm, eCellType ) )
504 {
505 maCellData.mnCellType = XML_inlineStr;
506 RichStringRef xString = std::make_shared<RichString>();
507 xString->importString( rStrm, true, *this );
508 xString->finalizeImport( *this );
510 }
511}
512
514{
515 OSL_ENSURE( eCellType != CELLTYPE_FORMULA, "SheetDataContext::importCellSi - no formula cells supported" );
516 if( readCellHeader( rStrm, eCellType ) )
517 {
518 maCellData.mnCellType = XML_s;
520 }
521}
522
524{
525 if( readCellHeader( rStrm, eCellType ) )
526 {
527 maCellData.mnCellType = XML_inlineStr;
528 // always import the string, stream will point to formula afterwards, if existing
529 RichStringRef xString = std::make_shared<RichString>();
530 xString->importString( rStrm, false, *this );
531 xString->finalizeImport( *this );
532 if( eCellType == CELLTYPE_FORMULA )
534 else
536 }
537}
538
540{
542 {
543 rStrm.skip( 1 );
546 }
547}
548
550{
551 if( !readFormulaRef( rStrm ) )
552 return;
553
554 BinAddress aRef1, aRef2;
555 sal_uInt8 nFlags;
556 rStrm >> aRef1 >> aRef2;
557 nFlags = rStrm.readuChar();
560 maTableData.mbRowTable = getFlag( nFlags, BIFF12_DATATABLE_ROW );
561 maTableData.mb2dTable = getFlag( nFlags, BIFF12_DATATABLE_2D );
562 maTableData.mbRef1Deleted = getFlag( nFlags, BIFF12_DATATABLE_REF1DEL );
563 maTableData.mbRef2Deleted = getFlag( nFlags, BIFF12_DATATABLE_REF2DEL );
565}
566
568{
570 {
573 }
574}
575
576} // namespace oox
577
578/* 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
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:258
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