This is a static copy of a profile reportHome
initprintexporttemplate (17 calls, 0.000 sec)
Generated 05-Aug-2011 13:03:25 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/initprintexporttemplate.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
9 | return; | 17 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
24 | This statement (and possibly following ones) cannot be reached. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 52 |
Non-code lines (comments, blank lines) | 32 |
Code lines (lines that can run) | 20 |
Code lines that did run | 1 |
Code lines that did not run | 19 |
Coverage (did run/can run) | 5.00 % |
Function listing
time calls line
1 function initprintexporttemplate( varargin )
2 %INITPRINTTEMPLATE Initialize the figure's PrintTemplate
3
4 % Copyright 1984-2006 The MathWorks, Inc.
5 % $Revision: 1.1.6.2 $ $Date: 2008/09/18 15:57:08 $
6
7 % Turn off the new printtemplate by default until the backwards compatibility
8 % issues are completely worked out.
17 9 return;
10
11 % This function will be called every time a figure is created. Will
12 % initialize the printtemplate and exporttemplates from the default
13 % stylesheet file (if one exists). In order to improve efficiency, the
14 % file is read only the first time a figure is created. The values are
15 % cached (using persistent variables in this function), and the
16 % print/export templates of subsequent figures will be initialized from the
17 % cached values.
18
19 % Calling this function with 3 args tries will modify the already cached
20 % values for the printtemaplate and/or the exporttemplate. The second arg
21 % will tell whether the print or the export cache is being modified,
22 % and the 3rd arg is the new value to cache.
23
24 persistent defpt;
25 persistent defet;
26
27 isNewAPI = usejava('swing') && ...
28 (com.mathworks.page.export.PrintExportSettings.IsNewPreviewUsed() == true);
29
30 h = varargin{1};
31 if isNewAPI && ~strcmp(get(h, 'tag'), 'TMWFigurePrintPreview')
32 % If nargs > 1, then the cached value of the printtemplate/export
33 % template is being modified. The second arg will tell whether the
34 % print or the export cache is being modified, and the 3rd arg is the
35 % new value to cache.
36 if nargin > 1
37 switch varargin{2}
38 case 'print'
39 defpt = varargin{3};
40 case 'export'
41 defet = varargin{3};
42 end
43 else
44 defpt = Linitprinttemplate(h, defpt);
45 defet = Linitexporttemplate(h, defet);
46
47 %% Remove the print setup and page setup menuitems
48 menuitems = [findall(h, 'type', 'uimenu', 'label', 'Print Set&up...'), ...
49 findall(h, 'type', 'uimenu', 'label', 'Pa&ge Setup...')];
50 set(menuitems, 'Visible', 'off');
51 end
52 end
Other subfunctions in this file are not included in this listing.