Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixing Issue #120 (table of contents may have wrong page numbers) #126

Closed
wants to merge 1 commit into from

1 participant

@peterdemin

Issue: #120

Now it is good

@peterdemin peterdemin Fixing Issue #120 (When converting odt to pdf table of contents may h…
…ave wrong page numbers)

Issue: dagwieers#120

I added cycle to update indexes two times.
2680c53
@peterdemin

This pull request replaces my previous:

#121

@peterdemin

Replaced by #127

@peterdemin peterdemin closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 18, 2013
  1. @peterdemin

    Fixing Issue #120 (When converting odt to pdf table of contents may h…

    peterdemin authored
    …ave wrong page numbers)
    
    Issue: dagwieers#120
    
    I added cycle to update indexes two times.
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 2 deletions.
  1. +6 −2 unoconv
View
8 unoconv
@@ -875,8 +875,12 @@ class Convertor:
# XDocumentIndexesSupplier interfaces
pass
else:
- for i in range(0, indexes.getCount()):
- indexes.getByIndex(i).update()
+ for ii in range(2):
+ # At first update Table-of-Contents.
+ # ToC grows, so page numbers grows too.
+ # On second turn update page numbers in ToC.
+ for i in range(0, indexes.getCount()):
+ indexes.getByIndex(i).update()
info(1, "Selected output format: %s" % outputfmt)
info(2, "Selected office filter: %s" % outputfmt.filter)
Something went wrong with that request. Please try again.