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 <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Ilmari Lauhakangas
2025-09-01 19:58:49 +02:00
parent 62846d27a2
commit 0e087513de
2 changed files with 31 additions and 2 deletions
@@ -2194,7 +2194,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">
+30 -1
View File
@@ -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, {});