INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED
2004/08/19 17:21:08 thb 1.2.2.5: #110496# Switched from deprecated to recommended shared_ptr dynamic cast method 2004/07/20 19:08:41 thb 1.2.2.4: #110496# Unified include statements; removed external prefix from boost includes 2004/06/25 14:01:06 thb 1.2.2.3: #100000# Old boost does not have operator bool on shared_ptr 2004/06/25 10:30:17 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:42 thb 1.2.2.1: Resync with canvas01 changes
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: bitmapcanvas.hxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: rt $ $Date: 2004-09-08 16:56:41 $
|
||||
* last change: $Author: rt $ $Date: 2004-11-26 20:50:38 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -65,6 +65,9 @@
|
||||
#ifndef _SAL_TYPES_H_
|
||||
#include <sal/types.h>
|
||||
#endif
|
||||
#ifndef _OSL_DIAGNOSE_H_
|
||||
#include <osl/diagnose.h>
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
|
||||
#include <boost/shared_ptr.hpp>
|
||||
@@ -95,7 +98,13 @@ namespace cppcanvas
|
||||
public:
|
||||
virtual ::basegfx::B2ISize getSize() const = 0;
|
||||
|
||||
virtual BitmapCanvasSharedPtr cloneBitmapCanvas() const = 0; // shared_ptr does not allow for covariant return types
|
||||
// shared_ptr does not allow for covariant return types
|
||||
BitmapCanvasSharedPtr cloneBitmapCanvas() const
|
||||
{
|
||||
BitmapCanvasSharedPtr p( ::boost::dynamic_pointer_cast< BitmapCanvas >(this->clone()) );
|
||||
OSL_ENSURE(p.get(), "BitmapCanvas::cloneBitmapCanvas(): dynamic cast failed");
|
||||
return p;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user