mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Refinement of the width of cells in tables
This commit is contained in:
@ -1001,13 +1001,19 @@ namespace NSCSS
|
||||
CASE(L"width"):
|
||||
{
|
||||
const size_t unPositionImp = pPropertie.second.find(L"!i");
|
||||
|
||||
int nParentValue = m_pDisplay.GetWidth();
|
||||
|
||||
if (0 >= nParentValue)
|
||||
nParentValue = m_oDeviceWindow.m_ushWidth;
|
||||
|
||||
if (unPositionImp == std::wstring::npos)
|
||||
{
|
||||
m_pDisplay.SetWidth(ConvertUnitMeasure(pPropertie.second, m_oDeviceWindow.m_ushWidth, ScalingDirectionX), unLevel, bHardMode);
|
||||
m_pDisplay.SetWidth(ConvertUnitMeasure(pPropertie.second, nParentValue, ScalingDirectionX), unLevel, bHardMode);
|
||||
}
|
||||
else if (unPositionImp != 0)
|
||||
{
|
||||
m_pDisplay.SetWidth(ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), m_oDeviceWindow.m_ushWidth, ScalingDirectionX), unLevel, true);
|
||||
m_pDisplay.SetWidth(ConvertUnitMeasure(pPropertie.second.substr(0, unPositionImp - 1), nParentValue, ScalingDirectionX), unLevel, true);
|
||||
m_pDisplay.SetImportantWidth(true);
|
||||
}
|
||||
|
||||
|
||||
@ -276,8 +276,8 @@ namespace NSCSS
|
||||
|
||||
if (!oStyle.m_pMargin.Empty() && oStyle.m_pMargin.GetPermission())
|
||||
{
|
||||
sSpacingValue += L"w:after=\"" + oStyle.m_pMargin.GetTopSideW() + L"\" ";
|
||||
sSpacingValue += L"w:before=\"" + oStyle.m_pMargin.GetTopSideW() + L"\" ";
|
||||
sSpacingValue += L"w:afterAutospacing=\"1\" w:after=\"" + oStyle.m_pMargin.GetTopSideW() + L"\" ";
|
||||
sSpacingValue += L"w:beforeAutospacing=\"1\" w:before=\"" + oStyle.m_pMargin.GetTopSideW() + L"\" ";
|
||||
}
|
||||
else/* if (!oStyle.m_pBorder.Empty() || !oStyle.m_pMargin.GetPermission())*/
|
||||
sSpacingValue += L"w:after=\"0\" w:before=\"0\"";
|
||||
|
||||
Reference in New Issue
Block a user