Skip to content

Commit

Permalink
fix bug #57207
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaSubbotina committed Nov 16, 2024
1 parent 9ea09f9 commit 66bc022
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RtfFile/Format/RtfField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,13 @@ std::wstring RtfField::RenderToOOX(RenderParameter oRenderParameter)
m_pInsert->m_oCharProperty.m_nDeleted = PROP_DEF;
}
//поверяем на наличие гиперссылки
RenderParameter oNewParam = oRenderParameter;
oNewParam.nType = RENDER_TO_OOX_PARAM_PLAIN;
RenderParameter oNewParam = oRenderParameter;
oNewParam.nType = RENDER_TO_OOX_PARAM_PLAIN;

std::wstring sInsertText = m_pInsert->m_pTextItems->RenderToOOX( oNewParam );

size_t nIndex = sInsertText.find( L"HYPERLINK" );
if( std::wstring::npos != nIndex )
if ( std::wstring::npos != nIndex && (m_pResult) && (m_pResult->m_pTextItems) && m_pResult->m_pTextItems->GetCount() < 2)
{
std::wstring sHyperlink = sInsertText;
sHyperlink.erase( nIndex, 9/*(int)_tcslen( L"HYPERLINK" )*/ );
Expand Down

0 comments on commit 66bc022

Please sign in to comment.