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  : aShapeList()
62 {
63 }
64 
66 {
67 }
68 
70 {
71  aShapeList.push_back(aShape);
72 }
73 
75 {
76  SCTAB nTable( rCellAddress.Tab() );
77  if( !aShapeList.empty() )
78  {
79  rCellAddress = aShapeList.begin()->aAddress;
80  return ( nTable == rCellAddress.Tab() );
81  }
82  return false;
83 }
84 
86 {
87  rMyCell.aShapeList.clear();
88 
89  ScMyShapeList::iterator aItr(aShapeList.begin());
90  ScMyShapeList::iterator aEndItr(aShapeList.end());
91  while( (aItr != aEndItr) && (aItr->aAddress == rMyCell.maCellAddress) )
92  {
93  rMyCell.aShapeList.push_back(*aItr);
94  aItr = aShapeList.erase(aItr);
95  }
96  rMyCell.bHasShape = !rMyCell.aShapeList.empty();
97 }
98 
100 {
101  ScMyShapeList::iterator aItr = std::find_if_not(aShapeList.begin(), aShapeList.end(),
102  [&nSkip](const ScMyShape& rShape) { return rShape.aAddress.Tab() == nSkip; });
103  aShapeList.erase(aShapeList.begin(), aItr);
104 }
105 
107 {
108  aShapeList.sort();
109 }
110 
111 inline bool ScMyNoteShape::operator<(const ScMyNoteShape& aNote) const
112 {
113  return aPos.lessThanByRow( aNote.aPos );
114 }
115 
117  : aNoteShapeList()
118 {
119 }
120 
122 {
123 }
124 
126 {
127  aNoteShapeList.push_back(aNote);
128 }
129 
131 {
132  SCTAB nTable = rCellAddress.Tab();
133  if( !aNoteShapeList.empty() )
134  {
135  rCellAddress = aNoteShapeList.begin()->aPos;
136  return ( nTable == rCellAddress.Tab() );
137  }
138  return false;
139 }
140 
142 {
143  ScMyNoteShapeList::iterator aItr = std::find_if_not(aNoteShapeList.begin(), aNoteShapeList.end(),
144  [&rMyCell](const ScMyNoteShape& rNoteShape) { return rNoteShape.aPos == rMyCell.maCellAddress; });
145  aNoteShapeList.erase(aNoteShapeList.begin(), aItr);
146 }
147 
149 {
150  ScMyNoteShapeList::iterator aItr = std::find_if_not(aNoteShapeList.begin(), aNoteShapeList.end(),
151  [&nSkip](const ScMyNoteShape& rNoteShape) { return rNoteShape.aPos.Tab() == nSkip; });
152  aNoteShapeList.erase(aNoteShapeList.begin(), aItr);
153 }
154 
156 {
157  aNoteShapeList.sort();
158 }
159 
160 inline bool ScMyMergedRange::operator<(const ScMyMergedRange& aRange) const
161 {
163 }
164 
166  : aRangeList()
167 {
168 }
169 
171 {
172 }
173 
175 {
176  SCROW nStartRow( rMergedRange.aStart.Row() );
177  SCROW nEndRow( rMergedRange.aEnd.Row() );
178 
179  ScMyMergedRange aRange;
180  aRange.bIsFirst = true;
181 
182  aRange.aCellRange = rMergedRange;
183 
184  aRange.aCellRange.aEnd.SetRow( nStartRow );
185  aRange.nRows = nEndRow - nStartRow + 1;
186  aRangeList.push_back( aRange );
187 
188  aRange.bIsFirst = false;
189  aRange.nRows = 0;
190  for( SCROW nRow = nStartRow + 1; nRow <= nEndRow; ++nRow )
191  {
192  aRange.aCellRange.aStart.SetRow( nRow );
193  aRange.aCellRange.aEnd.SetRow( nRow );
194  aRangeList.push_back(aRange);
195  }
196 }
197 
199 {
200  SCTAB nTable( rCellAddress.Tab() );
201  if( !aRangeList.empty() )
202  {
203  rCellAddress = aRangeList.begin()->aCellRange.aStart;
204  return ( nTable == rCellAddress.Tab() );
205  }
206  return false;
207 }
208 
210 {
211  rMyCell.bIsMergedBase = rMyCell.bIsCovered = false;
212  ScMyMergedRangeList::iterator aItr(aRangeList.begin());
213  if( aItr == aRangeList.end() )
214  return;
215 
216  if( aItr->aCellRange.aStart != rMyCell.aCellAddress )
217  return;
218 
219  rMyCell.aMergeRange = aItr->aCellRange;
220  if (aItr->bIsFirst)
221  rMyCell.aMergeRange.aEnd.SetRow( rMyCell.aMergeRange.aStart.Row() + aItr->nRows - 1 );
222  rMyCell.bIsMergedBase = aItr->bIsFirst;
223  rMyCell.bIsCovered = !aItr->bIsFirst;
224  if( aItr->aCellRange.aStart.Col() < aItr->aCellRange.aEnd.Col() )
225  {
226  aItr->aCellRange.aStart.IncCol( 1 );
227  aItr->bIsFirst = false;
228  }
229  else
230  aRangeList.erase(aItr);
231 }
232 
234 {
235  ScMyMergedRangeList::iterator aItr = std::find_if_not(aRangeList.begin(), aRangeList.end(),
236  [&nSkip](const ScMyMergedRange& rRange) { return rRange.aCellRange.aStart.Tab() == nSkip; });
237  aRangeList.erase(aRangeList.begin(), aItr);
238 }
239 
241 {
242  aRangeList.sort();
243 }
244 
245 bool ScMyAreaLink::Compare( const ScMyAreaLink& rAreaLink ) const
246 {
247  return (GetRowCount() == rAreaLink.GetRowCount()) &&
248  (sFilter == rAreaLink.sFilter) &&
249  (sFilterOptions == rAreaLink.sFilterOptions) &&
250  (sURL == rAreaLink.sURL) &&
251  (sSourceStr == rAreaLink.sSourceStr);
252 }
253 
254 inline bool ScMyAreaLink::operator<(const ScMyAreaLink& rAreaLink ) const
255 {
256  return aDestRange.aStart.lessThanByRow( rAreaLink.aDestRange.aStart );
257 }
258 
260  aAreaLinkList()
261 {
262 }
263 
265 {
266 }
267 
269 {
270  SCTAB nTable( rCellAddress.Tab() );
271  if( !aAreaLinkList.empty() )
272  {
273  rCellAddress = aAreaLinkList.begin()->aDestRange.aStart;
274  return ( nTable == rCellAddress.Tab() );
275  }
276  return false;
277 }
278 
280 {
281  rMyCell.bHasAreaLink = false;
282  ScMyAreaLinkList::iterator aItr(aAreaLinkList.begin());
283  if( aItr == aAreaLinkList.end() )
284  return;
285 
286  if( aItr->aDestRange.aStart != rMyCell.aCellAddress )
287  return;
288 
289  rMyCell.bHasAreaLink = true;
290  rMyCell.aAreaLink = *aItr;
291  aItr = aAreaLinkList.erase( aItr );
292  bool bFound = true;
293  while (aItr != aAreaLinkList.end() && bFound)
294  {
295  if ( aItr->aDestRange.aStart == rMyCell.aCellAddress )
296  {
297  OSL_FAIL("more than one linked range on one cell");
298  aItr = aAreaLinkList.erase( aItr );
299  }
300  else
301  bFound = false;
302  }
303 }
304 
306 {
307  ScMyAreaLinkList::iterator aItr = std::find_if_not(aAreaLinkList.begin(), aAreaLinkList.end(),
308  [&nSkip](const ScMyAreaLink& rAreaLink) { return rAreaLink.aDestRange.aStart.Tab() == nSkip; });
309  aAreaLinkList.erase(aAreaLinkList.begin(), aItr);
310 }
311 
313 {
314  aAreaLinkList.sort();
315 }
316 
318  : aDatabaseList()
319 {
320 }
321 
323 {
324 }
325 
326 void ScMyEmptyDatabaseRangesContainer::AddNewEmptyDatabaseRange(const table::CellRangeAddress& aCellRange)
327 {
328  SCROW nStartRow(aCellRange.StartRow);
329  SCROW nEndRow(aCellRange.EndRow);
330  ScRange aRange( aCellRange.StartColumn, aCellRange.StartRow, aCellRange.Sheet,
331  aCellRange.EndColumn, aCellRange.EndRow, aCellRange.Sheet );
332  for( SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow )
333  {
334  aRange.aStart.SetRow( nRow );
335  aRange.aEnd.SetRow( nRow );
336  aDatabaseList.push_back( aRange );
337  }
338 }
339 
341 {
342  SCTAB nTable( rCellAddress.Tab() );
343  if( !aDatabaseList.empty() )
344  {
345  rCellAddress = aDatabaseList.begin()->aStart;
346  return ( nTable == rCellAddress.Tab() );
347  }
348  return false;
349 }
350 
352 {
353  rMyCell.bHasEmptyDatabase = false;
354  ScMyEmptyDatabaseRangeList::iterator aItr(aDatabaseList.begin());
355  if( aItr != aDatabaseList.end() )
356  {
357  if( aItr->aStart == rMyCell.aCellAddress )
358  {
359  rMyCell.bHasEmptyDatabase = true;
360  if( aItr->aStart.Col() < aItr->aEnd.Col() )
361  aItr->aStart.SetCol( aItr->aStart.Col() + 1 );
362  else
363  aDatabaseList.erase(aItr);
364  }
365  }
366 }
367 
369 {
370  ScMyEmptyDatabaseRangeList::iterator aItr = std::find_if_not(aDatabaseList.begin(), aDatabaseList.end(),
371  [&nSkip](const ScRange& rDatabase) { return rDatabase.aStart.Tab() == nSkip; });
372  aDatabaseList.erase(aDatabaseList.begin(), aItr);
373 }
374 
376 {
377  aDatabaseList.sort();
378 }
379 
380 inline bool ScMyDetectiveObj::operator<( const ScMyDetectiveObj& rDetObj) const
381 {
382  return aPosition.lessThanByRow( rDetObj.aPosition );
383 }
384 
386  aDetectiveObjList()
387 {
388 }
389 
391 {
392 }
393 
395  const ScAddress& rPosition, const ScRange& rSourceRange,
396  bool bHasError )
397 {
398  if( !((eObjType == SC_DETOBJ_ARROW) ||
399  (eObjType == SC_DETOBJ_FROMOTHERTAB) ||
400  (eObjType == SC_DETOBJ_TOOTHERTAB) ||
401  (eObjType == SC_DETOBJ_CIRCLE)) )
402  return;
403 
404  ScMyDetectiveObj aDetObj;
405  aDetObj.eObjType = eObjType;
406  if( eObjType == SC_DETOBJ_TOOTHERTAB )
407  aDetObj.aPosition = rSourceRange.aStart;
408  else
409  aDetObj.aPosition = rPosition;
410  aDetObj.aSourceRange = rSourceRange;
411 
412  // #111064#; take the sheet where the object is found and not the sheet given in the ranges, because they are not always true
413  if (eObjType != SC_DETOBJ_FROMOTHERTAB)
414  {
415  // if the ObjType == SC_DETOBJ_FROMOTHERTAB then the SourceRange is not used and so it has not to be tested and changed
416  OSL_ENSURE(aDetObj.aPosition.Tab() == aDetObj.aSourceRange.aStart.Tab(), "It seems to be possible to have different sheets");
417  aDetObj.aSourceRange.aStart.SetTab( nSheet );
418  aDetObj.aSourceRange.aEnd.SetTab( nSheet );
419  }
420  aDetObj.aPosition.SetTab( nSheet );
421 
422  aDetObj.bHasError = bHasError;
423  aDetectiveObjList.push_back( aDetObj );
424 }
425 
427 {
428  SCTAB nTable( rCellAddress.Tab() );
429  if( !aDetectiveObjList.empty() )
430  {
431  rCellAddress = aDetectiveObjList.begin()->aPosition;
432  return ( nTable == rCellAddress.Tab() );
433  }
434  return false;
435 }
436 
438 {
439  rMyCell.aDetectiveObjVec.clear();
440  ScMyDetectiveObjList::iterator aItr(aDetectiveObjList.begin());
441  ScMyDetectiveObjList::iterator aEndItr(aDetectiveObjList.end());
442  while( (aItr != aEndItr) && (aItr->aPosition == rMyCell.aCellAddress) )
443  {
444  rMyCell.aDetectiveObjVec.push_back( *aItr );
445  aItr = aDetectiveObjList.erase( aItr );
446  }
447  rMyCell.bHasDetectiveObj = (!rMyCell.aDetectiveObjVec.empty());
448 }
449 
451 {
452  ScMyDetectiveObjList::iterator aItr = std::find_if_not(aDetectiveObjList.begin(), aDetectiveObjList.end(),
453  [&nSkip](const ScMyDetectiveObj& rDetectiveObj) { return rDetectiveObj.aPosition.Tab() == nSkip; });
454  aDetectiveObjList.erase(aDetectiveObjList.begin(), aItr);
455 }
456 
458 {
459  aDetectiveObjList.sort();
460 }
461 
462 inline bool ScMyDetectiveOp::operator<( const ScMyDetectiveOp& rDetOp) const
463 {
464  return aPosition.lessThanByRow( rDetOp.aPosition );
465 }
466 
468  aDetectiveOpList()
469 {
470 }
471 
473 {
474 }
475 
476 void ScMyDetectiveOpContainer::AddOperation( ScDetOpType eOpType, const ScAddress& rPosition, sal_uInt32 nIndex )
477 {
478  ScMyDetectiveOp aDetOp;
479  aDetOp.eOpType = eOpType;
480  aDetOp.aPosition = rPosition;
481  aDetOp.nIndex = nIndex;
482  aDetectiveOpList.push_back( aDetOp );
483 }
484 
486 {
487  SCTAB nTable( rCellAddress.Tab() );
488  if( !aDetectiveOpList.empty() )
489  {
490  rCellAddress = aDetectiveOpList.begin()->aPosition;
491  return ( nTable == rCellAddress.Tab() );
492  }
493  return false;
494 }
495 
497 {
498  rMyCell.aDetectiveOpVec.clear();
499  ScMyDetectiveOpList::iterator aItr(aDetectiveOpList.begin());
500  ScMyDetectiveOpList::iterator aEndItr(aDetectiveOpList.end());
501  while( (aItr != aEndItr) && (aItr->aPosition == rMyCell.aCellAddress) )
502  {
503  rMyCell.aDetectiveOpVec.push_back( *aItr );
504  aItr = aDetectiveOpList.erase( aItr );
505  }
506  rMyCell.bHasDetectiveOp = (!rMyCell.aDetectiveOpVec.empty());
507 }
508 
510 {
511  ScMyDetectiveOpList::iterator aItr = std::find_if_not(aDetectiveOpList.begin(), aDetectiveOpList.end(),
512  [&nSkip](const ScMyDetectiveOp& rDetectiveOp) { return rDetectiveOp.aPosition.Tab() == nSkip; });
513  aDetectiveOpList.erase(aDetectiveOpList.begin(), aItr);
514 }
515 
517 {
518  aDetectiveOpList.sort();
519 }
520 
522  aShapeList(),
523  aDetectiveObjVec(),
524  pNote(nullptr),
525  nValidationIndex(-1),
526  nStyleIndex(-1),
527  nNumberFormat(-1),
528  nType(table::CellContentType_EMPTY),
529  bIsAutoStyle( false ),
530  bHasShape( false ),
531  bIsMergedBase( false ),
532  bIsCovered( false ),
533  bHasAreaLink( false ),
534  bHasEmptyDatabase( false ),
535  bHasDetectiveObj( false ),
536  bHasDetectiveOp( false ),
537  bIsMatrixBase( false ),
538  bIsMatrixCovered( false ),
539  bHasAnnotation( false )
540 {
541 }
542 
544  : pShapes(nullptr),
545  pNoteShapes(nullptr),
546  pEmptyDatabaseRanges(nullptr),
547  pMergedRanges(nullptr),
548  pAreaLinks(nullptr),
549  pDetectiveObj(nullptr),
550  pDetectiveOp(nullptr),
551  rExport(rTempXMLExport),
552  nCellCol(0),
553  nCellRow(0),
554  nCurrentTable(SCTAB_MAX)
555 {
556 }
557 
559 {
560  Clear();
561 }
562 
564 {
565  mpCellItr.reset();
566  pShapes = nullptr;
567  pNoteShapes = nullptr;
568  pMergedRanges = nullptr;
569  pAreaLinks = nullptr;
570  pEmptyDatabaseRanges = nullptr;
571  pDetectiveObj = nullptr;
572  pDetectiveOp = nullptr;
574 }
575 
577 {
578  if (mpCellItr->GetPos(nCellCol, nCellRow))
579  {
580  rAddress.SetCol( nCellCol );
581  rAddress.SetRow( nCellRow );
582  }
583 }
584 
586 {
587  rMyCell.maBaseCell.clear();
588  rMyCell.aCellAddress = rAddress;
589  rMyCell.maCellAddress = rMyCell.aCellAddress;
590 
591  if( ( nCellCol == rAddress.Col() ) && ( nCellRow == rAddress.Row() ) )
592  {
593  const ScRefCellValue* pCell = mpCellItr->GetNext(nCellCol, nCellRow);
594  if (pCell)
595  rMyCell.maBaseCell = *pCell;
596  }
597 
598  rMyCell.bIsMatrixCovered = false;
599  rMyCell.bIsMatrixBase = false;
600 
601  switch (rMyCell.maBaseCell.meType)
602  {
603  case CELLTYPE_VALUE:
604  rMyCell.nType = table::CellContentType_VALUE;
605  break;
606  case CELLTYPE_STRING:
607  case CELLTYPE_EDIT:
608  rMyCell.nType = table::CellContentType_TEXT;
609  break;
610  case CELLTYPE_FORMULA:
611  rMyCell.nType = table::CellContentType_FORMULA;
612  break;
613  default:
614  rMyCell.nType = table::CellContentType_EMPTY;
615  }
616 
617  if (rMyCell.maBaseCell.meType == CELLTYPE_FORMULA)
618  {
619  bool bIsMatrixBase = false;
620  if (rExport.IsMatrix(rMyCell.maCellAddress, rMyCell.aMatrixRange, bIsMatrixBase))
621  {
622  rMyCell.bIsMatrixBase = bIsMatrixBase;
623  rMyCell.bIsMatrixCovered = !bIsMatrixBase;
624  }
625  }
626 }
627 
629 {
630  aCell.bHasAnnotation = false;
631  ScPostIt* pNote = rExport.GetDocument()->GetNote(aCell.maCellAddress);
632 
633  if(pNote)
634  {
635  aCell.bHasAnnotation = true;
636  aCell.pNote = pNote;
637  }
638 }
639 
641  const uno::Reference<sheet::XSpreadsheet>& rxTable)
642 {
643  aLastAddress.SetRow( 0 );
644  aLastAddress.SetCol( 0 );
645  aLastAddress.SetTab( nTable );
646  if (nCurrentTable == nTable)
647  return;
648 
649  nCurrentTable = nTable;
650 
651  mpCellItr.reset(
655  static_cast<SCROW>(rExport.GetSharedData()->GetLastRow(nCurrentTable))));
656 
657  xTable.set(rxTable);
658  xCellRange.set(xTable);
659 }
660 
662 {
663  // Skip entries for a sheet that is copied instead of saving normally.
664  // Cells are handled separately in SetCurrentTable.
665 
666  if( pShapes )
667  pShapes->SkipTable(nSkip);
668  if( pNoteShapes )
669  pNoteShapes->SkipTable(nSkip);
672  if( pMergedRanges )
673  pMergedRanges->SkipTable(nSkip);
674  if( pAreaLinks )
675  pAreaLinks->SkipTable(nSkip);
676  if( pDetectiveObj )
677  pDetectiveObj->SkipTable(nSkip);
678  if( pDetectiveOp )
679  pDetectiveOp->SkipTable(nSkip);
680 }
681 
683 {
684  ScDocument* pDoc = rExport.GetDocument();
685  ScAddress aAddress( pDoc->MaxCol() + 1, pDoc->MaxRow() + 1, nCurrentTable );
686 
687  UpdateAddress( aAddress );
688 
689  if( pShapes )
690  pShapes->UpdateAddress( aAddress );
691  if( pNoteShapes )
692  pNoteShapes->UpdateAddress( aAddress );
694  pEmptyDatabaseRanges->UpdateAddress( aAddress );
695  if( pMergedRanges )
696  pMergedRanges->UpdateAddress( aAddress );
697  if( pAreaLinks )
698  pAreaLinks->UpdateAddress( aAddress );
699  if( pDetectiveObj )
700  pDetectiveObj->UpdateAddress( aAddress );
701  if( pDetectiveOp )
702  pDetectiveOp->UpdateAddress( aAddress );
703 
704  bool bFoundCell( ( aAddress.Col() <= pDoc->MaxCol() ) && ( aAddress.Row() <= pDoc->MaxRow() + 1 ) );
705  if( bFoundCell )
706  {
707  SetCellData( aCell, aAddress );
708  if( pShapes )
709  pShapes->SetCellData( aCell );
710  if( pNoteShapes )
711  pNoteShapes->SetCellData( aCell );
714  if( pMergedRanges )
715  pMergedRanges->SetCellData( aCell );
716  if( pAreaLinks )
717  pAreaLinks->SetCellData( aCell );
718  if( pDetectiveObj )
719  pDetectiveObj->SetCellData( aCell );
720  if( pDetectiveOp )
721  pDetectiveOp->SetCellData( aCell );
722 
723  HasAnnotation( aCell );
724  bool bIsAutoStyle;
725  // Ranges before the previous cell are not needed by ExportFormatRanges anymore and can be removed
726  SCROW nRemoveBeforeRow = aLastAddress.Row();
727  aCell.nStyleIndex = pCellStyles->GetStyleNameIndex(aCell.maCellAddress.Tab(),
728  aCell.maCellAddress.Col(), aCell.maCellAddress.Row(),
729  bIsAutoStyle, aCell.nValidationIndex, aCell.nNumberFormat, nRemoveBeforeRow);
730  aLastAddress = aCell.aCellAddress;
731  aCell.bIsAutoStyle = bIsAutoStyle;
732 
733  //#102799#; if the cell is in a DatabaseRange which should saved empty, the cell should have the type empty
734  if (aCell.bHasEmptyDatabase)
735  aCell.nType = table::CellContentType_EMPTY;
736  }
737  return bFoundCell;
738 }
739 
740 /* 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:500
ScMyDetectiveOpList aDetectiveOpList
virtual void Sort() override
ScRefCellValue maBaseCell
bool operator<(const ScMyDetectiveObj &rDetObj) const
SCROW Row() const
Definition: address.hxx:262
ScPostIt * pNote
sal_Int32 nValidationIndex
virtual ~ScMyEmptyDatabaseRangesContainer() override
css::table::CellContentType nType
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
ScMySharedData * GetSharedData()
Definition: xmlexprt.hxx:257
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:501
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:104
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:6510
bool operator<(const ScMyMergedRange &aRange) const
std::unique_ptr< ScHorizontalCellIterator > mpCellItr
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:876
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:2751
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
SCTAB Tab() const
Definition: address.hxx:271
void SetRow(SCROW nRowP)
Definition: address.hxx:275
void SkipTable(SCTAB nSkip)
virtual ~ScMyDetectiveObjContainer() override
ScMyShapesContainer * pShapes
void SetCol(SCCOL nColP)
Definition: address.hxx:279
virtual void SetCellData(ScMyCell &rMyCell) override
void SetTab(SCTAB nTabP)
Definition: address.hxx:283
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:875
bool operator<(const ScMyNoteShape &aNote) const
ScMyDetectiveOpVec aDetectiveOpVec
virtual void Sort() override
ScMyNoteShapeList aNoteShapeList
ScDetectiveObjType
Definition: detfunc.hxx:39
sal_Int16 SCCOL
Definition: types.hxx:22
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:267
virtual ~ScMyMergedRangesContainer() override
ScMyAreaLink aAreaLink
sal_Int32 GetLastColumn(const sal_Int32 nTable) const
ScMyDetectiveOpContainer * pDetectiveOp
CellType meType
Definition: cellvalue.hxx:106
void AddNewEmptyDatabaseRange(const css::table::CellRangeAddress &aCellRangeAddress)
ScDetectiveObjType eObjType
ScDocument * GetDocument()
Definition: xmlexprt.hxx:240
sal_Int32 SCROW
Definition: types.hxx:18
ScDetOpType
Definition: detdata.hxx:28
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:401
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:451
virtual bool GetFirstAddress(ScAddress &rCellAddress) override
const SCTAB SCTAB_MAX
Definition: address.hxx:58
css::uno::Any const SvXMLExport & rExport
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:23
bool operator<(const ScMyShape &aShape) const
sal_Int32 nStyleIndex