Fix build & bug

This commit is contained in:
Alexey Nagaev
2025-04-30 15:10:06 +03:00
parent 1e2b91e77f
commit 8e64dcc5a4
3 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,7 @@
#pragma once
#include <memory>
#include <vector>
#include "../../../../DesktopEditor/common/StringBuilder.h"

View File

@ -763,8 +763,8 @@ namespace NSDocxRenderer
fabs(pFirstCont->m_dLeft - pSecondCont->m_dRight) < c_dTHE_STRING_X_PRECISION_MM * 3;
//Размеры шрифта должны бать разными
bool bIf5 = pFirstCont->m_pFontStyle->dFontSize * 0.7 > pSecondCont->m_pFontStyle->dFontSize;
bool bIf6 = pFirstCont->m_pFontStyle->dFontSize < pSecondCont->m_pFontStyle->dFontSize * 0.7;
bool bIf5 = pFirstCont->m_pFontStyle->dFontSize * 0.8 > pSecondCont->m_pFontStyle->dFontSize;
bool bIf6 = pFirstCont->m_pFontStyle->dFontSize < pSecondCont->m_pFontStyle->dFontSize * 0.8;
if (bIf3 || bIf4)
{
@ -954,9 +954,6 @@ namespace NSDocxRenderer
}
}
if (m_pCurrCont)
m_arConts.push_back(std::move(m_pCurrCont));
auto pCont = std::make_shared<CContText>(pFontManager);
const auto& oParams = pFontManager->GetFontSelectParams();
const auto& oMetrics = pFontManager->GetFontMetrics();
@ -1020,6 +1017,10 @@ namespace NSDocxRenderer
{
m_arDiacs.push_back(std::move(pCont));
}
else
{
m_arConts.push_back(pCont);
}
m_pCurrCont = pCont;
m_oPrevFont = oFont;

View File

@ -77,7 +77,7 @@ int main(int argc, char *argv[])
oWorker.m_sDirectory = NSFile::GetProcessDirectory() + L"/fonts_cache";
oWorker.m_bIsNeedThumbnails = false;
oWorker.m_arAdditionalFolders.push_back(L"/home/flexus/Work/fonts");
// oWorker.m_arAdditionalFolders.push_back(L"");
if (!NSDirectory::Exists(oWorker.m_sDirectory))
NSDirectory::CreateDirectory(oWorker.m_sDirectory);