LibreOffice Module chart2 (master) 1
DrawModelWrapper.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#pragma once
20
21#include <svx/svdmodel.hxx>
22#include <svx/unopage.hxx>
23#include <svx/unoshape.hxx>
25
26namespace com::sun::star::lang { class XMultiServiceFactory; }
27namespace com::sun::star::frame { class XModel; }
28namespace com::sun::star::drawing { class XDrawPage; }
29namespace com::sun::star::drawing { class XShape; }
30namespace com::sun::star::drawing { class XShapes; }
31
32class SdrObjList;
33class SdrObject;
34
35namespace chart
36{
37
39{
40private:
45
46public:
47 SAL_DLLPRIVATE DrawModelWrapper();
48 SAL_DLLPRIVATE virtual ~DrawModelWrapper() override;
49
50 css::uno::Reference< css::lang::XMultiServiceFactory > getShapeFactory();
51
52 // the main page will contain the normal view objects
53 const rtl::Reference<SvxDrawPage> & getMainDrawPage();
54 SAL_DLLPRIVATE void clearMainDrawPage();
55
56 // the extra page is not visible, but contains some extras like the symbols for data points
57 const rtl::Reference<SvxDrawPage> & getHiddenDrawPage();
58
60 getChartRootShape( const rtl::Reference<SvxDrawPage>& xPage );
61
62 SAL_DLLPRIVATE void lockControllers();
63 SAL_DLLPRIVATE void unlockControllers();
64
65 OutputDevice* getReferenceDevice() const;
66
67 SfxItemPool& GetItemPool();
68
69 SAL_DLLPRIVATE virtual css::uno::Reference< css::uno::XInterface >
70 createUnoModel() override;
71 SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel >
72 getUnoModel();
73 SdrModel& getSdrModel();
74
75 XColorListRef GetColorList() const;
76 XDashListRef GetDashList() const;
77 XLineEndListRef GetLineEndList() const;
78 XGradientListRef GetGradientList() const;
79 XHatchListRef GetHatchList() const;
80 XBitmapListRef GetBitmapList() const;
81 XPatternListRef GetPatternList() const;
82
83 SdrObject* getNamedSdrObject( const OUString& rName );
84 static SdrObject* getNamedSdrObject( const OUString& rName, SdrObjList const * pObjList );
85
86 static bool removeShape( const rtl::Reference<SvxShape>& xShape );
87
88 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
89};
90} //namespace chart
91
92/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTVIEW
rtl::Reference< SfxItemPool > m_xChartItemPool
rtl::Reference< SvxDrawPage > m_xHiddenDrawPage
rtl::Reference< SvxDrawPage > m_xMainDrawPage
VclPtr< OutputDevice > m_pRefDevice
struct _xmlTextWriter * xmlTextWriterPtr