summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-29 14:19:00 +0300
committerAndras Timar <andras.timar@collabora.com>2023-05-13 20:05:29 +0200
commit52e8ccd14a9470c6c1f894f129718b921f0593ea (patch)
treea93a4725650a045583040c9ce22c39747c540ca5 /basctl
parentdf322f9fa2e2b93971bcbad1ce768b70fc4d15c4 (diff)
tdf#155077: use the selected URL when writing languages
Regression after commit 9a55b97e980bbf2a0ce12841f6168f1f7545ac96 (tdf#40068 Remember last directory for basic/dialog import/export, 2021-07-14). Change-Id: I6ddb88cbe8a08128c451169de7e9ed4597dc4356 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151181 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 5f303eaaeac23813e9809c87bce406ea5c52ee14) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151271 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside3.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 33528679b2fd..47a53c8b0ee3 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -623,7 +623,7 @@ void DialogWindow::SaveDialog()
if( aDlg.Execute() != ERRCODE_NONE )
return;
- Sequence< OUString > aPaths = xFP->getSelectedFiles();
+ OUString aSelectedFileURL = xFP->getSelectedFiles()[0];
// export dialog model to xml
Reference< container::XNameContainer > xDialogModel = GetDialog();
@@ -635,9 +635,9 @@ void DialogWindow::SaveDialog()
Reference< XOutputStream > xOutput;
try
{
- if( xSFI->exists( aPaths[0] ) )
- xSFI->kill( aPaths[0] );
- xOutput = xSFI->openFileWrite( aPaths[0] );
+ if( xSFI->exists(aSelectedFileURL) )
+ xSFI->kill(aSelectedFileURL);
+ xOutput = xSFI->openFileWrite(aSelectedFileURL);
}
catch(const Exception& )
{}
@@ -680,7 +680,7 @@ void DialogWindow::SaveDialog()
if( bResource )
{
- INetURLObject aURLObj(u"");
+ INetURLObject aURLObj(aSelectedFileURL);
aURLObj.removeExtension();
OUString aDialogName( aURLObj.getName() );
aURLObj.removeSegment();