1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <canvas/debug.hxx>
22 #include <canvas/verbosetrace.hxx>
23 #include <canvas/canvastools.hxx>
25 #include <com/sun/star/registry/XRegistryKey.hpp>
26 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
27 #include <com/sun/star/uno/XComponentContext.hpp>
29 #include <cppuhelper/factory.hxx>
30 #include <cppuhelper/implementationentry.hxx>
31 #include <comphelper/servicedecl.hxx>
33 #include <vcl/canvastools.hxx>
34 #include <vcl/outdev.hxx>
35 #include <vcl/window.hxx>
36 #include <vcl/bitmapex.hxx>
38 #include <basegfx/tools/canvastools.hxx>
43 #include "spritecanvas.hxx"
46 using namespace ::com::sun::star
;
50 namespace sdecl
= comphelper::service_decl
;
52 static uno::Reference
<uno::XInterface
> initCanvas( Canvas
* pCanvas
)
54 uno::Reference
<uno::XInterface
> xRet(static_cast<cppu::OWeakObject
*>(pCanvas
));
55 pCanvas
->initialize();
59 sdecl::class_
<Canvas
, sdecl::with_args
<true> > serviceImpl1(&initCanvas
);
60 const sdecl::ServiceDecl
vclCanvasDecl(
62 CANVAS_IMPLEMENTATION_NAME
,
63 CANVAS_SERVICE_NAME
);
65 static uno::Reference
<uno::XInterface
> initSpriteCanvas( SpriteCanvas
* pCanvas
)
67 uno::Reference
<uno::XInterface
> xRet(static_cast<cppu::OWeakObject
*>(pCanvas
));
68 pCanvas
->initialize();
72 sdecl::class_
<SpriteCanvas
, sdecl::with_args
<true> > serviceImpl2(&initSpriteCanvas
);
73 const sdecl::ServiceDecl
vclSpriteCanvasDecl(
75 SPRITECANVAS_IMPLEMENTATION_NAME
,
76 SPRITECANVAS_SERVICE_NAME
);
79 // The C shared lib entry points
80 COMPHELPER_SERVICEDECL_EXPORTS2(vclcanvas
, vclcanvas::vclCanvasDecl
, vclcanvas::vclSpriteCanvasDecl
)
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */