1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SC_CELLFORM_HXX
21 #define SC_CELLFORM_HXX
23 #include <tools/solar.h>
26 class SvNumberFormatter
;
30 struct ScRefCellValue
;
33 ftDontForce
, // numbers as numbers
34 ftForce
, // numbers as text
35 ftCheck
// is the numberformat a textformat?
38 //------------------------------------------------------------------------
40 class SC_DLLPUBLIC ScCellFormat
44 static void GetString(
45 ScRefCellValue
& rCell
, sal_uLong nFormat
, OUString
& rString
,
46 Color
** ppColor
, SvNumberFormatter
& rFormatter
, const ScDocument
* pDoc
, bool bNullVals
= true,
47 bool bFormula
= false, ScForceTextFmt eForceTextFmt
= ftDontForce
,
48 bool bUseStarFormat
= false );
50 static OUString
GetString(
51 ScDocument
& rDoc
, const ScAddress
& rPos
, sal_uLong nFormat
,
52 Color
** ppColor
, SvNumberFormatter
& rFormatter
, bool bNullVals
= true,
53 bool bFormula
= false, ScForceTextFmt eForceTextFmt
= ftDontForce
, bool bUseStarFormat
= false );
55 static void GetInputString(
56 ScRefCellValue
& rCell
, sal_uLong nFormat
, OUString
& rString
, SvNumberFormatter
& rFormatter
,
57 const ScDocument
* pDoc
);
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */