mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 07:23:34 +08:00
Merge pull request 'add horizontal rule' (#736) from fix/doc into develop
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/736
This commit is contained in:
@ -302,6 +302,9 @@ namespace DocFileFormat
|
||||
bool bFilled = true;
|
||||
bool hasTextbox = false;
|
||||
bool layoutInCell = true; //anmeldebogenfos.doc
|
||||
bool HorizRule = false;
|
||||
bool StandardHR = false;
|
||||
bool NoshadeHR = false;
|
||||
bool b3D = false;
|
||||
bool bShadow = false;
|
||||
bool bPicturePresent = false;
|
||||
@ -400,6 +403,18 @@ namespace DocFileFormat
|
||||
{
|
||||
layoutInCell = booleans->fLayoutInCell;
|
||||
}
|
||||
if (booleans->fUsefHorizRule)
|
||||
{
|
||||
HorizRule = booleans->fHorizRule;
|
||||
}
|
||||
if (booleans->fUsefStandardHR)
|
||||
{
|
||||
StandardHR = booleans->fStandardHR;
|
||||
}
|
||||
if (booleans->fUsefNoshadeHR)
|
||||
{
|
||||
NoshadeHR = booleans->fNoshadeHR;
|
||||
}
|
||||
}
|
||||
break;
|
||||
// GEOMETRY
|
||||
@ -747,6 +762,27 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case ODRAW::pctHR:
|
||||
{
|
||||
int pctValue = (int)iter->op;
|
||||
|
||||
if (pctValue > 0)
|
||||
{
|
||||
std::wstring pctStr = std::to_wstring(pctValue);
|
||||
m_pXmlWriter->WriteAttribute(L"o:hrpct", pctStr);
|
||||
}
|
||||
|
||||
}break;
|
||||
case ODRAW::alignHR:
|
||||
{
|
||||
switch (iter->op)
|
||||
{
|
||||
case 0: m_pXmlWriter->WriteAttribute(L"o:hralign", L"left"); break;
|
||||
case 1: m_pXmlWriter->WriteAttribute(L"o:hralign", L"center"); break;
|
||||
case 2: m_pXmlWriter->WriteAttribute(L"o:hralign", L"right"); break;
|
||||
}
|
||||
|
||||
}break;
|
||||
// OLE
|
||||
case ODRAW::pictureId:
|
||||
{
|
||||
@ -1058,6 +1094,18 @@ namespace DocFileFormat
|
||||
m_pXmlWriter->WriteAttribute(L"coordsize", (FormatUtils::SizeTToWideString(*xCoord) + L"," + FormatUtils::SizeTToWideString(*yCoord)));
|
||||
}
|
||||
}
|
||||
if (HorizRule)
|
||||
{
|
||||
m_pXmlWriter->WriteAttribute(L"o:hr", L"t");
|
||||
}
|
||||
if (StandardHR)
|
||||
{
|
||||
m_pXmlWriter->WriteAttribute(L"o:hrstd", L"t");
|
||||
}
|
||||
if (NoshadeHR)
|
||||
{
|
||||
m_pXmlWriter->WriteAttribute(L"o:hrnoshade", L"t");
|
||||
}
|
||||
|
||||
int nCode = 0;
|
||||
if (pShape->GetShapeType())
|
||||
|
||||
Reference in New Issue
Block a user