summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-09-07 09:07:55 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-09-07 13:56:00 +0200
commit76932ec6c45089f3319c4fc211d92d19d92666c3 (patch)
treedfda17c530a2f610e801c29153ff2094d21bc3a7
parent1806691c91b45b3ee5a52efc585930c41c705127 (diff)
tdf#48083 Handle mso_fillBackground directly when processing the shape
And remove the no longer needed special handling in SdrPowerPointImport::ImportPage Follow-up to a43f1ac6c964181cbaa4c889409688197cbf7a2b Change-Id: I0382d5cf93f9e3dfba2b7822032e3eb3cf668a8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156638 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
-rw-r--r--filter/source/msfilter/msdffimp.cxx2
-rw-r--r--filter/source/msfilter/svdfppt.cxx31
-rw-r--r--include/filter/msfilter/svdfppt.hxx3
3 files changed, 4 insertions, 32 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index bc28e62e2b16..e8164dacd6f0 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1471,7 +1471,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
}
}
}
- else if (eXFill == drawing::FillStyle_BITMAP && bUseSlideBackground)
+ else if (eXFill == drawing::FillStyle_NONE && bUseSlideBackground)
{
rSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
XFillUseSlideBackgroundItem aFillBgItem(true);
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index a4442cfb2393..0ef068f94e0c 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1295,13 +1295,6 @@ rtl::Reference<SdrObject> SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData
maFidcls[ nSec ].dgid = rPersistEntry.nDrawingDgId; // insert the correct drawing id;
}
}
- if ( GetPropertyValue( DFF_Prop_fNoFillHitTest, 0 ) & 0x10 )
- {
- if (GetPropertyValue(DFF_Prop_fillType, mso_fillSolid) == mso_fillBackground)
- {
- rData.aBackgroundColoredObjects.push_back( pRet );
- }
- }
}
return pRet;
}
@@ -2903,7 +2896,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
if ( pObj )
{
if ( aProcessData.pTableRowProperties )
- pObj = CreateTable(pObj.get(), aProcessData.pTableRowProperties.get(), aProcessData.rPersistEntry.xSolverContainer.get(), aProcessData.aBackgroundColoredObjects);
+ pObj = CreateTable(pObj.get(), aProcessData.pTableRowProperties.get(), aProcessData.rPersistEntry.xSolverContainer.get());
pRet->NbcInsertObject( pObj.get() );
@@ -2925,23 +2918,6 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
break;
}
- // Handle shapes where the fill matches the background
- // fill (mso_fillBackground).
- if (rSlidePersist.ePageKind == PPT_SLIDEPAGE)
- {
- if (!aProcessData.aBackgroundColoredObjects.empty())
- {
- for (auto const & pObject : aProcessData.aBackgroundColoredObjects)
- {
- SfxItemSet aNewSet(*pObject->GetMergedItemSet().GetPool());
- aNewSet.Put(XFillStyleItem(css::drawing::FillStyle_NONE));
- XFillUseSlideBackgroundItem aFillBgItem(true);
- aNewSet.Put(aFillBgItem);
- pObject->SetMergedItemSet(aNewSet);
- }
- }
- }
-
if ( rSlidePersist.pBObj )
{
// #i99386# transfer the attributes from the temporary BackgroundObject
@@ -7500,8 +7476,7 @@ static void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >
rtl::Reference<SdrObject> SdrPowerPointImport::CreateTable(
SdrObject* pGroup, const sal_uInt32* pTableArry,
- SvxMSDffSolverContainer* pSolverContainer,
- std::vector<rtl::Reference<SdrObject>>& rBackgroundColoredObjects)
+ SvxMSDffSolverContainer* pSolverContainer)
{
rtl::Reference<SdrObject> pRet = pGroup;
@@ -7655,8 +7630,6 @@ rtl::Reference<SdrObject> SdrPowerPointImport::CreateTable(
{
SdrObject* pPartObj = aIter.Next();
removeShapeId(pPartObj);
- // ofz#41510 make sure rBackgroundColoredObjects doesn't contain deleted objects
- std::replace(rBackgroundColoredObjects.begin(), rBackgroundColoredObjects.end(), pPartObj, pRet.get());
}
}
catch( const Exception& )
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index ae5f600a7fa2..76173bf855c4 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -652,8 +652,7 @@ public:
rtl::Reference<SdrObject> CreateTable(
SdrObject* pGroupObject,
const sal_uInt32* pTableArry,
- SvxMSDffSolverContainer* pSolverContainer,
- std::vector<rtl::Reference<SdrObject>>& rBackgroundColoredObjects
+ SvxMSDffSolverContainer* pSolverContainer
);
virtual bool ReadFormControl( tools::SvRef<SotStorage>& rSrc1, css::uno::Reference< css::form::XFormComponent > & rFormComp ) const = 0;
};