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 /sd | |
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 'sd')
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 6 | ||||
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationtag.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/dlg/inspagob.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/table/tablefunction.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/drviews9.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 3 |
8 files changed, 10 insertions, 20 deletions
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 9fec6a7b947b..efb52fefbd4c 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -167,9 +167,8 @@ void SdDrawDocument::CreateLayoutTemplates() rISet.Put( XFillGradientItem( aNullGrad) ); rISet.Put(XFillHatchItem(aNullHatch)); Size aNullSize( 32, 32 ); - Color aNullColor( COL_WHITE ); Bitmap aNullBmp( aNullSize, 8 ); - aNullBmp.Erase( aNullColor ); + aNullBmp.Erase( COL_WHITE ); rISet.Put(XFillBitmapItem(Graphic(aNullBmp))); // Shadow attributes (Drawing Engine) @@ -401,8 +400,7 @@ void SdDrawDocument::CreateLayoutTemplates() // Don't get color from the color table, because the color might have been // deleted or changed there - Color aOrange4(255, 204, 153); - pISet->Put(XFillColorItem(OUString(), aOrange4)); + pISet->Put(XFillColorItem(OUString(), Color(255, 204, 153))); // orange pISet->Put(makeSdrShadowItem(true)); pISet->Put(makeSdrShadowColorItem(COL_GRAY)); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index de02cd1eb5c4..a6394aa458d8 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -828,8 +828,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) { case css::drawing::FillStyle_GRADIENT : { - Point aEmptyPoint; - ::tools::Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); + ::tools::Rectangle aRect( Point(), Size( 28000, 21000 ) ); EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.CreateGradientProperties( mXPropSet ); aPropOpt.GetOpt( ESCHER_Prop_fillColor, nBackgroundColor ); @@ -851,8 +850,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) { case css::drawing::FillStyle_GRADIENT : { - Point aEmptyPoint; - ::tools::Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); + ::tools::Rectangle aRect( Point(), Size( 28000, 21000 ) ); EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.CreateGradientProperties( mXBackgroundPropSet ); aPropOpt.GetOpt( ESCHER_Prop_fillColor, nBackgroundColor ); diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx index b69984bf76a0..4c6a53b3c1a2 100644 --- a/sd/source/ui/annotations/annotationtag.cxx +++ b/sd/source/ui/annotations/annotationtag.cxx @@ -450,8 +450,7 @@ void AnnotationTag::addCustomHandles( SdrHdlList& rHandlerList ) if( mxAnnotation.is() ) { SmartTagReference xThis( this ); - Point aPoint; - AnnotationHdl* pHdl = new AnnotationHdl( xThis, mxAnnotation, aPoint ); + AnnotationHdl* pHdl = new AnnotationHdl( xThis, mxAnnotation, Point() ); pHdl->SetObjHdlNum( SMART_TAG_HDL_NUM ); pHdl->SetPageView( mrView.GetSdrPageView() ); diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx index a7e674006195..9f2dcc7ca7d9 100644 --- a/sd/source/ui/dlg/inspagob.cxx +++ b/sd/source/ui/dlg/inspagob.cxx @@ -82,10 +82,9 @@ void SdInsertPagesObjsDlg::Reset() } else { - Color aColor( COL_WHITE ); BitmapEx aBmpText(BMP_DOC_TEXT); //to-do, check if this is already transparent and remove intermedia bitmapex if it is - Image aImgText(BitmapEx(aBmpText.GetBitmap(), aColor)); + Image aImgText(BitmapEx(aBmpText.GetBitmap(), COL_WHITE)); m_pLbTree->InsertEntry( rName, aImgText, aImgText ); } diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 5b737f1d764a..ce518259d9e0 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -273,8 +273,7 @@ void CreateTableFromRTF( SvStream& rStream, SdDrawDocument* pModel ) if( pPage ) { Size aSize( 200, 200 ); - Point aPos; - ::tools::Rectangle aRect (aPos, aSize); + ::tools::Rectangle aRect (Point(), aSize); sdr::table::SdrTableObj* pObj = new sdr::table::SdrTableObj( pModel, aRect, 1, 1 ); pObj->NbcSetStyleSheet( pModel->GetDefaultStyleSheet(), true ); apply_table_style( pObj, pModel, OUString() ); diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 2263860bfa02..3ac7872fd6b3 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1118,10 +1118,9 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile(); if (xMetaFile) { - Point aPoint; Size aSize( GetPage()->GetSize() ); xMetaFile->AddAction( static_cast<MetaAction*>(new MetaFillColorAction( COL_WHITE, true )), 0 ); - xMetaFile->AddAction( static_cast<MetaAction*>(new MetaRectAction( ::tools::Rectangle( aPoint, aSize ) )), 1 ); + xMetaFile->AddAction( static_cast<MetaAction*>(new MetaRectAction( ::tools::Rectangle( Point(), aSize ) )), 1 ); xMetaFile->SetPrefMapMode(MapMode(MapUnit::Map100thMM)); xMetaFile->SetPrefSize( aSize ); diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index d2ea8c5565fd..4c2e6b1c3203 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -647,8 +647,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) if (i >= nCounts) { - Color aBlack (0, 0, 0); - XHatch aHatch (aBlack, static_cast<css::drawing::HatchStyle>(pStyle->GetValue ()), pDistance->GetValue (), + XHatch aHatch (Color(0), static_cast<css::drawing::HatchStyle>(pStyle->GetValue ()), pDistance->GetValue (), pAngle->GetValue () * 10); pHatchList->Insert(o3tl::make_unique<XHatchEntry>(aHatch, pName->GetValue())); diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 48ce3459d989..cd63ec9f63c6 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -113,8 +113,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie } mpOutlinerView[0] = new OutlinerView(&mrOutliner, pWindow); - ::tools::Rectangle aNullRect; - mpOutlinerView[0]->SetOutputArea(aNullRect); + mpOutlinerView[0]->SetOutputArea(::tools::Rectangle()); mrOutliner.SetUpdateMode(false); mrOutliner.InsertView(mpOutlinerView[0], EE_APPEND); |