LibreOffice Module sc (master)  1
rangeseq.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SC_INC_RANGESEQ_HXX
21 #define INCLUDED_SC_INC_RANGESEQ_HXX
22 
23 #include "types.hxx"
24 #include <com/sun/star/uno/TypeClass.hpp>
25 
26 namespace com::sun::star::uno { class Any; }
27 
28 class SvNumberFormatter;
29 class ScDocument;
30 class ScMatrix;
31 class ScRange;
32 
34 {
35 public:
36  static bool FillLongArray( css::uno::Any& rAny,
37  ScDocument& rDoc, const ScRange& rRange );
38  static bool FillLongArray( css::uno::Any& rAny,
39  const ScMatrix* pMatrix );
40  static bool FillDoubleArray( css::uno::Any& rAny,
41  ScDocument& rDoc, const ScRange& rRange );
42  static bool FillDoubleArray( css::uno::Any& rAny,
43  const ScMatrix* pMatrix );
44  static bool FillStringArray( css::uno::Any& rAny,
45  ScDocument& rDoc, const ScRange& rRange );
46  static bool FillStringArray( css::uno::Any& rAny,
47  const ScMatrix* pMatrix, SvNumberFormatter* pFormatter );
48  static bool FillMixedArray( css::uno::Any& rAny,
49  ScDocument& rDoc, const ScRange& rRange,
50  bool bAllowNV = false );
51 
58  static bool FillMixedArray( css::uno::Any& rAny,
59  const ScMatrix* pMatrix, bool bDataTypes = false );
60 };
61 
63 {
64 public:
65 
73  static bool ConvertAnyToDouble(
74  double & o_fVal,
75  css::uno::TypeClass & o_eClass,
76  const css::uno::Any & rAny );
77 
78 };
79 
81 {
82 public:
83 
91  static ScMatrixRef CreateMixedMatrix( const css::uno::Any & rAny );
92 
93 };
94 
96 {
97 public:
98  // rAny must contain Sequence<sal_Int8>,
99  // may or may not contain 0-bytes at the end
100  static bool GetString( OUString& rString, const css::uno::Any& rAny,
101  sal_uInt16 nEncoding );
102 };
103 
104 #endif
105 
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:113
static bool FillLongArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange)
static bool ConvertAnyToDouble(double &o_fVal, css::uno::TypeClass &o_eClass, const css::uno::Any &rAny)
Convert a uno::Any to double if possible, including integer types.
Definition: rangeseq.cxx:327
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:26
static bool FillMixedArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange, bool bAllowNV=false)
static bool FillDoubleArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange)
static bool FillStringArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange)
static bool GetString(OUString &rString, const css::uno::Any &rAny, sal_uInt16 nEncoding)
Definition: rangeseq.cxx:432
static ScMatrixRef CreateMixedMatrix(const css::uno::Any &rAny)
Convert a sequence of mixed elements to ScMatrix.
Definition: rangeseq.cxx:357