writerfilter/source/dmapper/DomainMapper.cxx | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
New commits: commit 81390a6e8c17dc1a48a34e57ab3b7e1b16a10a94 Author: Miklos Vajna <vmik...@suse.cz> Date: Tue Jun 26 12:36:32 2012 +0200 n#766487 dmapper: FirstLineIndent should be always inherited from numbering Change-Id: I1eb5946d23cd3ff635d436adbd59bf007333aa60 diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 45dd5d3..5ecceba 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1043,8 +1043,44 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) case NS_ooxml::LN_CT_Ind_start: case NS_ooxml::LN_CT_Ind_left: if (m_pImpl->GetTopContext()) + { + // Word inherits FirstLineIndent property of the numbering, even if ParaLeftMargin is set, Writer does not. + // So copy it explicitly, if necessary. + PropertyMapPtr pContext = m_pImpl->GetTopContext(); + sal_Int32 nFirstLineIndent = 0; + + // See if we have a FirstLineIndent + PropertyMap::iterator it = pContext->find(PropertyDefinition( PROP_NUMBERING_RULES, true ) ); + uno::Reference<container::XIndexAccess> xNumberingRules; + if (it != pContext->end()) + xNumberingRules.set(it->second, uno::UNO_QUERY); + it = pContext->find(PropertyDefinition( PROP_NUMBERING_LEVEL, true ) ); + sal_Int32 nNumberingLevel = -1; + if (it != pContext->end()) + it->second >>= nNumberingLevel; + if (xNumberingRules.is() && nNumberingLevel != -1) + { + uno::Sequence<beans::PropertyValue> aProps; + xNumberingRules->getByIndex(nNumberingLevel) >>= aProps; + for (int i = 0; i < aProps.getLength(); ++i) + { + const beans::PropertyValue& rProp = aProps[i]; + + if (rProp.Name == "FirstLineIndent") + { + rProp.Value >>= nFirstLineIndent; + break; + } + } + } + + // Then copy it over. + if (nFirstLineIndent != 0) + m_pImpl->GetTopContext()->Insert(PROP_PARA_FIRST_LINE_INDENT, true, uno::makeAny(nFirstLineIndent)); + m_pImpl->GetTopContext()->Insert( PROP_PARA_LEFT_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) )); + } break; case NS_ooxml::LN_CT_Ind_end: case NS_ooxml::LN_CT_Ind_right: commit 2869ff93a839c0aa6a9972c550d70a7cd364501b Author: Miklos Vajna <vmik...@suse.cz> Date: Tue Jun 26 10:58:27 2012 +0200 n#766487 dmapper: sprmCHpsBi should affect sprmCHps, if the later is not set Change-Id: Ia6e097f9f93bcfe14392f5ef0245994752001f6c diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index c11935d..45dd5d3 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2059,7 +2059,11 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType double fVal = double(nIntValue) / 2.; uno::Any aVal = uno::makeAny( fVal ); if( NS_sprm::LN_CHpsBi == nSprmId ) + { rContext->Insert( PROP_CHAR_HEIGHT_COMPLEX, true, aVal ); + // Also set Western, but don't overwrite it. + rContext->Insert( PROP_CHAR_HEIGHT, true, aVal, false ); + } else { //Asian get the same value as Western _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits