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 OSL_ENSURE(
nIndex <
nBufSize,
"XclExpChTrTabIdBuffer::GetId - out of range" );
582 OSL_ENSURE(
pBuffer.get() <=
pLast,
"XclExpChTrTabIdBuffer::Remove - buffer empty" );
583 sal_uInt16* pElem =
pBuffer.get();
586 while( pElem <
pLast )
588 *pElem = *(pElem + 1);
596 : nTabCount( rBuffer.GetBufferCount() )
617 rStrm.EnableEncryption();
638 sUsername( rCopy.sUsername ),
639 aDateTime( rCopy.aDateTime ),
641 bAccepted( rCopy.bAccepted ),
642 rTabInfo( rCopy.rTabInfo ),
643 rIdBuffer( rCopy.rIdBuffer ),
645 nOpCode( rCopy.nOpCode ),
646 bForceInfo( rCopy.bForceInfo )
654 sal_uInt16 nNewOpCode ) :
655 sUsername( rAction.GetUser() ),
658 bAccepted( rAction.IsAccepted() ),
659 rTabInfo( rRoot.GetTabInfo() ),
660 rIdBuffer( rTabIdBuffer ),
662 nOpCode( nNewOpCode ),
689 for(
const auto& rEntry : aActionMap )
733 mpFormulaCell( nullptr ),
760 OSL_ENSURE(
mxTokArr && !
mxTokArr->Empty(),
"XclExpChTrData::Write - no formula" );
763 for(
const auto& rLogEntry :
maRefLog )
765 if( rLogEntry.mpUrl && rLogEntry.mpFirstTab )
771 bool bSingleTab = rLogEntry.mnFirstXclTab == rLogEntry.mnLastXclTab;
772 rStrm.SetSliceSize( bSingleTab ? 6 : 8 );
774 rStrm << rTabIdBuffer.
GetId( rLogEntry.mnFirstXclTab );
781 rStrm.SetSliceSize( 0 );
796 OSL_ENSURE(
pString,
"XclExpChTrData::Write - no string" );
811 aPosition( rAction.GetBigRange().MakeRange( rRoot.GetDoc()).aStart )
835 std::unique_ptr<XclExpChTrData>& rpData, sal_uInt32& rXclLength1, sal_uInt16& rXclLength2 )
838 rXclLength1 = 0x0000003A;
839 rXclLength2 = 0x0000;
856 rXclLength1 = 0x0000003E;
857 rXclLength2 = 0x0004;
863 rXclLength1 = 0x00000042;
864 rXclLength2 = 0x0008;
876 rRoot, sCellStr,
nullptr);
885 rRoot, *rScCell.
getEditText(),
nullptr, aLinkHelper);
890 rRoot, OUString(),
nullptr);
895 rpData->nSize = 3 + rpData->pString->GetSize();
896 rXclLength1 = 64 + (sCellStr.getLength() << 1);
897 rXclLength2 = 6 +
static_cast<sal_uInt16
>(sCellStr.getLength() << 1);
903 rpData->mpFormulaCell = pFmlCell;
912 std::size_t nSize = std::accumulate(rRefLog.begin(), rRefLog.end(),
913 static_cast<std::size_t
>(rpData->mxTokArr->GetSize() + 3),
915 if( rLogEntry.mpUrl && rLogEntry.mpFirstTab )
916 return rSum + rLogEntry.mpUrl->GetSize() + rLogEntry.mpFirstTab->GetSize() + 2;
918 return rSum + ((rLogEntry.mnFirstXclTab == rLogEntry.mnLastXclTab) ? 6 : 8);
920 rpData->nSize = ::std::min< std::size_t >( nSize, 0xFFFF );
921 rXclLength1 = 0x00000052;
922 rXclLength2 = 0x0018;
934 << sal_uInt16(0x0000);
937 << sal_uInt32(0x00000000);
951 std::size_t nLen = 16;
961 switch(
pData->nType )
987 pStream->startElement(nElement,
994 switch(
pData->nType )
998 pStream->startElement(XML_v);
999 pStream->write(
pData->fValue );
1000 pStream->endElement( XML_v );
1003 pStream->startElement( XML_f
1007 rStrm.GetRoot().GetCompileFormulaContext(),
1008 pData->mpFormulaCell->aPos,
pData->mpFormulaCell->GetCode()));
1009 pStream->endElement( XML_f );
1012 pStream->startElement(XML_is);
1013 if(
pData->mpFormattedString )
1017 pStream->endElement( XML_is );
1023 pStream->endElement( nElement );
1029 pStream->startElement( XML_rcc,
1038 XML_numFmtId,
nullptr,
1039 XML_quotePrefix,
nullptr,
1040 XML_oldQuotePrefix,
nullptr,
1043 XML_endOfListFormulaUpdate,
nullptr);
1057 pStream->endElement( XML_rcc );
1062 mbEndOfList(rCopy.mbEndOfList),
1063 aRange(rCopy.aRange) {}
1072 aRange( rAction.GetBigRange().MakeRange( rRoot.GetDoc()) )
1088 OSL_FAIL(
"XclExpChTrInsert::XclExpChTrInsert - unknown action" );
1116 sal_uInt16 nFlagVal =
mbEndOfList ? 0x0001 : 0x0000;
1119 rStrm << sal_uInt32(0x00000000);
1152 default:
return "*unknown*";
1159 pStream->startElement( XML_rrc,
1171 while( pAction !=
nullptr )
1173 pAction->
SaveXml( rRevisionLogStrm );
1176 pStream->endElement( XML_rrc );
1185 nTab( static_cast<
SCTAB>(rAction.GetBigRange().aStart.
Tab()) )
1198 rStrm << sal_uInt32( 0 );
1201 rStrm.WriteZeroBytes( 133 );
1217 pStream->singleElement( XML_ris,
1223 XML_sheetPosition, OString::number(
nTab) );
1232 aDestRange( rAction.GetBigRange().MakeRange( rRoot.GetDoc() ) )
1236 sal_Int32 nDCols, nDRows, nDTabs;
1237 rAction.
GetDelta( nDCols, nDRows, nDTabs );
1257 rStrm << sal_uInt32(0x00000000);
1284 pStream->startElement( XML_rm,
1294 while( pAction !=
nullptr )
1296 pAction->
SaveXml( rRevisionLogStrm );
1299 pStream->endElement( XML_rm );
1316 rStrm << sal_uInt16(0x0003)
1317 << sal_uInt16(0x0001);
1335 pStream->startElement( XML_rfmt,
1341 XML_length,
nullptr);
1344 pStream->endElement( XML_rfmt );
1366 sal_Int32 mnElement;
1368 explicit EndXmlElement( sal_Int32 nElement ) : mnElement( nElement) {}
1377 pStream->write(
"</")->writeId(mnElement)->write(
">");
1382 pTabIdBuffer( nullptr )
1384 OSL_ENSURE(
GetOldRoot().pTabId,
"XclExpChangeTrack::XclExpChangeTrack - root data incomplete" );
1389 if (!pTempChangeTrack)
1397 for( pScAction = pTempChangeTrack->
GetLast(); pScAction; pScAction = pScAction->
GetPrev() )
1409 pScAction = pTempChangeTrack->
GetLast();
1414 pScAction = pPrevAction;
1421 maRecList.push_back( std::unique_ptr<ExcRecord>(pHeader) );
1425 OUString sLastUsername;
1429 bool bValidGUID =
false;
1448 maRecList.push_back( std::unique_ptr<ExcRecord>(pAction) );
1458 maRecList.push_back( std::unique_ptr<ExcRecord>(pHeaders));
1460 OUString sLastUsername;
1463 sal_Int32 nLogNumber = 1;
1466 bool bValidGUID =
false;
1482 maRecList.push_back( std::unique_ptr<ExcRecord>(pCurHeader));
1487 pCurHeader->
AppendAction(std::unique_ptr<XclExpChTrAction>(pAction));
1491 maRecList.push_back( std::unique_ptr<ExcRecord>(
new EndXmlElement(XML_headers)));
1508 OSL_ENSURE( pOrigChangeTrack,
"XclExpChangeTrack::CreateTempChangeTrack - no change track data" );
1509 if( !pOrigChangeTrack )
1521 xTempDoc->CreateValidTabName(sTabName);
1524 OSL_ENSURE(nOrigCount ==
xTempDoc->GetTableCount(),
1525 "XclExpChangeTrack::CreateTempChangeTrack - table count mismatch");
1526 if(nOrigCount !=
xTempDoc->GetTableCount())
1545 if (pTempChangeTrack)
1553 maBuffers.push_back( std::unique_ptr<XclExpChTrTabIdBuffer>(pNewBuffer) );
1558 if (pTempChangeTrack)
1571 OSL_ENSURE( xSvStrm.
is(),
"XclExpChangeTrack::WriteUserNamesStream - no stream" );
1594 OSL_ENSURE( xSvStrm.
is(),
"XclExpChangeTrack::Write - no stream" );
1600 rxRec->Save(aXclStrm);
1609 "xl/revisions/userNames.xml",
1610 u"revisions/userNames.xml",
1612 "application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml",
1614 pUserNames->startElement( XML_users,
1621 pUserNames->endElement( XML_users );
1632 "xl/revisions/revisionHeaders.xml",
1633 u"revisions/revisionHeaders.xml",
1635 "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml",
1640 rWorkbookStrm.
PushStream( pRevisionHeaders );
1643 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 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 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
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 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 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
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 void SaveXml(XclExpXmlStream &rStrm) override
virtual ~XclExpChTrMoveRange() override
XclExpChTrTabIdBuffer(sal_uInt16 nCount)
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)
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
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