basctl/source/basicide/baside3.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 86651deb4655d99f1f8a943475cfb2c354580025 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Apr 29 14:19:00 2023 +0300 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed May 3 10:04:01 2023 +0200 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.kagan...@collabora.com> (cherry picked from commit 5f303eaaeac23813e9809c87bce406ea5c52ee14) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151271 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> 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();