bump product version to 4.1.6.2
[LibreOffice.git] / chart2 / source / inc / TitleHelper.hxx
blobec9db23e24014cda8ab5f13bc0e52aa3b76f2871
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 _CHART2_TOOLS_TITLEHELPER_HXX
20 #define _CHART2_TOOLS_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 //.............................................................................
30 namespace chart
32 //.............................................................................
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 , const ::com::sun::star::uno::Reference<
58 ::com::sun::star::frame::XModel >& xModel );
60 static ::com::sun::star::uno::Reference<
61 ::com::sun::star::chart2::XTitle >
62 createTitle( eTitleType nTitleIndex
63 , const OUString& rTitleText
64 , const ::com::sun::star::uno::Reference<
65 ::com::sun::star::frame::XModel >& xModel
66 , const ::com::sun::star::uno::Reference<
67 ::com::sun::star::uno::XComponentContext > & xContext
68 , ReferenceSizeProvider * pRefSizeProvider = 0 );
70 static void removeTitle( eTitleType nTitleIndex
71 , const ::com::sun::star::uno::Reference<
72 ::com::sun::star::frame::XModel >& xModel );
74 static OUString getCompleteString( const ::com::sun::star::uno::Reference<
75 ::com::sun::star::chart2::XTitle >& xTitle );
76 static void setCompleteString( const OUString& rNewText
77 , const ::com::sun::star::uno::Reference<
78 ::com::sun::star::chart2::XTitle >& xTitle
79 , const ::com::sun::star::uno::Reference<
80 ::com::sun::star::uno::XComponentContext > & xContext
81 , float * pDefaultCharHeight = 0 );
83 static bool getTitleType( eTitleType& rType
84 , const ::com::sun::star::uno::Reference<
85 ::com::sun::star::chart2::XTitle >& xTitle
86 , const ::com::sun::star::uno::Reference<
87 ::com::sun::star::frame::XModel >& xModel );
90 //.............................................................................
91 } //namespace chart
92 //.............................................................................
93 #endif
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */