diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-09-12 12:54:11 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-09-12 13:03:52 +0200 |
commit | aa325833295e3983d93758b0e1194d7fb9365ee7 (patch) | |
tree | 03a8d73b46512209abb78aeca541cd1315c2fac8 /chart2 | |
parent | d41747cb4232e1feec8f41874cb53c4dacce51d9 (diff) |
3D charts: Update the 3D charts when a value changes.
Change-Id: I9c4052108446959ff6f5215d704b496e7a8e6aee
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/Library_chartcore.mk | 1 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 1 | ||||
-rw-r--r-- | chart2/source/inc/GL3DHelper.hxx | 29 | ||||
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 4 | ||||
-rw-r--r-- | chart2/source/tools/GL3DHelper.cxx | 54 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 4 |
6 files changed, 4 insertions, 89 deletions
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk index 094762d33d4a..2543eaa557ab 100644 --- a/chart2/Library_chartcore.mk +++ b/chart2/Library_chartcore.mk @@ -199,7 +199,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\ chart2/source/tools/ExponentialRegressionCurveCalculator \ chart2/source/tools/FillProperties \ chart2/source/tools/FormattedStringHelper \ - chart2/source/tools/GL3DHelper \ chart2/source/tools/ImplOPropertySet \ chart2/source/tools/InternalData \ chart2/source/tools/InternalDataProvider \ diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index d5eca79114b9..f1679922a07e 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -43,7 +43,6 @@ #include "DrawCommandDispatch.hxx" #include "ShapeController.hxx" #include "UndoActions.hxx" -#include <GL3DHelper.hxx> #include <comphelper/InlineContainer.hxx> diff --git a/chart2/source/inc/GL3DHelper.hxx b/chart2/source/inc/GL3DHelper.hxx deleted file mode 100644 index 637710515cc9..000000000000 --- a/chart2/source/inc/GL3DHelper.hxx +++ /dev/null @@ -1,29 +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 INCLUDED_CHART2_SOURCE_INC_GL3DHELPER_HXX -#define INCLUDED_CHART2_SOURCE_INC_GL3DHELPER_HXX - -#include <charttoolsdllapi.hxx> - -#include <com/sun/star/chart2/XDiagram.hpp> - -namespace chart { - -class OOO_DLLPUBLIC_CHARTTOOLS GL3DHelper -{ -public: - static bool isGL3DDiagram( const css::uno::Reference<css::chart2::XDiagram>& xDiagram ); -}; - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index a3d97c243482..9e65853e313e 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -32,7 +32,7 @@ #include "NameContainer.hxx" #include "UndoManager.hxx" #include "ChartView.hxx" -#include "GL3DHelper.hxx" +#include <svx/charthelper.hxx> #include <vcl/openglwin.hxx> @@ -968,7 +968,7 @@ void SAL_CALL ChartModel::createDefaultChart() sal_Bool SAL_CALL ChartModel::isOpenGLChart() throw (css::uno::RuntimeException, std::exception) { - return GL3DHelper::isGL3DDiagram(m_xDiagram); + return ChartHelper::isGL3DDiagram(m_xDiagram); } // ____ XTitled ____ diff --git a/chart2/source/tools/GL3DHelper.cxx b/chart2/source/tools/GL3DHelper.cxx deleted file mode 100644 index 03a23062d354..000000000000 --- a/chart2/source/tools/GL3DHelper.cxx +++ /dev/null @@ -1,54 +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 <GL3DHelper.hxx> - -#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> -#include <com/sun/star/chart2/XCoordinateSystem.hpp> -#include <com/sun/star/chart2/XChartTypeContainer.hpp> -#include <com/sun/star/chart2/XChartType.hpp> - -using namespace com::sun::star; - -namespace chart { - -bool GL3DHelper::isGL3DDiagram( const css::uno::Reference<css::chart2::XDiagram>& xDiagram ) -{ - uno::Reference<chart2::XCoordinateSystemContainer> xCooSysContainer(xDiagram, uno::UNO_QUERY); - - if (!xCooSysContainer.is()) - return false; - - uno::Sequence< uno::Reference<chart2::XCoordinateSystem> > aCooSysList = xCooSysContainer->getCoordinateSystems(); - for (sal_Int32 nCS = 0; nCS < aCooSysList.getLength(); ++nCS) - { - uno::Reference<chart2::XCoordinateSystem> xCooSys = aCooSysList[nCS]; - - //iterate through all chart types in the current coordinate system - uno::Reference<chart2::XChartTypeContainer> xChartTypeContainer(xCooSys, uno::UNO_QUERY); - OSL_ASSERT( xChartTypeContainer.is()); - if( !xChartTypeContainer.is() ) - continue; - - uno::Sequence< uno::Reference<chart2::XChartType> > aChartTypeList = xChartTypeContainer->getChartTypes(); - for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT ) - { - uno::Reference<chart2::XChartType> xChartType = aChartTypeList[nT]; - OUString aChartType = xChartType->getChartType(); - if( aChartType == "com.sun.star.chart2.GL3DBarChartType" ) - return true; - } - } - - return false; -} - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index d2dfbf535af9..61ba728da93e 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -51,7 +51,6 @@ #include "defines.hxx" #include <unonames.hxx> #include <GL3DBarChart.hxx> -#include <GL3DHelper.hxx> #include <editeng/frmdiritem.hxx> #include <rtl/uuid.h> @@ -60,6 +59,7 @@ #include <boost/bind.hpp> #include <unotools/streamwrap.hxx> #include <unotools/localedatawrapper.hxx> +#include <svx/charthelper.hxx> #include <svx/svdpage.hxx> #include <svx/unopage.hxx> #include <svx/unoshape.hxx> @@ -2444,7 +2444,7 @@ bool ChartView::isReal3DChart() { uno::Reference< XDiagram > xDiagram( mrChartModel.getFirstDiagram() ); - return GL3DHelper::isGL3DDiagram(xDiagram); + return ChartHelper::isGL3DDiagram(xDiagram); } static const char* envChartDummyFactory = getenv("CHART_DUMMY_FACTORY"); |