diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-12-07 16:05:05 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-12-08 00:04:38 -0500 |
commit | 4b9740b4ec3987e1d4d2ad6d20b4dcf996a4fa2e (patch) | |
tree | 0f554d0e5dc23ce4316d7979bc22e2ffe0478705 /chart2 | |
parent | 8450a99c744e9005f19173e4df35d65640bcf5c4 (diff) |
Remove duplicate defines and put it into a common place.
Change-Id: I55415985f37970e4d1ba8605e6d22c45198fe19f
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/DragMethod_RotateDiagram.cxx | 3 | ||||
-rw-r--r-- | chart2/source/inc/defines.hxx | 27 | ||||
-rw-r--r-- | chart2/source/tools/ThreeDHelper.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/axes/VCoordinateSystem.cxx | 1 | ||||
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 1 | ||||
-rw-r--r-- | chart2/source/view/diagram/VDiagram.cxx | 1 | ||||
-rw-r--r-- | chart2/source/view/inc/ViewDefines.hxx | 5 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 1 | ||||
-rw-r--r-- | chart2/source/view/main/PlottingPositionHelper.cxx | 1 |
9 files changed, 37 insertions, 7 deletions
diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx index 7bf75e6744ae..8489ab376cdd 100644 --- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx +++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx @@ -26,6 +26,7 @@ #include "DiagramHelper.hxx" #include "ChartTypeHelper.hxx" #include "ThreeDHelper.hxx" +#include "defines.hxx" #include <svx/sdr/overlay/overlaypolypolygon.hxx> #include <svx/sdr/overlay/overlaymanager.hxx> @@ -37,8 +38,6 @@ #include <svx/sdr/contact/viewcontactofe3dscene.hxx> #include <drawinglayer/geometry/viewinformation3d.hxx> -#define FIXED_SIZE_FOR_3D_CHART_VOLUME (10000.0) - //............................................................................. namespace chart { diff --git a/chart2/source/inc/defines.hxx b/chart2/source/inc/defines.hxx new file mode 100644 index 000000000000..14f6c25d2173 --- /dev/null +++ b/chart2/source/inc/defines.hxx @@ -0,0 +1,27 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __CHART2_DEFINES_HXX__ +#define __CHART2_DEFINES_HXX__ + +#define FIXED_SIZE_FOR_3D_CHART_VOLUME 10000.0 + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx index 20f5f696fc03..66199cc114bd 100644 --- a/chart2/source/tools/ThreeDHelper.cxx +++ b/chart2/source/tools/ThreeDHelper.cxx @@ -24,6 +24,8 @@ #include "ChartTypeHelper.hxx" #include "BaseGFXHelper.hxx" #include "DataSeriesHelper.hxx" +#include "defines.hxx" + #include <editeng/unoprnms.hxx> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/chart2/XDiagram.hpp> @@ -43,8 +45,6 @@ using ::rtl::math::cos; using ::rtl::math::sin; using ::rtl::math::tan; -#define FIXED_SIZE_FOR_3D_CHART_VOLUME (10000.0) - namespace { diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx index 4b627da5a2b9..6d8f1abc7808 100644 --- a/chart2/source/view/axes/VCoordinateSystem.cxx +++ b/chart2/source/view/axes/VCoordinateSystem.cxx @@ -33,6 +33,7 @@ #include "VAxisBase.hxx" #include "ViewDefines.hxx" #include "DataSeriesHelper.hxx" +#include "defines.hxx" #include "chartview/ExplicitValueProvider.hxx" #include <com/sun/star/chart2/AxisType.hpp> #include <com/sun/star/chart2/XChartTypeContainer.hpp> diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 9fbed71792f8..533638d78935 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -42,6 +42,7 @@ #include "RelativePositionHelper.hxx" #include "DateHelper.hxx" #include "DiagramHelper.hxx" +#include "defines.hxx" //only for creation: @todo remove if all plotter are uno components and instanciated via servicefactory #include "BarChart.hxx" diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index 051313292801..f3dd98ecdf32 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -28,6 +28,7 @@ #include "CommonConverters.hxx" #include "ChartTypeHelper.hxx" #include "ThreeDHelper.hxx" +#include "defines.hxx" #include <editeng/unoprnms.hxx> #include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/drawing/LineStyle.hpp> diff --git a/chart2/source/view/inc/ViewDefines.hxx b/chart2/source/view/inc/ViewDefines.hxx index e86058b61c74..5a38fcd6bce8 100644 --- a/chart2/source/view/inc/ViewDefines.hxx +++ b/chart2/source/view/inc/ViewDefines.hxx @@ -16,8 +16,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef _CHART_COMMONDEFINES_HXX -#define _CHART_COMMONDEFINES_HXX +#ifndef __CHART2_VIEWDEFINES_HXX__ +#define __CHART2_VIEWDEFINES_HXX__ namespace chart { @@ -26,7 +26,6 @@ namespace chart // //========================================================================= #define CHART_3DOBJECT_SEGMENTCOUNT ((sal_Int32)32) -#define FIXED_SIZE_FOR_3D_CHART_VOLUME (10000.0) //There needs to be a little distance betweengrid lines and walls in 3D, otherwise the lines are partly hidden by the walls #define GRID_TO_WALL_DISTANCE (1.0) diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index ab2ea1ca1d97..f2ace4a0c072 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -46,6 +46,7 @@ #include "BaseGFXHelper.hxx" #include "DataSeriesHelper.hxx" #include "DateHelper.hxx" +#include "defines.hxx" #include <rtl/uuid.h> #include <comphelper/scopeguard.hxx> diff --git a/chart2/source/view/main/PlottingPositionHelper.cxx b/chart2/source/view/main/PlottingPositionHelper.cxx index de9deda975b2..931a92880b13 100644 --- a/chart2/source/view/main/PlottingPositionHelper.cxx +++ b/chart2/source/view/main/PlottingPositionHelper.cxx @@ -25,6 +25,7 @@ #include "ShapeFactory.hxx" #include "PropertyMapper.hxx" #include "DateHelper.hxx" +#include "defines.hxx" #include <com/sun/star/chart/TimeUnit.hpp> #include <com/sun/star/chart2/AxisType.hpp> |