Bump for 3.6-28
[LibreOffice.git] / chart2 / source / inc / chartview / DrawModelWrapper.hxx
blob57ef7477b367497ba1fcca4d7faf89029cc601c1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _CHART2_DRAWMODELWRAPPER_HXX
29 #define _CHART2_DRAWMODELWRAPPER_HXX
31 //----
32 #include <svx/svdmodel.hxx>
33 // header for class SdrObject
34 #include <svx/svdobj.hxx>
36 //----
37 #include <com/sun/star/frame/XModel.hpp>
38 #include <com/sun/star/uno/XComponentContext.hpp>
39 #include <com/sun/star/drawing/XDrawPage.hpp>
40 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
41 #include "chartviewdllapi.hxx"
43 //.............................................................................
44 namespace chart
46 //.............................................................................
48 class OOO_DLLPUBLIC_CHARTVIEW DrawModelWrapper : private SdrModel
50 private:
51 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiComponentFactory > m_xMCF;
52 SfxItemPool* m_pChartItemPool;
54 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > m_xMainDrawPage;
55 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > m_xHiddenDrawPage;
57 std::auto_ptr< OutputDevice > m_apRefDevice;
59 //no default constructor
60 DrawModelWrapper();
62 public:
63 SAL_DLLPRIVATE DrawModelWrapper(::com::sun::star::uno::Reference<
64 ::com::sun::star::uno::XComponentContext > const & xContext );
65 SAL_DLLPRIVATE virtual ~DrawModelWrapper();
67 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getShapeFactory();
69 // the main page will contain the normal view objects
70 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > getMainDrawPage();
71 SAL_DLLPRIVATE void clearMainDrawPage();
73 // the extra page is not visible, but contains some extras like the symbols for data points
74 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > getHiddenDrawPage();
76 static ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
77 getChartRootShape( const ::com::sun::star::uno::Reference<
78 ::com::sun::star::drawing::XDrawPage>& xPage );
81 SAL_DLLPRIVATE void lockControllers();
82 SAL_DLLPRIVATE void unlockControllers();
84 /// tries to get an OutputDevice from the XParent of the model to use as reference device
85 SAL_DLLPRIVATE void attachParentReferenceDevice(
86 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xChartModel );
88 OutputDevice* getReferenceDevice() const;
90 SfxItemPool& GetItemPool();
91 SAL_DLLPRIVATE const SfxItemPool& GetItemPool() const;
93 SAL_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
94 createUnoModel();
95 SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
96 getUnoModel();
97 SdrModel& getSdrModel();
99 XColorListRef GetColorList() const;
100 XDashListRef GetDashList() const;
101 XLineEndListRef GetLineEndList() const;
102 XGradientListRef GetGradientList() const;
103 XHatchListRef GetHatchList() const;
104 XBitmapListRef GetBitmapList() const;
106 SdrObject* getNamedSdrObject( const rtl::OUString& rName );
107 static SdrObject* getNamedSdrObject( const String& rName, SdrObjList* pObjList );
109 static bool removeShape( const ::com::sun::star::uno::Reference<
110 ::com::sun::star::drawing::XShape >& xShape );
112 //.............................................................................
113 } //namespace chart
114 //.............................................................................
115 #endif
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */