canvas/source/cairo/cairo_canvashelper.cxx | 4 cppcanvas/source/mtfrenderer/implrenderer.cxx | 14 - drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 12 - drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 26 +- filter/source/flash/swfwriter1.cxx | 2 filter/source/svg/svgwriter.cxx | 20 - padmin/source/padialog.cxx | 2 reportdesign/source/ui/report/EndMarker.cxx | 2 reportdesign/source/ui/report/StartMarker.cxx | 2 sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 2 sc/source/ui/view/output.cxx | 2 sd/source/ui/annotations/annotationwindow.cxx | 6 sw/source/ui/docvw/AnnotationMenuButton.cxx | 4 sw/source/ui/docvw/SidebarTxtControl.cxx | 4 vcl/inc/svdata.hxx | 1 vcl/inc/vcl/gradient.hxx | 12 - vcl/inc/vcl/vclenum.hxx | 26 -- vcl/source/app/settings.cxx | 2 vcl/source/gdi/gradient.cxx | 12 - vcl/source/gdi/outdev4.cxx | 10 vcl/source/gdi/wall.cxx | 2 vcl/source/window/dockingarea.cxx | 35 +-- vcl/source/window/menu.cxx | 2 vcl/source/window/toolbox.cxx | 2 vcl/source/window/window.cxx | 2 vcl/win/source/gdi/salnativewidgets-luna.cxx | 151 ++++++++++--- vcl/workben/outdevgrind.cxx | 2 vcl/workben/svptest.cxx | 2 28 files changed, 212 insertions(+), 151 deletions(-)
New commits: commit c0056446cde6b8eef2d21efa5f6d72bfd9518caf Author: Jan Holesovsky <ke...@suse.cz> Date: Tue Jun 12 09:40:32 2012 +0200 menubar: Improved Windows Vista or later look (based on Mirek M.'s design). Change-Id: Ica8076b7e21c5188a3126faf32d16904deecf212 Signed-off-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 2b1a4f1..20eb88e 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -492,6 +492,81 @@ void ImplConvertSpinbuttonValues( int nControlPart, const ControlState& rState, // ---- +/// Draw an effect under the menubar for better readibility in the non-client area +static bool impl_drawAeroMenubar( HWND hWnd, HDC hDC, RECT rc ) +{ + const long GLOW_OFFSET = 5; + const long VISIBLE_FRAME = 2; + const long TRIANGLE_WIDTH = rc.bottom - rc.top - GLOW_OFFSET - VISIBLE_FRAME; + const COLOR16 FINAL_OPACITY = 0x2000; + + // the glow effect gives us a nice fade into the gradient + HTHEME hGlowTheme = getThemeHandle( hWnd, L"TextGlow"); + if ( !hGlowTheme ) + return sal_False; + + // first clear everything + FillRect( hDC, &rc, static_cast< HBRUSH >( GetStockObject( BLACK_BRUSH ) ) ); + + // gradient under the menu + TRIVERTEX vert[2] = { + { rc.left + GLOW_OFFSET + TRIANGLE_WIDTH, rc.top + GLOW_OFFSET, 0x0000, 0x0000, 0x0000, 0x0000 }, + { rc.right - GLOW_OFFSET - TRIANGLE_WIDTH, rc.bottom - VISIBLE_FRAME, 0xff00, 0xff00, 0xff00, FINAL_OPACITY } + }; + GRADIENT_RECT g_rect[1] = { { 0, 1 } }; + GradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V ); + + // left side of the gradient consists of 2 triangles + TRIVERTEX vert_left_1[3] = { + { rc.left + GLOW_OFFSET, rc.top + GLOW_OFFSET, 0x0000, 0x0000, 0x0000, 0x0000 }, + { rc.left + GLOW_OFFSET, rc.bottom - VISIBLE_FRAME, 0x0000, 0x0000, 0x0000, 0x0000 }, + { rc.left + GLOW_OFFSET + TRIANGLE_WIDTH, rc.bottom - VISIBLE_FRAME, 0xff00, 0xff00, 0xff00, FINAL_OPACITY } + }; + GRADIENT_TRIANGLE g_triangle[1] = { { 0, 1, 2 } }; + GradientFill( hDC, vert_left_1, 3, g_triangle, 1, GRADIENT_FILL_TRIANGLE ); + + TRIVERTEX vert_left_2[3] = { + { rc.left + GLOW_OFFSET, rc.top + GLOW_OFFSET, 0x0000, 0x0000, 0x0000, 0x0000 }, + { rc.left + GLOW_OFFSET + TRIANGLE_WIDTH, rc.top + GLOW_OFFSET, 0x0000, 0x0000, 0x0000, 0x0000 }, + { rc.left + GLOW_OFFSET + TRIANGLE_WIDTH, rc.bottom - VISIBLE_FRAME, 0xff00, 0xff00, 0xff00, FINAL_OPACITY } + }; + GradientFill( hDC, vert_left_2, 3, g_triangle, 1, GRADIENT_FILL_TRIANGLE ); + + // right side of the gradient consists of 2 triangles + TRIVERTEX vert_right_1[3] = { + { rc.right - GLOW_OFFSET, rc.top + GLOW_OFFSET, 0x0000, 0x0000, 0x0000, 0x0000 }, + { rc.right - GLOW_OFFSET, rc.bottom - VISIBLE_FRAME, 0x0000, 0x0000, 0x0000, 0x0000 }, + { rc.right - GLOW_OFFSET - TRIANGLE_WIDTH, rc.bottom - VISIBLE_FRAME, 0xff00, 0xff00, 0xff00, FINAL_OPACITY } + }; + GradientFill( hDC, vert_right_1, 3, g_triangle, 1, GRADIENT_FILL_TRIANGLE ); + + TRIVERTEX vert_right_2[3] = { + { rc.right - GLOW_OFFSET, rc.top + GLOW_OFFSET, 0x0000, 0x0000, 0x0000, 0x0000 }, + { rc.right - GLOW_OFFSET - TRIANGLE_WIDTH, rc.top + GLOW_OFFSET, 0x0000, 0x0000, 0x0000, 0x0000 }, + { rc.right - GLOW_OFFSET - TRIANGLE_WIDTH, rc.bottom - VISIBLE_FRAME, 0xff00, 0xff00, 0xff00, FINAL_OPACITY } + }; + GradientFill( hDC, vert_right_2, 3, g_triangle, 1, GRADIENT_FILL_TRIANGLE ); + + // I have no idea what is the correct name of the contstant + // that is represented by '1' below - but that draws the glow + // effect + // I've found the "TextGlow" theme handle here: + // http://fc01.deviantart.net/fs26/f/2008/154/0/6/Vista_Visual_Style_Classes_by_UkIntel.html + // and its rendering here: + // http://deskmodder.de/wiki/index.php/Vista_msstyleImage_900-938 + // No better documentation on the topic, unfortunately :-( + RECT tmp_rc = rc; + tmp_rc.bottom += rc.bottom - rc.top; // expand it vertically so that it continues to the window + ImplDrawTheme( hGlowTheme, hDC, 1, MBI_NORMAL, tmp_rc, OUString() ); + + // make the frame visible, so that it integrates nicely with Aero + tmp_rc = rc; + tmp_rc.top = rc.bottom - VISIBLE_FRAME; + FillRect( hDC, &tmp_rc, static_cast< HBRUSH >( GetStockObject( BLACK_BRUSH ) ) ); + + return sal_True; +} + sal_Bool ImplDrawNativeControl( HWND hWnd, HDC hDC, HTHEME hTheme, RECT rc, ControlType nType, ControlPart nPart, @@ -974,22 +1049,17 @@ sal_Bool ImplDrawNativeControl( HWND hWnd, HDC hDC, HTHEME hTheme, RECT rc, { if( nPart == PART_ENTIRE_CONTROL ) { - if( ImplGetSVData()->maNWFData.mbTransparentMenubar ) - { - // When the frame is correctly extended to the client area, - // Aero just needs us to repaint the affected rectangle in black - FillRect( hDC, &rc, static_cast< HBRUSH >( GetStockObject( BLACK_BRUSH ) ) ); + // Windows Vista or later? Try drawing to the non-client area... + if( ImplGetSVData()->maNWFData.mbTransparentMenubar && impl_drawAeroMenubar( hWnd, hDC, rc ) ) return sal_True; - } - else + + // ...otherwise use the theme + if( aValue.getType() == CTRL_MENUBAR ) { - if( aValue.getType() == CTRL_MENUBAR ) - { - const MenubarValue *pValue = static_cast<const MenubarValue*>(&aValue); - rc.bottom += pValue->maTopDockingAreaHeight; // extend potential gradient to cover docking area as well - } - return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption); + const MenubarValue *pValue = static_cast<const MenubarValue*>(&aValue); + rc.bottom += pValue->maTopDockingAreaHeight; // extend potential gradient to cover docking area as well } + return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption); } else if( nPart == PART_MENU_ITEM ) { @@ -998,24 +1068,6 @@ sal_Bool ImplDrawNativeControl( HWND hWnd, HDC hDC, HTHEME hTheme, RECT rc, else iState = (nState & CTRL_STATE_SELECTED) ? MBI_DISABLEDHOT : MBI_DISABLED; - // draw the text glow so that the text is better visible - if ( ImplGetSVData()->maNWFData.mbTransparentMenubar ) - { - HTHEME hGlowTheme = getThemeHandle( hWnd, L"TextGlow"); - if ( !hTheme ) - return sal_False; - - // I have no idea what is the correct name of the contstant - // that is represented by '1' below - but that draws the glow - // effect - // I've found the "TextGlow" theme handle here: - // http://fc01.deviantart.net/fs26/f/2008/154/0/6/Vista_Visual_Style_Classes_by_UkIntel.html - // and its rendering here: - // http://deskmodder.de/wiki/index.php/Vista_msstyleImage_900-938 - // No better documentation on the topic, unfortunately :-( - ImplDrawTheme( hGlowTheme, hDC, 1, MBI_NORMAL, rc, aCaption ); - } - return ImplDrawTheme( hTheme, hDC, MENU_BARITEM, iState, rc, aCaption ); } } commit dd06b29cf9a490d854cd8f9a12e3eb001edc7ab7 Author: Jan Holesovsky <ke...@suse.cz> Date: Tue Jun 12 11:06:56 2012 +0200 toolbars: Improve the toolbars look in Windows Vista or later. Change-Id: I389ef70c76a3a9c837ad5406c417804ad77be948 diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index a0f610d..a4a228e 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -308,6 +308,7 @@ struct ImplSVNWFData bool mbMenuBarDockingAreaCommonBG:1; // e.g. WinXP default theme bool mbDockingAreaSeparateTB:1; // individual toolbar backgrounds // instead of one for docking area + bool mbDockingAreaAvoidTBFrames:1; //< don't draw frames around the individual toolbars if mbDockingAreaSeparateTB is false bool mbToolboxDropDownSeparate:1; // two adjacent buttons for // toolbox dropdown buttons bool mbFlatMenu:1; // no popup 3D border diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index 31f29c2..a123ead 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -171,24 +171,27 @@ void DockingAreaWindow::Paint( const Rectangle& ) DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT, aCtrlRegion, nState, aControlValue, rtl::OUString() ); - // each toolbar gets a thin border to better recognize its borders on the homogeneous docking area - sal_uInt16 nChildren = GetChildCount(); - for( sal_uInt16 n = 0; n < nChildren; n++ ) + if( !ImplGetSVData()->maNWFData.mbDockingAreaAvoidTBFrames ) { - Window* pChild = GetChild( n ); - if ( pChild->IsVisible() ) + // each toolbar gets a thin border to better recognize its borders on the homogeneous docking area + sal_uInt16 nChildren = GetChildCount(); + for( sal_uInt16 n = 0; n < nChildren; n++ ) { - Point aPos = pChild->GetPosPixel(); - Size aSize = pChild->GetSizePixel(); - Rectangle aRect( aPos, aSize ); - - SetLineColor( GetSettings().GetStyleSettings().GetLightColor() ); - DrawLine( aRect.TopLeft(), aRect.TopRight() ); - DrawLine( aRect.TopLeft(), aRect.BottomLeft() ); - - SetLineColor( GetSettings().GetStyleSettings().GetSeparatorColor() ); - DrawLine( aRect.BottomLeft(), aRect.BottomRight() ); - DrawLine( aRect.TopRight(), aRect.BottomRight() ); + Window* pChild = GetChild( n ); + if ( pChild->IsVisible() ) + { + Point aPos = pChild->GetPosPixel(); + Size aSize = pChild->GetSizePixel(); + Rectangle aRect( aPos, aSize ); + + SetLineColor( GetSettings().GetStyleSettings().GetLightColor() ); + DrawLine( aRect.TopLeft(), aRect.TopRight() ); + DrawLine( aRect.TopLeft(), aRect.BottomLeft() ); + + SetLineColor( GetSettings().GetStyleSettings().GetSeparatorColor() ); + DrawLine( aRect.BottomLeft(), aRect.BottomRight() ); + DrawLine( aRect.TopRight(), aRect.BottomRight() ); + } } } } diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 6ba04d7..2b1a4f1 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -932,7 +932,39 @@ sal_Bool ImplDrawNativeControl( HWND hWnd, HDC hDC, HTHEME hTheme, RECT rc, { const ToolbarValue *pValue = static_cast<const ToolbarValue*>(&aValue); if( pValue->mbIsTopDockingArea ) - rc.top = 0; // extend potential gradient to cover menu bar as well + { + // make it more compatible with Aero + if( ImplGetSVData()->maNWFData.mbTransparentMenubar ) + { + const long GRADIENT_HEIGHT = 32; + + long gradient_break = rc.top; + GRADIENT_RECT g_rect[1] = { { 0, 1 } }; + + // very slow gradient at the top (if we have space for that) + if ( rc.bottom - rc.top > GRADIENT_HEIGHT ) + { + gradient_break = rc.bottom - GRADIENT_HEIGHT; + + TRIVERTEX vert[2] = { + { rc.left, rc.top, 0xff00, 0xff00, 0xff00, 0xff00 }, + { rc.right, gradient_break, 0xfa00, 0xfa00, 0xfa00, 0xff00 }, + }; + GradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V ); + } + + // gradient at the bottom + TRIVERTEX vert[2] = { + { rc.left, gradient_break, 0xfa00, 0xfa00, 0xfa00, 0xff00 }, + { rc.right, rc.bottom, 0xe500, 0xe900, 0xee00, 0xff00 } + }; + GradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V ); + + return sal_True; + } + else + rc.top = 0; // extend potential gradient to cover menu bar as well + } } return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption); } @@ -1514,6 +1546,9 @@ void WinSalGraphics::updateSettingsNative( AllSettings& rSettings ) pSVData->maNWFData.mnMenuFormatBorderY = 2; pSVData->maNWFData.maMenuBarHighlightTextColor = aStyleSettings.GetMenuTextColor(); GetSalData()->mbThemeMenuSupport = TRUE; + + // don't draw frame around each and every toolbar + pSVData->maNWFData.mbDockingAreaAvoidTBFrames = true; } rSettings.SetStyleSettings( aStyleSettings ); commit 8806e00dbc14b55cff6072f0f6dcf90e0a11a079 Author: Jan Holesovsky <ke...@suse.cz> Date: Mon Jun 11 16:41:34 2012 +0200 Get rid of GRADIENT_* defines, they conflict with Windows GDI types. Change-Id: Ia0bc37f81b7213b20fc5093beb46d7a05b1ac931 Signed-off-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index b75efda..924e6f8 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -711,10 +711,6 @@ namespace cairocanvas const ::canvas::ParametricPolyPolygon::Values aValues = rPolygon.getValues(); double x0, x1, y0, y1, cx, cy, r0, r1; -// undef macros from vclenum.hxx which conflicts with GradientType enum values -#undef GRADIENT_LINEAR -#undef GRADIENT_ELLIPTICAL - switch( aValues.meType ) { case ::canvas::ParametricPolyPolygon::GRADIENT_LINEAR: diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 1b0f8cd..028aa0c 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -634,7 +634,7 @@ namespace cppcanvas uno::Sequence< uno::Sequence < double > > aColors(2); uno::Sequence< double > aStops(2); - if( rGradient.GetStyle() == GRADIENT_AXIAL ) + if( rGradient.GetStyle() == GradientStyle_AXIAL ) { aStops.realloc(3); aColors.realloc(3); @@ -671,7 +671,7 @@ namespace cppcanvas rtl::OUString aGradientService; switch( rGradient.GetStyle() ) { - case GRADIENT_LINEAR: + case GradientStyle_LINEAR: basegfx::tools::createLinearODFGradientInfo(aGradInfo, aBounds, nSteps, @@ -683,7 +683,7 @@ namespace cppcanvas aGradientService = "LinearGradient"; break; - case GRADIENT_AXIAL: + case GradientStyle_AXIAL: { // Adapt the border so that it is suitable // for the axial gradient. An axial @@ -717,7 +717,7 @@ namespace cppcanvas break; } - case GRADIENT_RADIAL: + case GradientStyle_RADIAL: basegfx::tools::createRadialODFGradientInfo(aGradInfo, aBounds, aOffset, @@ -726,7 +726,7 @@ namespace cppcanvas aGradientService = "EllipticalGradient"; break; - case GRADIENT_ELLIPTICAL: + case GradientStyle_ELLIPTICAL: basegfx::tools::createEllipticalODFGradientInfo(aGradInfo, aBounds, aOffset, @@ -736,7 +736,7 @@ namespace cppcanvas aGradientService = "EllipticalGradient"; break; - case GRADIENT_SQUARE: + case GradientStyle_SQUARE: basegfx::tools::createSquareODFGradientInfo(aGradInfo, aBounds, aOffset, @@ -746,7 +746,7 @@ namespace cppcanvas aGradientService = "RectangularGradient"; break; - case GRADIENT_RECT: + case GradientStyle_RECT: basegfx::tools::createRectangularODFGradientInfo(aGradInfo, aBounds, aOffset, diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 448ae14..fa5b1ae 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -892,32 +892,32 @@ namespace switch(rGradient.GetStyle()) { - case GRADIENT_LINEAR : + case GradientStyle_LINEAR : { aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_LINEAR; break; } - case GRADIENT_AXIAL : + case GradientStyle_AXIAL : { aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_AXIAL; break; } - case GRADIENT_RADIAL : + case GradientStyle_RADIAL : { aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_RADIAL; break; } - case GRADIENT_ELLIPTICAL : + case GradientStyle_ELLIPTICAL : { aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_ELLIPTICAL; break; } - case GRADIENT_SQUARE : + case GradientStyle_SQUARE : { aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_SQUARE; break; } - default : // GRADIENT_RECT + default : // GradientStyle_RECT { aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_RECT; break; diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 7387700..3cad086 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -340,32 +340,32 @@ namespace drawinglayer { default : // attribute::GRADIENTSTYLE_LINEAR : { - o_rVCLGradient.SetStyle(GRADIENT_LINEAR); + o_rVCLGradient.SetStyle(GradientStyle_LINEAR); break; } case attribute::GRADIENTSTYLE_AXIAL : { - o_rVCLGradient.SetStyle(GRADIENT_AXIAL); + o_rVCLGradient.SetStyle(GradientStyle_AXIAL); break; } case attribute::GRADIENTSTYLE_RADIAL : { - o_rVCLGradient.SetStyle(GRADIENT_RADIAL); + o_rVCLGradient.SetStyle(GradientStyle_RADIAL); break; } case attribute::GRADIENTSTYLE_ELLIPTICAL : { - o_rVCLGradient.SetStyle(GRADIENT_ELLIPTICAL); + o_rVCLGradient.SetStyle(GradientStyle_ELLIPTICAL); break; } case attribute::GRADIENTSTYLE_SQUARE : { - o_rVCLGradient.SetStyle(GRADIENT_SQUARE); + o_rVCLGradient.SetStyle(GradientStyle_SQUARE); break; } case attribute::GRADIENTSTYLE_RECT : { - o_rVCLGradient.SetStyle(GRADIENT_RECT); + o_rVCLGradient.SetStyle(GradientStyle_RECT); break; } } @@ -1542,16 +1542,16 @@ namespace drawinglayer switch(aVCLGradient.GetStyle()) { - default : // GRADIENT_LINEAR: - case GRADIENT_AXIAL: + default : // GradientStyle_LINEAR: + case GradientStyle_AXIAL: eGrad = SvtGraphicFill::gradientLinear; break; - case GRADIENT_RADIAL: - case GRADIENT_ELLIPTICAL: + case GradientStyle_RADIAL: + case GradientStyle_ELLIPTICAL: eGrad = SvtGraphicFill::gradientRadial; break; - case GRADIENT_SQUARE: - case GRADIENT_RECT: + case GradientStyle_SQUARE: + case GradientStyle_RECT: eGrad = SvtGraphicFill::gradientRectangular; break; } @@ -1828,7 +1828,7 @@ namespace drawinglayer const sal_uInt8 nTransPercentVcl((sal_uInt8)basegfx::fround(rUniTransparenceCandidate.getTransparence() * 255.0)); const Color aTransColor(nTransPercentVcl, nTransPercentVcl, nTransPercentVcl); - aVCLGradient.SetStyle(GRADIENT_LINEAR); + aVCLGradient.SetStyle(GradientStyle_LINEAR); aVCLGradient.SetStartColor(aTransColor); aVCLGradient.SetEndColor(aTransColor); aVCLGradient.SetAngle(0); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index d43569e..dfc7edf 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -352,7 +352,7 @@ void Writer::Impl_writeGradientEx( const PolyPolygon& rPolyPoly, const Gradient& PolyPolygon aPolyPolygon( rPolyPoly ); map( aPolyPolygon ); - if( (rGradient.GetStyle() == GRADIENT_LINEAR && rGradient.GetAngle() == 900) || (rGradient.GetStyle() == GRADIENT_RADIAL) ) + if( (rGradient.GetStyle() == GradientStyle_LINEAR && rGradient.GetAngle() == 900) || (rGradient.GetStyle() == GradientStyle_RADIAL) ) { const Rectangle aBoundRect( aPolyPolygon.GetBoundRect() ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 1106eaf..a74e175 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -191,8 +191,8 @@ void SVGAttributeWriter::AddPaintAttr( const Color& rLineColor, const Color& rFi void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradient& rGradient, ::rtl::OUString& rGradientId ) { if( rObjRect.GetWidth() && rObjRect.GetHeight() && - ( rGradient.GetStyle() == GRADIENT_LINEAR || rGradient.GetStyle() == GRADIENT_AXIAL || - rGradient.GetStyle() == GRADIENT_RADIAL || rGradient.GetStyle() == GRADIENT_ELLIPTICAL ) ) + ( rGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL || + rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL ) ) { SvXMLElementExport aDesc( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, sal_True, sal_True ); Color aStartColor( rGradient.GetStartColor() ), aEndColor( rGradient.GetEndColor() ); @@ -220,7 +220,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie ::std::auto_ptr< SvXMLElementExport > apGradient; ::rtl::OUString aColorStr; - if( rGradient.GetStyle() == GRADIENT_LINEAR || rGradient.GetStyle() == GRADIENT_AXIAL ) + if( rGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL ) { Polygon aLinePoly( 2 ); @@ -239,9 +239,9 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie // write stop values double fBorder = static_cast< double >( rGradient.GetBorder() ) * - ( ( rGradient.GetStyle() == GRADIENT_AXIAL ) ? 0.005 : 0.01 ); + ( ( rGradient.GetStyle() == GradientStyle_AXIAL ) ? 0.005 : 0.01 ); - ImplGetColorStr( ( rGradient.GetStyle() == GRADIENT_AXIAL ) ? aEndColor : aStartColor, aColorStr ); + ImplGetColorStr( ( rGradient.GetStyle() == GradientStyle_AXIAL ) ? aEndColor : aStartColor, aColorStr ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, ::rtl::OUString::valueOf( fBorder ) ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStopColor, aColorStr ); @@ -249,7 +249,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie SvXMLElementExport aDesc2( mrExport, XML_NAMESPACE_NONE, aXMLElemStop, sal_True, sal_True ); } - if( rGradient.GetStyle() == GRADIENT_AXIAL ) + if( rGradient.GetStyle() == GradientStyle_AXIAL ) { ImplGetColorStr( aStartColor, aColorStr ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, ::rtl::OUString::valueOf( 0.5 ) ); @@ -260,7 +260,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie } } - if( rGradient.GetStyle() != GRADIENT_AXIAL ) + if( rGradient.GetStyle() != GradientStyle_AXIAL ) fBorder = 0.0; ImplGetColorStr( aEndColor, aColorStr ); @@ -770,8 +770,8 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G else aPolyPoly = rPolyPoly; - if ( rGradient.GetStyle() == GRADIENT_LINEAR || - rGradient.GetStyle() == GRADIENT_AXIAL ) + if ( rGradient.GetStyle() == GradientStyle_LINEAR || + rGradient.GetStyle() == GradientStyle_AXIAL ) { ImplWriteGradientLinear( aPolyPoly, rGradient ); } @@ -832,7 +832,7 @@ void SVGActionWriter::ImplWriteGradientLinear( const PolyPolygon& rPolyPoly, const Color aEndColor = ImplGetColorWithIntensity( rGradient.GetEndColor(), rGradient.GetEndIntensity() ); double fBorderOffset = rGradient.GetBorder() / 100.0; const sal_uInt16 nSteps = rGradient.GetSteps(); - if( rGradient.GetStyle() == GRADIENT_LINEAR ) + if( rGradient.GetStyle() == GradientStyle_LINEAR ) { // Emulate non-smooth gradient if( 0 < nSteps && nSteps < 100 ) diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx index 3da1b5d..3bce4e5 100644 --- a/padmin/source/padialog.cxx +++ b/padmin/source/padialog.cxx @@ -501,7 +501,7 @@ void SpaPrinterController::printPage( int ) const Color aLightGreen( 0, 0xff, 0 ); Color aDarkGreen( 0, 0x40, 0 ); - Gradient aGradient( GRADIENT_LINEAR, aBlack, aWhite ); + Gradient aGradient( GradientStyle_LINEAR, aBlack, aWhite ); aGradient.SetAngle( 900 ); pPrinter->DrawGradient( Rectangle( Point( 1000, 5500 ), Size( aPaperSize.Width() - 2000, diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index 12f329c..57ab903 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -73,7 +73,7 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ ) aStartColor.RGBtoHSB(nHue, nSat, nBri); nSat += 40; Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri)); - Gradient aGradient(GRADIENT_LINEAR,aStartColor,aEndColor); + Gradient aGradient(GradientStyle_LINEAR,aStartColor,aEndColor); aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height())); DrawGradient(PixelToLogic(aPoly) ,aGradient); diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 98f6e0b..8a191ba 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -138,7 +138,7 @@ void OStartMarker::Paint( const Rectangle& rRect ) aStartColor.RGBtoHSB(nHue, nSat, nBri); nSat += 40; Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri)); - Gradient aGradient(GRADIENT_LINEAR,aStartColor,aEndColor); + Gradient aGradient(GradientStyle_LINEAR,aStartColor,aEndColor); aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height())); DrawGradient(PixelToLogic(aPoly) ,aGradient); diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index e3e8700..7f067fe 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -469,7 +469,7 @@ void ScZoomSliderWnd::DoPaint( const Rectangle& /*rRect*/ ) Gradient g; g.SetAngle( 0 ); - g.SetStyle( GRADIENT_LINEAR ); + g.SetStyle( GradientStyle_LINEAR ); g.SetStartColor( aStartColor ); g.SetEndColor( aEndColor ); diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 1ca09e6..cd9c7a9 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -838,7 +838,7 @@ void drawDataBars( const ScDataBarInfo* pOldDataBarInfo, OutputDevice* pDev, con if(pOldDataBarInfo->mbGradient) { pDev->SetLineColor(pOldDataBarInfo->maColor); - Gradient aGradient(GRADIENT_LINEAR, pOldDataBarInfo->maColor, COL_TRANSPARENT); + Gradient aGradient(GradientStyle_LINEAR, pOldDataBarInfo->maColor, COL_TRANSPARENT); if(pOldDataBarInfo->mnLength < 0) aGradient.SetAngle(2700); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 34950f9..6d8a311 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -137,7 +137,7 @@ void AnnotationTextWindow::Paint( const Rectangle& rRect) if ( !bHighContrast ) { DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())), - Gradient(GRADIENT_LINEAR,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor)); + Gradient(GradientStyle_LINEAR,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor)); } if( mpOutlinerView ) @@ -693,9 +693,9 @@ void AnnotationWindow::Paint( const Rectangle& rRect) //draw button Gradient aGradient; if (mbMouseOverButton) - aGradient = Gradient(GRADIENT_LINEAR,ColorFromAlphaColor(80,maColorDark,maColor),ColorFromAlphaColor(15,maColorDark,maColor)); + aGradient = Gradient(GradientStyle_LINEAR,ColorFromAlphaColor(80,maColorDark,maColor),ColorFromAlphaColor(15,maColorDark,maColor)); else - aGradient = Gradient(GRADIENT_LINEAR,ColorFromAlphaColor(15,maColorDark,maColor),ColorFromAlphaColor(80,maColorDark,maColor)); + aGradient = Gradient(GradientStyle_LINEAR,ColorFromAlphaColor(15,maColorDark,maColor),ColorFromAlphaColor(80,maColorDark,maColor)); DrawGradient(maRectMetaButton,aGradient); //draw rect around button SetFillColor(); diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx index c1f4bf3..6758583 100644 --- a/sw/source/ui/docvw/AnnotationMenuButton.cxx +++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx @@ -143,11 +143,11 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ ) //draw button Gradient aGradient; if ( IsMouseOver() ) - aGradient = Gradient( GRADIENT_LINEAR, + aGradient = Gradient( GradientStyle_LINEAR, ColorFromAlphaColor( 80, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ), ColorFromAlphaColor( 15, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() )); else - aGradient = Gradient( GRADIENT_LINEAR, + aGradient = Gradient( GradientStyle_LINEAR, ColorFromAlphaColor( 15, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ), ColorFromAlphaColor( 80, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() )); DrawGradient( aRect, aGradient ); diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx index b26b1b3..75d00a1 100644 --- a/sw/source/ui/docvw/SidebarTxtControl.cxx +++ b/sw/source/ui/docvw/SidebarTxtControl.cxx @@ -142,14 +142,14 @@ void SidebarTxtControl::Paint( const Rectangle& rRect) HasFocus() ) { DrawGradient( Rectangle( Point(0,0), PixelToLogic(GetSizePixel()) ), - Gradient( GRADIENT_LINEAR, + Gradient( GradientStyle_LINEAR, mrSidebarWin.ColorDark(), mrSidebarWin.ColorDark() ) ); } else { DrawGradient( Rectangle( Point(0,0), PixelToLogic(GetSizePixel()) ), - Gradient( GRADIENT_LINEAR, + Gradient( GradientStyle_LINEAR, mrSidebarWin.ColorLight(), mrSidebarWin.ColorDark())); } diff --git a/vcl/inc/vcl/gradient.hxx b/vcl/inc/vcl/gradient.hxx index 382b245..150b794 100644 --- a/vcl/inc/vcl/gradient.hxx +++ b/vcl/inc/vcl/gradient.hxx @@ -35,18 +35,6 @@ #include <vcl/vclenum.hxx> -// ------------------ -// - Gradient-Types - -// ------------------ - -/* -#ifndef ENUM_GRADIENTSTYLE_DECLARED -#define ENUM_GRADIENTSTYLE_DECLARED -enum GradientStyle { GRADIENT_LINEAR, GRADIENT_AXIAL, GRADIENT_RADIAL, - GRADIENT_ELLIPTICAL, GRADIENT_SQUARE, GRADIENT_RECT }; -#endif -*/ - // ---------------- // - Impl_Gradient - // ---------------- diff --git a/vcl/inc/vcl/vclenum.hxx b/vcl/inc/vcl/vclenum.hxx index dbc1830..95510e8 100644 --- a/vcl/inc/vcl/vclenum.hxx +++ b/vcl/inc/vcl/vclenum.hxx @@ -67,31 +67,17 @@ enum ExtDateFieldFormat { XTDATEF_SYSTEM_SHORT, XTDATEF_SYSTEM_SHORT_YY, XTDATEF // ------------------------------------------------------------ -// to avoid conflicts with enum's declared otherwise -#define GRADIENT_LINEAR GradientStyle_LINEAR -#define GRADIENT_AXIAL GradientStyle_AXIAL -#define GRADIENT_RADIAL GradientStyle_RADIAL -#define GRADIENT_ELLIPTICAL GradientStyle_ELLIPTICAL -#define GRADIENT_SQUARE GradientStyle_SQUARE -#define GRADIENT_RECT GradientStyle_RECT -#define GRADIENT_FORCE_EQUAL_SIZE GradientStyle_FORCE_EQUAL_SIZE - -#ifndef ENUM_GRADIENTSTYLE_DECLARED -#define ENUM_GRADIENTSTYLE_DECLARED - enum GradientStyle { - GRADIENT_LINEAR = 0, - GRADIENT_AXIAL = 1, - GRADIENT_RADIAL = 2, - GRADIENT_ELLIPTICAL = 3, - GRADIENT_SQUARE = 4, - GRADIENT_RECT = 5, + GradientStyle_LINEAR = 0, + GradientStyle_AXIAL = 1, + GradientStyle_RADIAL = 2, + GradientStyle_ELLIPTICAL = 3, + GradientStyle_SQUARE = 4, + GradientStyle_RECT = 5, GradientStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM }; -#endif - // ------------------------------------------------------------ // to avoid conflicts with enum's declared otherwise diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index f30ce5c..02457d1 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -428,7 +428,7 @@ void ImplStyleData::SetStandardStyles() mbHideDisabledMenuItems = sal_False; mnAcceleratorsInContextMenus = sal_True; - Gradient aGrad( GRADIENT_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR ); + Gradient aGrad( GradientStyle_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR ); maWorkspaceGradient = Wallpaper( aGrad ); } diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx index af648a1..61c005d 100644 --- a/vcl/source/gdi/gradient.cxx +++ b/vcl/source/gdi/gradient.cxx @@ -42,7 +42,7 @@ Impl_Gradient::Impl_Gradient() : maEndColor( COL_WHITE ) { mnRefCount = 1; - meStyle = GRADIENT_LINEAR; + meStyle = GradientStyle_LINEAR; mnAngle = 0; mnBorder = 0; mnOfsX = 50; @@ -238,7 +238,7 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin Rectangle aRect( rRect ); sal_uInt16 nAngle = GetAngle() % 3600; - if( GetStyle() == GRADIENT_LINEAR || GetStyle() == GRADIENT_AXIAL ) + if( GetStyle() == GradientStyle_LINEAR || GetStyle() == GradientStyle_AXIAL ) { aRect.Left()--; aRect.Top()--; @@ -264,7 +264,7 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin } else { - if( GetStyle() == GRADIENT_SQUARE || GetStyle() == GRADIENT_RECT ) + if( GetStyle() == GradientStyle_SQUARE || GetStyle() == GradientStyle_RECT ) { const double fAngle = nAngle * F_PI1800; const double fWidth = aRect.GetWidth(); @@ -283,19 +283,19 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin Size aSize( aRect.GetSize() ); - if( GetStyle() == GRADIENT_RADIAL ) + if( GetStyle() == GradientStyle_RADIAL ) { // Radien-Berechnung fuer Kreis aSize.Width() = (long)(0.5 + sqrt((double)aSize.Width()*(double)aSize.Width() + (double)aSize.Height()*(double)aSize.Height())); aSize.Height() = aSize.Width(); } - else if( GetStyle() == GRADIENT_ELLIPTICAL ) + else if( GetStyle() == GradientStyle_ELLIPTICAL ) { // Radien-Berechnung fuer Ellipse aSize.Width() = (long)( 0.5 + (double) aSize.Width() * 1.4142 ); aSize.Height() = (long)( 0.5 + (double) aSize.Height() * 1.4142 ); } - else if( GetStyle() == GRADIENT_SQUARE ) + else if( GetStyle() == GradientStyle_SQUARE ) { if ( aSize.Width() > aSize.Height() ) aSize.Height() = aSize.Width(); diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index 735a85e..7b5c819 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -185,7 +185,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, long nBorder = (long)rGradient.GetBorder() * aRect.GetHeight() / 100; // Rand berechnen und Rechteck neu setzen fuer linearen Farbverlauf - bool bLinear = (rGradient.GetStyle() == GRADIENT_LINEAR); + bool bLinear = (rGradient.GetStyle() == GradientStyle_LINEAR); if ( bLinear ) { aRect.Top() += nBorder; @@ -529,7 +529,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) ) break; - if( rGradient.GetStyle() == GRADIENT_RADIAL || rGradient.GetStyle() == GRADIENT_ELLIPTICAL ) + if( rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL ) aPoly = Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 ); else aPoly = Polygon( aRect ); @@ -727,7 +727,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect, if ( !aGradient.GetSteps() ) aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); - if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL ) + if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) ImplDrawLinearGradient( aRect, aGradient, sal_False, NULL ); else ImplDrawComplexGradient( aRect, aGradient, sal_False, NULL ); @@ -892,7 +892,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, if ( !aGradient.GetSteps() ) aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); - if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL ) + if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) ImplDrawLinearGradient( aRect, aGradient, sal_False, &aClipPolyPoly ); else ImplDrawComplexGradient( aRect, aGradient, sal_False, &aClipPolyPoly ); @@ -1001,7 +1001,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r if ( !aGradient.GetSteps() ) aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); - if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL ) + if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) ImplDrawLinearGradient( aRect, aGradient, sal_True, NULL ); else ImplDrawComplexGradient( aRect, aGradient, sal_True, NULL ); diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index 98c7629..51a70cc 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -437,7 +437,7 @@ Gradient Wallpaper::ImplGetApplicationGradient() const { Gradient g; g.SetAngle( 900 ); - g.SetStyle( GRADIENT_LINEAR ); + g.SetStyle( GradientStyle_LINEAR ); g.SetStartColor( Application::GetSettings().GetStyleSettings().GetFaceColor() ); // no 'extreme' gradient when high contrast if( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 7c1751c..935d5a9 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2954,7 +2954,7 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa Rectangle aRect( Point( 0, 0 ), Point( aLogoSz.Width()-1, aOutSz.Height() ) ); if ( pWin->GetColorCount() >= 256 ) { - Gradient aGrad( GRADIENT_LINEAR, pLogo->aStartColor, pLogo->aEndColor ); + Gradient aGrad( GradientStyle_LINEAR, pLogo->aStartColor, pLogo->aEndColor ); aGrad.SetAngle( 1800 ); aGrad.SetBorder( 15 ); pWin->DrawGradient( aRect, aGrad ); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index c672c7a..8242ec9 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -409,7 +409,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp Gradient g; g.SetAngle( pThis->mbHorz ? 0 : 900 ); - g.SetStyle( GRADIENT_LINEAR ); + g.SetStyle( GradientStyle_LINEAR ); g.SetStartColor( startCol ); g.SetEndColor( endCol ); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 04f10df..4d33be5 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -483,7 +483,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl aStyleSettings.SetWorkspaceGradient( Wallpaper( Color( COL_BLACK ) ) ); else { - Gradient aGrad( GRADIENT_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR ); + Gradient aGrad( GradientStyle_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR ); aStyleSettings.SetWorkspaceGradient( Wallpaper( aGrad ) ); } diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index 96b6572..323feee 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -145,7 +145,7 @@ void setupMethodStubs( functor_vector_type& res ) const BitmapEx aBitmapExAlphaAlien( aBitmapAlien, aBitmapAlien ); const Image aImage( aBitmapEx ); - const Gradient aGradient(GRADIENT_ELLIPTICAL,aBlackColor,aWhiteColor); + const Gradient aGradient(GradientStyle_ELLIPTICAL,aBlackColor,aWhiteColor); const Hatch aHatch(HatchStyle_TRIPLE,aBlackColor,4,450); const Wallpaper aWallpaper( aWhiteColor ); diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index 545c2ae..2c1dd59 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -308,7 +308,7 @@ void MyWin::Paint( const Rectangle& rRect ) Color aLightGreen( 0, 0xff, 0 ); Color aDarkGreen( 0, 0x40, 0 ); - Gradient aGradient( GRADIENT_LINEAR, aBlack, aWhite ); + Gradient aGradient( GradientStyle_LINEAR, aBlack, aWhite ); aGradient.SetAngle( 900 ); DrawGradient( Rectangle( Point( 1000, 4500 ), Size( aPaperSize.Width() - 2000, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits