diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-07-28 17:57:53 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-07-28 18:24:31 +0200 |
commit | 7f6e26917d4aa682ed9c422c83b1df20d78177d2 (patch) | |
tree | 6d37780768edabcab4901465747cd655728c7b7c /writerfilter | |
parent | 29813244afafa1721feb63dfeb055594053ce3f7 (diff) |
fdo#81033: writerfilter: RTF import: fix tab stop inheritance from style
For RTF, the tab stops that are set directly on the paragraph are the
tab stops the paragraph has effectively; there is no equivalent of OOXML
<w:tab w:val="clear" w:pos="4536"/> that would override a tab stop of
the applied style; that is done by simply omitting the tab stop.
It would perhaps be possible to implement something to synthesize a
NS_ooxml::LN_Value_ST_TabJc_clear in the RTF tokenizer for this case,
but it's simpler to just generally disable domain mapper's
InitTabStopFromStyle() for RTF.
Change-Id: I7b0581be8db19ffda81c8d1da290abf0a0f69529
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index a6c71b16729a..7e598d7b73b8 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1718,7 +1718,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) case NS_ooxml::LN_CT_PPrBase_tabs: { // Initialize tab stop vector from style sheet - if( !m_pImpl->IsStyleSheetImport() ) + // fdo#81033: for RTF, a tab stop is inherited from the style if it + // is also applied to the paragraph directly, and cleared if it is + // not applied to the paragraph directly => don't InitTabStopFromStyle + if (!m_pImpl->IsStyleSheetImport() && !IsRTFImport()) { uno::Any aValue = m_pImpl->GetPropertyFromStyleSheet(PROP_PARA_TAB_STOPS); uno::Sequence< style::TabStop > aStyleTabStops; |