summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-02-07 15:06:50 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-05-15 11:50:46 +0200
commit364f9ae0a8b7e9724a3bfe77450e02a5607863b8 (patch)
tree68214047497562362eee70d322a98472e3da9570 /writerfilter
parent8bb007a4e4d46fd95b5ff5bc63980d05a279db0c (diff)
tdf#130494: DOCX import: limit paragraph-level character property
expansion for the whole table paragraph based on the last character context. regression from 2ab481b038b62b1ff576ac4d49d03c1798cd7f84 (tdf#90069 DOCX: fix character style of new table rows) (cherry picked from commit abb9c7db8bcc06f907d39a7811711882161d5803) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport11.cxx Change-Id: I49da23c268436488ff1537771869c38108113c12
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 3ad763786c8a..5535db1cc1c5 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1805,14 +1805,25 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
// fix table paragraph properties
if ( xParaProps && m_nTableDepth > 0 )
{
- uno::Sequence< beans::PropertyValue > aValues = pParaContext->GetPropertyValues(false);
+ uno::Sequence< beans::PropertyValue > aParaProps = pParaContext->GetPropertyValues(false);
// tdf#90069 in tables, apply paragraph level character style also on
// paragraph level to support its copy during insertion of new table rows
- for( const auto& rProp : std::as_const(aValues) )
+ for( const auto& rParaProp : std::as_const(aParaProps) )
{
- if ( rProp.Name.startsWith("Char") && rProp.Name != "CharStyleName" && rProp.Name != "CharInteropGrabBag" )
- xParaProps->setPropertyValue( rProp.Name, rProp.Value );
+ if ( m_pLastCharacterContext.get() && rParaProp.Name.startsWith("Char") && rParaProp.Name != "CharStyleName" && rParaProp.Name != "CharInteropGrabBag" )
+ {
+ const uno::Sequence< beans::PropertyValue > aLastCharProps = m_pLastCharacterContext->GetPropertyValues( );
+
+ for( const auto& rLastCharProp : std::as_const(aLastCharProps) )
+ {
+ if ( rLastCharProp == rParaProp )
+ {
+ xParaProps->setPropertyValue( rParaProp.Name, rParaProp.Value );
+ break;
+ }
+ }
+ }
}
// tdf#128959 table paragraphs haven't got window and orphan controls