LibreOffice Module chart2 (master) 1
TitleHelper.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <com/sun/star/uno/Reference.h>
22#include <rtl/ref.hxx>
23#include <rtl/ustring.hxx>
24#include "charttoolsdllapi.hxx"
25#include "Title.hxx"
26
27namespace chart { class ChartModel; }
28namespace chart { class ReferenceSizeProvider; }
29namespace com::sun::star::chart2 { class XTitle; }
30namespace com::sun::star::frame { class XModel; }
31namespace com::sun::star::uno { class XComponentContext; }
32
33namespace chart
34{
35
37{
38public:
40 {
41 TITLE_BEGIN = 0,
42 MAIN_TITLE = 0,
50
51 //it is intended that this both types are after NORMAL_TITLE_END
52 TITLE_AT_STANDARD_X_AXIS_POSITION, //equals the Y_AXIS_TITLE for barchart
53 TITLE_AT_STANDARD_Y_AXIS_POSITION //equals the X_AXIS_TITLE for barchart
54 };
55
57 getTitle( eTitleType nTitleIndex
58 , ChartModel& rModel );
59
61 getTitle( eTitleType nTitleIndex
63
65 createTitle( eTitleType nTitleIndex
66 , const OUString& rTitleText
68 , const css::uno::Reference< css::uno::XComponentContext > & xContext
69 , ReferenceSizeProvider * pRefSizeProvider = nullptr );
71 createOrShowTitle( eTitleType nTitleIndex
72 , const OUString& rTitleText
74 , const css::uno::Reference< css::uno::XComponentContext > & xContex );
75
76 static void removeTitle( eTitleType nTitleIndex
78
79 static OUString getCompleteString( const rtl::Reference< ::chart::Title >& xTitle );
80 static void setCompleteString( const OUString& rNewText
82 , const css::uno::Reference< css::uno::XComponentContext > & xContext
83 , const float * pDefaultCharHeight = nullptr );
84
85 static bool getTitleType( eTitleType& rType
88 static void hideTitle( eTitleType nTitleIndex,
90};
91
92} //namespace chart
93
94/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS
static rtl::Reference< ::chart::Title > getTitle(eTitleType nTitleIndex, const rtl::Reference< ::chart::ChartModel > &xModel)
std::u16string_view getTitle(std::u16string_view aPath)