summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-29 14:24:56 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2023-04-29 15:12:08 +0200
commit5d56733bbc283f5927d83bc3151a05fc477c31b1 (patch)
treeaa5513dfe038bc917c59abd4e4fe5fbe54309f91 /basctl
parent90ac25f12cecd5850607096acf4d97f29baaa710 (diff)
Simplify a bit
Change-Id: I5b39a16479a69c0683d8e04497ad24421112751c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151126 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 5384eb70fa89..ef80ae5b017c 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -457,16 +457,12 @@ void ModulWindow::LoadBasic()
void ModulWindow::SaveBasicSource()
{
- sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD,
+ sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
FileDialogFlags::NONE, this->GetFrameWeld());
aDlg.SetContext(sfx2::FileDialogHelper::BasicExportSource);
const Reference<XFilePicker3>& xFP = aDlg.GetFilePicker();
- Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
- xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false);
- Any aValue;
- aValue <<= true;
- xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue);
+ xFP.queryThrow<XFilePickerControlAccess>()->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, Any(true));
xFP->appendFilter( "BASIC", "*.bas" );
xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All );