Why when loading RTF the RTF style was created not correctly?
I explain.
Check this RTF example :
------------------------------------------------------------
{\rtf1\ansi\ansicpg0\uc0\deff0\deflang0\deflangfe0{\fonttbl{\f0\fnil Arial;}{\f1\fnil ms sans serif;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\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 Protected;}{\s3\fi0\li75\ql\ri0\brdrbtw\brdrl\brsp150\brdrs\brdrcf2\brdrw45\sb0\sa0 EmailReply;}{\s4\fi0\li0\ql\ri0\sb0\sa0 ReadOnlyNoReturn;}{\s5\fi0\li0\ql\ri0\sb0\sa0 ReadOnly;}{\*\cs6\f0\fs16 Normal;}{\*\cs7\f0\b\fs20\cf2 Heading;}{\*\cs8\f0\b\fs20\cf9 Subheading;}{\*\cs9\f0\i\fs20\cf13 Keywords;}{\*\cs10\f0\ul\fs20\cf11 Jump 1;}{\*\cs11\f0\ul\fs20\cf11 Jump 2;}{\*\cs12\f0\fs20\cf1 Protected;}{\*\cs13\f0\fs20\cf1 ProtectedLocked;}{\*\cs14\f0\strike\fs20\cf1 StrikeOut;}{\*\cs15\f0\strike\fs20\cf1 StrikeOutLocked;}{\*\cs16\f0\fs20\cf1 ReadOnly;}{\*\cs17\f0\fs20\cf6 NoStyle;}{\*\cs18\f0\fs20\cf1 VisitePlanifie;}}
\pard\s0\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f1\fs16 Test
\par
\par \plain \cs18\f0\fs20\cf1 protect zone
\par protect zone
\par protect zone
\par \plain \f1\fs16
\par
\par Test\par}
------------------------------------------------------------
The "Protect zone" text is in style cs18 and her name is "VisitePlanifie", but on loading, the text style of this item is not "VisitePlanifie" it's "Font Style"
RTF Style not load correctly
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
RVStyle.TextStyles and RVStyle.ParaStyles are not real styles. While there is an option to create RTF stylesheet basing on these properties, it cannot be loaded back from RTF to RVStyle.TextStyles and RVStyle.ParaStyles (it would be possible for a very limited kinds of RTF stylesheets).
If you want to use real styles, like in MS Word, use RVStyle.StyleTemplates (and ignore names of items of RVStyle.TextStyles and RVStyle.ParaStyles)
If you want to use real styles, like in MS Word, use RVStyle.StyleTemplates (and ignore names of items of RVStyle.TextStyles and RVStyle.ParaStyles)