Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #include <canvas/debug.hxx>
31 : : #include <canvas/verbosetrace.hxx>
32 : : #include <canvas/canvastools.hxx>
33 : :
34 : : #include <com/sun/star/registry/XRegistryKey.hpp>
35 : : #include <com/sun/star/lang/XSingleServiceFactory.hpp>
36 : : #include <com/sun/star/uno/XComponentContext.hpp>
37 : :
38 : : #include <cppuhelper/factory.hxx>
39 : : #include <cppuhelper/implementationentry.hxx>
40 : : #include <comphelper/servicedecl.hxx>
41 : :
42 : : #include <vcl/canvastools.hxx>
43 : : #include <vcl/outdev.hxx>
44 : : #include <vcl/window.hxx>
45 : : #include <vcl/bitmapex.hxx>
46 : :
47 : : #include <basegfx/tools/canvastools.hxx>
48 : :
49 : : #include <algorithm>
50 : :
51 : : #include "canvas.hxx"
52 : : #include "spritecanvas.hxx"
53 : :
54 : :
55 : : using namespace ::com::sun::star;
56 : :
57 : : namespace vclcanvas
58 : : {
59 : : namespace sdecl = comphelper::service_decl;
60 : :
61 : 0 : static uno::Reference<uno::XInterface> initCanvas( Canvas* pCanvas )
62 : : {
63 : 0 : uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pCanvas));
64 : 0 : pCanvas->initialize();
65 : 0 : return xRet;
66 : : }
67 : :
68 : 0 : sdecl::class_<Canvas, sdecl::with_args<true> > serviceImpl1(&initCanvas);
69 : 0 : const sdecl::ServiceDecl vclCanvasDecl(
70 : : serviceImpl1,
71 : : CANVAS_IMPLEMENTATION_NAME,
72 : : CANVAS_SERVICE_NAME );
73 : :
74 : 0 : static uno::Reference<uno::XInterface> initSpriteCanvas( SpriteCanvas* pCanvas )
75 : : {
76 : 0 : uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pCanvas));
77 : 0 : pCanvas->initialize();
78 : 0 : return xRet;
79 : : }
80 : :
81 : 0 : sdecl::class_<SpriteCanvas, sdecl::with_args<true> > serviceImpl2(&initSpriteCanvas);
82 : 0 : const sdecl::ServiceDecl vclSpriteCanvasDecl(
83 : : serviceImpl2,
84 : : SPRITECANVAS_IMPLEMENTATION_NAME,
85 : : SPRITECANVAS_SERVICE_NAME );
86 : : }
87 : :
88 : : // The C shared lib entry points
89 : 0 : COMPHELPER_SERVICEDECL_EXPORTS2(vclcanvas, vclcanvas::vclCanvasDecl, vclcanvas::vclSpriteCanvasDecl)
90 : :
91 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|