View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003578 | mantisbt | other | public | 2004-02-18 15:07 | 2004-07-07 18:26 |
Reporter | eric0213 | Assigned To | grangeway | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.19.0a1 | ||||
Summary | 0003578: Word 2000 reports "The dimensions after resizing are too small or too large." trying to open word document from Mantis | ||||
Description | When you save a Word document from Mantis and open it in Word 2000, you receive an error stating "The dimensions after resizing are too small or too large." This can be corrected by adding a width paramater to all <hr>'s in the print_all_bug_page_word.php file. This is addressed in Microsoft Knowledge Base Article 220367 | ||||
Additional Information | Attached is a fixed version of print_all_bug_page_word.php | ||||
Tags | No tags attached. | ||||
Attached Files | print_all_bug_page_word.txt (12,700 bytes)
f<?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org # Copyright (C) 2002 - 2004 Mantis Team - mantisbt-dev@lists.sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details # -------------------------------------------------------- # $Id: print_all_bug_page_word.php,v 1.42 2004/02/05 00:34:38 jlatour Exp $ # -------------------------------------------------------- ?> <?php # Word 2000 export page # The bugs displayed in print_all_bug_page.php are saved in a .doc file # The IE icon allows to see or directly print the same result ?> <?php require_once( 'core.php' ); $t_core_path = config_get( 'core_path' ); require_once( $t_core_path.'current_user_api.php' ); require_once( $t_core_path.'bug_api.php' ); require_once( $t_core_path.'custom_field_api.php' ); require_once( $t_core_path.'string_api.php' ); require_once( $t_core_path.'date_api.php' ); ?> <?php auth_ensure_user_authenticated() ?> <?php $f_type_page = gpc_get_string( 'type_page', 'word' ); $f_search = gpc_get_string( 'search', false ); # @@@ need a better default $f_offset = gpc_get_int( 'offset', 0 ); $f_export = gpc_get_string( 'export' ); $f_show_flag = gpc_get_bool( 'show_flag' ); $t_project_id = helper_get_current_project( ); # word or html export if ( $f_type_page != 'html' ) { $t_export_title = $g_page_title."_word"; $t_export_title = ereg_replace( '[\/:*?"<>|]', '', $t_export_title ); header( 'Content-Type: application/msword' ); header( 'Content-Disposition: attachment; filename="' . $t_export_title . '.doc"' ); } $t_cookie_value = gpc_get_cookie( config_get( 'view_all_cookie' ), '' ); # check to see if the cookie does not exist if ( is_blank( $t_cookie_value ) ) { print_header_redirect( 'view_all_set.php?type=0&print=1' ); } # check to see if new cookie is needed $t_setting_arr = explode( '#', $t_cookie_value ); if ( $t_setting_arr[0] != $g_cookie_version ) { print_header_redirect( 'view_all_set.php?type=0&print=1' ); } # This is where we used to do the entire actual filter ourselves $t_page_number = gpc_get_int( 'page_number', 1 ); $t_per_page = null; $t_bug_count = null; $t_page_count = null; $result = filter_get_bug_rows( $t_page_number, $t_per_page, $t_page_count, $t_bug_count ); $row_count = sizeof( $result ); ?> <?php # Word Export ?> <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <?php html_page_top1() ?> <?php html_head_end() ?> <?php html_body_begin() ?> <?php //$t_bug_arr_sort[$row_count]=-1; $f_bug_arr = explode_enum_string( $f_export ); # $t_bug_arr_sort contains 1 if the field as been selected, 0 if not for( $i=0; $i < $row_count; $i++ ) { if ( isset( $f_bug_arr[$i] ) ) { $index = $f_bug_arr[$i]; $t_bug_arr_sort[$index]=1; } } for( $j=0; $j < $row_count; $j++ ) { # prefix bug data with v_ extract( $result[$j], EXTR_PREFIX_ALL, 'v' ); $t_last_updated = date( $g_short_date_format, $v_last_updated ); # grab the bugnote count $bugnote_count = bug_get_bugnote_count( $v_id ); # grab the project name $project_name = project_get_field( $v_project_id, 'name' ); # bug text infos $query3 = "SELECT * FROM $g_mantis_bug_text_table WHERE id='$v_bug_text_id'"; $result3 = db_query( $query3 ); $row = db_fetch_array( $result3 ); extract( $row, EXTR_PREFIX_ALL, 'v2' ); $v_os = string_display( $v_os ); $v_os_build = string_display( $v_os_build ); $v_platform = string_display( $v_platform ); $v_version = string_display( $v_version ); $v_summary = string_display_links( $v_summary ); $v2_description = string_display_links( $v2_description ); $v2_steps_to_reproduce = string_display_links( $v2_steps_to_reproduce ); $v2_additional_information = string_display_links( $v2_additional_information ); # display the available and selected bugs if ( isset( $t_bug_arr_sort[$j] ) || ( $f_show_flag==0 )) { ?> <br /> <table class="width100" cellspacing="1"> <tr> <td class="form-title" colspan="3"> <?php echo lang_get( 'viewing_bug_advanced_details_title' ) ?> </td> </tr> <tr> <td class="print-spacer" colspan="6"> <hr size="1" width="100%"/> </td> </tr> <tr class="print-category"> <td class="print" width="16%"> <?php echo lang_get( 'id' ) ?>: </td> <td class="print" width="16%"> <?php echo lang_get( 'category' ) ?>: </td> <td class="print" width="16%"> <?php echo lang_get( 'severity' ) ?>: </td> <td class="print" width="16%"> <?php echo lang_get( 'reproducibility' ) ?>: </td> <td class="print" width="16%"> <?php echo lang_get( 'date_submitted' ) ?>: </td> <td class="print" width="16%"> <?php echo lang_get( 'last_update' ) ?>: </td> </tr> <tr class="print"> <td class="print"> <?php echo $v_id ?> </td> <td class="print"> <?php echo $v_category ?> </td> <td class="print"> <?php echo get_enum_element( 'severity', $v_severity ) ?> </td> <td class="print"> <?php echo get_enum_element( 'reproducibility', $v_reproducibility ) ?> </td> <td class="print"> <?php print_date( config_get( 'normal_date_format' ), strtotime($v_date_submitted) ) ?> </td> <td class="print"> <?php print_date( config_get( 'normal_date_format' ), $v_last_updated ) ?> </td> </tr> <tr> <td class="print-spacer" colspan="6"> <hr size="1" width="100%"/> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'reporter' ) ?>: </td> <td class="print"> <?php print_user_with_subject( $v_reporter_id, $v_id ) ?> </td> <td class="print-category"> <?php echo lang_get( 'platform' ) ?>: </td> <td class="print"> <?php echo $v_platform ?> </td> <td class="print" colspan="2"> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'assigned_to' ) ?>: </td> <td class="print"> <?php print_user_with_subject( $v_handler_id, $v_id ) ?> </td> <td class="print-category"> <?php echo lang_get( 'os' ) ?>: </td> <td class="print"> <?php echo $v_os ?> </td> <td class="print" colspan="2"> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'priority' ) ?>: </td> <td class="print"> <?php echo get_enum_element( 'priority', $v_priority ) ?> </td> <td class="print-category"> <?php echo lang_get( 'os_version' ) ?>: </td> <td class="print"> <?php echo $v_os_build ?> </td> <td class="print" colspan="2"> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'status' ) ?>: </td> <td class="print"> <?php echo get_enum_element( 'status', $v_status ) ?> </td> <td class="print-category"> <?php echo lang_get( 'product_version' ) ?>: </td> <td class="print"> <?php echo $v_version ?> </td> <td class="print" colspan="2"> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'product_build' ) ?>: </td> <td class="print"> <?php echo $v_build?> </td> <td class="print-category"> <?php echo lang_get( 'resolution' ) ?>: </td> <td class="print"> <?php echo get_enum_element( 'resolution', $v_resolution ) ?> </td> <td class="print" colspan="2"> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'projection' ) ?>: </td> <td class="print"> <?php echo get_enum_element( 'projection', $v_projection ) ?> </td> <td class="print-category"> <?php echo lang_get( 'duplicate_id' ) ?>: </td> <td class="print"> <?php print_duplicate_id( $v_duplicate_id ) ?> </td> <td class="print" colspan="2"> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'eta' ) ?>: </td> <td class="print"> <?php echo get_enum_element( 'eta', $v_eta ) ?> </td> <td class="print" colspan="4"> </td> </tr> <?php $t_related_custom_field_ids = custom_field_get_linked_ids( $t_project_id ); foreach( $t_related_custom_field_ids as $t_id ) { $t_def = custom_field_get_definition( $t_id ); ?> <tr class="print"> <td class="print-category"> <?php echo $t_def['name'] ?>: </td> <td class="print" colspan="5"> <?php echo custom_field_get_value( $t_id, $v_id ); ?> </td> </tr> <?php } // foreach ?> <tr> <td class="print-spacer" colspan="6"> <hr size="1" width="100%"/> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'summary' ) ?>: </td> <td class="print" colspan="5"> <?php echo $v_summary ?> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'description' ) ?>: </td> <td class="print" colspan="5"> <?php echo $v2_description ?> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'steps_to_reproduce' ) ?>: </td> <td class="print" colspan="5"> <?php echo $v2_steps_to_reproduce ?> </td> </tr> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'additional_information' ) ?>: </td> <td class="print" colspan="5"> <?php echo $v2_additional_information ?> </td> </tr> <?php # account profile description if ( $v_profile_id > 0 ) { $query4 = "SELECT description FROM $g_mantis_user_profile_table WHERE id='$v_profile_id'"; $result4 = db_query( $query4 ); $t_profile_description = ''; if ( db_num_rows( $result4 ) > 0 ) { $t_profile_description = db_result( $result4, 0 ); } $t_profile_description = string_display( $t_profile_description ); ?> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'system_profile' ) ?> </td> <td class="print" colspan="5"> <?php echo $t_profile_description ?> </td> </tr> <?php } # profile description ?> <tr class="print"> <td class="print-category"> <?php echo lang_get( 'attached_files' ) ?>: </td> <td class="print" colspan="5"> <?php $query5 = "SELECT * FROM $g_mantis_bug_file_table WHERE bug_id='$v_id'"; $result5 = db_query( $query5 ); $num_files = db_num_rows( $result5 ); for ( $i=0;$i<$num_files;$i++ ) { $row = db_fetch_array( $result5 ); extract( $row, EXTR_PREFIX_ALL, 'v2' ); $v2_filesize = round( $v2_filesize / 1024 ); $v2_date_added = date( config_get( 'normal_date_format' ), ( $v2_date_added ) ); switch ( $g_file_upload_method ) { case DISK: PRINT "$v2_filename ($v2_filesize KB) <span class=\"italic\">$v2_date_added</span>"; break; case DATABASE: PRINT "$v2_filename ($v2_filesize KB) <span class=\"italic\">$v2_date_added</span>"; break; } if ( $i != ( $num_files - 1 ) ) { PRINT '<br />'; } } ?> </td> </tr> <?php # get the bugnote data $query6 = "SELECT *,UNIX_TIMESTAMP(date_submitted) as date_submitted FROM $g_mantis_bugnote_table WHERE bug_id='$v_id' ORDER BY date_submitted $g_bugnote_order"; $result6 = db_query( $query6 ); $num_notes = db_num_rows( $result6 ); ?> <?php # Bugnotes BEGIN ?> <br /> <table class="width100" cellspacing="1"> <?php # no bugnotes if ( 0 == $num_notes ) { ?> <tr> <td class="print" colspan="2"> <?php echo lang_get( 'no_bugnotes_msg' ) ?> </td> </tr> <?php } else { # print bugnotes ?> <tr> <td class="form-title" colspan="2"> <?php echo lang_get( 'bug_notes_title' ) ?> </td> </tr> <?php for ( $k=0; $k < $num_notes; $k++ ) { # prefix all bugnote data with v3_ $row = db_fetch_array( $result6 ); extract( $row, EXTR_PREFIX_ALL, 'v3' ); $v3_date_submitted = date( config_get( 'normal_date_format' ), ( $v3_date_submitted ) ); # grab the bugnote text and id and prefix with v3_ $query6 = "SELECT note, id FROM $g_mantis_bugnote_text_table WHERE id='$v3_bugnote_text_id'"; $result7 = db_query( $query6 ); $v3_note = db_result( $result7, 0, 0 ); $v3_bugnote_text_id = db_result( $result7, 0, 1 ); $v3_note = string_display_links( $v3_note ); ?> <tr> <td class="print-spacer" colspan="2"> <hr size="1" width="100%"/> </td> </tr> <tr> <td class="nopad" valign="top" width="15%"> <table class="hide" cellspacing="1"> <tr> <td class="print"> <?php print_user( $v3_reporter_id ) ?> </td> </tr> <tr> <td class="print"> <?php echo $v3_date_submitted ?> </td> </tr> </table> </td> <td class="nopad" valign="top" width="85%"> <table class="hide" cellspacing="1"> <tr> <td class="print"> <?php echo $v3_note ?> </td> </tr> </table> </td> </tr> <?php } # end for } # end else ?> </table> <?php # Bugnotes END ?> </table> <?php echo '<br /><br />'; } # end isset } # end main loop ?> | ||||
MantisBT: master 58f27ce4 2004-06-30 18:30 Paul Richards Details Diff |
fix 0003578 - Word 2000 error as in MS KB Q220367 git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2640 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0003578 |
|
mod - doc/ChangeLog | Diff File | ||
mod - print_all_bug_page_word.php | Diff File |