You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2002/04/11 08:44:15 UTC
cvs commit: embperl/test/html/rtf rtfbasic.asc rtfmeta.asc
richter 02/04/10 23:44:15
Modified: . Tag: Embperl2c eputil.c
Embperl/Syntax Tag: Embperl2c EmbperlBlocks.pm RTF.pm
test/cmp Tag: Embperl2c pod.asc.htm.win32 pod.asc.win32
pod.asc.xalan.htm.win32 rtfbasic.asc
test/html/rtf Tag: Embperl2c rtfbasic.asc rtfmeta.asc
Log:
rtf fixes
Revision Changes Path
No revision
No revision
1.15.4.52 +13 -15 embperl/eputil.c
Index: eputil.c
===================================================================
RCS file: /home/cvs/embperl/eputil.c,v
retrieving revision 1.15.4.51
retrieving revision 1.15.4.52
diff -u -r1.15.4.51 -r1.15.4.52
--- eputil.c 14 Mar 2002 15:29:07 -0000 1.15.4.51
+++ eputil.c 11 Apr 2002 06:44:14 -0000 1.15.4.52
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: eputil.c,v 1.15.4.51 2002/03/14 15:29:07 richter Exp $
+# $Id: eputil.c,v 1.15.4.52 2002/04/11 06:44:14 richter Exp $
#
###################################################################################*/
@@ -385,40 +385,38 @@
EPENTRY (TransHtml) ;
- if (r -> Component.Config.nInputEscMode == iescNone)
+ if (bInUrl == 16)
{
-#if PERL_VERSION < 5
- /* Just remove CR for raw input for perl 5.004 */
+ /* Just remove \ for rtf */
if (nLen == 0)
nLen = strlen (sData) ;
e = sData + nLen ;
while (p < e)
{
- if (*p == '\r')
- *p = ' ' ;
+ if (*p == '\\' && p[1] != '\0')
+ *p++ = ' ' ;
p++ ;
}
-#endif
return nLen ;
}
-
-#ifdef EP2
- if (bInUrl == 16)
+
+ if (r -> Component.Config.nInputEscMode == iescNone)
{
- /* Just remove \ for rtf */
+#if PERL_VERSION < 5
+ /* Just remove CR for raw input for perl 5.004 */
if (nLen == 0)
nLen = strlen (sData) ;
e = sData + nLen ;
while (p < e)
{
- if (*p == '\\' && p[1] != '\0')
- *p++ = ' ' ;
+ if (*p == '\r')
+ *p = ' ' ;
p++ ;
}
+#endif
return nLen ;
}
-#endif
-
+
s = NULL ;
if (nLen == 0)
nLen = strlen (sData) ;
No revision
No revision
1.1.2.24 +5 -4 embperl/Embperl/Syntax/Attic/EmbperlBlocks.pm
Index: EmbperlBlocks.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/EmbperlBlocks.pm,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -u -r1.1.2.23 -r1.1.2.24
--- EmbperlBlocks.pm 27 Feb 2002 08:19:43 -0000 1.1.2.23
+++ EmbperlBlocks.pm 11 Apr 2002 06:44:14 -0000 1.1.2.24
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: EmbperlBlocks.pm,v 1.1.2.23 2002/02/27 08:19:43 richter Exp $
+# $Id: EmbperlBlocks.pm,v 1.1.2.24 2002/04/11 06:44:14 richter Exp $
#
###################################################################################
@@ -43,18 +43,19 @@
sub new
{
- my $self = shift ;
+ my $self = shift ;
+ my $exchange = shift ;
$self = Embperl::Syntax::new ($self) ;
if (!$self -> {-epbBlocks})
{
- $self -> {-epbBlocks} = $self -> CloneHash ({ %Blocks, %BlocksOutput }) ;
+ $self -> {-epbBlocks} = $self -> CloneHash ({ %Blocks, %BlocksOutput }, ref $exchange?$exchange:undef) ;
$self -> {-epbBlocksLink} = $self -> CloneHash ({ %Blocks, %BlocksOutputLink }, { 'unescape' => 2 }) ;
$self -> AddToRoot ($self -> {-epbBlocks}) ;
- Init ($self) ;
+ Init ($self, ref $exchange?$exchange:undef) ;
}
return $self ;
1.1.2.25 +42 -36 embperl/Embperl/Syntax/Attic/RTF.pm
Index: RTF.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/RTF.pm,v
retrieving revision 1.1.2.24
retrieving revision 1.1.2.25
diff -u -r1.1.2.24 -r1.1.2.25
--- RTF.pm 27 Jan 2002 20:04:36 -0000 1.1.2.24
+++ RTF.pm 11 Apr 2002 06:44:14 -0000 1.1.2.25
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: RTF.pm,v 1.1.2.24 2002/01/27 20:04:36 richter Exp $
+# $Id: RTF.pm,v 1.1.2.25 2002/04/11 06:44:14 richter Exp $
#
###################################################################################
@@ -46,7 +46,7 @@
{
my $self = shift ;
- $self = Embperl::Syntax::EmbperlBlocks::new ($self, 1) ;
+ $self = Embperl::Syntax::EmbperlBlocks::new ($self, { 'unescape' => 17 }) ;
if (!$self -> {-rtfBlocks})
{
@@ -55,7 +55,8 @@
my $v ;
my $ebesc = $self -> CloneHash ($eb, { 'unescape' => 17 }) ;
-
+ $self -> {-root} = $self -> CloneHash ($self -> {-root}, { 'unescape' => 17 }) ;
+
while (($k, $v) = each %$ebesc)
{
$Block{$k} = $v ;
@@ -393,7 +394,9 @@
{
my $var = shift ;
+ $var =~ s/(\r|\n)//g ; # variablename can contain \r and/or \n !!!
my @parts = split (/\./, $var) ;
+ return '' if (!@parts) ;
my $code = '$param[$_ep_rtf_ndx]' ;
foreach (@parts)
@@ -412,7 +415,7 @@
'-lsearch' => 1,
'Varname' =>
{
- 'contains' => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789.',
+ 'contains' => "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789.\r\n",
#'inside' => \%Varseparator,
#'inside' => \%Varinside,
'cdatatype' => ntypTag,
@@ -428,13 +431,45 @@
{
text => '\\\\*',
'cdatatype' => 0,
- 'contains' => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789.',
+ 'contains' => "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789.\r\n",
},
) ;
%Inside = () ;
+
+%ParaBlockInside = (
+ '-lsearch' => 1,
+ 'RTF block' => {
+ 'text' => '{',
+ 'end' => '}',
+ 'nodename' => '!:{:::}',
+ 'nodetype' => ntypStartEndTag,
+ 'cdatatype' => ntypCDATA,
+ 'removespaces' => 0,
+ 'inside' => \%ParaBlockInside,
+ 'procinfo' => {
+ 'embperl' => {
+ },
+ },
+ },
+ 'RTF field' => {
+ 'text' => '{\field',
+ 'end' => '}',
+ 'nodename' => '!:{:::}',
+ 'nodetype' => ntypStartEndTag,
+ #'cdatatype' => ntypAttrValue,
+ 'insidemustexist' => 1,
+ 'inside' => \%FieldStart,
+ 'procinfo' => {
+ 'embperl' => {
+ },
+ },
+ },
+ ) ;
+
+
# Start of commands
%CmdStart = (
@@ -448,7 +483,7 @@
#'cdatatype' => ntypCDATA,
#'cdatatype' => ntypAttrValue,
'nodename' => '!:',
- 'inside' => {},
+ 'inside' => {%ParaBlockInside,},
'procinfo' => {
'embperl' => {
compiletimeperlcodeend => q[ $Embperl::req -> component -> code ('') if (!$_ep_rtf_inside || $_ep_rtf_cmd) ; $_ep_rtf_cmd = 0 ;],
@@ -471,6 +506,7 @@
},
},
},
+
) ;
# Field start and end
@@ -505,36 +541,6 @@
},
) ;
-
-%ParaBlockInside = (
- '-lsearch' => 1,
- 'RTF block' => {
- 'text' => '{',
- 'end' => '}',
- 'nodename' => '!:{:::}',
- 'nodetype' => ntypStartEndTag,
- 'cdatatype' => ntypCDATA,
- 'removespaces' => 0,
- 'inside' => \%ParaBlockInside,
- 'procinfo' => {
- 'embperl' => {
- },
- },
- },
- 'RTF field' => {
- 'text' => '{\field',
- 'end' => '}',
- 'nodename' => '!:{:::}',
- 'nodetype' => ntypStartEndTag,
- #'cdatatype' => ntypAttrValue,
- 'insidemustexist' => 1,
- 'inside' => \%FieldStart,
- 'procinfo' => {
- 'embperl' => {
- },
- },
- },
- ) ;
=pod
'RTF first paragraph' => {
No revision
No revision
1.1.2.2 +3 -0 embperl/test/cmp/Attic/pod.asc.htm.win32
Index: pod.asc.htm.win32
===================================================================
RCS file: /home/cvs/embperl/test/cmp/Attic/pod.asc.htm.win32,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- pod.asc.htm.win32 5 Mar 2002 10:56:07 -0000 1.1.2.1
+++ pod.asc.htm.win32 11 Apr 2002 06:44:15 -0000 1.1.2.2
@@ -92,6 +92,9 @@
<p>end</p>
<p><a href="test">test</a> <a href="yyy">xxx</a> <a href="http://www.ecos.de">http://www.ecos.de</a> <a href="ftp://ftp.dev.ecos.de">ftp://ftp.dev.ecos.de</a>
<a href="test">test</a> <a href="yyy 2">xxx 2</a> <a href="http://www.ecos.de">http://www.ecos.de</a> <a href="ftp://ftp.dev.ecos.de">ftp://ftp.dev.ecos.de</a></p>
+<h1>ID Test head1</h1>
+<h2>ID Test head2</h2>
+<p>ID Test para</p>
</body>
</html>
1.1.2.2 +3 -0 embperl/test/cmp/Attic/pod.asc.win32
Index: pod.asc.win32
===================================================================
RCS file: /home/cvs/embperl/test/cmp/Attic/pod.asc.win32,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- pod.asc.win32 5 Mar 2002 10:56:07 -0000 1.1.2.1
+++ pod.asc.win32 11 Apr 2002 06:44:15 -0000 1.1.2.2
@@ -78,5 +78,8 @@
<para><xlink>test</xlink> <xlink uri="yyy">xxx</xlink> <xlink>http://www.ecos.de</xlink> <xlink>ftp://ftp.dev.ecos.de</xlink>
<xlink>test</xlink> <xlink uri="yyy 2">xxx 2</xlink> <xlink>http://www.ecos.de</xlink> <xlink>ftp://ftp.dev.ecos.de</xlink></para>
+</sect2></sect1><sect1><title id="idhead1">ID Test head1</title>
+<sect2><title id="idhead2">ID Test head2</title>
+<para id="idpara">ID Test para</para>
</sect2></sect1></pod>
1.1.2.2 +3 -0 embperl/test/cmp/Attic/pod.asc.xalan.htm.win32
Index: pod.asc.xalan.htm.win32
===================================================================
RCS file: /home/cvs/embperl/test/cmp/Attic/pod.asc.xalan.htm.win32,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- pod.asc.xalan.htm.win32 5 Mar 2002 10:56:07 -0000 1.1.2.1
+++ pod.asc.xalan.htm.win32 11 Apr 2002 06:44:15 -0000 1.1.2.2
@@ -42,6 +42,9 @@
<br/>
<p><a href="test">test</a> <a href="yyy">xxx</a> <a href="http://www.ecos.de">http://www.ecos.de</a> <a href="ftp://ftp.dev.ecos.de">ftp://ftp.dev.ecos.de</a>
<a href="test">test</a> <a href="yyy 2">xxx 2</a> <a href="http://www.ecos.de">http://www.ecos.de</a> <a href="ftp://ftp.dev.ecos.de">ftp://ftp.dev.ecos.de</a></p>
+<h1>ID Test head1</h1>
+<h2>ID Test head2</h2>
+<p>ID Test para</p>
</body>
</html>
1.1.2.7 +4 -0 embperl/test/cmp/Attic/rtfbasic.asc
Index: rtfbasic.asc
===================================================================
RCS file: /home/cvs/embperl/test/cmp/Attic/rtfbasic.asc,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- rtfbasic.asc 10 Sep 2001 10:06:09 -0000 1.1.2.6
+++ rtfbasic.asc 11 Apr 2002 06:44:15 -0000 1.1.2.7
@@ -25,6 +25,9 @@
{pass this thru: }{\field{\*\fldinst { PAGE \\* MERGEFORMAT }}{\fldrslt {\lang1024\langfe1024\noproof 1}}}
+{pass this thru as hyperlink: }{\field\flddirty{\*\fldinst {\f1\fs22 HYPERLINK "mailto:wullenweber@komrp.de" }{\f1\fs22 {\*\datafield
+00d0c9ea79f9bace118c8200aa004ba90b020000001700000015000000770075006c006c0065006e007700650062006500720040006b006f006d00720070002e00640065000000e0c9ea79f9bace118c8200aa004ba90b380000006d00610069006c0074006f003a00770075006c006c0065006e0077006500620065007200
+40006b006f006d00720070002e00640065000000000000}}}{\fldrslt {\f1\fs22 wullenweber@komrp.de}}}
{ Here we have some spaces: } { } { ok }
@@ -34,6 +37,7 @@
{1}{ }{���}
+{onCRLFe: }{1}
}
}
No revision
No revision
1.1.2.10 +6 -1 embperl/test/html/rtf/Attic/rtfbasic.asc
Index: rtfbasic.asc
===================================================================
RCS file: /home/cvs/embperl/test/html/rtf/Attic/rtfbasic.asc,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -r1.1.2.9 -r1.1.2.10
--- rtfbasic.asc 10 Sep 2001 10:06:09 -0000 1.1.2.9
+++ rtfbasic.asc 11 Apr 2002 06:44:15 -0000 1.1.2.10
@@ -25,7 +25,9 @@
{pass this thru: }{\field{\*\fldinst { PAGE \\* MERGEFORMAT }}{\fldrslt {\lang1024\langfe1024\noproof 1}}}
-
+{pass this thru as hyperlink: }{\field\flddirty{\*\fldinst {\f1\fs22 HYPERLINK "mailto:wullenweber@komrp.de" }{\f1\fs22 {\*\datafield
+00d0c9ea79f9bace118c8200aa004ba90b020000001700000015000000770075006c006c0065006e007700650062006500720040006b006f006d00720070002e00640065000000e0c9ea79f9bace118c8200aa004ba90b380000006d00610069006c0074006f003a00770075006c006c0065006e0077006500620065007200
+40006b006f006d00720070002e00640065000000000000}}}{\fldrslt {\f1\fs22 wullenweber@komrp.de}}}
{ Here we have some spaces: } { } { ok }
@@ -33,6 +35,9 @@
{ Here we have some spaces: } { } { ok }
{\field{\*\fldinst {MERGEFIELD one}}{\fldrslt {\b\f1\fs80\lang1024 ----}}}{ }{\field{\*\fldinst {MERGEFIELD uml}}{\fldrslt {\b\f1\fs80\lang1024 ----}}}
+
+{onCRLFe: }{\field{\*\fldinst { DOCVARIABLE on
+e \\* MERGEFORMAT }}{\fldrslt }}
}
}
1.1.2.3 +1 -1 embperl/test/html/rtf/Attic/rtfmeta.asc
Index: rtfmeta.asc
===================================================================
RCS file: /home/cvs/embperl/test/html/rtf/Attic/rtfmeta.asc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- rtfmeta.asc 10 Sep 2001 10:06:09 -0000 1.1.2.2
+++ rtfmeta.asc 11 Apr 2002 06:44:15 -0000 1.1.2.3
@@ -1,6 +1,6 @@
{\rtf1
{[$ if $param[$_ep_rtf_ndx]{'adressen_name'} ne $lastnr $]}
-{[+ "l=$lastnr, p=$param[$_ep_rtf_ndx]{'adressen_name'}" +][- $lastnr = $param[$_ep_rtf_ndx]{'adressen_name'} -]}
+{[+ "l=$lastnr, p=$param[$_ep_rtf_ndx]{'adressen_name'}" +][- $lastnr = $param[$_ep_rtf_ndx]\{'adressen_name'\} -]}
{ Sehr }
{\field{\*\fldinst { IF }{\field{\*\fldinst { MERGEFIELD adressen_anrede }}{\fldrslt {\lang1024 Herr}}}{ = "Herr" "geehrter" "geehrte" }}{\fldrslt {\lang1024 geehrter}}}
{ }
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org