officecfg/registry/schema/org/openoffice/Office/Writer.xcs | 2 sw/qa/extras/uiwriter/uiwriter9.cxx | 31 ++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-)
New commits: commit 01a4db02715ff12bfed0425784eccfca9ac47d41 Author: Ilmari Lauhakangas <[email protected]> AuthorDate: Sun Aug 31 12:44:18 2025 +0300 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Sep 2 09:47:21 2025 +0200 tdf#151710 Don't activate Enclose with characters by default It is disruptive for non-power users, who then have trouble finding how to turn it off. Change-Id: Ib0d849d93794f797aca03d68ead4ef605667aa9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190431 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> (cherry picked from commit 0e087513de7158fb3dbc192425782e5654fbc08c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190505 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs index 880323bdcd75..8112f92e583d 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs @@ -2187,7 +2187,7 @@ <desc>Specifies whether selected text will be enclosed with parentheses, square brackets, curly braces or quotation marks, depending on which button is pressed.</desc> <label>Enclose with characters</label> </info> - <value>true</value> + <value>false</value> </prop> </group> <group oor:name="Revision"> diff --git a/sw/qa/extras/uiwriter/uiwriter9.cxx b/sw/qa/extras/uiwriter/uiwriter9.cxx index d5e02a24de72..ef1ad2deb2ae 100644 --- a/sw/qa/extras/uiwriter/uiwriter9.cxx +++ b/sw/qa/extras/uiwriter/uiwriter9.cxx @@ -606,9 +606,18 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf165351) CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf151710) { + // Turn "Enclose with characters" on temporarily + std::shared_ptr<comphelper::ConfigurationChanges> pBatch( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Writer::FmtAidsAutocomplete::EncloseWithCharacters::set(true, pBatch); + pBatch->commit(); + comphelper::ScopeGuard _([&] { + officecfg::Office::Writer::FmtAidsAutocomplete::EncloseWithCharacters::set(false, pBatch); + pBatch->commit(); + }); + createSwDoc(); - // Check that the particular setting is turned on by default const SwViewOption* pVwOpt = getSwDocShell()->GetWrtShell()->GetViewOptions(); CPPUNIT_ASSERT(pVwOpt); CPPUNIT_ASSERT(pVwOpt->IsEncloseWithCharactersOn()); @@ -687,6 +696,16 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf151710) CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf167132) { + // Turn "Enclose with characters" on temporarily + std::shared_ptr<comphelper::ConfigurationChanges> pBatch( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Writer::FmtAidsAutocomplete::EncloseWithCharacters::set(true, pBatch); + pBatch->commit(); + comphelper::ScopeGuard _([&] { + officecfg::Office::Writer::FmtAidsAutocomplete::EncloseWithCharacters::set(false, pBatch); + pBatch->commit(); + }); + // Given a document with several paragraphs, and a formula object createSwDoc("text-with-formula.fodt"); CPPUNIT_ASSERT_EQUAL(3, getParagraphs()); @@ -762,6 +781,16 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf167132) CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf167133) { + // Turn "Enclose with characters" on temporarily + std::shared_ptr<comphelper::ConfigurationChanges> pBatch( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Writer::FmtAidsAutocomplete::EncloseWithCharacters::set(true, pBatch); + pBatch->commit(); + comphelper::ScopeGuard _([&] { + officecfg::Office::Writer::FmtAidsAutocomplete::EncloseWithCharacters::set(false, pBatch); + pBatch->commit(); + }); + // Given a document with a single paragraph, having a formula object createSwDoc("text-with-formula-one-paragraph.fodt"); dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
