diff options
author | Noel Power <noel.power@suse.com> | 2013-04-22 16:46:40 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-05-07 09:56:23 +0100 |
commit | 58dcba3fa9c5ac171838d79fb4433fda4f81c48b (patch) | |
tree | 5651830eaa953b114df7417434143d73f5f3e634 /sc/source/ui/vba/vbarange.cxx | |
parent | 6e19cc7a04bfdf157cefca70b7c116fb86ce3a51 (diff) |
fix limits check on breaks ( ignore breaks outside used area )
Change-Id: I36154ba6999c9a74ecf2c55c0559b6c25d137283
Diffstat (limited to 'sc/source/ui/vba/vbarange.cxx')
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 046f54095dd0..332212219d2f 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -1960,9 +1960,18 @@ ScVbaRange::getFormulaArray() throw (uno::RuntimeException) uno::Reference< sheet::XCellRangeFormula> xCellRangeFormula( mxRange, uno::UNO_QUERY_THROW ); uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext ); - uno::Any aMatrix; - aMatrix = xConverter->convertTo( uno::makeAny( xCellRangeFormula->getFormulaArray() ) , getCppuType((uno::Sequence< uno::Sequence< uno::Any > >*)0) ) ; - return aMatrix; + uno::Any aSingleValueOrMatrix; + // When dealing with a single element ( embedded in the sequence of sequence ) unwrap and return + // that value + uno::Sequence< uno::Sequence<rtl::OUString> > aTmpSeq = xCellRangeFormula->getFormulaArray(); + if ( aTmpSeq.getLength() == 1 ) + { + if ( aTmpSeq[ 0 ].getLength() == 1 ) + aSingleValueOrMatrix <<= aTmpSeq[ 0 ][ 0 ]; + } + else + aSingleValueOrMatrix = xConverter->convertTo( uno::makeAny( aTmpSeq ) , getCppuType((uno::Sequence< uno::Sequence< uno::Any > >*)0) ) ; + return aSingleValueOrMatrix; } void |