LibreOffice Module sc (master)  1
XclExpChangeTrack.hxx
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 #pragma once
21 
22 #include <memory>
23 #include <stack>
24 #include <tools/datetime.hxx>
25 #include <chgtrack.hxx>
26 #include <document.hxx>
27 #include "xelink.hxx"
28 #include "xestring.hxx"
29 #include "excrecds.hxx"
30 #include "xlformula.hxx"
31 #include "xeformula.hxx"
32 
33 class ExcXmlRecord : public ExcRecord
34 {
35 public:
36  virtual std::size_t GetLen() const override;
37  virtual sal_uInt16 GetNum() const override;
38  virtual void Save( XclExpStream& rStrm ) override;
39 };
40 
41 // XclExpUserBView - one UserBView record for each user
42 
43 class XclExpUserBView : public ExcRecord
44 {
45 private:
48 
49  virtual void SaveCont( XclExpStream& rStrm ) override;
50 
51 public:
52  XclExpUserBView( const OUString& rUsername, const sal_uInt8* pGUID );
53 
54  const sal_uInt8* GetGUID() const { return aGUID; }
55 
56  virtual sal_uInt16 GetNum() const override;
57  virtual std::size_t GetLen() const override;
58 };
59 
60 // XclExpUserBViewList - list of UserBView records
61 
63 {
64 private:
65  std::vector<XclExpUserBView> aViews;
66 
67 public:
68 
69  typedef std::vector<XclExpUserBView>::const_iterator const_iterator;
70 
71  XclExpUserBViewList( const ScChangeTrack& rChangeTrack );
72  virtual ~XclExpUserBViewList() override;
73 
74  const_iterator cbegin () { return aViews.cbegin(); }
75  const_iterator cend () { return aViews.cend(); }
76 
77  virtual void Save( XclExpStream& rStrm ) override;
78 };
79 
80 // XclExpUsersViewBegin - begin of view block (one per sheet)
81 
83 {
84 private:
86  sal_uInt32 nCurrTab;
87 
88  virtual void SaveCont( XclExpStream& rStrm ) override;
89 
90 public:
91  XclExpUsersViewBegin( const sal_uInt8* pGUID, sal_uInt32 nTab );
92  virtual sal_uInt16 GetNum() const override;
93  virtual std::size_t GetLen() const override;
94 };
95 
96 // XclExpUsersViewEnd - end of view block (one per sheet)
97 
99 {
100 private:
101  virtual void SaveCont( XclExpStream& rStrm ) override;
102 
103 public:
104  virtual sal_uInt16 GetNum() const override;
105  virtual std::size_t GetLen() const override;
106 };
107 
108 // dummy record for "User Names" stream
109 
111 {
112 private:
113  virtual void SaveCont( XclExpStream& rStrm ) override;
114 
115 public:
116  virtual sal_uInt16 GetNum() const override;
117  virtual std::size_t GetLen() const override;
118 };
119 
120 // dummy record for "User Names" stream
121 
123 {
124 private:
125  virtual void SaveCont( XclExpStream& rStrm ) override;
126 
127 public:
128  virtual sal_uInt16 GetNum() const override;
129  virtual std::size_t GetLen() const override;
130 };
131 
132 // dummy record for "User Names" stream
133 
135 {
136 private:
137  virtual void SaveCont( XclExpStream& rStrm ) override;
138 
139 public:
140  virtual sal_uInt16 GetNum() const override;
141  virtual std::size_t GetLen() const override;
142 };
143 
144 // dummy record for "User Names" stream
145 
147 {
148 private:
149  virtual void SaveCont( XclExpStream& rStrm ) override;
150 
151 public:
152  virtual sal_uInt16 GetNum() const override;
153  virtual std::size_t GetLen() const override;
154 };
155 
156 // dummy record without content
157 
159 {
160 private:
161  sal_uInt16 nRecNum;
162 
163 public:
164  XclExpChTrEmpty( sal_uInt16 nNum ) : nRecNum( nNum ) {}
165  virtual ~XclExpChTrEmpty() override;
166 
167  virtual sal_uInt16 GetNum() const override;
168  virtual std::size_t GetLen() const override;
169 };
170 
171 // dummy record for "Revision Log" stream
172 
174 {
175 private:
176  virtual void SaveCont( XclExpStream& rStrm ) override;
177 
178 public:
179  virtual ~XclExpChTr0x0195() override;
180 
181  virtual sal_uInt16 GetNum() const override;
182  virtual std::size_t GetLen() const override;
183 };
184 
185 // dummy record for "Revision Log" stream
186 
188 {
189 private:
192 
193  virtual void SaveCont( XclExpStream& rStrm ) override;
194 
195 public:
196  inline XclExpChTr0x0194( const ScChangeTrack& rChangeTrack );
197  virtual ~XclExpChTr0x0194() override;
198 
199  virtual sal_uInt16 GetNum() const override;
200  virtual std::size_t GetLen() const override;
201 };
202 
203 inline XclExpChTr0x0194::XclExpChTr0x0194( const ScChangeTrack& rChangeTrack ) :
204  sUsername( rChangeTrack.GetUser() ),
205  aDateTime( rChangeTrack.GetFixDateTime() )
206 {
207 }
208 
209 // XclExpChTrHeader - header record, includes action count
210 
212 {
213 private:
215  sal_uInt32 nCount;
216 
217  virtual void SaveCont( XclExpStream& rStrm ) override;
218 
219 public:
220  XclExpChTrHeader() : nCount( 0 ) {}
221  virtual ~XclExpChTrHeader() override;
222 
223  void SetGUID( const sal_uInt8* pGUID ) { memcpy( aGUID, pGUID, 16 ); }
224  void SetCount( sal_uInt32 nNew ) { nCount = nNew; }
225 
226  virtual sal_uInt16 GetNum() const override;
227  virtual std::size_t GetLen() const override;
228 
229  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
230 };
231 
233 {
235 public:
236  void SetGUID( const sal_uInt8* pGUID );
237 
238  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
239 };
240 
242 class XclExpChTrAction;
243 
245 {
246  OUString maUserName;
249  sal_Int32 mnLogNumber;
250  sal_uInt32 mnMinAction;
251  sal_uInt32 mnMaxAction;
252 
253  std::vector<sal_uInt16> maTabBuffer;
254  std::vector<std::unique_ptr<XclExpChTrAction>> maActions;
255 
256 public:
258  const OUString& rUserName, const DateTime& rDateTime, const sal_uInt8* pGUID,
259  sal_Int32 nLogNumber, const XclExpChTrTabIdBuffer& rBuf );
260 
261  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
262 
263  void AppendAction( std::unique_ptr<XclExpChTrAction> pAction );
264 };
265 
266 // XclExpChTrInfo - header of action group of a user
267 
268 class XclExpChTrInfo : public ExcRecord
269 {
270 private:
274 
275  virtual void SaveCont( XclExpStream& rStrm ) override;
276 
277 public:
278  XclExpChTrInfo( const OUString& rUsername, const DateTime& rDateTime,
279  const sal_uInt8* pGUID );
280 
281  virtual ~XclExpChTrInfo() override;
282 
283  virtual sal_uInt16 GetNum() const override;
284  virtual std::size_t GetLen() const override;
285 };
286 
287 // XclExpChTrTabIdBuffer - buffer for tab id's
288 
290 {
291 private:
292  std::unique_ptr<sal_uInt16[]>
294  sal_uInt16* pLast;
295  sal_uInt16 nBufSize;
296  sal_uInt16 nLastId;
297 
298 public:
299  XclExpChTrTabIdBuffer( sal_uInt16 nCount );
302 
303  void InitFill( sal_uInt16 nIndex );
304  void InitFillup();
305 
306  sal_uInt16 GetId( sal_uInt16 nIndex ) const;
307  void Remove();
308 
309  sal_uInt16 GetBufferCount() const
310  { return static_cast< sal_uInt16 >( (pLast - pBuffer.get()) + 1 ); }
311  void GetBufferCopy( sal_uInt16* pDest ) const
312  { memcpy( pDest, pBuffer.get(), sizeof(sal_uInt16) * GetBufferCount() ); }
313 };
314 
315 // XclExpChTrTabId - tab id record
316 
318 {
319 private:
320  std::unique_ptr<sal_uInt16[]> pBuffer;
321  sal_uInt16 nTabCount;
322 
323  void Clear() { pBuffer.reset(); }
324 
325  virtual void SaveCont( XclExpStream& rStrm ) override;
326 
327 public:
328  XclExpChTrTabId( sal_uInt16 nCount ) : nTabCount( nCount ) {}
329  XclExpChTrTabId( const XclExpChTrTabIdBuffer& rBuffer );
330  virtual ~XclExpChTrTabId() override;
331 
332  void Copy( const XclExpChTrTabIdBuffer& rBuffer );
333 
334  virtual sal_uInt16 GetNum() const override;
335  virtual std::size_t GetLen() const override;
336 };
337 
338 // XclExpChTrAction - base class for action records
339 
341 {
342 private:
343  OUString sUsername;
345  sal_uInt32 nIndex; // action number
346  std::unique_ptr<XclExpChTrAction>
347  pAddAction; // additional record for this action
348  bool bAccepted;
349 
350 protected:
351  const XclExpTabInfo& rTabInfo; // for table num export (sc num -> xcl num)
352  const XclExpChTrTabIdBuffer& rIdBuffer; // for table num export (xcl num -> tab id)
353  sal_uInt32 nLength; // this is not the record size
354  sal_uInt16 nOpCode; // EXC_CHTR_OP_***
356 
357  XclExpChTrAction( const XclExpChTrAction& rCopy );
358 
359  void SetAddAction( XclExpChTrAction* pAction );
361  const ScChangeAction& rAction,
362  const XclExpRoot& rRoot,
363  const ScChangeTrack& rChangeTrack );
364 
365  static inline void Write2DAddress( XclExpStream& rStrm, const ScAddress& rAddress );
366  static inline void Write2DRange( XclExpStream& rStrm, const ScRange& rRange );
367  inline sal_uInt16 GetTabId( SCTAB nTabId ) const;
368  inline void WriteTabId( XclExpStream& rStrm, SCTAB nTabId ) const;
369 
370  // save header data, call SaveActionData()
371  virtual void SaveCont( XclExpStream& rStrm ) override;
372  static std::size_t GetHeaderByteCount() { return 12; }
373 
374  // override to save action data without header, called by SaveCont()
375  virtual void SaveActionData( XclExpStream& rStrm ) const = 0;
376  // override to get action size without header, called by GetLen()
377  virtual std::size_t GetActionByteCount() const = 0;
378 
379  // do something before writing the record
380  virtual void PrepareSaveAction( XclExpStream& rStrm ) const;
381  // do something after writing the record
382  virtual void CompleteSaveAction( XclExpStream& rStrm ) const;
383 
384  bool GetAccepted() const { return bAccepted; }
385 
386 public:
388  const ScChangeAction& rAction,
389  const XclExpRoot& rRoot,
390  const XclExpChTrTabIdBuffer& rTabIdBuffer,
391  sal_uInt16 nNewOpCode = EXC_CHTR_OP_UNKNOWN );
392  virtual ~XclExpChTrAction() override;
393 
394  const OUString& GetUsername() const { return sUsername; }
395  const DateTime& GetDateTime() const { return aDateTime; }
396  const XclExpChTrTabIdBuffer& GetTabIdBuffer() const { return rIdBuffer; }
397  bool ForceInfoRecord() const { return bForceInfo; }
398 
399  // set own index & return new index
400  // could override to use more indexes per action
401  void SetIndex( sal_uInt32& rIndex );
402 
403  virtual void Save( XclExpStream& rStrm ) override;
404  virtual std::size_t GetLen() const override;
405 
407  sal_uInt32 GetActionNumber() const { return nIndex; }
408 };
409 
410 inline void XclExpChTrAction::Write2DAddress( XclExpStream& rStrm, const ScAddress& rAddress )
411 {
412  rStrm << static_cast<sal_uInt16>(rAddress.Row())
413  << static_cast<sal_uInt16>(rAddress.Col());
414 }
415 
416 inline void XclExpChTrAction::Write2DRange( XclExpStream& rStrm, const ScRange& rRange )
417 {
418  rStrm << static_cast<sal_uInt16>(rRange.aStart.Row())
419  << static_cast<sal_uInt16>(rRange.aEnd.Row())
420  << static_cast<sal_uInt16>(rRange.aStart.Col())
421  << static_cast<sal_uInt16>(rRange.aEnd.Col());
422 }
423 
424 inline sal_uInt16 XclExpChTrAction::GetTabId( SCTAB nTab ) const
425 {
426  return rIdBuffer.GetId( rTabInfo.GetXclTab( nTab ) );
427 }
428 
429 inline void XclExpChTrAction::WriteTabId( XclExpStream& rStrm, SCTAB nTab ) const
430 {
431  rStrm << GetTabId( nTab );
432 }
433 
434 // XclExpChTrData - cell content itself
435 
437 {
438  std::unique_ptr<XclExpString> pString;
443  double fValue;
444  sal_Int32 nRKValue;
445  sal_uInt16 nType;
446  std::size_t nSize;
447 
448  XclExpChTrData();
449  ~XclExpChTrData();
450  void Clear();
451 
452  void WriteFormula(
453  XclExpStream& rStrm,
454  const XclExpChTrTabIdBuffer& rTabIdBuffer );
455  void Write(
456  XclExpStream& rStrm,
457  const XclExpChTrTabIdBuffer& rTabIdBuffer );
458 };
459 
460 // XclExpChTrCellContent - changed cell content
461 
462 class XclExpChTrCellContent final : public XclExpChTrAction, protected XclExpRoot
463 {
464  std::unique_ptr<XclExpChTrData> pOldData;
465  std::unique_ptr<XclExpChTrData> pNewData;
466  sal_uInt16 nOldLength; // this is not the record size
468 
469  static void MakeEmptyChTrData( std::unique_ptr<XclExpChTrData>& rpData );
470 
471  void GetCellData(
472  const XclExpRoot& rRoot, const ScCellValue& rScCell, std::unique_ptr<XclExpChTrData>& rpData,
473  sal_uInt32& rXclLength1, sal_uInt16& rXclLength2 );
474 
475  virtual void SaveActionData( XclExpStream& rStrm ) const override;
476 
477 public:
479  const ScChangeActionContent& rAction,
480  const XclExpRoot& rRoot,
481  const XclExpChTrTabIdBuffer& rTabIdBuffer );
482  virtual ~XclExpChTrCellContent() override;
483 
484  virtual sal_uInt16 GetNum() const override;
485  virtual std::size_t GetActionByteCount() const override;
486 
487  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
488 };
489 
490 // XclExpChTrInsert - insert/delete columns/rows
491 
493 {
495 
496 protected:
498 
499  XclExpChTrInsert( const XclExpChTrInsert& rCopy );
500 
501  virtual void SaveActionData( XclExpStream& rStrm ) const override;
502  virtual void PrepareSaveAction( XclExpStream& rStrm ) const override;
503  virtual void CompleteSaveAction( XclExpStream& rStrm ) const override;
504 
505 public:
507  const ScChangeAction& rAction,
508  const XclExpRoot& rRoot,
509  const XclExpChTrTabIdBuffer& rTabIdBuffer,
510  const ScChangeTrack& rChangeTrack );
511  virtual ~XclExpChTrInsert() override;
512 
513  virtual sal_uInt16 GetNum() const override;
514  virtual std::size_t GetActionByteCount() const override;
515 
516  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
517 };
518 
519 // XclExpChTrInsertTab - insert table
520 
522 {
523 private:
525 
526 protected:
527  virtual void SaveActionData( XclExpStream& rStrm ) const override;
528 
529 public:
531  const ScChangeAction& rAction,
532  const XclExpRoot& rRoot,
533  const XclExpChTrTabIdBuffer& rTabIdBuffer );
534  virtual ~XclExpChTrInsertTab() override;
535 
536  virtual sal_uInt16 GetNum() const override;
537  virtual std::size_t GetActionByteCount() const override;
538 
539  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
540 };
541 
542 // XclExpChTrMoveRange - move cell range
543 
545 {
548 
549  virtual void SaveActionData( XclExpStream& rStrm ) const override;
550  virtual void PrepareSaveAction( XclExpStream& rStrm ) const override;
551  virtual void CompleteSaveAction( XclExpStream& rStrm ) const override;
552 
553 public:
555  const ScChangeActionMove& rAction,
556  const XclExpRoot& rRoot,
557  const XclExpChTrTabIdBuffer& rTabIdBuffer,
558  const ScChangeTrack& rChangeTrack );
559  virtual ~XclExpChTrMoveRange() override;
560 
561  virtual sal_uInt16 GetNum() const override;
562  virtual std::size_t GetActionByteCount() const override;
563 
564  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
565 };
566 
567 // XclExpChTr0x019A - additional data for delete action
568 
570 {
571 protected:
572  virtual void SaveActionData( XclExpStream& rStrm ) const override;
573 
574 public:
575  XclExpChTr0x014A( const XclExpChTrInsert& rAction );
576  virtual ~XclExpChTr0x014A() override;
577 
578  virtual sal_uInt16 GetNum() const override;
579  virtual std::size_t GetActionByteCount() const override;
580 
581  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
582 };
583 
584 // XclExpChangeTrack - exports the "Revision Log" stream
585 
586 class XclExpChangeTrack : protected XclExpRoot
587 {
588  typedef std::vector<std::unique_ptr<ExcRecord>> RecListType;
589  RecListType maRecList; // list of "Revision Log" stream records
590  std::stack<XclExpChTrAction*> aActionStack;
592  std::vector<std::unique_ptr<XclExpChTrTabIdBuffer>>
594 
595  ScDocumentUniquePtr xTempDoc; // empty document
596 
598  void PushActionRecord( const ScChangeAction& rAction );
599 
600  bool WriteUserNamesStream();
601 
602 public:
603  XclExpChangeTrack( const XclExpRoot& rRoot );
604  virtual ~XclExpChangeTrack() override;
605 
606  void Write();
607  void WriteXml( XclExpXmlStream& rStrm );
608 };
609 
610 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void AppendAction(std::unique_ptr< XclExpChTrAction > pAction)
void AddDependentContents(const ScChangeAction &rAction, const XclExpRoot &rRoot, const ScChangeTrack &rChangeTrack)
virtual std::size_t GetActionByteCount() const override
This class stores an unformatted or formatted string for Excel export.
Definition: xestring.hxx:47
virtual std::size_t GetActionByteCount() const override
sal_uInt16 GetTabId(SCTAB nTabId) const
void SetGUID(const sal_uInt8 *pGUID)
virtual ~XclExpChTrTabId() override
std::unique_ptr< XclExpChTrData > pOldData
virtual void SaveActionData(XclExpStream &rStrm) const override
virtual std::size_t GetLen() const override
virtual ~XclExpChTrInsert() override
ScAddress aStart
Definition: address.hxx:499
virtual sal_uInt16 GetNum() const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual sal_uInt16 GetNum() const override
std::unique_ptr< sal_uInt16[]> pBuffer
virtual std::size_t GetLen() const override
virtual ~XclExpChTrEmpty() override
virtual void SaveXml(XclExpXmlStream &rStrm) override
This class is used to export Excel record streams.
Definition: xestream.hxx:72
SCROW Row() const
Definition: address.hxx:261
virtual void SaveCont(XclExpStream &rStrm) override
virtual void SaveCont(XclExpStream &rStrm) override
void WriteFormula(XclExpStream &rStrm, const XclExpChTrTabIdBuffer &rTabIdBuffer)
XclExpChTrCellContent(const ScChangeActionContent &rAction, const XclExpRoot &rRoot, const XclExpChTrTabIdBuffer &rTabIdBuffer)
XclExpChTrEmpty(sal_uInt16 nNum)
virtual std::size_t GetLen() const override
XclExpChTrAction * GetAddAction()
virtual std::size_t GetActionByteCount() const override
virtual void SaveActionData(XclExpStream &rStrm) const override
virtual sal_uInt16 GetNum() const override
virtual std::size_t GetLen() const override
virtual sal_uInt16 GetNum() const override
virtual void SaveCont(XclExpStream &rStrm) override
const_iterator cbegin()
XclExpChTrTabIdBuffer * pTabIdBuffer
virtual ~XclExpChTrHeader() override
virtual void CompleteSaveAction(XclExpStream &rStrm) const override
void GetCellData(const XclExpRoot &rRoot, const ScCellValue &rScCell, std::unique_ptr< XclExpChTrData > &rpData, sal_uInt32 &rXclLength1, sal_uInt16 &rXclLength2)
std::unique_ptr< sal_uInt16[]> pBuffer
virtual void SaveCont(XclExpStream &rStrm) override
virtual sal_uInt16 GetNum() const override
void InitFill(sal_uInt16 nIndex)
ScAddress aEnd
Definition: address.hxx:500
virtual sal_uInt16 GetNum() const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual sal_uInt16 GetNum() const override
virtual void SaveActionData(XclExpStream &rStrm) const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual std::size_t GetLen() const override
XclExpXmlChTrHeader(const OUString &rUserName, const DateTime &rDateTime, const sal_uInt8 *pGUID, sal_Int32 nLogNumber, const XclExpChTrTabIdBuffer &rBuf)
XclExpRefLog maRefLog
XclExpUserBViewList(const ScChangeTrack &rChangeTrack)
virtual ~XclExpUserBViewList() override
static void Write2DAddress(XclExpStream &rStrm, const ScAddress &rAddress)
void SetGUID(const sal_uInt8 *pGUID)
XclExpChTr0x014A(const XclExpChTrInsert &rAction)
virtual std::size_t GetLen() const override
std::vector< std::unique_ptr< XclExpChTrTabIdBuffer > > maBuffers
Store arbitrary cell value of any kind.
Definition: cellvalue.hxx:35
const XclExpChTrTabIdBuffer & rIdBuffer
virtual ~XclExpChangeTrack() override
Access to global data from other classes.
Definition: xeroot.hxx:112
virtual void SaveCont(XclExpStream &rStrm) override
XclExpChTrTabId(sal_uInt16 nCount)
virtual sal_uInt16 GetNum() const override
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
ScDocumentUniquePtr xTempDoc
std::unique_ptr< XclExpChTrAction > pAddAction
sal_uInt16 GetBufferCount() const
XclExpUsersViewBegin(const sal_uInt8 *pGUID, sal_uInt32 nTab)
std::stack< XclExpChTrAction * > aActionStack
virtual void SaveXml(XclExpXmlStream &rStrm) override
virtual ~XclExpChTr0x014A() override
virtual void SaveXml(XclExpXmlStream &rStrm) override
std::vector< std::unique_ptr< XclExpChTrAction > > maActions
XclExpChTrInfo(const OUString &rUsername, const DateTime &rDateTime, const sal_uInt8 *pGUID)
static void Write2DRange(XclExpStream &rStrm, const ScRange &rRange)
virtual void CompleteSaveAction(XclExpStream &rStrm) const
virtual sal_uInt16 GetNum() const override
virtual std::size_t GetLen() const override
bool GetAccepted() const
virtual void SaveCont(XclExpStream &rStrm) override
const XclExpChTrTabIdBuffer & GetTabIdBuffer() const
virtual ~XclExpChTrAction() override
virtual std::size_t GetLen() const override
const OUString & GetUsername() const
virtual std::size_t GetLen() const override
virtual void SaveActionData(XclExpStream &rStrm) const =0
sal_uInt16 GetXclTab(SCTAB nScTab) const
Returns the Excel sheet index for a given Calc sheet.
Definition: xelink.cxx:813
virtual sal_uInt16 GetNum() const override
void WriteXml(XclExpXmlStream &rStrm)
void GetBufferCopy(sal_uInt16 *pDest) const
virtual void SaveActionData(XclExpStream &rStrm) const override
virtual ~XclExpChTr0x0194() override
void SetAddAction(XclExpChTrAction *pAction)
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2622
XclExpString sUsername
virtual std::size_t GetLen() const override
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
virtual void SaveActionData(XclExpStream &rStrm) const override
void Write(XclExpStream &rStrm, const XclExpChTrTabIdBuffer &rTabIdBuffer)
virtual void PrepareSaveAction(XclExpStream &rStrm) const override
virtual sal_uInt16 GetNum() const override
virtual sal_uInt16 GetNum() const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual void SaveXml(XclExpXmlStream &rStrm) override
Stores the correct Excel sheet index for each Calc sheet.
Definition: xelink.hxx:61
::std::vector< XclExpRefLogEntry > XclExpRefLog
Vector containing a log for all external references in a formula, used i.e.
Definition: xeformula.hxx:43
virtual std::size_t GetActionByteCount() const override
virtual void CompleteSaveAction(XclExpStream &rStrm) const override
virtual void SaveXml(XclExpXmlStream &rStrm) override
virtual std::size_t GetLen() const override
sal_uInt8 aGUID[16]
ScChangeTrack * CreateTempChangeTrack()
virtual sal_uInt16 GetNum() const override
XclExpChTrMoveRange(const ScChangeActionMove &rAction, const XclExpRoot &rRoot, const XclExpChTrTabIdBuffer &rTabIdBuffer, const ScChangeTrack &rChangeTrack)
std::shared_ptr< XclTokenArray > XclTokenArrayRef
Definition: xlformula.hxx:416
virtual sal_uInt16 GetNum() const override
sal_uInt16 GetId(sal_uInt16 nIndex) const
void PushActionRecord(const ScChangeAction &rAction)
SCCOL Col() const
Definition: address.hxx:266
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
XclExpChTrInsertTab(const ScChangeAction &rAction, const XclExpRoot &rRoot, const XclExpChTrTabIdBuffer &rTabIdBuffer)
void SetIndex(sal_uInt32 &rIndex)
void WriteTabId(XclExpStream &rStrm, SCTAB nTabId) const
virtual void SaveXml(XclExpXmlStream &rStrm) override
XclExpChTrInsert(const XclExpChTrInsert &rCopy)
XclExpStringRef mpFormattedString
XclExpChangeTrack(const XclExpRoot &rRoot)
XclExpChTrTabIdBuffer(sal_uInt16 nCount)
virtual sal_uInt16 GetNum() const override
virtual std::size_t GetLen() const override
static void MakeEmptyChTrData(std::unique_ptr< XclExpChTrData > &rpData)
XclExpChTrAction(const XclExpChTrAction &rCopy)
unsigned char sal_uInt8
const_iterator cend()
sal_uInt32 GetActionNumber() const
virtual void SaveXml(XclExpXmlStream &rStrm) override
std::vector< XclExpUserBView > aViews
sal_uInt8 aGUID[16]
XclExpUserBView(const OUString &rUsername, const sal_uInt8 *pGUID)
std::vector< sal_uInt16 > maTabBuffer
#define EXC_CHTR_OP_UNKNOWN
Definition: excdefs.hxx:75
virtual std::size_t GetLen() const override
virtual void SaveCont(XclExpStream &rStrm) override
XclExpString sUsername
virtual void SaveCont(XclExpStream &rStrm) override
virtual ~XclExpChTrCellContent() override
bool ForceInfoRecord() const
static std::size_t GetHeaderByteCount()
virtual std::size_t GetActionByteCount() const =0
virtual void SaveCont(XclExpStream &rStrm) override
const ScFormulaCell * mpFormulaCell
std::unique_ptr< XclExpChTrData > pNewData
std::unique_ptr< XclExpString > pString
std::vector< XclExpUserBView >::const_iterator const_iterator
XclExpChTr0x0194(const ScChangeTrack &rChangeTrack)
virtual sal_uInt16 GetNum() const override
XclTokenArrayRef mxTokArr
std::vector< std::unique_ptr< ExcRecord > > RecListType
std::shared_ptr< XclExpString > XclExpStringRef
Definition: xeroot.hxx:35
virtual ~XclExpChTr0x0195() override
void SetCount(sal_uInt32 nNew)
virtual sal_uInt16 GetNum() const override
const sal_uInt8 * GetGUID() const
virtual sal_uInt16 GetNum() const override
virtual ~XclExpChTrInfo() override
virtual std::size_t GetLen() const override
void Copy(const XclExpChTrTabIdBuffer &rBuffer)
void SvStream & rStrm
virtual std::size_t GetLen() const override
virtual ~XclExpChTrMoveRange() override
virtual ~XclExpChTrInsertTab() override
virtual void PrepareSaveAction(XclExpStream &rStrm) const
virtual std::size_t GetActionByteCount() const override
const DateTime & GetDateTime() const
virtual void PrepareSaveAction(XclExpStream &rStrm) const override
sal_Int16 SCTAB
Definition: types.hxx:22
const XclExpTabInfo & rTabInfo
virtual sal_uInt16 GetNum() const override
virtual void SaveXml(XclExpXmlStream &rStrm) override