1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_CHART2_SOURCE_INC_CHARTMODELHELPER_HXX
20 #define INCLUDED_CHART2_SOURCE_INC_CHARTMODELHELPER_HXX
22 #include <com/sun/star/awt/Size.hpp>
23 #include "charttoolsdllapi.hxx"
27 namespace chart
{ class ChartModel
; }
28 namespace com
{ namespace sun
{ namespace star
{ namespace chart2
{ class XChartDocument
; } } } }
29 namespace com
{ namespace sun
{ namespace star
{ namespace chart2
{ class XChartType
; } } } }
30 namespace com
{ namespace sun
{ namespace star
{ namespace chart2
{ class XCoordinateSystem
; } } } }
31 namespace com
{ namespace sun
{ namespace star
{ namespace chart2
{ class XDataSeries
; } } } }
32 namespace com
{ namespace sun
{ namespace star
{ namespace chart2
{ class XDiagram
; } } } }
33 namespace com
{ namespace sun
{ namespace star
{ namespace chart2
{ namespace data
{ class XDataProvider
; } } } } }
34 namespace com
{ namespace sun
{ namespace star
{ namespace chart2
{ namespace data
{ class XRangeHighlighter
; } } } } }
35 namespace com
{ namespace sun
{ namespace star
{ namespace frame
{ class XModel
; } } } }
36 namespace com
{ namespace sun
{ namespace star
{ namespace view
{ class XSelectionSupplier
; } } } }
41 class OOO_DLLPUBLIC_CHARTTOOLS ChartModelHelper
44 static css::uno::Reference
< css::chart2::data::XRangeHighlighter
> createRangeHighlighter(
45 const css::uno::Reference
< css::view::XSelectionSupplier
>& xSelectionSupplier
);
47 static css::uno::Reference
< css::chart2::data::XDataProvider
> createInternalDataProvider(
48 const css::uno::Reference
< css::chart2::XChartDocument
>& xChartDoc
, bool bConnectToModel
);
50 static css::uno::Reference
< css::chart2::XDiagram
>
51 findDiagram( const css::uno::Reference
< css::frame::XModel
>& xModel
);
53 static css::uno::Reference
< css::chart2::XDiagram
>
54 findDiagram( const css::uno::Reference
< css::chart2::XChartDocument
>& xChartDoc
);
56 static css::uno::Reference
< css::chart2::XCoordinateSystem
>
57 getFirstCoordinateSystem( ChartModel
& rModel
);
59 static css::uno::Reference
< css::chart2::XCoordinateSystem
>
60 getFirstCoordinateSystem( const css::uno::Reference
< css::frame::XModel
>& xModel
);
62 SAL_DLLPRIVATE
static std::vector
< css::uno::Reference
< css::chart2::XDataSeries
> >
63 getDataSeries( ChartModel
& rModel
);
65 SAL_DLLPRIVATE
static std::vector
< css::uno::Reference
< css::chart2::XDataSeries
> >
66 getDataSeries( const css::uno::Reference
< css::chart2::XChartDocument
> & xChartDoc
);
67 static std::vector
< css::uno::Reference
< css::chart2::XDataSeries
> >
68 getDataSeries( const css::uno::Reference
< css::frame::XModel
> & xModel
);
70 static css::uno::Reference
< css::chart2::XChartType
>
72 const css::uno::Reference
< css::frame::XModel
>& xModel
73 , const css::uno::Reference
< css::chart2::XDataSeries
>& xGivenDataSeries
);
75 static css::awt::Size
getDefaultPageSize();
77 static css::awt::Size
getPageSize( const css::uno::Reference
< css::frame::XModel
>& xModel
);
79 static void triggerRangeHighlighting( const css::uno::Reference
< css::frame::XModel
>& xModel
);
81 static bool isIncludeHiddenCells( const css::uno::Reference
< css::frame::XModel
>& xChartModel
);
83 static bool setIncludeHiddenCells( bool bIncludeHiddenCells
, ChartModel
& rModel
);
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */