fix: improved speed of shrink page content by changing order of shrink methods
This commit is contained in:
parent
5dcf629d0d
commit
941ac1c9cc
2 changed files with 7 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Books" script:language="StarBasic" script:moduleType="normal">Sub markBooks6
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Books" script:language="StarBasic" script:moduleType="normal">Sub markBooks7
|
||||
End Sub
|
||||
|
||||
Sub setUniqPageStyles
|
||||
|
|
|
@ -1286,6 +1286,12 @@ Function shrinkPageContent() As Boolean
|
|||
oViewCursor.jumpToStartOfPage()
|
||||
startPosition = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
||||
targetContent = selectContentToShrink(initPosition,startPosition)
|
||||
For i = LBound(targetContent) To Ubound(targetContent)
|
||||
shrinkContentSpacing(targetContent(i))
|
||||
If isShrinkPageSucceded(initPosition, initPageNum) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
Next i
|
||||
'TODO: Уменьшая отступы каждого параграфа от и до следующего
|
||||
' а также уменьшая кернинг, межстрочное расстояние и кегль
|
||||
For j = 0 To rounds
|
||||
|
@ -1301,12 +1307,6 @@ Function shrinkPageContent() As Boolean
|
|||
EndIf
|
||||
Next i
|
||||
Next j
|
||||
For i = LBound(targetContent) To Ubound(targetContent)
|
||||
shrinkContentSpacing(targetContent(i))
|
||||
If isShrinkPageSucceded(initPosition, initPageNum) Then
|
||||
Exit Function
|
||||
EndIf
|
||||
Next i
|
||||
For i = LBound(targetContent) To Ubound(targetContent)
|
||||
increaseContentCharHeight(targetContent(i), delta * rounds )
|
||||
Next i
|
||||
|
|
Loading…
Add table
Reference in a new issue