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 /vcl | |
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 'vcl')
-rw-r--r-- | vcl/source/app/help.cxx | 3 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 9 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 3 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/listbox.cxx | 3 | ||||
-rw-r--r-- | vcl/source/control/spinbtn.cxx | 3 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/JpegReader.cxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/animate.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/bitmap.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/bmpacc3.cxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/salgdilayout.cxx | 3 | ||||
-rw-r--r-- | vcl/source/outdev/bitmap.cxx | 3 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/brdwin.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/menubarwindow.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/scrwnd.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 9 | ||||
-rw-r--r-- | vcl/unx/gtk/salprn-gtk.cxx | 3 | ||||
-rw-r--r-- | vcl/workben/svptest.cxx | 16 |
24 files changed, 41 insertions, 72 deletions
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index da6ad774d57d..86bf084df4e2 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -340,7 +340,6 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText ) } else // HELPWINSTYLE_BALLOON { - Point aTmpPoint; sal_Int32 nCharsInLine = 35 + ((maHelpText.getLength()/100)*5); // average width to have all windows consistent OUStringBuffer aBuf; @@ -348,7 +347,7 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText ) OUString aXXX = aBuf.makeStringAndClear(); long nWidth = GetTextWidth( aXXX ); Size aTmpSize( nWidth, 0x7FFFFFFF ); - tools::Rectangle aTry1( aTmpPoint, aTmpSize ); + tools::Rectangle aTry1( Point(), aTmpSize ); DrawTextFlags nDrawFlags = DrawTextFlags::MultiLine | DrawTextFlags::WordBreak | DrawTextFlags::Left | DrawTextFlags::Top; if ( mnStyle & QuickHelpFlags::CtrlText ) diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 4b6ff1ddc3a5..dc437fbca9d3 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -750,8 +750,7 @@ void PushButton::ImplDrawPushButtonFrame(vcl::RenderContext& rRenderContext, bool PushButton::ImplHitTestPushButton( vcl::Window const * pDev, const Point& rPos ) { - Point aTempPoint; - tools::Rectangle aTestRect( aTempPoint, pDev->GetOutputSizePixel() ); + tools::Rectangle aTestRect( Point(), pDev->GetOutputSizePixel() ); return aTestRect.IsInside( rPos ); } @@ -934,9 +933,8 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) HideFocus(); DrawButtonFlags nButtonStyle = ImplGetButtonState(); - Point aPoint; Size aOutSz(GetOutputSizePixel()); - tools::Rectangle aRect(aPoint, aOutSz); + tools::Rectangle aRect(Point(), aOutSz); tools::Rectangle aInRect = aRect; bool bNativeOK = false; @@ -1517,8 +1515,7 @@ bool PushButton::PreNotify( NotifyEvent& rNEvt ) if(aCtrlType == ControlType::Combobox) { // only paint the button part to avoid flickering of the combobox text - Point aPt; - tools::Rectangle aClipRect( aPt, GetOutputSizePixel() ); + tools::Rectangle aClipRect( Point(), GetOutputSizePixel() ); aClipRect.SetPos(pBorder->ScreenToOutputPixel(OutputToScreenPixel(aClipRect.TopLeft()))); pBorder->Invalidate( aClipRect ); } diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 990e24454a4c..2db27dfe8d7a 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1002,11 +1002,10 @@ long ComboBox::getMaxWidthScrollBarAndDownButton() const vcl::Window *pBorder = GetWindow( GetWindowType::Border ); ImplControlValue aControlValue; - Point aPoint; tools::Rectangle aContent, aBound; // use the full extent of the control - tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); + tools::Rectangle aArea( Point(), pBorder->GetOutputSizePixel() ); if ( GetNativeControlRegion(ControlType::Combobox, ControlPart::ButtonDown, aArea, ControlState::NONE, aControlValue, aBound, aContent) ) diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index c11b78ff6bf8..a7cb9b6a4a34 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -985,8 +985,7 @@ void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const tools:: /* * note: at this point the cursor must be switched off already */ - Point aTmpPoint; - tools::Rectangle aRect(aTmpPoint, GetOutputSizePixel()); + tools::Rectangle aRect(Point(), GetOutputSizePixel()); aRect.SetLeft( nXStart ); aRect.SetRight( nXEnd ); @@ -1007,8 +1006,7 @@ void Edit::ImplPaintBorder(vcl::RenderContext const & rRenderContext, long nXSta if (SupportsDoubleBuffering()) return; - Point aTmpPoint; - tools::Rectangle aRect(aTmpPoint, GetOutputSizePixel()); + tools::Rectangle aRect(Point(), GetOutputSizePixel()); aRect.SetLeft( nXStart ); aRect.SetRight( nXEnd ); diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index f13df3bcd46f..171b75afd151 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -887,8 +887,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt ) } else if ( ( ( !mbMulti && IsMouseMoveSelect() ) || mbStackMode ) && mpEntryList->GetEntryCount() ) { - Point aPoint; - tools::Rectangle aRect( aPoint, GetOutputSizePixel() ); + tools::Rectangle aRect( Point(), GetOutputSizePixel() ); if( aRect.IsInside( rMEvt.GetPosPixel() ) ) { if ( IsMouseMoveSelect() ) @@ -1158,8 +1157,7 @@ bool ImplListBoxWindow::SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bo void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) { - Point aPoint; - tools::Rectangle aRect( aPoint, GetOutputSizePixel() ); + tools::Rectangle aRect( Point(), GetOutputSizePixel() ); bool bInside = aRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() ); if( rTEvt.IsTrackingCanceled() || rTEvt.IsTrackingEnded() ) // MouseButtonUp diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index 514d86b94a3d..36ea3202c7d8 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -1181,10 +1181,9 @@ Size ListBox::CalcMinimumSize() const // Try native borders; scrollbar size may not be a good indicator // See how large the edit area inside is to estimate what is needed for the dropdown ImplControlValue aControlValue; - Point aPoint; tools::Rectangle aContent, aBound; Size aTestSize( 100, 20 ); - tools::Rectangle aArea( aPoint, aTestSize ); + tools::Rectangle aArea( Point(), aTestSize ); if( GetNativeControlRegion( ControlType::Listbox, ControlPart::SubEdit, aArea, ControlState::NONE, aControlValue, aBound, aContent) ) { diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index b5c388ce54c6..14d9fea61e2c 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -102,8 +102,7 @@ void SpinButton::Resize() Control::Resize(); Size aSize(GetOutputSizePixel()); - Point aTmpPoint; - tools::Rectangle aRect(aTmpPoint, aSize); + tools::Rectangle aRect(Point(), aSize); if (mbHorz) { maLowerRect = tools::Rectangle(0, 0, aSize.Width() / 2, aSize.Height() - 1); diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index 8606491462fd..46c8ef365071 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -221,10 +221,9 @@ bool JPEGReader::CreateBitmap(JPEGCreateBitmapParam const & rParam) if (((1 == nUnit) || (2 == nUnit)) && rParam.X_density && rParam.Y_density ) { - Point aEmptyPoint; Fraction aFractX( 1, rParam.X_density ); Fraction aFractY( 1, rParam.Y_density ); - MapMode aMapMode( nUnit == 1 ? MapUnit::MapInch : MapUnit::MapCM, aEmptyPoint, aFractX, aFractY ); + MapMode aMapMode( nUnit == 1 ? MapUnit::MapInch : MapUnit::MapCM, Point(), aFractX, aFractY ); Size aPrefSize = OutputDevice::LogicToLogic(aSize, aMapMode, MapMode(MapUnit::Map100thMM)); mpBitmap->SetPrefSize(aPrefSize); diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx index 6e1102a5ac49..e1a96c7434a0 100644 --- a/vcl/source/gdi/animate.cxx +++ b/vcl/source/gdi/animate.cxx @@ -146,8 +146,7 @@ void Animation::Clear() bool Animation::IsTransparent() const { - Point aPoint; - tools::Rectangle aRect( aPoint, maGlobalSize ); + tools::Rectangle aRect( Point(), maGlobalSize ); bool bRet = false; // If some small bitmap needs to be replaced by the background, @@ -446,8 +445,7 @@ bool Animation::Insert( const AnimationBitmap& rStepBmp ) if( !IsInAnimation() ) { - Point aPoint; - tools::Rectangle aGlobalRect( aPoint, maGlobalSize ); + tools::Rectangle aGlobalRect( Point(), maGlobalSize ); maGlobalSize = aGlobalRect.Union( tools::Rectangle( rStepBmp.aPosPix, rStepBmp.aSizePix ) ).GetSize(); maList.emplace_back( new AnimationBitmap( rStepBmp ) ); diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 8ca224a1c789..27088cc5465c 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -444,8 +444,7 @@ bool Bitmap::Erase(const Color& rFillColor) } else { - Point aTmpPoint; - const tools::Rectangle aRect( aTmpPoint, Size( pWriteAcc->Width(), pWriteAcc->Height() ) ); + const tools::Rectangle aRect( Point(), Size( pWriteAcc->Width(), pWriteAcc->Height() ) ); pWriteAcc->SetFillColor( rFillColor ); pWriteAcc->FillRect( aRect ); } @@ -752,8 +751,7 @@ bool Bitmap::Crop( const tools::Rectangle& rRectPixel ) if( pReadAcc ) { - Point aTmpPoint; - const tools::Rectangle aNewRect( aTmpPoint, aRect.GetSize() ); + const tools::Rectangle aNewRect( Point(), aRect.GetSize() ); Bitmap aNewBmp( aNewRect.GetSize(), GetBitCount(), &pReadAcc->GetPalette() ); ScopedWriteAccess pWriteAcc(aNewBmp); diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx index 6196fd7e6435..3e665746481b 100644 --- a/vcl/source/gdi/bmpacc3.cxx +++ b/vcl/source/gdi/bmpacc3.cxx @@ -234,8 +234,7 @@ void BitmapWriteAccess::FillRect( const tools::Rectangle& rRect ) if (mpFillColor) { const BitmapColor& rFillColor = *mpFillColor.get(); - Point aPoint; - tools::Rectangle aRect(aPoint, maBitmap.GetSizePixel()); + tools::Rectangle aRect(Point(), maBitmap.GetSizePixel()); aRect.Intersection(rRect); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index eb73aa2b6349..c38bfe4e4f5d 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2828,9 +2828,8 @@ bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, BmpConversion eColorConve Size aAntialias(aDrawSize.Width() * 4, aDrawSize.Height() * 4); // draw metafile into VDev - Point aBackPosPix; const_cast<GDIMetaFile *>(this)->WindStart(); - const_cast<GDIMetaFile *>(this)->Play(aVDev.get(), aBackPosPix, aAntialias); + const_cast<GDIMetaFile *>(this)->Play(aVDev.get(), Point(), aAntialias); // get paint bitmap Bitmap aBitmap( aVDev->GetBitmap( aNullPt, aVDev->GetOutputSizePixel() ) ); diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 66a15d0e257b..60d3649baf0b 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -733,7 +733,6 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSrcSizePixel ) { - Point aPt; Point aDestPt( LogicToPixel( rDestPt ) ); Size aDestSz( LogicToPixel( rDestSize ) ); tools::Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel ); @@ -766,7 +765,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, } // source cropped? - if( aSrcRect != tools::Rectangle( aPt, aMask.GetSizePixel() ) ) + if( aSrcRect != tools::Rectangle( Point(), aMask.GetSizePixel() ) ) aMask.Crop( aSrcRect ); // destination mirrored diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 1c6e6f72ac1e..4efc812a0fce 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -698,8 +698,7 @@ bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) ) { tools::Rectangle rgn( rControlRegion ); - tools::Rectangle aNull; - if (rgn != aNull) + if (rgn != tools::Rectangle()) mirror(rgn, pOutDev); std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone()); mirror( *mirrorValue, pOutDev ); diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 353cc4fb7e92..c8a52cac435d 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -182,8 +182,7 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz, if( !aBmp.IsEmpty() ) { - Point aPoint; - const tools::Rectangle aBmpRect( aPoint, aBmp.GetSizePixel() ); + const tools::Rectangle aBmpRect( Point(), aBmp.GetSizePixel() ); tools::Rectangle aSrcRect( rSrcPt, rSrcSz ); // do cropping if necessary diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 506159a50812..b88b6ceb0b61 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -393,8 +393,7 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) ); tools::Rectangle aPolyRect( aPolyPoly.GetBoundRect() ); - Point aPoint; - tools::Rectangle aDstRect( aPoint, GetOutputSizePixel() ); + tools::Rectangle aDstRect( Point(), GetOutputSizePixel() ); aDstRect.Intersection( aPolyRect ); diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 282ff6ef47d1..0b027196db8f 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -739,8 +739,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c nFlags |= DrawFrameFlags::WindowBorder; DecorationView aDecoView(&rRenderContext); - Point aTmpPoint; - tools::Rectangle aInRect(aTmpPoint, Size(mnWidth, mnHeight)); + tools::Rectangle aInRect(Point(), Size(mnWidth, mnHeight)); aDecoView.DrawFrame(aInRect, nStyle, nFlags); } diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index e337c7c5c341..53f88865c2cd 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -494,8 +494,8 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const // use the border window to have the exact position vcl::Window *pBorderWin = pWin->GetWindow( GetWindowType::Border ); - Point aPt; // the top-left corner in output coordinates ie (0,0) - tools::Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( tools::Rectangle( aPt, pBorderWin->GetSizePixel()) ) ) ; + // the top-left corner in output coordinates ie (0,0) + tools::Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( tools::Rectangle( Point(), pBorderWin->GetSizePixel()) ) ) ; if ( devRect.IsInside( aAbsolute ) ) { rHitTest = HITTEST_WINDOW; diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 56b1ad8fd6eb..18339eec8c11 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -602,8 +602,7 @@ static void ImplAddNWFSeparator(vcl::RenderContext& rRenderContext, const Size& // note: the menubar only provides the upper (dark) half of it, the rest (bright part) is drawn by the docking area rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetSeparatorColor()); - Point aPt; - tools::Rectangle aRect(aPt, rSize); + tools::Rectangle aRect(Point(), rSize); rRenderContext.DrawLine(aRect.BottomLeft(), aRect.BottomRight()); } } @@ -920,8 +919,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta Erase(rRenderContext); else { - Point aPt; - tools::Rectangle aCtrlRegion( aPt, aOutputSize ); + tools::Rectangle aCtrlRegion( Point(), aOutputSize ); rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aCtrlRegion, ControlState::ENABLED, aMenubarValue, OUString()); diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 972300f8536e..a2bc5473fb2c 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -173,8 +173,7 @@ long MenuFloatingWindow::ImplGetStartY() const vcl::Region MenuFloatingWindow::ImplCalcClipRegion() const { Size aOutSz = GetOutputSizePixel(); - Point aPos; - tools::Rectangle aRect( aPos, aOutSz ); + tools::Rectangle aRect( Point(), aOutSz ); aRect.AdjustTop(nScrollerHeight ); aRect.AdjustBottom( -(nScrollerHeight) ); diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index de15943f9e77..5650e8462074 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -104,8 +104,7 @@ void ImplWheelWindow::ImplSetRegion( const Bitmap& rRegionBmp ) { Point aPos( GetPointerPosPixel() ); const Size aSize( rRegionBmp.GetSizePixel() ); - Point aPoint; - const tools::Rectangle aRect( aPoint, aSize ); + const tools::Rectangle aRect( Point(), aSize ); maCenter = maLastMousePos = aPos; aPos.AdjustX( -(aSize.Width() >> 1) ); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index e46fd4a0cee8..ee75679c9ded 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -122,9 +122,8 @@ int ToolBox::ImplGetDragWidth( const vcl::RenderContext& rRenderContext, bool bH { ImplControlValue aControlValue; - Point aPoint; tools::Rectangle aContent, aBound; - tools::Rectangle aArea( aPoint, rRenderContext.GetOutputSizePixel() ); + tools::Rectangle aArea( Point(), rRenderContext.GetOutputSizePixel() ); if ( rRenderContext.GetNativeControlRegion(ControlType::Toolbar, bHorz ? ControlPart::ThumbVert : ControlPart::ThumbHorz, @@ -248,8 +247,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext, ToolbarValue aToolbarValue; aToolbarValue.maGripRect = aDragArea; - Point aPt; - tools::Rectangle aCtrlRegion(aPt, aSz); + tools::Rectangle aCtrlRegion(Point(), aSz); bNativeOk = rRenderContext.DrawNativeControl( ControlType::Toolbar, ePart, aCtrlRegion, ControlState::ENABLED, aToolbarValue, OUString() ); @@ -430,8 +428,7 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext) bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext) { // use NWF - Point aPt; - tools::Rectangle aCtrlRegion(aPt, GetOutputSizePixel()); + tools::Rectangle aCtrlRegion(Point(), GetOutputSizePixel()); return rRenderContext.DrawNativeControl( ControlType::Toolbar, mbHorz ? ControlPart::DrawBackgroundHorz : ControlPart::DrawBackgroundVert, aCtrlRegion, ControlState::ENABLED, ImplControlValue(), OUString() ); diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx index 9d7abcc7db75..d77a6b69d98d 100644 --- a/vcl/unx/gtk/salprn-gtk.cxx +++ b/vcl/unx/gtk/salprn-gtk.cxx @@ -242,7 +242,6 @@ GtkSalPrinter::StartJob( if (!bDoJob) return false; #endif - bool bCollate = false; //To-Do proper name, watch for encodings sFileName = OString("/tmp/hacking.ps"); @@ -252,7 +251,7 @@ GtkSalPrinter::StartJob( //To-Do, swap ps/pdf for gtk_printer_accepts_ps()/gtk_printer_accepts_pdf() ? - return impl_doJob(&aFileName, i_rJobName, i_rAppName, io_pSetupData, bCollate, io_rController); + return impl_doJob(&aFileName, i_rJobName, i_rAppName, io_pSetupData, /*bCollate*/false, io_rController); } bool diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index 4d33ff7934a9..30aa4e0e5d14 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -252,14 +252,14 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rR Size( 3000,3000 ), m_aBitmap); - Color aWhite(0xff, 0xff, 0xff); - Color aBlack(0, 0, 0); - Color aLightRed(0xff, 0, 0); - Color aDarkRed(0x40, 0, 0); - Color aLightBlue(0, 0, 0xff); - Color aDarkBlue(0,0,0x40); - Color aLightGreen(0, 0xff, 0); - Color aDarkGreen(0, 0x40, 0); + Color const aWhite(0xff, 0xff, 0xff); + Color const aBlack(0, 0, 0); + Color const aLightRed(0xff, 0, 0); + Color const aDarkRed(0x40, 0, 0); + Color const aLightBlue(0, 0, 0xff); + Color const aDarkBlue(0,0,0x40); + Color const aLightGreen(0, 0xff, 0); + Color const aDarkGreen(0, 0x40, 0); Gradient aGradient(GradientStyle::Linear, aBlack, aWhite); aGradient.SetAngle(900); |