summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-10-31 14:53:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-01 17:11:17 +0100
commitfabaabbd01c84cbdea465382e42387a452b54046 (patch)
tree29f597f61a9afc6d5fbb2f7e14c1a50cc491ea0d /desktop
parent6e81dad4c2b23017cb0c996a4ab9a81e24fab16f (diff)
use officecfg for UseSystemFileDialog
Change-Id: I1419af229a67d6ebb1cf2c63757656beb3f512db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105142 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 19883d351691..c54aea9dd4f7 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -98,7 +98,6 @@
#include <osl/process.h>
#include <rtl/byteseq.hxx>
#include <unotools/pathoptions.hxx>
-#include <svtools/miscopt.hxx>
#include <svtools/menuoptions.hxx>
#include <rtl/bootstrap.hxx>
#include <vcl/glxtestprocess.hxx>
@@ -1493,9 +1492,11 @@ int Desktop::Main()
// Ensure that we use not the system file dialogs as
// headless mode relies on Application::EnableHeadlessMode()
// which does only work for VCL dialogs!!
- SvtMiscOptions aMiscOptions;
- pExecGlobals->bUseSystemFileDialog = aMiscOptions.UseSystemFileDialog();
- aMiscOptions.SetUseSystemFileDialog( false );
+ pExecGlobals->bUseSystemFileDialog = officecfg::Office::Common::Misc::UseSystemFileDialog::get();
+ std::shared_ptr< comphelper::ConfigurationChanges > xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::UseSystemFileDialog::set( false, xChanges );
+ xChanges->commit();
}
pExecGlobals->bRestartRequested = xRestartManager->isRestartRequested(true);
@@ -1620,7 +1621,12 @@ int Desktop::doShutdown()
// Restore old value
const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
if ( rCmdLineArgs.IsHeadless() || rCmdLineArgs.IsEventTesting() )
- SvtMiscOptions().SetUseSystemFileDialog( pExecGlobals->bUseSystemFileDialog );
+ {
+ std::shared_ptr< comphelper::ConfigurationChanges > xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Misc::UseSystemFileDialog::set( pExecGlobals->bUseSystemFileDialog, xChanges );
+ xChanges->commit();
+ }
OUString pidfileName = rCmdLineArgs.GetPidfileName();
if ( !pidfileName.isEmpty() )