summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-03-16 12:34:30 +0300
committerJustin Luth <justin_luth@sil.org>2020-03-17 16:52:05 +0100
commit0b5bf474d873fce11cc0f78d73f7e9656c95ffe8 (patch)
tree657f4ece1200019a9a6dad407ec104118678859c /writerfilter/source
parent138f62c2e5a841dd00ca2de3526ee532e1fcc585 (diff)
tdf#131071 writerfilter: tableStyle uses DocDefaults
It is kinda surprising to me, but the tableStyle actually includes DocDefaults in its style properties. You would expect that to be irrelevant, because if even the default style specifies a setting, it overrides the table style. Therefore they would either both match DocDefaults, or the style would have specified a value (thus overriding tablestyle). But in the specific default case of overrideTableStyleSizeAndJustification == false, a left alignment or a fontsize of 11 or 12 are overridden by the table style. Perhaps this should ONLY import those two settings in DocDefaults, but obviously the concept is there, so it shouldn't hurt to import the whole thing as that likely is the correct response for other situations as well. Change-Id: Ie2494855fa37c9a21d27d0e15f4da1fa0a216be6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90558 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index e6e4b93acdf4..f3dfe000c55b 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1208,6 +1208,10 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable )
// If this is a table style, save its contents as-is for roundtrip purposes.
TableStyleSheetEntry* pTableEntry = static_cast<TableStyleSheetEntry *>(pEntry.get());
aTableStylesVec.push_back(pTableEntry->GetInteropGrabBag());
+
+ // if DocDefaults exist, MS Word includes these in the table style definition.
+ pEntry->pProperties->InsertProps( m_pImpl->m_pDefaultCharProps, /*bOverwrite=*/false );
+ pEntry->pProperties->InsertProps( m_pImpl->m_pDefaultParaProps, /*bOverwrite=*/false );
}
}