| 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 |
|
| 20 |
#pragma once |
| 21 |
|
| 22 |
#include <ObjectIdentifier.hxx> |
| 23 |
#include <TitleHelper.hxx> |
| 24 |
|
| 25 |
namespace chart |
| 26 |
{ |
| 27 |
|
| 28 |
/** Provides localized ui strings for the userinterface. |
| 29 |
*/ |
| 30 |
|
| 31 |
class ObjectNameProvider |
| 32 |
{ |
| 33 |
public: |
| 34 |
static OUString getName( ObjectType eObjectType, bool bPlural=false ); |
| 35 |
static OUString getAxisName( std::u16string_view rObjectCID |
| 36 |
, const rtl::Reference<::chart::ChartModel>& xChartModel ); |
| 37 |
static OUString getGridName( std::u16string_view rObjectCID |
| 38 |
, const rtl::Reference<::chart::ChartModel>& xChartModel ); |
| 39 |
static OUString getTitleName( std::u16string_view rObjectCID |
| 40 |
, const rtl::Reference<::chart::ChartModel>& xChartModel ); |
| 41 |
static OUString getTitleNameByType( TitleHelper::eTitleType eType ); |
| 42 |
|
| 43 |
static OUString getNameForCID( |
| 44 |
std::u16string_view rObjectCID, |
| 45 |
const rtl::Reference<::chart::ChartModel>& xChartDocument ); |
| 46 |
|
| 47 |
static OUString getName_ObjectForSeries( |
| 48 |
ObjectType eObjectType, |
| 49 |
std::u16string_view rSeriesCID, |
| 50 |
const rtl::Reference<::chart::ChartModel>& xChartDocument ); |
| 51 |
static OUString getName_ObjectForAllSeries( ObjectType eObjectType ); |
| 52 |
|
| 53 |
/** Provides help texts for the various chart elements. |
| 54 |
The parameter rObjectCID has to be a ClassifiedIdentifier - see class ObjectIdentifier. |
| 55 |
*/ |
| 56 |
static OUString getHelpText( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel, bool bVerbose=false ); |
| 57 |
|
| 58 |
/** This is used for showing the currently selected object in the status bar |
| 59 |
(command "Context") |
| 60 |
*/ |
| 61 |
static OUString getSelectedObjectText( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartDocument ); |
| 62 |
}; |
| 63 |
|
| 64 |
} //namespace chart |
| 65 |
|
| 66 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |