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

Tweak further the indices checked for break, also tweak test document

<sigh> pagebreak implementation is still flawed here, the used
range is used to determine whether the page break should be
considered ( or not ) Problem is that it is not the used
range but rather the rightmost column position that contains content
( but not necessarily the column that contains content but rather
the righmost column that has content ( or even that is covered either
by spillover from an adjacent column or drawing )

Change-Id: I68c8ccc5911049bc4b2076992f839bc684d966a9
üst 39622494
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
sal_Int32 getAPIEndIndexofRange( const uno::Reference< excel::XRange >& xRange, sal_Int32 nUsedStart ) throw (uno::RuntimeException) sal_Int32 getAPIEndIndexofRange( const uno::Reference< excel::XRange >& xRange, sal_Int32 nUsedStart ) throw (uno::RuntimeException)
{ {
if( m_bColumn ) if( m_bColumn )
return nUsedStart + xRange->Columns( uno::Any() )->getCount(); return nUsedStart + xRange->Columns( uno::Any() )->getCount() - 1;
return nUsedStart + xRange->Rows( uno::Any() )->getCount(); return nUsedStart + xRange->Rows( uno::Any() )->getCount();
} }
...@@ -107,7 +107,7 @@ sal_Int32 SAL_CALL RangePageBreaks::getCount( ) throw (uno::RuntimeException) ...@@ -107,7 +107,7 @@ sal_Int32 SAL_CALL RangePageBreaks::getCount( ) throw (uno::RuntimeException)
for( sal_Int32 i=0; i<nLength; i++ ) for( sal_Int32 i=0; i<nLength; i++ )
{ {
sal_Int32 nPos = aTablePageBreakData[i].Position; sal_Int32 nPos = aTablePageBreakData[i].Position;
if( nPos > nUsedEnd + 1 ) if( nPos > nUsedEnd + 1)
return nCount; return nCount;
nCount++; nCount++;
} }
......
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