summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 10:23:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 12:40:35 +0200
commit8c6b84c2c5834ab877c3edd96fd243606cfefe39 (patch)
treeba3be502bbe44fa527f89e24a1fd96d6499bc01c /forms
parent9073a347f10aae5e7afb92371a0593c80fa89f97 (diff)
loplugin:oncevar filter..forms
Change-Id: I70a8ed6dbfe08b22dbf7b7b86e9518d73c5e393a Reviewed-on: https://gerrit.libreoffice.org/39154 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/imgprod.cxx3
-rw-r--r--forms/source/component/propertybaghelper.cxx2
-rw-r--r--forms/source/runtime/formoperations.cxx2
-rw-r--r--forms/source/solar/control/navtoolbar.cxx3
-rw-r--r--forms/source/xforms/binding.cxx3
-rw-r--r--forms/source/xforms/submission/submission_post.cxx3
-rw-r--r--forms/source/xforms/xpathlib/xpathlib.cxx2
7 files changed, 7 insertions, 11 deletions
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index dc18ff8edc76..b49bbfd82678 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -95,7 +95,6 @@ ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos,
else
{
const std::size_t nSeqLen = maSeq.getLength();
- ErrCode nErr = ERRCODE_NONE;
if( nPos < nSeqLen )
{
@@ -108,7 +107,7 @@ ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos,
else
*pRead = 0UL;
- return nErr;
+ return ERRCODE_NONE;
}
}
diff --git a/forms/source/component/propertybaghelper.cxx b/forms/source/component/propertybaghelper.cxx
index 49a10ee95a99..c9f5ca0e4016 100644
--- a/forms/source/component/propertybaghelper.cxx
+++ b/forms/source/component/propertybaghelper.cxx
@@ -114,7 +114,7 @@ namespace frm
// search a free handle in <math>F_1009</math>
if ( nHandle == -1 )
{
- sal_Int32 nPrime = 1009;
+ sal_Int32 const nPrime = 1009;
sal_Int32 nFactor = 11;
sal_Int32 nNum = nFactor;
while ( nNum != 1 )
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 665c61a8631f..011f6ce135b1 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -1184,7 +1184,7 @@ namespace frm
FormFeature::SaveRecordChanges,
FormFeature::UndoRecordChanges
};
- size_t nFeatureCount = SAL_N_ELEMENTS( pModifyDependentFeatures );
+ size_t const nFeatureCount = SAL_N_ELEMENTS( pModifyDependentFeatures );
s_aModifyDependentFeatures = Sequence< sal_Int16 >( pModifyDependentFeatures, nFeatureCount );
}
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index 169ceb3ff635..dd183941eb61 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -270,9 +270,8 @@ namespace frm
{ FormFeature::RemoveFilterAndSort, false, false },
};
- size_t nSupportedFeatures = SAL_N_ELEMENTS( aSupportedFeatures );
FeatureDescription* pSupportedFeatures = aSupportedFeatures;
- FeatureDescription* pSupportedFeaturesEnd = aSupportedFeatures + nSupportedFeatures;
+ FeatureDescription* pSupportedFeaturesEnd = aSupportedFeatures + SAL_N_ELEMENTS( aSupportedFeatures );
for ( ; pSupportedFeatures < pSupportedFeaturesEnd; ++pSupportedFeatures )
{
if ( pSupportedFeatures->nId )
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx
index 75e4f0de1817..440309f7b656 100644
--- a/forms/source/xforms/binding.cxx
+++ b/forms/source/xforms/binding.cxx
@@ -707,9 +707,8 @@ void Binding::valueModified()
void Binding::distributeMIP( const css::uno::Reference<css::xml::dom::XNode> & rxNode ) {
- OUString sEventName("xforms-generic");
css::xforms::XFormsEventConcrete *pEvent = new css::xforms::XFormsEventConcrete;
- pEvent->initXFormsEvent(sEventName, true, false);
+ pEvent->initXFormsEvent("xforms-generic", true, false);
Reference<XEvent> xEvent(pEvent);
// naive depth-first traversal
diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx
index db9b868b26fc..d055de2d6a62 100644
--- a/forms/source/xforms/submission/submission_post.cxx
+++ b/forms/source/xforms/submission/submission_post.cxx
@@ -53,7 +53,6 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const css::uno::Reference<
ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE), aEnvironment, comphelper::getProcessComponentContext());
// use post command
- OUString aCommandName("post");
PostCommandArgument2 aPostArgument;
aPostArgument.Source = apSerialization->getInputStream();
css::uno::Reference< XActiveDataSink > aSink(new ucbhelper::ActiveDataSink);
@@ -62,7 +61,7 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const css::uno::Reference<
aPostArgument.Referer.clear();
Any aCommandArgument;
aCommandArgument <<= aPostArgument;
- aContent.executeCommand( aCommandName, aCommandArgument);
+ aContent.executeCommand( "post", aCommandArgument);
try {
m_aResultStream = aSink->getInputStream();
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx
index b5e498266c41..c60f5bdd10e5 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -294,7 +294,7 @@ static bool parseDateTime(const OUString& aString, DateTime& aDateTime)
return false;
sal_Int32 nDateLength = 10;
- sal_Int32 nTimeLength = 8;
+ sal_Int32 const nTimeLength = 8;
OUString aDateString = aDateTimeString.copy(0, nDateLength);
OUString aTimeString = aDateTimeString.copy(nDateLength+1, nTimeLength);