merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / inc / TitleHelper.hxx
blobf1ac050671a1fe537fda39c8e5e4fbe7f42b0785
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: TitleHelper.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _CHART2_TOOLS_TITLEHELPER_HXX
31 #define _CHART2_TOOLS_TITLEHELPER_HXX
33 #include "ReferenceSizeProvider.hxx"
34 #include "charttoolsdllapi.hxx"
35 #include <com/sun/star/chart2/XTitled.hpp>
36 #include <com/sun/star/frame/XModel.hpp>
37 #include <com/sun/star/uno/XComponentContext.hpp>
38 #include <com/sun/star/chart2/XDiagram.hpp>
40 //.............................................................................
41 namespace chart
43 //.............................................................................
45 class OOO_DLLPUBLIC_CHARTTOOLS TitleHelper
47 public:
48 enum eTitleType
50 TITLE_BEGIN = 0,
51 MAIN_TITLE = 0,
52 SUB_TITLE,
53 X_AXIS_TITLE,
54 Y_AXIS_TITLE,
55 Z_AXIS_TITLE,
56 SECONDARY_X_AXIS_TITLE,
57 SECONDARY_Y_AXIS_TITLE,
58 NORMAL_TITLE_END,
60 //it is intended that this both types are after NORMAL_TITLE_END
61 TITLE_AT_STANDARD_X_AXIS_POSITION, //equals the Y_AXIS_TITLE for barchart
62 TITLE_AT_STANDARD_Y_AXIS_POSITION //equals the X_AXIS_TITLE for barchart
65 static ::com::sun::star::uno::Reference<
66 ::com::sun::star::chart2::XTitle >
67 getTitle( eTitleType nTitleIndex
68 , const ::com::sun::star::uno::Reference<
69 ::com::sun::star::frame::XModel >& xModel );
71 static ::com::sun::star::uno::Reference<
72 ::com::sun::star::chart2::XTitle >
73 createTitle( eTitleType nTitleIndex
74 , const rtl::OUString& rTitleText
75 , const ::com::sun::star::uno::Reference<
76 ::com::sun::star::frame::XModel >& xModel
77 , const ::com::sun::star::uno::Reference<
78 ::com::sun::star::uno::XComponentContext > & xContext
79 , ReferenceSizeProvider * pRefSizeProvider = 0 );
81 static void removeTitle( eTitleType nTitleIndex
82 , const ::com::sun::star::uno::Reference<
83 ::com::sun::star::frame::XModel >& xModel );
85 static rtl::OUString getCompleteString( const ::com::sun::star::uno::Reference<
86 ::com::sun::star::chart2::XTitle >& xTitle );
87 static void setCompleteString( const rtl::OUString& rNewText
88 , const ::com::sun::star::uno::Reference<
89 ::com::sun::star::chart2::XTitle >& xTitle
90 , const ::com::sun::star::uno::Reference<
91 ::com::sun::star::uno::XComponentContext > & xContext
92 , float * pDefaultCharHeight = 0 );
94 static bool getTitleType( eTitleType& rType
95 , const ::com::sun::star::uno::Reference<
96 ::com::sun::star::chart2::XTitle >& xTitle
97 , const ::com::sun::star::uno::Reference<
98 ::com::sun::star::frame::XModel >& xModel );
101 //.............................................................................
102 } //namespace chart
103 //.............................................................................
104 #endif