summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-01-08 14:26:40 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-05-19 09:10:33 +0200
commite73d148cd02a934025f8d2018acf23493a9db3b3 (patch)
treefe2f8cd03c01ca1ff36c4863d6cb88e376c52d33 /writerfilter
parentad513aadc9f2330fbe52ce23ce87dc7db14c5307 (diff)
tdf#90069 DOCX: fix character style of new table rows
DOCX table import didn't set paragraph level character styles on paragraph level, only on text portions, resulting default character style in the newly inserted table rows instead of copying the style of the previous table row. (cherry picked from commit 2ab481b038b62b1ff576ac4d49d03c1798cd7f84) Conflicts: sw/qa/extras/uiwriter/uiwriter2.cxx Change-Id: Idb4438c767bdc7e0026fc6e0f0a795d8efdda3c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94315 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 81f518af9c29..b0559a737cc4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1567,6 +1567,19 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
}
}
}
+
+ // tdf#90069 in tables, apply paragraph level character style also on
+ // paragraph level to support its copy during insertion of new table rows
+ if ( xParaProps && m_nTableDepth > 0 )
+ {
+ uno::Sequence< beans::PropertyValue > aValues = pParaContext->GetPropertyValues(false);
+
+ for( const auto& rProp : aValues )
+ {
+ if ( rProp.Name.startsWith("Char") && rProp.Name != "CharStyleName" && rProp.Name != "CharInteropGrabBag" )
+ xParaProps->setPropertyValue( rProp.Name, rProp.Value );
+ }
+ }
}
if( !bKeepLastParagraphProperties )
rAppendContext.pLastParagraphProperties = pToBeSavedProperties;