Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : :
20 : : #ifndef SVX_UNOMODEL_HXX
21 : : #define SVX_UNOMODEL_HXX
22 : :
23 : : #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
24 : : #include <com/sun/star/lang/XServiceInfo.hpp>
25 : : #include <com/sun/star/ucb/XAnyCompareFactory.hpp>
26 : : #include <com/sun/star/io/XOutputStream.hpp>
27 : : #include <com/sun/star/io/XInputStream.hpp>
28 : : #include <sfx2/sfxbasemodel.hxx>
29 : : #include <svx/fmdmod.hxx>
30 : : #include "svx/svxdllapi.h"
31 : :
32 : : class SdrModel;
33 : :
34 : : class SVX_DLLPUBLIC SvxUnoDrawingModel : public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other
35 : : public SvxFmMSFactory,
36 : : public ::com::sun::star::drawing::XDrawPagesSupplier,
37 : : public ::com::sun::star::lang::XServiceInfo,
38 : : public ::com::sun::star::ucb::XAnyCompareFactory
39 : : {
40 : : friend class SvxUnoDrawPagesAccess;
41 : :
42 : : private:
43 : : SdrModel* mpDoc;
44 : :
45 : : ::com::sun::star::uno::WeakReference< ::com::sun::star::drawing::XDrawPages > mxDrawPagesAccess;
46 : :
47 : : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDashTable;
48 : : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxGradientTable;
49 : : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxHatchTable;
50 : : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxBitmapTable;
51 : : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxTransGradientTable;
52 : : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxMarkerTable;
53 : :
54 : : ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence;
55 : :
56 : : public:
57 : : SvxUnoDrawingModel( SdrModel* pDoc ) throw();
58 : : virtual ~SvxUnoDrawingModel() throw();
59 : :
60 : 0 : SdrModel* GetDoc() const { return mpDoc; }
61 : :
62 : : // XInterface
63 : : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
64 : : virtual void SAL_CALL acquire() throw();
65 : : virtual void SAL_CALL release() throw();
66 : :
67 : : // XModel
68 : : virtual void SAL_CALL lockControllers( ) throw(::com::sun::star::uno::RuntimeException);
69 : : virtual void SAL_CALL unlockControllers( ) throw(::com::sun::star::uno::RuntimeException);
70 : : virtual sal_Bool SAL_CALL hasControllersLocked( ) throw(::com::sun::star::uno::RuntimeException);
71 : :
72 : : // XTypeProvider
73 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
74 : : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
75 : :
76 : : // XDrawPagesSupplier
77 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > SAL_CALL getDrawPages( ) throw(::com::sun::star::uno::RuntimeException);
78 : :
79 : : // XMultiServiceFactory ( SvxFmMSFactory )
80 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
81 : : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
82 : :
83 : : // XServiceInfo
84 : : virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
85 : : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
86 : : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
87 : :
88 : : // XAnyCompareFactory
89 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XAnyCompare > SAL_CALL createAnyCompareByName( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
90 : : };
91 : :
92 : : SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerExport( SdrModel* pModel, const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream>& xOut );
93 : : SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerExport( SdrModel* pModel, const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream>& xOut, const com::sun::star::uno::Reference< com::sun::star::lang::XComponent >& xComponent );
94 : : SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerExport( SdrModel* pModel, const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream>& xOut, const com::sun::star::uno::Reference< com::sun::star::lang::XComponent >& xComponent, const char* pExportService );
95 : : SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerImport( SdrModel* pModel, const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream );
96 : : SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerImport( SdrModel* pModel, const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream, const com::sun::star::uno::Reference< com::sun::star::lang::XComponent >& xComponent );
97 : : SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerImport( SdrModel* pModel, const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream, const com::sun::star::uno::Reference< com::sun::star::lang::XComponent >& xComponent, const char* pImportService );
98 : :
99 : : #endif
100 : :
101 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|