1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _CHART2_CONTROLLER_CHARTMODELHELPER_HXX 28 #define _CHART2_CONTROLLER_CHARTMODELHELPER_HXX 29 30 #include <com/sun/star/chart2/XChartType.hpp> 31 #include <com/sun/star/chart2/XDataSeries.hpp> 32 #include <com/sun/star/chart2/XDiagram.hpp> 33 #include <com/sun/star/chart2/XChartDocument.hpp> 34 #include <com/sun/star/chart2/data/XDataProvider.hpp> 35 #include <com/sun/star/chart2/data/XRangeHighlighter.hpp> 36 #include <com/sun/star/view/XSelectionSupplier.hpp> 37 38 #include <com/sun/star/awt/Size.hpp> 39 #include <com/sun/star/frame/XModel.hpp> 40 #include "charttoolsdllapi.hxx" 41 42 #include <vector> 43 44 //............................................................................. 45 namespace chart 46 { 47 //............................................................................. 48 49 //----------------------------------------------------------------------------- 50 /** 51 */ 52 53 class OOO_DLLPUBLIC_CHARTTOOLS ChartModelHelper 54 { 55 public: 56 static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XRangeHighlighter > createRangeHighlighter( 57 const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier >& xSelectionSupplier ); 58 59 static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > createInternalDataProvider( 60 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc, bool bConnectToModel ); 61 62 static ::com::sun::star::uno::Reference< 63 ::com::sun::star::chart2::XDiagram > 64 findDiagram( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel ); 65 66 static ::com::sun::star::uno::Reference< 67 ::com::sun::star::chart2::XDiagram > 68 findDiagram( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc ); 69 70 static ::com::sun::star::uno::Reference< 71 ::com::sun::star::chart2::XCoordinateSystem > 72 getFirstCoordinateSystem( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel ); 73 74 SAL_DLLPRIVATE static ::std::vector< ::com::sun::star::uno::Reference< 75 ::com::sun::star::chart2::XDataSeries > > getDataSeries( 76 const ::com::sun::star::uno::Reference< 77 ::com::sun::star::chart2::XChartDocument > & xChartDoc ); 78 static ::std::vector< ::com::sun::star::uno::Reference< 79 ::com::sun::star::chart2::XDataSeries > > getDataSeries( 80 const ::com::sun::star::uno::Reference< 81 ::com::sun::star::frame::XModel > & xModel ); 82 83 static ::com::sun::star::uno::Reference< 84 ::com::sun::star::chart2::XChartType > 85 getChartTypeOfSeries( 86 const ::com::sun::star::uno::Reference< 87 ::com::sun::star::frame::XModel >& xModel 88 , const ::com::sun::star::uno::Reference< 89 ::com::sun::star::chart2::XDataSeries >& xGivenDataSeries ); 90 91 static ::com::sun::star::awt::Size getDefaultPageSize(); 92 93 static ::com::sun::star::awt::Size getPageSize( 94 const ::com::sun::star::uno::Reference< 95 ::com::sun::star::frame::XModel >& xModel ); 96 97 static void setPageSize( const ::com::sun::star::awt::Size& rSize 98 , const ::com::sun::star::uno::Reference< 99 ::com::sun::star::frame::XModel >& xModel ); 100 101 static void triggerRangeHighlighting( const ::com::sun::star::uno::Reference< 102 ::com::sun::star::frame::XModel >& xModel ); 103 104 static bool isIncludeHiddenCells( const ::com::sun::star::uno::Reference< 105 ::com::sun::star::frame::XModel >& xChartModel ); 106 107 static bool setIncludeHiddenCells( bool bIncludeHiddenCells, const ::com::sun::star::uno::Reference< 108 ::com::sun::star::frame::XModel >& xChartModel ); 109 }; 110 111 //............................................................................. 112 } //namespace chart 113 //............................................................................. 114 #endif 115