LibreOffice Module sc (master)  1
XMLExportIterator.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 <sal/config.h>
21 
22 #include <com/sun/star/sheet/XSpreadsheet.hpp>
23 #include <com/sun/star/table/XCellRange.hpp>
24 
25 #include "XMLExportIterator.hxx"
26 #include <dociter.hxx>
27 #include "xmlexprt.hxx"
28 #include "XMLExportSharedData.hxx"
30 #include <document.hxx>
31 #include <osl/diagnose.h>
32 
33 using namespace ::com::sun::star;
34 
36 {
37 }
38 
40 {
41 }
42 
44 {
45  ScAddress aNewAddr( rCellAddress );
46  if( GetFirstAddress( aNewAddr ) )
47  {
48  if( ( aNewAddr.Tab() == rCellAddress.Tab() ) &&
49  ( ( aNewAddr.Row() < rCellAddress.Row() ) ||
50  ( ( aNewAddr.Row() == rCellAddress.Row() ) && ( aNewAddr.Col() < rCellAddress.Col() ) ) ) )
51  rCellAddress = aNewAddr;
52  }
53 }
54 
55 inline bool ScMyShape::operator<(const ScMyShape& aShape) const
56 {
57  return aAddress.lessThanByRow( aShape.aAddress );
58 }
59 
61 {
62 }
63 
65 {
66 }
67 
69 {
70  aShapeList.push_back(aShape);
71 }
72 
74 {
75  SCTAB nTable( rCellAddress.Tab() );
76  if( !aShapeList.empty() )
77  {
78  rCellAddress = aShapeList.begin()->aAddress;
79  return ( nTable == rCellAddress.Tab() );
80  }
81  return false;
82 }
83 
85 {
86  rMyCell.aShapeList.clear();
87 
88  ScMyShapeList::iterator aItr(aShapeList.begin());
89  ScMyShapeList::iterator aEndItr(aShapeList.end());
90  while( (aItr != aEndItr) && (aItr->aAddress == rMyCell.maCellAddress) )
91  {
92  rMyCell.aShapeList.push_back(*aItr);
93  aItr = aShapeList.erase(aItr);
94  }
95  rMyCell.bHasShape = !rMyCell.aShapeList.empty();
96 }
97 
99 {
100  ScMyShapeList::iterator aItr = std::find_if_not(aShapeList.begin(), aShapeList.end(),
101  [&nSkip](const ScMyShape& rShape) { return rShape.aAddress.Tab() == nSkip; });
102  aShapeList.erase(aShapeList.begin(), aItr);
103 }
104 
106 {
107  aShapeList.sort();
108 }
109 
110 inline bool ScMyNoteShape::operator<(const ScMyNoteShape& aNote) const
111 {
112  return aPos.lessThanByRow( aNote.aPos );
113 }
114 
116 {
117 }
118 
120 {
121 }
122 
124 {
125  aNoteShapeList.push_back(aNote);
126 }
127 
129 {
130  SCTAB nTable = rCellAddress.Tab();
131  if( !aNoteShapeList.empty() )
132  {
133  rCellAddress = aNoteShapeList.begin()->aPos;
134  return ( nTable == rCellAddress.Tab() );
135  }
136  return false;
137 }
138 
140 {
141  ScMyNoteShapeList::iterator aItr = std::find_if_not(aNoteShapeList.begin(), aNoteShapeList.end(),
142  [&rMyCell](const ScMyNoteShape& rNoteShape) { return rNoteShape.aPos == rMyCell.maCellAddress; });
143  aNoteShapeList.erase(aNoteShapeList.begin(), aItr);
144 }
145 
147 {
148  ScMyNoteShapeList::iterator aItr = std::find_if_not(aNoteShapeList.begin(), aNoteShapeList.end(),
149  [&nSkip](const ScMyNoteShape& rNoteShape) { return rNoteShape.aPos.Tab() == nSkip; });
150  aNoteShapeList.erase(aNoteShapeList.begin(), aItr);
151 }
152 
154 {
155  aNoteShapeList.sort();
156 }
157 
158 inline bool ScMyMergedRange::operator<(const ScMyMergedRange& aRange) const
159 {
161 }
162 
164 {
165 }
166 
168 {
169 }
170 
172 {
173  SCROW nStartRow( rMergedRange.aStart.Row() );
174  SCROW nEndRow( rMergedRange.aEnd.Row() );
175 
176  ScMyMergedRange aRange;
177  aRange.bIsFirst = true;
178 
179  aRange.aCellRange = rMergedRange;
180 
181  aRange.aCellRange.aEnd.SetRow( nStartRow );
182  aRange.nRows = nEndRow - nStartRow + 1;
183  aRangeList.push_back( aRange );
184 
185  aRange.bIsFirst = false;
186  aRange.nRows = 0;
187  for( SCROW nRow = nStartRow + 1; nRow <= nEndRow; ++nRow )
188  {
189  aRange.aCellRange.aStart.SetRow( nRow );
190  aRange.aCellRange.aEnd.SetRow( nRow );
191  aRangeList.push_back(aRange);
192  }
193 }
194 
196 {
197  SCTAB nTable( rCellAddress.Tab() );
198  if( !aRangeList.empty() )
199  {
200  rCellAddress = aRangeList.begin()->aCellRange.aStart;
201  return ( nTable == rCellAddress.Tab() );
202  }
203  return false;
204 }
205 
207 {
208  rMyCell.bIsMergedBase = rMyCell.bIsCovered = false;
209  ScMyMergedRangeList::iterator aItr(aRangeList.begin());
210  if( aItr == aRangeList.end() )
211  return;
212 
213  if( aItr->aCellRange.aStart != rMyCell.aCellAddress )
214  return;
215 
216  rMyCell.aMergeRange = aItr->aCellRange;
217  if (aItr->bIsFirst)
218  rMyCell.aMergeRange.aEnd.SetRow( rMyCell.aMergeRange.aStart.Row() + aItr->nRows - 1 );
219  rMyCell.bIsMergedBase = aItr->bIsFirst;
220  rMyCell.bIsCovered = !aItr->bIsFirst;
221  if( aItr->aCellRange.aStart.Col() < aItr->aCellRange.aEnd.Col() )
222  {
223  aItr->aCellRange.aStart.IncCol( 1 );
224  aItr->bIsFirst = false;
225  }
226  else
227  aRangeList.erase(aItr);
228 }
229 
231 {
232  ScMyMergedRangeList::iterator aItr = std::find_if_not(aRangeList.begin(), aRangeList.end(),
233  [&nSkip](const ScMyMergedRange& rRange) { return rRange.aCellRange.aStart.Tab() == nSkip; });
234  aRangeList.erase(aRangeList.begin(), aItr);
235 }
236 
238 {
239  aRangeList.sort();
240 }
241 
242 bool ScMyAreaLink::Compare( const ScMyAreaLink& rAreaLink ) const
243 {
244  return (GetRowCount() == rAreaLink.GetRowCount()) &&
245  (sFilter == rAreaLink.sFilter) &&
246  (sFilterOptions == rAreaLink.sFilterOptions) &&
247  (sURL == rAreaLink.sURL) &&
248  (sSourceStr == rAreaLink.sSourceStr);
249 }
250 
251 inline bool ScMyAreaLink::operator<(const ScMyAreaLink& rAreaLink ) const
252 {
253  return aDestRange.aStart.lessThanByRow( rAreaLink.aDestRange.aStart );
254 }
255 
257 {
258 }
259 
261 {
262 }
263 
265 {
266  SCTAB nTable( rCellAddress.Tab() );
267  if( !aAreaLinkList.empty() )
268  {
269  rCellAddress = aAreaLinkList.begin()->aDestRange.aStart;
270  return ( nTable == rCellAddress.Tab() );
271  }
272  return false;
273 }
274 
276 {
277  rMyCell.bHasAreaLink = false;
278  ScMyAreaLinkList::iterator aItr(aAreaLinkList.begin());
279  if( aItr == aAreaLinkList.end() )
280  return;
281 
282  if( aItr->aDestRange.aStart != rMyCell.aCellAddress )
283  return;
284 
285  rMyCell.bHasAreaLink = true;
286  rMyCell.aAreaLink = *aItr;
287  aItr = aAreaLinkList.erase( aItr );
288  bool bFound = true;
289  while (aItr != aAreaLinkList.end() && bFound)
290  {
291  if ( aItr->aDestRange.aStart == rMyCell.aCellAddress )
292  {
293  OSL_FAIL("more than one linked range on one cell");
294  aItr = aAreaLinkList.erase( aItr );
295  }
296  else
297  bFound = false;
298  }
299 }
300 
302 {
303  ScMyAreaLinkList::iterator aItr = std::find_if_not(aAreaLinkList.begin(), aAreaLinkList.end(),
304  [&nSkip](const ScMyAreaLink& rAreaLink) { return rAreaLink.aDestRange.aStart.Tab() == nSkip; });
305  aAreaLinkList.erase(aAreaLinkList.begin(), aItr);
306 }
307 
309 {
310  aAreaLinkList.sort();
311 }
312 
314 {
315 }
316 
318 {
319 }
320 
321 void ScMyEmptyDatabaseRangesContainer::AddNewEmptyDatabaseRange(const table::CellRangeAddress& aCellRange)
322 {
323  SCROW nStartRow(aCellRange.StartRow);
324  SCROW nEndRow(aCellRange.EndRow);
325  ScRange aRange( aCellRange.StartColumn, aCellRange.StartRow, aCellRange.Sheet,
326  aCellRange.EndColumn, aCellRange.EndRow, aCellRange.Sheet );
327  for( SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow )
328  {
329  aRange.aStart.SetRow( nRow );
330  aRange.aEnd.SetRow( nRow );
331  aDatabaseList.push_back( aRange );
332  }
333 }
334 
336 {
337  SCTAB nTable( rCellAddress.Tab() );
338  if( !aDatabaseList.empty() )
339  {
340  rCellAddress = aDatabaseList.begin()->aStart;
341  return ( nTable == rCellAddress.Tab() );
342  }
343  return false;
344 }
345 
347 {
348  rMyCell.bHasEmptyDatabase = false;
349  ScMyEmptyDatabaseRangeList::iterator aItr(aDatabaseList.begin());
350  if( aItr != aDatabaseList.end() )
351  {
352  if( aItr->aStart == rMyCell.aCellAddress )
353  {
354  rMyCell.bHasEmptyDatabase = true;
355  if( aItr->aStart.Col() < aItr->aEnd.Col() )
356  aItr->aStart.SetCol( aItr->aStart.Col() + 1 );
357  else
358  aDatabaseList.erase(aItr);
359  }
360  }
361 }
362 
364 {
365  ScMyEmptyDatabaseRangeList::iterator aItr = std::find_if_not(aDatabaseList.begin(), aDatabaseList.end(),
366  [&nSkip](const ScRange& rDatabase) { return rDatabase.aStart.Tab() == nSkip; });
367  aDatabaseList.erase(aDatabaseList.begin(), aItr);
368 }
369 
371 {
372  aDatabaseList.sort();
373 }
374 
375 inline bool ScMyDetectiveObj::operator<( const ScMyDetectiveObj& rDetObj) const
376 {
377  return aPosition.lessThanByRow( rDetObj.aPosition );
378 }
379 
381 {
382 }
383 
385 {
386 }
387 
389  const ScAddress& rPosition, const ScRange& rSourceRange,
390  bool bHasError )
391 {
392  if( !((eObjType == SC_DETOBJ_ARROW) ||
393  (eObjType == SC_DETOBJ_FROMOTHERTAB) ||
394  (eObjType == SC_DETOBJ_TOOTHERTAB) ||
395  (eObjType == SC_DETOBJ_CIRCLE)) )
396  return;
397 
398  ScMyDetectiveObj aDetObj;
399  aDetObj.eObjType = eObjType;
400  if( eObjType == SC_DETOBJ_TOOTHERTAB )
401  aDetObj.aPosition = rSourceRange.aStart;
402  else
403  aDetObj.aPosition = rPosition;
404  aDetObj.aSourceRange = rSourceRange;
405 
406  // #111064#; take the sheet where the object is found and not the sheet given in the ranges, because they are not always true
407  if (eObjType != SC_DETOBJ_FROMOTHERTAB)
408  {
409  // if the ObjType == SC_DETOBJ_FROMOTHERTAB then the SourceRange is not used and so it has not to be tested and changed
410  OSL_ENSURE(aDetObj.aPosition.Tab() == aDetObj.aSourceRange.aStart.Tab(), "It seems to be possible to have different sheets");
411  aDetObj.aSourceRange.aStart.SetTab( nSheet );
412  aDetObj.aSourceRange.aEnd.SetTab( nSheet );
413  }
414  aDetObj.aPosition.SetTab( nSheet );
415 
416  aDetObj.bHasError = bHasError;
417  aDetectiveObjList.push_back( aDetObj );
418 }
419 
421 {
422  SCTAB nTable( rCellAddress.Tab() );
423  if( !aDetectiveObjList.empty() )
424  {
425  rCellAddress = aDetectiveObjList.begin()->aPosition;
426  return ( nTable == rCellAddress.Tab() );
427  }
428  return false;
429 }
430 
432 {
433  rMyCell.aDetectiveObjVec.clear();
434  ScMyDetectiveObjList::iterator aItr(aDetectiveObjList.begin());
435  ScMyDetectiveObjList::iterator aEndItr(aDetectiveObjList.end());
436  while( (aItr != aEndItr) && (aItr->aPosition == rMyCell.aCellAddress) )
437  {
438  rMyCell.aDetectiveObjVec.push_back( *aItr );
439  aItr = aDetectiveObjList.erase( aItr );
440  }
441  rMyCell.bHasDetectiveObj = (!rMyCell.aDetectiveObjVec.empty());
442 }
443 
445 {
446  ScMyDetectiveObjList::iterator aItr = std::find_if_not(aDetectiveObjList.begin(), aDetectiveObjList.end(),
447  [&nSkip](const ScMyDetectiveObj& rDetectiveObj) { return rDetectiveObj.aPosition.Tab() == nSkip; });
448  aDetectiveObjList.erase(aDetectiveObjList.begin(), aItr);
449 }
450 
452 {
453  aDetectiveObjList.sort();
454 }
455 
456 inline bool ScMyDetectiveOp::operator<( const ScMyDetectiveOp& rDetOp) const
457 {
458  return aPosition.lessThanByRow( rDetOp.aPosition );
459 }
460 
462 {
463 }
464 
466 {
467 }
468 
469 void ScMyDetectiveOpContainer::AddOperation( ScDetOpType eOpType, const ScAddress& rPosition, sal_uInt32 nIndex )
470 {
471  ScMyDetectiveOp aDetOp;
472  aDetOp.eOpType = eOpType;
473  aDetOp.aPosition = rPosition;
474  aDetOp.nIndex = nIndex;
475  aDetectiveOpList.push_back( aDetOp );
476 }
477 
479 {
480  SCTAB nTable( rCellAddress.Tab() );
481  if( !aDetectiveOpList.empty() )
482  {
483  rCellAddress = aDetectiveOpList.begin()->aPosition;
484  return ( nTable == rCellAddress.Tab() );
485  }
486  return false;
487 }
488 
490 {
491  rMyCell.aDetectiveOpVec.clear();
492  ScMyDetectiveOpList::iterator aItr(aDetectiveOpList.begin());
493  ScMyDetectiveOpList::iterator aEndItr(aDetectiveOpList.end());
494  while( (aItr != aEndItr) && (aItr->aPosition == rMyCell.aCellAddress) )
495  {
496  rMyCell.aDetectiveOpVec.push_back( *aItr );
497  aItr = aDetectiveOpList.erase( aItr );
498  }
499  rMyCell.bHasDetectiveOp = (!rMyCell.aDetectiveOpVec.empty());
500 }
501 
503 {
504  ScMyDetectiveOpList::iterator aItr = std::find_if_not(aDetectiveOpList.begin(), aDetectiveOpList.end(),
505  [&nSkip](const ScMyDetectiveOp& rDetectiveOp) { return rDetectiveOp.aPosition.Tab() == nSkip; });
506  aDetectiveOpList.erase(aDetectiveOpList.begin(), aItr);
507 }
508 
510 {
511  aDetectiveOpList.sort();
512 }
513 
515  pNote(nullptr),
516  nValidationIndex(-1),
517  nStyleIndex(-1),
518  nNumberFormat(-1),
519  nType(table::CellContentType_EMPTY),
520  bIsAutoStyle( false ),
521  bHasShape( false ),
522  bIsMergedBase( false ),
523  bIsCovered( false ),
524  bHasAreaLink( false ),
525  bHasEmptyDatabase( false ),
526  bHasDetectiveObj( false ),
527  bHasDetectiveOp( false ),
528  bIsMatrixBase( false ),
529  bIsMatrixCovered( false ),
530  bHasAnnotation( false )
531 {
532 }
533 
535  : pShapes(nullptr),
536  pNoteShapes(nullptr),
537  pEmptyDatabaseRanges(nullptr),
538  pMergedRanges(nullptr),
539  pAreaLinks(nullptr),
540  pDetectiveObj(nullptr),
541  pDetectiveOp(nullptr),
542  rExport(rTempXMLExport),
543  nCellCol(0),
544  nCellRow(0),
545  nCurrentTable(SCTAB_MAX)
546 {
547 }
548 
550 {
551  Clear();
552 }
553 
555 {
556  mpCellItr.reset();
557  pShapes = nullptr;
558  pNoteShapes = nullptr;
559  pMergedRanges = nullptr;
560  pAreaLinks = nullptr;
561  pEmptyDatabaseRanges = nullptr;
562  pDetectiveObj = nullptr;
563  pDetectiveOp = nullptr;
565 }
566 
568 {
569  if (mpCellItr->GetPos(nCellCol, nCellRow))
570  {
571  rAddress.SetCol( nCellCol );
572  rAddress.SetRow( nCellRow );
573  }
574 }
575 
577 {
578  rMyCell.maBaseCell.clear();
579  rMyCell.aCellAddress = rAddress;
580  rMyCell.maCellAddress = rMyCell.aCellAddress;
581 
582  if( ( nCellCol == rAddress.Col() ) && ( nCellRow == rAddress.Row() ) )
583  {
584  const ScRefCellValue* pCell = mpCellItr->GetNext(nCellCol, nCellRow);
585  if (pCell)
586  rMyCell.maBaseCell = *pCell;
587  }
588 
589  rMyCell.bIsMatrixCovered = false;
590  rMyCell.bIsMatrixBase = false;
591 
592  switch (rMyCell.maBaseCell.meType)
593  {
594  case CELLTYPE_VALUE:
595  rMyCell.nType = table::CellContentType_VALUE;
596  break;
597  case CELLTYPE_STRING:
598  case CELLTYPE_EDIT:
599  rMyCell.nType = table::CellContentType_TEXT;
600  break;
601  case CELLTYPE_FORMULA:
602  rMyCell.nType = table::CellContentType_FORMULA;
603  break;
604  default:
605  rMyCell.nType = table::CellContentType_EMPTY;
606  }
607 
608  if (rMyCell.maBaseCell.meType == CELLTYPE_FORMULA)
609  {
610  bool bIsMatrixBase = false;
611  if (rExport.IsMatrix(rMyCell.maCellAddress, rMyCell.aMatrixRange, bIsMatrixBase))
612  {
613  rMyCell.bIsMatrixBase = bIsMatrixBase;
614  rMyCell.bIsMatrixCovered = !bIsMatrixBase;
615  }
616  }
617 }
618 
620 {
621  aCell.bHasAnnotation = false;
622  ScPostIt* pNote = rExport.GetDocument()->GetNote(aCell.maCellAddress);
623 
624  if(pNote)
625  {
626  aCell.bHasAnnotation = true;
627  aCell.pNote = pNote;
628  }
629 }
630 
632  const uno::Reference<sheet::XSpreadsheet>& rxTable)
633 {
634  aLastAddress.SetRow( 0 );
635  aLastAddress.SetCol( 0 );
636  aLastAddress.SetTab( nTable );
637  if (nCurrentTable == nTable)
638  return;
639 
640  nCurrentTable = nTable;
641 
642  mpCellItr.reset(
646  static_cast<SCROW>(rExport.GetSharedData()->GetLastRow(nCurrentTable))));
647 
648  xTable.set(rxTable);
649  xCellRange.set(xTable);
650 }
651 
653 {
654  // Skip entries for a sheet that is copied instead of saving normally.
655  // Cells are handled separately in SetCurrentTable.
656 
657  if( pShapes )
658  pShapes->SkipTable(nSkip);
659  if( pNoteShapes )
660  pNoteShapes->SkipTable(nSkip);
663  if( pMergedRanges )
664  pMergedRanges->SkipTable(nSkip);
665  if( pAreaLinks )
666  pAreaLinks->SkipTable(nSkip);
667  if( pDetectiveObj )
668  pDetectiveObj->SkipTable(nSkip);
669  if( pDetectiveOp )
670  pDetectiveOp->SkipTable(nSkip);
671 }
672 
674 {
675  ScDocument* pDoc = rExport.GetDocument();
676  ScAddress aAddress( pDoc->MaxCol() + 1, pDoc->MaxRow() + 1, nCurrentTable );
677 
678  UpdateAddress( aAddress );
679 
680  if( pShapes )
681  pShapes->UpdateAddress( aAddress );
682  if( pNoteShapes )
683  pNoteShapes->UpdateAddress( aAddress );
685  pEmptyDatabaseRanges->UpdateAddress( aAddress );
686  if( pMergedRanges )
687  pMergedRanges->UpdateAddress( aAddress );
688  if( pAreaLinks )
689  pAreaLinks->UpdateAddress( aAddress );
690  if( pDetectiveObj )
691  pDetectiveObj->UpdateAddress( aAddress );
692  if( pDetectiveOp )
693  pDetectiveOp->UpdateAddress( aAddress );
694 
695  bool bFoundCell( ( aAddress.Col() <= pDoc->MaxCol() ) && ( aAddress.Row() <= pDoc->MaxRow() + 1 ) );
696  if( bFoundCell )
697  {
698  SetCellData( aCell, aAddress );
699  if( pShapes )
700  pShapes->SetCellData( aCell );
701  if( pNoteShapes )
702  pNoteShapes->SetCellData( aCell );
705  if( pMergedRanges )
706  pMergedRanges->SetCellData( aCell );
707  if( pAreaLinks )
708  pAreaLinks->SetCellData( aCell );
709  if( pDetectiveObj )
710  pDetectiveObj->SetCellData( aCell );
711  if( pDetectiveOp )
712  pDetectiveOp->SetCellData( aCell );
713 
714  HasAnnotation( aCell );
715  bool bIsAutoStyle;
716  // Ranges before the previous cell are not needed by ExportFormatRanges anymore and can be removed
717  SCROW nRemoveBeforeRow = aLastAddress.Row();
718  aCell.nStyleIndex = pCellStyles->GetStyleNameIndex(aCell.maCellAddress.Tab(),
719  aCell.maCellAddress.Col(), aCell.maCellAddress.Row(),
720  bIsAutoStyle, aCell.nValidationIndex, aCell.nNumberFormat, nRemoveBeforeRow);
721  aLastAddress = aCell.aCellAddress;
722  aCell.bIsAutoStyle = bIsAutoStyle;
723 
724  //#102799#; if the cell is in a DatabaseRange which should saved empty, the cell should have the type empty
725  if (aCell.bHasEmptyDatabase)
726  aCell.nType = table::CellContentType_EMPTY;
727  }
728  return bFoundCell;
729 }
730 
731 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetCellData(ScMyCell &rMyCell, const ScAddress &rAddress)
void UpdateAddress(ScAddress &rAddress)
virtual void Sort() override
css::uno::Reference< css::sheet::XSpreadsheet > xTable
void AddNewShape(const ScMyShape &aShape)
virtual void SetCellData(ScMyCell &rMyCell) override
ScAddress aStart
Definition: address.hxx:499
ScMyDetectiveOpList aDetectiveOpList
virtual void Sort() override
ScRefCellValue maBaseCell
bool operator<(const ScMyDetectiveObj &rDetObj) const
SCROW Row() const
Definition: address.hxx:261
ScPostIt * pNote
sal_Int32 nValidationIndex
virtual ~ScMyEmptyDatabaseRangesContainer() override
css::table::CellContentType nType
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
ScMySharedData * GetSharedData()
Definition: xmlexprt.hxx:256
void AddOperation(ScDetOpType eOpType, const ScAddress &rPosition, sal_uInt32 nIndex)
virtual ~ScMyNoteShapesContainer() override
void AddNewNote(const ScMyNoteShape &aNote)
exports com.sun.star. table
ScAddress aEnd
Definition: address.hxx:500
virtual ~ScMyShapesContainer() override
sal_Int32 nNumberFormat
void AddObject(ScDetectiveObjType eObjType, const SCTAB nSheet, const ScAddress &rPosition, const ScRange &rSourceRange, bool bHasError)
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:103
ScAddress maCellAddress
ScAddress aAddress
virtual ~ScMyDetectiveOpContainer() override
virtual void SetCellData(ScMyCell &rMyCell) override
ScMyNoteShapesContainer * pNoteShapes
virtual void SetCellData(ScMyCell &rMyCell) override
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Notes.
Definition: document.cxx:6534
bool operator<(const ScMyMergedRange &aRange) const
std::unique_ptr< ScHorizontalCellIterator > mpCellItr
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:872
css::uno::Reference< css::table::XCellRange > xCellRange
Additional class containing cell annotation data.
Definition: postit.hxx:160
sal_Int32 GetStyleNameIndex(const sal_Int32 nTable, const sal_Int32 nColumn, const sal_Int32 nRow, bool &bIsAutoStyle) const
ScRange aMatrixRange
bool IsMatrix(const ScAddress &aCell, ScRange &aCellAddress, bool &bIsFirst) const
Definition: xmlexprt.cxx:2753
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
SCTAB Tab() const
Definition: address.hxx:270
void SetRow(SCROW nRowP)
Definition: address.hxx:274
void SkipTable(SCTAB nSkip)
virtual ~ScMyDetectiveObjContainer() override
ScMyShapesContainer * pShapes
void SetCol(SCCOL nColP)
Definition: address.hxx:278
virtual void SetCellData(ScMyCell &rMyCell) override
void SetTab(SCTAB nTabP)
Definition: address.hxx:282
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:871
bool operator<(const ScMyNoteShape &aNote) const
ScMyDetectiveOpVec aDetectiveOpVec
virtual void Sort() override
ScMyNoteShapeList aNoteShapeList
ScDetectiveObjType
Definition: detfunc.hxx:38
sal_Int16 SCCOL
Definition: types.hxx:21
ScAddress aCellAddress
Use this instead of the UNO one.
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
void SetCurrentTable(const SCTAB nTable, const css::uno::Reference< css::sheet::XSpreadsheet > &rxTable)
ScMyMergedRangesContainer * pMergedRanges
void UpdateAddress(ScAddress &rCellAddress)
ScMyDetectiveObjList aDetectiveObjList
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
ScMyEmptyDatabaseRangeList aDatabaseList
SCCOL Col() const
Definition: address.hxx:266
virtual ~ScMyMergedRangesContainer() override
ScMyAreaLink aAreaLink
sal_Int32 GetLastColumn(const sal_Int32 nTable) const
ScMyDetectiveOpContainer * pDetectiveOp
CellType meType
Definition: cellvalue.hxx:105
void AddNewEmptyDatabaseRange(const css::table::CellRangeAddress &aCellRangeAddress)
ScDetectiveObjType eObjType
ScDocument * GetDocument()
Definition: xmlexprt.hxx:239
sal_Int32 SCROW
Definition: types.hxx:17
ScDetOpType
Definition: detdata.hxx:27
ScMyMergedRangeList aRangeList
virtual bool GetFirstAddress(ScAddress &rCellAddress)=0
sal_Int32 GetLastRow(const sal_Int32 nTable) const
virtual void SetCellData(ScMyCell &rMyCell) override
ScMyDetectiveObjContainer * pDetectiveObj
virtual void Sort() override
virtual void Sort() override
ScMyAreaLinksContainer * pAreaLinks
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
ScMyEmptyDatabaseRangesContainer * pEmptyDatabaseRanges
bool GetNext(ScMyCell &aCell, ScFormatRangeStyles *pCellStyles)
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
bool operator<(const ScMyDetectiveOp &rDetOp) const
ScRange aMergeRange
void HasAnnotation(ScMyCell &aCell)
bool lessThanByRow(const ScAddress &rAddress) const
Less than ordered by tab,row,col as needed by row-wise import/export.
Definition: address.hxx:450
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
const SCTAB SCTAB_MAX
Definition: address.hxx:57
void AddRange(const ScRange &rMergedRange)
ScMyNotEmptyCellsIterator(const ScMyNotEmptyCellsIterator &)=delete
virtual void SetCellData(ScMyCell &rMyCell) override
ScMyDetectiveObjVec aDetectiveObjVec
ScMyShapeList aShapeList
sal_Int16 SCTAB
Definition: types.hxx:22
bool operator<(const ScMyShape &aShape) const
sal_Int32 nStyleIndex