original_string: public static function pixelsToCellDimension($pValue = 0, PHPExcel_Style_Font $pDefaultFont)
      {
          // Font name and size
          $name = $pDefaultFont->getName();
          $size = $pDefaultFont->getSize();
  
          if (isset(PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size])) {
              // Exact width can be determined
              $colWidth = $pValue * PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size]['width'] / PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size]['px'];
          } else {
              // We don't have data for this particular font and size, use approximation by
              // extrapolating from Calibri 11
              $colWidth = $pValue * 11 * PHPExcel_Shared_Font::$defaultColumnWidths['Calibri'][11]['width'] / PHPExcel_Shared_Font::$defaultColumnWidths['Calibri'][11]['px'] / $size;
          }
  
          return $colWidth;
      }
code: public static function pixelsToCellDimension($pValue = 0, PHPExcel_Style_Font $pDefaultFont)
      {
          // Font name and size
          $name = $pDefaultFont->getName();
          $size = $pDefaultFont->getSize();
  
          if (isset(PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size])) {
              // Exact width can be determined
              $colWidth = $pValue * PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size]['width'] / PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size]['px'];
          } else {
              // We don't have data for this particular font and size, use approximation by
              // extrapolating from Calibri 11
              $colWidth = $pValue * 11 * PHPExcel_Shared_Font::$defaultColumnWidths['Calibri'][11]['width'] / PHPExcel_Shared_Font::$defaultColumnWidths['Calibri'][11]['px'] / $size;
          }
  
          return $colWidth;
      }
code_tokens: public static function pixelsToCellDimension ( $ pValue = 0 , PHPExcel_Style_Font $ pDefaultFont ) { // Font name and size $ name = $ pDefaultFont -> getName ( ) ; $ size = $ pDefaultFont -> getSize ( ) ; if ( isset ( PHPExcel_Shared_Font :: $ defaultColumnWidths [ $ name ] [ $ size ] ) ) { // Exact width can be determined $ colWidth = $ pValue * PHPExcel_Shared_Font :: $ defaultColumnWidths [ $ name ] [ $ size ] [ 'width' ] / PHPExcel_Shared_Font :: $ defaultColumnWidths [ $ name ] [ $ size ] [ 'px' ] ; } else { // We don't have data for this particular font and size, use approximation by // extrapolating from Calibri 11 $ colWidth = $ pValue * 11 * PHPExcel_Shared_Font :: $ defaultColumnWidths [ 'Calibri' ] [ 11 ] [ 'width' ] / PHPExcel_Shared_Font :: $ defaultColumnWidths [ 'Calibri' ] [ 11 ] [ 'px' ] / $ size ; } return $ colWidth ; }
docstring: Convert pixels to column width. Exact algorithm not known.
  By inspection of a real Excel file using Calibri 11, one finds 1000px ~ 142.85546875
  This gives a conversion factor of 7. Also, we assume that pixels and font size are proportional.
  
  @param     int $pValue    Value in pixels
  @param     PHPExcel_Style_Font $pDefaultFont    Default font of the workbook
  @return     int            Value in cell dimension
docstring_tokens: Convert pixels to column width . Exact algorithm not known . By inspection of a real Excel file using Calibri 11 one finds 1000px ~ 142 . 85546875 This gives a conversion factor of 7 . Also we assume that pixels and font size are proportional .