Line data Source code
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 :
20 : #include "VPolarAxis.hxx"
21 : #include "VPolarAngleAxis.hxx"
22 : #include "VPolarRadiusAxis.hxx"
23 : #include "macros.hxx"
24 : #include "Tickmarks.hxx"
25 : #include "ShapeFactory.hxx"
26 :
27 : #include <boost/scoped_ptr.hpp>
28 :
29 : //.............................................................................
30 : namespace chart
31 : {
32 : //.............................................................................
33 : using namespace ::com::sun::star;
34 : using namespace ::com::sun::star::chart2;
35 :
36 0 : VPolarAxis* VPolarAxis::createAxis( const AxisProperties& rAxisProperties
37 : , const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
38 : , sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount )
39 : {
40 0 : if( 0==nDimensionIndex )
41 0 : return new VPolarAngleAxis( rAxisProperties, xNumberFormatsSupplier, nDimensionCount );
42 0 : return new VPolarRadiusAxis( rAxisProperties, xNumberFormatsSupplier, nDimensionCount );
43 : }
44 :
45 0 : VPolarAxis::VPolarAxis( const AxisProperties& rAxisProperties
46 : , const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
47 : , sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount )
48 : : VAxisBase( nDimensionIndex, nDimensionCount, rAxisProperties, xNumberFormatsSupplier )
49 0 : , m_pPosHelper( new PolarPlottingPositionHelper() )
50 0 : , m_aIncrements()
51 : {
52 0 : PlotterBase::m_pPosHelper = m_pPosHelper;
53 0 : }
54 :
55 0 : VPolarAxis::~VPolarAxis()
56 : {
57 0 : delete m_pPosHelper;
58 0 : m_pPosHelper = NULL;
59 0 : }
60 :
61 0 : void VPolarAxis::setIncrements( const std::vector< ExplicitIncrementData >& rIncrements )
62 : {
63 0 : m_aIncrements = rIncrements;
64 0 : }
65 :
66 0 : sal_Bool VPolarAxis::isAnythingToDraw()
67 : {
68 0 : return ( 2==m_nDimension && VAxisBase::isAnythingToDraw() );
69 : }
70 :
71 : //.............................................................................
72 : } //namespace chart
73 : //.............................................................................
74 :
75 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|