Problem with parastyle and inserting from stream

General TRichView support forum. Please post your questions here
Post Reply
christophevigneault
Posts: 2
Joined: Fri Jul 31, 2015 1:28 pm

Problem with parastyle and inserting from stream

Post by christophevigneault »

I have a problem with merging text with parastyle in TRichViewEdit 15.7.1

I have a text A:


'{\rtf1\fbidis\ansi\ansicpg0\uc0\deff0\deflang0\deflangfe0{\fonttbl{\f0\fnil Arial;}}{\colortbl;\red0\green0\blue255;\red0\green0\blue128;\red128\green0\blue0;\red0\green128\blue0;\red0\green0\blue0;\red128\green128\blue128;}{\stylesheet{\s0\fi0\li0\ql\ri0\sb0\sa0 Paragraph Style;}{\s1\fi0\li0\qc\ri0\sb0\sa0 Centered;}{\s2\fi0\li0\ql\ri0\sb0\sa0 SignatureElectronique;}{\s3\fi0\li0\ql\ri0\sb0\sa0 SignatureElectroniqueEnvoye;}{\s4\fi0\li0\ql\ri0\sb0\sa0 Protected;}{\s5\fi0\li75\ql\ri0\brdrbtw\brdrl\brsp150\brdrs\brdrcf1\brdrw45\sb0\sa0 EmailReply;}{\s6\fi0\li0\ql\ri0\sb0\sa0 ReadOnlyNoReturn;}{\s7\fi0\li0\ql\ri0\sb0\sa0 ReadOnly;}{\*\cs8\f0\fs18\StyleNameNormal Normal;}{\*\cs9\f0\b\fs20\cf1\StyleNameHeading Heading;}{\*\cs10\f0\b\fs20\cf2\StyleNameSubheading Subheading;}{\*\cs11\f0\i\fs20\cf3\StyleNameKeywords Keywords;}{\*\cs12\f0\ul\fs20\cf4\StyleNameJump1 Jump 1;}{\*\cs13\f0\ul\fs20\cf4\StyleNameJump2 Jump 2;}{\*\cs14\f0\fs18\cf5\Protect\StyleNameProtected Protected;}{\*\cs15\f0\fs18\cf5\ProtectLocked\StyleNameProtectedLocked ProtectedLocked;}{\*\cs16\f0\strike\fs18\cf5\Protect\StyleNameStrikeOut StrikeOut;}{\*\cs17\f0\strike\fs18\cf5\ProtectLocked\StyleNameStrikeOutLocked StrikeOutLocked;}{\*\cs18\f0\fs18\cf5\Protect\StyleNameReadOnly ReadOnly;}{\*\cs19\f0\fs18\cf6\Protect\StyleNameVisitePlanifie VisitePlanifie;}}'#$D#$A#$D#$A#$D#$A'\pard\s0\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs18\cf5\StyleName AAAAAAAAAAAAAAAAAAA'#$D#$A'\par \plain \f0\fs18\cf5\StyleName BBBBBBBBBBBBBBBBB'#$D#$A'\par \plain \f0\fs18\cf5\StyleName CCCCCCCCCCCCCCC'#$D#$A'\par \plain \f0\fs18\cf5\StyleName DDDDDDDDDDDDDDD}'


That I want to merge with the text B:

'{\rtf1\fbidis\ansi\ansicpg0\uc0\deff0\deflang0\deflangfe0{\fonttbl{\f0\fnil Arial;}}{\colortbl;\red0\green0\blue255;\red0\green0\blue128;\red128\green0\blue0;\red0\green128\blue0;\red0\green0\blue0;\red128\green128\blue128;\red255\green153\blue204;}{\stylesheet{\s0\fi0\li0\ql\ri0\sb0\sa0 Paragraph Style;}{\s1\fi0\li0\qc\ri0\sb0\sa0 Centered;}{\s2\fi0\li0\ql\ri0\sb0\sa0 SignatureElectronique;}{\s3\fi0\li0\ql\ri0\sb0\sa0 SignatureElectroniqueEnvoye;}{\s4\fi0\li0\ql\ri0\sb0\sa0 Protected;}{\s5\fi0\li75\ql\ri0\brdrbtw\brdrl\brsp150\brdrs\brdrcf1\brdrw45\sb0\sa0 EmailReply;}{\s6\fi0\li0\ql\ri0\sb0\sa0 ReadOnlyNoReturn;}{\s7\fi0\li0\ql\ri0\sb0\sa0 ReadOnly;}{\*\cs8\f0\fs18\StyleNameNormal Normal;}{\*\cs9\f0\b\fs20\cf1\StyleNameHeading Heading;}{\*\cs10\f0\b\fs20\cf2\StyleNameSubheading Subheading;}{\*\cs11\f0\i\fs20\cf3\StyleNameKeywords Keywords;}{\*\cs12\f0\ul\fs20\cf4\StyleNameJump1 Jump 1;}{\*\cs13\f0\ul\fs20\cf4\StyleNameJump2 Jump 2;}{\*\cs14\f0\fs18\cf5\Protect\StyleNameProtected Protected;}{\*\cs15\f0\fs18\cf5\ProtectLocked\StyleNameProtectedLocked ProtectedLocked;}{\*\cs16\f0\strike\fs18\cf5\Protect\StyleNameStrikeOut StrikeOut;}{\*\cs17\f0\strike\fs18\cf5\ProtectLocked\StyleNameStrikeOutLocked StrikeOutLocked;}{\*\cs18\f0\fs18\cf5\Protect\StyleNameReadOnly ReadOnly;}{\*\cs19\f0\fs18\cf6\Protect\StyleNameVisitePlanifie VisitePlanifie;}}'#$D#$A#$D#$A#$D#$A'\pard\s2\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs18\cf7\StyleNameNormal ______________________'#$D#$A'\par \plain \f0\fs18\cf7\StyleNameNormal '#$D#$A'\par \plain \f0\fs18\cf7\StyleNameNormal signature'#$D#$A'\par \plain \f0\fs18\cf7\StyleNameNormal '#$D#$A'\par \plain \f0\fs18\cf7\StyleNameNormal ______________________}'


