Commit f21aeef3 authored by Alexandre Boeglin's avatar Alexandre Boeglin

forgot to add file before commit.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5175 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b6f90159
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>result = {}\n
\n
# 0.5 is too small and can crash pdf generation\n
min_column_width = 1\n
\n
for listboxline in listboxline_list:\n
if 1 : #not listboxline.isTitleLine():\n
line_width = 0\n
col_count = 0\n
if is_report_tree_mode:\n
col_count += 1\n
column_property = listboxline.getSectionName()\n
if column_property is None: \n
string_property = \'\'\n
else:\n
string_property = str(column_property)\n
line_width += len(string_property) + section_width * (listboxline.getSectionDepth() - 1)\n
for column_id, column_property in listboxline.getColumnItemList(): \n
col_count += 1\n
if column_property is None: \n
string_property = \'\'\n
else:\n
string_property = str(column_property)\n
line_width += len(string_property)\n
for column_id, column_property in listboxline.getColumnItemList():\n
if column_property is None: \n
string_property = \'\'\n
else:\n
string_property = str(column_property)\n
result[column_id] = max(result.get(column_id, min_column_width),\n
min( frame_width * 2 / col_count, \n
frame_width * len(str(string_property)) / max(line_width, 1)))\n
if is_report_tree_mode:\n
column_property = listboxline.getSectionName()\n
if column_property is None: \n
string_property = \'\'\n
else:\n
string_property = str(column_property)\n
column_id = \'section_name\'\n
result[column_id] = max(result.get(column_id,min_column_width), min(frame_width * 3 / col_count, frame_width * (len(str(string_property)) + section_width * (listboxline.getSectionDepth() - 1)) / max(line_width, 1)))\n
\n
total_col_width = 0.0\n
for column_id in result.keys():\n
if result[column_id] == 0.0:\n
result[column_id] = 1.0\n
for column_id in result.keys():\n
if column_id != \'section_name\' or is_report_tree_mode:\n
total_col_width += result[column_id]\n
for column_id in result.keys():\n
if column_id != \'section_name\' or is_report_tree_mode:\n
result[column_id] = result[column_id] * frame_width / total_col_width \n
\n
return result\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_pdf_style/copy_of_ListBox_getColumnWithDict</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>listboxline_list, is_domain_tree_mode, is_report_tree_mode, frame_width = 19.0, section_width = 4.0</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>listboxline_list</string>
<string>is_domain_tree_mode</string>
<string>is_report_tree_mode</string>
<string>frame_width</string>
<string>section_width</string>
<string>result</string>
<string>min_column_width</string>
<string>_getiter_</string>
<string>listboxline</string>
<string>line_width</string>
<string>col_count</string>
<string>_getattr_</string>
<string>column_property</string>
<string>None</string>
<string>string_property</string>
<string>str</string>
<string>len</string>
<string>column_id</string>
<string>max</string>
<string>min</string>
<string>_write_</string>
<string>total_col_width</string>
<string>_getitem_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<float>19.0</float>
<float>4.0</float>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>copy_of_ListBox_getColumnWithDict</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment