Kaydet (Commit) 39622494 authored tarafından Noel Power's avatar Noel Power

fix limits check on breaks ( ignore breaks outside used area )

Change-Id: I36154ba6999c9a74ecf2c55c0559b6c25d137283
üst 683b016a
......@@ -107,10 +107,9 @@ sal_Int32 SAL_CALL RangePageBreaks::getCount( ) throw (uno::RuntimeException)
for( sal_Int32 i=0; i<nLength; i++ )
{
sal_Int32 nPos = aTablePageBreakData[i].Position;
if( nPos > nUsedEnd )
if( nPos > nUsedEnd + 1 )
return nCount;
if( nPos >= nUsedStart )
nCount++;
nCount++;
}
return nCount;
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment