summaryrefslogtreecommitdiff
path: root/svtools
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 /svtools
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 'svtools')
-rw-r--r--svtools/source/config/miscopt.cxx68
-rw-r--r--svtools/source/uno/fpicker.cxx6
2 files changed, 9 insertions, 65 deletions
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index bca5b5a760fb..592f05b5c4eb 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -50,27 +50,23 @@ using namespace ::com::sun::star;
#define PROPERTYHANDLE_SYMBOLSET 1
#define PROPERTYNAME_TOOLBOXSTYLE "ToolboxStyle"
#define PROPERTYHANDLE_TOOLBOXSTYLE 2
-#define PROPERTYNAME_USESYSTEMFILEDIALOG "UseSystemFileDialog"
-#define PROPERTYHANDLE_USESYSTEMFILEDIALOG 3
#define PROPERTYNAME_ICONTHEME "SymbolStyle"
-#define PROPERTYHANDLE_SYMBOLSTYLE 4
+#define PROPERTYHANDLE_SYMBOLSTYLE 3
#define PROPERTYNAME_SHOWLINKWARNINGDIALOG "ShowLinkWarningDialog"
-#define PROPERTYHANDLE_SHOWLINKWARNINGDIALOG 5
+#define PROPERTYHANDLE_SHOWLINKWARNINGDIALOG 4
#define PROPERTYNAME_DISABLEUICUSTOMIZATION "DisableUICustomization"
-#define PROPERTYHANDLE_DISABLEUICUSTOMIZATION 6
+#define PROPERTYHANDLE_DISABLEUICUSTOMIZATION 5
#define PROPERTYNAME_MACRORECORDERMODE "MacroRecorderMode"
-#define PROPERTYHANDLE_MACRORECORDERMODE 7
+#define PROPERTYHANDLE_MACRORECORDERMODE 6
#define PROPERTYNAME_SIDEBARICONSIZE "SidebarIconSize"
-#define PROPERTYHANDLE_SIDEBARICONSIZE 8
+#define PROPERTYHANDLE_SIDEBARICONSIZE 7
#define PROPERTYNAME_NOTEBOOKBARICONSIZE "NotebookbarIconSize"
-#define PROPERTYHANDLE_NOTEBOOKBARICONSIZE 9
+#define PROPERTYHANDLE_NOTEBOOKBARICONSIZE 8
class SvtMiscOptions_Impl : public ConfigItem
{
private:
::std::vector<Link<LinkParamNone*,void>> aList;
- bool m_bUseSystemFileDialog;
- bool m_bIsUseSystemFileDialogRO;
bool m_bPluginsEnabled;
bool m_bIsPluginsEnabledRO;
sal_Int16 m_nSymbolsSize;
@@ -116,16 +112,6 @@ public:
// public interface
-
- bool UseSystemFileDialog() const
- { return m_bUseSystemFileDialog; }
-
- void SetUseSystemFileDialog( bool bSet )
- { m_bUseSystemFileDialog = bSet; SetModified(); }
-
- bool IsUseSystemFileDialogReadOnly() const
- { return m_bIsUseSystemFileDialogRO; }
-
bool DisableUICustomization() const
{ return m_bDisableUICustomization; }
@@ -218,8 +204,6 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
// Init baseclasses first
: ConfigItem( ROOTNODE_MISC )
- , m_bUseSystemFileDialog( false )
- , m_bIsUseSystemFileDialogRO( false )
, m_bPluginsEnabled( false )
, m_bIsPluginsEnabledRO( false )
, m_nSymbolsSize( 0 )
@@ -309,16 +293,6 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
break;
}
- case PROPERTYHANDLE_USESYSTEMFILEDIALOG :
- {
- if( !(seqValues[nProperty] >>= m_bUseSystemFileDialog) )
- {
- OSL_FAIL("Wrong type of \"Misc\\UseSystemFileDialog\"!" );
- }
- m_bIsUseSystemFileDialogRO = seqRO[nProperty];
- break;
- }
-
case PROPERTYHANDLE_SHOWLINKWARNINGDIALOG :
{
if( !(seqValues[nProperty] >>= m_bShowLinkWarningDialog) )
@@ -426,13 +400,6 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames )
}
}
break;
- case PROPERTYHANDLE_USESYSTEMFILEDIALOG : {
- if( !(seqValues[nProperty] >>= m_bUseSystemFileDialog) )
- {
- OSL_FAIL("Wrong type of \"Misc\\UseSystemFileDialog\"!" );
- }
- }
- break;
case PROPERTYHANDLE_SHOWLINKWARNINGDIALOG : {
if( !(seqValues[nProperty] >>= m_bShowLinkWarningDialog) )
{
@@ -589,13 +556,6 @@ void SvtMiscOptions_Impl::ImplCommit()
break;
}
- case PROPERTYHANDLE_USESYSTEMFILEDIALOG :
- {
- if ( !m_bIsUseSystemFileDialogRO )
- seqValues[nProperty] <<= m_bUseSystemFileDialog;
- break;
- }
-
case PROPERTYHANDLE_SYMBOLSTYLE :
{
if ( !m_bIsSymbolsStyleRO ) {
@@ -644,7 +604,6 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames()
PROPERTYNAME_PLUGINSENABLED,
PROPERTYNAME_SYMBOLSET,
PROPERTYNAME_TOOLBOXSTYLE,
- PROPERTYNAME_USESYSTEMFILEDIALOG,
PROPERTYNAME_ICONTHEME,
PROPERTYNAME_SHOWLINKWARNINGDIALOG,
PROPERTYNAME_DISABLEUICUSTOMIZATION,
@@ -682,21 +641,6 @@ SvtMiscOptions::~SvtMiscOptions()
m_pImpl.reset();
}
-bool SvtMiscOptions::UseSystemFileDialog() const
-{
- return m_pImpl->UseSystemFileDialog();
-}
-
-void SvtMiscOptions::SetUseSystemFileDialog( bool bEnable )
-{
- m_pImpl->SetUseSystemFileDialog( bEnable );
-}
-
-bool SvtMiscOptions::IsUseSystemFileDialogReadOnly() const
-{
- return m_pImpl->IsUseSystemFileDialogReadOnly();
-}
-
bool SvtMiscOptions::IsPluginsEnabled() const
{
return m_pImpl->IsPluginsEnabled();
diff --git a/svtools/source/uno/fpicker.cxx b/svtools/source/uno/fpicker.cxx
index 076f59a8d346..dbb69d601462 100644
--- a/svtools/source/uno/fpicker.cxx
+++ b/svtools/source/uno/fpicker.cxx
@@ -21,8 +21,8 @@
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <svtools/miscopt.hxx>
#include <svl/pickerhistoryaccess.hxx>
+#include <officecfg/Office/Common.hxx>
#include <vcl/svapp.hxx>
@@ -57,7 +57,7 @@ Reference< css::uno::XInterface > FilePicker_CreateInstance (
return xResult;
Reference< css::lang::XMultiComponentFactory > xFactory (context->getServiceManager());
- if (xFactory.is() && SvtMiscOptions().UseSystemFileDialog())
+ if (xFactory.is() && officecfg::Office::Common::Misc::UseSystemFileDialog::get())
{
xResult.set( Application::createFilePicker( context ) );
@@ -125,7 +125,7 @@ Reference< css::uno::XInterface > FolderPicker_CreateInstance (
return xResult;
Reference< css::lang::XMultiComponentFactory > xFactory (context->getServiceManager());
- if (xFactory.is() && SvtMiscOptions().UseSystemFileDialog())
+ if (xFactory.is() && officecfg::Office::Common::Misc::UseSystemFileDialog::get())
{
xResult.set( Application::createFolderPicker( context ) );
if (!xResult.is())