Files
libreoffice/chart2/source/inc/chartview/NumberFormatterWrapper.hxx

84 lines
3.0 KiB
C++
Raw Normal View History

2003-10-06 08:58:36 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2003-10-06 08:58:36 +00:00
*
* Copyright 2008 by Sun Microsystems, Inc.
2003-10-06 08:58:36 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2003-10-06 08:58:36 +00:00
*
* $RCSfile: NumberFormatterWrapper.hxx,v $
* $Revision: 1.5 $
2003-10-06 08:58:36 +00:00
*
* This file is part of OpenOffice.org.
2003-10-06 08:58:36 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2003-10-06 08:58:36 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2003-10-06 08:58:36 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2003-10-06 08:58:36 +00:00
*
************************************************************************/
#ifndef _CHART2_VIEW_NUMBERFORMATTERWRAPPER_HXX
#define _CHART2_VIEW_NUMBERFORMATTERWRAPPER_HXX
#include <svtools/zforlist.hxx>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
2003-10-06 08:58:36 +00:00
//.............................................................................
namespace chart
{
//.............................................................................
//-----------------------------------------------------------------------------
/**
*/
class FixedNumberFormatter;
class NumberFormatterWrapper
{
public:
NumberFormatterWrapper( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xSupplier );
2003-10-06 08:58:36 +00:00
virtual ~NumberFormatterWrapper();
SvNumberFormatter* getSvNumberFormatter() const;
::com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >
getNumberFormatsSupplier() { return m_xNumberFormatsSupplier; };
rtl::OUString getFormattedString( sal_Int32 nNumberFormatKey, double fValue, sal_Int32& rLabelColor, bool& rbColorChanged ) const;
2003-10-06 08:58:36 +00:00
private: //private member
::com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >
m_xNumberFormatsSupplier;
2003-10-06 08:58:36 +00:00
SvNumberFormatter* m_pNumberFormatter;
2003-10-06 08:58:36 +00:00
};
class FixedNumberFormatter
{
public:
FixedNumberFormatter( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xSupplier
, sal_Int32 nNumberFormatKey );
2003-10-06 08:58:36 +00:00
virtual ~FixedNumberFormatter();
rtl::OUString getFormattedString( double fValue, sal_Int32& rLabelColor, bool& rbColorChanged ) const;
private:
NumberFormatterWrapper m_aNumberFormatterWrapper;
ULONG m_nNumberFormatKey;
2003-10-06 08:58:36 +00:00
};
//.............................................................................
} //namespace chart
//.............................................................................
#endif