summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-08-10 14:04:44 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2022-08-11 19:07:57 +0200
commiteca3ce35fe9a346965a32f42d02cb6d3f5a3982f (patch)
tree002b6b39fd53bbc3837ad21e68f06774d67d6427 /editeng
parent7e989259c63946b17cc0c7b765e4fa8261a06507 (diff)
tdf#129631 writerfilter,sw: RTF import of invalid border...
... and export of border on paragraph that clears the border from the paragraph style. The import problem is that a lone \brdrcf17 without any preceding keyword about which border it belongs to (as required by the EBNF in the RTF spec) is apparently handled by Word as overriding/clearing all paragraph borders that may be inherited from the paragraph style. The export problem is that a null SvxBorderLine isn't exported at all, but there needs to be a \brdrnone to override the definition from the style. There was also an API problem that the null SvxBorderLine is wrongly converted to a table::BorderLine2 with LineStyle SOLID. Change-Id: I5fa3857de2ef843f5194e12dd0c3e57bcf1ca52b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138089 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/frmitems.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index c4c79dc0428b..35e1be7b094c 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1387,7 +1387,10 @@ table::BorderLine2 SvxBoxItem::SvxLineToLine(const SvxBorderLine* pLine, bool bC
aLine.LineWidth = sal_uInt32( bConvert ? convertTwipToMm100( pLine->GetWidth( ) ) : pLine->GetWidth( ) );
}
else
+ {
aLine.Color = aLine.InnerLineWidth = aLine.OuterLineWidth = aLine.LineDistance = 0;
+ aLine.LineStyle = table::BorderLineStyle::NONE; // 0 is SOLID!
+ }
return aLine;
}