summaryrefslogtreecommitdiffstats
path: root/sc/inc/rangeseq.hxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-01-10 12:09:27 +0000
committerOliver Bolte <obo@openoffice.org>2008-01-10 12:09:27 +0000
commitda3f147c4bfe0b0ff9307b0757c3028d9aae027a (patch)
treec8fd94a9b18fca03f3b31b4a26b0dccc55f63381 /sc/inc/rangeseq.hxx
parentINTEGRATION: CWS xmlfilter02 (1.19.10); FILE MERGED (diff)
downloadcore-da3f147c4bfe0b0ff9307b0757c3028d9aae027a.tar.gz
core-da3f147c4bfe0b0ff9307b0757c3028d9aae027a.zip
INTEGRATION: CWS xmlfilter02 (1.4.402); FILE MERGED
2007/08/30 09:24:13 er 1.4.402.1: #i75682# generalize uno::Sequence to ScMatrix conversion
Diffstat (limited to 'sc/inc/rangeseq.hxx')
-rw-r--r--sc/inc/rangeseq.hxx53
1 files changed, 49 insertions, 4 deletions
diff --git a/sc/inc/rangeseq.hxx b/sc/inc/rangeseq.hxx
index 4006ef96906f..5b5519f15b42 100644
--- a/sc/inc/rangeseq.hxx
+++ b/sc/inc/rangeseq.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: rangeseq.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 17:50:20 $
+ * last change: $Author: obo $ $Date: 2008-01-10 13:09:27 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -44,10 +44,13 @@
#include <com/sun/star/uno/Any.h>
#endif
+#ifndef SC_MATRIX_HXX
+#include "scmatrix.hxx"
+#endif
+
class SvNumberFormatter;
class ScDocument;
class ScRange;
-class ScMatrix;
class ScRangeToSequence
{
@@ -67,8 +70,50 @@ public:
static BOOL FillMixedArray( com::sun::star::uno::Any& rAny,
ScDocument* pDoc, const ScRange& rRange,
BOOL bAllowNV = FALSE );
+
+ /** @param bDataTypes
+ Additionally to the differentiation between string and double allow
+ differentiation between other types such as as boolean. Needed for
+ implementation of XFormulaParser. If <FALSE/>, boolean values are
+ treated as ordinary double values 1 (true) and 0 (false).
+ */
static BOOL FillMixedArray( com::sun::star::uno::Any& rAny,
- const ScMatrix* pMatrix );
+ const ScMatrix* pMatrix, bool bDataTypes = false );
+};
+
+
+class ScApiTypeConversion
+{
+public:
+
+ /** Convert an uno::Any to double if possible, including integer types.
+ @param o_fVal
+ Out: the double value on successful conversion.
+ @param o_eClass
+ Out: the uno::TypeClass of rAny.
+ @returns <TRUE/> if successfully converted.
+ */
+ static bool ConvertAnyToDouble(
+ double & o_fVal,
+ com::sun::star::uno::TypeClass & o_eClass,
+ const com::sun::star::uno::Any & rAny );
+
+};
+
+
+class ScSequenceToMatrix
+{
+public:
+
+ /** Convert a sequence of mixed elements to ScMatrix.
+
+ Precondition: rAny.getValueType().equals( getCppuType( (uno::Sequence< uno::Sequence< uno::Any > > *)0))
+
+ @returns a new'd ScMatrix as ScMatrixRef, NULL if rAny couldn't be read
+ as type Sequence<Sequence<Any>>
+ */
+ static ScMatrixRef CreateMixedMatrix( const com::sun::star::uno::Any & rAny );
+
};