2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-29 10:28:15 +00:00
|
|
|
|
2013-10-23 19:17:00 +02:00
|
|
|
#ifndef INCLUDED_COMPHELPER_NUMBERS_HXX
|
|
|
|
#define INCLUDED_COMPHELPER_NUMBERS_HXX
|
2000-09-29 10:28:15 +00:00
|
|
|
|
|
|
|
#include <com/sun/star/util/XNumberFormats.hpp>
|
|
|
|
#include <com/sun/star/util/XNumberFormatter.hpp>
|
|
|
|
#include <com/sun/star/lang/Locale.hpp>
|
2013-11-09 13:59:36 -06:00
|
|
|
#include <comphelper/comphelperdllapi.h>
|
2000-09-29 10:28:15 +00:00
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2000-09-29 10:28:15 +00:00
|
|
|
namespace comphelper
|
|
|
|
{
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2000-09-29 10:28:15 +00:00
|
|
|
/// returns the ::com::sun::star::util::NumberFormat of the given key under the given formats
|
2014-08-20 21:34:30 +02:00
|
|
|
COMPHELPER_DLLPUBLIC sal_Int16 getNumberFormatType(const css::uno::Reference<css::util::XNumberFormats>& xFormats, sal_Int32 nKey);
|
2000-09-29 10:28:15 +00:00
|
|
|
|
|
|
|
/// returns the ::com::sun::star::util::NumberFormat of the given key under the given formatter
|
2014-08-20 21:34:30 +02:00
|
|
|
COMPHELPER_DLLPUBLIC sal_Int16 getNumberFormatType(const css::uno::Reference<css::util::XNumberFormatter>& xFormatter, sal_Int32 nKey);
|
2000-09-29 10:28:15 +00:00
|
|
|
|
|
|
|
/// returns the decimals of the given numeric number formatunder the given formats
|
2014-08-20 21:34:30 +02:00
|
|
|
COMPHELPER_DLLPUBLIC css::uno::Any getNumberFormatDecimals(const css::uno::Reference<css::util::XNumberFormats>& xFormats, sal_Int32 nKey);
|
2000-09-29 10:28:15 +00:00
|
|
|
|
|
|
|
/** returns the standard format for the given type and the given _rLocale
|
|
|
|
*/
|
|
|
|
sal_Int32 getStandardFormat(
|
2014-08-20 21:34:30 +02:00
|
|
|
const css::uno::Reference<css::util::XNumberFormatter>& xFormatter,
|
2000-09-29 10:28:15 +00:00
|
|
|
sal_Int16 nType,
|
2014-08-20 21:32:19 +02:00
|
|
|
const css::lang::Locale& _rLocale);
|
2000-09-29 10:28:15 +00:00
|
|
|
|
2002-04-09 13:33:37 +00:00
|
|
|
/** retrieves a the value of a given property for a given format key, relating to a given formatter
|
|
|
|
*/
|
2005-02-16 14:57:54 +00:00
|
|
|
COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Any getNumberFormatProperty(
|
2002-04-09 13:33:37 +00:00
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
|
|
|
|
sal_Int32 _nKey,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& _rPropertyName
|
2002-04-09 13:33:37 +00:00
|
|
|
);
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2000-09-29 10:28:15 +00:00
|
|
|
} // namespace comphelper
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2000-09-29 10:28:15 +00:00
|
|
|
|
2013-10-23 19:17:00 +02:00
|
|
|
#endif // INCLUDED_COMPHELPER_NUMBERS_HXX
|
2000-09-29 10:28:15 +00:00
|
|
|
|
2010-10-14 08:27:31 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|