diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-25 09:59:16 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-26 10:55:58 +0000 |
commit | e8fd5a07eca70912ddee45aaa34d434809b59fb7 (patch) | |
tree | d5dc890d12987cad73f5e64301f823ba23a97f2d /writerfilter | |
parent | e6adb3e8b4de3c0f78d249b83de19b849ef65b59 (diff) |
update loplugin stylepolice to check local pointers vars
are actually pointer vars.
Also convert from regex to normal code, so we can enable this
plugin all the time.
Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 18 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 099ed6cbe0c3..e3cadff891f2 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1217,20 +1217,20 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper try { // If we are in comments, then disable CharGrabBag, comment text doesn't support that. - uno::Sequence< beans::PropertyValue > pValues = pPropertyMap->GetPropertyValues(/*bCharGrabBag=*/!m_bIsInComments); - sal_Int32 len = pValues.getLength(); + uno::Sequence< beans::PropertyValue > aValues = pPropertyMap->GetPropertyValues(/*bCharGrabBag=*/!m_bIsInComments); + sal_Int32 len = aValues.getLength(); if (m_bStartTOC || m_bStartIndex || m_bStartBibliography) for( int i =0; i < len; ++i ) { - if (pValues[i].Name == "CharHidden") - pValues[i].Value = uno::makeAny(false); + if (aValues[i].Name == "CharHidden") + aValues[i].Value = uno::makeAny(false); } uno::Reference< text::XTextRange > xTextRange; if (m_aTextAppendStack.top().xInsertPosition.is()) { - xTextRange = xTextAppend->insertTextPortion(rString, pValues, m_aTextAppendStack.top().xInsertPosition); + xTextRange = xTextAppend->insertTextPortion(rString, aValues, m_aTextAppendStack.top().xInsertPosition); m_aTextAppendStack.top().xCursor->gotoRange(xTextRange->getEnd(), true); } else @@ -1239,7 +1239,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper { if(m_bInHeaderFooterImport && !m_bStartTOCHeaderFooter) { - xTextRange = xTextAppend->appendTextPortion(rString, pValues); + xTextRange = xTextAppend->appendTextPortion(rString, aValues); } else { @@ -1251,7 +1251,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper { if (m_bStartIndex || m_bStartBibliography || m_bStartGenericField) xTOCTextCursor->goLeft(1, false); - xTextRange = xTextAppend->insertTextPortion(rString, pValues, xTOCTextCursor); + xTextRange = xTextAppend->insertTextPortion(rString, aValues, xTOCTextCursor); SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", "insertTextPortion failed"); if (!xTextRange.is()) throw uno::Exception("insertTextPortion failed", nullptr); @@ -1261,7 +1261,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper } else { - xTextRange = xTextAppend->appendTextPortion(rString, pValues); + xTextRange = xTextAppend->appendTextPortion(rString, aValues); xTOCTextCursor = xTextAppend->createTextCursor(); xTOCTextCursor->gotoRange(xTextRange->getEnd(), false); } @@ -1269,7 +1269,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper } } else - xTextRange = xTextAppend->appendTextPortion(rString, pValues); + xTextRange = xTextAppend->appendTextPortion(rString, aValues); } CheckRedline( xTextRange ); diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index df9b3f6d3773..f97fe259aa66 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -464,9 +464,9 @@ void GraphicImport::handleWrapTextValue(sal_uInt32 nVal) void GraphicImport::putPropertyToFrameGrabBag( const OUString& sPropertyName, const uno::Any& aPropertyValue ) { - beans::PropertyValue pProperty; - pProperty.Name = sPropertyName; - pProperty.Value = aPropertyValue; + beans::PropertyValue aProperty; + aProperty.Name = sPropertyName; + aProperty.Value = aPropertyValue; if (!m_xShape.is()) return; @@ -492,7 +492,7 @@ void GraphicImport::putPropertyToFrameGrabBag( const OUString& sPropertyName, co uno::Sequence<beans::PropertyValue> aTmp; xSet->getPropertyValue(aGrabBagPropName) >>= aTmp; std::vector<beans::PropertyValue> aGrabBag(comphelper::sequenceToContainer<std::vector<beans::PropertyValue> >(aTmp)); - aGrabBag.push_back(pProperty); + aGrabBag.push_back(aProperty); xSet->setPropertyValue(aGrabBagPropName, uno::makeAny(comphelper::containerToSequence(aGrabBag))); } |