Compare commits

..

3 Commits

Author SHA1 Message Date
bde723c5cb internal onlyoffice field for comment time 2017-08-03 15:08:01 +03:00
97fb316248 internal onlyoffice field for comment time 2017-08-03 15:07:11 +03:00
a607282285 refactoring... 2017-08-02 17:27:41 +03:00
10 changed files with 67 additions and 3 deletions

View File

@ -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);

View File

@ -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));

View File

@ -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
{

View File

@ -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);

View File

@ -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
};

View File

@ -2377,6 +2377,38 @@ namespace NSEditorApi
pEvent->Release();
}
};
class CAscCefMenuEvent : public CAscMenuEvent
{
public:
int m_nSenderId;
public:
CAscCefMenuEvent(int nType = -1) : CAscMenuEvent(nType)
{
m_nSenderId = -1;
}
virtual ~CAscCefMenuEvent()
{
}
LINK_PROPERTY_INT(SenderId)
};
class CAscCefMenuEventListener
{
public:
// memory release!!!
virtual void OnEvent(CAscCefMenuEvent* pEvent)
{
if (NULL != pEvent)
pEvent->Release();
}
virtual bool IsSupportEvent(int nEventType)
{
return true;
}
};
}
namespace NSEditorApi

View File

@ -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
{

View File

@ -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;

View File

@ -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);

View File

@ -2254,6 +2254,8 @@ namespace BinXlsxRW {
pComments->sText = m_oBufferedStream.GetString4(length);
else if ( c_oSer_CommentData::Time == type )
pComments->sTime = m_oBufferedStream.GetString4(length);
else if ( c_oSer_CommentData::OOTime == type )
pComments->sOOTime = m_oBufferedStream.GetString4(length);
else if ( c_oSer_CommentData::UserId == type )
pComments->sUserId = m_oBufferedStream.GetString4(length);
else if ( c_oSer_CommentData::UserName == type )