tdf#124953: Use rangelist's combined range top-left address...
[LibreOffice.git] / include / svx / unomodel.hxx
blob3b82b337c6ccabb84af5f7c3a6354cc89c3280a8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
31 #include <cppuhelper/weakref.hxx>
33 class SdrModel;
35 class SVX_DLLPUBLIC SvxUnoDrawingModel
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
42 friend class SvxUnoDrawPagesAccess;
44 private:
45 SdrModel* mpDoc;
47 css::uno::WeakReference< css::drawing::XDrawPages > mxDrawPagesAccess;
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;
56 css::uno::Sequence< css::uno::Type > maTypeSequence;
58 protected:
59 // SvxUnoDrawMSFactory
60 virtual SdrModel& getSdrModelFromUnoModel() const override;
62 public:
63 SvxUnoDrawingModel( SdrModel* pDoc ) throw();
64 virtual ~SvxUnoDrawingModel() throw() override;
66 SdrModel* GetDoc() const { return mpDoc; }
68 // XInterface
69 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
70 virtual void SAL_CALL acquire() throw() override;
71 virtual void SAL_CALL release() throw() override;
73 // XModel
74 virtual void SAL_CALL lockControllers( ) override;
75 virtual void SAL_CALL unlockControllers( ) override;
76 virtual sal_Bool SAL_CALL hasControllersLocked( ) override;
78 // XTypeProvider
79 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
80 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
82 // XDrawPagesSupplier
83 virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL getDrawPages( ) override;
85 // XMultiServiceFactory ( SvxFmMSFactory )
86 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) override;
87 virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames( ) override;
89 // XServiceInfo
90 virtual OUString SAL_CALL getImplementationName() override;
91 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
92 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
94 // XAnyCompareFactory
95 virtual css::uno::Reference< css::ucb::XAnyCompare > SAL_CALL createAnyCompareByName( const OUString& PropertyName ) override;
98 SVX_DLLPUBLIC extern bool SvxDrawingLayerExport( SdrModel* pModel, const css::uno::Reference<css::io::XOutputStream>& xOut );
99 SVX_DLLPUBLIC extern bool SvxDrawingLayerExport( SdrModel* pModel, const css::uno::Reference<css::io::XOutputStream>& xOut, const css::uno::Reference< css::lang::XComponent >& xComponent );
100 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 );
101 SVX_DLLPUBLIC extern bool SvxDrawingLayerImport( SdrModel* pModel, const css::uno::Reference<css::io::XInputStream>& xInputStream );
102 SVX_DLLPUBLIC extern bool SvxDrawingLayerImport( SdrModel* pModel, const css::uno::Reference<css::io::XInputStream>& xInputStream, const css::uno::Reference< css::lang::XComponent >& xComponent );
103 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 );
105 #endif
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */