Am 17.01.2010 01:31, schrieb Vincent van Ravesteijn:

It should, but in the latex output routine, the recognition of the
multirow part cells fail.

How do you recognize them ?

I just found a mistake in my routine where I ask if the cells are part of a 
multirow.

I guess that if you select three cells to become one, this line glues
all the content of the three cells together and puts this in your new
multirow cell.

This seems to be my thinko - I cannot use this routine to merge
multirows. I'll have a closer look on this issue.

Yes, this is the problem. The appendParagraphs mroutine is defined in 
InsetText.cpp:

void InsetText::appendParagraphs(ParagraphList & plist)
{
        // There is little we can do here to keep track of changes.
        // As of 2006/10/20, appendParagraphs is used exclusively by
        // LyXTabular::setMultiColumn. In this context, the paragraph break
        // is lost irreversibly and the appended text doesn't really change

        ParagraphList & pl = paragraphs();

        ParagraphList::iterator pit = plist.begin();
        ParagraphList::iterator ins = pl.insert(pl.end(), *pit);
        ++pit;
        mergeParagraph(buffer().params(), pl,
                       distance(pl.begin(), ins) - 1);

        for_each(pit, plist.end(),
                 bind(&ParagraphList::push_back, ref(pl), _1));
}


The problem is that this routine fails for multirows:
Assume this table

a b c
e f g
i j k

by setting cell "e" and "i" a a multirow, appendParagraphs leads to this cell 
content
"efgi"
but I need
"ei".

The problem is that appendParagraphs counts the paragraphs from left o right and I need to count from them from top to bottom. I know now the problem but are not familiar with the paragraph code. I cannot figure out how to write a routine that does what I need. Our code is often not documented and lines like

for_each(pit, plist.end(),
                 bind(&ParagraphList::push_back, ref(pl), _1));

makes me headache since I'm only a hobby programmer and not a professional one.

Can you perhaps help me here?

thanks again and regards
Uwe

Reply via email to