summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapper_Impl.cxx
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2023-04-07 20:42:18 -0400
committerJustin Luth <jluth@mail.com>2023-04-09 03:39:57 +0200
commite4b1be58db73f5a3c483b40b5615c1c764bbe1d3 (patch)
tree7810fac543e3da1dd8d2c9259031f3df88fe9164 /writerfilter/source/dmapper/DomainMapper_Impl.cxx
parentf22f7159ec1bd28d19f4a8b431893436419ecd64 (diff)
tdf#154703 writerfilter framePr: don't duplicate top/bot spacing
With framePr, all of the background/border settings are really just paragraph properties. BETTER would be to zero out the frame spacing and leave it on the paragraph. After all, there could be multiple paragraphs and each could have their own spacing. However, in this case we are getting the whole range as one propertySet, so that basically means it is treated as one. I presume. But the biggest reason for zeroing out the paragraph instead of the frame is because on export only the frame borders are being written out. So that really needs to be fixed first. make CppunitTest_sw_ooxmlexport10 CPPUNIT_TEST_NAME=testLibreOfficeHang Change-Id: I1faeef6bf12668fb28e2b3710053ff545a4c36e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150157 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapper_Impl.cxx')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 5e8d2712a13c..f559060704b6 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1561,6 +1561,13 @@ static void lcl_MoveBorderPropertiesToFrame(std::vector<beans::PropertyValue>& r
aValue.Value = xTextRangeProperties->getPropertyValue(sPropertyName);
if( nProperty < 4 )
xTextRangeProperties->setPropertyValue( sPropertyName, uno::Any(table::BorderLine2()));
+ else if (nProperty > 5)
+ {
+ // Do not duplicate the top/bottom border spacing.
+ // [NOTE: left/right need to be duplicated because of INVERT_BORDER_SPACING]
+ // Hack: a minimal distance is given so left/right shading extends to the edge.
+ xTextRangeProperties->setPropertyValue( sPropertyName, uno::Any(sal_Int32(1)));
+ }
if (aValue.Value.hasValue())
rFrameProperties.push_back(aValue);
}