[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: Diff for join (was Re: Proposal for new table-implementation in KWord)
From: Nash Hoogwater <nrhoogwater () planet ! nl>
Date: 2001-10-17 6:41:41
[Download RAW message or body]
OK, new try :-). I did the joinCells method. There is still a bug in the
displaying of the table after a join because the lines are exactly in one
line, but when you move the table a bit, this will disappear. I also think
there is another bug somewhere, because I had once a total **ckup of the
table after a second join, but this wasn't reproducable. As far as I could
see then it had to do with a reference to a frame that didn't exist anymore
:-(.
Well I still don't know if this is what you want, but as far as I can see, it
works. Splitting will be harder :-).
Nash
On Tuesday 16 October 2001 12:10, Thomas Zander wrote:
> On Tue, Oct 16, 2001 at 11:38:04AM +0200, Nash Hoogwater wrote:
> > Hi Thomas,
> >
> > Well I looked at the code for join, but all I did was reinstating (I
> > think) the commented code (see attachment) and it worked. I kinda have
> > the feeling that I'm missing the point on "the new style" :-(...
> >
> > Cheers,
> >
> > Nash
> >
> > <- snip ->
>
> The new style does positioning differently. Instead of using the
> positioning of the cells I not register the position of the rows and
> columns in a list of doubles.
>
> The positioning of an individual cell is then done in the method
> position();
>
> The thing that has to be added is that the m_colPositions and
> m_rowPositions have to be updated.
>
> Its pretty hairy code, so I can imagine you have real problems with this.
> Tell me if you don't understand this stuff, we can find another nice thing
> for you to do ;)
["join.diff" (text/x-diff)]
306,307c306,307
< if(activeCell->getFrame(0)->right() - activeCell->rightBorder() !=
< m_colPositions[activeCell->m_col + activeCell->m_cols]) { // right border moved
---
> if(activeCell->getFrame(0)->right() - activeCell->rightBorder() !=
> m_colPositions[activeCell->m_col + activeCell->m_cols-1]) { // right border moved
330d329
< last=colPos;
332,333d330
< redrawFromCol=col;
< if(col>0) redrawFromCol--;
334a332,333
> redrawFromCol=col;
> if(col>0) redrawFromCol--;
366,367c365,367
< if(activeCell->getFrame(0)->bottom() - activeCell->bottomBorder() !=
< getPositionOfRow(activeCell->m_row + activeCell->m_rows)) { // bottom moved
---
>
> if(activeCell->getFrame(0)->bottom() - activeCell->bottomBorder() !=
> getPositionOfRow(activeCell->m_row + activeCell->m_rows)) { // bottom moved
420c420
< pageBottom = pageNumber * m_doc->ptPaperHeight() - m_doc->ptBottomBorder();
---
> pageBottom = pageNumber * m_doc->ptPaperHeight() - m_doc->ptBottomBorder();
990c990
< }
---
> }
1074,1076c1074,1077
< kdDebug() << "bottom1" << getCell(rowEnd, colBegin)->getFrame(0)->bottom() << endl;
< //double bottom=getCell(rowEnd, colBegin)->getFrame(0)->bottom();
< kdDebug() << "right1: " << getCell(rowEnd, colEnd)->getFrame(0)->right() << endl;
---
>
> //kdDebug() << "bottom1" << getCell(rowEnd, colBegin)->getFrame(0)->bottom() << endl;
> // double bottom=getCell(rowEnd, colBegin)->getFrame(0)->bottom();
> //kdDebug() << "right1: " << getCell(rowEnd, colEnd)->getFrame(0)->right() << endl;
1079a1081
>
1098a1101
>
1107c1110,1111
< firstCell->getFrame(0)->updateResizeHandles();
---
> firstCell->getFrame(0)->removeResizeHandles();
> // firstCell->getFrame(0)->updateResizeHandles();
1730c1734
< double KWTableFrameSet::Cell::leftBorder() {
---
> double KWTableFrameSet::Cell::leftBorder() {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic