Commit 97fb3162 authored by konovalovsergey's avatar konovalovsergey

internal onlyoffice field for comment time

parent a6072822
......@@ -1583,6 +1583,7 @@ public:
std::wstring UserName;
std::wstring UserId;
std::wstring Date;
std::wstring OOData;
bool Solved;
std::wstring Text;
std::wstring m_sParaId;
......@@ -1706,9 +1707,16 @@ public:
{
std::wstring sDate = XmlUtils::EncodeXmlString(pComment->Date);
sRes += L" w:date=\"";
sRes += sDate;
sRes += sDate;
sRes += L"\"";
}
if(false == pComment->OOData.empty())
{
std::wstring sData = XmlUtils::EncodeXmlString(pComment->OOData);
sRes += L" oodata=\"";
sRes += sData;
sRes += L"\"";
}
if(false == sInitials.empty())
{
sInitials = XmlUtils::EncodeXmlString(sInitials);
......
......@@ -3039,6 +3039,11 @@ public:
std::wstring Date(m_oBufferedStream.GetString3(length));
pComment->Date = Date;
}
else if ( c_oSer_CommentsType::OOData == type )
{
std::wstring Data(m_oBufferedStream.GetString3(length));
pComment->OOData = Data;
}
else if ( c_oSer_CommentsType::Text == type )
{
std::wstring Text(m_oBufferedStream.GetString3(length));
......
......@@ -716,7 +716,8 @@ extern int g_nCurFormatVersion;
Text = 6,
QuoteText = 7,
Solved = 8,
Replies = 9
Replies = 9,
OOData = 10
};}
namespace c_oSer_SettingsType{enum c_oSer_SettingsType
{
......
......@@ -7222,6 +7222,11 @@ namespace BinDocxRW
m_oBcw.m_oStream.WriteBYTE(c_oSer_CommentsType::Date);
m_oBcw.m_oStream.WriteStringW(pComment->m_oDate->ToString());
}
if(pComment->m_oOOData.IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSer_CommentsType::OOData);
m_oBcw.m_oStream.WriteStringW(pComment->m_oOOData.get2());
}
if(pComment->m_oId.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSer_CommentsType::Id);
......
......@@ -275,6 +275,7 @@ namespace OOX
WritingElement_ReadAttributes_Start( oReader )
WritingElement_ReadAttributes_Read_if ( oReader, _T("w:author"), m_oAuthor )
WritingElement_ReadAttributes_Read_else_if( oReader, _T("w:date"), m_oDate )
WritingElement_ReadAttributes_Read_else_if( oReader, _T("oodata"), m_oOOData )
WritingElement_ReadAttributes_Read_else_if( oReader, _T("w:id"), m_oId )
WritingElement_ReadAttributes_Read_else_if( oReader, _T("w:initials"), m_oInitials )
WritingElement_ReadAttributes_End( oReader )
......@@ -289,6 +290,9 @@ namespace OOX
nullable<SimpleTypes::CDecimalNumber<> > m_oId;
nullable<std::wstring > m_oInitials;
//teamlab editor information!!!
nullable<std::wstring > m_oOOData;
// Childs
};
......
......@@ -656,7 +656,8 @@ namespace BinXlsxRW
Solved = 5,
Document = 6,
Replies = 7,
Reply = 8
Reply = 8,
OOTime = 9
};}
namespace c_oSer_ConditionalFormatting{enum c_oSer_ConditionalFormatting
{
......
......@@ -51,6 +51,7 @@ namespace SerializeCommon
public :
std::wstring sText;
std::wstring sTime;
std::wstring sOOTime;
std::wstring sUserId;
std::wstring sUserName;
std::wstring sQuoteText;
......
......@@ -3481,6 +3481,11 @@ namespace BinXlsxRW
m_oBcw.m_oStream.WriteBYTE(c_oSer_CommentData::Time);
m_oBcw.m_oStream.WriteStringW(pCommentData->sTime);
}
if(!pCommentData->sOOTime.empty())
{
m_oBcw.m_oStream.WriteBYTE(c_oSer_CommentData::OOTime);
m_oBcw.m_oStream.WriteStringW(pCommentData->sOOTime);
}
if (!pCommentData->sUserId.empty())
{
m_oBcw.m_oStream.WriteBYTE(c_oSer_CommentData::UserId);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment