diff options
author | Pierre Lepage <pierrelepage3@gmail.com> | 2016-11-05 14:12:56 -0400 |
---|---|---|
committer | jan iversen <jani@documentfoundation.org> | 2016-11-29 18:01:45 +0000 |
commit | 0d9a7d03e325d8b7487c08e9448c8a6890821866 (patch) | |
tree | 7a7b0e9c6b61c2d43d238b33802f563486a4f60c /basctl | |
parent | f5e343e1c50b2b65168b5f68bd40535f2fbc86c3 (diff) |
tdf#96717: The macro name desired by the user is now took into account.
Change-Id: I3949ffed6dcf85e01bc5fc24a27a04265e54fe44
Reviewed-on: https://gerrit.libreoffice.org/30592
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/macrodlg.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 84273aed8cf4..88dd8e6c46c8 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -364,13 +364,16 @@ SbMethod* MacroChooser::CreateMacro() else if ( !pBasic->GetModules().empty() ) pModule = pBasic->GetModules().front().get(); + // Retain the desired macro name before the macro dialog box is forced to close + // by opening the module name dialog window when no module exists in the current library. + OUString aSubName = m_pMacroNameEdit->GetText(); + if ( !pModule ) { pModule = createModImpl( static_cast<vcl::Window*>( this ), aDocument, *m_pBasicBox, aLibName, aModName, false ); } - OUString aSubName = m_pMacroNameEdit->GetText(); DBG_ASSERT( !pModule || !pModule->FindMethod( aSubName, SbxClassType::Method ), "Macro existiert schon!" ); pMethod = pModule ? basctl::CreateMacro( pModule, aSubName ) : nullptr; } |