LibreOffice Module svx (master) 1
unomodel.hxx
Go to the documentation of this file.
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 INCLUDED_SVX_UNOMODEL_HXX
21#define INCLUDED_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>
32
33class SdrModel;
34
36: public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other
37 public SvxFmMSFactory,
38 public css::drawing::XDrawPagesSupplier,
39 public css::lang::XServiceInfo,
40 public css::ucb::XAnyCompareFactory
41{
43
44private:
46
47 css::uno::WeakReference< css::drawing::XDrawPages > mxDrawPagesAccess;
48
49 css::uno::Reference< css::uno::XInterface > mxDashTable;
50 css::uno::Reference< css::uno::XInterface > mxGradientTable;
51 css::uno::Reference< css::uno::XInterface > mxHatchTable;
52 css::uno::Reference< css::uno::XInterface > mxBitmapTable;
53 css::uno::Reference< css::uno::XInterface > mxTransGradientTable;
54 css::uno::Reference< css::uno::XInterface > mxMarkerTable;
55
56 css::uno::Sequence< css::uno::Type > maTypeSequence;
57
58protected:
59 // SvxUnoDrawMSFactory
60 virtual SdrModel& getSdrModelFromUnoModel() const override;
61
62public:
63 SvxUnoDrawingModel( SdrModel* pDoc ) noexcept;
64 virtual ~SvxUnoDrawingModel() noexcept override;
65
66 SdrModel* GetDoc() const { return mpDoc; }
67
68 // XInterface
69 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
70 virtual void SAL_CALL acquire() noexcept override
72 virtual void SAL_CALL release() noexcept override
74
75 // XModel
76 virtual void SAL_CALL lockControllers( ) override;
77 virtual void SAL_CALL unlockControllers( ) override;
78 virtual sal_Bool SAL_CALL hasControllersLocked( ) override;
79
80 // XTypeProvider
81 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
82 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
83
84 // XDrawPagesSupplier
85 virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL getDrawPages( ) override;
86
87 // XMultiServiceFactory ( SvxFmMSFactory )
88 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) override;
89 virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames( ) override;
90
91 // XServiceInfo
92 virtual OUString SAL_CALL getImplementationName() override;
93 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
94 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
95
96 // XAnyCompareFactory
97 virtual css::uno::Reference< css::ucb::XAnyCompare > SAL_CALL createAnyCompareByName( const OUString& PropertyName ) override;
98};
99
100SVXCORE_DLLPUBLIC extern bool SvxDrawingLayerExport( SdrModel* pModel, const css::uno::Reference<css::io::XOutputStream>& xOut );
101extern bool SvxDrawingLayerExport( SdrModel* pModel, const css::uno::Reference<css::io::XOutputStream>& xOut, const css::uno::Reference< css::lang::XComponent >& xComponent );
102SVXCORE_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 );
103SVXCORE_DLLPUBLIC extern bool SvxDrawingLayerImport( SdrModel* pModel, const css::uno::Reference<css::io::XInputStream>& xInputStream );
104extern bool SvxDrawingLayerImport( SdrModel* pModel, const css::uno::Reference<css::io::XInputStream>& xInputStream, const css::uno::Reference< css::lang::XComponent >& xComponent );
105SVXCORE_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 );
106
107#endif
108
109/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL unlockControllers() override
virtual void SAL_CALL acquire() noexcept override
virtual sal_Bool SAL_CALL hasControllersLocked() override
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL lockControllers() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual ::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface > SAL_CALL createInstance(const OUString &ServiceSpecifier) override
Definition: fmdmod.cxx:34
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
Definition: fmdmod.cxx:59
virtual SdrModel & getSdrModelFromUnoModel() const =0
abstract SdrModel provider
virtual OUString SAL_CALL getImplementationName() override
Definition: unomod.cxx:629
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unomod.cxx:634
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unomod.cxx:639
css::uno::Reference< css::uno::XInterface > mxTransGradientTable
Definition: unomodel.hxx:53
css::uno::Sequence< css::uno::Type > maTypeSequence
Definition: unomodel.hxx:56
css::uno::Reference< css::uno::XInterface > mxDashTable
Definition: unomodel.hxx:49
css::uno::Reference< css::uno::XInterface > mxHatchTable
Definition: unomodel.hxx:51
css::uno::Reference< css::uno::XInterface > mxMarkerTable
Definition: unomodel.hxx:54
css::uno::WeakReference< css::drawing::XDrawPages > mxDrawPagesAccess
Definition: unomodel.hxx:47
SdrModel * mpDoc
Definition: unomodel.hxx:45
virtual void SAL_CALL acquire() noexcept override
Definition: unomodel.hxx:70
virtual void SAL_CALL release() noexcept override
Definition: unomodel.hxx:72
css::uno::Reference< css::uno::XInterface > mxGradientTable
Definition: unomodel.hxx:50
css::uno::Reference< css::uno::XInterface > mxBitmapTable
Definition: unomodel.hxx:52
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
unsigned char sal_Bool
SVXCORE_DLLPUBLIC bool SvxDrawingLayerImport(SdrModel *pModel, const css::uno::Reference< css::io::XInputStream > &xInputStream)
SVXCORE_DLLPUBLIC bool SvxDrawingLayerExport(SdrModel *pModel, const css::uno::Reference< css::io::XOutputStream > &xOut)