WPCubed Product Support

numbering + paste numbering

WPTools version 6.13

Assume:

TWPRTFNumberingStyle* style(Editor->NumberStyles()->AddOutlineStyle(666, 1));
style->Style = wp_1;

TParagraph* p1(Editor->FirstPar);
p1->Insert(0, "one", Cardinal(0));
p1->ASet(WPAT_NumberSTYLE, style->ID);
p1->ASet(WPAT_NumberLEVEL, 1);

TParagraph* p2(p1->AppendNewPar(true));

TParagraph* p3(p2->AppendNewPar(true));
p3->Insert(0, "two", Cardinal(0));
p3->ASet(WPAT_NumberSTYLE, style->ID);
p3->ASet(WPAT_NumberLEVEL, 1);

Now, if I paste some numbering content from Word into p2, the numbering in p3 is restarted. So, is there something I'm missing here?

Regards
patrik.nyborg(a)genicore.se

#1 ♥ 0
5.3k Views 2 users read 2 min
support

Hi,

If you paste numbering from Word you change the numbering groups. A different group will restart the numbering of the first group if both use the same level.

It should work if the pasted text uses a deeper level (>1)

Julian

#2 ♥ 0

Is it possible to save the current numbering values for all levels before the paste and restore them afterwards?

It should work if the pasted text uses a deeper level (>1)

Is it possible to transform the incoming number information on the fly to accomplish this?

Regards
patrik.nyborg(a)genicore.se

#3 ♥ 0
support

Hi,

There is a BeforePaste event. It would be ideal to apply the current numbering to the text.

Julian

#4 ♥ 0

It should work if the pasted text uses a deeper level (>1)

Ok, if I just increase the level (ignoring the fact that I have to shift the properties of the numberstyles in the group upwards) to some unused level everything looks ok... until the user decides to press the SelPriorLevel button...

Why on earth can one group mess with the numbering of another group?

Regards
patrik.nyborg(a)genicore.se

#5 ♥ 0
This category is archived. No new posts are possible.