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 #ifndef INCLUDED_DEVCHARTCONFIG_HXX 28 #define INCLUDED_DEVCHARTCONFIG_HXX 29 30 #include <unotools/configitem.hxx> 31 32 namespace ScDevChart 33 { 34 35 class DevChartConfigItem : public ::utl::ConfigItem 36 { 37 public: 38 DevChartConfigItem() : 39 ConfigItem( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Internal" )), 40 CONFIG_MODE_IMMEDIATE_UPDATE ) 41 {} 42 43 bool UseDevelopmentChart(); 44 }; 45 46 bool DevChartConfigItem::UseDevelopmentChart() 47 { 48 bool bResult = false; 49 50 ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames( 1 ); 51 aNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DevelopmentChart" )); 52 53 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aResult( GetProperties( aNames )); 54 55 OSL_ASSERT( aResult.getLength()); 56 aResult[0] >>= bResult; 57 58 return bResult; 59 } 60 61 /** States whether the new chart implementation or the old one should be used. 62 If <TRUE/> is returned the newly developed chart (chart2) should be used. 63 If <FALSE/> is returned, the old chart (sch) should be used. 64 65 Config-Item: Office.Common/Internal:DevelopmentChart 66 67 This function (the complete header) is only for a transitional period. It 68 will be deprecated after the new chart is definitely integrated into the 69 product. 70 */ 71 bool UseDevChart() 72 { 73 // static DevChartConfigItem aCfgItem; 74 // return aCfgItem.UseDevelopmentChart(); 75 76 // ignore configuration 77 //@todo: get rid of this class 78 return true; 79 } 80 81 } // namespace ScDevChart 82 83 // INCLUDED_DEVCHARTCONFIG_HXX 84 #endif 85