diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 09:16:39 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 09:16:39 +0000 |
commit | 3acf945a2e89ed9d5ea8472e1b0f7b27357c79ce (patch) | |
tree | 87d4f75c8a2799b403b1883353cdbefd1fad43ea /reportdesign/source | |
parent | 3ab09fbd9be4e4daa05f534b4bb9fdc74c1bdcd2 (diff) |
INTEGRATION: CWS dba31a (1.4.30); FILE MERGED
2008/06/26 14:26:34 oj 1.4.30.2: #i77916# impl zooming in report builder
2008/06/13 11:40:20 oj 1.4.30.1: #i88506# impl hyphenation
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/ui/report/EndMarker.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index 8028a2de1..639eee0e9 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: EndMarker.cxx,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -30,10 +30,8 @@ #include "precompiled_reportdesign.hxx" #include "EndMarker.hxx" #include "ColorChanger.hxx" -#include "ViewsWindow.hxx" -#ifndef RTPUI_REPORTDESIGN_HELPID_HRC +#include "SectionWindow.hxx" #include "helpids.hrc" -#endif #include <vcl/svapp.hxx> #include <vcl/gradient.hxx> #include <vcl/lineinfo.hxx> @@ -51,6 +49,7 @@ OEndMarker::OEndMarker(Window* _pParent ,const ::rtl::OUString& _sColorEntry) DBG_CTOR( rpt_OEndMarker,NULL); SetUniqueId(HID_RPT_ENDMARKER); ImplInitSettings(); + SetPaintTransparent(TRUE); } // ----------------------------------------------------------------------------- OEndMarker::~OEndMarker() @@ -60,11 +59,15 @@ OEndMarker::~OEndMarker() // ----------------------------------------------------------------------------- void OEndMarker::Paint( const Rectangle& /*rRect*/ ) { + Fraction aCornerSpace(long(CORNER_SPACE)); + aCornerSpace *= GetMapMode().GetScaleX(); + const long nCornerSpace = aCornerSpace; + Size aSize = GetSizePixel(); - aSize.Width() += CORNER_SPACE; - Rectangle aWholeRect(Point(-CORNER_SPACE,0),aSize); + aSize.Width() += nCornerSpace; + Rectangle aWholeRect(Point(-nCornerSpace,0),aSize); PolyPolygon aPoly; - aPoly.Insert(Polygon(aWholeRect,CORNER_SPACE,CORNER_SPACE)); + aPoly.Insert(Polygon(aWholeRect,nCornerSpace,nCornerSpace)); Color aStartColor(m_nColor); aStartColor.IncreaseLuminance(10); @@ -77,30 +80,27 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ ) Gradient aGradient(GRADIENT_LINEAR,aStartColor,aEndColor); aGradient.SetSteps(static_cast<USHORT>(aSize.Height())); - DrawGradient(aPoly ,aGradient); + DrawGradient(PixelToLogic(aPoly) ,aGradient); if ( m_bMarked ) { - Rectangle aRect( Point(-CORNER_SPACE,CORNER_SPACE), - Size(aSize.Width()- CORNER_SPACE,aSize.Height() - CORNER_SPACE- CORNER_SPACE)); + Rectangle aRect( Point(-nCornerSpace,nCornerSpace), + Size(aSize.Width()- nCornerSpace,aSize.Height() - nCornerSpace- nCornerSpace)); ColorChanger aColors( this, COL_WHITE, COL_WHITE ); - DrawPolyLine(Polygon(aRect),LineInfo(LINE_SOLID,2)); + DrawPolyLine(Polygon(PixelToLogic(aRect)),LineInfo(LINE_SOLID,2)); } } // ----------------------------------------------------------------------- void OEndMarker::ImplInitSettings() { - //SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetDialogColor() ) ); - /*SetBackground( );*/ - SetBackground( Wallpaper( m_aColorConfig.GetColorValue(::svtools::APPBACKGROUND).nColor ) ); + SetBackground( Wallpaper( svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor) ); SetFillColor( Application::GetSettings().GetStyleSettings().GetShadowColor() ); - //SetTextFillColor( Application::GetSettings().GetStyleSettings().GetDarkShadowColor() ); } // ----------------------------------------------------------------------- void OEndMarker::MouseButtonDown( const MouseEvent& rMEvt ) { if ( !rMEvt.IsLeft() && !rMEvt.IsRight()) return; - static_cast<OViewsWindow*>(GetParent())->showProperties(this); + static_cast<OSectionWindow*>(GetParent())->showProperties(); } // ======================================================================= } |