summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWang Lei <leiw@apache.org>2012-11-09 06:08:19 +0000
committerWang Lei <leiw@apache.org>2012-11-09 06:08:19 +0000
commit55a169e50e09d6db1dad6a645ee0fe363909dae4 (patch)
treecf31e43dee49be13238b5c8d3f319a8d76e47036
parente59f5937c21cfb8c04e978447e47e8a4e677a8c3 (diff)
ReFix for #i119707 Cell border lost when saving and reopening the attached xls file.
Patch by: Zhang Lu Review by: Wang Lei
Notes
Notes: reject: see 7ca23c541b20b0538a89229c70a9041b90fbc2d4
-rw-r--r--sc/source/core/data/attarray.cxx5
-rw-r--r--sc/source/filter/excel/xetable.cxx4
2 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 6c267fb60f44..72fc50662ee9 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1933,8 +1933,9 @@ sal_Bool ScAttrArray::GetLastAttr( SCROW& rLastRow, SCROW nLastData ) const
while ( nStartPos > 0 && pData[nStartPos-1].nRow > nLastData &&
!pData[nStartPos].pPattern->IsVisible() )
--nStartPos;
-
- if(nStartPos >= 0 && pData[nStartPos].nRow > nLastData)
+ if(nStartPos == 0 && !pData[nStartPos].pPattern->IsVisible()) // add this condition for handle only default pattern in one colume
+ rLastRow = nLastData;
+ else if(nStartPos >= 0 && pData[nStartPos].nRow > nLastData)
{
bFound = sal_True;
rLastRow = pData[nStartPos].nRow;
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index d4c645b57f27..4cd1cdccb7ce 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2359,7 +2359,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) :
SCCOL nLastIterScCol = nMaxScCol;
SCROW nLastIterScRow = ulimit_cast< SCROW >( nLastUsedScRow + 128, nMaxScRow );
// modified for 119707 by zhanglu
- /*
+
SCCOL rEndColAtt = 0;
SCROW rEndRowAtt = 0;
rDoc.GetLastAttrCell( nScTab, rEndColAtt,rEndRowAtt ); // To get the real last cell's row number, which has visual data or attribute.
@@ -2368,7 +2368,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) :
if (nLastIterScRow > nMaxScRow)
nLastIterScRow = nMaxScRow;
- */
+
// modified for 119707 end
ScUsedAreaIterator aIt( &rDoc, nScTab, 0, 0, nLastIterScCol, nLastIterScRow );