/* -*- 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 #include #include #include #include using namespace com::sun::star; namespace chart { bool GL3DHelper::isGL3DDiagram( const css::uno::Reference& xDiagram ) { uno::Reference xCooSysContainer(xDiagram, uno::UNO_QUERY); if (!xCooSysContainer.is()) return false; uno::Sequence< uno::Reference > aCooSysList = xCooSysContainer->getCoordinateSystems(); for (sal_Int32 nCS = 0; nCS < aCooSysList.getLength(); ++nCS) { uno::Reference xCooSys = aCooSysList[nCS]; //iterate through all chart types in the current coordinate system uno::Reference xChartTypeContainer(xCooSys, uno::UNO_QUERY); OSL_ASSERT( xChartTypeContainer.is()); if( !xChartTypeContainer.is() ) continue; uno::Sequence< uno::Reference > aChartTypeList = xChartTypeContainer->getChartTypes(); for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT ) { uno::Reference 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: */