diff options
author | Noel Power <noel.power@suse.com> | 2013-05-02 13:16:08 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-05-09 14:11:17 +0100 |
commit | 8b94bfebf6e0d244182a19fc1743d7c67dc41857 (patch) | |
tree | 9f5885bff7f99125ff6a82fbb84767ce2ad14f1e /sc | |
parent | 396224947e9522c48043291c2e2559d7f86fb3d1 (diff) |
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
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/extras/testdocuments/PageBreaks.xls | bin | 49152 -> 55296 bytes | |||
-rw-r--r-- | sc/source/ui/vba/vbapagebreaks.cxx | 4 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/qa/extras/testdocuments/PageBreaks.xls b/sc/qa/extras/testdocuments/PageBreaks.xls Binary files differindex 2affd99ffda1..4e6ac0a42b59 100644 --- a/sc/qa/extras/testdocuments/PageBreaks.xls +++ b/sc/qa/extras/testdocuments/PageBreaks.xls diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index a0c40b2090fb..09100e25062e 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -49,7 +49,7 @@ public: sal_Int32 getAPIEndIndexofRange( const uno::Reference< excel::XRange >& xRange, sal_Int32 nUsedStart ) throw (uno::RuntimeException) { 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(); } @@ -107,7 +107,7 @@ 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 + 1 ) + if( nPos > nUsedEnd + 1) return nCount; nCount++; } |