<?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># 0.5 is too small and can crash pdf generation\n
min_column_width = 1\n
\n
max_line_len = {}\n
for listboxline in listboxline_list:\n
  line_width = 0\n
  col_count = 0\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
    line_width += len(string_property)\n
    if listboxline.isStatLine():\n
       string_property = "%s longer" % string_property\n
    new_column_max_len = max(len(string_property), max_line_len.get(column_id, 0))\n
    update_dict = {}\n
    update_dict[column_id] = new_column_max_len\n
    max_line_len.update(update_dict)\n
  \n
total_max_len = float(sum(max_line_len.values()))\n
result = {}\n
for column_id, max_len in max_line_len.items() :\n
  result[column_id] = max( (max(max_len, 1) / total_max_len) * frame_width, min_column_width)\n
\n
return result\n
</string> </value>
        </item>
        <item>
            <key> <string>_code</string> </key>
            <value> <string encoding="base64">YwAAAAAAAAAAAwAAAEAAAABzEwAAAGQBAGQCAGQDAIQCAFoAAGQAAFMoBAAAAE5mBDE5LjBmAzQu
MGMFAAAAGwAAABIAAABDAAAAc4kBAABkAQB9BQBoAAB9BgB49AB0AgB8AACDAQBEXeYAfQgAZAIA
fQkAZAIAfQoAeNEAdAIAdAcAfAgAZAMAgwIAgwAAgwEARF23AHQCAAKDAQBcAgB9DAB9DQB8DQB0
CgBqCABvCgABZAQAfQ8Abg0AAXQMAHwNAIMBAH0PAHwJAHQNAHwPAIMBADd9CQB0BwB8CABkBQCD
AgCDAABvDgABZAYAfA8AFn0PAG4BAAF0DgB0DQB8DwCDAQB0BwB8BgBkBwCDAgB8DABkAgCDAgCD
AgB9EwBoAAB9FAB8EwB0EQB8FACDAQB8DAA8dAcAfAYAZAgAgwIAfBQAgwEAAXFEAFdxGQBXdBIA
dBMAdAcAfAYAZAkAgwIAgwAAgwEAgwEAfRgAaAAAfRkAeFcAdAIAdAcAfAYAZAoAgwIAgwAAgwEA
RF09AHQCAAKDAQBcAgB9DAB9GgB0DgB0DgB8GgBkAQCDAgB8GAAVfAMAFHwFAIMCAHQRAHwZAIMB
AHwMADxxQAFXfBkAU2QAAFMoCwAAAE5pAQAAAGkAAAAAcxEAAABnZXRDb2x1bW5JdGVtTGlzdHMA
AAAAcwoAAABpc1N0YXRMaW5lcwkAAAAlcyBsb25nZXJzAwAAAGdldHMGAAAAdXBkYXRlcwYAAAB2
YWx1ZXNzBQAAAGl0ZW1zKBgAAABzEAAAAG1pbl9jb2x1bW5fd2lkdGhzDAAAAG1heF9saW5lX2xl
bnMJAAAAX2dldGl0ZXJfcxAAAABsaXN0Ym94bGluZV9saXN0cwsAAABsaXN0Ym94bGluZXMKAAAA
bGluZV93aWR0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X2dldENvbHVtbldpdGhEaWN0KAEAAABzGQAAAExpc3RCb3hfZ2V0Q29sdW1uV2l0aERpY3Qo
AAAAACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
        </item>
        <item>
            <key> <string>_filepath</string> </key>
            <value> <string>Script (Python):/nexedi/portal_skins/erp5_pdf_style/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>min_column_width</string>
                            <string>max_line_len</string>
                            <string>_getiter_</string>
                            <string>listboxline</string>
                            <string>line_width</string>
                            <string>col_count</string>
                            <string>_getattr_</string>
                            <string>column_id</string>
                            <string>column_property</string>
                            <string>None</string>
                            <string>string_property</string>
                            <string>str</string>
                            <string>len</string>
                            <string>max</string>
                            <string>new_column_max_len</string>
                            <string>update_dict</string>
                            <string>_write_</string>
                            <string>float</string>
                            <string>sum</string>
                            <string>total_max_len</string>
                            <string>result</string>
                            <string>max_len</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>ListBox_getColumnWithDict</string> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string>FIXME: does not support report_tree</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
