changeset 26934:1771bed38482

Remove some formats from the list of supported formats (bug #55906) * print.m (doc): Remove cdr, corel, aifm, ill, cgm and dxf from the list of supported formats. * __print_poase_opts__.m: Warn when one of the above formats is requested.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Fri, 15 Mar 2019 22:34:55 +0100
parents b6ac4615214f
children d17eecaf4a14
files NEWS scripts/plot/util/print.m scripts/plot/util/private/__opengl_print__.m scripts/plot/util/private/__print_parse_opts__.m
diffstat 4 files changed, 15 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Mon Mar 18 12:58:09 2019 +0100
+++ b/NEWS	Fri Mar 15 22:34:55 2019 +0100
@@ -31,6 +31,10 @@
   Matlab compatible.  If necessary use the `"-loose"` option to
   reproduce figures as they appeared in previous versions of Octave.
 
+- The following print devices are no more officially supported: cdr, corel,
+  aifm, ill, cgm, hpgl, mf and dxf.  A warning will be thrown when using
+  those devices and the actual code for supporting those formats will eventually
+  be removed from a future version of Octave. 
 
 ### Matlab compatibility
 
--- a/scripts/plot/util/print.m	Mon Mar 18 12:58:09 2019 +0100
+++ b/scripts/plot/util/print.m	Fri Mar 15 22:34:55 2019 +0100
@@ -217,7 +217,7 @@
 ## @itemx -F@var{fontname}:@var{size}
 ## @itemx -F:@var{size}
 ##   Use @var{fontname} and/or @var{fontsize} for all text.
-## @var{fontname} is ignored for some devices: dxf, fig, hpgl, etc.
+## @var{fontname} is ignored for some devices: fig, etc.
 ##
 ## @item -d@var{device}
 ##   The available output format is specified by the option @var{device}, and
@@ -299,16 +299,6 @@
 ##   @item canvas*
 ##     Javascript-based drawing on an HTML5 canvas viewable in a web browser.
 ##
-##   @item  cdr*
-##   @itemx @nospell{corel*}
-##     CorelDraw
-##
-##   @item cgm*
-##     Computer Graphics Metafile, Version 1, ANSI X3.122-1986
-##
-##   @item dxf
-##     AutoCAD
-##
 ##   @item  emf
 ##   @itemx meta
 ##     Microsoft Enhanced Metafile
@@ -319,20 +309,10 @@
 ## whether the special flag should be set for the text in the figure.
 ## (default is @option{-textnormal})
 ##
-##   @item hpgl
-##     HP plotter language
-##
-##   @item  ill
-##   @itemx @nospell{aifm}
-##     Adobe Illustrator (obsolete for Gnuplot versions > 4.2)
-##
 ##   @item  latex*
 ##   @itemx eepic*
 ##     @LaTeX{} picture environment and extended picture environment.
 ##
-##   @item mf*
-##     Metafont
-##
 ##   @item  tikz
 ##   @itemx tikzstandalone*
 ##     Generate a @LaTeX{} file using PGF/TikZ format.  The OpenGL-based
--- a/scripts/plot/util/private/__opengl_print__.m	Mon Mar 18 12:58:09 2019 +0100
+++ b/scripts/plot/util/private/__opengl_print__.m	Fri Mar 15 22:34:55 2019 +0100
@@ -125,10 +125,6 @@
       cmd = sprintf (opts.pstoedit_cmd (opts), "pdf", tmp, tmp);
       gl2ps_device = {"svg"};
       pipeline = {sprintf("%s > %s", cmd, opts.name)};
-    case {"corel", "gif"}
-      error ("print:unsupporteddevice",
-             "print.m: %s output is not available for OpenGL graphics toolkits",
-             upper (opts.devopt));
     case opts.ghostscript.device
       ## Except for postscript, use svg format and first convert to pdf
       ## before going through ghostscript for final adjusments
--- a/scripts/plot/util/private/__print_parse_opts__.m	Mon Mar 18 12:58:09 2019 +0100
+++ b/scripts/plot/util/private/__print_parse_opts__.m	Fri Mar 15 22:34:55 2019 +0100
@@ -210,6 +210,16 @@
     endif
   endif
 
+  ## Warn about deprecated output formats
+  persistent unsupported = {"aifm", "ill","cdr", "corel", ...
+                            "hpgl", "mf", "cgm", "dxf"}
+
+  if (any (strcmp (unsupported, arg_st.devopt)))
+    warning ('Octave:print:deprecated-format',
+             'print: "%s" format is no more officially supported', ...
+             arg_st.devopt);
+  endif
+
   ## By default, postprocess svg files using svgconvert.
   if (strcmp (arg_st.devopt, "svg"))
     arg_st.svgconvert = true;