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 .
20 #ifndef INCLUDED_SVX_UNOMODEL_HXX
21 #define INCLUDED_SVX_UNOMODEL_HXX
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>
34 class SVX_DLLPUBLIC SvxUnoDrawingModel
: public SfxBaseModel
, // implements SfxListener, OWEAKOBJECT & other
35 public SvxFmMSFactory
,
36 public css::drawing::XDrawPagesSupplier
,
37 public css::lang::XServiceInfo
,
38 public css::ucb::XAnyCompareFactory
40 friend class SvxUnoDrawPagesAccess
;
45 css::uno::WeakReference
< css::drawing::XDrawPages
> mxDrawPagesAccess
;
47 css::uno::Reference
< css::uno::XInterface
> mxDashTable
;
48 css::uno::Reference
< css::uno::XInterface
> mxGradientTable
;
49 css::uno::Reference
< css::uno::XInterface
> mxHatchTable
;
50 css::uno::Reference
< css::uno::XInterface
> mxBitmapTable
;
51 css::uno::Reference
< css::uno::XInterface
> mxTransGradientTable
;
52 css::uno::Reference
< css::uno::XInterface
> mxMarkerTable
;
54 css::uno::Sequence
< css::uno::Type
> maTypeSequence
;
57 SvxUnoDrawingModel( SdrModel
* pDoc
) throw();
58 virtual ~SvxUnoDrawingModel() throw() override
;
60 SdrModel
* GetDoc() const { return mpDoc
; }
63 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
) override
;
64 virtual void SAL_CALL
acquire() throw() override
;
65 virtual void SAL_CALL
release() throw() override
;
68 virtual void SAL_CALL
lockControllers( ) override
;
69 virtual void SAL_CALL
unlockControllers( ) override
;
70 virtual sal_Bool SAL_CALL
hasControllersLocked( ) override
;
73 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
74 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) override
;
77 virtual css::uno::Reference
< css::drawing::XDrawPages
> SAL_CALL
getDrawPages( ) override
;
79 // XMultiServiceFactory ( SvxFmMSFactory )
80 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
createInstance( const OUString
& aServiceSpecifier
) override
;
81 virtual css::uno::Sequence
< OUString
> SAL_CALL
getAvailableServiceNames( ) override
;
84 virtual OUString SAL_CALL
getImplementationName() override
;
85 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
86 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
89 virtual css::uno::Reference
< css::ucb::XAnyCompare
> SAL_CALL
createAnyCompareByName( const OUString
& PropertyName
) override
;
92 SVX_DLLPUBLIC
extern bool SvxDrawingLayerExport( SdrModel
* pModel
, const css::uno::Reference
<css::io::XOutputStream
>& xOut
);
93 SVX_DLLPUBLIC
extern bool SvxDrawingLayerExport( SdrModel
* pModel
, const css::uno::Reference
<css::io::XOutputStream
>& xOut
, const css::uno::Reference
< css::lang::XComponent
>& xComponent
);
94 SVX_DLLPUBLIC
extern bool SvxDrawingLayerExport( SdrModel
* pModel
, const css::uno::Reference
<css::io::XOutputStream
>& xOut
, const css::uno::Reference
< css::lang::XComponent
>& xComponent
, const char* pExportService
);
95 SVX_DLLPUBLIC
extern bool SvxDrawingLayerImport( SdrModel
* pModel
, const css::uno::Reference
<css::io::XInputStream
>& xInputStream
);
96 SVX_DLLPUBLIC
extern bool SvxDrawingLayerImport( SdrModel
* pModel
, const css::uno::Reference
<css::io::XInputStream
>& xInputStream
, const css::uno::Reference
< css::lang::XComponent
>& xComponent
);
97 SVX_DLLPUBLIC
extern bool SvxDrawingLayerImport( SdrModel
* pModel
, const css::uno::Reference
<css::io::XInputStream
>& xInputStream
, const css::uno::Reference
< css::lang::XComponent
>& xComponent
, const char* pImportService
);
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */