metanorma-iso 3.5.43 → 3.5.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4304570f65711cbb2f2a72e262594a51f08a878702f181646e95f34c4cb25fa0
4
- data.tar.gz: 36f9006dc6ebbb4c81e6585304b458ab070f9beaabaabf490b72da1d6174dbbd
3
+ metadata.gz: 85160d800ea91d670e92a2e1a29ae26cba19eb81033e61e9b8bef7a719c83557
4
+ data.tar.gz: be24fbed96e6dab380ccf71eef464b0f4c2a76574ce0d49e6308ed99d4801773
5
5
  SHA512:
6
- metadata.gz: a0ea91039084180c522c9d7c17d0bc835fde126469168bcbc349794c0899f692dad97de3b25ed0fa84c09499f66dafb6de8a5eda9efa8a3df25420bedfceb2d9
7
- data.tar.gz: 583b61b59a576242fb116818b19d18780d5c9332f110f51d0006790097a460aaddf56bd3c7334041692efa46d29472be313ba525d7060131addbaa9d18397b7b
6
+ metadata.gz: d409e6a448a0339b12d1ec1bcfbfda95dbbc815d7551f72893e4b815b0a0cd2411b61d98e3b7e963d054e866ab9e9f2f8b5d8b6f7946bd8b51dcabdd989f9d26
7
+ data.tar.gz: 222dcec902710e79cf9cf51ad182f3ba361f9b437e446f92357fd230ab11104cec1e90e3aa1bcf7bd6709f8657da41f6475a5bb0e5e0fedbdcd5f2885d9a76f7
@@ -75,18 +75,22 @@ module IsoDoc
75
75
  close_field: index == entries.size - 1)
76
76
  end
77
77
 
78
- request_field_refresh(doc)
78
+ # No w:updateFields flag in word/settings.xml (owner ruling).
79
+ # The flag used to be set here so Word recomputed the ToC on
80
+ # open, but Word auto-evaluates PAGEREF fields during its
81
+ # on-open pagination with or without the flag, so the flag
82
+ # bought nothing except the "This document contains fields
83
+ # that may refer to other files" prompt on every open. The
84
+ # cached page numbers remain placeholders — the documented
85
+ # tradeoff for DOCX-only compiles, where no pagination data
86
+ # exists until a layout engine runs. When the PDF leg is
87
+ # requested, a future enhancement may bake the harvested
88
+ # numbers into the cached results, but the mechanism must
89
+ # never depend on it.
79
90
  end
80
91
 
81
92
  private
82
93
 
83
- # The cached page numbers are placeholders; w:updateFields makes
84
- # Word recompute them (and the TOC) when the document is opened.
85
- def request_field_refresh(doc)
86
- doc.model.settings ||= Uniword::Wordprocessingml::Settings.new
87
- doc.model.settings.update_fields = Uniword::Wordprocessingml::UpdateFields.new
88
- end
89
-
90
94
  def render_toc_heading(model, doc)
91
95
  para = Uniword::Builder::ParagraphBuilder.new
92
96
  para.style = @resolver.paragraph_style(:contents_title)
@@ -311,10 +315,11 @@ module IsoDoc
311
315
  render_toc_heading_text(entry.source, runs)
312
316
  append_tab(runs)
313
317
 
314
- # PAGEREF field with a placeholder result: the static result
315
- # is "1" until Word refreshes the fields (w:updateFields, see
316
- # request_field_refresh), when the entry's bookmark yields the
317
- # real page number.
318
+ # PAGEREF field with a placeholder result: the static result is
319
+ # "1" until Word refreshes the field. Word auto-evaluates
320
+ # PAGEREF during its on-open pagination (no w:updateFields
321
+ # flag is set — see render for the ruling), so the entry's
322
+ # bookmark yields the real page number on open.
318
323
  runs << field_char_run("begin")
319
324
  runs << instr_text_run(" PAGEREF #{entry.bookmark_name} \\h ")
320
325
  runs << field_char_run("separate")
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iso
3
- VERSION = "3.5.43".freeze
3
+ VERSION = "3.5.44".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.43
4
+ version: 3.5.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.