summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-05-02 13:16:08 +0100
committerNoel Power <noel.power@suse.com>2013-05-07 09:56:24 +0100
commit633403fb2cdb34918801c4547323e4487678db3f (patch)
treea34a88cfaec9185c1f1e34a1b2acccb5c1e331c8
parent58dcba3fa9c5ac171838d79fb4433fda4f81c48b (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
-rw-r--r--sc/qa/extras/testdocuments/PageBreaks.xlsbin49152 -> 55296 bytes
-rw-r--r--sc/source/ui/vba/vbapagebreaks.cxx4
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/qa/extras/testdocuments/PageBreaks.xls b/sc/qa/extras/testdocuments/PageBreaks.xls
index 2affd99ffda1..4e6ac0a42b59 100644
--- a/sc/qa/extras/testdocuments/PageBreaks.xls
+++ b/sc/qa/extras/testdocuments/PageBreaks.xls
Binary files differ
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++;
}