fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / model / template / DataInterpreter.hxx
blob7c2cd4a191c2ced802c64f52499d69c1799793e9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_MODEL_TEMPLATE_DATAINTERPRETER_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_TEMPLATE_DATAINTERPRETER_HXX
22 #include <cppuhelper/implbase2.hxx>
23 #include <com/sun/star/chart2/XDataInterpreter.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/uno/XComponentContext.hpp>
27 namespace chart
30 class DataInterpreter : public ::cppu::WeakImplHelper2<
31 ::com::sun::star::chart2::XDataInterpreter,
32 ::com::sun::star::lang::XServiceInfo >
34 public:
35 explicit DataInterpreter( const ::com::sun::star::uno::Reference<
36 ::com::sun::star::uno::XComponentContext > & xContext );
37 virtual ~DataInterpreter();
39 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
40 GetComponentContext() const { return m_xContext;}
42 /// XServiceInfo declarations
43 virtual OUString SAL_CALL getImplementationName()
44 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
45 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
46 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
47 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
48 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
50 static OUString getImplementationName_Static();
51 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
53 // convenience methods
54 static OUString GetRole(
55 const ::com::sun::star::uno::Reference<
56 ::com::sun::star::chart2::data::XDataSequence > & xSeq );
58 static void SetRole(
59 const ::com::sun::star::uno::Reference<
60 ::com::sun::star::chart2::data::XDataSequence > & xSeq,
61 const OUString & rRole );
63 static ::com::sun::star::uno::Any GetProperty(
64 const ::com::sun::star::uno::Sequence<
65 ::com::sun::star::beans::PropertyValue > & aArguments,
66 const OUString & rName );
68 static bool HasCategories(
69 const ::com::sun::star::uno::Sequence<
70 ::com::sun::star::beans::PropertyValue > & rArguments,
71 const ::com::sun::star::uno::Sequence<
72 ::com::sun::star::uno::Reference<
73 ::com::sun::star::chart2::data::XLabeledDataSequence > > & rData );
75 static bool UseCategoriesAsX(
76 const ::com::sun::star::uno::Sequence<
77 ::com::sun::star::beans::PropertyValue > & rArguments );
79 protected:
80 // ____ XDataInterpreter ____
81 virtual ::com::sun::star::chart2::InterpretedData SAL_CALL interpretDataSource(
82 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource >& xSource,
83 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments,
84 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > >& aSeriesToReUse )
85 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
86 virtual ::com::sun::star::chart2::InterpretedData SAL_CALL reinterpretDataSeries(
87 const ::com::sun::star::chart2::InterpretedData& aInterpretedData )
88 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
89 virtual sal_Bool SAL_CALL isDataCompatible(
90 const ::com::sun::star::chart2::InterpretedData& aInterpretedData )
91 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
92 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > SAL_CALL mergeInterpretedData(
93 const ::com::sun::star::chart2::InterpretedData& aInterpretedData )
94 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
96 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
97 m_xContext;
100 } // namespace chart
102 // INCLUDED_CHART2_SOURCE_MODEL_TEMPLATE_DATAINTERPRETER_HXX
103 #endif
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */