sw/qa/inc/swmodeltestbase.hxx | 1 + sw/qa/unit/swmodeltestbase.cxx | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit c050d4772025ac60fefa0515bc41cf75510e2acd Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Aug 11 09:06:49 2022 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Fri Aug 12 18:45:53 2022 +0200 turn off font combobox preview if SAL_ABORT_ON_NON_APPLICATION_FONT_USE set Change-Id: Ib9c74599afb2b85564de85bf64340315ca0ba4f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138122 Tested-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx index 15980cdfda84..fd610f790908 100644 --- a/sw/qa/inc/swmodeltestbase.hxx +++ b/sw/qa/inc/swmodeltestbase.hxx @@ -103,6 +103,7 @@ protected: sal_uInt32 mnStartTime; utl::TempFile maTempFile; bool mbExported; ///< Does maTempFile already contain something useful? + bool mbFontNameWYSIWYG; protected: diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx index b48a9030011d..a19fb9fa785d 100644 --- a/sw/qa/unit/swmodeltestbase.cxx +++ b/sw/qa/unit/swmodeltestbase.cxx @@ -21,6 +21,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> +#include <officecfg/Office/Common.hxx> #include <rtl/ustrbuf.hxx> #include <sfx2/app.hxx> #include <unotools/mediadescriptor.hxx> @@ -58,6 +59,7 @@ SwModelTestBase::SwModelTestBase(const OUString& pTestDocumentPath, const char* , mpFilter(pFilter) , mnStartTime(0) , mbExported(false) + , mbFontNameWYSIWYG(officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::get()) { maTempFile.EnableKillingFile(); } @@ -68,13 +70,20 @@ void SwModelTestBase::setUp() mxDesktop.set( css::frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory()))); SfxApplication::GetOrCreate(); + std::shared_ptr<comphelper::ConfigurationChanges> xChanges( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::set(false, xChanges); + xChanges->commit(); } void SwModelTestBase::tearDown() { if (mxComponent.is()) mxComponent->dispose(); - + std::shared_ptr<comphelper::ConfigurationChanges> xChanges( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::set(mbFontNameWYSIWYG, xChanges); + xChanges->commit(); test::BootstrapFixture::tearDown(); }