fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / inc / TitleHelper.hxx
blobf5f299f098ef655087743c1b2a54c3e5b99801e5
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_INC_TITLEHELPER_HXX
20 #define INCLUDED_CHART2_SOURCE_INC_TITLEHELPER_HXX
22 #include "ReferenceSizeProvider.hxx"
23 #include "charttoolsdllapi.hxx"
24 #include <com/sun/star/chart2/XTitled.hpp>
25 #include <com/sun/star/frame/XModel.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
27 #include <com/sun/star/chart2/XDiagram.hpp>
29 #include "ChartModel.hxx"
31 namespace chart
34 class OOO_DLLPUBLIC_CHARTTOOLS TitleHelper
36 public:
37 enum eTitleType
39 TITLE_BEGIN = 0,
40 MAIN_TITLE = 0,
41 SUB_TITLE,
42 X_AXIS_TITLE,
43 Y_AXIS_TITLE,
44 Z_AXIS_TITLE,
45 SECONDARY_X_AXIS_TITLE,
46 SECONDARY_Y_AXIS_TITLE,
47 NORMAL_TITLE_END,
49 //it is intended that this both types are after NORMAL_TITLE_END
50 TITLE_AT_STANDARD_X_AXIS_POSITION, //equals the Y_AXIS_TITLE for barchart
51 TITLE_AT_STANDARD_Y_AXIS_POSITION //equals the X_AXIS_TITLE for barchart
54 static ::com::sun::star::uno::Reference<
55 ::com::sun::star::chart2::XTitle >
56 getTitle( eTitleType nTitleIndex
57 , ChartModel& rModel );
59 static ::com::sun::star::uno::Reference<
60 ::com::sun::star::chart2::XTitle >
61 getTitle( eTitleType nTitleIndex
62 , const ::com::sun::star::uno::Reference<
63 ::com::sun::star::frame::XModel >& xModel );
65 static ::com::sun::star::uno::Reference<
66 ::com::sun::star::chart2::XTitle >
67 createTitle( eTitleType nTitleIndex
68 , const OUString& rTitleText
69 , const ::com::sun::star::uno::Reference<
70 ::com::sun::star::frame::XModel >& xModel
71 , const ::com::sun::star::uno::Reference<
72 ::com::sun::star::uno::XComponentContext > & xContext
73 , ReferenceSizeProvider * pRefSizeProvider = 0 );
75 static void removeTitle( eTitleType nTitleIndex
76 , const ::com::sun::star::uno::Reference<
77 ::com::sun::star::frame::XModel >& xModel );
79 static OUString getCompleteString( const ::com::sun::star::uno::Reference<
80 ::com::sun::star::chart2::XTitle >& xTitle );
81 static void setCompleteString( const OUString& rNewText
82 , const ::com::sun::star::uno::Reference<
83 ::com::sun::star::chart2::XTitle >& xTitle
84 , const ::com::sun::star::uno::Reference<
85 ::com::sun::star::uno::XComponentContext > & xContext
86 , float * pDefaultCharHeight = 0 );
88 static bool getTitleType( eTitleType& rType
89 , const ::com::sun::star::uno::Reference<
90 ::com::sun::star::chart2::XTitle >& xTitle
91 , ChartModel& rModel);
93 static bool getTitleType( eTitleType& rType
94 , const ::com::sun::star::uno::Reference<
95 ::com::sun::star::chart2::XTitle >& xTitle
96 , const ::com::sun::star::uno::Reference<
97 ::com::sun::star::frame::XModel >& xModel );
100 } //namespace chart
101 #endif
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */