1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _CHART2_OBJECTNAME_PROVIDER_HXX 29 #define _CHART2_OBJECTNAME_PROVIDER_HXX 30 31 #include "ObjectIdentifier.hxx" 32 #include "TitleHelper.hxx" 33 #include <com/sun/star/frame/XModel.hpp> 34 #include <com/sun/star/chart2/XChartDocument.hpp> 35 36 //............................................................................. 37 namespace chart 38 { 39 //............................................................................. 40 41 //----------------------------------------------------------------------------- 42 /** Provides localized ui strings for the userinterface. 43 */ 44 45 class ObjectNameProvider 46 { 47 public: 48 static rtl::OUString getName( ObjectType eObjectType, bool bPlural=false ); 49 static rtl::OUString getAxisName( const rtl::OUString& rObjectCID 50 , const ::com::sun::star::uno::Reference< 51 ::com::sun::star::frame::XModel >& xChartModel ); 52 static rtl::OUString getGridName( const rtl::OUString& rObjectCID 53 , const ::com::sun::star::uno::Reference< 54 ::com::sun::star::frame::XModel >& xChartModel ); 55 static rtl::OUString getTitleName( const rtl::OUString& rObjectCID 56 , const ::com::sun::star::uno::Reference< 57 ::com::sun::star::frame::XModel >& xChartModel ); 58 static rtl::OUString getTitleNameByType( TitleHelper::eTitleType eType ); 59 60 static rtl::OUString getNameForCID( 61 const rtl::OUString& rObjectCID, 62 const ::com::sun::star::uno::Reference< 63 ::com::sun::star::chart2::XChartDocument >& xChartDocument ); 64 65 static rtl::OUString getName_ObjectForSeries( 66 ObjectType eObjectType, 67 const rtl::OUString& rSeriesCID, 68 const ::com::sun::star::uno::Reference< 69 ::com::sun::star::chart2::XChartDocument >& xChartDocument ); 70 static rtl::OUString getName_ObjectForAllSeries( ObjectType eObjectType ); 71 72 /** Provides help texts for the various chart elements. 73 The parameter rObjectCID has to be a ClassifiedIdentifier - see class ObjectIdentifier. 74 */ 75 static rtl::OUString getHelpText( const rtl::OUString& rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel, bool bVerbose=false ); 76 static rtl::OUString getHelpText( const rtl::OUString& rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument, bool bVerbose=false ); 77 78 /** This is used for showing the currently selected object in the status bar 79 (command "Context") 80 */ 81 static rtl::OUString getSelectedObjectText( const rtl::OUString & rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument ); 82 }; 83 84 //............................................................................. 85 } //namespace chart 86 //............................................................................. 87 #endif 88