Refactoring

This commit is contained in:
Kirill Polyakov
2024-08-20 11:00:12 +03:00
parent 75cc7d8457
commit bbf4003ec7
2 changed files with 8 additions and 6 deletions

View File

@ -11,7 +11,7 @@ CONFIG += plugin
DEFINES += HTMLFILE2_USE_DYNAMIC_LIBRARY
DEFINES += CSSCALCULATOR_LIBRARY_STATIC
DEFINES += CSS_CALCULATOR_WITH_XHTML
DEFINES += DESABLE_RUBY_SUPPORT
DEFINES += DISABLE_RUBY_SUPPORT
CORE_ROOT_DIR = $$PWD/..
PWD_ROOT_DIR = $$PWD

View File

@ -1070,7 +1070,7 @@ public:
if (NSCSS::UnitMeasure::Percent == m_oStyles.m_oWidth.GetUnitMeasure())
oTable += L"<w:tblW w:w=\"" + std::to_wstring(m_oStyles.m_oWidth.ToInt(NSCSS::UnitMeasure::Percent, 5000)) + L"\" w:type=\"pct\"/>";
else
oTable += L"<w:tblInd w:w=\"" + std::to_wstring(m_oStyles.m_oWidth.ToInt(NSCSS::UnitMeasure::Twips)) + L"\" w:type=\"dxa\"/>";
oTable += L"<w:tblW w:w=\"" + std::to_wstring(m_oStyles.m_oWidth.ToInt(NSCSS::UnitMeasure::Twips)) + L"\" w:type=\"dxa\"/>";
}
else
oTable += L"<w:tblW w:w=\"0\" w:type=\"auto\"/>";
@ -3004,10 +3004,13 @@ private:
oTrTS.bAddSpaces = true;
m_oState.m_bWasSpace = true;
while (m_oLightReader.ReadNextSiblingNode(nTrDepth) && (L"td" == m_oLightReader.GetName() || L"th" == m_oLightReader.GetName()))
while (m_oLightReader.ReadNextSiblingNode(nTrDepth))
{
if (L"td" != m_oLightReader.GetName() && L"th" != m_oLightReader.GetName())
continue;
GetSubClass(pCell->GetData(), sSelectors);
readStream(pCell->GetData(), sSelectors, oTrTS, true);
readStream(pCell->GetData(), sSelectors, oTrTS);
sSelectors.pop_back();
}
}
@ -3037,8 +3040,7 @@ private:
const int nDepth = m_oLightReader.GetDepth();
#ifdef DESABLE_RUBY_SUPPORT
#ifdef DISABLE_RUBY_SUPPORT
wrP(oXml, sSelectors, oTS);
while (m_oLightReader.ReadNextSiblingNode2(nDepth))