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 <mike.kaganski@collabora.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <editeng/unoprnms.hxx>
|
||||
#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
|
||||
#include <com/sun/star/drawing/FillStyle.hpp>
|
||||
#include <test/commontesttools.hxx>
|
||||
|
||||
#include <sdpage.hxx>
|
||||
|
||||
@@ -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<comphelper::ConfigurationChanges> batch(
|
||||
comphelper::ConfigurationChanges::create());
|
||||
if (!officecfg::Office::Common::Save::Graphic::AddReplacementImages::isReadOnly())
|
||||
officecfg::Office::Common::Save::Graphic::AddReplacementImages::set(
|
||||
bAddReplacementImages, batch);
|
||||
batch->commit();
|
||||
}
|
||||
ScopedConfigValue<officecfg::Office::Common::Save::Graphic::AddReplacementImages> aCfg(
|
||||
bAddReplacementImages);
|
||||
|
||||
// save the file with already set options
|
||||
save(TestFilter::ODP);
|
||||
|
||||
Reference in New Issue
Block a user