1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_canvas.hxx"
30 
31 #include <canvas/debug.hxx>
32 #include <canvas/verbosetrace.hxx>
33 #include <canvas/canvastools.hxx>
34 
35 #include <comphelper/scopeguard.hxx>
36 
37 #include <basegfx/range/b2drectangle.hxx>
38 #include <basegfx/tools/canvastools.hxx>
39 
40 #include <boost/cast.hpp>
41 
42 #include "null_spritecanvashelper.hxx"
43 #include "null_canvascustomsprite.hxx"
44 
45 
46 using namespace ::com::sun::star;
47 
48 namespace nullcanvas
49 {
50     SpriteCanvasHelper::SpriteCanvasHelper() :
51         mpRedrawManager( NULL )
52     {
53     }
54 
55     void SpriteCanvasHelper::init( ::canvas::SpriteRedrawManager& rManager,
56                                    SpriteCanvas&                  rDevice,
57                                    const ::basegfx::B2ISize&      rSize,
58                                    bool                           bHasAlpha )
59     {
60         mpRedrawManager = &rManager;
61 
62         CanvasHelper::init( rSize, rDevice, bHasAlpha );
63     }
64 
65     void SpriteCanvasHelper::disposing()
66     {
67         mpRedrawManager = NULL;
68 
69         // forward to base
70         CanvasHelper::disposing();
71     }
72 
73     uno::Reference< rendering::XAnimatedSprite > SpriteCanvasHelper::createSpriteFromAnimation(
74         const uno::Reference< rendering::XAnimation >& /*animation*/ )
75     {
76         return uno::Reference< rendering::XAnimatedSprite >();
77     }
78 
79     uno::Reference< rendering::XAnimatedSprite > SpriteCanvasHelper::createSpriteFromBitmaps(
80         const uno::Sequence< uno::Reference< rendering::XBitmap > >& /*animationBitmaps*/,
81         sal_Int8                                                     /*interpolationMode*/ )
82     {
83         return uno::Reference< rendering::XAnimatedSprite >();
84     }
85 
86     uno::Reference< rendering::XCustomSprite > SpriteCanvasHelper::createCustomSprite( const geometry::RealSize2D& spriteSize )
87     {
88         if( !mpRedrawManager )
89             return uno::Reference< rendering::XCustomSprite >(); // we're disposed
90 
91         return uno::Reference< rendering::XCustomSprite >(
92             new CanvasCustomSprite( spriteSize,
93                                     mpDevice ) );
94     }
95 
96     uno::Reference< rendering::XSprite > SpriteCanvasHelper::createClonedSprite( const uno::Reference< rendering::XSprite >& /*original*/ )
97     {
98         return uno::Reference< rendering::XSprite >();
99     }
100 
101     sal_Bool SpriteCanvasHelper::updateScreen( const ::basegfx::B2IRange& /*rCurrArea*/,
102                                                sal_Bool                   /*bUpdateAll*/,
103                                                bool&                      /*io_bSurfaceDirty*/ )
104     {
105         // TODO
106         return sal_True;
107     }
108 
109     void SpriteCanvasHelper::backgroundPaint( const ::basegfx::B2DRange& /*rUpdateRect*/ )
110     {
111         // TODO
112     }
113 
114     void SpriteCanvasHelper::scrollUpdate( const ::basegfx::B2DRange& 						/*rMoveStart*/,
115                                            const ::basegfx::B2DRange& 						/*rMoveEnd*/,
116                                            const ::canvas::SpriteRedrawManager::UpdateArea& /*rUpdateArea*/ )
117     {
118         // TODO
119     }
120 
121     void SpriteCanvasHelper::opaqueUpdate( const ::canvas::SpriteRedrawManager::UpdateArea& /*rUpdateArea*/ )
122     {
123         // TODO
124     }
125 
126     void SpriteCanvasHelper::genericUpdate( const ::canvas::SpriteRedrawManager::UpdateArea& /*rUpdateArea*/ )
127     {
128         // TODO
129     }
130 
131 }
132