From 95f974c26b83f8a4516af07c77ca9ff4be5236ee Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 2 Feb 2026 11:00:02 +0500 Subject: [PATCH] Use ScopedConfigValue testTdf115005_FallBack_Images didn't restore the manually set value. It previously also tested if the setting was read-only; this change drops that check (if it were read-only, the test would fail anyway). If for some reason, testing the read-only status will prove needed, it should be restored as a condition to skip the test. Change-Id: I7376ec4263a0ecefb4c87fbeedefba21e68ee3b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198506 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sd/qa/unit/export-tests-ooxml3.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx index 51dd13644ec2..b7188bfaf8ca 100644 --- a/sd/qa/unit/export-tests-ooxml3.cxx +++ b/sd/qa/unit/export-tests-ooxml3.cxx @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -413,14 +414,8 @@ int SdOOXMLExportTest3::testTdf115005_FallBack_Images(bool bAddReplacementImages // check if fallback images were not created if AddReplacementImages=true/false // set AddReplacementImages - { - std::shared_ptr batch( - comphelper::ConfigurationChanges::create()); - if (!officecfg::Office::Common::Save::Graphic::AddReplacementImages::isReadOnly()) - officecfg::Office::Common::Save::Graphic::AddReplacementImages::set( - bAddReplacementImages, batch); - batch->commit(); - } + ScopedConfigValue aCfg( + bAddReplacementImages); // save the file with already set options save(TestFilter::ODP);