basctl/source/basicide/baside3.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 5f303eaaeac23813e9809c87bce406ea5c52ee14 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Apr 29 14:19:00 2023 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Apr 29 14:23:50 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> diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 85a3a7d026e6..61bbbc056956 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();