1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _CHART2_OBJECTNAME_PROVIDER_HXX
25 #define _CHART2_OBJECTNAME_PROVIDER_HXX
26 
27 #include "ObjectIdentifier.hxx"
28 #include "TitleHelper.hxx"
29 #include <com/sun/star/frame/XModel.hpp>
30 #include <com/sun/star/chart2/XChartDocument.hpp>
31 
32 //.............................................................................
33 namespace chart
34 {
35 //.............................................................................
36 
37 //-----------------------------------------------------------------------------
38 /** Provides localized ui strings for the userinterface.
39 */
40 
41 class ObjectNameProvider
42 {
43 public:
44     static rtl::OUString getName( ObjectType eObjectType, bool bPlural=false );
45     static rtl::OUString getAxisName( const rtl::OUString& rObjectCID
46                         , const ::com::sun::star::uno::Reference<
47                             ::com::sun::star::frame::XModel >& xChartModel  );
48     static rtl::OUString getGridName( const rtl::OUString& rObjectCID
49                         , const ::com::sun::star::uno::Reference<
50                             ::com::sun::star::frame::XModel >& xChartModel );
51     static rtl::OUString getTitleName( const rtl::OUString& rObjectCID
52                         , const ::com::sun::star::uno::Reference<
53                             ::com::sun::star::frame::XModel >& xChartModel );
54     static rtl::OUString getTitleNameByType( TitleHelper::eTitleType eType );
55 
56     static rtl::OUString getNameForCID(
57         const rtl::OUString& rObjectCID,
58         const ::com::sun::star::uno::Reference<
59             ::com::sun::star::chart2::XChartDocument >& xChartDocument );
60 
61     static rtl::OUString getName_ObjectForSeries(
62         ObjectType eObjectType,
63         const rtl::OUString& rSeriesCID,
64         const ::com::sun::star::uno::Reference<
65             ::com::sun::star::chart2::XChartDocument >& xChartDocument );
66     static rtl::OUString getName_ObjectForAllSeries( ObjectType eObjectType );
67 
68     /** Provides help texts for the various chart elements.
69         The parameter rObjectCID has to be a ClassifiedIdentifier - see class ObjectIdentifier.
70      */
71     static rtl::OUString getHelpText( const rtl::OUString& rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel, bool bVerbose=false );
72     static rtl::OUString getHelpText( const rtl::OUString& rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument, bool bVerbose=false );
73 
74     /** This is used for showing the currently selected object in the status bar
75         (command "Context")
76      */
77     static rtl::OUString getSelectedObjectText( const rtl::OUString & rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument );
78 };
79 
80 //.............................................................................
81 } //namespace chart
82 //.............................................................................
83 #endif
84