summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dave@treblig.org>2021-01-24 01:14:39 +0000
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-30 08:13:13 +0100
commit8f69a05ad7404590f2e4a1ba8d4d69fe896523ce (patch)
treeb20475de0af885cc9df2534b8b1eedd0e5e3aefd /filter
parent4c7332e5f439774363f29cc7d47494854cc981f5 (diff)
msfilter: msvbahelper, applyShortCutKeyBinding typo'd variable name
(Spotted by cppcheck) There's a warning that MacroName is overwritten without being used, and I think it's right; to me it looks like a typo, however I have exactly zero understanding of VBA macros. The function starts with: OUString MacroName( rMacroName ); if ( !MacroName.isEmpty() ) { OUString aMacroName = MacroName.trim(); if( aMacroName.startsWith("!") ) 733 MacroName = aMacroName.copy(1).trim(); ..... MacroResolvedInfo aMacroInfo = resolveVBAMacro( pShell, aMacroName ); if( !aMacroInfo.mbFound ) throw uno::RuntimeException( "The procedure doesn't exist" ); 745 MacroName = aMacroInfo.msResolvedMacro; cppcheck is complaining MacroName written at 733 is always overwritten at 745 without being used; I think this is a typo and it should be 'aMacroName' that's assigned at 733. Change-Id: Iac568fea4cb6d1a5430bc32a6cf08311edcb1003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109849 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/msvbahelper.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index d6e4442c2584..6d29cd972fae 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -730,7 +730,7 @@ void applyShortCutKeyBinding ( const uno::Reference< frame::XModel >& rxModel, c
{
OUString aMacroName = MacroName.trim();
if( aMacroName.startsWith("!") )
- MacroName = aMacroName.copy(1).trim();
+ aMacroName = aMacroName.copy(1).trim();
SfxObjectShell* pShell = nullptr;
if ( rxModel.is() )
{