LibreOffice Module sc (master) 1
XMLChangeTrackingExportHelper.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
21#include "xmlexprt.hxx"
22#include "XMLConverter.hxx"
23#include <document.hxx>
24#include <chgtrack.hxx>
25#include <formulacell.hxx>
26#include <textuno.hxx>
27#include <rangeutl.hxx>
28#include <cellvalue.hxx>
29#include <editutil.hxx>
30
33#include <xmloff/xmluconv.hxx>
35#include <svl/numformat.hxx>
36#include <svl/zforlist.hxx>
37#include <svl/sharedstring.hxx>
38#include <sal/log.hxx>
39
40using namespace ::com::sun::star;
41using namespace xmloff::token;
42
44 : rExport(rTempExport),
45 pChangeTrack(nullptr)
46{
48}
49
51{
52}
53
54OUString ScChangeTrackingExportHelper::GetChangeID(const sal_uInt32 nActionNumber)
55{
56 return "ct" + OUString::number(nActionNumber);
57}
58
60{
61 if (pAction->IsRejected())
63 else if (pAction->IsAccepted())
65}
66
68{
69 sal_Int64 nStartColumn;
70 sal_Int64 nEndColumn;
71 sal_Int64 nStartRow;
72 sal_Int64 nEndRow;
73 sal_Int64 nStartSheet;
74 sal_Int64 nEndSheet;
75 rBigRange.GetVars(nStartColumn, nStartRow, nStartSheet,
76 nEndColumn, nEndRow, nEndSheet);
77 if ((nStartColumn == nEndColumn) && (nStartRow == nEndRow) && (nStartSheet == nEndSheet))
78 {
79 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_COLUMN, OUString::number(nStartColumn));
80 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_ROW, OUString::number(nStartRow));
81 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_TABLE, OUString::number(nStartSheet));
82 }
83 else
84 {
85 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_START_COLUMN, OUString::number(nStartColumn));
86 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_START_ROW, OUString::number(nStartRow));
87 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_START_TABLE, OUString::number(nStartSheet));
88 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_END_COLUMN, OUString::number(nEndColumn));
89 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_END_ROW, OUString::number(nEndRow));
90 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_END_TABLE, OUString::number(nEndSheet));
91 }
92 SvXMLElementExport aBigRangeElem(rExport, XML_NAMESPACE_TABLE, aName, true, true);
93}
94
96{
98
99 {
101 XML_CREATOR, true,
102 false );
103 rExport.Characters(pAction->GetUser());
104 }
105
106 {
107 OUStringBuffer sDate;
110 XML_DATE, true,
111 false );
112 rExport.Characters(sDate.makeStringAndClear());
113 }
114
115 const OUString& sComment(pAction->GetComment());
116 if (!sComment.isEmpty())
117 {
118 SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TEXT, XML_P, true, false);
119 bool bPrevCharWasSpace(true);
120 rExport.GetTextParagraphExport()->exportCharacterData(sComment, bPrevCharWasSpace);
121 }
122}
123
125{
126#if OSL_DEBUG_LEVEL > 0
127 sal_uInt32 nActionNumber(pGeneratedAction->GetActionNumber());
128 OSL_ENSURE(pChangeTrack->IsGenerated(nActionNumber), "a not generated action found");
129#endif
131 WriteBigRange(pGeneratedAction->GetBigRange(), XML_CELL_ADDRESS);
132 OUString sValue = static_cast<const ScChangeActionContent*>(pGeneratedAction)->GetNewString(rExport.GetDocument());
133 WriteCell(static_cast<const ScChangeActionContent*>(pGeneratedAction)->GetNewCell(), sValue);
134}
135
137{
138 sal_uInt32 nActionNumber(pDeletedAction->GetActionNumber());
139 if (pDeletedAction->GetType() == SC_CAT_CONTENT)
140 {
141 const ScChangeActionContent* pContentAction = static_cast<const ScChangeActionContent*>(pDeletedAction);
142 if (pContentAction)
143 {
144 if (!pChangeTrack->IsGenerated(nActionNumber))
145 {
148 if (static_cast<const ScChangeActionContent*>(pDeletedAction)->IsTopContent() && pDeletedAction->IsDeletedIn())
149 {
150 OUString sValue = pContentAction->GetNewString(rExport.GetDocument());
151 WriteCell(pContentAction->GetNewCell(), sValue);
152 }
153 }
154 else
155 WriteGenerated(pContentAction);
156 }
157 }
158 else
159 {
162 }
163}
164
166{
167 sal_uInt32 nActionNumber(pDependAction->GetActionNumber());
169
171 XML_DEPENDENCY, true, true);
172}
173
175{
176 if (pAction->HasDependent())
177 {
178 SvXMLElementExport aDependingsElem (rExport, XML_NAMESPACE_TABLE, XML_DEPENDENCIES, true, true);
179 const ScChangeActionLinkEntry* pEntry = pAction->GetFirstDependentEntry();
180 while (pEntry)
181 {
182 WriteDepending(pEntry->GetAction());
183 pEntry = pEntry->GetNext();
184 }
185 }
186 if (pAction->HasDeleted())
187 {
188 SvXMLElementExport aDependingsElem (rExport, XML_NAMESPACE_TABLE, XML_DELETIONS, true, true);
189 const ScChangeActionLinkEntry* pEntry = pAction->GetFirstDeletedEntry();
190 while (pEntry)
191 {
192 WriteDeleted(pEntry->GetAction());
193 pEntry = pEntry->GetNext();
194 }
195 }
196}
197
199{
201}
202
203void ScChangeTrackingExportHelper::SetValueAttributes(const double& fValue, const OUString& sValue)
204{
205 bool bSetAttributes(false);
206 if (!sValue.isEmpty())
207 {
208 sal_uInt32 nIndex = 0;
209 double fTempValue = 0.0;
210 if (rExport.GetDocument() && rExport.GetDocument()->GetFormatTable()->IsNumberFormat(sValue, nIndex, fTempValue))
211 {
213 if (nType & SvNumFormatType::DEFINED)
214 nType &= ~SvNumFormatType::DEFINED;
215 switch(nType)
216 {
217 case SvNumFormatType::DATE:
218 {
220 {
222 OUStringBuffer sBuffer;
223 rExport.GetMM100UnitConverter().convertDateTime(sBuffer, fTempValue);
224 rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_DATE_VALUE, sBuffer.makeStringAndClear());
225 bSetAttributes = true;
226 }
227 }
228 break;
229 case SvNumFormatType::TIME:
230 {
232 OUStringBuffer sBuffer;
233 ::sax::Converter::convertDuration(sBuffer, fTempValue);
234 rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_TIME_VALUE, sBuffer.makeStringAndClear());
235 bSetAttributes = true;
236 }
237 break;
238 default: break;
239 }
240 }
241 }
242 if (!bSetAttributes)
243 {
245 OUStringBuffer sBuffer;
246 ::sax::Converter::convertDouble(sBuffer, fValue);
247 OUString sNumValue(sBuffer.makeStringAndClear());
248 if (!sNumValue.isEmpty())
250 }
251}
252
253void ScChangeTrackingExportHelper::WriteValueCell(const ScCellValue& rCell, const OUString& sValue)
254{
255 assert(rCell.getType() == CELLTYPE_VALUE);
256
257 SetValueAttributes(rCell.getDouble(), sValue);
259}
260
262{
263 assert(rCell.getType() == CELLTYPE_STRING);
264
267 if (!rCell.getSharedString()->isEmpty())
268 {
269 SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, true, false);
270 bool bPrevCharWasSpace(true);
271 rExport.GetTextParagraphExport()->exportCharacterData(rCell.getSharedString()->getString(), bPrevCharWasSpace);
272 }
273}
274
276{
277 assert(rCell.getType() == CELLTYPE_EDIT);
278
279 OUString sString;
280 if (rCell.getEditText())
282
285 if (rCell.getEditText() && !sString.isEmpty())
286 {
287 if (!pEditTextObj)
289 pEditTextObj->SetText(*rCell.getEditText());
290 rExport.GetTextParagraphExport()->exportText(pEditTextObj, false, false);
291 }
292}
293
294void ScChangeTrackingExportHelper::WriteFormulaCell(const ScCellValue& rCell, const OUString& sValue)
295{
296 assert(rCell.getType() == CELLTYPE_FORMULA);
297
298 ScFormulaCell* pFormulaCell = rCell.getFormula();
299 OUString sAddress;
300 const ScDocument* pDoc = rExport.GetDocument();
304 sal_uInt16 nNamespacePrefix = (eGrammar == formula::FormulaGrammar::GRAM_ODFF ? XML_NAMESPACE_OF : XML_NAMESPACE_OOOC);
305 OUString sFormula = pFormulaCell->GetFormula(eGrammar);
306 ScMatrixMode nMatrixFlag(pFormulaCell->GetMatrixFlag());
307 if (nMatrixFlag != ScMatrixMode::NONE)
308 {
309 if (nMatrixFlag == ScMatrixMode::Formula)
310 {
311 SCCOL nColumns;
312 SCROW nRows;
313 pFormulaCell->GetMatColsRows(nColumns, nRows);
316 }
317 else
318 {
320 }
321 OUString sMatrixFormula = sFormula.copy(1, sFormula.getLength() - 2);
322 OUString sQValue = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sMatrixFormula, false );
324 }
325 else
326 {
327 OUString sQValue = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sFormula, false );
329 }
330 if (pFormulaCell->IsValue())
331 {
332 SetValueAttributes(pFormulaCell->GetValue(), sValue);
334 }
335 else
336 {
338 OUString sCellValue = pFormulaCell->GetString().getString();
340 if (!sCellValue.isEmpty())
341 {
342 SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, true, false);
343 bool bPrevCharWasSpace(true);
344 rExport.GetTextParagraphExport()->exportCharacterData(sCellValue, bPrevCharWasSpace);
345 }
346 }
347}
348
349void ScChangeTrackingExportHelper::WriteCell(const ScCellValue& rCell, const OUString& sValue)
350{
351 if (rCell.isEmpty())
352 {
354 return;
355 }
356
357 switch (rCell.getType())
358 {
359 case CELLTYPE_VALUE:
360 WriteValueCell(rCell, sValue);
361 break;
362 case CELLTYPE_STRING:
363 WriteStringCell(rCell);
364 break;
365 case CELLTYPE_EDIT:
366 WriteEditCell(rCell);
367 break;
368 case CELLTYPE_FORMULA:
369 WriteFormulaCell(rCell, sValue);
370 break;
371 default:
373 }
374}
375
377{
379 const ScChangeAction* pConstAction = pAction;
381 WriteChangeInfo(pAction);
382 WriteDependings(pAction);
383 {
384 const ScChangeActionContent* pPrevAction = static_cast<const ScChangeActionContent*>(pAction)->GetPrevContent();
385 if (pPrevAction)
388 OUString sValue = static_cast<const ScChangeActionContent*>(pAction)->GetOldString(rExport.GetDocument());
389 WriteCell(static_cast<const ScChangeActionContent*>(pAction)->GetOldCell(), sValue);
390 }
391}
392
394{
395 sal_Int64 nPosition(0);
396 sal_Int64 nCount(0);
397 sal_Int64 nStartPosition(0);
398 sal_Int64 nEndPosition(0);
399 sal_Int64 nStartColumn;
400 sal_Int64 nEndColumn;
401 sal_Int64 nStartRow;
402 sal_Int64 nEndRow;
403 sal_Int64 nStartSheet;
404 sal_Int64 nEndSheet;
405 const ScBigRange& rBigRange = pConstAction->GetBigRange();
406 rBigRange.GetVars(nStartColumn, nStartRow, nStartSheet,
407 nEndColumn, nEndRow, nEndSheet);
408 switch (pConstAction->GetType())
409 {
410 case SC_CAT_INSERT_COLS :
411 {
413 nStartPosition = nStartColumn;
414 nEndPosition = nEndColumn;
415 }
416 break;
417 case SC_CAT_INSERT_ROWS :
418 {
420 nStartPosition = nStartRow;
421 nEndPosition = nEndRow;
422 }
423 break;
424 case SC_CAT_INSERT_TABS :
425 {
427 nStartPosition = nStartSheet;
428 nEndPosition = nEndSheet;
429 }
430 break;
431 default :
432 {
433 OSL_FAIL("wrong insertion type");
434 }
435 break;
436 }
437 nPosition = nStartPosition;
438 nCount = nEndPosition - nStartPosition + 1;
439 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_POSITION, OUString::number(nPosition));
440 OSL_ENSURE(nCount > 0, "wrong insertion count");
441 if (nCount > 1)
442 {
444 }
445 if (pConstAction->GetType() != SC_CAT_INSERT_TABS)
446 {
447 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_TABLE, OUString::number(nStartSheet));
448 }
449}
450
452{
453 AddInsertionAttributes(pAction);
455 WriteChangeInfo(pAction);
456 WriteDependings(pAction);
457}
458
460{
461 sal_Int32 nPosition(0);
462 const ScBigRange& rBigRange = pDelAction->GetBigRange();
463 sal_Int64 nStartColumn(0);
464 sal_Int64 nEndColumn(0);
465 sal_Int64 nStartRow(0);
466 sal_Int64 nEndRow(0);
467 sal_Int64 nStartSheet(0);
468 sal_Int64 nEndSheet(0);
469 rBigRange.GetVars(nStartColumn, nStartRow, nStartSheet,
470 nEndColumn, nEndRow, nEndSheet);
471 switch (pDelAction->GetType())
472 {
473 case SC_CAT_DELETE_COLS :
474 {
476 nPosition = nStartColumn;
477 }
478 break;
479 case SC_CAT_DELETE_ROWS :
480 {
482 nPosition = nStartRow;
483 }
484 break;
485 case SC_CAT_DELETE_TABS :
486 {
488 nPosition = nStartSheet;
489 }
490 break;
491 default :
492 {
493 OSL_FAIL("wrong deletion type");
494 }
495 break;
496 }
497 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_POSITION, OUString::number(nPosition));
498 if (pDelAction->GetType() == SC_CAT_DELETE_TABS)
499 return;
500
501 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_TABLE, OUString::number(nStartSheet));
502 if (!pDelAction->IsMultiDelete() || pDelAction->GetDx() || pDelAction->GetDy())
503 return;
504
505 const ScChangeAction* p = pDelAction->GetNext();
506 sal_Int32 nSlavesCount (1);
507 while (p)
508 {
509 if (p->GetType() != pDelAction->GetType())
510 break;
511 else
512 {
513 const ScChangeActionDel* pDel = static_cast<const ScChangeActionDel*>(p);
514 if ( (pDel->GetDx() > pDelAction->GetDx() || pDel->GetDy() > pDelAction->GetDy()) &&
515 pDel->GetBigRange() == pDelAction->GetBigRange() )
516 {
517 ++nSlavesCount;
518 p = p->GetNext();
519 }
520 else
521 break;
522 }
523 }
524
525 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_MULTI_DELETION_SPANNED, OUString::number(nSlavesCount));
526}
527
529{
530 const ScChangeActionIns* pCutOffIns = pAction->GetCutOffInsert();
531 const ScChangeActionDelMoveEntry* pLinkMove = pAction->GetFirstMoveEntry();
532 if (!(pCutOffIns || pLinkMove))
533 return;
534
535 SvXMLElementExport aCutOffsElem (rExport, XML_NAMESPACE_TABLE, XML_CUT_OFFS, true, true);
536 if (pCutOffIns)
537 {
541 }
542 while (pLinkMove)
543 {
545 if (pLinkMove->GetCutOffFrom() == pLinkMove->GetCutOffTo())
546 {
547 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_POSITION, OUString::number(pLinkMove->GetCutOffFrom()));
548 }
549 else
550 {
552 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_END_POSITION, OUString::number(pLinkMove->GetCutOffTo()));
553 }
555 pLinkMove = pLinkMove->GetNext();
556 }
557}
558
560{
561 ScChangeActionDel* pDelAction = static_cast<ScChangeActionDel*> (pAction);
562 AddDeletionAttributes(pDelAction);
564 WriteChangeInfo(pDelAction);
565 WriteDependings(pDelAction);
566 WriteCutOffs(pDelAction);
567}
568
570{
571 const ScChangeActionMove* pMoveAction = static_cast<const ScChangeActionMove*> (pAction);
575 WriteChangeInfo(pAction);
576 WriteDependings(pAction);
577}
578
580{
582 WriteChangeInfo(pAction);
583 WriteDependings(pAction);
584}
585
587{
588 if (rCell.getType() != CELLTYPE_EDIT)
589 return;
590
591 if (!pEditTextObj)
593
594 pEditTextObj->SetText(*rCell.getEditText());
595 rExport.GetTextParagraphExport()->collectTextAutoStyles(pEditTextObj, false, false);
596}
597
599{
600 if (pAction->GetType() != SC_CAT_CONTENT)
601 return;
602
604 CollectCellAutoStyles(static_cast<const ScChangeActionContent*>(pAction)->GetNewCell());
605 else
606 {
607 CollectCellAutoStyles(static_cast<const ScChangeActionContent*>(pAction)->GetOldCell());
608 if (static_cast<const ScChangeActionContent*>(pAction)->IsTopContent() && pAction->IsDeletedIn())
609 CollectCellAutoStyles(static_cast<const ScChangeActionContent*>(pAction)->GetNewCell());
610 }
611}
612
614{
615 if (pAction->GetType() == SC_CAT_NONE)
616 {
617 SAL_WARN("sc.filter", "WorkWithChangeAction: type is not writable");
618 return;
619 }
621 GetAcceptanceState(pAction);
622 if (pAction->IsRejecting())
624 if (pAction->GetType() == SC_CAT_CONTENT)
625 WriteContentChange(pAction);
626 else if (pAction->IsInsertType())
627 WriteInsertion(pAction);
628 else if (pAction->IsDeleteType())
629 WriteDeletion(pAction);
630 else if (pAction->GetType() == SC_CAT_MOVE)
631 WriteMovement(pAction);
632 else if (pAction->GetType() == SC_CAT_REJECT)
633 WriteRejection(pAction);
634 else
635 {
636 assert(false); // tdf#73335 this would create duplicate attributes
637 }
639}
640
642{
643 if (!pChangeTrack)
644 return;
645
646 sal_uInt32 nCount (pChangeTrack->GetActionMax());
647 if (!nCount)
648 return;
649
652 ScChangeAction* pLastAction = pChangeTrack->GetLast();
653 while (pAction != pLastAction)
654 {
655 pAction = pAction->GetNext();
657 }
658 pAction = pChangeTrack->GetFirstGenerated();
659 while (pAction)
660 {
662 pAction = pAction->GetNext();
663 }
664}
665
667{
668 if (!pChangeTrack)
669 return;
670
672 {
674 if (pAction)
675 {
676 WorkWithChangeAction(pAction);
677 ScChangeAction* pLastAction = pChangeTrack->GetLast();
678 while (pAction != pLastAction)
679 {
680 pAction = pAction->GetNext();
681 WorkWithChangeAction(pAction);
682 }
683 }
684 }
685}
686
687/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ SC_CAT_NONE
Definition: chgtrack.hxx:64
@ SC_CAT_MOVE
Definition: chgtrack.hxx:71
@ SC_CAT_DELETE_TABS
Definition: chgtrack.hxx:70
@ SC_CAT_INSERT_TABS
Definition: chgtrack.hxx:67
@ SC_CAT_DELETE_ROWS
Definition: chgtrack.hxx:69
@ SC_CAT_CONTENT
Definition: chgtrack.hxx:72
@ SC_CAT_REJECT
Definition: chgtrack.hxx:73
@ SC_CAT_DELETE_COLS
Definition: chgtrack.hxx:68
@ SC_CAT_INSERT_ROWS
Definition: chgtrack.hxx:66
@ SC_CAT_INSERT_COLS
Definition: chgtrack.hxx:65
void GetVars(sal_Int64 &nCol1, sal_Int64 &nRow1, sal_Int64 &nTab1, sal_Int64 &nCol2, sal_Int64 &nRow2, sal_Int64 &nTab2) const
Definition: bigrange.hxx:127
const ScCellValue & GetNewCell() const
Definition: chgtrack.hxx:740
OUString GetNewString(const ScDocument *pDoc) const
Definition: chgtrack.cxx:1388
const ScChangeActionDelMoveEntry * GetNext() const
Definition: chgtrack.hxx:415
short GetCutOffTo() const
Definition: chgtrack.hxx:422
short GetCutOffFrom() const
Definition: chgtrack.hxx:421
bool IsMultiDelete() const
Definition: chgtrack.cxx:822
SCROW GetDy() const
Definition: chgtrack.hxx:477
const ScChangeActionDelMoveEntry * GetFirstMoveEntry() const
Definition: chgtrack.hxx:480
SCCOL GetDx() const
Definition: chgtrack.hxx:476
short GetCutOffCount() const
Definition: chgtrack.hxx:483
const ScChangeActionIns * GetCutOffInsert() const
Definition: chgtrack.hxx:482
A link/connection/dependency between change actions.
Definition: chgtrack.hxx:103
const ScChangeAction * GetAction() const
Definition: chgtrack.hxx:167
const ScChangeActionLinkEntry * GetNext() const
Definition: chgtrack.hxx:165
ScBigRange & GetFromRange()
Definition: chgtrack.hxx:524
const OUString & GetComment() const
Definition: chgtrack.hxx:348
ScBigRange & GetBigRange()
Definition: chgtrack.hxx:229
bool IsDeletedIn() const
Definition: chgtrack.cxx:317
bool IsRejected() const
Definition: chgtrack.cxx:132
sal_uLong GetRejectAction() const
Definition: chgtrack.hxx:318
bool IsRejecting() const
Definition: chgtrack.cxx:137
sal_uLong GetActionNumber() const
Definition: chgtrack.hxx:317
const DateTime & GetDateTimeUTC() const
Definition: chgtrack.hxx:313
ScChangeActionType GetType() const
Definition: chgtrack.hxx:315
const ScChangeActionLinkEntry * GetFirstDependentEntry() const
Definition: chgtrack.hxx:330
bool HasDeleted() const
Definition: chgtrack.cxx:381
bool HasDependent() const
Definition: chgtrack.cxx:376
bool IsDeleteType() const
Definition: chgtrack.cxx:117
const ScChangeActionLinkEntry * GetFirstDeletedEntry() const
Definition: chgtrack.hxx:328
bool IsInsertType() const
Definition: chgtrack.cxx:112
ScChangeAction * GetNext() const
Definition: chgtrack.hxx:320
const OUString & GetUser() const
Definition: chgtrack.hxx:347
SC_DLLPUBLIC bool IsAccepted() const
Definition: chgtrack.cxx:127
ScChangeAction * GetLast() const
Definition: chgtrack.hxx:952
sal_uLong GetActionMax() const
Definition: chgtrack.hxx:953
bool IsGenerated(sal_uLong nAction) const
Definition: chgtrack.cxx:2110
ScChangeActionContent * GetFirstGenerated() const
Definition: chgtrack.hxx:950
ScChangeAction * GetFirst() const
Definition: chgtrack.hxx:951
void WriteDepending(const ScChangeAction *pDependAction)
void WriteCell(const ScCellValue &rCell, const OUString &sValue)
void WriteStringCell(const ScCellValue &rCell)
void WriteDeletion(ScChangeAction *pAction)
void CollectCellAutoStyles(const ScCellValue &rCell)
void WriteDependings(const ScChangeAction *pAction)
void WriteMovement(const ScChangeAction *pAction)
rtl::Reference< ScEditEngineTextObj > pEditTextObj
void WriteFormulaCell(const ScCellValue &rCell, const OUString &sValue)
void WriteContentChange(const ScChangeAction *pAction)
void WriteInsertion(const ScChangeAction *pAction)
void WriteEditCell(const ScCellValue &rCell)
void WriteGenerated(const ScChangeAction *pDependAction)
void CollectActionAutoStyles(const ScChangeAction *pAction)
void AddInsertionAttributes(const ScChangeAction *pAction)
void WriteValueCell(const ScCellValue &rCell, const OUString &sValue)
void SetValueAttributes(const double &fValue, const OUString &sValue)
void WriteDeleted(const ScChangeAction *pDependAction)
void WriteBigRange(const ScBigRange &rBigRange, xmloff::token::XMLTokenEnum aName)
void WriteChangeInfo(const ScChangeAction *pAction)
void WriteCutOffs(const ScChangeActionDel *pAction)
static OUString GetChangeID(const sal_uInt32 nActionNumber)
void WorkWithChangeAction(ScChangeAction *pAction)
void GetAcceptanceState(const ScChangeAction *pAction)
void AddDeletionAttributes(const ScChangeActionDel *pAction)
void WriteRejection(const ScChangeAction *pAction)
formula::FormulaGrammar::Grammar GetStorageGrammar() const
Definition: document.hxx:2536
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:467
ScChangeTrack * GetChangeTrack() const
Definition: document.hxx:2487
static SC_DLLPUBLIC OUString GetString(const EditTextObject &rEditText, const ScDocument *pDoc)
Retrieves string with paragraphs delimited by new lines (' ').
Definition: editutil.cxx:119
void GetMatColsRows(SCCOL &nCols, SCROW &nRows) const
ScMatrixMode GetMatrixFlag() const
double GetValue()
const svl::SharedString & GetString()
ScAddress aPos
OUString GetFormula(const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT, const ScInterpreterContext *pContext=nullptr) const
static void GetStringFromAddress(OUString &rString, const ScAddress &rAddress, const ScDocument *pDocument, formula::FormulaGrammar::AddressConvention eConv, sal_Unicode cSeparator=' ', bool bAppendStr=false, ScRefFlags nFormatFlags=ScRefFlags::VALID|ScRefFlags::TAB_3D)
Range to String core.
static void ConvertDateTimeToString(const DateTime &aDateTime, OUStringBuffer &sDate)
ScDocument * GetDocument()
Definition: xmlexprt.hxx:240
SvNumFormatType GetType(sal_uInt32 nFIndex) const
bool IsNumberFormat(const OUString &sString, sal_uInt32 &F_Index, double &fOutNumber, SvNumInputOptions eInputOptions=SvNumInputOptions::NONE)
const SvXMLNamespaceMap & GetNamespaceMap() const
rtl::Reference< XMLTextParagraphExport > const & GetTextParagraphExport()
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
void Characters(const OUString &rChars)
const css::uno::Reference< css::frame::XModel > & GetModel() const
void CheckAttrList()
const SvXMLUnitConverter & GetMM100UnitConverter() const
OUString GetQNameByKey(sal_uInt16 nKey, const OUString &rLocalName, bool bCache=true) const
void convertDateTime(OUStringBuffer &rBuffer, const double &fDateTime, bool const bAddTimeIf0AM=false)
bool setNullDate(const css::uno::Reference< css::frame::XModel > &xModel)
static void convertDouble(OUStringBuffer &rBuffer, double fNumber, bool bWriteUnits, sal_Int16 nSourceUnit, sal_Int16 nTargetUnit)
static void convertDuration(OUStringBuffer &rBuffer, const double fTime)
const OUString & getString() const
bool isEmpty() const
int nCount
OString sFormula
ScMatrixMode
@ CELLTYPE_EDIT
Definition: global.hxx:276
@ CELLTYPE_STRING
Definition: global.hxx:274
@ CELLTYPE_FORMULA
Definition: global.hxx:275
@ CELLTYPE_VALUE
Definition: global.hxx:273
sal_Int32 nIndex
OUString aName
void * p
#define SAL_WARN(area, stream)
XMLTokenEnum
XML_CELL_CONTENT_DELETION
XML_DELETIONS
XML_START_ROW
XML_DEPENDENCIES
XML_CUT_OFFS
XML_ACCEPTED
XML_CHANGE_INFO
XML_REJECTION
XML_TABLE
XML_DATE_VALUE
XML_CREATOR
XML_COLUMN
XML_ACCEPTANCE_STATE
XML_PREVIOUS
XML_TRACKED_CHANGES
XML_ROW
XML_MATRIX_COVERED
XML_TRUE
XML_NUMBER_MATRIX_COLUMNS_SPANNED
XML_START_TABLE
XML_START_COLUMN
XML_DELETION
XML_TIME_VALUE
XML_START_POSITION
XML_INSERTION
XML_END_POSITION
XML_ID
XML_COUNT
XML_DEPENDENCY
XML_END_ROW
XML_FLOAT
XML_FORMULA
XML_REJECTING_CHANGE_ID
XML_STRING
XML_SOURCE_RANGE_ADDRESS
XML_POSITION
XML_VALUE
XML_MULTI_DELETION_SPANNED
XML_REJECTED
XML_CHANGE_DELETION
XML_END_COLUMN
XML_TARGET_RANGE_ADDRESS
XML_MOVEMENT_CUT_OFF
XML_TIME
XML_P
XML_VALUE_TYPE
XML_CELL_CONTENT_CHANGE
XML_END_TABLE
XML_MOVEMENT
XML_DATE
XML_INSERTION_CUT_OFF
XML_NUMBER_MATRIX_ROWS_SPANNED
XML_CHANGE_TRACK_TABLE_CELL
XML_CELL_ADDRESS
XML_TYPE
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
Store arbitrary cell value of any kind.
Definition: cellvalue.hxx:32
bool isEmpty() const
Definition: cellvalue.cxx:519
const svl::SharedString * getSharedString() const
Definition: cellvalue.hxx:60
CellType getType() const
Definition: cellvalue.cxx:296
ScFormulaCell * getFormula() const
Definition: cellvalue.hxx:59
EditTextObject * getEditText() const
Definition: cellvalue.hxx:61
double getDouble() const
Definition: cellvalue.hxx:58
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
constexpr sal_uInt16 XML_NAMESPACE_DC
constexpr sal_uInt16 XML_NAMESPACE_OOOC
constexpr sal_uInt16 XML_NAMESPACE_TEXT
constexpr sal_uInt16 XML_NAMESPACE_OF
constexpr sal_uInt16 XML_NAMESPACE_TABLE
constexpr sal_uInt16 XML_NAMESPACE_OFFICE
SvNumFormatType