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 .
21 #include <com/sun/star/uno/Reference.h>
22 #include <rtl/ustring.hxx>
23 #include "charttoolsdllapi.hxx"
25 namespace chart
{ class ChartModel
; }
26 namespace chart
{ class ReferenceSizeProvider
; }
27 namespace com::sun::star::chart2
{ class XTitle
; }
28 namespace com::sun::star::frame
{ class XModel
; }
29 namespace com::sun::star::uno
{ class XComponentContext
; }
34 class OOO_DLLPUBLIC_CHARTTOOLS TitleHelper
45 SECONDARY_X_AXIS_TITLE
,
46 SECONDARY_Y_AXIS_TITLE
,
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 css::uno::Reference
< css::chart2::XTitle
>
55 getTitle( eTitleType nTitleIndex
56 , ChartModel
& rModel
);
58 static css::uno::Reference
< css::chart2::XTitle
>
59 getTitle( eTitleType nTitleIndex
60 , const css::uno::Reference
< css::frame::XModel
>& xModel
);
62 static css::uno::Reference
<
64 createTitle( eTitleType nTitleIndex
65 , const OUString
& rTitleText
66 , const css::uno::Reference
< css::frame::XModel
>& xModel
67 , const css::uno::Reference
< css::uno::XComponentContext
> & xContext
68 , ReferenceSizeProvider
* pRefSizeProvider
= nullptr );
69 static css::uno::Reference
<
71 createOrShowTitle( eTitleType nTitleIndex
72 , const OUString
& rTitleText
73 , const css::uno::Reference
< css::frame::XModel
>& xModel
74 , const css::uno::Reference
< css::uno::XComponentContext
> & xContex
);
76 static void removeTitle( eTitleType nTitleIndex
77 , const css::uno::Reference
< css::frame::XModel
>& xModel
);
79 static void hideTitle( eTitleType nTitleIndex
80 , const css::uno::Reference
< css::frame::XModel
>& xModel
);
83 static OUString
getCompleteString( const css::uno::Reference
< css::chart2::XTitle
>& xTitle
);
84 static void setCompleteString( const OUString
& rNewText
85 , const css::uno::Reference
< css::chart2::XTitle
>& xTitle
86 , const css::uno::Reference
< css::uno::XComponentContext
> & xContext
87 , const float * pDefaultCharHeight
= nullptr );
89 static bool getTitleType( eTitleType
& rType
90 , const css::uno::Reference
< css::chart2::XTitle
>& xTitle
91 , ChartModel
& rModel
);
93 static bool getTitleType( eTitleType
& rType
94 , const css::uno::Reference
< css::chart2::XTitle
>& xTitle
95 , const css::uno::Reference
< css::frame::XModel
>& xModel
);
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */