diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-21 12:14:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-25 13:53:21 +0200 |
commit | 4583911575edf98ccd5b15af8eafa6a3a7b64034 (patch) | |
tree | f3f33e53c45dd870f19e7e42db9bb5b4bf1f23bf /editeng | |
parent | 1942182a3d1817bc539229d7fda3af69f7e295b8 (diff) |
improve loplugin:simplifyconstruct
Change-Id: If863d28c6db470faa0d22273020888d4219e069e
Reviewed-on: https://gerrit.libreoffice.org/74559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 4 | ||||
-rw-r--r-- | editeng/source/outliner/outleeng.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unotext2.cxx | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 215af72daaed..7e91331943cc 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -430,7 +430,7 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion, if (!aRectangles.empty()) { tools::Rectangle& rStart = aRectangles.front(); - tools::Rectangle aStart = tools::Rectangle(rStart.Left(), rStart.Top(), rStart.Left() + 1, rStart.Bottom()); + tools::Rectangle aStart(rStart.Left(), rStart.Top(), rStart.Left() + 1, rStart.Bottom()); if (bMm100ToTwip) aStart = OutputDevice::LogicToLogic(aStart, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip)); aStart.Move(aOrigin.getX(), aOrigin.getY()); @@ -438,7 +438,7 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion, mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_START, aStart.toString().getStr()); tools::Rectangle& rEnd = aRectangles.back(); - tools::Rectangle aEnd = tools::Rectangle(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom()); + tools::Rectangle aEnd(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom()); if (bMm100ToTwip) aEnd = OutputDevice::LogicToLogic(aEnd, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip)); aEnd.Move(aOrigin.getX(), aOrigin.getY()); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 0821b601001b..1e0b4e51feb5 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -725,7 +725,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) EditLine* pLine = &pParaPortion->GetLines()[nLine]; - static tools::Rectangle aZeroArea = tools::Rectangle( Point(), Point() ); + static tools::Rectangle aZeroArea { Point(), Point() }; tools::Rectangle aBulletArea( aZeroArea ); if ( !nLine ) { @@ -1674,7 +1674,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion ) const SvxLineSpacingItem& rLSItem = pParaPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ); long nStartX = GetXValue( rLRItem.GetTextLeft() + rLRItem.GetTextFirstLineOfst() + nSpaceBefore ); - tools::Rectangle aBulletArea = tools::Rectangle( Point(), Point() ); + tools::Rectangle aBulletArea { Point(), Point() }; if ( bLineBreak ) { nStartX = GetXValue( rLRItem.GetTextLeft() + rLRItem.GetTextFirstLineOfst() + nSpaceBeforeAndMinLabelWidth ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index ae1513cf6d8b..75abcf0448b6 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1634,7 +1634,7 @@ void ImpEditEngine::ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang, LanguageType nResLang = LANGUAGE_NONE; EditPaM aPos( CreateEditPaM( pConvInfo->aConvContinue ) ); - EditSelection aCurSel = EditSelection( aPos, aPos ); + EditSelection aCurSel( aPos, aPos ); OUString aWord; @@ -1936,7 +1936,7 @@ bool ImpEditEngine::SpellSentence(EditView const & rEditView, //search for all errors in the rest of the sentence and add all the portions do { - EditSelection aNextSel = EditSelection(aCurSel.Max(), aSentencePaM.Max()); + EditSelection aNextSel(aCurSel.Max(), aSentencePaM.Max()); xAlt = ImpFindNextError(aNextSel); if(xAlt.is()) { diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx index 660a7d7d77c4..87144b6f4938 100644 --- a/editeng/source/outliner/outleeng.cxx +++ b/editeng/source/outliner/outleeng.cxx @@ -66,7 +66,7 @@ const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( sal_Int32 nPara ) const tools::Rectangle OutlinerEditEng::GetBulletArea( sal_Int32 nPara ) { - tools::Rectangle aBulletArea = tools::Rectangle( Point(), Point() ); + tools::Rectangle aBulletArea { Point(), Point() }; if ( nPara < pOwner->pParaList->GetParagraphCount() ) { if ( pOwner->ImplHasNumberFormat( nPara ) ) diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 1fa6e212dc90..5d0fda71f07a 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -57,7 +57,7 @@ SvxUnoTextContentEnumeration::SvxUnoTextContentEnumeration( const SvxUnoTextBase nStartPos = std::max(nStartPos, rSel.nStartPos); if( currentPara == rSel.nEndPara ) nEndPos = std::min(nEndPos, rSel.nEndPos); - ESelection aCurrentParaSel = ESelection( currentPara, nStartPos, currentPara, nEndPos ); + ESelection aCurrentParaSel( currentPara, nStartPos, currentPara, nEndPos ); for (auto const& elemRange : rRanges) { if (pContent) |