diff options
author | Justin Luth <justin.luth@collabora.com> | 2023-04-13 10:04:24 -0400 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2023-04-14 16:55:05 +0200 |
commit | a24d461d736de0a29bb8ef2a20b57db4836cda3e (patch) | |
tree | 12b674072bea3fe2cc26982c05950eed20fae968 /writerfilter/source/dmapper/DomainMapper_Impl.cxx | |
parent | 19ecb4a390bc0bc6dad6688cdc2b70a8d05bcde2 (diff) |
tdf#154703 writerfilter framePr: RTF != INVERT_BORDER_SPACING
Change-Id: I839b187f8e5822fb162255595aeeeac36427cb5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150356
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapper_Impl.cxx')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 07a475485eca..068347f52347 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1528,7 +1528,8 @@ bool DomainMapper_Impl::isParaSdtEndDeferred() const static void lcl_MoveBorderPropertiesToFrame(std::vector<beans::PropertyValue>& rFrameProperties, uno::Reference<text::XTextRange> const& xStartTextRange, - uno::Reference<text::XTextRange> const& xEndTextRange ) + uno::Reference<text::XTextRange> const& xEndTextRange, + bool bIsRTFImport) { try { @@ -1561,10 +1562,10 @@ 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) + else if (nProperty > 5 || bIsRTFImport) { + // left4/right5 need to be duplicated because of INVERT_BORDER_SPACING (DOCX only) // Do not duplicate the top6/bottom7 border spacing. - // left4/right5 need to be duplicated because of INVERT_BORDER_SPACING aValue.Value <<= sal_Int32(0); } if (aValue.Value.hasValue()) @@ -1841,7 +1842,8 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion(bool bPreventOverlap) lcl_MoveBorderPropertiesToFrame(aFrameProperties, rAppendContext.pLastParagraphProperties->GetStartingRange(), - rAppendContext.pLastParagraphProperties->GetEndingRange()); + rAppendContext.pLastParagraphProperties->GetEndingRange(), + IsRTFImport()); //frame conversion has to be executed after table conversion, not now RegisterFrameConversion(rAppendContext.pLastParagraphProperties->GetStartingRange(), |