LibreOffice Module chart2 (master) 1
VDiagram.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
22#include <com/sun/star/drawing/Direction3D.hpp>
23#include <com/sun/star/awt/Size.hpp>
24#include <com/sun/star/awt/Point.hpp>
25#include <svx/unoshape.hxx>
26#include <rtl/ref.hxx>
27
28namespace com::sun::star::beans { class XPropertySet; }
29namespace com::sun::star::chart2 { class XDiagram; }
30namespace com::sun::star::lang { class XMultiServiceFactory; }
31namespace com::sun::star::drawing { class XShape; }
32
33
34namespace chart
35{
36class Diagram;
37class ShapeFactory;
38
45class VDiagram final
46{
47public: //methods
49 const css::drawing::Direction3D& rPreferredAspectRatio,
50 sal_Int32 nDimension );
51 ~VDiagram();
52
53 void init(
54 const rtl::Reference<SvxShapeGroupAnyD>& xTarget );
55
56 void createShapes( const css::awt::Point& rPos
57 , const css::awt::Size& rSize );
58
61
66
68
69 ::basegfx::B2IRectangle adjustPosAndSize( const css::awt::Point& rPos
70 , const css::awt::Size& rAvailableSize );
71
72 ::basegfx::B2IRectangle adjustInnerSize( const ::basegfx::B2IRectangle& rConsumedOuterRect );
73
74private: //methods
75 void createShapes_2d();
76 void createShapes_3d();
77
78 ::basegfx::B2IRectangle adjustPosAndSize_2d( const css::awt::Point& rPos
79 , const css::awt::Size& rAvailableSize );
80 ::basegfx::B2IRectangle adjustPosAndSize_3d( const css::awt::Point& rPos
81 , const css::awt::Size& rAvailableSize );
82
83 void adjustAspectRatio3d( const css::awt::Size& rAvailableSize );
84
85private: //members
86 VDiagram(const VDiagram& rD) = delete;
87
89
90 // this is the surrounding shape which contains floor, wall and coordinate
92 // this is an additional inner shape that represents the coordinate region - that is - where to place data points
95
98
99 css::drawing::Direction3D m_aPreferredAspectRatio;
100 css::uno::Reference< css::beans::XPropertySet > m_xAspectRatio3D;
101
105
108
111
113};
114
115} //namespace chart
116
117/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
The VDiagram is responsible to generate the visible parts of the Diagram that is wall,...
Definition: VDiagram.hxx:46
void createShapes_2d()
Definition: VDiagram.cxx:131
::basegfx::B2IRectangle adjustPosAndSize_3d(const css::awt::Point &rPos, const css::awt::Size &rAvailableSize)
Definition: VDiagram.cxx:411
rtl::Reference< ::chart::Diagram > m_xDiagram
Definition: VDiagram.hxx:97
void reduceToMinimumSize()
Definition: VDiagram.cxx:634
VDiagram(const VDiagram &rD)=delete
double m_fXAnglePi
Definition: VDiagram.hxx:102
basegfx::B2IRectangle getCurrentRectangle() const
Get current bounding rectangle for the diagram without axes.
Definition: VDiagram.cxx:629
css::awt::Size m_aCurrentSizeWithoutAxes
Definition: VDiagram.hxx:110
rtl::Reference< SvxShapeGroupAnyD > m_xOuterGroupShape
Definition: VDiagram.hxx:91
rtl::Reference< SvxShapeRect > m_xWall2D
Definition: VDiagram.hxx:94
::basegfx::B2IRectangle adjustInnerSize(const ::basegfx::B2IRectangle &rConsumedOuterRect)
Definition: VDiagram.cxx:652
css::awt::Point m_aCurrentPosWithoutAxes
Definition: VDiagram.hxx:109
double m_fYAnglePi
Definition: VDiagram.hxx:103
const rtl::Reference< SvxShapeGroupAnyD > & getCoordinateRegion() const
Definition: VDiagram.hxx:60
::basegfx::B2IRectangle adjustPosAndSize_2d(const css::awt::Point &rPos, const css::awt::Size &rAvailableSize)
Definition: VDiagram.cxx:105
VDiagram(const rtl::Reference<::chart::Diagram > &xDiagram, const css::drawing::Direction3D &rPreferredAspectRatio, sal_Int32 nDimension)
css::uno::Reference< css::beans::XPropertySet > m_xAspectRatio3D
Definition: VDiagram.hxx:100
sal_Int32 m_nDimensionCount
Definition: VDiagram.hxx:96
css::drawing::Direction3D m_aPreferredAspectRatio
Definition: VDiagram.hxx:99
void adjustAspectRatio3d(const css::awt::Size &rAvailableSize)
Definition: VDiagram.cxx:261
css::awt::Size m_aAvailableSizeIncludingAxes
Definition: VDiagram.hxx:107
css::awt::Point m_aAvailablePosIncludingAxes
Definition: VDiagram.hxx:106
void createShapes(const css::awt::Point &rPos, const css::awt::Size &rSize)
Definition: VDiagram.cxx:80
rtl::Reference< SvxShapeGroupAnyD > m_xCoordinateRegionShape
Definition: VDiagram.hxx:93
void init(const rtl::Reference< SvxShapeGroupAnyD > &xTarget)
Definition: VDiagram.cxx:75
bool m_bRightAngledAxes
Definition: VDiagram.hxx:112
::basegfx::B2IRectangle adjustPosAndSize(const css::awt::Point &rPos, const css::awt::Size &rAvailableSize)
Definition: VDiagram.cxx:91
void createShapes_3d()
Definition: VDiagram.cxx:428
rtl::Reference< SvxShapeGroupAnyD > m_xTarget
Definition: VDiagram.hxx:88
double m_fZAnglePi
Definition: VDiagram.hxx:104
class SAL_NO_VTABLE XPropertySet