But when I merge the text A in the text B with InsertRTFFromStreamEd

It's giving me the text C:

'{\rtf1\fbidis\ansi\ansicpg0\uc0\deff0\deflang0\deflangfe0{\fonttbl{\f0\fnil Arial;}}{\colortbl;\red0\green0\blue255;\red0\green0\blue128;\red128\green0\blue0;\red0\green128\blue0;\red0\green0\blue0;\red128\green128\blue128;\red255\green153\blue204;}{\stylesheet{\s0\fi0\li0\ql\ri0\sb0\sa0 Paragraph Style;}{\s1\fi0\li0\qc\ri0\sb0\sa0 Centered;}{\s2\fi0\li0\ql\ri0\sb0\sa0 SignatureElectronique;}{\s3\fi0\li0\ql\ri0\sb0\sa0 SignatureElectroniqueEnvoye;}{\s4\fi0\li0\ql\ri0\sb0\sa0 Protected;}{\s5\fi0\li75\ql\ri0\brdrbtw\brdrl\brsp150\brdrs\brdrcf1\brdrw45\sb0\sa0 EmailReply;}{\s6\fi0\li0\ql\ri0\sb0\sa0 ReadOnlyNoReturn;}{\s7\fi0\li0\ql\ri0\sb0\sa0 ReadOnly;}{\*\cs8\f0\fs18\StyleNameNormal Normal;}{\*\cs9\f0\b\fs20\cf1\StyleNameHeading Heading;}{\*\cs10\f0\b\fs20\cf2\StyleNameSubheading Subheading;}{\*\cs11\f0\i\fs20\cf3\StyleNameKeywords Keywords;}{\*\cs12\f0\ul\fs20\cf4\StyleNameJump1 Jump 1;}{\*\cs13\f0\ul\fs20\cf4\StyleNameJump2 Jump 2;}{\*\cs14\f0\fs18\cf5\Protect\StyleNameProtected Protected;}{\*\cs15\f0\fs18\cf5\ProtectLocked\StyleNameProtectedLocked ProtectedLocked;}{\*\cs16\f0\strike\fs18\cf5\Protect\StyleNameStrikeOut StrikeOut;}{\*\cs17\f0\strike\fs18\cf5\ProtectLocked\StyleNameStrikeOutLocked StrikeOutLocked;}{\*\cs18\f0\fs18\cf5\Protect\StyleNameReadOnly ReadOnly;}{\*\cs19\f0\fs18\cf6\Protect\StyleNameVisitePlanifie VisitePlanifie;}}'#$D#$A#$D#$A#$D#$A'\pard\s0\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs18\cf5\StyleName AAAAAAAAAAAAAAAAAAA'#$D#$A'\par \plain \f0\fs18\cf5\StyleName BBBBBBBBBBBBBBBBB'#$D#$A'\par \plain \f0\fs18\cf5\StyleName CCCCCCCCCCCCCCC'#$D#$A'\par \plain \f0\fs18\cf5\StyleName DDDDDDDDDDDDDDD\plain \f0\fs18\cf7\StyleNameNormal ______________________'#$D#$A'\par \plain \f0\fs18\cf7\StyleNameNormal '#$D#$A'\par \plain \f0\fs18\cf7\StyleNameNormal signature'#$D#$A'\par \plain \f0\fs18\cf7\StyleNameNormal '#$D#$A'\par \plain \f0\fs18\cf7\StyleNameNormal ______________________}'


And you can see that my parastyle S2 is no longer linked with my text B

But my parastyle only a StyleName as an attribute.

Thanks !
Post Reply