diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-29 17:40:51 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-29 18:32:49 +0200 |
commit | 305ecd1848a802a6c43ecc6e76f4c6bc36a03418 (patch) | |
tree | 7bf27d03af9c4bc1ce4d28ed41d7560b5d7eed78 /writerfilter | |
parent | 9f05a8709232bdce78760636c6f6f03bf588a1ec (diff) |
fdo#79959 RTF import: trim whitespace around style names
Change-Id: Id23cbd62b057442c577fef124a5705e4d551076f
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index d0f88ec39b0b..244176223045 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1162,8 +1162,9 @@ void RTFDocumentImpl::text(OUString& rString) case DESTINATION_STYLEENTRY: if (m_aStates.top().aTableAttributes.find(NS_ooxml::LN_CT_Style_type)) { - m_aStyleNames[m_nCurrentStyleIndex] = aName; - RTFValue::Pointer_t pValue(new RTFValue(aName)); + // Word strips whitespace around style names. + m_aStyleNames[m_nCurrentStyleIndex] = aName.trim(); + RTFValue::Pointer_t pValue(new RTFValue(aName.trim())); m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_styleId, pValue); m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Style_name, pValue); |