Kaydet (Commit) b123e4c4 authored tarafından Michael Meeks's avatar Michael Meeks

gtk: fix issue with built-in file/folder picker settings

üst 14f6de30
...@@ -85,9 +85,11 @@ static Reference< css::uno::XInterface > FilePicker_createInstance ( ...@@ -85,9 +85,11 @@ static Reference< css::uno::XInterface > FilePicker_createInstance (
return xResult; return xResult;
Reference< css::lang::XMultiComponentFactory > xFactory (rxContext->getServiceManager()); Reference< css::lang::XMultiComponentFactory > xFactory (rxContext->getServiceManager());
if (xFactory.is()) if (xFactory.is() && SvtMiscOptions().UseSystemFileDialog())
{ {
if (SvtMiscOptions().UseSystemFileDialog()) xResult = Reference< css::uno::XInterface >( Application::createFilePicker( rxContext ) );
if (!xResult.is())
{ {
try try
{ {
...@@ -102,8 +104,6 @@ static Reference< css::uno::XInterface > FilePicker_createInstance ( ...@@ -102,8 +104,6 @@ static Reference< css::uno::XInterface > FilePicker_createInstance (
} }
} }
if (!xResult.is())
xResult = Reference< css::uno::XInterface >( Application::createFilePicker( rxContext ) );
if (!xResult.is() && xFactory.is()) if (!xResult.is() && xFactory.is())
{ {
...@@ -162,9 +162,10 @@ static Reference< css::uno::XInterface > FolderPicker_createInstance ( ...@@ -162,9 +162,10 @@ static Reference< css::uno::XInterface > FolderPicker_createInstance (
return xResult; return xResult;
Reference< css::lang::XMultiComponentFactory > xFactory (rxContext->getServiceManager()); Reference< css::lang::XMultiComponentFactory > xFactory (rxContext->getServiceManager());
if (xFactory.is()) if (xFactory.is() && SvtMiscOptions().UseSystemFileDialog())
{ {
if (SvtMiscOptions().UseSystemFileDialog()) xResult = Reference< css::uno::XInterface >( Application::createFolderPicker( rxContext ) );
if (!xResult.is())
{ {
try try
{ {
...@@ -178,8 +179,6 @@ static Reference< css::uno::XInterface > FolderPicker_createInstance ( ...@@ -178,8 +179,6 @@ static Reference< css::uno::XInterface > FolderPicker_createInstance (
} }
} }
} }
if (!xResult.is())
xResult = Reference< css::uno::XInterface >( Application::createFolderPicker( rxContext ) );
if (!xResult.is() && xFactory.is() ) if (!xResult.is() && xFactory.is() )
{ {
// Always fall back to OfficeFolderPicker. // Always fall back to OfficeFolderPicker.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment