diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-24 13:47:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-26 07:21:04 +0100 |
commit | 08ab1f46b192a188935fdffbefdc9f3973583cdf (patch) | |
tree | 4c1ecb502f3c3b2a2a8865ea8f84a083b16d310e /sw/source/filter | |
parent | 9bc8714308b6f4b85a4c756229ac8b670d009f42 (diff) |
loplugin:oncevar extend to tools/gen.hxx types
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2
Reviewed-on: https://gerrit.libreoffice.org/50283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/writer/wrtswtbl.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8gr.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf2.cxx | 3 |
5 files changed, 6 insertions, 11 deletions
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index c92803aa5b30..98bc37956fc3 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -193,8 +193,7 @@ void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine, { if( sal_uInt32(-1) == m_nBorderColor ) { - Color aGrayColor( COL_GRAY ); - if( !pBorderLine->GetColor().IsRGBEqual( aGrayColor ) ) + if( !pBorderLine->GetColor().IsRGBEqual( COL_GRAY ) ) m_nBorderColor = pBorderLine->GetColor().GetColor(); } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index ccfc366f7843..1b0aefe49c4d 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -674,7 +674,7 @@ void MSWordStyles::OutputStylesTable() // and refuses to load .docx with more, even though the spec seems to allow that; // so simply if there are more styles, don't export those // Implementing check for all exports DOCX, DOC, RTF - sal_uInt16 nLimit = MSWORD_MAX_STYLES_LIMIT; + sal_uInt16 const nLimit = MSWORD_MAX_STYLES_LIMIT; m_nUsedSlots = std::min(nLimit, m_nUsedSlots); for ( n = 0; n < m_nUsedSlots; n++ ) diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index d51630f76816..4d9ceaa9c00f 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -131,17 +131,15 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, { // bGraphicNeeded set to true is right / fixes #i51670#. bGraphicNeeded = true; - Point aTmpPoint; - tools::Rectangle aRect( aTmpPoint, Size( nX, nY ) ); + tools::Rectangle aRect( Point(), Size( nX, nY ) ); Graphic aGraph(aWMF); ErrCode nErr = ERRCODE_NONE; - tools::Rectangle aVisArea; sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; if ( pOLENd ) nAspect = pOLENd->GetAspect(); SdrOle2Obj *pRet = SvxMSDffManager::CreateSdrOLEFromStorage( - rStorageName,xObjStg,m_pDoc->GetDocStorage(),aGraph,aRect,aVisArea,nullptr,nErr,0,nAspect, m_pWriter->GetBaseURL()); + rStorageName,xObjStg,m_pDoc->GetDocStorage(),aGraph,aRect,tools::Rectangle(),nullptr,nErr,0,nAspect, m_pWriter->GetBaseURL()); if (pRet) { diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 8f7cf453a6c1..037dd4f450a9 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1783,8 +1783,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj, rFlySet.Put( aShadow ); } - Color Temp(COL_WHITE); - SvxBrushItem aBrushItem(Temp, RES_BACKGROUND); + SvxBrushItem aBrushItem(COL_WHITE, RES_BACKGROUND); bool bBrushItemOk = false; sal_uInt8 nTrans = 0; diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index a1dbe9fc17e8..023aaabf173f 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -561,10 +561,9 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj const * pTextObj, m_pDataStream->SeekRel( nNameLen ); } - tools::Rectangle aChildRect; tools::Rectangle aClientRect( 0,0, aPD.nWidth, aPD.nHeight); SvxMSDffImportData aData( aClientRect ); - pObject = m_xMSDffManager->ImportObj(*m_pDataStream, &aData, aClientRect, aChildRect, /*nCalledByGroup*/0, /*pShapeId*/nullptr ); + pObject = m_xMSDffManager->ImportObj(*m_pDataStream, &aData, aClientRect, tools::Rectangle(), /*nCalledByGroup*/0, /*pShapeId*/nullptr ); if (pObject) { // for the frame |