summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapper_Impl.cxx
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2024-01-20 19:54:54 -0500
committerJustin Luth <jluth@mail.com>2024-01-22 19:18:48 +0100
commit05e637b36043fac83265bbdfbdba97632a8e939e (patch)
tree9ebc47c16fe614c439bc7abd4bc9f8c1c8ff6b31 /writerfilter/source/dmapper/DomainMapper_Impl.cxx
parent9193e61d3e7b850b3715c848c09434e24855340b (diff)
tdf#154703 writerfilter framePr: avoid unexpected frame borders
This fixes my regressive 7.6 commit 31ea6305b6a763ee48f639562313d9bd109a2923 The text's first border checked (the left one) returned void because the property SetState was DONTCARE. Then it SETS the text's left border to be nothing (I presume to remove the border from the paragraph since it is moving it onto frame). Well, apparently that act of setting one border sets all of them (which makes sense since it would be one box item, and once the box item exists, it has a definition for each border). Therefore on the the next steps of the for loop, the remaining borders will exist (as nothing) and be dutifully moved to the frame. Apparently the default for a frame is a box with DEFINED borders, so omitting the moving of a nothing border resulted in a stray edge. make CppunitTest_sw_ooxmlexport21 \ CPPUNIT_TEST_NAME=testTdf159207_footerFramePrBorder Change-Id: I217d02678b368f70643be91c4466927b4ca53988 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162409 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.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index e92b5c9e76d6..b50fc74c86af 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1729,7 +1729,11 @@ static void lcl_MoveBorderPropertiesToFrame(std::vector<beans::PropertyValue>& r
aValue.Name = sPropertyName;
aValue.Value = xTextRangeProperties->getPropertyValue(sPropertyName);
if( nProperty < 4 )
+ {
xTextRangeProperties->setPropertyValue( sPropertyName, uno::Any(table::BorderLine2()));
+ if (!aValue.Value.hasValue())
+ aValue.Value <<= table::BorderLine2();
+ }
else // border spacing
{
sal_Int32 nDistance = 0;