summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-04-08 11:49:46 +0200
committerLászló Németh <nemeth@numbertext.org>2020-04-08 14:14:48 +0200
commit1b582b53596928be9e01e40ea287fbd4ed62996c (patch)
tree10806086d2c45c8c00fa69d1b80f202c76943cda /writerfilter/source/dmapper/DomainMapperTableHandler.cxx
parent5f03eb4e6dd11f65e16a1bb8aa46a7ae18379160 (diff)
tdf#131959 DOCX: import tblInd from table style
to fix left table indent when direct formatting doesn't overwrite the table style. Note: The imported values are adjusted correctly according to the differences in calculation of table indent positions. See commit d2db4bc9507653a46fdea282d41b9683910a072f (tdf#119760 docx: table starts at left, not mid-border). Change-Id: Ieb6f078b3bd3605d538f2eedb7a5030784a738b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91765 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapperTableHandler.cxx')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index b7151f26cb9f..0c73bb60f23a 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -514,6 +514,14 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
}
m_aTableProperties->getValue( TablePropertyMap::GAP_HALF, nGapHalf );
+
+ std::optional<PropertyMap::Property> oLeftMarginFromStyle = m_aTableProperties->getProperty(PROP_LEFT_MARGIN);
+ if (oLeftMarginFromStyle)
+ {
+ oLeftMarginFromStyle->second >>= nLeftMargin;
+ // don't need to erase, we will push back the adjusted value
+ // of this (or the direct formatting, if that exists) later
+ }
m_aTableProperties->getValue( TablePropertyMap::LEFT_MARGIN, nLeftMargin );
m_aTableProperties->getValue( TablePropertyMap::CELL_MAR_LEFT,