Hi!
I use the same TRVStyle for RichViewEdit, RVHEader and RVFooter of TSRichViewEdit (ExternalRVStyle, ExternalRVStyleHeader and ExternalRVStyleFooter).
If style A is only used by RVHEader and style B by RVFooter, TSRichViewEdit.RichViewEdit.DeleteUnusedStyles will delete all them. Is there way to change this behaviour? I need to every editor of TSRichViewEdit take into account which styles uses other editors.
Sharing styles between RichViewEdit, RVHEader and RVFooter
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 164
- Joined: Tue Nov 08, 2011 5:11 pm
What are some problems this could cause? Is it just management functions like DeleteUnusedStyles that are problematic? Or perhaps document editing via the visual component versus method calls?
If I have the styles set before document generation, never alter the styles during document generation, generate all document content via code, then save the RVF to stream, will there be problems?
I'm curious because I've always used the same style component generating RVF documents with headers and footers. I'll have to triple the number of style components I'm using across the entire project, and each of the new ones will simply be a duplicate of the existing ones.
If I have the styles set before document generation, never alter the styles during document generation, generate all document content via code, then save the RVF to stream, will there be problems?
I'm curious because I've always used the same style component generating RVF documents with headers and footers. I'll have to triple the number of style components I'm using across the entire project, and each of the new ones will simply be a duplicate of the existing ones.
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Well, I think DeleteUnusedStyles is the main problem.
Additionally, when reading RVF, when reading header/footer, styles are replaced. But since styles saved for header/footer will be the same as the main document, it should not be a problem.
Also, if StyleTemplates are used, styles are cleared before reading header/footer. This is a critical problem, because they cannot be restored. But it happens only if UseStyleTemplates=True.
Well, all these problems could be solved on the component level, I just do not think that this problem is too important.
Additionally, when reading RVF, when reading header/footer, styles are replaced. But since styles saved for header/footer will be the same as the main document, it should not be a problem.
Also, if StyleTemplates are used, styles are cleared before reading header/footer. This is a critical problem, because they cannot be restored. But it happens only if UseStyleTemplates=True.
Well, all these problems could be solved on the component level, I just do not think that this problem is too important.
-
- Posts: 164
- Joined: Tue Nov 08, 2011 5:11 pm
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: