summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/classes/codecompletecache.cxx13
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx5
-rw-r--r--cui/source/dialogs/toolbarmodedlg.cxx4
-rw-r--r--cui/source/options/optgdlg.cxx2
-rw-r--r--cui/source/options/optjava.cxx8
-rw-r--r--cui/source/options/treeopt.cxx6
-rw-r--r--dbaccess/CppunitTest_dbaccess_hsqlbinary_import.mk4
-rw-r--r--dbaccess/CppunitTest_dbaccess_tdf119625.mk4
-rw-r--r--dbaccess/CppunitTest_dbaccess_tdf126268.mk4
-rw-r--r--dbaccess/Library_dba.mk4
-rw-r--r--dbaccess/qa/unit/hsql_binary_import.cxx19
-rw-r--r--dbaccess/qa/unit/tdf119625.cxx20
-rw-r--r--dbaccess/qa/unit/tdf126268.cxx20
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx5
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx5
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx8
-rw-r--r--framework/source/uielement/menubarmanager.cxx3
-rw-r--r--framework/source/uielement/toolbarmanager.cxx3
-rw-r--r--framework/source/uielement/toolbarmodemenucontroller.cxx4
-rw-r--r--include/basic/codecompletecache.hxx2
-rw-r--r--include/sfx2/sidebar/ResourceManager.hxx4
-rw-r--r--include/svtools/miscopt.hxx3
-rw-r--r--sc/source/core/tool/compiler.cxx5
-rw-r--r--sc/source/core/tool/interpr7.cxx5
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx5
-rw-r--r--sc/source/ui/optdlg/tpdefaults.cxx4
-rw-r--r--sc/source/ui/view/cellsh2.cxx5
-rw-r--r--sfx2/source/appl/appserv.cxx3
-rw-r--r--sfx2/source/dialog/versdlg.cxx4
-rw-r--r--sfx2/source/sidebar/ResourceManager.cxx10
-rw-r--r--starmath/inc/edit.hxx2
-rw-r--r--starmath/inc/view.hxx6
-rw-r--r--starmath/source/edit.cxx3
-rw-r--r--starmath/source/view.cxx9
-rw-r--r--svtools/source/config/miscopt.cxx38
-rw-r--r--sw/Library_msword.mk1
-rw-r--r--sw/Library_swqahelper.mk4
-rw-r--r--sw/Library_vbaswobj.mk4
-rw-r--r--sw/inc/viewopt.hxx5
-rw-r--r--sw/source/ui/config/optpage.cxx6
-rw-r--r--sw/source/ui/misc/bookmark.cxx5
-rw-r--r--sw/source/uibase/config/viewopt.cxx8
42 files changed, 143 insertions, 139 deletions
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx
index 7c54a66e964f..4c0d3523a86e 100644
--- a/basic/source/classes/codecompletecache.cxx
+++ b/basic/source/classes/codecompletecache.cxx
@@ -21,6 +21,7 @@
#include <iostream>
#include <rtl/instance.hxx>
#include <officecfg/Office/BasicIDE.hxx>
+#include <officecfg/Office/Common.hxx>
namespace
{
@@ -39,7 +40,7 @@ CodeCompleteOptions::CodeCompleteOptions()
bool CodeCompleteOptions::IsCodeCompleteOn()
{
- return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsCodeCompleteOn;
+ return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bIsCodeCompleteOn;
}
void CodeCompleteOptions::SetCodeCompleteOn( bool b )
@@ -49,7 +50,7 @@ void CodeCompleteOptions::SetCodeCompleteOn( bool b )
bool CodeCompleteOptions::IsExtendedTypeDeclaration()
{
- return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bExtendedTypeDeclarationOn;
+ return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bExtendedTypeDeclarationOn;
}
void CodeCompleteOptions::SetExtendedTypeDeclaration( bool b )
@@ -59,7 +60,7 @@ void CodeCompleteOptions::SetExtendedTypeDeclaration( bool b )
bool CodeCompleteOptions::IsProcedureAutoCompleteOn()
{
- return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsProcedureAutoCompleteOn;
+ return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bIsProcedureAutoCompleteOn;
}
void CodeCompleteOptions::SetProcedureAutoCompleteOn( bool b )
@@ -69,7 +70,7 @@ void CodeCompleteOptions::SetProcedureAutoCompleteOn( bool b )
bool CodeCompleteOptions::IsAutoCloseQuotesOn()
{
- return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCloseQuotesOn;
+ return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bIsAutoCloseQuotesOn;
}
void CodeCompleteOptions::SetAutoCloseQuotesOn( bool b )
@@ -79,7 +80,7 @@ void CodeCompleteOptions::SetAutoCloseQuotesOn( bool b )
bool CodeCompleteOptions::IsAutoCloseParenthesisOn()
{
- return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn;
+ return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn;
}
void CodeCompleteOptions::SetAutoCloseParenthesisOn( bool b )
@@ -89,7 +90,7 @@ void CodeCompleteOptions::SetAutoCloseParenthesisOn( bool b )
bool CodeCompleteOptions::IsAutoCorrectOn()
{
- return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCorrectOn;
+ return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bIsAutoCorrectOn;
}
void CodeCompleteOptions::SetAutoCorrectOn( bool b )
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index c11c9eee8d8a..8821fe6b5ece 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -25,7 +25,7 @@
#include <TabPageNotifiable.hxx>
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <svtools/miscopt.hxx>
+#include <officecfg/Office/Common.hxx>
#include <osl/diagnose.h>
namespace
@@ -109,8 +109,7 @@ RangeChooserTabPage::RangeChooserTabPage(weld::Container* pPage, weld::DialogCon
m_xEd_TimeStart->connect_changed( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
m_xEd_TimeEnd->connect_changed( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
- SvtMiscOptions aOpts;
- if ( !aOpts.IsExperimentalMode() )
+ if ( !officecfg::Office::Common::Misc::ExperimentalMode::get() )
{
m_xFL_TimeBased->hide();
m_xCB_TimeBased->hide();
diff --git a/cui/source/dialogs/toolbarmodedlg.cxx b/cui/source/dialogs/toolbarmodedlg.cxx
index 7362ad22e54b..8c3e54bbe489 100644
--- a/cui/source/dialogs/toolbarmodedlg.cxx
+++ b/cui/source/dialogs/toolbarmodedlg.cxx
@@ -17,12 +17,12 @@
#include <comphelper/propertysequence.hxx>
#include <comphelper/types.hxx>
#include <dialmgr.hxx>
+#include <officecfg/Office/Common.hxx>
#include <officecfg/Office/UI/ToolbarMode.hxx>
#include <osl/file.hxx>
#include <rtl/bootstrap.hxx>
#include <sfx2/viewfrm.hxx>
#include <strings.hrc>
-#include <svtools/miscopt.hxx>
#include <unotools/confignode.hxx>
#include <vcl/virdev.hxx>
#include <vcl/graphicfilter.hxx>
@@ -116,7 +116,7 @@ ToolbarmodeDialog::ToolbarmodeDialog(weld::Window* pParent)
m_pApply->connect_clicked(LINK(this, ToolbarmodeDialog, OnApplyClick));
m_pApplyAll->connect_clicked(LINK(this, ToolbarmodeDialog, OnApplyClick));
- if (!SvtMiscOptions().IsExperimentalMode())
+ if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
{
m_pRadioButtons[nGroupedbarFull]->set_visible(false);
m_pRadioButtons[nContextualGroups]->set_visible(false);
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index b1b128a000c6..9685564187ea 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -277,7 +277,7 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, weld::DialogController* p
#if !ENABLE_GTK3
m_xPrintDlgFrame->hide();
#else
- if (!SvtMiscOptions().IsExperimentalMode())
+ if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
{
m_xPrintDlgFrame->hide();
}
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 29b17c891c6b..3072fb71b757 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -472,8 +472,10 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ )
if ( m_xExperimentalCB->get_state_changed_from_saved() )
{
- SvtMiscOptions aMiscOpt;
- aMiscOpt.SetExperimentalMode( m_xExperimentalCB->get_active() );
+ std::shared_ptr< comphelper::ConfigurationChanges > xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::ExperimentalMode::set( m_xExperimentalCB->get_active(), xChanges );
+ xChanges->commit();
bModified = true;
RequestRestart( svtools::RESTART_REASON_EXP_FEATURES );
}
@@ -582,7 +584,7 @@ void SvxJavaOptionsPage::Reset( const SfxItemSet* /*rSet*/ )
m_xJavaEnableCB->set_sensitive(false);
#endif
- m_xExperimentalCB->set_active( aMiscOpt.IsExperimentalMode() );
+ m_xExperimentalCB->set_active( officecfg::Office::Common::Misc::ExperimentalMode::get() );
m_xExperimentalCB->save_state();
m_xMacroCB->set_active(aMiscOpt.IsMacroRecorderMode());
m_xMacroCB->save_state();
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index d4250052df3f..e2ec8ed927dd 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -91,7 +91,6 @@
#include <svl/intitem.hxx>
#include <svl/languageoptions.hxx>
#include <svtools/helpopt.hxx>
-#include <svtools/miscopt.hxx>
#include <svx/databaseregistrationui.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/urlobj.hxx>
@@ -1368,9 +1367,8 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
// Disable Basic IDE options, if experimental features are not enabled
if( RID_SVXPAGE_BASICIDE_OPTIONS == nPageId )
{
- SvtMiscOptions aMiscOpt;
- if( ! aMiscOpt.IsExperimentalMode() )
- continue;
+ if( ! officecfg::Office::Common::Misc::ExperimentalMode::get() )
+ continue;
}
AddTabPage( nPageId, sNewTitle, nGroup );
diff --git a/dbaccess/CppunitTest_dbaccess_hsqlbinary_import.mk b/dbaccess/CppunitTest_dbaccess_hsqlbinary_import.mk
index 6f682c040cf2..ee10da23df90 100644
--- a/dbaccess/CppunitTest_dbaccess_hsqlbinary_import.mk
+++ b/dbaccess/CppunitTest_dbaccess_hsqlbinary_import.mk
@@ -61,6 +61,10 @@ $(eval $(call gb_CppunitTest_set_include,dbaccess_hsql_binary_import,\
$$(INCLUDE) \
))
+$(eval $(call gb_CppunitTest_use_custom_headers,dbaccess_hsql_binary_import,\
+ officecfg/registry \
+))
+
$(eval $(call gb_CppunitTest_use_api,dbaccess_hsql_binary_import,\
offapi \
oovbaapi \
diff --git a/dbaccess/CppunitTest_dbaccess_tdf119625.mk b/dbaccess/CppunitTest_dbaccess_tdf119625.mk
index 3420f752dee0..b58aa973df52 100644
--- a/dbaccess/CppunitTest_dbaccess_tdf119625.mk
+++ b/dbaccess/CppunitTest_dbaccess_tdf119625.mk
@@ -61,6 +61,10 @@ $(eval $(call gb_CppunitTest_set_include,dbaccess_tdf119625,\
$$(INCLUDE) \
))
+$(eval $(call gb_CppunitTest_use_custom_headers,dbaccess_tdf119625,\
+ officecfg/registry \
+))
+
$(eval $(call gb_CppunitTest_use_api,dbaccess_tdf119625,\
offapi \
oovbaapi \
diff --git a/dbaccess/CppunitTest_dbaccess_tdf126268.mk b/dbaccess/CppunitTest_dbaccess_tdf126268.mk
index 5d2120ffd54e..bdcec51f2f46 100644
--- a/dbaccess/CppunitTest_dbaccess_tdf126268.mk
+++ b/dbaccess/CppunitTest_dbaccess_tdf126268.mk
@@ -61,6 +61,10 @@ $(eval $(call gb_CppunitTest_set_include,dbaccess_tdf126268,\
$$(INCLUDE) \
))
+$(eval $(call gb_CppunitTest_use_custom_headers,dbaccess_tdf126268,\
+ officecfg/registry \
+))
+
$(eval $(call gb_CppunitTest_use_api,dbaccess_tdf126268,\
offapi \
oovbaapi \
diff --git a/dbaccess/Library_dba.mk b/dbaccess/Library_dba.mk
index e8f65a5e1a6b..90f775d146ef 100644
--- a/dbaccess/Library_dba.mk
+++ b/dbaccess/Library_dba.mk
@@ -20,6 +20,10 @@ $(eval $(call gb_Library_set_include,dba,\
$(eval $(call gb_Library_set_precompiled_header,dba,dbaccess/inc/pch/precompiled_dba))
+$(eval $(call gb_Library_use_custom_headers,dba,\
+ officecfg/registry \
+))
+
$(eval $(call gb_Library_add_defs,dba,\
-DOOO_DLLIMPLEMENTATION_DBA \
))
diff --git a/dbaccess/qa/unit/hsql_binary_import.cxx b/dbaccess/qa/unit/hsql_binary_import.cxx
index 1f5ecb310efc..842e03e74621 100644
--- a/dbaccess/qa/unit/hsql_binary_import.cxx
+++ b/dbaccess/qa/unit/hsql_binary_import.cxx
@@ -13,7 +13,7 @@
#include <cppunit/plugin/TestPlugIn.h>
#include <com/sun/star/sdbc/XRow.hpp>
#include <cppunit/extensions/HelperMacros.h>
-#include <svtools/miscopt.hxx>
+#include <officecfg/Office/Common.hxx>
class HsqlBinaryImportTest : public DBTestBase
{
@@ -37,10 +37,14 @@ void HsqlBinaryImportTest::setUp()
void HsqlBinaryImportTest::testBinaryImport()
{
- SvtMiscOptions aMiscOptions;
- bool oldValue = aMiscOptions.IsExperimentalMode();
+ bool oldValue = officecfg::Office::Common::Misc::ExperimentalMode::get();
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::ExperimentalMode::set(true, xChanges);
+ xChanges->commit();
+ }
- aMiscOptions.SetExperimentalMode(true);
// the migration requires the file to be writable
utl::TempFile const temp(createTempCopy("hsqldb_migration_test.odb"));
uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
@@ -84,7 +88,12 @@ void HsqlBinaryImportTest::testBinaryImport()
closeDocument(uno::Reference<lang::XComponent>(xDocument, uno::UNO_QUERY));
if (!oldValue)
- aMiscOptions.SetExperimentalMode(false);
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::ExperimentalMode::set(false, xChanges);
+ xChanges->commit();
+ }
}
CPPUNIT_TEST_SUITE_REGISTRATION(HsqlBinaryImportTest);
diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index 5d0ec008ff7a..632089f94e9e 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -13,8 +13,8 @@
#include <cppunit/plugin/TestPlugIn.h>
#include <com/sun/star/sdbc/XRow.hpp>
#include <cppunit/extensions/HelperMacros.h>
-#include <svtools/miscopt.hxx>
#include <com/sun/star/util/Time.hpp>
+#include <officecfg/Office/Common.hxx>
class Tdf119625Test : public DBTestBase
{
@@ -57,10 +57,13 @@ const expect_t expect[] = { { 0, 15, 10, 10 }, { 1, 23, 30, 30 }, { 2, 5, 0, 0 }
void Tdf119625Test::testTime()
{
- SvtMiscOptions aMiscOptions;
- bool oldValue = aMiscOptions.IsExperimentalMode();
-
- aMiscOptions.SetExperimentalMode(true);
+ bool oldValue = officecfg::Office::Common::Misc::ExperimentalMode::get();
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::ExperimentalMode::set(true, xChanges);
+ xChanges->commit();
+ }
// the migration requires the file to be writable
utl::TempFile const temp(createTempCopy("tdf119625.odb"));
@@ -105,7 +108,12 @@ void Tdf119625Test::testTime()
closeDocument(uno::Reference<lang::XComponent>(xDocument, uno::UNO_QUERY));
if (!oldValue)
- aMiscOptions.SetExperimentalMode(false);
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::ExperimentalMode::set(false, xChanges);
+ xChanges->commit();
+ }
}
CPPUNIT_TEST_SUITE_REGISTRATION(Tdf119625Test);
diff --git a/dbaccess/qa/unit/tdf126268.cxx b/dbaccess/qa/unit/tdf126268.cxx
index 90039af825de..5cba7c1923f7 100644
--- a/dbaccess/qa/unit/tdf126268.cxx
+++ b/dbaccess/qa/unit/tdf126268.cxx
@@ -13,7 +13,7 @@
#include <cppunit/plugin/TestPlugIn.h>
#include <com/sun/star/sdbc/XRow.hpp>
#include <cppunit/extensions/HelperMacros.h>
-#include <svtools/miscopt.hxx>
+#include <officecfg/Office/Common.hxx>
class Tdf126268Test : public DBTestBase
{
@@ -51,10 +51,13 @@ const expect_t expect[] = {
void Tdf126268Test::testNumbers()
{
- SvtMiscOptions aMiscOptions;
- bool oldValue = aMiscOptions.IsExperimentalMode();
-
- aMiscOptions.SetExperimentalMode(true);
+ bool oldValue = officecfg::Office::Common::Misc::ExperimentalMode::get();
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::ExperimentalMode::set(true, xChanges);
+ xChanges->commit();
+ }
// the migration requires the file to be writable
utl::TempFile const temp(createTempCopy("tdf126268.odb"));
@@ -81,7 +84,12 @@ void Tdf126268Test::testNumbers()
closeDocument(uno::Reference<lang::XComponent>(xDocument, uno::UNO_QUERY));
if (!oldValue)
- aMiscOptions.SetExperimentalMode(false);
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::ExperimentalMode::set(false, xChanges);
+ xChanges->commit();
+ }
}
CPPUNIT_TEST_SUITE_REGISTRATION(Tdf126268Test);
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 7398253f576f..891df4de9dc8 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -54,11 +54,11 @@
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
#include <cppuhelper/typeprovider.hxx>
+#include <officecfg/Office/Common.hxx>
#include <tools/diagnose_ex.h>
#include <osl/diagnose.h>
#include <osl/process.h>
#include <sal/log.hxx>
-#include <svtools/miscopt.hxx>
#include <tools/urlobj.hxx>
#include <unotools/sharedunocomponent.hxx>
#include <rtl/digest.h>
@@ -617,9 +617,8 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
//ignore when we don't have a model. E.g. Mailmerge, data sources, fields...
bIgnoreMigration = true;
}
- SvtMiscOptions aMiscOptions;
- if (!aMiscOptions.IsExperimentalMode())
+ if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
bIgnoreMigration = true;
if(!bIgnoreMigration && m_pImpl->m_sConnectURL == "sdbc:embedded:hsqldb")
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 8256f370cce3..3662148b9462 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -20,9 +20,9 @@
#include <dsntypes.hxx>
#include <unotools/confignode.hxx>
#include <osl/diagnose.h>
-#include <svtools/miscopt.hxx>
#include <tools/wldcrd.hxx>
#include <osl/file.hxx>
+#include <officecfg/Office/Common.hxx>
#include <comphelper/string.hxx>
namespace dbaccess
@@ -285,8 +285,7 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const OUString& _sURL )
OUString ODsnTypeCollection::getEmbeddedDatabase()
{
- SvtMiscOptions aMiscOptions;
- if (aMiscOptions.IsExperimentalMode())
+ if (officecfg::Office::Common::Misc::ExperimentalMode::get())
return "sdbc:embedded:firebird";
else
return "sdbc:embedded:hsqldb";
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 1ad3e8272595..37ac9c5c1ae5 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -30,11 +30,11 @@
#include <svl/stritem.hxx>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <UITools.hxx>
+#include <officecfg/Office/Common.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/confignode.hxx>
#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
-#include <svtools/miscopt.hxx>
#include <sal/log.hxx>
#include <dbwizsetup.hxx>
@@ -142,9 +142,6 @@ namespace dbaui
DisplayedTypes aDisplayedTypes;
::dbaccess::ODsnTypeCollection::TypeIterator aEnd = m_pCollection->end();
-
- SvtMiscOptions aMiscOptions;
-
for ( ::dbaccess::ODsnTypeCollection::TypeIterator aTypeLoop = m_pCollection->begin();
aTypeLoop != aEnd;
++aTypeLoop
@@ -157,7 +154,8 @@ namespace dbaui
if (m_xEmbeddedDBType->find_text(sDisplayName) == -1 &&
dbaccess::ODsnTypeCollection::isEmbeddedDatabase(sURLPrefix))
{
- if( !aMiscOptions.IsExperimentalMode() && sURLPrefix.startsWith("sdbc:embedded:firebird") )
+ if( !officecfg::Office::Common::Misc::ExperimentalMode::get()
+ && sURLPrefix.startsWith("sdbc:embedded:firebird") )
continue;
aDisplayedTypes.emplace_back( sURLPrefix, sDisplayName );
m_bIsDisplayedTypesEmpty = false;
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 27f5ae2931e2..cff2f23a2178 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -44,6 +44,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
+#include <officecfg/Office/Common.hxx>
#include <svtools/menuoptions.hxx>
#include <svtools/javainteractionhandler.hxx>
#include <uno/current_context.hxx>
@@ -1329,7 +1330,7 @@ void MenuBarManager::FillMenu(
}
if (!aCommandURL.isEmpty() && vcl::CommandInfoProvider::IsExperimental(aCommandURL, rModuleIdentifier) &&
- !SvtMiscOptions().IsExperimentalMode())
+ !officecfg::Office::Common::Misc::ExperimentalMode::get())
{
continue;
}
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index ea55656249ca..13e0efca691e 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -24,6 +24,7 @@
#include <uielement/toolbarmanager.hxx>
#include <framework/generictoolbarcontroller.hxx>
+#include <officecfg/Office/Common.hxx>
#include <uielement/styletoolbarcontroller.hxx>
#include <properties.h>
#include <framework/sfxhelperfunctions.hxx>
@@ -1005,7 +1006,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
}
if (!aCommandURL.isEmpty() && vcl::CommandInfoProvider::IsExperimental(aCommandURL, m_aModuleIdentifier) &&
- !SvtMiscOptions().IsExperimentalMode())
+ !officecfg::Office::Common::Misc::ExperimentalMode::get())
{
continue;
}
diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx
index a03d31100efa..6faa4036efc3 100644
--- a/framework/source/uielement/toolbarmodemenucontroller.cxx
+++ b/framework/source/uielement/toolbarmodemenucontroller.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/util/XURLTransformer.hpp>
+#include <officecfg/Office/Common.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <vcl/menu.hxx>
#include <vcl/svapp.hxx>
@@ -131,7 +132,6 @@ void ToolbarModeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
const Sequence<OUString> aModeNodeNames (aModesNode.getNodeNames());
const sal_Int32 nCount(aModeNodeNames.getLength());
- SvtMiscOptions aMiscOptions;
tools::Long nCountToolbar = 0;
for ( sal_Int32 nReadIndex = 0; nReadIndex < nCount; ++nReadIndex )
@@ -147,7 +147,7 @@ void ToolbarModeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
bool hasNotebookbar = comphelper::getBOOL( aModeNode.getNodeValue( "HasNotebookbar" ) );
// Allow Notebookbar only in experimental mode
- if ( isExperimental && !aMiscOptions.IsExperimentalMode() )
+ if ( isExperimental && !officecfg::Office::Common::Misc::ExperimentalMode::get() )
continue;
if (!hasNotebookbar)
nCountToolbar++;
diff --git a/include/basic/codecompletecache.hxx b/include/basic/codecompletecache.hxx
index 8f4b4a565c1c..37ab4a499a16 100644
--- a/include/basic/codecompletecache.hxx
+++ b/include/basic/codecompletecache.hxx
@@ -23,7 +23,6 @@
#include <config_options.h>
#include <basic/basicdllapi.h>
#include <rtl/ustring.hxx>
-#include <svtools/miscopt.hxx>
#include <unordered_map>
typedef std::unordered_map< OUString, OUString > CodeCompleteVarTypes;
@@ -44,7 +43,6 @@ private:
bool bIsAutoCloseParenthesisOn;
bool bIsAutoCorrectOn;
bool bExtendedTypeDeclarationOn;
- SvtMiscOptions aMiscOptions;
public:
CodeCompleteOptions();
diff --git a/include/sfx2/sidebar/ResourceManager.hxx b/include/sfx2/sidebar/ResourceManager.hxx
index 97987ea1a86b..68c208f7b603 100644
--- a/include/sfx2/sidebar/ResourceManager.hxx
+++ b/include/sfx2/sidebar/ResourceManager.hxx
@@ -21,8 +21,8 @@
#include <unotools/confignode.hxx>
#include <map>
+#include <vector>
#include <set>
-#include <svtools/miscopt.hxx>
namespace com::sun::star::frame { class XController; }
namespace com::sun::star::frame { class XModel; }
@@ -107,8 +107,6 @@ private:
mutable std::set<OUString> maProcessedApplications;
std::map<OUString, OUString> maLastActiveDecks;
- SvtMiscOptions maMiscOptions;
-
void ReadDeckList();
void ReadPanelList();
void ReadLastActive();
diff --git a/include/svtools/miscopt.hxx b/include/svtools/miscopt.hxx
index d981d8a2846c..8fb276063a1b 100644
--- a/include/svtools/miscopt.hxx
+++ b/include/svtools/miscopt.hxx
@@ -86,9 +86,6 @@ class SVT_DLLPUBLIC SvtMiscOptions final : public utl::detail::Options
void SetShowLinkWarningDialog( bool bSet );
bool IsShowLinkWarningDialogReadOnly() const;
- void SetExperimentalMode( bool bSet );
- bool IsExperimentalMode() const;
-
void SetMacroRecorderMode( bool bSet );
bool IsMacroRecorderMode() const;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 97a9bf2d3040..6cdc10952c59 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -48,7 +48,6 @@
#include <tools/urlobj.hxx>
#include <rtl/math.hxx>
#include <rtl/ustring.hxx>
-#include <svtools/miscopt.hxx>
#include <stdlib.h>
#include <string.h>
#include <math.h>
@@ -75,6 +74,7 @@
#include <tokenarray.hxx>
#include <scmatrix.hxx>
#include <tokenstringcontext.hxx>
+#include <officecfg/Office/Common.hxx>
using namespace formula;
using namespace ::com::sun::star;
@@ -4304,8 +4304,7 @@ bool ScCompiler::NextNewToken( bool bInArray )
bMayBeFuncName = rtl::isAsciiAlpha( cSymbol[0] );
if (!bMayBeFuncName && (cSymbol[0] == '_' && cSymbol[1] == '_') && !utl::ConfigManager::IsFuzzing())
{
- SvtMiscOptions aOpt;
- bMayBeFuncName = aOpt.IsExperimentalMode();
+ bMayBeFuncName = officecfg::Office::Common::Misc::ExperimentalMode::get();
}
bAsciiNonAlnum = !bMayBeFuncName && !rtl::isAsciiDigit( cSymbol[0] );
diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
index 40fae3f3a9d0..b615830e4e56 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -16,13 +16,13 @@
#include <formula/errorcodes.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/linkmgr.hxx>
-#include <svtools/miscopt.hxx>
#include <tools/urlobj.hxx>
#include <com/sun/star/ucb/XSimpleFileAccess3.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/io/XInputStream.hpp>
+#include <officecfg/Office/Common.hxx>
#include <libxml/xpath.h>
#include <datastreamgettime.hxx>
#include <dpobject.hxx>
@@ -456,8 +456,7 @@ void ScInterpreter::ScDebugVar()
// users. This is a convenient way to extract arbitrary internal state to
// a cell for easier debugging.
- SvtMiscOptions aMiscOptions;
- if (!aMiscOptions.IsExperimentalMode())
+ if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
{
PushError(FormulaError::NoName);
return;
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 636fa9dcc75c..96993618831c 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -116,7 +116,6 @@
#include <comphelper/extract.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdocapt.hxx>
-#include <svtools/miscopt.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/processfactory.hxx>
@@ -155,6 +154,7 @@
#include <memory>
#include <vector>
#include <vbahelper/vbaaccesshelper.hxx>
+#include <officecfg/Office/Common.hxx>
namespace com::sun::star::uno { class XComponentContext; }
@@ -4329,8 +4329,7 @@ void ScXMLExport::WriteDataStream()
if (!pDoc)
return;
- SvtMiscOptions aMiscOptions;
- if (!aMiscOptions.IsExperimentalMode())
+ if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
// Export this only in experimental mode.
return;
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index fce701996f73..d1aaacf85ba0 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -13,7 +13,7 @@
#include <sc.hrc>
#include <defaultsoptions.hxx>
#include <document.hxx>
-#include <svtools/miscopt.hxx>
+#include <officecfg/Office/Common.hxx>
ScTpDefaultsOptions::ScTpDefaultsOptions(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rCoreSet)
: SfxTabPage(pPage, pController, "modules/scalc/ui/optdefaultpage.ui", "OptDefaultPage", &rCoreSet)
@@ -24,7 +24,7 @@ ScTpDefaultsOptions::ScTpDefaultsOptions(weld::Container* pPage, weld::DialogCon
m_xEdNSheets->connect_changed( LINK(this, ScTpDefaultsOptions, NumModifiedHdl) );
m_xEdSheetPrefix->connect_changed( LINK(this, ScTpDefaultsOptions, PrefixModifiedHdl) );
m_xEdSheetPrefix->connect_focus_in( LINK(this, ScTpDefaultsOptions, PrefixEditOnFocusHdl) );
- if (!SvtMiscOptions().IsExperimentalMode())
+ if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
m_xEdJumboSheets->hide();
}
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 5866cad52d6b..f71b8f3678e4 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -31,7 +31,6 @@
#include <svl/zforlist.hxx>
#include <svl/stritem.hxx>
#include <svl/visitem.hxx>
-#include <svtools/miscopt.hxx>
#include <unotools/moduleoptions.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
@@ -65,6 +64,7 @@
#include <queryentry.hxx>
#include <markdata.hxx>
#include <documentlinkmgr.hxx>
+#include <officecfg/Office/Common.hxx>
#include <o3tl/make_shared.hxx>
#include <memory>
@@ -1199,8 +1199,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
case SID_DATA_STREAMS_PLAY:
case SID_DATA_STREAMS_STOP:
{
- SvtMiscOptions aMiscOptions;
- if ( !aMiscOptions.IsExperimentalMode() )
+ if ( !officecfg::Office::Common::Misc::ExperimentalMode::get() )
rSet.DisableItem( nWhich );
}
break;
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 6e7ab0a96298..d44927415ed1 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1130,8 +1130,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
case SID_TEMPLATE_MANAGER:
{
- SvtMiscOptions aMiscOptions;
- if ( !aMiscOptions.IsExperimentalMode() )
+ if ( !officecfg::Office::Common::Misc::ExperimentalMode::get() )
{
rSet.DisableItem( nWhich );
rSet.Put( SfxVisibilityItem( nWhich, false ) );
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 68abca31ba61..256b328e4978 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/util/RevisionTag.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
+#include <officecfg/Office/Common.hxx>
#include <unotools/localedatawrapper.hxx>
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
@@ -242,8 +243,7 @@ void SfxVersionDialog::Init_Impl()
m_xDeleteButton->set_sensitive(false);
m_xCompareButton->set_sensitive(false);
- SvtMiscOptions miscOptions;
- if ( !miscOptions.IsExperimentalMode() )
+ if ( !officecfg::Office::Common::Misc::ExperimentalMode::get() )
m_xCmisButton->hide( );
uno::Reference<document::XCmisDocument> xCmisDoc(pObjShell->GetModel(), uno::UNO_QUERY);
if (xCmisDoc && xCmisDoc->isVersionable())
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index 6a383966c403..a1ff9752e1e0 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -22,6 +22,7 @@
#include <sfx2/sidebar/ResourceManager.hxx>
#include <sidebar/Tools.hxx>
+#include <officecfg/Office/Common.hxx>
#include <officecfg/Office/UI/Sidebar.hxx>
#include <unotools/confignode.hxx>
#include <comphelper/lok.hxx>
@@ -99,8 +100,7 @@ css::uno::Sequence<OUString> BuildContextList (const ContextList& rContextList)
ResourceManager::ResourceManager()
: maDecks(),
maPanels(),
- maProcessedApplications(),
- maMiscOptions()
+ maProcessedApplications()
{
ReadDeckList();
ReadPanelList();
@@ -131,7 +131,7 @@ std::shared_ptr<DeckDescriptor> ResourceManager::ImplGetDeckDescriptor(const OUS
{
for (auto const& deck : maDecks)
{
- if (deck->mbExperimental && !maMiscOptions.IsExperimentalMode())
+ if (deck->mbExperimental && !officecfg::Office::Common::Misc::ExperimentalMode::get())
continue;
if (deck->msId == rsDeckId)
return deck;
@@ -170,7 +170,7 @@ const ResourceManager::DeckContextDescriptorContainer& ResourceManager::GetMatch
std::multimap<sal_Int32,DeckContextDescriptor> aOrderedIds;
for (auto const& deck : maDecks)
{
- if (deck->mbExperimental && !maMiscOptions.IsExperimentalMode())
+ if (deck->mbExperimental && !officecfg::Office::Common::Misc::ExperimentalMode::get())
continue;
const DeckDescriptor& rDeckDescriptor (*deck);
@@ -207,7 +207,7 @@ const ResourceManager::PanelContextDescriptorContainer& ResourceManager::GetMatc
for (auto const& panel : maPanels)
{
const PanelDescriptor& rPanelDescriptor (*panel);
- if (rPanelDescriptor.mbExperimental && !maMiscOptions.IsExperimentalMode())
+ if (rPanelDescriptor.mbExperimental && !officecfg::Office::Common::Misc::ExperimentalMode::get())
continue;
if ( rPanelDescriptor.msDeckId != sDeckId )
continue;
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index 43ef648ddd95..421554834314 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -123,7 +123,7 @@ public:
void DeleteEditView();
bool HandleWheelCommands(const CommandEvent& rCEvt);
- bool IsInlineEditEnabled();
+ static bool IsInlineEditEnabled();
void StartCursorMove();
// for Accessibility
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index eab940b2ed86..ee4e17b10767 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -30,7 +30,6 @@
#include <sfx2/ctrlitem.hxx>
#include <sfx2/shell.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svtools/miscopt.hxx>
#include <vcl/timer.hxx>
#include "document.hxx"
#include "edit.hxx"
@@ -108,7 +107,7 @@ private:
using Window::SetCursor;
void SetCursor(const SmNode *pNode);
void SetCursor(const tools::Rectangle &rRect);
- bool IsInlineEditEnabled() const;
+ static bool IsInlineEditEnabled();
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
virtual void KeyInput(const KeyEvent& rKEvt) override;
@@ -213,7 +212,6 @@ class SmViewShell: public SfxViewShell
{
std::unique_ptr<sfx2::DocumentInserter> mpDocInserter;
std::unique_ptr<SfxRequest> mpRequest;
- SvtMiscOptions maOpts;
VclPtr<SmGraphicWindow> mpGraphic;
SmGraphicController maGraphicController;
OUString maStatusText;
@@ -309,7 +307,7 @@ public:
void SetInsertIntoEditWindow(bool bEditWindowHadFocusLast){
mbInsertIntoEditWindow = bEditWindowHadFocusLast;
}
- bool IsInlineEditEnabled() const;
+ static bool IsInlineEditEnabled();
private:
void ZoomByItemSet(const SfxItemSet *pSet);
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index ef1da5bca1ab..a425e20f4b0e 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -68,8 +68,7 @@ void SmGetLeftSelectionPart(const ESelection &rSel,
bool SmEditWindow::IsInlineEditEnabled()
{
- SmViewShell *pView = GetView();
- return pView && pView->IsInlineEditEnabled();
+ return SmViewShell::IsInlineEditEnabled();
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index b76012a6b084..638a41b2daa2 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -28,6 +28,7 @@
#include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx>
#include <i18nutil/unicode.hxx>
+#include <officecfg/Office/Common.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
@@ -204,9 +205,9 @@ void SmGraphicWindow::MouseMove(const MouseEvent &rMEvt)
}
}
-bool SmGraphicWindow::IsInlineEditEnabled() const
+bool SmGraphicWindow::IsInlineEditEnabled()
{
- return pViewShell->IsInlineEditEnabled();
+ return SmViewShell::IsInlineEditEnabled();
}
void SmGraphicWindow::GetFocus()
@@ -1983,9 +1984,9 @@ void SmViewShell::Notify( SfxBroadcaster& , const SfxHint& rHint )
}
}
-bool SmViewShell::IsInlineEditEnabled() const
+bool SmViewShell::IsInlineEditEnabled()
{
- return maOpts.IsExperimentalMode();
+ return officecfg::Office::Common::Misc::ExperimentalMode::get();
}
void SmViewShell::ZoomByItemSet(const SfxItemSet *pSet)
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index e6cb2bce00f1..dc01682d344e 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -60,14 +60,12 @@ using namespace ::com::sun::star;
#define PROPERTYHANDLE_SHOWLINKWARNINGDIALOG 6
#define PROPERTYNAME_DISABLEUICUSTOMIZATION "DisableUICustomization"
#define PROPERTYHANDLE_DISABLEUICUSTOMIZATION 7
-#define PROPERTYNAME_EXPERIMENTALMODE "ExperimentalMode"
-#define PROPERTYHANDLE_EXPERIMENTALMODE 8
#define PROPERTYNAME_MACRORECORDERMODE "MacroRecorderMode"
-#define PROPERTYHANDLE_MACRORECORDERMODE 9
+#define PROPERTYHANDLE_MACRORECORDERMODE 8
#define PROPERTYNAME_SIDEBARICONSIZE "SidebarIconSize"
-#define PROPERTYHANDLE_SIDEBARICONSIZE 10
+#define PROPERTYHANDLE_SIDEBARICONSIZE 9
#define PROPERTYNAME_NOTEBOOKBARICONSIZE "NotebookbarIconSize"
-#define PROPERTYHANDLE_NOTEBOOKBARICONSIZE 11
+#define PROPERTYHANDLE_NOTEBOOKBARICONSIZE 10
class SvtMiscOptions_Impl : public ConfigItem
{
@@ -91,7 +89,6 @@ private:
bool m_bShowLinkWarningDialog;
bool m_bIsShowLinkWarningDialogRO;
bool m_bDisableUICustomization;
- bool m_bExperimentalMode;
bool m_bMacroRecorderMode;
bool m_bIconThemeWasSetAutomatically;
@@ -136,12 +133,6 @@ public:
bool DisableUICustomization() const
{ return m_bDisableUICustomization; }
- void SetExperimentalMode( bool bSet )
- { m_bExperimentalMode = bSet; SetModified(); }
-
- bool IsExperimentalMode() const
- { return m_bExperimentalMode; }
-
void SetMacroRecorderMode( bool bSet )
{ m_bMacroRecorderMode = bSet; SetModified(); }
@@ -254,7 +245,6 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
, m_bIsUseSystemPrintDialogRO( false )
, m_bShowLinkWarningDialog( true )
, m_bIsShowLinkWarningDialogRO( false )
- , m_bExperimentalMode( false )
, m_bMacroRecorderMode( false )
, m_bIconThemeWasSetAutomatically( false )
{
@@ -379,12 +369,6 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
OSL_FAIL("Wrong type of \"Misc\\DisableUICustomization\"!" );
break;
}
- case PROPERTYHANDLE_EXPERIMENTALMODE :
- {
- if( !(seqValues[nProperty] >>= m_bExperimentalMode) )
- OSL_FAIL("Wrong type of \"Misc\\ExperimentalMode\"!" );
- break;
- }
case PROPERTYHANDLE_MACRORECORDERMODE :
{
if( !(seqValues[nProperty] >>= m_bMacroRecorderMode) )
@@ -675,11 +659,6 @@ void SvtMiscOptions_Impl::ImplCommit()
seqValues[nProperty] <<= m_bDisableUICustomization;
break;
}
- case PROPERTYHANDLE_EXPERIMENTALMODE :
- {
- seqValues[nProperty] <<= m_bExperimentalMode;
- break;
- }
case PROPERTYHANDLE_MACRORECORDERMODE :
{
seqValues[nProperty] <<= m_bMacroRecorderMode;
@@ -706,7 +685,6 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames()
PROPERTYNAME_USESYSTEMPRINTDIALOG,
PROPERTYNAME_SHOWLINKWARNINGDIALOG,
PROPERTYNAME_DISABLEUICUSTOMIZATION,
- PROPERTYNAME_EXPERIMENTALMODE,
PROPERTYNAME_MACRORECORDERMODE,
PROPERTYNAME_SIDEBARICONSIZE,
PROPERTYNAME_NOTEBOOKBARICONSIZE
@@ -866,16 +844,6 @@ bool SvtMiscOptions::IsShowLinkWarningDialogReadOnly() const
return m_pImpl->IsShowLinkWarningDialogReadOnly();
}
-void SvtMiscOptions::SetExperimentalMode( bool bSet )
-{
- m_pImpl->SetExperimentalMode( bSet );
-}
-
-bool SvtMiscOptions::IsExperimentalMode() const
-{
- return m_pImpl->IsExperimentalMode();
-}
-
void SvtMiscOptions::SetMacroRecorderMode( bool bSet )
{
m_pImpl->SetMacroRecorderMode( bSet );
diff --git a/sw/Library_msword.mk b/sw/Library_msword.mk
index 74c66073c83f..74a7cf0b539a 100644
--- a/sw/Library_msword.mk
+++ b/sw/Library_msword.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_Library_Library,msword))
$(eval $(call gb_Library_set_componentfile,msword,sw/util/msword))
$(eval $(call gb_Library_use_custom_headers,msword,\
+ officecfg/registry \
oox/generated \
))
diff --git a/sw/Library_swqahelper.mk b/sw/Library_swqahelper.mk
index 6c089e63cf60..b32fdcafb37b 100644
--- a/sw/Library_swqahelper.mk
+++ b/sw/Library_swqahelper.mk
@@ -16,6 +16,10 @@ $(eval $(call gb_Library_set_include,swqahelper,\
$$(INCLUDE) \
))
+$(eval $(call gb_Library_use_custom_headers,swqahelper,\
+ officecfg/registry \
+))
+
$(eval $(call gb_Library_use_externals,swqahelper, \
boost_headers \
cppunit \
diff --git a/sw/Library_vbaswobj.mk b/sw/Library_vbaswobj.mk
index 822c986898d1..a73b5d1721f1 100644
--- a/sw/Library_vbaswobj.mk
+++ b/sw/Library_vbaswobj.mk
@@ -23,6 +23,10 @@ $(eval $(call gb_Library_set_componentfile,vbaswobj,sw/util/vbaswobj))
$(eval $(call gb_Library_set_precompiled_header,vbaswobj,sw/inc/pch/precompiled_vbaswobj))
+$(eval $(call gb_Library_use_custom_headers,vbaswobj,\
+ officecfg/registry \
+))
+
$(eval $(call gb_Library_set_include,vbaswobj,\
-I$(SRCDIR)/sw/source/uibase/inc \
-I$(SRCDIR)/sw/inc \
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index f1049e6b317d..21916ddb56bd 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -28,8 +28,6 @@
#include <sfx2/zoomitem.hxx>
#include "swdllapi.h"
-#include <svtools/miscopt.hxx>
-
class SwRect;
namespace vcl { class Window; }
class OutputDevice;
@@ -302,8 +300,7 @@ public:
{ SetCoreOption(b, ViewOptFlags1::UseHeaderFooterMenu); }
//show/hide outline content visibility button
- bool IsShowOutlineContentVisibilityButton() const
- { SvtMiscOptions aMiscOptions; return aMiscOptions.IsExperimentalMode() && (m_nCoreOptions & ViewOptFlags1::ShowOutlineContentVisibilityButton); }
+ bool IsShowOutlineContentVisibilityButton() const;
void SetShowOutlineContentVisibilityButton(bool b)
{ SetCoreOption(b, ViewOptFlags1::ShowOutlineContentVisibilityButton); }
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 54f5729206e8..b6cf6eac134c 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -50,6 +50,7 @@
#include <editeng/fontitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/svxenum.hxx>
+#include <officecfg/Office/Common.hxx>
#include <sal/macros.h>
#include <sfx2/dialoghelper.hxx>
#include <sfx2/dispatch.hxx>
@@ -68,8 +69,6 @@
#include <optload.hxx>
-#include <svtools/miscopt.hxx>
-
using namespace ::com::sun::star;
namespace {
@@ -107,8 +106,7 @@ SwContentOptPage::SwContentOptPage(weld::Container* pPage, weld::DialogControlle
, m_xFieldHiddenCB(m_xBuilder->weld_check_button("hiddentextfield"))
, m_xFieldHiddenParaCB(m_xBuilder->weld_check_button("hiddenparafield"))
{
- SvtMiscOptions aMiscOptions;
- if (!aMiscOptions.IsExperimentalMode())
+ if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
m_xShowOutlineContentVisibilityButton->hide();
/* This part is visible only with Writer/Web->View dialogue. */
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 33cdbee276fa..2d0d1eef4d13 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -23,6 +23,7 @@
#include <vcl/weld.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/text/XBookmarksSupplier.hpp>
+#include <officecfg/Office/Common.hxx>
#include <swabstdlg.hxx>
#include <swuiexp.hxx>
@@ -33,7 +34,6 @@
#include <docsh.hxx>
#include <ndtxt.hxx>
#include <strings.hrc>
-#include <svtools/miscopt.hxx>
#include <IDocumentSettingAccess.hxx>
using namespace ::com::sun::star;
@@ -329,8 +329,7 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS)
m_xForbiddenChars->set_label(SwResId(STR_BOOKMARK_FORBIDDENCHARS) + " " + BookmarkTable::aForbiddenChars);
m_xForbiddenChars->set_visible(false);
- SvtMiscOptions aMiscOpt;
- if ( !aMiscOpt.IsExperimentalMode() )
+ if ( !officecfg::Office::Common::Misc::ExperimentalMode::get() )
{
m_xHideCB->set_visible( false );
m_xConditionFT->set_visible( false );
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index 654f9d51713e..07db7f778d77 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -22,6 +22,7 @@
#include <editeng/editids.hrc>
#include <editeng/svxacorr.hxx>
+#include <officecfg/Office/Common.hxx>
#include <unotools/localedatawrapper.hxx>
#include <vcl/outdev.hxx>
#include <vcl/window.hxx>
@@ -95,6 +96,13 @@ bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
;
}
+bool SwViewOption::IsShowOutlineContentVisibilityButton() const
+{
+ return officecfg::Office::Common::Misc::ExperimentalMode::get() &&
+ (m_nCoreOptions & ViewOptFlags1::ShowOutlineContentVisibilityButton);
+}
+
+
void SwViewOption::DrawRect( OutputDevice *pOut,
const SwRect &rRect, ::Color nCol )
{