summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-09-04 18:04:29 +0200
committerJustin Luth <justin_luth@sil.org>2017-09-04 19:25:20 +0200
commit24e453e6018af2e71af784dc9364b5ea70112f29 (patch)
tree64712bb99daa69e73d5afa75c8808e2c128ca8f2 /writerfilter
parente56f61c4637c09afbf125fa02f131b0c49e36351 (diff)
Revert "tdf#111895 writerfilter: avoid hiding shapes behind background"
This reverts commit d21f67fa7fd0360688e083eeb2bbcd57f5414d71. A better fix is commit de0993097cad2fd5819f8bea5ff53cddce7cde41. This patch didn't properly describe the zOrder stuff anyway. The problem technically wasn't with the zOrder - the painting method only made it seem to be so. Thanks to the reviewers for their helpful comments that spurred further areas of research. Change-Id: I586edd189e5b0a25b6e1e64ca42fdf43305997da Reviewed-on: https://gerrit.libreoffice.org/41904 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx5
-rw-r--r--writerfilter/source/dmapper/DomainMapper.hxx1
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx16
3 files changed, 1 insertions, 21 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 41decae20717..fc83d8d31af8 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3778,11 +3778,6 @@ bool DomainMapper::IsStyleSheetImport() const
return m_pImpl->IsStyleSheetImport();
}
-bool DomainMapper::HasPageBackground() const
-{
- return (bool)m_pImpl->m_oBackgroundColor;
-}
-
void DomainMapper::enableInteropGrabBag(const OUString& aName)
{
m_pImpl->m_aInteropGrabBagName = aName;
diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx
index 35a18b445c13..b2b89f1776c1 100644
--- a/writerfilter/source/dmapper/DomainMapper.hxx
+++ b/writerfilter/source/dmapper/DomainMapper.hxx
@@ -110,7 +110,6 @@ public:
bool IsInHeaderFooter() const;
bool IsInTable() const;
bool IsStyleSheetImport() const;
- bool HasPageBackground() const;
/**
@see DomainMapper_Impl::processDeferredCharacterProperties()
*/
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 68d7ac4a1738..65a20747c38f 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -197,7 +197,6 @@ public:
text::WrapTextMode nWrap;
bool bLayoutInCell;
bool bOpaque;
- bool bBehindDoc;
bool bContour;
bool bContourOutside;
WrapPolygon::Pointer_t mpWrapPolygon;
@@ -267,7 +266,6 @@ public:
,nWrap(text::WrapTextMode_NONE)
,bLayoutInCell(false)
,bOpaque( !rDMapper.IsInHeaderFooter() )
- ,bBehindDoc( false )
,bContour(false)
,bContourOutside(true)
,nLeftMargin(319)
@@ -367,10 +365,6 @@ public:
GraphicZOrderHelper* pZOrderHelper = rDomainMapper.graphicZOrderHelper();
xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_Z_ORDER), uno::makeAny(pZOrderHelper->findZOrder(zOrder)));
pZOrderHelper->addItem(xGraphicObjectProperties, zOrder);
-
- // use opaque setting unless it would hide text that should be in front of the shape.
- const bool bPutInForeground = bOpaque && !(bBehindDoc && nWrap == text::WrapTextMode_THROUGH);
- xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_OPAQUE ), uno::makeAny( bPutInForeground ) );
}
}
@@ -604,15 +598,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
break;
case NS_ooxml::LN_CT_Anchor_behindDoc: // 90989; - in background
if( nIntValue > 0 )
- {
- m_pImpl->bBehindDoc = true;
-
- // In MSO, page background is "in hell" zOrder, however
- // in LO, page background is at the same zOrder as the text,
- // so avoid hiding shapes behind the page background.
- if( !m_pImpl->rDomainMapper.HasPageBackground() )
- m_pImpl->bOpaque = false;
- }
+ m_pImpl->bOpaque = false;
break;
case NS_ooxml::LN_CT_Anchor_locked: // 90990; - ignored
break;