def load_images_pathnames_by_cells
      image_selector = 'xdr:pic/xdr:blipFill/a:blip'.freeze
      row_from_selector = 'xdr:from/xdr:row'.freeze
      row_to_selector = 'xdr:to/xdr:row'.freeze
      col_from_selector = 'xdr:from/xdr:col'.freeze
      col_to_selector = 'xdr:to/xdr:col'.freeze

      @drawings.xpath('//xdr:twoCellAnchor').each do |drawing|
        embed = drawing.xpath(image_selector).first.attributes['embed']
        next if embed.nil?

        rid = embed.value
        path = Pathname.new("#{tmpdir}/#{extract_drawing_path(rid).slice(/[^\/]*$/)}")

        row_from = drawing.xpath(row_from_selector).text.to_i
        col_from = drawing.xpath(col_from_selector).text.to_i
        row_to = drawing.xpath(row_to_selector).text.to_i
        col_to = drawing.xpath(col_to_selector).text.to_i

        (col_from..col_to).each do |col|
          (row_from..row_to).each do |row|
            @images_pathnames[[row, col]].push(path)
          end
        end
      end
    end
def load_images_pathnames_by_cells
      image_selector = 'xdr:pic/xdr:blipFill/a:blip'.freeze
      row_from_selector = 'xdr:from/xdr:row'.freeze
      row_to_selector = 'xdr:to/xdr:row'.freeze
      col_from_selector = 'xdr:from/xdr:col'.freeze
      col_to_selector = 'xdr:to/xdr:col'.freeze

      @drawings.xpath('//xdr:twoCellAnchor').each do |drawing|
        embed = drawing.xpath(image_selector).first.attributes['embed']
        next if embed.nil?

        rid = embed.value
        path = Pathname.new("#{tmpdir}/#{extract_drawing_path(rid).slice(/[^\/]*$/)}")

        row_from = drawing.xpath(row_from_selector).text.to_i
        col_from = drawing.xpath(col_from_selector).text.to_i
        row_to = drawing.xpath(row_to_selector).text.to_i
        col_to = drawing.xpath(col_to_selector).text.to_i

        (col_from..col_to).each do |col|
          (row_from..row_to).each do |row|
            @images_pathnames[[row, col]].push(path)
          end
        end
      end
    end
Iterates through the drawings and saves images' paths as Pathname objects to a hash with [row, col] keys.
 As multiple images can be located in a single cell, hash values are array of Pathname objects.
 One image can be spread across multiple cells (defined with from-row/to-row/from-col/to-col attributes) - same Pathname object is associated to each row-col combination for the range.