summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-13 08:21:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-13 14:46:45 +0200
commit8feca893a902abe3c238403f0a1f59a24fb24926 (patch)
tree92e4308d2562c9ca48920f20c87a78c07a635740
parentloplugin:sequentialassign in dbaccess..desktop (diff)
downloadcore-8feca893a902abe3c238403f0a1f59a24fb24926.tar.gz
core-8feca893a902abe3c238403f0a1f59a24fb24926.zip
loplugin:sequentialassign in editeng..extensions
Change-Id: I95c6fb5e2ddc1c2d8a2fb1d5ff30b18ddad48b3a Reviewed-on: https://gerrit.libreoffice.org/70699 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--editeng/source/editeng/editeng.cxx3
-rw-r--r--editeng/source/editeng/editobj.cxx3
-rw-r--r--editeng/source/editeng/editview.cxx3
-rw-r--r--editeng/source/editeng/impedit.cxx4
-rw-r--r--editeng/source/editeng/impedit2.cxx3
-rw-r--r--editeng/source/editeng/impedit4.cxx3
-rw-r--r--editeng/source/misc/hangulhanja.cxx3
-rw-r--r--editeng/source/misc/svxacorr.cxx6
-rw-r--r--emfio/source/reader/wmfreader.cxx4
-rw-r--r--extensions/source/bibliography/datman.cxx4
-rw-r--r--extensions/source/update/check/updatehdl.cxx3
11 files changed, 12 insertions, 27 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 6b7157215730..458f71b34d3f 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -310,8 +310,7 @@ void EditEngine::InsertView(EditView* pEditView, size_t nIndex)
ImpEditEngine::ViewsType& rViews = pImpEditEngine->GetEditViews();
rViews.insert(rViews.begin()+nIndex, pEditView);
- EditSelection aStartSel;
- aStartSel = pImpEditEngine->GetEditDoc().GetStartPaM();
+ EditSelection aStartSel = pImpEditEngine->GetEditDoc().GetStartPaM();
pEditView->pImpEditView->SetEditSelection( aStartSel );
if ( !pImpEditEngine->GetActiveView() )
pImpEditEngine->SetActiveView( pEditView );
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 12c6643fdd42..c33d17d62ee8 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -934,10 +934,9 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs )
continue;
sal_Int32 nStart = rXAttr.GetStart(), nEnd = rXAttr.GetEnd();
- std::vector<editeng::Section>::iterator itCurAttr = itAttr;
// Find the container whose start position matches.
- itCurAttr = std::find_if(itCurAttr, aAttrs.end(), FindBySectionStart(nPara, nStart));
+ std::vector<editeng::Section>::iterator itCurAttr = std::find_if(itAttr, aAttrs.end(), FindBySectionStart(nPara, nStart));
if (itCurAttr == aAttrs.end())
{
// This should never happen. There is a logic error somewhere...
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 3d02f76e256e..57b0acd3b258 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -330,8 +330,7 @@ void EditView::Paint( const tools::Rectangle& rRect, OutputDevice* pTargetDevice
void EditView::SetEditEngine( EditEngine* pEditEng )
{
pImpEditView->pEditEngine = pEditEng;
- EditSelection aStartSel;
- aStartSel = pImpEditView->pEditEngine->GetEditDoc().GetStartPaM();
+ EditSelection aStartSel = pImpEditView->pEditEngine->GetEditDoc().GetStartPaM();
pImpEditView->SetEditSelection( aStartSel );
}
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 0c7d077a3586..87ed64446f39 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1674,11 +1674,9 @@ bool ImpEditView::IsSelectionAtPoint( const Point& rPosPixel )
if ( pDragAndDropInfo && pDragAndDropInfo->pField )
return true;
- Point aMousePos( rPosPixel );
-
// Logical units ...
const OutputDevice& rOutDev = getEditViewCallbacks() ? getEditViewCallbacks()->EditViewOutputDevice() : *GetWindow();
- aMousePos = rOutDev.PixelToLogic(aMousePos);
+ Point aMousePos = rOutDev.PixelToLogic(rPosPixel);
if ( ( !GetOutputArea().IsInside( aMousePos ) ) && !pEditEngine->pImpEditEngine->IsInSelectionMode() )
{
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 1b57db5e58cf..11023be03dd4 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3459,8 +3459,7 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable(
aSelection.Adjust( GetEditDoc() );
EditDataObject* pDataObj = new EditDataObject;
- uno::Reference< datatransfer::XTransferable > xDataObj;
- xDataObj = pDataObj;
+ uno::Reference< datatransfer::XTransferable > xDataObj = pDataObj;
pDataObj->GetString() = convertLineEnd(GetSelected(aSelection), GetSystemLineEnd()); // System specific
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 8a9c4d31d1c7..b7d91627c031 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2851,8 +2851,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
aChanges.push_back( aChgData );
}
- i18n::Boundary aFirstWordBndry;
- aFirstWordBndry = _xBI->nextWord(
+ i18n::Boundary aFirstWordBndry = _xBI->nextWord(
aNodeStr, nCurrentEnd,
GetLocale( EditPaM( pNode, nCurrentEnd + 1 ) ),
nWordType);
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index 107d30e4441d..d2b41807b353 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -442,8 +442,7 @@ namespace editeng
if( m_eConvType == HHC::eConvHangulHanja && m_pConversionDialog )
{
m_bTryBothDirections = m_pConversionDialog->GetUseBothDirections();
- HHC::ConversionDirection eDialogDirection = HHC::eHangulToHanja;
- eDialogDirection = m_pConversionDialog->GetDirection( eDialogDirection );
+ HHC::ConversionDirection eDialogDirection = m_pConversionDialog->GetDirection( HHC::eHangulToHanja );
if( !m_bTryBothDirections && eDialogDirection != m_eCurrentConversionDirection )
{
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index ca29b4e22f7c..0ee639ca2194 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -435,8 +435,7 @@ void SvxAutoCorrect::FnCapitalStartWord( SvxAutoCorrDoc& rDoc, const OUString& r
}
}
sal_Unicode cSave = rTxt[ nSttPos ];
- OUString sChar( cSave );
- sChar = rCC.lowercase( sChar );
+ OUString sChar = rCC.lowercase( OUString(cSave) );
if( sChar[0] != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar ))
{
if( ACFlags::SaveWordWrdSttLst & nFlags )
@@ -1091,8 +1090,7 @@ void SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
// Ok, then replace
sal_Unicode cSave = *pWordStt;
nSttPos = pWordStt - rTxt.getStr();
- OUString sChar( cSave );
- sChar = rCC.titlecase(sChar); //see fdo#56740
+ OUString sChar = rCC.titlecase(OUString(cSave)); //see fdo#56740
bool bRet = sChar[0] != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar );
// Perhaps someone wants to have the word
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 0e3172ee3c53..a4d392463afb 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -1725,9 +1725,7 @@ namespace emfio
case W_META_EXTTEXTOUT:
{
sal_uInt16 nLen, nOptions;
- Point aPosition;
-
- aPosition = ReadYX();
+ Point aPosition = ReadYX();
pStm->ReadUInt16( nLen ).ReadUInt16( nOptions );
// todo: we also have to take care of the text width
if( nLen )
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 19413d9f5ba6..2eedd1a7583e 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -902,9 +902,7 @@ void BibDataManager::startQueryWith(const OUString& rQuery)
aQueryString+=getQueryField();
aQueryString+=aQuoteChar;
aQueryString+=" like '";
- OUString sQuery(rQuery);
- sQuery = sQuery.replaceAll("?","_");
- sQuery = sQuery.replaceAll("*","%");
+ OUString sQuery = rQuery.replaceAll("?","_").replaceAll("*","%");
aQueryString += sQuery;
aQueryString+="%'";
}
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 6fa8e25a1441..dfe09b68644b 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -790,8 +790,7 @@ void UpdateHandler::setFullVersion( OUString& rString )
uno::Sequence< uno::Any > aArgumentList( 1 );
aArgumentList[0] <<= aProperty;
- uno::Reference< uno::XInterface > xConfigAccess;
- xConfigAccess = xConfigurationProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
+ uno::Reference< uno::XInterface > xConfigAccess = xConfigurationProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
aArgumentList );
uno::Reference< container::XNameAccess > xNameAccess( xConfigAccess, uno::UNO_QUERY_THROW );