From 92a8fe504d070ac358824edb20e3eba4ba6615da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Timm?= Date: Fri, 26 Nov 2004 19:59:44 +0000 Subject: [PATCH] INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/22 15:23:46 thb 1.2.2.4: #110496# Avoiding ternary operators returning different types on their branches: triggers Solaris compiler bug 2004/07/20 19:09:04 thb 1.2.2.3: #110496# Unified include statements; removed external prefix from boost includes 2004/06/25 10:30:30 thb 1.2.2.2: #110496# Some header cleanups (missing forward declarations), changed Canvas and derived to emulate covariant return types on clone() (not directly possible with shared_ptr) 2004/04/05 15:58:52 thb 1.2.2.1: Resync with canvas01 changes --- cppcanvas/source/wrapper/implcanvas.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/cppcanvas/source/wrapper/implcanvas.cxx b/cppcanvas/source/wrapper/implcanvas.cxx index 515c460172e1..bd4ee5f05158 100644 --- a/cppcanvas/source/wrapper/implcanvas.cxx +++ b/cppcanvas/source/wrapper/implcanvas.cxx @@ -2,9 +2,9 @@ * * $RCSfile: implcanvas.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: thb $ $Date: 2004-03-18 10:41:10 $ + * last change: $Author: rt $ $Date: 2004-11-26 20:59:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,7 +59,7 @@ * ************************************************************************/ -#include "implcanvas.hxx" +#include #ifndef _RTL_USTRING_HXX_ #include @@ -78,8 +78,8 @@ #include #include -#include "implfont.hxx" -#include "implcolor.hxx" +#include +#include using namespace ::drafts::com::sun::star; @@ -119,7 +119,11 @@ namespace cppcanvas void ImplCanvas::setClip( const PolyPolygonSharedPtr& rClipPoly ) { mpClipPolyPolygon = rClipPoly; - maViewState.Clip = rClipPoly.get() != NULL ? rClipPoly->getUNOPolyPolygon() : NULL; + + if( rClipPoly.get() ) + maViewState.Clip = rClipPoly->getUNOPolyPolygon(); + else + maViewState.Clip.clear(); } PolyPolygonSharedPtr ImplCanvas::getClip() const @@ -137,7 +141,7 @@ namespace cppcanvas return ColorSharedPtr( new ImplColor( getUNOCanvas()->getDevice() ) ); } - CanvasSharedPtr ImplCanvas::cloneCanvas() const + CanvasSharedPtr ImplCanvas::clone() const { return CanvasSharedPtr( new ImplCanvas( *this ) ); }