filehandling/richtexttohtmlconverter/inc/HTMLDEFS.H
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __RICH_TEXT_2_HTML_TAGS_H_
       
    17 #define __RICH_TEXT_2_HTML_TAGS_H_
       
    18 
       
    19 // consts for HTML tags
       
    20 const TInt KTwipsToBlockQuote			= 1440;	//
       
    21 const TInt KHtmlTwipsToHeight			= 72;	// 
       
    22 const TInt KHtmlTwipsToHeightBaseAdjust	= 30;	// Assigned by trial & error
       
    23 const TInt KHtmlMaxFontSize				= 7;
       
    24 
       
    25 // codes for HTML reserved characters
       
    26 #define KLessThan					'<'
       
    27 #define KGreaterThan				'>'
       
    28 #define KAmpersand					'&'
       
    29 
       
    30 _LIT8(KHtmlLessThan, "&lt;");
       
    31 _LIT8(KHtmlGreaterThan, "&gt;");
       
    32 _LIT8(KHtmlAmpersand, "&amp;");
       
    33 
       
    34 #define KCRLF						"\x0d\x0a"
       
    35 
       
    36 // Tagsville...
       
    37 // Meta markup tags
       
    38 _LIT8(KHTMLDocType32,		"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\x0d\x0a");
       
    39 _LIT8(KHtmlStartTag,			"<HTML> \x0d\x0a");
       
    40 _LIT8(KHtmlEndTag,			"</HTML> \x0d\x0a");
       
    41 _LIT8(KHtmlHeadStartTag,		"<HEAD> \x0d\x0a");
       
    42 _LIT8(KHtmlHeadEndTag,		"</HEAD> \x0d\x0a");
       
    43 _LIT8(KHTMLHeadMetaGenTag,	"<META NAME=\"generator\" CONTENT=\"rt2html converter\">\x0d\x0a");
       
    44 #ifdef _UNICODE
       
    45 	_LIT8(KHTMLMetaCharSetUTF8,	"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">");
       
    46 #endif // _UNICODE
       
    47 _LIT8(KHTMLHeadTitleStartTag, "<TITLE>");
       
    48 _LIT8(KHTMLHeadTitleEndTag,	 "</TITLE>\x0d\x0a");
       
    49 _LIT8(KHtmlBodyStartTag,		 "<BODY BGCOLOR=\"#%+02x%+02x%+02x\" TEXT=\"#%+02x%+02x%+02x\">\x0d\x0a");
       
    50 _LIT8(KHtmlBodyEndTag,		 "</BODY>\x0d\x0a");
       
    51 
       
    52 _LIT8(KHtmlFontSizeStart,	 "<FONT SIZE=%d>");
       
    53 _LIT8(KHtmlFontColourStart,	 "<FONT COLOR=\"#%+02x%+02x%+02x\">");
       
    54 //
       
    55 _LIT8(KHtmlFontStartClrNSize, "<FONT SIZE=%d COLOR=\"#%+02x%+02x%+02x\">");
       
    56 //
       
    57 _LIT8(KHtmlFontEnd,			 "</FONT>");
       
    58 _LIT8(KHtmlBoldStart,		 "<B>");
       
    59 _LIT8(KHtmlBoldEnd,			 "</B>");
       
    60 _LIT8(KHtmlUnderlineStart,	 "<U>");
       
    61 _LIT8(KHtmlUnderlineEnd,		 "</U>");
       
    62 _LIT8(KHtmlItalicStart,		 "<I>");
       
    63 _LIT8(KHtmlItalicEnd,		 "</I>");
       
    64 _LIT8(KHtmlStrikeoutStart,	 "<S>") ;
       
    65 _LIT8(KHtmlStrikeoutEnd,		 "</S>");
       
    66 _LIT8(KHtmlSuperscriptStart,	 "<SUP>");
       
    67 _LIT8(KHtmlSuperscriptEnd,	 "</SUP>");
       
    68 _LIT8(KHtmlSubscriptStart,	 "<SUB>");
       
    69 _LIT8(KHtmlSubscriptEnd,		 "</SUB>");
       
    70 _LIT8(KHtmlTeletypeStart,     "<TT>");
       
    71 _LIT8(KHtmlTeletypeEnd,	     "</TT>");
       
    72 
       
    73 // Paragraph level formatting
       
    74 _LIT8(KHtmlDivAlignNoneStart,		"<DIV>");
       
    75 _LIT8(KHtmlDivAlignCentreStart,		"<DIV ALIGN=CENTER>");
       
    76 _LIT8(KHtmlDivAlignLeftStart,		"<DIV ALIGN=LEFT>");
       
    77 _LIT8(KHtmlDivAlignRightStart,		"<DIV ALIGN=RIGHT>");
       
    78 _LIT8(KHtmlDivAlignJustifyStart,	"<DIV ALIGN=JUSTIFIED>");
       
    79 _LIT8(KHtmlDivEnd,			"</DIV> \x0d\x0a");
       
    80 _LIT8(KHtmlDivBlankEnd,		"&nbsp;</DIV>");
       
    81 _LIT8(KHtmlDivBlank,			"<DIV>&nbsp;</DIV>");
       
    82 _LIT8(KHtmlParagraphEnd,			"</P> \x0d\x0a");
       
    83 _LIT8(KHtmlBulletListStart,		"<UL>");
       
    84 _LIT8(KHtmlBulletListEnd,		"\x0d\x0a</UL>\x0d\x0a");
       
    85 _LIT8(KHtmlBulletListPointStart, "\x0d\x0a<LI>");
       
    86 _LIT8(KHtmlBulletListPointEnd, "</DIV></LI>");
       
    87 _LIT8(KHtmlBlockquoteStart,		"<BLOCKQUOTE>");
       
    88 _LIT8(KHtmlBlockquoteEnd,		"</BLOCKQUOTE>");
       
    89 
       
    90 _LIT8(KHtmlLineBreak,		 "<BR>");
       
    91 _LIT8(KHtmlFailedEmbedTag,	 "<FONT COLOR=\"red\" size=7>X</FONT>");
       
    92 
       
    93 #endif // __RICH_TEXT_2_HTML_TAGS_H_