chart2/Library_chartcore.mk | 3 chart2/source/view/charttypes/3DBarChart.cxx | 77 ------------------ chart2/source/view/charttypes/GL3DBarChart.cxx | 94 ++++++++++------------- chart2/source/view/charttypes/GL3DBarChart.hxx | 30 ------- chart2/source/view/charttypes/VSeriesPlotter.cxx | 3 chart2/source/view/inc/3DBarChart.hxx | 48 ----------- chart2/source/view/inc/GL3DBarChart.hxx | 53 ++++++++++++ chart2/source/view/main/ChartView.cxx | 4 8 files changed, 100 insertions(+), 212 deletions(-)
New commits: commit b49e42f358bc37c77824028ffadc6f51b9d12172 Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Thu Apr 10 11:45:20 2014 -0400 Rename 3DBarChart and Bar3DChart to GL3DBarChart. Change-Id: If0449e00549d8e2f4a8cfac325a5f8c5e4ea3dcd diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk index 7851bd5..af3b6f3 100644 --- a/chart2/Library_chartcore.mk +++ b/chart2/Library_chartcore.mk @@ -86,7 +86,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\ chart2/source/view/axes/VPolarCoordinateSystem \ chart2/source/view/axes/VPolarGrid \ chart2/source/view/axes/VPolarRadiusAxis \ - chart2/source/view/charttypes/3DBarChart \ + chart2/source/view/charttypes/GL3DBarChart \ chart2/source/view/charttypes/AreaChart \ chart2/source/view/charttypes/BarChart \ chart2/source/view/charttypes/BarPositionHelper \ diff --git a/chart2/source/view/charttypes/3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx similarity index 90% rename from chart2/source/view/charttypes/3DBarChart.cxx rename to chart2/source/view/charttypes/GL3DBarChart.cxx index 68f612c..160f40e 100644 --- a/chart2/source/view/charttypes/3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -7,9 +7,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <GL/glew.h> +#include <GL3DBarChart.hxx> -#include "3DBarChart.hxx" +#include <GL/glew.h> #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> @@ -18,17 +18,17 @@ namespace chart { -Bar3DChart::Bar3DChart(const std::vector<VDataSeries*>& rDataSeries): +GL3DBarChart::GL3DBarChart(const std::vector<VDataSeries*>& rDataSeries): maDataSeries(rDataSeries), mxContext(new opengl3D::temporary::TemporaryContext()) { } -Bar3DChart::~Bar3DChart() +GL3DBarChart::~GL3DBarChart() { } -void Bar3DChart::create3DShapes() +void GL3DBarChart::create3DShapes() { const float nBarSizeX = 10; const float nBarSizeY = 10; @@ -61,7 +61,7 @@ void Bar3DChart::create3DShapes() } } -void Bar3DChart::render() +void GL3DBarChart::render() { mxContext->init(); for(boost::ptr_vector<opengl3D::Renderable3DObject>::iterator itr = maShapes.begin(), diff --git a/chart2/source/view/inc/3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx similarity index 83% rename from chart2/source/view/inc/3DBarChart.hxx rename to chart2/source/view/inc/GL3DBarChart.hxx index 2f10ce2..6191fc1 100644 --- a/chart2/source/view/inc/3DBarChart.hxx +++ b/chart2/source/view/inc/GL3DBarChart.hxx @@ -7,6 +7,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifndef CHART2_GL3DBARCHART_HXX +#define CHART2_GL3DBARCHART_HXX + #include <vector> #include <boost/ptr_container/ptr_vector.hpp> #include "VDataSeries.hxx" @@ -25,11 +28,11 @@ class TemporaryContext; } } -class Bar3DChart +class GL3DBarChart { public: - Bar3DChart(const std::vector<VDataSeries*>& rDataSeries); - ~Bar3DChart(); + GL3DBarChart(const std::vector<VDataSeries*>& rDataSeries); + ~GL3DBarChart(); void create3DShapes(); @@ -45,4 +48,6 @@ private: } +#endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index cd60243..da0e30a 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -48,7 +48,7 @@ #include "DateHelper.hxx" #include "defines.hxx" #include <unonames.hxx> -#include "3DBarChart.hxx" +#include <GL3DBarChart.hxx> #include <rtl/uuid.h> #include <comphelper/scopeguard.hxx> @@ -3149,7 +3149,7 @@ void ChartView::createShapes3D() } } - Bar3DChart aBarChart(aDataSeries); + GL3DBarChart aBarChart(aDataSeries); aBarChart.create3DShapes(); aBarChart.render(); } commit 085ab6263e470f81030c626b814698589ceaf8e8 Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Thu Apr 10 10:23:56 2014 -0400 Remove the old GL3DBarChart code. Change-Id: Id7039021f252fb45464b5e42248cf3c68edc7be4 diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk index dae64e9..7851bd5 100644 --- a/chart2/Library_chartcore.mk +++ b/chart2/Library_chartcore.mk @@ -93,7 +93,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\ chart2/source/view/charttypes/BubbleChart \ chart2/source/view/charttypes/CandleStickChart \ chart2/source/view/charttypes/CategoryPositionHelper \ - chart2/source/view/charttypes/GL3DBarChart \ chart2/source/view/charttypes/NetChart \ chart2/source/view/charttypes/PieChart \ chart2/source/view/charttypes/Splines \ diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx deleted file mode 100644 index 0249a65..0000000 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- 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/. - */ - -#include "GL3DBarChart.hxx" -#include <unonames.hxx> - -#include <com/sun/star/chart2/data/XDataSequence.hpp> -#include <com/sun/star/chart2/data/LabelOrigin.hpp> - -#include <stdio.h> - -using namespace com::sun::star; - -namespace chart { - -GL3DBarChart::GL3DBarChart( const css::uno::Reference<css::chart2::XChartType>& xChartTypeModel ) : - VSeriesPlotter(xChartTypeModel, 3, false) -{ -} - -GL3DBarChart::~GL3DBarChart() -{ -} - -void GL3DBarChart::createShapes() -{ - fprintf(stdout, "GL3DBarChart::createShapes: type = '%s'\n", - rtl::OUStringToOString(m_xChartTypeModel->getChartType(), RTL_TEXTENCODING_UTF8).getStr()); - - uno::Reference<beans::XPropertySet> xPropSet(m_xChartTypeModel, uno::UNO_QUERY); - if (xPropSet.is()) - { - bool bRoundedEdge = false; - if (xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= bRoundedEdge) - fprintf(stdout, "GL3DBarChart::createShapes: rounded edge = %d (%p)\n", bRoundedEdge, m_xChartTypeModel.get()); - } - -#if 0 - if (m_pExplicitCategoriesProvider) - { - uno::Reference<chart2::data::XDataSequence> xCats = m_pExplicitCategoriesProvider->getOriginalCategories(); - - OUString aSrcRange = xCats->getSourceRangeRepresentation(); - - fprintf(stdout, "GL3DBarChart::createShapes: source range = '%s'\n", rtl::OUStringToOString(aSrcRange, RTL_TEXTENCODING_UTF8).getStr()); - - uno::Sequence<OUString> aCats = m_pExplicitCategoriesProvider->getSimpleCategories(); - for (sal_Int32 i = 0; i < aCats.getLength(); ++i) - fprintf(stdout, "GL3DBarChart::createShapes: category = '%s'\n", rtl::OUStringToOString(aCats[i], RTL_TEXTENCODING_UTF8).getStr()); - } - - uno::Sequence<OUString> aSeriesNames = getSeriesNames(); - fprintf(stdout, "GL3DBarChart::createShapes: series name count = %d\n", aSeriesNames.getLength()); - for (sal_Int32 i = 0; i < aSeriesNames.getLength(); ++i) - fprintf(stdout, "GL3DBarChart::createShapes: name = '%s'\n", rtl::OUStringToOString(aSeriesNames[i], RTL_TEXTENCODING_UTF8).getStr()); - - std::vector<VDataSeries*> aAllSeries = getAllSeries(); - fprintf(stdout, "GL3DBarChart::createShapes: series count = %d\n", aAllSeries.size()); - for (size_t i = 0, n = aAllSeries.size(); i < n; ++i) - { - const VDataSeries* pSeries = aAllSeries[i]; - fprintf(stdout, "GL3DBarChart::createShapes: series %d: cid = '%s' particle = '%s'\n", - i, - rtl::OUStringToOString(pSeries->getCID(), RTL_TEXTENCODING_UTF8).getStr(), - rtl::OUStringToOString(pSeries->getSeriesParticle(), RTL_TEXTENCODING_UTF8).getStr()); - - uno::Sequence<double> aXValues = pSeries->getAllX(); - uno::Sequence<double> aYValues = pSeries->getAllY(); - for (size_t j = 0; j < aXValues.getLength(); ++j) - fprintf(stdout, "GL3DBarChart::createShapes: (x=%g,y=%g)\n", aXValues[j], aYValues[j]); - } -#endif -} - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/view/charttypes/GL3DBarChart.hxx b/chart2/source/view/charttypes/GL3DBarChart.hxx deleted file mode 100644 index 87128a8..0000000 --- a/chart2/source/view/charttypes/GL3DBarChart.hxx +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- 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/. - */ - -#ifndef CHART2_GL3DBARCHART_HXX -#define CHART2_GL3DBARCHART_HXX - -#include <VSeriesPlotter.hxx> - -namespace chart { - -class GL3DBarChart : public VSeriesPlotter -{ -public: - GL3DBarChart( const css::uno::Reference<css::chart2::XChartType>& xChartTypeModel ); - virtual ~GL3DBarChart(); - - virtual void createShapes() SAL_OVERRIDE; -}; - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 1027192..7433eb8 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -51,7 +51,6 @@ #include "CandleStickChart.hxx" #include "BubbleChart.hxx" #include "NetChart.hxx" -#include "GL3DBarChart.hxx" #include <com/sun/star/chart/ErrorBarStyle.hpp> #include <com/sun/star/chart/TimeUnit.hpp> @@ -2443,8 +2442,6 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter( pRet = new AreaChart(xChartTypeModel,nDimensionCount,false,true); else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE) ) pRet = new BubbleChart(xChartTypeModel,nDimensionCount); - else if (aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR)) - pRet = new GL3DBarChart(xChartTypeModel); else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE) ) pRet = new PieChart(xChartTypeModel,nDimensionCount, bExcludingPositioning ); else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_NET) ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits