summaryrefslogtreecommitdiff
path: root/sfx2/source/config
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-06 09:23:33 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-09 08:34:40 +0000
commit6c80a8fe89fadf9a2c7260a09c037a09462f53d1 (patch)
treed36da9ee2a5fdc579d2a57ff6ba02deaddfa785a /sfx2/source/config
parente1fc599eb764186e5d511ace9785463eebbc7028 (diff)
new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source/config')
-rw-r--r--sfx2/source/config/evntconf.cxx21
1 files changed, 6 insertions, 15 deletions
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 3005e084b756..517e1f37560f 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -159,18 +159,14 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
uno::Sequence < beans::PropertyValue > aProperties(3);
beans::PropertyValue *pValues = aProperties.getArray();
- OUString aType(STAR_BASIC );
- OUString aLib = pMacro->GetLibName();
- OUString aMacro = pMacro->GetMacName();
-
pValues[ 0 ].Name = PROP_EVENT_TYPE;
- pValues[ 0 ].Value <<= aType;
+ pValues[ 0 ].Value <<= OUString("STAR_BASIC");
pValues[ 1 ].Name = PROP_LIBRARY;
- pValues[ 1 ].Value <<= aLib;
+ pValues[ 1 ].Value <<= pMacro->GetLibName();
pValues[ 2 ].Name = PROP_MACRO_NAME;
- pValues[ 2 ].Value <<= aMacro;
+ pValues[ 2 ].Value <<= pMacro->GetMacName();
aEventData <<= aProperties;
}
@@ -179,14 +175,11 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
uno::Sequence < beans::PropertyValue > aProperties(2);
beans::PropertyValue *pValues = aProperties.getArray();
- OUString aLib = pMacro->GetLibName();
- OUString aMacro = pMacro->GetMacName();
-
pValues[ 0 ].Name = PROP_EVENT_TYPE;
- pValues[ 0 ].Value <<= aLib;
+ pValues[ 0 ].Value <<= pMacro->GetLibName();
pValues[ 1 ].Name = PROP_SCRIPT;
- pValues[ 1 ].Value <<= aMacro;
+ pValues[ 1 ].Value <<= pMacro->GetMacName();
aEventData <<= aProperties;
}
@@ -195,13 +188,11 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
uno::Sequence < beans::PropertyValue > aProperties(2);
beans::PropertyValue *pValues = aProperties.getArray();
- OUString aMacro = pMacro->GetMacName();
-
pValues[ 0 ].Name = PROP_EVENT_TYPE;
pValues[ 0 ].Value <<= OUString(SVX_MACRO_LANGUAGE_JAVASCRIPT);
pValues[ 1 ].Name = PROP_MACRO_NAME;
- pValues[ 1 ].Value <<= aMacro;
+ pValues[ 1 ].Value <<= pMacro->GetMacName();
aEventData <<= aProperties;
}