Commit 00838221 authored by ElenaSubbotina's avatar ElenaSubbotina

Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop

Conflicts:
	Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.h
parents dd5b4a71 3d198bc2
......@@ -244,6 +244,7 @@ namespace OOX
for ( size_t j = 0; j < pShape->m_arrItems.size(); ++j)
{
OOX::WritingElement* pElem = pShape->m_arrItems[j];
if ( !pElem ) continue;
if( OOX::et_v_ClientData == pElem->getType())
......
......@@ -3517,15 +3517,15 @@ namespace BinXlsxRW
void WriteCommentDataContent(OOX::Spreadsheet::CCommentItem* pComment, SerializeCommon::CommentData* pCommentData, nullable<OOX::Spreadsheet::CSi>* pCommentText)
{
int nCurPos = 0;
if(NULL != pCommentText && pCommentText->IsInit())
if(NULL != pCommentData && !pCommentData->sText.empty())
{
m_oBcw.m_oStream.WriteBYTE(c_oSer_CommentData::Text);
m_oBcw.m_oStream.WriteStringW((*pCommentText)->ToString());
m_oBcw.m_oStream.WriteStringW(pCommentData->sText);
}
else if(NULL != pCommentData && !pCommentData->sText.empty())
else if(NULL != pCommentText && pCommentText->IsInit())
{
m_oBcw.m_oStream.WriteBYTE(c_oSer_CommentData::Text);
m_oBcw.m_oStream.WriteStringW(pCommentData->sText);
m_oBcw.m_oStream.WriteStringW((*pCommentText)->ToString());
}
if(NULL != pCommentData)
{
......
......@@ -2340,22 +2340,32 @@ namespace BinXlsxRW {
{
if(NULL != pCommentData && false == pCommentData->sText.empty())
{
OOX::Spreadsheet::CRun* pRun = new OOX::Spreadsheet::CRun();
pRun->m_oRPr.Init();
OOX::Spreadsheet::CRPr& pRPr = pRun->m_oRPr.get2();
pRPr.m_oRFont.Init();
pRPr.m_oRFont->m_sVal.Init();
pRPr.m_oRFont->m_sVal->append(_T("Tahoma"));
pRPr.m_oSz.Init();
pRPr.m_oSz->m_oVal.Init();
pRPr.m_oSz->m_oVal->SetValue(8);
addCommentRun(oSi, pCommentData->sUserName + _T(":"), true);
addCommentRun(oSi, _T("\n") + pCommentData->sText, false);
}
}
void addCommentRun(OOX::Spreadsheet::CSi& oSi, const std::wstring& text, bool isBold)
{
OOX::Spreadsheet::CRun* pRun = new OOX::Spreadsheet::CRun();
pRun->m_oRPr.Init();
OOX::Spreadsheet::CRPr& pRPr = pRun->m_oRPr.get2();
if(isBold)
{
pRPr.m_oBold.Init();
pRPr.m_oBold->m_oVal.FromBool(true);
}
pRPr.m_oRFont.Init();
pRPr.m_oRFont->m_sVal.Init();
pRPr.m_oRFont->m_sVal->append(_T("Tahoma"));
pRPr.m_oSz.Init();
pRPr.m_oSz->m_oVal.Init();
pRPr.m_oSz->m_oVal->SetValue(9);
OOX::Spreadsheet::CText* pText = new OOX::Spreadsheet::CText();
pText->m_sText.append(pCommentData->sText);
OOX::Spreadsheet::CText* pText = new OOX::Spreadsheet::CText();
pText->m_sText.append(text);
pRun->m_arrItems.push_back(pText);
oSi.m_arrItems.push_back(pRun);
}
pRun->m_arrItems.push_back(pText);
oSi.m_arrItems.push_back(pRun);
}
};
class BinaryWorksheetsTableReader : public Binary_CommonReader<BinaryWorksheetsTableReader>
......@@ -4094,7 +4104,7 @@ namespace BinXlsxRW {
pRPr.m_oRFont->m_sVal->append(_T("Tahoma"));
pRPr.m_oSz.Init();
pRPr.m_oSz->m_oVal.Init();
pRPr.m_oSz->m_oVal->SetValue(8);
pRPr.m_oSz->m_oVal->SetValue(9);
pRPr.m_oBold.Init();
pRPr.m_oBold->FromBool(true);
......
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