30#include <document.hxx>
36#include <oox/token/namespaces.hxx>
37#include <oox/token/tokens.hxx>
46 snprintf( sBuf,
sizeof( sBuf ),
47 "%d-%02d-%02dT%02d:%02d:%02d.%09" SAL_PRIuUINT32
"Z",
58 rStrm.SetSliceSize( 7 );
59 rStrm << static_cast<sal_uInt16>(rDateTime.
GetYear())
65 rStrm.SetSliceSize( 0 );
73 OSL_ENSURE(
nLength >= nStrBytes,
"lcl_WriteFixedString - String too long" );
74 if( rString.
Len() > 0 )
82 rtl_createUuid( pGUID, rValidGUID ? pGUID :
nullptr,
false );
88 rStrm.SetSliceSize( 16 );
91 rStrm.SetSliceSize( 0 );
95 sUsername( rUsername )
97 memcpy(
aGUID, pGUID, 16 );
102 rStrm << sal_uInt32(0xFF078014)
103 << sal_uInt32(0x00000001);
105 rStrm.WriteZeroBytes( 8 );
106 rStrm << sal_uInt32(1200)
109 << sal_uInt16(0x0CF7)
110 << sal_uInt16(0x0000)
111 << sal_uInt16(0x0001)
112 << sal_uInt16(0x0000);
130 bool bValidGUID =
false;
132 aViews.reserve(rStrColl.size());
133 for (
const auto& rStr : rStrColl)
136 aViews.emplace_back( rStr, aGUID );
153 memcpy(
aGUID, pGUID, 16 );
163 << sal_uInt32(0x0000003C)
186 rStrm << sal_uInt16(0x0001);
201 rStrm << sal_uInt16(0x0000);
216 rStrm << sal_uInt16(0x0006)
217 << sal_uInt16(0x0000);
232 rStrm << sal_uInt16( 0x0022 );
233 rStrm.WriteZeroBytes( 510 );
248 rStrm << sal_uInt16(0x0000);
281 rStrm.WriteZeroBytes( 162 );
300 rStrm << sal_uInt32(0);
322 rStrm << sal_uInt16(0x0006)
323 << sal_uInt16(0x0000)
324 << sal_uInt16(0x000D);
328 << sal_uInt16(0x0001)
329 << sal_uInt32(0x00000000)
330 << sal_uInt16(0x001E);
349 XML_lastGuid,
nullptr,
351 XML_diskRevisions,
nullptr,
352 XML_history,
nullptr,
353 XML_trackRevisions,
nullptr,
354 XML_exclusive,
nullptr,
355 XML_revisionId,
nullptr,
356 XML_version,
nullptr,
357 XML_keepChangeHistory,
nullptr,
358 XML_protected,
nullptr,
359 XML_preserveHistory,
nullptr);
360 pHeaders->write(
">" );
365 memcpy(
maGUID, pGUID, 16);
372 pHeaders->write(
"<")->writeId(XML_headers);
375 rStrm.WriteAttributes(
376 XML_xmlns,
rStrm.getNamespaceURL(OOX_NS(xls)),
377 FSNS(XML_xmlns, XML_r),
rStrm.getNamespaceURL(OOX_NS(officeRel)),
379 XML_lastGuid,
nullptr,
381 XML_diskRevisions,
nullptr,
382 XML_history,
nullptr,
383 XML_trackRevisions,
nullptr,
384 XML_exclusive,
nullptr,
385 XML_revisionId,
nullptr,
386 XML_version,
nullptr,
387 XML_keepChangeHistory,
nullptr,
388 XML_protected,
nullptr,
389 XML_preserveHistory,
nullptr);
391 pHeaders->write(
">");
398 mnMinAction(0), mnMaxAction(0)
400 memcpy(
maGUID, pGUID, 16);
412 pHeader->write(
"<")->writeId(XML_header);
418 rStrm.GetCurrentStream()->getOutputStream(),
419 "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml",
424 rStrm.WriteAttributes(
428 FSNS(XML_r, XML_id), aRelId);
438 rStrm.WriteAttributes(XML_maxSheetId, OUString::number(
maTabBuffer.back()+1));
446 pHeader->startElement(XML_sheetIdMap, XML_count, OString::number(
n));
448 for (
size_t i = 0;
i <
n; ++
i)
450 pHeader->singleElement(XML_sheetId, XML_val, OString::number(
maTabBuffer[
i]));
452 pHeader->endElement(XML_sheetIdMap);
457 rStrm.PushStream(pRevLogStrm);
459 pRevLogStrm->write(
"<")->writeId(XML_revisions);
461 rStrm.WriteAttributes(
462 XML_xmlns,
rStrm.getNamespaceURL(OOX_NS(xls)),
463 FSNS(XML_xmlns, XML_r),
rStrm.getNamespaceURL(OOX_NS(officeRel)));
465 pRevLogStrm->write(
">");
469 rxAction->SaveXml(
rStrm);
472 pRevLogStrm->write(
"</")->writeId(XML_revisions)->write(
">");
476 pHeader->write(
"</")->writeId(XML_header)->write(
">");
481 sal_uInt32 nActionNum = pAction->GetActionNumber();
492 sUsername( rUsername ),
493 aDateTime( rDateTime )
495 memcpy(
aGUID, pGUID, 16 );
504 rStrm << sal_uInt32(0xFFFFFFFF)
505 << sal_uInt32(0x00000000)
506 << sal_uInt32(0x00000020)
507 << sal_uInt16(0xFFFF);
509 rStrm << sal_uInt16(0x04B0);
513 << sal_uInt16(0x0002);
536 nBufSize( rCopy.nBufSize ),
537 nLastId( rCopy.nLastId )
550 OSL_ENSURE(
nIndex <
nLastId,
"XclExpChTrTabIdBuffer::Insert - out of range" );
552 sal_uInt16 nFreeCount = 0;
553 for( sal_uInt16* pElem =
pBuffer.get(); pElem <=
pLast; pElem++ )
567 sal_uInt16 nFreeCount = 1;
568 for( sal_uInt16* pElem =
pBuffer.get(); pElem <=
pLast; pElem++ )
570 *pElem = nFreeCount++;
576 assert(
nIndex <
nBufSize &&
"XclExpChTrTabIdBuffer::GetId - out of range");
587 OSL_ENSURE(
pBuffer.get() <=
pLast,
"XclExpChTrTabIdBuffer::Remove - buffer empty" );
588 sal_uInt16* pElem =
pBuffer.get();
591 while( pElem <
pLast )
593 *pElem = *(pElem + 1);
601 : nTabCount( rBuffer.GetBufferCount() )
622 rStrm.EnableEncryption();
643 sUsername( rCopy.sUsername ),
644 aDateTime( rCopy.aDateTime ),
646 bAccepted( rCopy.bAccepted ),
647 rTabInfo( rCopy.rTabInfo ),
648 rIdBuffer( rCopy.rIdBuffer ),
650 nOpCode( rCopy.nOpCode ),
651 bForceInfo( rCopy.bForceInfo )
659 sal_uInt16 nNewOpCode ) :
660 sUsername( rAction.GetUser() ),
663 bAccepted( rAction.IsAccepted() ),
664 rTabInfo( rRoot.GetTabInfo() ),
665 rIdBuffer( rTabIdBuffer ),
667 nOpCode( nNewOpCode ),
694 for(
const auto& rEntry : aActionMap )
727 SAL_WARN(
"sc",
"XclExpChTrAction : unable to export position with tab of EXC_TAB_DELETED");
743 mpFormulaCell( nullptr ),
770 OSL_ENSURE(
mxTokArr && !
mxTokArr->Empty(),
"XclExpChTrData::Write - no formula" );
773 for(
const auto& rLogEntry :
maRefLog )
775 if( rLogEntry.mpUrl && rLogEntry.mpFirstTab )
781 bool bSingleTab = rLogEntry.mnFirstXclTab == rLogEntry.mnLastXclTab;
782 rStrm.SetSliceSize( bSingleTab ? 6 : 8 );
784 rStrm << rTabIdBuffer.
GetId( rLogEntry.mnFirstXclTab );
791 rStrm.SetSliceSize( 0 );
806 OSL_ENSURE(
pString,
"XclExpChTrData::Write - no string" );
825 for(
const auto& rLogEntry :
maRefLog )
827 if (rLogEntry.mpUrl && rLogEntry.mpFirstTab)
831 bool bSingleTab = rLogEntry.mnFirstXclTab == rLogEntry.mnLastXclTab;
846 aPosition( rAction.GetBigRange().MakeRange( rRoot.GetDoc()).aStart )
870 std::unique_ptr<XclExpChTrData>& rpData, sal_uInt32& rXclLength1, sal_uInt16& rXclLength2 )
873 rXclLength1 = 0x0000003A;
874 rXclLength2 = 0x0000;
891 rXclLength1 = 0x0000003E;
892 rXclLength2 = 0x0004;
898 rXclLength1 = 0x00000042;
899 rXclLength2 = 0x0008;
911 rRoot, sCellStr,
nullptr);
920 rRoot, *rScCell.
getEditText(),
nullptr, aLinkHelper);
925 rRoot, OUString(),
nullptr);
930 rpData->nSize = 3 + rpData->pString->GetSize();
931 rXclLength1 = 64 + (sCellStr.getLength() << 1);
932 rXclLength2 = 6 +
static_cast<sal_uInt16
>(sCellStr.getLength() << 1);
938 rpData->mpFormulaCell = pFmlCell;
947 std::size_t nSize = std::accumulate(rRefLog.begin(), rRefLog.end(),
948 static_cast<std::size_t
>(rpData->mxTokArr->GetSize() + 3),
950 if( rLogEntry.mpUrl && rLogEntry.mpFirstTab )
951 return rSum + rLogEntry.mpUrl->GetSize() + rLogEntry.mpFirstTab->GetSize() + 2;
953 return rSum + ((rLogEntry.mnFirstXclTab == rLogEntry.mnLastXclTab) ? 6 : 8);
955 rpData->nSize = ::std::min< std::size_t >( nSize, 0xFFFF );
956 rXclLength1 = 0x00000052;
957 rXclLength2 = 0x0018;
978 << sal_uInt16(0x0000);
981 << sal_uInt32(0x00000000);
995 std::size_t nLen = 16;
1005 switch(
pData->nType )
1031 pStream->startElement(nElement,
1038 switch(
pData->nType )
1042 pStream->startElement(XML_v);
1043 pStream->write(
pData->fValue );
1044 pStream->endElement( XML_v );
1047 pStream->startElement( XML_f
1051 rStrm.GetRoot().GetCompileFormulaContext(),
1052 pData->mpFormulaCell->aPos,
pData->mpFormulaCell->GetCode()));
1053 pStream->endElement( XML_f );
1056 pStream->startElement(XML_is);
1057 if(
pData->mpFormattedString )
1061 pStream->endElement( XML_is );
1067 pStream->endElement( nElement );
1075 SAL_WARN(
"sc",
"XclExpChTrCellContent: unable to export position with tab of EXC_TAB_DELETED");
1080 pStream->startElement( XML_rcc,
1089 XML_numFmtId,
nullptr,
1090 XML_quotePrefix,
nullptr,
1091 XML_oldQuotePrefix,
nullptr,
1094 XML_endOfListFormulaUpdate,
nullptr);
1108 pStream->endElement( XML_rcc );
1113 mbEndOfList(rCopy.mbEndOfList),
1114 aRange(rCopy.aRange) {}
1123 aRange( rAction.GetBigRange().MakeRange( rRoot.GetDoc()) )
1139 OSL_FAIL(
"XclExpChTrInsert::XclExpChTrInsert - unknown action" );
1172 sal_uInt16 nFlagVal =
mbEndOfList ? 0x0001 : 0x0000;
1175 rStrm << sal_uInt32(0x00000000);
1208 default:
return "*unknown*";
1217 SAL_WARN(
"sc",
"XclExpChTrCellContent: unable to export position with tab of EXC_TAB_DELETED");
1222 pStream->startElement( XML_rrc,
1234 while( pAction !=
nullptr )
1236 pAction->
SaveXml( rRevisionLogStrm );
1239 pStream->endElement( XML_rrc );
1248 nTab( static_cast<
SCTAB>(rAction.GetBigRange().aStart.
Tab()) )
1266 rStrm << sal_uInt32( 0 );
1269 rStrm.WriteZeroBytes( 133 );
1285 pStream->singleElement( XML_ris,
1291 XML_sheetPosition, OString::number(
nTab) );
1300 aDestRange( rAction.GetBigRange().MakeRange( rRoot.GetDoc() ) )
1304 sal_Int32 nDCols, nDRows, nDTabs;
1305 rAction.
GetDelta( nDCols, nDRows, nDTabs );
1331 rStrm << sal_uInt32(0x00000000);
1359 SAL_WARN(
"sc",
"XclExpChTrCellContent: unable to export position with tab of EXC_TAB_DELETED");
1365 pStream->startElement( XML_rm,
1375 while( pAction !=
nullptr )
1377 pAction->
SaveXml( rRevisionLogStrm );
1380 pStream->endElement( XML_rm );
1397 rStrm << sal_uInt16(0x0003)
1398 << sal_uInt16(0x0001);
1416 pStream->startElement( XML_rfmt,
1422 XML_length,
nullptr);
1425 pStream->endElement( XML_rfmt );
1447 sal_Int32 mnElement;
1449 explicit EndXmlElement( sal_Int32 nElement ) : mnElement( nElement) {}
1458 pStream->write(
"</")->writeId(mnElement)->write(
">");
1463 pTabIdBuffer( nullptr )
1465 OSL_ENSURE(
GetOldRoot().pTabId,
"XclExpChangeTrack::XclExpChangeTrack - root data incomplete" );
1470 if (!pTempChangeTrack)
1478 for( pScAction = pTempChangeTrack->
GetLast(); pScAction; pScAction = pScAction->
GetPrev() )
1490 pScAction = pTempChangeTrack->
GetLast();
1495 pScAction = pPrevAction;
1502 maRecList.push_back( std::unique_ptr<ExcRecord>(pHeader) );
1506 OUString sLastUsername;
1510 bool bValidGUID =
false;
1529 maRecList.push_back( std::unique_ptr<ExcRecord>(pAction) );
1539 maRecList.push_back( std::unique_ptr<ExcRecord>(pHeaders));
1541 OUString sLastUsername;
1544 sal_Int32 nLogNumber = 1;
1547 bool bValidGUID =
false;
1563 maRecList.push_back( std::unique_ptr<ExcRecord>(pCurHeader));
1568 pCurHeader->
AppendAction(std::unique_ptr<XclExpChTrAction>(pAction));
1572 maRecList.push_back( std::unique_ptr<ExcRecord>(
new EndXmlElement(XML_headers)));
1589 OSL_ENSURE( pOrigChangeTrack,
"XclExpChangeTrack::CreateTempChangeTrack - no change track data" );
1590 if( !pOrigChangeTrack )
1602 xTempDoc->CreateValidTabName(sTabName);
1605 OSL_ENSURE(nOrigCount ==
xTempDoc->GetTableCount(),
1606 "XclExpChangeTrack::CreateTempChangeTrack - table count mismatch");
1607 if(nOrigCount !=
xTempDoc->GetTableCount())
1626 if (pTempChangeTrack)
1634 maBuffers.push_back( std::unique_ptr<XclExpChTrTabIdBuffer>(pNewBuffer) );
1639 if (pTempChangeTrack)
1652 OSL_ENSURE( xSvStrm.
is(),
"XclExpChangeTrack::WriteUserNamesStream - no stream" );
1675 OSL_ENSURE( xSvStrm.
is(),
"XclExpChangeTrack::Write - no stream" );
1681 rxRec->Save(aXclStrm);
1690 "xl/revisions/userNames.xml",
1691 u"revisions/userNames.xml",
1693 "application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml",
1695 pUserNames->startElement( XML_users,
1702 pUserNames->endElement( XML_users );
1713 "xl/revisions/revisionHeaders.xml",
1714 u"revisions/revisionHeaders.xml",
1716 "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml",
1721 rWorkbookStrm.
PushStream( pRevisionHeaders );
1724 rxRec->SaveXml(rWorkbookStrm);
static void lcl_WriteCell(XclExpXmlStream &rStrm, sal_Int32 nElement, const ScAddress &rPosition, XclExpChTrData *pData)
static void lcl_WriteFixedString(XclExpStream &rStrm, const XclExpString &rString, std::size_t nLength)
static bool lcl_IsDeletedTab(const XclExpChTrTabIdBuffer &rTabIdBuffer, sal_uInt16 nIndex)
static void lcl_WriteUserNamesXml(XclExpXmlStream &rWorkbookStrm)
static void lcl_WriteDateTime(XclExpStream &rStrm, const DateTime &rDateTime)
static OString lcl_DateTimeToOString(const DateTime &rDateTime)
static const char * lcl_GetAction(sal_uInt16 nOpCode)
static void lcl_WriteGUID(XclExpStream &rStrm, const sal_uInt8 *pGUID)
static const char * lcl_GetType(XclExpChTrData *pData)
static void lcl_GenerateGUID(sal_uInt8 *pGUID, bool &rValidGUID)
const SCTAB SC_TAB_APPEND
std::map< sal_uLong, ScChangeAction * > ScChangeActionMap
sal_Int16 GetYear() const
sal_uInt16 GetDay() const
sal_uInt16 GetMonth() const
virtual void SaveXml(XclExpXmlStream &rStrm) override
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
virtual sal_uInt16 GetNum() const override
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
virtual std::size_t GetLen() const override
void IncTab(SCTAB nDelta=1)
void IncCol(SCCOL nDelta=1)
void IncRow(SCROW nDelta=1)
const ScCellValue & GetNewCell() const
const ScCellValue & GetOldCell() const
SC_DLLPUBLIC bool IsEndOfList() const
SC_DLLPUBLIC void GetDelta(sal_Int32 &nDx, sal_Int32 &nDy, sal_Int32 &nDz) const
ScBigRange & GetBigRange()
ScChangeActionType GetType() const
ScChangeAction * GetPrev() const
const std::set< OUString > & GetUserCollection() const
ScChangeAction * GetLast() const
SC_DLLPUBLIC ScChangeTrack * Clone(ScDocument *pDocument) const
SC_DLLPUBLIC void GetDependents(ScChangeAction *, ScChangeActionMap &, bool bListMasterDelete=false, bool bAllFlat=false) const
ScChangeTrack * GetChangeTrack() const
SC_DLLPUBLIC SCTAB GetTableCount() const
static SC_DLLPUBLIC OUString GetString(const EditTextObject &rEditText, const ScDocument *pDoc)
Retrieves string with paragraphs delimited by new lines (' ').
virtual ~XclExpChTr0x014A() override
virtual void SaveActionData(XclExpStream &rStrm) const override
virtual std::size_t GetActionByteCount() const override
XclExpChTr0x014A(const XclExpChTrInsert &rAction)
virtual void SaveXml(XclExpXmlStream &rStrm) override
virtual sal_uInt16 GetNum() const override
virtual sal_uInt16 GetNum() const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual std::size_t GetLen() const override
virtual sal_uInt16 GetNum() const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual std::size_t GetLen() const override
virtual std::size_t GetLen() const override
virtual ~XclExpChTr0x0194() override
virtual sal_uInt16 GetNum() const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual std::size_t GetLen() const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual ~XclExpChTr0x0195() override
virtual sal_uInt16 GetNum() const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual sal_uInt16 GetNum() const override
virtual std::size_t GetLen() const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual std::size_t GetLen() const override
virtual sal_uInt16 GetNum() const override
virtual void PrepareSaveAction(XclExpStream &rStrm) const
bool ForceInfoRecord() const
virtual ~XclExpChTrAction() override
const OUString & GetUsername() const
void SetIndex(sal_uInt32 &rIndex)
const XclExpChTrTabIdBuffer & GetTabIdBuffer() const
std::unique_ptr< XclExpChTrAction > pAddAction
void WriteTabId(XclExpStream &rStrm, SCTAB nTabId) const
sal_uInt16 GetTabId(SCTAB nTabId) const
virtual void SaveActionData(XclExpStream &rStrm) const =0
virtual std::size_t GetActionByteCount() const =0
void AddDependentContents(const ScChangeAction &rAction, const XclExpRoot &rRoot, const ScChangeTrack &rChangeTrack)
virtual bool UsesDeletedTab() const =0
virtual std::size_t GetLen() const override
static std::size_t GetHeaderByteCount()
void SetAddAction(XclExpChTrAction *pAction)
XclExpChTrAction(const XclExpChTrAction &rCopy)
virtual void CompleteSaveAction(XclExpStream &rStrm) const
const XclExpChTrTabIdBuffer & rIdBuffer
virtual void SaveCont(XclExpStream &rStrm) override
static void Write2DRange(XclExpStream &rStrm, const ScRange &rRange)
sal_uInt32 GetActionNumber() const
bool IsDeletedTab(SCTAB nTab) const
const DateTime & GetDateTime() const
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
static void Write2DAddress(XclExpStream &rStrm, const ScAddress &rAddress)
XclExpChTrAction * GetAddAction()
void GetCellData(const XclExpRoot &rRoot, const ScCellValue &rScCell, std::unique_ptr< XclExpChTrData > &rpData, sal_uInt32 &rXclLength1, sal_uInt16 &rXclLength2)
std::unique_ptr< XclExpChTrData > pOldData
virtual ~XclExpChTrCellContent() override
virtual std::size_t GetActionByteCount() const override
virtual sal_uInt16 GetNum() const override
virtual void SaveActionData(XclExpStream &rStrm) const override
static void MakeEmptyChTrData(std::unique_ptr< XclExpChTrData > &rpData)
std::unique_ptr< XclExpChTrData > pNewData
XclExpChTrCellContent(const ScChangeActionContent &rAction, const XclExpRoot &rRoot, const XclExpChTrTabIdBuffer &rTabIdBuffer)
virtual bool UsesDeletedTab() const override
virtual void SaveXml(XclExpXmlStream &rStrm) override
virtual sal_uInt16 GetNum() const override
virtual std::size_t GetLen() const override
virtual ~XclExpChTrEmpty() override
virtual std::size_t GetLen() const override
virtual sal_uInt16 GetNum() const override
XclExpChTrInfo(const OUString &rUsername, const DateTime &rDateTime, const sal_uInt8 *pGUID)
virtual ~XclExpChTrInfo() override
virtual void SaveCont(XclExpStream &rStrm) override
virtual bool UsesDeletedTab() const override
virtual void SaveActionData(XclExpStream &rStrm) const override
virtual ~XclExpChTrInsertTab() override
virtual sal_uInt16 GetNum() const override
virtual std::size_t GetActionByteCount() const override
virtual void SaveXml(XclExpXmlStream &rStrm) override
XclExpChTrInsertTab(const ScChangeAction &rAction, const XclExpRoot &rRoot, const XclExpChTrTabIdBuffer &rTabIdBuffer)
virtual void SaveActionData(XclExpStream &rStrm) const override
virtual void SaveXml(XclExpXmlStream &rStrm) override
virtual bool UsesDeletedTab() const override
XclExpChTrInsert(const XclExpChTrInsert &rCopy)
virtual ~XclExpChTrInsert() override
virtual sal_uInt16 GetNum() const override
virtual void CompleteSaveAction(XclExpStream &rStrm) const override
virtual void PrepareSaveAction(XclExpStream &rStrm) const override
virtual std::size_t GetActionByteCount() const override
virtual std::size_t GetActionByteCount() const override
virtual sal_uInt16 GetNum() const override
virtual void PrepareSaveAction(XclExpStream &rStrm) const override
XclExpChTrMoveRange(const ScChangeActionMove &rAction, const XclExpRoot &rRoot, const XclExpChTrTabIdBuffer &rTabIdBuffer, const ScChangeTrack &rChangeTrack)
virtual void CompleteSaveAction(XclExpStream &rStrm) const override
virtual void SaveActionData(XclExpStream &rStrm) const override
virtual bool UsesDeletedTab() const override
virtual void SaveXml(XclExpXmlStream &rStrm) override
virtual ~XclExpChTrMoveRange() override
XclExpChTrTabIdBuffer(sal_uInt16 nCount)
bool HasId(sal_uInt16 nIndex) const
sal_uInt16 GetBufferCount() const
void InitFill(sal_uInt16 nIndex)
void GetBufferCopy(sal_uInt16 *pDest) const
sal_uInt16 GetId(sal_uInt16 nIndex) const
std::unique_ptr< sal_uInt16[]> pBuffer
virtual void SaveCont(XclExpStream &rStrm) override
virtual ~XclExpChTrTabId() override
virtual sal_uInt16 GetNum() const override
virtual std::size_t GetLen() const override
void Copy(const XclExpChTrTabIdBuffer &rBuffer)
std::unique_ptr< sal_uInt16[]> pBuffer
XclExpChTrTabId(sal_uInt16 nCount)
void PushActionRecord(const ScChangeAction &rAction)
XclExpChTrTabIdBuffer * pTabIdBuffer
virtual ~XclExpChangeTrack() override
std::stack< XclExpChTrAction * > aActionStack
void WriteXml(XclExpXmlStream &rStrm)
XclExpChangeTrack(const XclExpRoot &rRoot)
ScDocumentUniquePtr xTempDoc
std::vector< std::unique_ptr< XclExpChTrTabIdBuffer > > maBuffers
bool WriteUserNamesStream()
ScChangeTrack * CreateTempChangeTrack()
Helper to create HLINK records during creation of formatted cell strings.
Access to global data from other classes.
XclExpFormulaCompiler & GetFormulaCompiler() const
Returns the formula compiler to produce formula token arrays.
XclExpTabInfo & GetTabInfo() const
Returns the buffer for Calc->Excel sheet index conversion.
const XclExpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
This class is used to export Excel record streams.
static XclExpStringRef CreateCellString(const XclExpRoot &rRoot, const OUString &rString, const ScPatternAttr *pCellAttr, XclStrFlags nFlags=XclStrFlags::NONE, sal_uInt16 nMaxLen=EXC_STR_MAXLEN)
Creates a new formatted string from a Calc string cell.
This class stores an unformatted or formatted string for Excel export.
std::size_t GetSize() const
Returns the byte count the whole string will take on export.
std::size_t GetBufferSize() const
Returns the byte count the character buffer will take on export.
sal_uInt16 Len() const
Returns the character count of the string.
sal_uInt16 GetXclTab(SCTAB nScTab) const
Returns the Excel sheet index for a given Calc sheet.
virtual ~XclExpUserBViewList() override
XclExpUserBViewList(const ScChangeTrack &rChangeTrack)
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
std::vector< XclExpUserBView > aViews
XclExpUserBView(const OUString &rUsername, const sal_uInt8 *pGUID)
virtual std::size_t GetLen() const override
virtual sal_uInt16 GetNum() const override
virtual void SaveCont(XclExpStream &rStrm) override
XclExpUsersViewBegin(const sal_uInt8 *pGUID, sal_uInt32 nTab)
virtual void SaveCont(XclExpStream &rStrm) override
virtual sal_uInt16 GetNum() const override
virtual std::size_t GetLen() const override
virtual void SaveCont(XclExpStream &rStrm) override
virtual sal_uInt16 GetNum() const override
virtual std::size_t GetLen() const override
void WriteAttributes(sal_Int32 nAttribute, Str &&value, Args &&... rest)
sax_fastparser::FSHelperPtr & GetCurrentStream()
sax_fastparser::FSHelperPtr CreateOutputStream(const OUString &sFullStream, std::u16string_view sRelativeStream, const css::uno::Reference< css::io::XOutputStream > &xParentRelation, const char *sContentType, std::u16string_view sRelationshipType, OUString *pRelationshipId=nullptr)
void PushStream(sax_fastparser::FSHelperPtr const &aStream)
const XclExpRoot & GetRoot() const
Returns the filter root data.
XclOutput GetOutput() const
Returns the current output format of the importer/exporter.
tools::SvRef< SotStorageStream > OpenStream(tools::SvRef< SotStorage > const &xStrg, const OUString &rStrmName) const
Tries to open a new stream in the specified storage for reading or writing.
RootData & GetOldRoot() const
Returns old RootData struct.
const ScAddress & GetXclMaxPos() const
Returns the highest possible cell address in an Excel document (using current BIFF version).
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
static OString ToOString(const Color &rColor)
static void GetFormulaTypeAndValue(ScFormulaCell &rCell, const char *&sType, OUString &rValue)
static OUString ToOUString(const char *s)
static OUString GetStreamName(const char *sStreamDir, const char *sStream, sal_Int32 nId)
OUString getNamespaceURL(sal_Int32 nNSID) const
const OUString & getString() const
#define EXC_CHTR_TYPE_STRING
constexpr OUStringLiteral EXC_STREAM_REVLOG
constexpr OUStringLiteral EXC_STREAM_USERNAMES
#define EXC_CHTR_TYPE_DOUBLE
#define EXC_CHTR_OP_DELCOL
#define EXC_CHTR_OP_FORMAT
#define EXC_CHTR_OP_DELFLAG
#define EXC_CHTR_OP_DELROW
#define EXC_CHTR_OP_INSCOL
#define EXC_CHTR_TYPE_FORMULA
#define EXC_CHTR_OP_COLFLAG
#define EXC_CHTR_OP_INSROW
#define EXC_CHTR_TYPE_EMPTY
#define EXC_CHTR_OP_INSTAB
#define EXC_CHTR_OP_UNKNOWN
constexpr sal_Int32 FSNS(sal_Int32 namespc, sal_Int32 element)
#define SAL_WARN(area, stream)
std::unique_ptr< sal_Int32[]> pData
std::shared_ptr< FastSerializerHelper > FSHelperPtr
DateTime GetDateTime(const css::util::DateTime &_rDT)
#define CREATE_OFFICEDOC_RELATION_TYPE(ascii)
Store arbitrary cell value of any kind.
const svl::SharedString * getSharedString() const
ScFormulaCell * getFormula() const
EditTextObject * getEditText() const
XclTokenArrayRef mxTokArr
bool UsesDeletedTab(const XclExpChTrTabIdBuffer &rTabIdBuffer) const
void Write(XclExpStream &rStrm, const XclExpChTrTabIdBuffer &rTabIdBuffer)
std::unique_ptr< XclExpString > pString
void WriteFormula(XclExpStream &rStrm, const XclExpChTrTabIdBuffer &rTabIdBuffer)
const ScFormulaCell * mpFormulaCell
Log entry for external references in a formula, used i.e.
const sal_uInt16 EXC_MAXRECSIZE_BIFF8