summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2019-12-21 16:10:03 +0300
committerMiklos Vajna <vmiklos@collabora.com>2020-01-03 12:13:12 +0100
commit4ca73073a0d7c62b12a7354f76f8f80adc5d98c1 (patch)
tree61c08cb6ffead3de807882b2c963b7b2d94adc4e /writerfilter/source
parente5f4352d52044957c10f6530f76e97e0ca5cc4b3 (diff)
tdf#129522 SvxShadowItem/writerfilter: allow shadow_NONE overrides
Both editeng and writerfilter were ignoring the case where NONE should override an inherited shadow location. Of course, this situation is very rare. Nearly all unit tests ran when asserting that eLocation is already NONE. The same is true for DOC, except that it is not affected by SvxShadowItem's PutValue problem (and neither is ODT). RTF is not even removing the borderlines themselves, so no point in worrying about the shadow for RTF. Change-Id: I7c1ae67270dde81915daee2f0282aa2074d2ec8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85658 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 3d47c93732e1..4e4fc983db07 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XOOXMLDocumentPropertiesImporter.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/table/BorderLineStyle.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
@@ -1375,9 +1376,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
rContext->Insert( eBorderId, uno::makeAny( pBorderHandler->getBorderLine()) );
if(eBorderDistId)
rContext->Insert(eBorderDistId, uno::makeAny( pBorderHandler->getLineDistance()));
- if (nSprmId == NS_ooxml::LN_CT_PBdr_right && pBorderHandler->getShadow())
+ if ( nSprmId == NS_ooxml::LN_CT_PBdr_right )
{
- table::ShadowFormat aFormat = writerfilter::dmapper::PropertyMap::getShadowFromBorder(pBorderHandler->getBorderLine());
+ table::ShadowFormat aFormat;
+ // Word only allows shadows on visible borders
+ if ( pBorderHandler->getShadow() && pBorderHandler->getBorderLine().LineStyle != table::BorderLineStyle::NONE )
+ aFormat = writerfilter::dmapper::PropertyMap::getShadowFromBorder(pBorderHandler->getBorderLine());
rContext->Insert(PROP_PARA_SHADOW_FORMAT, uno::makeAny(aFormat));
}
}