diff options
author | Yogesh Bharate <yogesh.bharate@synerzip.com> | 2014-07-25 15:54:44 +0530 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2014-07-29 14:27:08 +0000 |
commit | 26b33fc2f2164481f5c423463f653012e4f4995d (patch) | |
tree | b4c627cc6589b0044e7f8c4a0d592f9d97f81db1 | |
parent | 5021f298418f6efa7bb7b6540113b712599778fe (diff) |
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/10532
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | sw/qa/core/data/ooxml/pass/fdo80580.docx | bin | 0 -> 24921 bytes | |||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 5 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sw/qa/core/data/ooxml/pass/fdo80580.docx b/sw/qa/core/data/ooxml/pass/fdo80580.docx Binary files differnew file mode 100644 index 000000000000..90793fe9b4b4 --- /dev/null +++ b/sw/qa/core/data/ooxml/pass/fdo80580.docx diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 17cbe64d3445..dad72fa496e0 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -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()) |