fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / view / inc / VDiagram.hxx
blob8b4b0e9bc3d4face565df0d3df08e48fb967f728
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 .
19 #ifndef INCLUDED_CHART2_SOURCE_VIEW_INC_VDIAGRAM_HXX
20 #define INCLUDED_CHART2_SOURCE_VIEW_INC_VDIAGRAM_HXX
22 #include <com/sun/star/drawing/HomogenMatrix.hpp>
23 #include <com/sun/star/drawing/XShapes.hpp>
24 #include <com/sun/star/chart2/XDiagram.hpp>
25 #include "AbstractShapeFactory.hxx"
26 #include <basegfx/range/b2irectangle.hxx>
28 namespace chart
31 class AbstractShapeFactory;
33 /** The VDiagram is responsible to generate the visible parts of the Diagram
34 that is wall, floor, axes and data series.
35 The axes and data series are subobjects which are created and managed by the
36 diagram.
39 class VDiagram
41 public: //methods
42 VDiagram( const com::sun::star::uno::Reference<com::sun::star::chart2::XDiagram>& xDiagram,
43 const com::sun::star::drawing::Direction3D& rPreferredAspectRatio,
44 sal_Int32 nDimension = 3 );
45 virtual ~VDiagram();
47 void init(
48 const com::sun::star::uno::Reference<com::sun::star::drawing::XShapes>& xTarget,
49 const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xFactory );
51 void createShapes( const ::com::sun::star::awt::Point& rPos
52 , const ::com::sun::star::awt::Size& rSize );
54 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
55 getCoordinateRegion() { return css::uno::Reference<css::drawing::XShapes>( m_xCoordinateRegionShape, css::uno::UNO_QUERY );}
57 /**
58 * Get current bounding rectangle for the diagram without axes.
60 basegfx::B2IRectangle getCurrentRectangle() const;
62 void reduceToMimimumSize();
64 ::basegfx::B2IRectangle adjustPosAndSize( const ::com::sun::star::awt::Point& rPos
65 , const ::com::sun::star::awt::Size& rAvailableSize );
67 ::basegfx::B2IRectangle adjustInnerSize( const ::basegfx::B2IRectangle& rConsumedOuterRect );
69 private: //methods
70 void createShapes_2d();
71 void createShapes_3d();
73 ::basegfx::B2IRectangle adjustPosAndSize_2d( const ::com::sun::star::awt::Point& rPos
74 , const ::com::sun::star::awt::Size& rAvailableSize );
75 ::basegfx::B2IRectangle adjustPosAndSize_3d( const ::com::sun::star::awt::Point& rPos
76 , const ::com::sun::star::awt::Size& rAvailableSize );
78 void adjustAspectRatio3d( const ::com::sun::star::awt::Size& rAvailableSize );
80 private: //members
81 VDiagram(const VDiagram& rD) SAL_DELETED_FUNCTION;
83 ::com::sun::star::uno::Reference<
84 ::com::sun::star::drawing::XShapes > m_xTarget;
85 ::com::sun::star::uno::Reference<
86 ::com::sun::star::lang::XMultiServiceFactory> m_xShapeFactory;
87 AbstractShapeFactory* m_pShapeFactory;
89 // this is the surrounding shape which contains floor, wall and coordinate
90 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xOuterGroupShape;
91 // this is an additional inner shape that represents the coordinate region - that is - where to place data points
92 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xCoordinateRegionShape;
93 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xWall2D;
95 sal_Int32 m_nDimensionCount;
96 ::com::sun::star::uno::Reference<
97 ::com::sun::star::chart2::XDiagram > m_xDiagram;
99 ::com::sun::star::drawing::Direction3D m_aPreferredAspectRatio;
100 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xAspectRatio3D;
102 double m_fXAnglePi;
103 double m_fYAnglePi;
104 double m_fZAnglePi;
106 ::com::sun::star::awt::Point m_aAvailablePosIncludingAxes;
107 ::com::sun::star::awt::Size m_aAvailableSizeIncludingAxes;
109 ::com::sun::star::awt::Point m_aCurrentPosWithoutAxes;
110 ::com::sun::star::awt::Size m_aCurrentSizeWithoutAxes;
112 bool m_bRightAngledAxes;
115 } //namespace chart
116 #endif
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */