Kaydet (Commit) 26b33fc2 authored tarafından Yogesh Bharate's avatar Yogesh Bharate Kaydeden (comit) Luboš Luňák

fdo#80580: LO crashes while opening the document on ubuntu build

Problem Description:
This issue is reproducible.

Step to reproduce :
1. Create .docx contains page break on first page.
2. Second page contains '&'(ampersand) with some character like 'x','z','#' etc.
3. Changes the size or font of '&character' which is on second page.
4. Precaution will be take all this i.e page break and '&character' contains in single paragraph'.

Solution:
Added a check for Context Type which must be CONTEXT_CHARACTER for deferring character.

Change-Id: I27989d2ca8d62fbd9efafe5ba7f4a65d56467c1e
Reviewed-on: https://gerrit.libreoffice.org/10532Reviewed-by: 's avatarLuboš Luňák <l.lunak@collabora.com>
Tested-by: 's avatarLuboš Luňák <l.lunak@collabora.com>
üst 5021f298
......@@ -1190,8 +1190,9 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, PropertyMapP
if (m_aTextAppendStack.empty())
return;
if( pPropertyMap == m_pTopContext && !deferredCharacterProperties.empty())
// Before placing call to processDeferredCharacterProperties(), TopContextType should be CONTEXT_CHARACTER
// processDeferredCharacterProperties() invokes only if character inserted
if( pPropertyMap == m_pTopContext && !deferredCharacterProperties.empty() && (GetTopContextType() == CONTEXT_CHARACTER) )
processDeferredCharacterProperties();
uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend;
if(xTextAppend.is() && ! getTableManager( ).isIgnore())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment