Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » patch ParseRTF, Add cell background colors
patch ParseRTF, Add cell background colors [message #44544] Thu, 26 March 2015 19:50 Go to next message
omari is currently offline  omari
Messages: 264
Registered: March 2010
Experienced Member
Hi,


1 - CtrlCore/ParseRTF.cpp, line 1260, insert this lines:

	else if(PassQ("clcfpat")) {
		if(command_arg >= 0 && command_arg < color_table.GetCount())
			CellInfoAt(ts.stylecol).format.backcolor = color_table[command_arg];
	}


2 - RichText/Table.h , line 10, insert this line:
		Color    backcolor;


3 - RichText/TableCell.cpp

at line 18, initialize backcolor:

	backcolor = White;


and at line 144, in DrawCell()

replace "color" by "backcolor" :
	w.DrawRect(l + border.left, y + border.top,
	           r - l - border.left - border.right, yy - y - border.top - border.bottom,
	           format.color);

by

	w.DrawRect(l + border.left, y + border.top,
	           r - l - border.left - border.right, yy - y - border.top - border.bottom,
	           format.backcolor);



regards
omari.

[Updated on: Thu, 26 March 2015 19:51]

Report message to a moderator

Re: patch ParseRTF, Add cell background colors [message #44873 is a reply to message #44544] Sun, 12 July 2015 09:45 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I am not quite sure what is this patch supposed to mean - overall it looks like renaming 'color' to 'backcolor' ('color' was always cell background color).
Previous Topic: Clipboard: "RTF" before "IMAGES" format, patch provided
Next Topic: Uword example: Save icon enabled only if file changed
Goto Forum:
  


Current Time: Thu Apr 18 22:16:57 CEST 2024

Total time taken to generate the page: 0.01624 seconds