1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef _CHART2_CONTROLLER_CHARTMODELHELPER_HXX
28 #define _CHART2_CONTROLLER_CHARTMODELHELPER_HXX
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/XUndoManager.hpp>
35 #include <com/sun/star/chart2/data/XDataProvider.hpp>
36 #include <com/sun/star/chart2/data/XRangeHighlighter.hpp>
37 #include <com/sun/star/view/XSelectionSupplier.hpp>
39 #include <com/sun/star/awt/Size.hpp>
40 #include <com/sun/star/frame/XModel.hpp>
41 #include "charttoolsdllapi.hxx"
45 //.............................................................................
48 //.............................................................................
50 //-----------------------------------------------------------------------------
54 class OOO_DLLPUBLIC_CHARTTOOLS ChartModelHelper
57 static ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XRangeHighlighter
> createRangeHighlighter(
58 const ::com::sun::star::uno::Reference
< ::com::sun::star::view::XSelectionSupplier
>& xSelectionSupplier
);
60 static ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataProvider
> createInternalDataProvider(
61 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartDocument
>& xChartDoc
, bool bConnectToModel
);
63 static ::com::sun::star::uno::Reference
<
64 ::com::sun::star::chart2::XDiagram
>
65 findDiagram( const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& xModel
);
67 static ::com::sun::star::uno::Reference
<
68 ::com::sun::star::chart2::XDiagram
>
69 findDiagram( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartDocument
>& xChartDoc
);
71 static ::com::sun::star::uno::Reference
<
72 ::com::sun::star::chart2::XCoordinateSystem
>
73 getFirstCoordinateSystem( const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& xModel
);
75 SAL_DLLPRIVATE
static ::std::vector
< ::com::sun::star::uno::Reference
<
76 ::com::sun::star::chart2::XDataSeries
> > getDataSeries(
77 const ::com::sun::star::uno::Reference
<
78 ::com::sun::star::chart2::XChartDocument
> & xChartDoc
);
79 static ::std::vector
< ::com::sun::star::uno::Reference
<
80 ::com::sun::star::chart2::XDataSeries
> > getDataSeries(
81 const ::com::sun::star::uno::Reference
<
82 ::com::sun::star::frame::XModel
> & xModel
);
84 static ::com::sun::star::uno::Reference
<
85 ::com::sun::star::chart2::XChartType
>
87 const ::com::sun::star::uno::Reference
<
88 ::com::sun::star::frame::XModel
>& xModel
89 , const ::com::sun::star::uno::Reference
<
90 ::com::sun::star::chart2::XDataSeries
>& xGivenDataSeries
);
92 static ::com::sun::star::awt::Size
getDefaultPageSize();
94 static ::com::sun::star::awt::Size
getPageSize(
95 const ::com::sun::star::uno::Reference
<
96 ::com::sun::star::frame::XModel
>& xModel
);
98 static void setPageSize( const ::com::sun::star::awt::Size
& rSize
99 , const ::com::sun::star::uno::Reference
<
100 ::com::sun::star::frame::XModel
>& xModel
);
102 static void triggerRangeHighlighting( const ::com::sun::star::uno::Reference
<
103 ::com::sun::star::frame::XModel
>& xModel
);
105 static bool isIncludeHiddenCells( const ::com::sun::star::uno::Reference
<
106 ::com::sun::star::frame::XModel
>& xChartModel
);
108 static bool setIncludeHiddenCells( bool bIncludeHiddenCells
, const ::com::sun::star::uno::Reference
<
109 ::com::sun::star::frame::XModel
>& xChartModel
);
112 //.............................................................................
114 //.............................................................................