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#pragma once
21
22#include "types.hxx"
23#include <com/sun/star/uno/TypeClass.hpp>
24
25namespace com::sun::star::uno { class Any; }
26
28class ScDocument;
29class ScMatrix;
30class ScRange;
31
33{
34public:
35 static bool FillLongArray( css::uno::Any& rAny,
36 ScDocument& rDoc, const ScRange& rRange );
37 static bool FillLongArray( css::uno::Any& rAny,
38 const ScMatrix* pMatrix );
39 static bool FillDoubleArray( css::uno::Any& rAny,
40 ScDocument& rDoc, const ScRange& rRange );
41 static bool FillDoubleArray( css::uno::Any& rAny,
42 const ScMatrix* pMatrix );
43 static bool FillStringArray( css::uno::Any& rAny,
44 ScDocument& rDoc, const ScRange& rRange );
45 static bool FillStringArray( css::uno::Any& rAny,
46 const ScMatrix* pMatrix, SvNumberFormatter* pFormatter );
47 static bool FillMixedArray( css::uno::Any& rAny,
48 ScDocument& rDoc, const ScRange& rRange,
49 bool bAllowNV = false );
50
57 static bool FillMixedArray( css::uno::Any& rAny,
58 const ScMatrix* pMatrix, bool bDataTypes = false );
59};
60
62{
63public:
64
72 static bool ConvertAnyToDouble(
73 double & o_fVal,
74 css::uno::TypeClass & o_eClass,
75 const css::uno::Any & rAny );
76
77};
78
80{
81public:
82
90 static ScMatrixRef CreateMixedMatrix( const css::uno::Any & rAny );
91
92};
93
95{
96public:
97 // rAny must contain either OUString or Sequence<sal_Int8> (thread encoding assumed),
98 // may or may not contain 0-bytes at the end
99 static bool GetString( OUString& rString, const css::uno::Any& rAny );
100};
101
102/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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:328
static bool GetString(OUString &rString, const css::uno::Any &rAny)
Definition: rangeseq.cxx:433
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:101
static bool FillLongArray(css::uno::Any &rAny, const ScMatrix *pMatrix)
static bool FillDoubleArray(css::uno::Any &rAny, const ScMatrix *pMatrix)
static bool FillMixedArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange, bool bAllowNV=false)
static bool FillStringArray(css::uno::Any &rAny, const ScMatrix *pMatrix, SvNumberFormatter *pFormatter)
static bool FillDoubleArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange)
static bool FillLongArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange)
static bool FillStringArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange)
static bool FillMixedArray(css::uno::Any &rAny, const ScMatrix *pMatrix, bool bDataTypes=false)
static ScMatrixRef CreateMixedMatrix(const css::uno::Any &rAny)
Convert a sequence of mixed elements to ScMatrix.
Definition: rangeseq.cxx:358
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:25