LibreOffice Module sc (master) 1
worksheetfragment.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 <worksheetfragment.hxx>
21#include <formulaparser.hxx>
22
23#include <osl/diagnose.h>
27#include <oox/token/namespaces.hxx>
28#include <oox/token/tokens.hxx>
29#include <addressconverter.hxx>
30#include <biffhelper.hxx>
31#include <autofilterbuffer.hxx>
32#include <autofiltercontext.hxx>
33#include <commentsfragment.hxx>
34#include <condformatcontext.hxx>
35#include <drawingfragment.hxx>
36#include <pagesettings.hxx>
39#include <scenariocontext.hxx>
40#include <sheetdatabuffer.hxx>
41#include <sheetdatacontext.hxx>
42#include <tablefragment.hxx>
43#include <extlstcontext.hxx>
44#include <viewsettings.hxx>
45#include <worksheetsettings.hxx>
46
47namespace oox::xls {
48
49using namespace ::oox::core;
50
51namespace {
52
53const sal_uInt16 BIFF_COLINFO_HIDDEN = 0x0001;
54const sal_uInt16 BIFF_COLINFO_SHOWPHONETIC = 0x0008;
55const sal_uInt16 BIFF_COLINFO_COLLAPSED = 0x1000;
56
57const sal_uInt16 BIFF_DEFROW_CUSTOMHEIGHT = 0x0001;
58const sal_uInt16 BIFF_DEFROW_HIDDEN = 0x0002;
59const sal_uInt16 BIFF_DEFROW_THICKTOP = 0x0004;
60const sal_uInt16 BIFF_DEFROW_THICKBOTTOM = 0x0008;
61
62const sal_uInt32 BIFF_DATAVAL_STRINGLIST = 0x00000080;
63const sal_uInt32 BIFF_DATAVAL_ALLOWBLANK = 0x00000100;
64const sal_uInt32 BIFF_DATAVAL_NODROPDOWN = 0x00000200;
65const sal_uInt32 BIFF_DATAVAL_SHOWINPUT = 0x00040000;
66const sal_uInt32 BIFF_DATAVAL_SHOWERROR = 0x00080000;
67
68const sal_Int32 BIFF12_OLEOBJECT_ICON = 4;
69const sal_Int32 BIFF12_OLEOBJECT_ALWAYS = 1;
70const sal_uInt16 BIFF12_OLEOBJECT_LINKED = 0x0001;
71const sal_uInt16 BIFF12_OLEOBJECT_AUTOLOAD = 0x0002;
72
73} // namespace
74
76{
77 if (!mxValModel)
78 return;
79
80 rTarget.getAddressConverter().convertToCellRangeList(mxValModel->maRanges, maSqref, rTarget.getSheetIndex(), true);
81 mxValModel->msRef = maSqref;
82
83 mxValModel->maTokens1 = rTarget.getFormulaParser().importFormula(mxValModel->maRanges.GetTopLeftCorner(), maFormula1);
84 // process string list of a list validation (convert to list of string tokens)
85 if (mxValModel->mnType == XML_list)
86 rTarget.getFormulaParser().convertStringToStringList(mxValModel->maTokens1, ',', true);
87
88 mxValModel->maTokens2 = rTarget.getFormulaParser().importFormula(mxValModel->maRanges.GetTopLeftCorner(), maFormula2);
89
90 rTarget.setValidation(*mxValModel);
91 mxValModel.reset();
92}
93
95{
96 mxValModel.reset(new ValidationModel);
97 maFormula1.clear();
98 maFormula2.clear();
99 maSqref = rAttribs.getString(XML_sqref, OUString());
100 mxValModel->maInputTitle = rAttribs.getXString(XML_promptTitle, OUString());
101 mxValModel->maInputMessage = rAttribs.getXString(XML_prompt, OUString());
102 mxValModel->maErrorTitle = rAttribs.getXString(XML_errorTitle, OUString());
103 mxValModel->maErrorMessage = rAttribs.getXString(XML_error, OUString());
104 mxValModel->mnType = rAttribs.getToken(XML_type, XML_none);
105 mxValModel->mnOperator = rAttribs.getToken(XML_operator, XML_between);
106 mxValModel->mnErrorStyle = rAttribs.getToken(XML_errorStyle, XML_stop);
107 mxValModel->mbShowInputMsg = rAttribs.getBool(XML_showInputMessage, false);
108 mxValModel->mbShowErrorMsg = rAttribs.getBool(XML_showErrorMessage, false);
109 /* The attribute showDropDown@dataValidation is in fact a "suppress
110 dropdown" flag, as it was in the BIFF format! ECMA specification
111 and attribute name are plain wrong! */
112 mxValModel->mbNoDropDown = rAttribs.getBool(XML_showDropDown, false);
113 mxValModel->mbAllowBlank = rAttribs.getBool(XML_allowBlank, false);
114}
115
117{
118 ValidationModel aModel;
119
120 sal_uInt32 nFlags;
121 BinRangeList aRanges;
122 nFlags = rStrm.readuInt32();
123 rStrm >> aRanges >> aModel.maErrorTitle >> aModel.maErrorMessage >> aModel.maInputTitle >> aModel.maInputMessage;
124
125 // equal flags in all BIFFs
126 aModel.setBiffType(extractValue< sal_uInt8 >(nFlags, 0, 4));
127 aModel.setBiffOperator(extractValue< sal_uInt8 >(nFlags, 20, 4));
128 aModel.setBiffErrorStyle(extractValue< sal_uInt8 >(nFlags, 4, 3));
129 aModel.mbAllowBlank = getFlag(nFlags, BIFF_DATAVAL_ALLOWBLANK);
130 aModel.mbNoDropDown = getFlag(nFlags, BIFF_DATAVAL_NODROPDOWN);
131 aModel.mbShowInputMsg = getFlag(nFlags, BIFF_DATAVAL_SHOWINPUT);
132 aModel.mbShowErrorMsg = getFlag(nFlags, BIFF_DATAVAL_SHOWERROR);
133
134 // cell range list
135 rTarget.getAddressConverter().convertToCellRangeList(aModel.maRanges, aRanges, rTarget.getSheetIndex(), true);
136
137 // condition formula(s)
138 FormulaParser& rParser = rTarget.getFormulaParser();
139 ScAddress aBaseAddr = aModel.maRanges.GetTopLeftCorner();
140 aModel.maTokens1 = rParser.importFormula(aBaseAddr, FormulaType::Validation, rStrm);
141 aModel.maTokens2 = rParser.importFormula(aBaseAddr, FormulaType::Validation, rStrm);
142 // process string list of a list validation (convert to list of string tokens)
143 if ((aModel.mnType == XML_list) && getFlag(nFlags, BIFF_DATAVAL_STRINGLIST))
144 rParser.convertStringToStringList(aModel.maTokens1, ',', true);
145
146 // set validation data
147 rTarget.setValidation(aModel);
148}
149
151 WorksheetContextBase( rFragment )
152{
153}
154
156{
157 switch( getCurrentElementWithMce() )
158 {
159 case XLS_TOKEN( dataValidations ):
160 if( nElement == XLS_TOKEN( dataValidation ) )
161 {
162 importDataValidation( rAttribs );
163 return this;
164 }
165 break;
166 case XLS_TOKEN( dataValidation ):
167 switch( nElement )
168 {
169 case MCE_TOKEN( AlternateContent ):
170 case XLS_TOKEN( formula1 ):
171 case XLS_TOKEN( formula2 ):
172 return this; // collect formulas in onCharacters()
173 }
174 break;
175 case MCE_TOKEN( AlternateContent ):
176 switch( nElement )
177 {
178 case MCE_TOKEN( Choice ):
179 case MCE_TOKEN( Fallback ):
180 return this;
181 }
182 break;
183 case MCE_TOKEN( Choice ):
184 switch( nElement )
185 {
186 case X12AC_TOKEN( list ):
187 return this;
188 }
189 break;
190 case MCE_TOKEN( Fallback ):
191 switch( nElement )
192 {
193 case XLS_TOKEN( formula1 ):
194 if (!isFormula1Set()) // only if more preferable choice was not used
195 return this; // collect formulas in onCharacters()
196 break;
197 case XLS_TOKEN( formula2 ):
198 if (!isFormula2Set()) // only if more preferable choice was not used
199 return this; // collect formulas in onCharacters()
200 break;
201 }
202 break;
203 }
204 return nullptr;
205}
206
207namespace {
208// Convert strings like 1,"2,3",4 to form "1","2,3","4"
209OUString NormalizeOoxList(std::u16string_view aList)
210{
211 OUStringBuffer aResult("\"");
212 bool bInsideQuotes = false;
213 const size_t nLen = aList.size();
214 for (size_t i = 0; i < nLen; ++i)
215 {
216 sal_Unicode ch = aList[i];
217
218 switch (ch)
219 {
220 case L'"':
221 bInsideQuotes = !bInsideQuotes;
222 break;
223 case L',':
224 if (!bInsideQuotes)
225 {
226 aResult.append("\",\"");
227 break;
228 }
229 [[fallthrough]];
230 default:
231 aResult.append(ch);
232 break;
233 }
234 }
235 return aResult.append('"').makeStringAndClear();
236}
237}
238
239void DataValidationsContext::onCharacters( const OUString& rChars )
240{
241 switch( getCurrentElement() )
242 {
243 case XLS_TOKEN( formula1 ):
244 SetFormula1( rChars );
245 break;
246 case XLS_TOKEN( formula2 ):
247 SetFormula2( rChars );
248 break;
249 case X12AC_TOKEN( list ):
250 SetFormula1( NormalizeOoxList( rChars ) );
251 break;
252 }
253}
254
256{
257 if( getCurrentElementWithMce() == XLS_TOKEN( dataValidation ) )
258 {
259 SetValidation( *this );
260 }
261}
262
264{
265 if( nRecId == BIFF12_ID_DATAVALIDATION )
266 importDataValidation( rStrm, *this );
267 return nullptr;
268}
269
271 WorksheetContextBase( rFragment ), mCurrFormula( 0 )
272{
273}
274
276{
277 switch( getCurrentElement() )
278 {
279 case XLS14_TOKEN( dataValidations ):
280 if ( nElement == XLS14_TOKEN( dataValidation ) )
281 {
282 importDataValidation( rAttribs );
283 return this;
284 }
285 break;
286 case XLS14_TOKEN( dataValidation ):
287 switch ( nElement )
288 {
289 case XLS14_TOKEN( formula1 ):
290 case XLS14_TOKEN( formula2 ):
291 mCurrFormula = nElement;
292 return this;
293 case XM_TOKEN( sqref ):
294 return this; // collect sqref in onCharacters()
295 }
296 break;
297 case XLS14_TOKEN( formula1 ):
298 case XLS14_TOKEN( formula2 ):
299 switch( nElement )
300 {
301 case XM_TOKEN( f ):
302 return this; // collect formulas in onCharacters()
303 }
304 break;
305 }
306 return nullptr;
307}
308
309void ExtDataValidationsContext::onCharacters( const OUString& rChars )
310{
311 switch( getCurrentElement() )
312 {
313 case XM_TOKEN( f ):
314 switch( mCurrFormula )
315 {
316 case XLS14_TOKEN( formula1 ):
317 SetFormula1( rChars );
318 break;
319 case XLS14_TOKEN( formula2 ):
320 SetFormula2( rChars );
321 break;
322 }
323 break;
324 case XM_TOKEN( sqref ):
325 SetSqref( rChars );
326 break;
327 }
328}
329
331{
332 if( isCurrentElement( XLS14_TOKEN( dataValidation ) ) )
333 {
334 SetValidation( *this );
335 }
336}
337
338WorksheetFragment::WorksheetFragment( const WorksheetHelper& rHelper, const OUString& rFragmentPath ) :
339 WorksheetFragmentBase( rHelper, rFragmentPath )
340{
341 // import data tables related to this worksheet
342 RelationsRef xTableRels = getRelations().getRelationsFromTypeFromOfficeDoc( u"table" );
343 for( const auto& rEntry : *xTableRels )
344 importOoxFragment( new TableFragment( *this, getFragmentPathFromRelation( rEntry.second ) ) );
345
346 // import comments related to this worksheet
347 OUString aCommentsFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"comments" );
348 if( !aCommentsFragmentPath.isEmpty() )
349 importOoxFragment( new CommentsFragment( *this, aCommentsFragmentPath ) );
350}
351
353{
354 switch( getCurrentElement() )
355 {
356 case XML_ROOT_CONTEXT: switch( getSheetType() )
357 {
358 case WorksheetType::Work: return (nElement == XLS_TOKEN( worksheet )) ? this : nullptr;
359 case WorksheetType::Chart: return nullptr;
360 case WorksheetType::Macro: return (nElement == XM_TOKEN( macrosheet )) ? this : nullptr;
361 case WorksheetType::Dialog: return (nElement == XLS_TOKEN( dialogsheet )) ? this : nullptr;
362 case WorksheetType::Empty: return nullptr;
363 }
364 break;
365
366 case XLS_TOKEN( worksheet ):
367 case XM_TOKEN( macrosheet ):
368 case XLS_TOKEN( dialogsheet ):
369 switch( nElement )
370 {
371 case XLS_TOKEN( sheetData ): return new SheetDataContext( *this );
372 case XLS_TOKEN( conditionalFormatting ): return new CondFormatContext( *this );
373 case XLS_TOKEN( dataValidations ): return new DataValidationsContext( *this );
374 case XLS_TOKEN( autoFilter ): return new AutoFilterContext( *this, getAutoFilters().createAutoFilter() );
375 case XLS_TOKEN( scenarios ): return new ScenariosContext( *this );
376 case XLS_TOKEN( extLst ): return new ExtLstGlobalContext( *this );
377
378 case XLS_TOKEN( sheetViews ):
379 case XLS_TOKEN( cols ):
380 case XLS_TOKEN( mergeCells ):
381 case XLS_TOKEN( hyperlinks ):
382 case XLS_TOKEN( rowBreaks ):
383 case XLS_TOKEN( colBreaks ):
384 case XLS_TOKEN( oleObjects ):
385 case XLS_TOKEN( controls ): return this;
386
387 case XLS_TOKEN( sheetPr ): getWorksheetSettings().importSheetPr( rAttribs ); return this;
388 case XLS_TOKEN( dimension ): importDimension( rAttribs ); break;
389 case XLS_TOKEN( sheetFormatPr ): importSheetFormatPr( rAttribs ); break;
390 case XLS_TOKEN( sheetProtection ): getWorksheetSettings().importSheetProtection( rAttribs ); break;
391 case XLS_TOKEN( protectedRanges ):
392 // no attribs known (yet?)
393 return this;
394 case XLS_TOKEN( phoneticPr ): getWorksheetSettings().importPhoneticPr( rAttribs ); break;
395 case XLS_TOKEN( printOptions ): getPageSettings().importPrintOptions( rAttribs ); break;
396 case XLS_TOKEN( pageMargins ): getPageSettings().importPageMargins( rAttribs ); break;
397 case XLS_TOKEN( pageSetup ): getPageSettings().importPageSetup( getRelations(), rAttribs ); break;
398 case XLS_TOKEN( headerFooter ): getPageSettings().importHeaderFooter( rAttribs ); return this;
399 case XLS_TOKEN( picture ): getPageSettings().importPicture( getRelations(), rAttribs ); break;
400 case XLS_TOKEN( drawing ): importDrawing( rAttribs ); break;
401 case XLS_TOKEN( legacyDrawing ): importLegacyDrawing( rAttribs ); break;
402 }
403 break;
404
405 case XLS_TOKEN( sheetPr ):
406 switch( nElement )
407 {
408 case XLS_TOKEN( tabColor ): getWorksheetSettings().importTabColor( rAttribs ); break;
409 case XLS_TOKEN( outlinePr ): getWorksheetSettings().importOutlinePr( rAttribs ); break;
410 case XLS_TOKEN( pageSetUpPr ): importPageSetUpPr( rAttribs ); break;
411 }
412 break;
413
414 case XLS_TOKEN( sheetViews ):
415 switch( nElement )
416 {
417 case XLS_TOKEN( sheetView ): getSheetViewSettings().importSheetView( rAttribs ); return this;
418 }
419 break;
420 case XLS_TOKEN( sheetView ):
421 switch( nElement )
422 {
423 case XLS_TOKEN( pane ): getSheetViewSettings().importPane( rAttribs ); break;
424 case XLS_TOKEN( selection ): getSheetViewSettings().importSelection( rAttribs ); break;
425 }
426 break;
427
428 case XLS_TOKEN( cols ):
429 if( nElement == XLS_TOKEN( col ) ) importCol( rAttribs );
430 break;
431 case XLS_TOKEN( mergeCells ):
432 if( nElement == XLS_TOKEN( mergeCell ) ) importMergeCell( rAttribs );
433 break;
434 case XLS_TOKEN( hyperlinks ):
435 if( nElement == XLS_TOKEN( hyperlink ) ) importHyperlink( rAttribs );
436 break;
437 case XLS_TOKEN( rowBreaks ):
438 if( nElement == XLS_TOKEN( brk ) ) importBrk( rAttribs, true );
439 break;
440 case XLS_TOKEN( colBreaks ):
441 if( nElement == XLS_TOKEN( brk ) ) importBrk( rAttribs, false );
442 break;
443
444 case XLS_TOKEN( protectedRanges ):
445 switch( nElement )
446 {
447 case XLS_TOKEN( protectedRange ): getWorksheetSettings().importProtectedRange( rAttribs ); return this;
448 }
449 break;
450
451 case XLS_TOKEN( headerFooter ):
452 switch( nElement )
453 {
454 case XLS_TOKEN( firstHeader ):
455 case XLS_TOKEN( firstFooter ):
456 case XLS_TOKEN( oddHeader ):
457 case XLS_TOKEN( oddFooter ):
458 case XLS_TOKEN( evenHeader ):
459 case XLS_TOKEN( evenFooter ): return this; // collect h/f contents in onCharacters()
460 }
461 break;
462 // Only process an oleObject or control if outside a mc:AlternateContent
463 // element OR if within a mc:Fallback. I suppose ideally we
464 // should process the stuff within 'mc:Choice'
465 case XLS_TOKEN( controls ):
466 case XLS_TOKEN( oleObjects ):
467 if( isMCEStateEmpty() || getMCEState() == MCE_STATE::Started )
468 {
469 if ( getCurrentElement() == XLS_TOKEN( oleObjects ) )
470 importOleObject( rAttribs );
471 else
472 importControl( rAttribs );
473 }
474 else if ( !isMCEStateEmpty() && getMCEState() == MCE_STATE::FoundChoice )
475 {
476 // reset the handling within 'Choice'
477 // this will force attempted handling in Fallback
478 setMCEState( MCE_STATE::Started );
479 }
480 break;
481 }
482 return nullptr;
483}
484
485void WorksheetFragment::onCharacters( const OUString& rChars )
486{
487 switch( getCurrentElement() )
488 {
489 case XLS_TOKEN( firstHeader ):
490 case XLS_TOKEN( firstFooter ):
491 case XLS_TOKEN( oddHeader ):
492 case XLS_TOKEN( oddFooter ):
493 case XLS_TOKEN( evenHeader ):
494 case XLS_TOKEN( evenFooter ):
495 getPageSettings().importHeaderFooterCharacters( rChars, getCurrentElement() );
496 break;
497 }
498}
499
501{
502 switch( getCurrentElement() )
503 {
504 case XML_ROOT_CONTEXT:
505 if( nRecId == BIFF12_ID_WORKSHEET ) return this;
506 break;
507
509 switch( nRecId )
510 {
511 case BIFF12_ID_SHEETDATA: return new SheetDataContext( *this );
512 case BIFF12_ID_CONDFORMATTING: return new CondFormatContext( *this );
513 case BIFF12_ID_DATAVALIDATIONS: return new DataValidationsContext( *this );
514 case BIFF12_ID_AUTOFILTER: return new AutoFilterContext( *this, getAutoFilters().createAutoFilter() );
515 case BIFF12_ID_SCENARIOS: return new ScenariosContext( *this );
516
518 case BIFF12_ID_COLS:
523 case BIFF12_ID_CONTROLS: return this;
524
530 case BIFF12_ID_PAGESETUP: getPageSettings().importPageSetup( getRelations(), rStrm ); break;
533 case BIFF12_ID_PICTURE: getPageSettings().importPicture( getRelations(), rStrm ); break;
536 case BIFF12_ID_DRAWING: importDrawing( rStrm ); break;
538 }
539 break;
540
542 switch( nRecId )
543 {
545 }
546 break;
548 switch( nRecId )
549 {
552 }
553 break;
554
555 case BIFF12_ID_COLS:
556 if( nRecId == BIFF12_ID_COL ) importCol( rStrm );
557 break;
559 if( nRecId == BIFF12_ID_MERGECELL ) importMergeCell( rStrm );
560 break;
562 if( nRecId == BIFF12_ID_BRK ) importBrk( rStrm, true );
563 break;
565 if( nRecId == BIFF12_ID_BRK ) importBrk( rStrm, false );
566 break;
568 if( nRecId == BIFF12_ID_OLEOBJECT ) importOleObject( rStrm );
569 break;
571 if( nRecId == BIFF12_ID_CONTROL ) importControl( rStrm );
572 break;
573 }
574 return nullptr;
575}
576
577const RecordInfo* WorksheetFragment::getRecordInfos() const
578{
579 static const RecordInfo spRecInfos[] =
580 {
599 { BIFF12_ID_ROW, -1 },
608 { -1, -1 }
609 };
610 return spRecInfos;
611}
612
614{
615 // initial processing in base class WorksheetHelper
617
618 // import query table fragments related to this worksheet
619 RelationsRef xQueryRels = getRelations().getRelationsFromTypeFromOfficeDoc( u"queryTable" );
620 for( const auto& rEntry : *xQueryRels )
621 importOoxFragment( new QueryTableFragment( *this, getFragmentPathFromRelation( rEntry.second ) ) );
622
623 // import pivot table fragments related to this worksheet
624 RelationsRef xPivotRels = getRelations().getRelationsFromTypeFromOfficeDoc( u"pivotTable" );
625 for( const auto& rEntry : *xPivotRels )
626 importOoxFragment( new PivotTableFragment( *this, getFragmentPathFromRelation( rEntry.second ) ) );
627}
628
630{
631 // final processing in base class WorksheetHelper
633}
634
635// private --------------------------------------------------------------------
636
638{
639 // for whatever reason, this flag is still stored separated from the page settings
640 getPageSettings().setFitToPagesMode( rAttribs.getBool( XML_fitToPage, false ) );
641}
642
644{
645 ScRange aRange;
646 AddressConverter::convertToCellRangeUnchecked( aRange, rAttribs.getString( XML_ref, OUString() ), getSheetIndex() );
647 /* OOXML stores the used area, if existing, or "A1" if the sheet is empty.
648 In case of "A1", the dimension at the WorksheetHelper object will not
649 be set. If the cell A1 exists, the used area will be updated while
650 importing the cell. */
651 if( (aRange.aEnd.Col() > 0) || (aRange.aEnd.Row() > 0) )
652 {
653 extendUsedArea( aRange );
654 }
655}
656
658{
659 // default column settings
660 setBaseColumnWidth( rAttribs.getInteger( XML_baseColWidth, 8 ) );
661 setDefaultColumnWidth( rAttribs.getDouble( XML_defaultColWidth, 0.0 ) );
662 // default row settings
663
664 // We don't need to import:
665 // XML_outlineLevelRow
666 // XML_outlineLevelCol
667 // as it will be updated during export to OOXML
668 double fDefaultRowHeight = rAttribs.getDouble(XML_defaultRowHeight, 0.0);
669 if (getFilter().isMSODocument())
670 {
671 fDefaultRowHeight -= fmod(fDefaultRowHeight, 0.75); //round down to 0.75pt
672 }
674 fDefaultRowHeight,
675 rAttribs.getBool( XML_customHeight, false ),
676 rAttribs.getBool( XML_zeroHeight, false ),
677 rAttribs.getBool( XML_thickTop, false ),
678 rAttribs.getBool( XML_thickBottom, false ) );
679}
680
682{
683 ColumnModel aModel;
684 aModel.maRange.mnFirst = rAttribs.getInteger( XML_min, -1 );
685 aModel.maRange.mnLast = rAttribs.getInteger( XML_max, -1 );
686 aModel.mfWidth = rAttribs.getDouble( XML_width, 0.0 );
687 aModel.mnXfId = rAttribs.getInteger( XML_style, -1 );
688 aModel.mnLevel = rAttribs.getInteger( XML_outlineLevel, 0 );
689 aModel.mbShowPhonetic = rAttribs.getBool( XML_phonetic, false );
690 aModel.mbHidden = rAttribs.getBool( XML_hidden, false );
691 aModel.mbCollapsed = rAttribs.getBool( XML_collapsed, false );
692 // set column properties in the current sheet
693 setColumnModel( aModel );
694}
695
697{
698 ScRange aRange;
699 if( getAddressConverter().convertToCellRange( aRange, rAttribs.getString( XML_ref, OUString() ), getSheetIndex(), true, true ) )
700 getSheetData().setMergedRange( aRange );
701}
702
704{
705 HyperlinkModel aModel;
706 if( getAddressConverter().convertToCellRange( aModel.maRange, rAttribs.getString( XML_ref, OUString() ), getSheetIndex(), true, true ) )
707 {
708 aModel.maTarget = getRelations().getExternalTargetFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
709 aModel.maLocation = rAttribs.getXString( XML_location, OUString() );
710 aModel.maDisplay = rAttribs.getXString( XML_display, OUString() );
711 aModel.maTooltip = rAttribs.getXString( XML_tooltip, OUString() );
712 setHyperlink( aModel );
713 }
714}
715
716void WorksheetFragment::importBrk( const AttributeList& rAttribs, bool bRowBreak )
717{
718 PageBreakModel aModel;
719 aModel.mnColRow = rAttribs.getInteger( XML_id, 0 );
720 aModel.mnMin = rAttribs.getInteger( XML_min, aModel.mnColRow );
721 aModel.mnMax = rAttribs.getInteger( XML_max, aModel.mnColRow );
722 aModel.mbManual = rAttribs.getBool( XML_man, false );
723 setPageBreak( aModel, bRowBreak );
724}
725
727{
728 setDrawingPath( getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) ) );
729}
730
732{
733 setVmlDrawingPath( getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) ) );
734}
735
737{
739 aInfo.setShapeId( rAttribs.getInteger( XML_shapeId, 0 ) );
740 OSL_ENSURE( rAttribs.hasAttribute( XML_link ) != rAttribs.hasAttribute( R_TOKEN( id ) ),
741 "WorksheetFragment::importOleObject - OLE object must be either linked or embedded" );
742 aInfo.mbLinked = rAttribs.hasAttribute( XML_link );
743 if( aInfo.mbLinked )
744 aInfo.maTargetLink = getFormulaParser().importOleTargetLink( rAttribs.getString( XML_link, OUString() ) );
745 else if( rAttribs.hasAttribute( R_TOKEN( id ) ) )
746 importEmbeddedOleData( aInfo.maEmbeddedData, rAttribs.getString( R_TOKEN( id ), OUString() ) );
747 aInfo.maProgId = rAttribs.getString( XML_progId, OUString() );
748 aInfo.mbShowAsIcon = rAttribs.getToken( XML_dvAspect, XML_DVASPECT_CONTENT ) == XML_DVASPECT_ICON;
749 aInfo.mbAutoUpdate = rAttribs.getToken( XML_oleUpdate, XML_OLEUPDATE_ONCALL ) == XML_OLEUPDATE_ALWAYS;
750 aInfo.mbAutoLoad = rAttribs.getBool( XML_autoLoad, false );
752}
753
755{
757 aInfo.setShapeId( rAttribs.getInteger( XML_shapeId, 0 ) );
758 aInfo.maFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
759 aInfo.maName = rAttribs.getString( XML_name, OUString() );
761}
762
764{
765 BinRange aBinRange;
766 aBinRange.read( rStrm );
767 ScRange aRange;
769 /* BIFF12 stores the used area, if existing, or "A1" if the sheet is
770 empty. In case of "A1", the dimension at the WorksheetHelper object
771 will not be set. If the cell A1 exists, the used area will be updated
772 while importing the cell. */
773 if( (aRange.aEnd.Col() > 0) || (aRange.aEnd.Row() > 0) )
774 extendUsedArea( aRange );
775}
776
778{
779 sal_Int32 nDefaultWidth;
780 sal_uInt16 nBaseWidth, nDefaultHeight, nFlags;
781 nDefaultWidth = rStrm.readInt32();
782 nBaseWidth = rStrm.readuInt16();
783 nDefaultHeight = rStrm.readuInt16();
784 nFlags = rStrm.readuInt16();
785
786 // base column with
787 setBaseColumnWidth( nBaseWidth );
788 // default width is stored as 1/256th of a character in BIFF12, convert to entire character
789 setDefaultColumnWidth( static_cast< double >( nDefaultWidth ) / 256.0 );
790 // row height is in twips in BIFF12, convert to points; equal flags in all BIFFs
792 nDefaultHeight / 20.0,
793 getFlag( nFlags, BIFF_DEFROW_CUSTOMHEIGHT ),
794 getFlag( nFlags, BIFF_DEFROW_HIDDEN ),
795 getFlag( nFlags, BIFF_DEFROW_THICKTOP ),
796 getFlag( nFlags, BIFF_DEFROW_THICKBOTTOM ) );
797}
798
800{
801 ColumnModel aModel;
802
803 sal_Int32 nWidth;
804 sal_uInt16 nFlags;
805 aModel.maRange.mnFirst = rStrm.readInt32();
806 aModel.maRange.mnLast = rStrm.readInt32();
807 nWidth = rStrm.readInt32();
808 aModel.mnXfId = rStrm.readInt32();
809 nFlags = rStrm.readuInt16();
810
811 // column indexes are 0-based in BIFF12, but ColumnModel expects 1-based
812 ++aModel.maRange.mnFirst;
813 ++aModel.maRange.mnLast;
814 // width is stored as 1/256th of a character in BIFF12, convert to entire character
815 aModel.mfWidth = static_cast< double >( nWidth ) / 256.0;
816 // equal flags in all BIFFs
817 aModel.mnLevel = extractValue< sal_Int32 >( nFlags, 8, 3 );
818 aModel.mbShowPhonetic = getFlag( nFlags, BIFF_COLINFO_SHOWPHONETIC );
819 aModel.mbHidden = getFlag( nFlags, BIFF_COLINFO_HIDDEN );
820 aModel.mbCollapsed = getFlag( nFlags, BIFF_COLINFO_COLLAPSED );
821 // set column properties in the current sheet
822 setColumnModel( aModel );
823}
824
826{
827 BinRange aBinRange;
828 rStrm >> aBinRange;
829 ScRange aRange;
830 if( getAddressConverter().convertToCellRange( aRange, aBinRange, getSheetIndex(), true, true ) )
831 getSheetData().setMergedRange( aRange );
832}
833
835{
836 BinRange aBinRange;
837 rStrm >> aBinRange;
838 HyperlinkModel aModel;
839 if( getAddressConverter().convertToCellRange( aModel.maRange, aBinRange, getSheetIndex(), true, true ) )
840 {
841 aModel.maTarget = getRelations().getExternalTargetFromRelId( BiffHelper::readString( rStrm ) );
842 rStrm >> aModel.maLocation >> aModel.maTooltip >> aModel.maDisplay;
843 setHyperlink( aModel );
844 }
845}
846
848{
849 PageBreakModel aModel;
850 sal_Int32 nManual;
851 aModel.mnColRow = rStrm.readInt32();
852 aModel.mnMin = rStrm.readInt32();
853 aModel.mnMax = rStrm.readInt32();
854 nManual = rStrm.readInt32();
855 aModel.mbManual = nManual != 0;
856 setPageBreak( aModel, bRowBreak );
857}
858
860{
861 setDrawingPath( getFragmentPathFromRelId( BiffHelper::readString( rStrm ) ) );
862}
863
865{
866 setVmlDrawingPath( getFragmentPathFromRelId( BiffHelper::readString( rStrm ) ) );
867}
868
870{
872 sal_Int32 nAspect, nUpdateMode, nShapeId;
873 sal_uInt16 nFlags;
874 nAspect = rStrm.readInt32();
875 nUpdateMode = rStrm.readInt32();
876 nShapeId = rStrm.readInt32();
877 nFlags = rStrm.readuInt16();
878 rStrm >> aInfo.maProgId;
879 aInfo.mbLinked = getFlag( nFlags, BIFF12_OLEOBJECT_LINKED );
880 if( aInfo.mbLinked )
882 else
884 aInfo.setShapeId( nShapeId );
885 aInfo.mbShowAsIcon = nAspect == BIFF12_OLEOBJECT_ICON;
886 aInfo.mbAutoUpdate = nUpdateMode == BIFF12_OLEOBJECT_ALWAYS;
887 aInfo.mbAutoLoad = getFlag( nFlags, BIFF12_OLEOBJECT_AUTOLOAD );
889}
890
892{
894 aInfo.setShapeId( rStrm.readInt32() );
895 aInfo.maFragmentPath = getFragmentPathFromRelId( BiffHelper::readString( rStrm ) );
896 rStrm >> aInfo.maName;
898}
899
900void WorksheetFragment::importEmbeddedOleData( StreamDataSequence& orEmbeddedData, const OUString& rRelId )
901{
902 OUString aFragmentPath = getFragmentPathFromRelId( rRelId );
903 if( !aFragmentPath.isEmpty() )
904 getBaseFilter().importBinaryData( orEmbeddedData, aFragmentPath );
905}
906
907} // namespace oox
908
909/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SCROW Row() const
Definition: address.hxx:274
SCCOL Col() const
Definition: address.hxx:279
ScAddress GetTopLeftCorner() const
Definition: rangelst.cxx:1150
ScAddress aEnd
Definition: address.hxx:498
bool hasAttribute(sal_Int32 nAttrToken) const
std::optional< OUString > getXString(sal_Int32 nAttrToken) const
std::optional< sal_Int32 > getInteger(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
bool importBinaryData(StreamDataSequence &orDataSeq, const OUString &rStreamName)
void registerOleObject(const OleObjectInfo &rOleObject)
void registerControl(const ControlInfo &rControl)
static bool convertToCellRangeUnchecked(ScRange &orRange, std::u16string_view aString, sal_Int16 nSheet)
Converts the passed string to a cell range address, without checking any sheet limits.
static OUString readString(SequenceInputStream &rStrm, bool b32BitLen=true)
Reads a BIFF12 string with leading 16-bit or 32-bit length field.
Definition: biffhelper.cxx:79
A 2D cell range address list for binary filters.
std::unique_ptr< ValidationModel > mxValModel
void importDataValidation(const AttributeList &rAttribs)
Imports the dataValidation element containing data validation settings.
void SetFormula1(const OUString &rChars)
void SetFormula2(const OUString &rChars)
void SetValidation(WorksheetHelper &rTarget)
void SetSqref(const OUString &rChars)
virtual void onCharacters(const OUString &rChars) override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual void onEndElement() override
DataValidationsContext(WorksheetFragmentBase &rFragment)
virtual ::oox::core::ContextHandlerRef onCreateRecordContext(sal_Int32 nRecId, SequenceInputStream &rStrm) override
ExtDataValidationsContext(WorksheetContextBase &rFragment)
virtual void onCharacters(const OUString &rChars) override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Used for the actual ExtLst containing the new extended definition.
Import formula parser for OOXML and BIFF filters.
ApiTokenSequence importFormula(const ScAddress &rBaseAddr, const OUString &rFormulaString) const
Converts an OOXML formula string.
OUString importOleTargetLink(std::u16string_view aFormulaString)
Converts the passed XML formula to an OLE link target.
void convertStringToStringList(ApiTokenSequence &orTokens, sal_Unicode cStringSep, bool bTrimLeadingSpaces) const
Converts a single string with separators in the passed formula token sequence to a list of string tok...
void importPrintOptions(const AttributeList &rAttribs)
Imports printing options from a printOptions element.
void importPageSetup(const ::oox::core::Relations &rRelations, const AttributeList &rAttribs)
Imports pageSetup element for worksheets.
void importPicture(const ::oox::core::Relations &rRelations, const AttributeList &rAttribs)
Imports the picture element.
void importHeaderFooterCharacters(std::u16string_view rChars, sal_Int32 nElement)
Imports header/footer characters from a headerFooter element.
void importPageMargins(const AttributeList &rAttribs)
Imports pageMarings element containing page margins.
void importHeaderFooter(const AttributeList &rAttribs)
Imports header and footer settings from a headerFooter element.
void setFitToPagesMode(bool bFitToPages)
Sets whether percentual scaling or fit to width/height scaling is used.
void setMergedRange(const ScRange &rRange)
Merges the cells in the passed cell range.
This class implements importing the sheetData element.
void importPane(const AttributeList &rAttribs)
Imports the pane element containing sheet pane settings.
void importSelection(const AttributeList &rAttribs)
Imports the selection element containing selection settings for a pane.
void importSheetView(const AttributeList &rAttribs)
Imports the sheetView element containing sheet view settings.
bool importOoxFragment(const rtl::Reference< oox::core::FragmentHandler > &rxHandler)
Imports a fragment using the passed fragment handler, which contains the full path to the fragment st...
AddressConverter & getAddressConverter() const
Returns the converter for string to cell address/range conversion.
::oox::core::FilterBase & getBaseFilter() const
Returns the base filter object (base class of all filters).
FormulaParser & getFormulaParser() const
Returns a shared import formula parser (import filter only!).
Context handler derived from the WorksheetHelper helper class.
Fragment handler derived from the WorksheetHelper helper class.
virtual const ::oox::core::RecordInfo * getRecordInfos() const override
virtual void onCharacters(const OUString &rChars) override
void importCol(const AttributeList &rAttribs)
Imports column settings from a col element.
void importOleObject(const AttributeList &rAttribs)
Imports additional data for an OLE object.
virtual void finalizeImport() override
virtual ::oox::core::ContextHandlerRef onCreateRecordContext(sal_Int32 nRecId, SequenceInputStream &rStrm) override
void importLegacyDrawing(const AttributeList &rAttribs)
Imports the relation identifier for the legacy VML drawing part.
void importDimension(const AttributeList &rAttribs)
Imports the dimension element containing the used area of the sheet.
void importSheetFormatPr(const AttributeList &rAttribs)
Imports sheet format properties from a sheetFormatPr element.
virtual void initializeImport() override
void importDrawing(const AttributeList &rAttribs)
Imports the relation identifier for the DrawingML part.
WorksheetFragment(const WorksheetHelper &rHelper, const OUString &rFragmentPath)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
void importBrk(const AttributeList &rAttribs, bool bRowBreak)
Imports individual break that is either within row or column break context.
void importHyperlink(const AttributeList &rAttribs)
Imports the hyperlink element containing a hyperlink for a cell range.
void importMergeCell(const AttributeList &rAttribs)
Imports a merged cell range from a mergeCell element.
void importPageSetUpPr(const AttributeList &rAttribs)
Imports page settings from a pageSetUpPr element.
void importEmbeddedOleData(StreamDataSequence &orEmbeddedData, const OUString &rRelId)
Imports the binary data of an embedded OLE object from the fragment with the passed ID.
void importControl(const AttributeList &rAttribs)
Imports additional data for an OCX form control.
PageSettings & getPageSettings() const
Returns the page/print settings for this sheet.
VmlDrawing & getVmlDrawing() const
Returns the VML drawing page for this sheet (OOXML/BIFF12 only).
void extendUsedArea(const ScAddress &rAddress)
Extends the used area of this sheet by the passed cell position.
WorksheetType getSheetType() const
Returns the type of this sheet.
void setPageBreak(const PageBreakModel &rModel, bool bRowBreak)
Sets a column or row page break described in the passed struct.
WorksheetSettings & getWorksheetSettings() const
Returns the worksheet settings object.
void setDrawingPath(const OUString &rDrawingPath)
Sets the path to the DrawingML fragment of this sheet.
SheetDataBuffer & getSheetData() const
Returns the buffer for cell contents and cell formatting.
void setDefaultColumnWidth(double fWidth)
Sets default width for all columns.
SCTAB getSheetIndex() const
Returns the index of the current sheet.
void setColumnModel(const ColumnModel &rModel)
Sets column settings for a specific range of columns.
void setBaseColumnWidth(sal_Int32 nWidth)
Sets base width for all columns (without padding pixels).
void finalizeWorksheetImport()
Final conversion after importing the worksheet.
AutoFilterBuffer & getAutoFilters() const
Returns the auto filters for the sheet.
SheetViewSettings & getSheetViewSettings() const
Returns the view settings for this sheet.
void initializeWorksheetImport()
Initial conversion before importing the worksheet.
void setVmlDrawingPath(const OUString &rVmlDrawingPath)
Sets the path to the legacy VML drawing fragment of this sheet.
void setHyperlink(const HyperlinkModel &rModel)
Inserts the hyperlink URL into the spreadsheet.
void setDefaultRowSettings(double fHeight, bool bCustomHeight, bool bHidden, bool bThickTop, bool bThickBottom)
Sets default height and hidden state for all unused rows in the sheet.
void importSheetProtection(const AttributeList &rAttribs)
Imports protection settings from the sheetProtection element.
void importProtectedRange(const AttributeList &rAttribs)
Imports enhanced protection settings from the protectedRange element.
void importOutlinePr(const AttributeList &rAttribs)
Imports outline settings from the outlinePr element.
void importPhoneticPr(const AttributeList &rAttribs)
Imports phonetic settings from the phoneticPr element.
void importSheetPr(const AttributeList &rAttribs)
Imports sheet settings from the sheetPr element.
void importTabColor(const AttributeList &rAttribs)
Imports the sheet tab color from the tabColor element.
float u
FilterGroup & rTarget
RttiCompleteObjectLocator col
@ picture
int i
void SvStream & rStrm
const sal_Int32 XML_ROOT_CONTEXT
std::shared_ptr< Relations > RelationsRef
const sal_Int32 BIFF12_ID_WORKSHEET
Definition: biffhelper.hxx:241
const sal_Int32 BIFF12_ID_FILTERCOLUMN
Definition: biffhelper.hxx:121
const sal_Int32 BIFF12_ID_PAGEMARGINS
Definition: biffhelper.hxx:152
const sal_Int32 BIFF12_ID_DIMENSION
Definition: biffhelper.hxx:94
const sal_Int32 BIFF12_ID_PAGESETUP
Definition: biffhelper.hxx:153
const sal_Int32 BIFF12_ID_CFRULE
Definition: biffhelper.hxx:54
const sal_Int32 BIFF12_ID_SELECTION
Definition: biffhelper.hxx:212
const sal_Int32 BIFF12_ID_OLEOBJECTS
Definition: biffhelper.hxx:150
const sal_Int32 BIFF12_ID_SHEETVIEWS
Definition: biffhelper.hxx:221
const sal_Int32 BIFF12_ID_SHEETFORMATPR
Definition: biffhelper.hxx:216
const sal_Int32 BIFF12_ID_HYPERLINK
Definition: biffhelper.hxx:131
const sal_Int32 BIFF12_ID_TABLEPARTS
Definition: biffhelper.hxx:227
const sal_Int32 BIFF12_ID_CUSTOMSHEETVIEW
Definition: biffhelper.hxx:81
const sal_Int32 BIFF12_ID_PICTURE
Definition: biffhelper.hxx:183
const sal_Int32 BIFF12_ID_SCENARIO
Definition: biffhelper.hxx:210
const sal_Int32 BIFF12_ID_DATAVALIDATIONS
Definition: biffhelper.hxx:87
const sal_Int32 BIFF12_ID_PANE
Definition: biffhelper.hxx:154
const sal_Int32 BIFF12_ID_PRINTOPTIONS
Definition: biffhelper.hxx:187
@ Validation
Condition of a conditional format rule.
const sal_Int32 BIFF12_ID_COL
Definition: biffhelper.hxx:60
const sal_Int32 BIFF12_ID_CONDFORMATTING
Definition: biffhelper.hxx:72
const sal_Int32 BIFF12_ID_COLS
Definition: biffhelper.hxx:65
const sal_Int32 BIFF12_ID_SHEETVIEW
Definition: biffhelper.hxx:220
const sal_Int32 BIFF12_ID_CONTROL
Definition: biffhelper.hxx:75
const sal_Int32 BIFF12_ID_LEGACYDRAWING
Definition: biffhelper.hxx:135
const sal_Int32 BIFF12_ID_ICONSET
Definition: biffhelper.hxx:132
const sal_Int32 BIFF12_ID_SHEETPROTECTION
Definition: biffhelper.hxx:218
const sal_Int32 BIFF12_ID_MERGECELLS
Definition: biffhelper.hxx:137
const sal_Int32 BIFF12_ID_CUSTOMFILTERS
Definition: biffhelper.hxx:80
const sal_Int32 BIFF12_ID_OLEOBJECT
Definition: biffhelper.hxx:149
const sal_Int32 BIFF12_ID_DATAVALIDATION
Definition: biffhelper.hxx:86
const sal_Int32 BIFF12_ID_DISCRETEFILTERS
Definition: biffhelper.hxx:96
const sal_Int32 BIFF12_ID_ROW
Definition: biffhelper.hxx:208
const sal_Int32 BIFF12_ID_CUSTOMSHEETVIEWS
Definition: biffhelper.hxx:82
const sal_Int32 BIFF12_ID_SHEETPR
Definition: biffhelper.hxx:217
const sal_Int32 BIFF12_ID_DRAWING
Definition: biffhelper.hxx:97
const sal_Int32 BIFF12_ID_SCENARIOS
Definition: biffhelper.hxx:211
const sal_Int32 BIFF12_ID_DATABAR
Definition: biffhelper.hxx:84
const sal_Int32 BIFF12_ID_ROWBREAKS
Definition: biffhelper.hxx:209
const sal_Int32 BIFF12_ID_MERGECELL
Definition: biffhelper.hxx:136
const sal_Int32 BIFF12_ID_PHONETICPR
Definition: biffhelper.hxx:182
const sal_Int32 BIFF12_ID_COLBREAKS
Definition: biffhelper.hxx:61
const sal_Int32 BIFF12_ID_CONTROLS
Definition: biffhelper.hxx:76
@ Empty
Dialog sheet (BIFF5+).
const sal_Int32 BIFF12_ID_AUTOFILTER
Definition: biffhelper.hxx:32
const sal_Int32 BIFF12_ID_HEADERFOOTER
Definition: biffhelper.hxx:130
const sal_Int32 BIFF12_ID_BRK
Definition: biffhelper.hxx:39
const sal_Int32 BIFF12_ID_SHEETDATA
Definition: biffhelper.hxx:215
const sal_Int32 BIFF12_ID_COLORSCALE
Definition: biffhelper.hxx:64
css::uno::Sequence< sal_Int8 > StreamDataSequence
bool getFlag(Type nBitField, Type nMask)
XML_none
XML_type
sal_Int32 mnLast
sal_Int32 mnFirst
StreamDataSequence maEmbeddedData
void setShapeId(sal_Int32 nShapeId)
void setShapeId(sal_Int32 nShapeId)
A 2D cell range address struct for binary filters.
void read(SequenceInputStream &rStrm)
Stores settings and formatting data about a range of sheet columns.
sal_Int32 mnLevel
Column default formatting.
bool mbShowPhonetic
Column outline level.
bool mbHidden
True = cells in column show phonetic settings.
sal_Int32 mnXfId
Column width in number of characters.
double mfWidth
1-based (!) range of the described columns.
bool mbCollapsed
True = column is hidden.
Stores data about a hyperlink range.
OUString maTooltip
The cell area containing the hyperlink.
Stores formatting data about a page break.
sal_Int32 mnMax
Start of limited break.
sal_Int32 mnMin
0-based (!) index of column/row.
bool mbManual
End of limited break.
Stores data about ranges with data validation settings.
void setBiffType(sal_uInt8 nType)
Sets the passed BIFF validation type.
void setBiffOperator(sal_uInt8 nOperator)
Sets the passed BIFF operator.
void setBiffErrorStyle(sal_uInt8 nErrorStyle)
Sets the passed BIFF error style.
sal_uInt16 sal_Unicode