diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-07-16 22:58:53 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-07-17 02:59:19 +0200 |
commit | 026e2623f7f498432e6dc970fb06145dfc77dc45 (patch) | |
tree | 22229b7aab2fff3c4f4f12f856e55494dc7fb565 /chart2/source/controller | |
parent | 13660d4b311501d80b3e1a9541fb7db80cc42f87 (diff) |
remove the GL based 3D charts
Change-Id: Ia578c71ae70aa0a85b49fa50138edf90f961b1e9
Reviewed-on: https://gerrit.libreoffice.org/57533
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2/source/controller')
13 files changed, 3 insertions, 417 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index 5a80655bae99..7b91382525ab 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -91,7 +91,6 @@ enum eServiceType SERVICE_NAME_STOCK_DIAGRAM, SERVICE_NAME_XY_DIAGRAM, SERVICE_NAME_BUBBLE_DIAGRAM, - SERVICE_NAME_GL3DBAR_DIAGRAM, SERVICE_NAME_DASH_TABLE, SERVICE_NAME_GARDIENT_TABLE, @@ -120,7 +119,6 @@ tServiceNameMap & lcl_getStaticServiceNameMap() {"com.sun.star.chart.StockDiagram", SERVICE_NAME_STOCK_DIAGRAM}, {"com.sun.star.chart.XYDiagram", SERVICE_NAME_XY_DIAGRAM}, {"com.sun.star.chart.BubbleDiagram", SERVICE_NAME_BUBBLE_DIAGRAM}, - {"com.sun.star.chart.GL3DBarDiagram", SERVICE_NAME_GL3DBAR_DIAGRAM}, {"com.sun.star.drawing.DashTable", SERVICE_NAME_DASH_TABLE}, {"com.sun.star.drawing.GradientTable", SERVICE_NAME_GARDIENT_TABLE}, @@ -1167,15 +1165,6 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( bCreateDiagram = true; } break; - case SERVICE_NAME_GL3DBAR_DIAGRAM: - if( xManagerFact.is()) - { - xTemplate.set( - xManagerFact->createInstance("com.sun.star.chart2.template.GL3DBar"), - uno::UNO_QUERY ); - bCreateDiagram = true; - } - break; case SERVICE_NAME_DASH_TABLE: case SERVICE_NAME_GARDIENT_TABLE: diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 1d72050806ab..1a4dbfc8cb5f 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -38,7 +38,6 @@ #include "WrappedSplineProperties.hxx" #include "WrappedStockProperties.hxx" #include "WrappedSceneProperty.hxx" -#include "WrappedGL3DProperties.hxx" #include <RelativePositionHelper.hxx> #include <ControllerLockGuard.hxx> #include <ModifyListenerHelper.hxx> @@ -426,7 +425,6 @@ private: WrappedSplineProperties::addProperties( aProperties ); WrappedStockProperties::addProperties( aProperties ); WrappedAutomaticPositionProperties::addProperties( aProperties ); - WrappedGL3DProperties::addProperties(aProperties); std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); @@ -480,9 +478,6 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) { const OUString aName( rTemplateServiceName.copy( aPrefix.getLength())); - if (aName.indexOf("GL3DBar") != -1) - return OUString("com.sun.star.chart.GL3DBarDiagram"); - // "Area" "StackedArea" "PercentStackedArea" "ThreeDArea" // "StackedThreeDArea" "PercentStackedThreeDArea" if( aName.indexOf( "Area" ) != -1 ) @@ -556,8 +551,8 @@ const tMakeStringStringMap& lcl_getChartTypeNameMap() {"com.sun.star.chart2.FilledNetChartType", "com.sun.star.chart.FilledNetDiagram"}, {"com.sun.star.chart2.NetChartType", "com.sun.star.chart.NetDiagram"}, {"com.sun.star.chart2.CandleStickChartType", "com.sun.star.chart.StockDiagram"}, - {"com.sun.star.chart2.BubbleChartType", "com.sun.star.chart.BubbleDiagram"}, - {"com.sun.star.chart2.GL3DBarChartType", "com.sun.star.chart.GL3DBarDiagram"}}; + {"com.sun.star.chart2.BubbleChartType", "com.sun.star.chart.BubbleDiagram"} + }; return g_aChartTypeNameMap; } @@ -1859,7 +1854,6 @@ const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties() WrappedSplineProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact ); WrappedStockProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact ); WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties ); - WrappedGL3DProperties::addWrappedProperties(aWrappedProperties, m_spChart2ModelContact); aWrappedProperties.push_back( new WrappedDataRowSourceProperty( m_spChart2ModelContact ) ); aWrappedProperties.push_back( new WrappedStackingProperty( StackMode::YStacked,m_spChart2ModelContact ) ); diff --git a/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx deleted file mode 100644 index eab0ec631580..000000000000 --- a/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx +++ /dev/null @@ -1,136 +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 "WrappedGL3DProperties.hxx" -#include "Chart2ModelContact.hxx" -#include <FastPropertyIdRanges.hxx> -#include <unonames.hxx> -#include <WrappedProperty.hxx> -#include <DiagramHelper.hxx> - -#include <com/sun/star/beans/PropertyAttribute.hpp> -#include <com/sun/star/chart2/XDiagram.hpp> - -using namespace com::sun::star; - -namespace chart { namespace wrapper { - -namespace { - -enum -{ - PROP_GL3DCHARTTYPE_ROUNDED_EDGE = FAST_PROPERTY_ID_START_GL_3D -}; - -class WrappedGL3DProperty : public WrappedProperty -{ - uno::Any maDefault; - std::shared_ptr<Chart2ModelContact> mpModelContact; - -private: - uno::Reference<chart2::XChartType> getChartType() const - { - uno::Reference<chart2::XDiagram> xDiagram = mpModelContact->getChart2Diagram(); - uno::Sequence<uno::Reference<chart2::XChartType> > aCTs = - DiagramHelper::getChartTypesFromDiagram(xDiagram); - - for (sal_Int32 i = 0; i < aCTs.getLength(); ++i) - { - uno::Reference<chart2::XChartType> xThisCT = aCTs[i]; - if (xThisCT->getChartType() == "com.sun.star.chart2.GL3DBarChartType") - // Found the right chart type. - return xThisCT; - } - - return uno::Reference<chart2::XChartType>(); - } - -public: - WrappedGL3DProperty( const OUString& rInName, const OUString& rOutName, const uno::Any& rDefault, const std::shared_ptr<Chart2ModelContact>& pContact ) : - WrappedProperty(rInName, rOutName), maDefault(rDefault), mpModelContact(pContact) {} - - virtual uno::Any getPropertyValue( const uno::Reference<beans::XPropertySet>& /*xInnerPS*/ ) const override - { - uno::Reference<chart2::XChartType> xCT = getChartType(); - if (!xCT.is()) - return uno::Any(); - - try - { - uno::Reference<beans::XPropertySet> xPS(xCT, uno::UNO_QUERY_THROW); - return xPS->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE); - } - catch ( const uno::Exception& ) {} - - return uno::Any(); - }; - - virtual void setPropertyValue( - const uno::Any& rOutValue, const uno::Reference<beans::XPropertySet>& /*xInnerPS*/ ) const override - { - uno::Reference<chart2::XChartType> xCT = getChartType(); - if (!xCT.is()) - return; - - try - { - uno::Reference<beans::XPropertySet> xPS(xCT, uno::UNO_QUERY_THROW); - return xPS->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, rOutValue); - } - catch ( const uno::Exception& ) {} - } - - virtual void setPropertyToDefault( const uno::Reference<beans::XPropertyState>& /*xInnerPropState*/ ) const override - { - uno::Reference<chart2::XChartType> xCT = getChartType(); - if (!xCT.is()) - return; - - try - { - uno::Reference<beans::XPropertySet> xPS(xCT, uno::UNO_QUERY_THROW); - return xPS->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, maDefault); - } - catch ( const uno::Exception& ) {} - } - - virtual uno::Any getPropertyDefault( const uno::Reference<beans::XPropertyState>& /*xInnerPS*/ ) const override - { - return maDefault; - } - - virtual beans::PropertyState getPropertyState( const uno::Reference<beans::XPropertyState>& /*xInnerPS*/ ) const override - { - return beans::PropertyState_DIRECT_VALUE; - } -}; - -} - -void WrappedGL3DProperties::addProperties( std::vector<css::beans::Property> & rOutProps ) -{ - rOutProps.emplace_back( - CHART_UNONAME_ROUNDED_EDGE, - PROP_GL3DCHARTTYPE_ROUNDED_EDGE, - cppu::UnoType<bool>::get(), - beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT - ); -} - -void WrappedGL3DProperties::addWrappedProperties( - std::vector<WrappedProperty*>& rList, const std::shared_ptr<Chart2ModelContact>& pChart2ModelContact ) -{ - rList.push_back( - new WrappedGL3DProperty( - CHART_UNONAME_ROUNDED_EDGE, CHART_UNONAME_ROUNDED_EDGE, uno::Any(false), pChart2ModelContact)); -} - -}} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.hxx deleted file mode 100644 index 39ced85e215c..000000000000 --- a/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.hxx +++ /dev/null @@ -1,38 +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_CONTROLLER_CHARTAPIWRAPPER_WRAPPEDGL3DPROPERTIES_HXX -#define INCLUDED_CHART2_SOURCE_CONTROLLER_CHARTAPIWRAPPER_WRAPPEDGL3DPROPERTIES_HXX - -#include <memory> -#include <vector> - -#include <com/sun/star/beans/Property.hpp> - -namespace chart { - -class WrappedProperty; - -namespace wrapper { - -class Chart2ModelContact; - -class WrappedGL3DProperties -{ -public: - static void addProperties( std::vector<css::beans::Property> & rOutProps ); - static void addWrappedProperties( - std::vector<WrappedProperty*>& rList, const std::shared_ptr<Chart2ModelContact>& pChart2ModelContact ); -}; - -}} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index c87b765b0a8e..2a158f8a7297 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -159,12 +159,6 @@ ChartTypeParameter ChartTypeDialogController::getChartTypeParameterForService( //not all templates need to support Geometry3D ex.Context.is();//to have debug information without compilation warnings } - - try - { - xTemplateProps->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aRet.mbRoundedEdge; - } - catch ( const uno::Exception& ) {} } return aRet; } @@ -302,14 +296,6 @@ uno::Reference< XChartTypeTemplate > ChartTypeDialogController::getCurrentTempla try { - xTemplateProps->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, uno::Any(rParameter.mbRoundedEdge)); - } - catch ( const uno::Exception& ) - { - } - - try - { setTemplateProperties( xTemplateProps ); } catch( const uno::Exception & ) @@ -380,11 +366,6 @@ bool ChartTypeDialogController::shouldShow_SortByXValuesResourceGroup() const return false; } -bool ChartTypeDialogController::shouldShow_GL3DResourceGroup() const -{ - return false; -} - void ChartTypeDialogController::showExtraControls( VclBuilderContainer* /*pParent*/ ) { } diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx index 1e3830e981f9..af880d115a53 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx @@ -101,7 +101,6 @@ public: virtual bool shouldShow_SplineControl() const; virtual bool shouldShow_GeometryControl() const; virtual bool shouldShow_SortByXValuesResourceGroup() const; - virtual bool shouldShow_GL3DResourceGroup() const; virtual void showExtraControls(VclBuilderContainer* pParent); virtual void hideExtraControls() const; diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx deleted file mode 100644 index a1f568ae083d..000000000000 --- a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx +++ /dev/null @@ -1,57 +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 "GL3DBarChartDialogController.hxx" -#include <strings.hrc> -#include <bitmaps.hlst> -#include <ResId.hxx> -#include <svtools/valueset.hxx> - -namespace chart { - -GL3DBarChartDialogController::GL3DBarChartDialogController() {} - -GL3DBarChartDialogController::~GL3DBarChartDialogController() {} - -bool GL3DBarChartDialogController::shouldShow_GL3DResourceGroup() const -{ - return true; -} - -OUString GL3DBarChartDialogController::getName() -{ - return SchResId(STR_TYPE_GL3D_BAR); -} - -Image GL3DBarChartDialogController::getImage() -{ - return Image(BitmapEx(BMP_TYPE_GL3D_BAR)); -} - -const tTemplateServiceChartTypeParameterMap& -GL3DBarChartDialogController::getTemplateMap() const -{ - static tTemplateServiceChartTypeParameterMap aMap{ - {"com.sun.star.chart2.template.GL3DBar", ChartTypeParameter(1)}, - {"com.sun.star.chart2.template.GL3DBarRoundedRectangle", ChartTypeParameter(2)}}; - return aMap; -} - -void GL3DBarChartDialogController::fillSubTypeList( - ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) -{ - rSubTypeList.Clear(); - rSubTypeList.InsertItem(1, Image(BitmapEx(BMP_GL3D_BAR_ROUNDRECT))); - - rSubTypeList.SetItemText(1, SchResId(STR_GL3D_BAR)); -} - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx deleted file mode 100644 index 2d5d0a66b15b..000000000000 --- a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx +++ /dev/null @@ -1,36 +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_CONTROLLER_DIALOGS_GL3DBARCHARTDIALOGCONTROLLER_HXX -#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_GL3DBARCHARTDIALOGCONTROLLER_HXX - -#include "ChartTypeDialogController.hxx" - -namespace chart { - -class GL3DBarChartDialogController : public ChartTypeDialogController -{ -public: - GL3DBarChartDialogController(); - virtual ~GL3DBarChartDialogController() override; - - virtual bool shouldShow_GL3DResourceGroup() const override; - - virtual OUString getName() override; - virtual Image getImage() override; - virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - - virtual void fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override; -}; - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 79a66e74034d..13e81edf86ed 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -24,7 +24,6 @@ #include <DiagramHelper.hxx> #include "res_BarGeometry.hxx" #include <ControllerLockGuard.hxx> -#include "GL3DBarChartDialogController.hxx" #include <unonames.hxx> #include <svtools/controldims.hxx> @@ -261,48 +260,6 @@ IMPL_LINK_NOARG(StackingResourceGroup, StackingEnableHdl, CheckBox&, void) m_pChangeListener->stateChanged(this); } -class GL3DResourceGroup : public ChangingResource -{ -public: - explicit GL3DResourceGroup( VclBuilderContainer* pWindow ); - - void showControls( bool bShow ); - void fillControls( const ChartTypeParameter& rParam ); - void fillParameter( ChartTypeParameter& rParam ); - -private: - DECL_LINK( SettingChangedHdl, CheckBox&, void ); -private: - VclPtr<CheckBox> m_pCB_RoundedEdge; -}; - -GL3DResourceGroup::GL3DResourceGroup( VclBuilderContainer* pWindow ) -{ - pWindow->get(m_pCB_RoundedEdge, "rounded-edge"); - m_pCB_RoundedEdge->SetToggleHdl( LINK(this, GL3DResourceGroup, SettingChangedHdl) ); -} - -void GL3DResourceGroup::showControls( bool bShow ) -{ - m_pCB_RoundedEdge->Show(bShow); -} - -void GL3DResourceGroup::fillControls( const ChartTypeParameter& rParam ) -{ - m_pCB_RoundedEdge->Check(rParam.mbRoundedEdge); -} - -void GL3DResourceGroup::fillParameter( ChartTypeParameter& rParam ) -{ - rParam.mbRoundedEdge = m_pCB_RoundedEdge->IsChecked(); -} - -IMPL_LINK_NOARG( GL3DResourceGroup, SettingChangedHdl, CheckBox&, void ) -{ - if (m_pChangeListener) - m_pChangeListener->stateChanged(this); -} - class SplinePropertiesDialog : public weld::GenericDialogController { public: @@ -662,7 +619,6 @@ ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent , m_pSplineResourceGroup( new SplineResourceGroup(this) ) , m_pGeometryResourceGroup( new GeometryResourceGroup( this ) ) , m_pSortByXValuesResourceGroup( new SortByXValuesResourceGroup( this ) ) - , m_pGL3DResourceGroup(new GL3DResourceGroup(this)) , m_xChartModel( xChartModel ) , m_aChartTypeDialogControllerList(0) , m_pCurrentMainType(nullptr) @@ -728,8 +684,6 @@ ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent m_aChartTypeDialogControllerList.emplace_back(new CombiColumnLineChartDialogController() ); SvtMiscOptions aOpts; - if ( aOpts.IsExperimentalMode() ) - m_aChartTypeDialogControllerList.emplace_back(new GL3DBarChartDialogController()); for (auto const& elem : m_aChartTypeDialogControllerList) { @@ -742,7 +696,6 @@ ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent m_pSplineResourceGroup->setChangeListener( this ); m_pGeometryResourceGroup->setChangeListener( this ); m_pSortByXValuesResourceGroup->setChangeListener( this ); - m_pGL3DResourceGroup->setChangeListener(this); } ChartTypeTabPage::~ChartTypeTabPage() @@ -761,7 +714,6 @@ void ChartTypeTabPage::dispose() m_pSplineResourceGroup.reset(); m_pGeometryResourceGroup.reset(); m_pSortByXValuesResourceGroup.reset(); - m_pGL3DResourceGroup.reset(); m_pFT_ChooseType.clear(); m_pMainTypeList.clear(); m_pSubTypeList.clear(); @@ -777,7 +729,6 @@ ChartTypeParameter ChartTypeTabPage::getCurrentParamter() const m_pSplineResourceGroup->fillParameter( aParameter ); m_pGeometryResourceGroup->fillParameter( aParameter ); m_pSortByXValuesResourceGroup->fillParameter( aParameter ); - m_pGL3DResourceGroup->fillParameter(aParameter); return aParameter; } @@ -902,8 +853,6 @@ void ChartTypeTabPage::showAllControls( ChartTypeDialogController& rTypeControll m_pGeometryResourceGroup->showControls( bShow ); bShow = rTypeController.shouldShow_SortByXValuesResourceGroup(); m_pSortByXValuesResourceGroup->showControls( bShow ); - bShow = rTypeController.shouldShow_GL3DResourceGroup(); - m_pGL3DResourceGroup->showControls(bShow); rTypeController.showExtraControls(this); } @@ -920,7 +869,6 @@ void ChartTypeTabPage::fillAllControls( const ChartTypeParameter& rParameter, bo m_pSplineResourceGroup->fillControls( rParameter ); m_pGeometryResourceGroup->fillControls( rParameter ); m_pSortByXValuesResourceGroup->fillControls( rParameter ); - m_pGL3DResourceGroup->fillControls(rParameter); m_nChangingCalls--; } @@ -981,7 +929,6 @@ void ChartTypeTabPage::initializePage() m_pSplineResourceGroup->showControls( false ); m_pGeometryResourceGroup->showControls( false ); m_pSortByXValuesResourceGroup->showControls( false ); - m_pGL3DResourceGroup->showControls(false); } } diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx index 2be2646761c0..8da17cb9781e 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.hxx +++ b/chart2/source/controller/dialogs/tp_ChartType.hxx @@ -43,7 +43,6 @@ class SplineResourceGroup; class GeometryResourceGroup; class ChartTypeParameter; class SortByXValuesResourceGroup; -class GL3DResourceGroup; class ChartTypeTabPage final : public ResourceChangeListener, public svt::OWizardPage, public ChartTypeTemplateProvider { @@ -82,7 +81,6 @@ private: std::unique_ptr<SplineResourceGroup> m_pSplineResourceGroup; std::unique_ptr<GeometryResourceGroup> m_pGeometryResourceGroup; std::unique_ptr<SortByXValuesResourceGroup> m_pSortByXValuesResourceGroup; - std::unique_ptr<GL3DResourceGroup> m_pGL3DResourceGroup; css::uno::Reference< css::chart2::XChartDocument > m_xChartModel; diff --git a/chart2/source/controller/inc/ChartWindow.hxx b/chart2/source/controller/inc/ChartWindow.hxx index e4020c64e114..dc754a3651c9 100644 --- a/chart2/source/controller/inc/ChartWindow.hxx +++ b/chart2/source/controller/inc/ChartWindow.hxx @@ -82,7 +82,6 @@ private: ChartController* m_pWindowController; bool m_bInPaint; VclPtr<vcl::Window> m_pViewShellWindow; - VclPtr<vcl::Window> m_pOpenGLWindow; void adjustHighContrastMode(); }; diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index c42390ad9b53..b0c27a4e6a43 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -796,10 +796,6 @@ void SAL_CALL ChartController::dispose() //--release all resources and references { - uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider(getModel(), uno::UNO_QUERY); - if(x3DWindowProvider.is()) - x3DWindowProvider->setWindow(0); - uno::Reference< util::XModeChangeBroadcaster > xViewBroadcaster( m_xChartView, uno::UNO_QUERY ); if( xViewBroadcaster.is() ) xViewBroadcaster->removeModeChangeListener(this); diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index a0f7c31de47d..0453a6ed48d3 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -23,10 +23,8 @@ #include <uiobject.hxx> #include <vcl/help.hxx> -#include <vcl/openglwin.hxx> #include <vcl/settings.hxx> #include <config_features.h> -#include <com/sun/star/chart2/X3DChartWindowProvider.hpp> #include <sfx2/ipclient.hxx> #include <sfx2/viewsh.hxx> @@ -58,11 +56,6 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi , m_pWindowController( pController ) , m_bInPaint(false) , m_pViewShellWindow( nullptr ) -#if HAVE_FEATURE_OPENGL - , m_pOpenGLWindow(VclPtr<OpenGLWindow>::Create(this, false)) -#else - , m_pOpenGLWindow(nullptr) -#endif { set_id("chart_window"); SetHelpId( HID_SCH_WIN_DOCUMENT ); @@ -73,17 +66,6 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi EnableRTL( false ); if( pParent ) pParent->EnableRTL( false );// #i96215# necessary for a correct position of the context menu in rtl mode - - if( m_pOpenGLWindow ) - { - m_pOpenGLWindow->Show(); - uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider(pController->getModel(), uno::UNO_QUERY_THROW); - sal_uInt64 nWindowPtr = reinterpret_cast<sal_uInt64>(m_pOpenGLWindow.get()); - x3DWindowProvider->setWindow(nWindowPtr); - uno::Reference<util::XUpdatable> const xUpdatable(x3DWindowProvider, - uno::UNO_QUERY_THROW); - xUpdatable->update(); - } } ChartWindow::~ChartWindow() @@ -93,15 +75,6 @@ ChartWindow::~ChartWindow() void ChartWindow::dispose() { - if (m_pWindowController && m_pWindowController->getModel().is()) - { - uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider(m_pWindowController->getModel(), uno::UNO_QUERY_THROW); - x3DWindowProvider->setWindow(0); - uno::Reference<util::XUpdatable> const xUpdatable(x3DWindowProvider, - uno::UNO_QUERY_THROW); - xUpdatable->update(); - } - m_pOpenGLWindow.disposeAndClear(); m_pViewShellWindow.clear(); vcl::Window::dispose(); } @@ -122,11 +95,7 @@ void ChartWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang return; m_bInPaint = true; - if (m_pOpenGLWindow && m_pOpenGLWindow->IsVisible()) - { - m_pOpenGLWindow->Paint(rRenderContext, rRect); - } - else if (m_pWindowController) + if (m_pWindowController) { m_pWindowController->execute_Paint(rRenderContext, rRect); } @@ -173,9 +142,6 @@ void ChartWindow::Resize() m_pWindowController->execute_Resize(); else Window::Resize(); - - if( m_pOpenGLWindow ) - m_pOpenGLWindow->SetSizePixel(GetSizePixel()); } void ChartWindow::Activate() @@ -293,40 +259,24 @@ void ChartWindow::adjustHighContrastMode() void ChartWindow::ForceInvalidate() { vcl::Window::Invalidate(); - if(m_pOpenGLWindow) - { - m_pOpenGLWindow->Invalidate(); - } } void ChartWindow::Invalidate( InvalidateFlags nFlags ) { if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts" return; vcl::Window::Invalidate( nFlags ); - if(m_pOpenGLWindow) - { - m_pOpenGLWindow->Invalidate( nFlags ); - } } void ChartWindow::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags ) { if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts" return; vcl::Window::Invalidate( rRect, nFlags ); - if(m_pOpenGLWindow) - { - m_pOpenGLWindow->Invalidate( rRect, nFlags ); - } } void ChartWindow::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags ) { if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts" return; vcl::Window::Invalidate( rRegion, nFlags ); - if(m_pOpenGLWindow) - { - m_pOpenGLWindow->Invalidate( rRegion, nFlags ); - } } void ChartWindow::LogicInvalidate(const tools::Rectangle* pRectangle) |