Compare commits
15 commits
Author | SHA1 | Date | |
---|---|---|---|
ca46b20e41 | |||
e62d44cd89 | |||
a5ac4cbb43 | |||
6d138ae938 | |||
d06657e3ee | |||
7a389b1b17 | |||
fa35152083 | |||
05041fc38b | |||
82dc861e82 | |||
6843f73923 | |||
1f4f9d757d | |||
075bfc85aa | |||
b0b5460032 | |||
797ff48837 | |||
fe1fc573eb |
12 changed files with 449 additions and 114 deletions
42
Addons.xcu
42
Addons.xcu
|
@ -83,6 +83,26 @@
|
||||||
<value>_self</value>
|
<value>_self</value>
|
||||||
</prop>
|
</prop>
|
||||||
</node>
|
</node>
|
||||||
|
<node oor:name="balanceTail" oor:op="replace">
|
||||||
|
<prop oor:name="Context" oor:type="xs:string">
|
||||||
|
<value>com.sun.star.text.TextDocument,com.sun.star.text.WebDocument</value>
|
||||||
|
</prop>
|
||||||
|
<prop oor:name="Title" oor:type="xs:string">
|
||||||
|
<value xml:lang="ru">Балансировка хвоста</value>
|
||||||
|
<value xml:lang="fr">Équilibrer la dernière ligne</value>
|
||||||
|
<value xml:lang="en">Balance the last line </value>
|
||||||
|
<value xml:lang="sr">Уравнотежите последњу линију</value>
|
||||||
|
<value xml:lang="hr">Uravnotežite posljednji redak</value>
|
||||||
|
<value xml:lang="bs">Uravnotežite posljednji redak</value>
|
||||||
|
</prop>
|
||||||
|
<prop oor:name="URL" oor:type="xs:string">
|
||||||
|
<value>macro:///ePublishing.Archive.balanceCurParaLastLine</value>
|
||||||
|
</prop>
|
||||||
|
<prop oor:name="Target" oor:type="xs:string">
|
||||||
|
<value>_self</value>
|
||||||
|
</prop>
|
||||||
|
</node>
|
||||||
|
|
||||||
|
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
|
@ -169,26 +189,6 @@
|
||||||
<value>_self</value>
|
<value>_self</value>
|
||||||
</prop>
|
</prop>
|
||||||
</node>
|
</node>
|
||||||
<node oor:name="balanceTail" oor:op="replace">
|
|
||||||
<prop oor:name="Context" oor:type="xs:string">
|
|
||||||
<value>com.sun.star.text.TextDocument,com.sun.star.text.WebDocument</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="Title" oor:type="xs:string">
|
|
||||||
<value xml:lang="ru">Балансировка хвоста</value>
|
|
||||||
<value xml:lang="fr">Équilibrer la dernière ligne</value>
|
|
||||||
<value xml:lang="en">Balance the last line </value>
|
|
||||||
<value xml:lang="sr">Уравнотежите последњу линију</value>
|
|
||||||
<value xml:lang="hr">Uravnotežite posljednji redak</value>
|
|
||||||
<value xml:lang="bs">Uravnotežite posljednji redak</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="URL" oor:type="xs:string">
|
|
||||||
<value>macro:///ePublishing.Archive.adjustLastLineCurPara</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="Target" oor:type="xs:string">
|
|
||||||
<value>_self</value>
|
|
||||||
</prop>
|
|
||||||
</node>
|
|
||||||
|
|
||||||
|
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
|
@ -276,7 +276,7 @@
|
||||||
</node>
|
</node>
|
||||||
<node oor:name="balance-tail" oor:op="replace">
|
<node oor:name="balance-tail" oor:op="replace">
|
||||||
<prop oor:name="URL" oor:type="xs:string">
|
<prop oor:name="URL" oor:type="xs:string">
|
||||||
<value>macro:///ePublishing.Archive.adjustLastLineCurPara</value>
|
<value>macro:///ePublishing.Archive.balanceCurParaLastLine</value>
|
||||||
</prop>
|
</prop>
|
||||||
<node oor:name="UserDefinedImages">
|
<node oor:name="UserDefinedImages">
|
||||||
<prop oor:name="ImageBigURL">
|
<prop oor:name="ImageBigURL">
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
xmlns:dep="http://openoffice.org/extensions/description/2006"
|
xmlns:dep="http://openoffice.org/extensions/description/2006"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<identifier value="pro.litvinovg.epublishing" />
|
<identifier value="pro.litvinovg.epublishing" />
|
||||||
<version value="0.7.10" />
|
<version value="0.7.16" />
|
||||||
<platform value="all" />
|
<platform value="all" />
|
||||||
<display-name>
|
<display-name>
|
||||||
<name lang="ru">Инструменты для создания электронных изданий</name>
|
<name lang="ru">Инструменты для создания электронных изданий</name>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Archive" script:language="StarBasic" script:moduleType="normal">Sub archMark25
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Archive" script:language="StarBasic" script:moduleType="normal">Sub archMark29
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -172,6 +172,7 @@ sub convertIndesignPageBreaks
|
||||||
Exit Sub
|
Exit Sub
|
||||||
EndIf
|
EndIf
|
||||||
turnOffTracking()
|
turnOffTracking()
|
||||||
|
setZoomToSpeedUpTasks()
|
||||||
|
|
||||||
balanceFootNotes()
|
balanceFootNotes()
|
||||||
Dim oViewCursor As Object
|
Dim oViewCursor As Object
|
||||||
|
@ -231,6 +232,7 @@ sub convertIndesignPageBreaks
|
||||||
Wait 100
|
Wait 100
|
||||||
pageNumber = getPageNumber(oTextCursor.Text.createTextCursorByRange(oTextCursor.End))
|
pageNumber = getPageNumber(oTextCursor.Text.createTextCursorByRange(oTextCursor.End))
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
'check first character
|
'check first character
|
||||||
oTextCursor.goRight(1,true)
|
oTextCursor.goRight(1,true)
|
||||||
nextPara = oTextCursor.End
|
nextPara = oTextCursor.End
|
||||||
|
@ -261,9 +263,10 @@ sub convertIndesignPageBreaks
|
||||||
EndIf
|
EndIf
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If pageNumber - prevPageNumber < 2 Then
|
|
||||||
|
'If pageNumber - prevPageNumber < 2 Then
|
||||||
'stretchPrevPage(prevPara)
|
'stretchPrevPage(prevPara)
|
||||||
EndIf
|
'EndIf
|
||||||
|
|
||||||
prevPageNumber = pageNumber
|
prevPageNumber = pageNumber
|
||||||
oFound = ThisComponent.findNext(oFound.End, oSearch)
|
oFound = ThisComponent.findNext(oFound.End, oSearch)
|
||||||
|
@ -274,14 +277,16 @@ end Sub
|
||||||
|
|
||||||
Sub configureHeadings
|
Sub configureHeadings
|
||||||
configureArchiveHeading1
|
configureArchiveHeading1
|
||||||
configureOtherArchiveHeadings
|
configureArchiveHeadings()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Sub configureArchiveHeading1
|
Sub configureArchiveHeading1
|
||||||
Dim outline1() As Object
|
Dim outline1() As Object
|
||||||
Dim oViewCursor As Object
|
Dim oViewCursor As Object
|
||||||
Dim oSavePosition As Object
|
Dim oSavePosition As Object
|
||||||
|
Dim initPosition As Object
|
||||||
|
Dim initPageNum As Integer
|
||||||
|
fixViewCursor()
|
||||||
oViewCursor = thisComponent.getCurrentController.getViewCursor
|
oViewCursor = thisComponent.getCurrentController.getViewCursor
|
||||||
oSavePosition = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
oSavePosition = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
||||||
outline1 = getHeadingWithLevel(1)
|
outline1 = getHeadingWithLevel(1)
|
||||||
|
@ -289,33 +294,35 @@ Sub configureArchiveHeading1
|
||||||
Dim pageNumberCursor As Object
|
Dim pageNumberCursor As Object
|
||||||
Dim i As Integer
|
Dim i As Integer
|
||||||
Dim j As Integer
|
Dim j As Integer
|
||||||
Dim initialPageCount As Integer
|
|
||||||
initialPageCount = ThisComponent.currentController.pageCount
|
|
||||||
For i = LBound(outline1) To UBound(outline1)
|
For i = LBound(outline1) To UBound(outline1)
|
||||||
oViewCursor.goToRange(outline1(i), false)
|
oViewCursor.goToRange(outline1(i), false)
|
||||||
oViewCursor.jumpToEndOfPage()
|
oViewCursor.jumpToEndOfPage()
|
||||||
pageNumberCursor = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
initPosition = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
||||||
pageNumberCursor.goToStartOfWord(false)
|
initPageNum = oViewcursor.getPage()
|
||||||
startViewPageNum = getPageNumber(pageNumberCursor)
|
|
||||||
|
|
||||||
Do While startViewPageNum = getPageNumber(pageNumberCursor) And initialPageCount = ThisComponent.currentController.pageCount
|
Do While Not isContentPageChanged(initPosition, initPageNum) AND outline1(i).ParaBottomMargin < 10000
|
||||||
outline1(i).ParaTopMargin = outline1(i).ParaTopMargin + 100
|
outline1(i).ParaBottomMargin = outline1(i).ParaBottomMargin + 100
|
||||||
Loop
|
Loop
|
||||||
If outline1(i).ParaTopMargin >= 100 Then
|
Do While isContentPageChanged(initPosition, initPageNum)
|
||||||
outline1(i).ParaTopMargin = outline1(i).ParaTopMargin - 100
|
If outline1(i).ParaBottomMargin < 0 Then
|
||||||
|
Exit Do
|
||||||
EndIf
|
EndIf
|
||||||
|
outline1(i).ParaBottomMargin = outline1(i).ParaBottomMargin - 100
|
||||||
|
Loop
|
||||||
Next i
|
Next i
|
||||||
oViewCursor.goToRange(oSavePosition,false)
|
oViewCursor.goToRange(oSavePosition,false)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub configureOtherArchiveHeadings
|
Sub configureArchiveHeadings()
|
||||||
Dim outline1() As Object
|
Dim outline1() As Object
|
||||||
Dim oViewCursor As Object
|
Dim oViewCursor As Object
|
||||||
Dim oSavePosition As Object
|
Dim initPosition As Object
|
||||||
|
Dim initPageNum As Integer
|
||||||
|
Dim savePosition As Object
|
||||||
|
fixViewCursor()
|
||||||
oViewCursor = thisComponent.getCurrentController.getViewCursor
|
oViewCursor = thisComponent.getCurrentController.getViewCursor
|
||||||
oSavePosition = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
savePosition = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
||||||
|
|
||||||
Dim startViewPageNum As Integer
|
|
||||||
Dim pageNumberCursor As Object
|
Dim pageNumberCursor As Object
|
||||||
Dim i As Integer
|
Dim i As Integer
|
||||||
Dim j As Integer
|
Dim j As Integer
|
||||||
|
@ -327,23 +334,25 @@ Sub configureOtherArchiveHeadings
|
||||||
If outline1(i).BreakType <> 4 Then
|
If outline1(i).BreakType <> 4 Then
|
||||||
oViewCursor.goToRange(outline1(i), false)
|
oViewCursor.goToRange(outline1(i), false)
|
||||||
oViewCursor.jumpToEndOfPage()
|
oViewCursor.jumpToEndOfPage()
|
||||||
pageNumberCursor = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
initPosition = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
||||||
pageNumberCursor.goToStartOfWord(false)
|
initPageNum = oViewcursor.getPage()
|
||||||
startViewPageNum = getPageNumber(pageNumberCursor)
|
|
||||||
|
|
||||||
Do While startViewPageNum = getPageNumber(pageNumberCursor) And initialPageCount = ThisComponent.currentController.pageCount
|
Do While Not isContentPageChanged(initPosition, initPageNum)
|
||||||
outline1(i).ParaTopMargin = outline1(i).ParaTopMargin + 100
|
outline1(i).ParaTopMargin = outline1(i).ParaTopMargin + 100
|
||||||
If (outline1(i).ParaTopMargin > outline1(i).ParaBottomMargin) Then
|
If (outline1(i).ParaTopMargin > outline1(i).ParaBottomMargin) Then
|
||||||
Exit Do
|
Exit Do
|
||||||
EndIf
|
EndIf
|
||||||
Loop
|
Loop
|
||||||
If outline1(i).ParaTopMargin >= 100 Then
|
Do While isContentPageChanged(initPosition, initPageNum)
|
||||||
outline1(i).ParaTopMargin = outline1(i).ParaTopMargin - 100
|
If outline1(i).ParaBottomMargin < 0 Then
|
||||||
|
Exit Do
|
||||||
EndIf
|
EndIf
|
||||||
|
outline1(i).ParaTopMargin = outline1(i).ParaTopMargin - 100
|
||||||
|
Loop
|
||||||
EndIf
|
EndIf
|
||||||
Next i
|
Next i
|
||||||
Next j
|
Next j
|
||||||
oViewCursor.goToRange(oSavePosition,false)
|
oViewCursor.goToRange(savePosition,false)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
@ -449,13 +458,21 @@ Sub stretchPrevPage()
|
||||||
Next i
|
Next i
|
||||||
Exit Sub
|
Exit Sub
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
oViewCursor.goToRange(oSavePosition,false)
|
oViewCursor.goToRange(oSavePosition,false)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub balanceCurParaLastLine()
|
||||||
|
Dim oViewCursor As Object
|
||||||
|
Dim oTextCursor As Object
|
||||||
|
Dim paraEnd As Object
|
||||||
|
Dim success As Boolean
|
||||||
|
Dim adjustType As Integer
|
||||||
|
fixViewCursor()
|
||||||
|
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||||
|
oViewCursor.ParaIsHyphenation = true
|
||||||
|
success = balanceParaTail(oViewCursor.Start, false)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub adjustLastLineCurPara()
|
Sub adjustLastLineCurPara()
|
||||||
Dim oViewCursor As Object
|
Dim oViewCursor As Object
|
||||||
Dim oTextCursor As Object
|
Dim oTextCursor As Object
|
||||||
|
@ -463,6 +480,7 @@ Sub adjustLastLineCurPara()
|
||||||
Dim success As Boolean
|
Dim success As Boolean
|
||||||
Dim adjustType As Integer
|
Dim adjustType As Integer
|
||||||
Dim hyph As Boolean
|
Dim hyph As Boolean
|
||||||
|
fixViewCursor()
|
||||||
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||||
oTextCursor = oViewCursor.Text.CreateTextCursorByRange(oViewCursor)
|
oTextCursor = oViewCursor.Text.CreateTextCursorByRange(oViewCursor)
|
||||||
paraEnd = getParaEnd(oTextCursor)
|
paraEnd = getParaEnd(oTextCursor)
|
||||||
|
@ -474,7 +492,7 @@ Sub adjustLastLineCurPara()
|
||||||
adjustType = oTextCursor.ParaAdjust
|
adjustType = oTextCursor.ParaAdjust
|
||||||
hyph = oTextCursor.ParaIsHyphenation
|
hyph = oTextCursor.ParaIsHyphenation
|
||||||
oTextCursor.ParaIsHyphenation = true
|
oTextCursor.ParaIsHyphenation = true
|
||||||
success = balanceParaTail(oTextCursor.Start)
|
success = balanceParaTail(oTextCursor.Start, true)
|
||||||
If success And adjustType = 2 Then
|
If success And adjustType = 2 Then
|
||||||
oTextCursor.ParaLastLineAdjust = 2
|
oTextCursor.ParaLastLineAdjust = 2
|
||||||
Else
|
Else
|
||||||
|
@ -503,7 +521,7 @@ Sub balanceFootNote(textElement As Object)
|
||||||
enum1Element = enum1.nextElement
|
enum1Element = enum1.nextElement
|
||||||
If enum1Element.supportsService("com.sun.star.text.Paragraph") Then
|
If enum1Element.supportsService("com.sun.star.text.Paragraph") Then
|
||||||
oViewCursor.goToRange(enum1Element,false)
|
oViewCursor.goToRange(enum1Element,false)
|
||||||
adjustLastLineCurPara()
|
balanceCurParaLastLine()
|
||||||
EndIf
|
EndIf
|
||||||
Wend
|
Wend
|
||||||
End Sub
|
End Sub
|
||||||
|
@ -537,7 +555,7 @@ End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Function balanceParaTail(targetPara As Object) As Boolean
|
Function balanceParaTail(targetPara As Object, strictMode As Boolean) As Boolean
|
||||||
Dim oViewCursor As Object
|
Dim oViewCursor As Object
|
||||||
Dim oTextCursor As Object
|
Dim oTextCursor As Object
|
||||||
Dim oContent As Object
|
Dim oContent As Object
|
||||||
|
@ -550,10 +568,10 @@ Function balanceParaTail(targetPara As Object) As Boolean
|
||||||
oContentStart = getParaStart(oTextCursor)
|
oContentStart = getParaStart(oTextCursor)
|
||||||
oContentEnd = getParaEnd(oTextCursor)
|
oContentEnd = getParaEnd(oTextCursor)
|
||||||
oContent = getParaSelected(oContentStart,oContentEnd)
|
oContent = getParaSelected(oContentStart,oContentEnd)
|
||||||
balanceParaTail = balanceContentTail(oContent)
|
balanceParaTail = balanceContentTail(oContent, strictMode)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Function balanceContentTail(oContent As Object) As Boolean
|
Function balanceContentTail(oContent As Object, strictMode As Boolean) As Boolean
|
||||||
' Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
|
' Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
|
||||||
balanceContentTail = false
|
balanceContentTail = false
|
||||||
Dim oViewCursor As Object
|
Dim oViewCursor As Object
|
||||||
|
@ -561,20 +579,18 @@ Function balanceContentTail(oContent As Object) As Boolean
|
||||||
Dim lineCount As Integer
|
Dim lineCount As Integer
|
||||||
Dim initialLineCount As Integer
|
Dim initialLineCount As Integer
|
||||||
Dim lineLen As Integer
|
Dim lineLen As Integer
|
||||||
|
Dim initialLineLen As Integer
|
||||||
Dim minLastLineLength As Integer
|
Dim minLastLineLength As Integer
|
||||||
Dim medianLen As Integer
|
Dim medianLen As Integer
|
||||||
Dim paraLines() As Object
|
Dim paraLines() As Object
|
||||||
Dim decreaseKerningFailed As Boolean
|
|
||||||
Dim increaseKerningFailed As Boolean
|
|
||||||
Dim fallBackSuccess As Boolean
|
Dim fallBackSuccess As Boolean
|
||||||
fallBackSuccess = false
|
fallBackSuccess = false
|
||||||
decreaseKerningFailed = false
|
|
||||||
increaseKerningFailed = false
|
|
||||||
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||||
paraLen = Len(oContent.String)
|
paraLen = Len(oContent.String)
|
||||||
paraLines = getContentLines(oContent)
|
paraLines = getContentLines(oContent)
|
||||||
initialLineCount = getParaLinesCount(paraLines)
|
initialLineCount = getParaLinesCount(paraLines)
|
||||||
lineLen = getParaLineLength(paraLines, 0)
|
lineLen = getParaLineLength(paraLines, 0)
|
||||||
|
initialLineLen = lineLen
|
||||||
medianLen = calculateMedianParaLen(oContent)
|
medianLen = calculateMedianParaLen(oContent)
|
||||||
minLastLineLength = medianLen * 0.93
|
minLastLineLength = medianLen * 0.93
|
||||||
|
|
||||||
|
@ -597,9 +613,20 @@ Function balanceContentTail(oContent As Object) As Boolean
|
||||||
'Tightened last line but it is still smaller than we need
|
'Tightened last line but it is still smaller than we need
|
||||||
fallBackSuccess = tryExpandPrevLines(oContent, minLastLineLength)
|
fallBackSuccess = tryExpandPrevLines(oContent, minLastLineLength)
|
||||||
If Not fallBackSuccess Then
|
If Not fallBackSuccess Then
|
||||||
|
If strictMode Then
|
||||||
oContent.CharKerning = initialCharKerning
|
oContent.CharKerning = initialCharKerning
|
||||||
oViewCursor.collapseToEnd()
|
|
||||||
balanceContentTail = false
|
balanceContentTail = false
|
||||||
|
Else
|
||||||
|
paraLines = getContentLines(oContent)
|
||||||
|
lineLen = getParaLineLength(paraLines,0)
|
||||||
|
If (lineLen < initialLineLen) Then
|
||||||
|
oContent.CharKerning = initialCharKerning
|
||||||
|
balanceContentTail = false
|
||||||
|
Else
|
||||||
|
balanceContentTail = true
|
||||||
|
EndIf
|
||||||
|
EndIf
|
||||||
|
oViewCursor.collapseToEnd()
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
Exit Do
|
Exit Do
|
||||||
|
@ -654,10 +681,15 @@ End Function
|
||||||
|
|
||||||
Function tryExpandPrevLines(oPara As Object, minLastLineLength As Integer) As Boolean
|
Function tryExpandPrevLines(oPara As Object, minLastLineLength As Integer) As Boolean
|
||||||
Dim lineCount As Integer
|
Dim lineCount As Integer
|
||||||
|
Dim finishLineCount As Integer
|
||||||
Dim initialLineCount As Integer
|
Dim initialLineCount As Integer
|
||||||
Dim paraLine As Object
|
Dim paraLine As Object
|
||||||
|
Dim finishLastline As Object
|
||||||
Dim lineNum As Integer
|
Dim lineNum As Integer
|
||||||
Dim failedLines() As Integer
|
Dim failedLines() As Integer
|
||||||
|
Dim lastLineCharKerning As Integer
|
||||||
|
Dim paraLines() As Object
|
||||||
|
Dim lineCharKerning As Integer
|
||||||
paraLines = getContentLines(oPara)
|
paraLines = getContentLines(oPara)
|
||||||
lineLen = getParaLineLength(paraLines,0)
|
lineLen = getParaLineLength(paraLines,0)
|
||||||
initialLineCount = getParaLinesCount(paraLines)
|
initialLineCount = getParaLinesCount(paraLines)
|
||||||
|
@ -674,9 +706,16 @@ Function tryExpandPrevLines(oPara As Object, minLastLineLength As Integer) As Bo
|
||||||
lineLen = getParaLineLength(paraLines,0)
|
lineLen = getParaLineLength(paraLines,0)
|
||||||
If lineNum > 1 And (lineCount <> initialLineCount Or paraLine.CharKerning > MAX_CHAR_KERNING) Then
|
If lineNum > 1 And (lineCount <> initialLineCount Or paraLine.CharKerning > MAX_CHAR_KERNING) Then
|
||||||
AddToArray(failedLines, lineNum)
|
AddToArray(failedLines, lineNum)
|
||||||
decreaseCharKerning(paraLine)
|
lineCharKerning = decreaseCharKerning(paraLine)
|
||||||
paraLines = getContentLines(oPara)
|
paraLines = getContentLines(oPara)
|
||||||
lineCount = getParaLinesCount(paraLines)
|
lineCount = getParaLinesCount(paraLines)
|
||||||
|
If lineCount > initialLineCount Then
|
||||||
|
Do While lineCount > initialLineCount And lineCharKerning > MIN_CHAR_KERNING
|
||||||
|
lineCharKerning = decreaseCharKerning(paraLine)
|
||||||
|
paraLines = getContentLines(oPara)
|
||||||
|
lineCount = getParaLinesCount(paraLines)
|
||||||
|
Loop
|
||||||
|
EndIf
|
||||||
lineLen = getParaLineLength(paraLines,0)
|
lineLen = getParaLineLength(paraLines,0)
|
||||||
lineNum = 0
|
lineNum = 0
|
||||||
ElseIf lineNum = 1 And paraLine.CharKerning > MAX_CHAR_KERNING Then
|
ElseIf lineNum = 1 And paraLine.CharKerning > MAX_CHAR_KERNING Then
|
||||||
|
@ -689,8 +728,50 @@ Function tryExpandPrevLines(oPara As Object, minLastLineLength As Integer) As Bo
|
||||||
Else
|
Else
|
||||||
tryExpandPrevLines = false
|
tryExpandPrevLines = false
|
||||||
EndIf
|
EndIf
|
||||||
|
normalizeLastLine(oPara)
|
||||||
|
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Sub normalizeLastLine(oPara As Object)
|
||||||
|
Dim lineCount As Integer
|
||||||
|
Dim finishLineCount As Integer
|
||||||
|
Dim initialLineCount As Integer
|
||||||
|
Dim paraLine As Object
|
||||||
|
Dim finishLastline As Object
|
||||||
|
Dim lineNum As Integer
|
||||||
|
Dim failedLines() As Integer
|
||||||
|
Dim lastLineCharKerning As Integer
|
||||||
|
Dim paraLines() As Object
|
||||||
|
Dim oTextCursor As Object
|
||||||
|
oTextCursor = oPara.Text.createTextCursorByRange(oPara)
|
||||||
|
oTextCursor.collapseToEnd()
|
||||||
|
If ( oTextCursor.CharKerning > 0 ) Then
|
||||||
|
Exit Sub
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
'increase last line kerning to 0
|
||||||
|
paraLines = getContentLines(oPara)
|
||||||
|
lineCount = getParaLinesCount(paraLines)
|
||||||
|
finishLineCount = lineCount
|
||||||
|
finishLastline = paraLines(UBound(paraLines))
|
||||||
|
'try just set 0 char kerning to last line, reduce kerning if failed
|
||||||
|
lastLineCharKerning = 0
|
||||||
|
finishLastline.CharKerning = lastLineCharKerning
|
||||||
|
paraLines = getContentLines(oPara)
|
||||||
|
lineCount = getParaLinesCount(paraLines)
|
||||||
|
If lineCount > finishLineCount Then
|
||||||
|
Do While lineCount > finishLineCount AND lastLineCharKerning > MIN_CHAR_KERNING
|
||||||
|
lastLineCharKerning = lastLineCharKerning - 2
|
||||||
|
finishLastline.CharKerning = lastLineCharKerning
|
||||||
|
paraLines = getContentLines(oPara)
|
||||||
|
lineCount = getParaLinesCount(paraLines)
|
||||||
|
Loop
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Function getParaLinesCount(paraLines() As Object) As Integer
|
Function getParaLinesCount(paraLines() As Object) As Integer
|
||||||
getParaLinesCount = UBound(paraLines) + 1
|
getParaLinesCount = UBound(paraLines) + 1
|
||||||
|
@ -736,7 +817,7 @@ Function getContentLines(oContent As Object) As Variant
|
||||||
getContentLines = paraLines
|
getContentLines = paraLines
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Sub decreaseCharKerning(oPara As Object)
|
Function decreaseCharKerning(oPara As Object) As Integer
|
||||||
Dim initialCharKerning As Integer
|
Dim initialCharKerning As Integer
|
||||||
Dim textExcerpts As Object
|
Dim textExcerpts As Object
|
||||||
Dim textExcerpt As Object
|
Dim textExcerpt As Object
|
||||||
|
@ -747,9 +828,10 @@ Sub decreaseCharKerning(oPara As Object)
|
||||||
If (initialCharKerning >= MIN_CHAR_KERNING) Then
|
If (initialCharKerning >= MIN_CHAR_KERNING) Then
|
||||||
oPara.CharKerning = initialCharKerning - 2
|
oPara.CharKerning = initialCharKerning - 2
|
||||||
EndIf
|
EndIf
|
||||||
End Sub
|
decreaseCharKerning = initialCharKerning - 2
|
||||||
|
End Function
|
||||||
|
|
||||||
Sub increaseCharKerning(oPara As Object)
|
Function increaseCharKerning(oPara As Object) As Integer
|
||||||
Dim initialCharKerning As Integer
|
Dim initialCharKerning As Integer
|
||||||
Dim textExcerpts As Object
|
Dim textExcerpts As Object
|
||||||
Dim textExcerpt As Object
|
Dim textExcerpt As Object
|
||||||
|
@ -758,7 +840,9 @@ Sub increaseCharKerning(oPara As Object)
|
||||||
initialCharKerning = oPara.CharKerning
|
initialCharKerning = oPara.CharKerning
|
||||||
EndIf
|
EndIf
|
||||||
oPara.CharKerning = initialCharKerning + 2
|
oPara.CharKerning = initialCharKerning + 2
|
||||||
End Sub
|
increaseCharKerning = initialCharKerning + 2
|
||||||
|
End Function
|
||||||
|
|
||||||
Function lastLineIsNotBalanced(lineLen As Integer,minLastLineLength As Integer) As Boolean
|
Function lastLineIsNotBalanced(lineLen As Integer,minLastLineLength As Integer) As Boolean
|
||||||
lastLineIsNotBalanced = true
|
lastLineIsNotBalanced = true
|
||||||
If lineLen = 0 Then
|
If lineLen = 0 Then
|
||||||
|
@ -1034,8 +1118,10 @@ End Sub
|
||||||
Sub replaceParaStyle
|
Sub replaceParaStyle
|
||||||
|
|
||||||
dim oldStyleName As String
|
dim oldStyleName As String
|
||||||
|
dim oldStyleNameLocalized As String
|
||||||
dim oldStyle As Object
|
dim oldStyle As Object
|
||||||
dim newStyleName As String
|
dim newStyleName As String
|
||||||
|
dim newStyleNameLocalized As String
|
||||||
dim paragraphStyles As Object
|
dim paragraphStyles As Object
|
||||||
dim userInput As Integer
|
dim userInput As Integer
|
||||||
Dim listBox As Object
|
Dim listBox As Object
|
||||||
|
@ -1067,11 +1153,11 @@ Sub replaceParaStyle
|
||||||
listBox.addItems(sortedDPSN , 0)
|
listBox.addItems(sortedDPSN , 0)
|
||||||
oDialog.Title = getTranslation("replaceParaStyleDialogTitle")
|
oDialog.Title = getTranslation("replaceParaStyleDialogTitle")
|
||||||
oDialog.Execute()
|
oDialog.Execute()
|
||||||
newStyleName = oDialog.model.Tag
|
newStyleNameLocalized = oDialog.model.Tag
|
||||||
If newStyleName="0" or newStyleName="" Then
|
If newStyleNameLocalized="0" or newStyleNameLocalized="" Then
|
||||||
Exit sub
|
Exit sub
|
||||||
EndIf
|
EndIf
|
||||||
foundIndex = getIndex(displayParaStyleNames, newStyleName)
|
foundIndex = getIndex(displayParaStyleNames, newStyleNameLocalized)
|
||||||
'set style system name instead of display name
|
'set style system name instead of display name
|
||||||
newStyleName = paraStyleNames(foundIndex)
|
newStyleName = paraStyleNames(foundIndex)
|
||||||
|
|
||||||
|
@ -1079,11 +1165,10 @@ Sub replaceParaStyle
|
||||||
MsgBox getTranslation("replaceParaStyleStylesEqualsNotification")
|
MsgBox getTranslation("replaceParaStyleStylesEqualsNotification")
|
||||||
Exit sub
|
Exit sub
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
If oldStyleName <> "" Then
|
If oldStyleName <> "" Then
|
||||||
oldStyle = paraStyles.getByName(oldStyleName)
|
oldStyle = paraStyles.getByName(oldStyleName)
|
||||||
If NOT oldStyle.isUserDefined Then
|
If NOT oldStyle.isUserDefined Then
|
||||||
MsgBox getTranslation("replaceParaStyleCurrentStyleIsStandard")
|
replaceDefaultParaStyle(getLocalizedParaStyleName(oldStyleName), newStyleNameLocalized)
|
||||||
Exit sub
|
Exit sub
|
||||||
EndIf
|
EndIf
|
||||||
oldStyle.ParentStyle = newStyleName
|
oldStyle.ParentStyle = newStyleName
|
||||||
|
@ -1101,10 +1186,70 @@ Sub replaceParaStyle
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
Wend
|
Wend
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Function getLocalizedParaStyleName(styleName as String) As String
|
||||||
|
Dim style As Object
|
||||||
|
Dim styles As Object
|
||||||
|
styles = ThisComponent.StyleFamilies
|
||||||
|
style = styles.getByName(styles.elementNames(1)).getByName(styleName)
|
||||||
|
getLocalizedParaStyleName = style.DisplayName
|
||||||
|
End Function
|
||||||
|
|
||||||
|
sub replaceDefaultParaStyle(fromStyle As String, toStyle As String)
|
||||||
|
|
||||||
|
dim document as object
|
||||||
|
dim dispatcher as object
|
||||||
|
document = ThisComponent.CurrentController.Frame
|
||||||
|
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
|
||||||
|
dim args1(21) as new com.sun.star.beans.PropertyValue
|
||||||
|
args1(0).Name = "SearchItem.StyleFamily"
|
||||||
|
args1(0).Value = 2
|
||||||
|
args1(1).Name = "SearchItem.CellType"
|
||||||
|
args1(1).Value = 0
|
||||||
|
args1(2).Name = "SearchItem.RowDirection"
|
||||||
|
args1(2).Value = true
|
||||||
|
args1(3).Name = "SearchItem.AllTables"
|
||||||
|
args1(3).Value = false
|
||||||
|
args1(4).Name = "SearchItem.SearchFiltered"
|
||||||
|
args1(4).Value = false
|
||||||
|
args1(5).Name = "SearchItem.Backward"
|
||||||
|
args1(5).Value = false
|
||||||
|
args1(6).Name = "SearchItem.Pattern"
|
||||||
|
args1(6).Value = true
|
||||||
|
args1(7).Name = "SearchItem.Content"
|
||||||
|
args1(7).Value = false
|
||||||
|
args1(8).Name = "SearchItem.AsianOptions"
|
||||||
|
args1(8).Value = false
|
||||||
|
args1(9).Name = "SearchItem.AlgorithmType"
|
||||||
|
args1(9).Value = 0
|
||||||
|
args1(10).Name = "SearchItem.SearchFlags"
|
||||||
|
args1(10).Value = 65536
|
||||||
|
args1(11).Name = "SearchItem.SearchString"
|
||||||
|
args1(11).Value = fromStyle
|
||||||
|
args1(12).Name = "SearchItem.ReplaceString"
|
||||||
|
args1(12).Value = toStyle
|
||||||
|
args1(13).Name = "SearchItem.Locale"
|
||||||
|
args1(13).Value = 255
|
||||||
|
args1(14).Name = "SearchItem.ChangedChars"
|
||||||
|
args1(14).Value = 2
|
||||||
|
args1(15).Name = "SearchItem.DeletedChars"
|
||||||
|
args1(15).Value = 2
|
||||||
|
args1(16).Name = "SearchItem.InsertedChars"
|
||||||
|
args1(16).Value = 2
|
||||||
|
args1(17).Name = "SearchItem.TransliterateFlags"
|
||||||
|
args1(17).Value = 1280
|
||||||
|
args1(18).Name = "SearchItem.Command"
|
||||||
|
args1(18).Value = 3
|
||||||
|
args1(19).Name = "SearchItem.SearchFormatted"
|
||||||
|
args1(19).Value = false
|
||||||
|
args1(20).Name = "SearchItem.AlgorithmType2"
|
||||||
|
args1(20).Value = 1
|
||||||
|
args1(21).Name = "Quiet"
|
||||||
|
args1(21).Value = true
|
||||||
|
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args1())
|
||||||
|
end sub
|
||||||
|
|
||||||
Function getIndex(array As variant, value As variant) As Integer
|
Function getIndex(array As variant, value As variant) As Integer
|
||||||
Dim id As Integer
|
Dim id As Integer
|
||||||
Dim nRight As Integer
|
Dim nRight As Integer
|
||||||
|
@ -1159,4 +1304,26 @@ Sub subShellSort(mArray)
|
||||||
h = h \ 3
|
h = h \ 3
|
||||||
Loop
|
Loop
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
sub setZoomToSpeedUpTasks
|
||||||
|
dim document as object
|
||||||
|
dim dispatcher as object
|
||||||
|
dim args1(2) as new com.sun.star.beans.PropertyValue
|
||||||
|
dim args2(1) as new com.sun.star.beans.PropertyValue
|
||||||
|
|
||||||
|
document = ThisComponent.CurrentController.Frame
|
||||||
|
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
|
||||||
|
args1(0).Name = "Zoom.Value"
|
||||||
|
args1(0).Value = 60
|
||||||
|
args1(1).Name = "Zoom.ValueSet"
|
||||||
|
args1(1).Value = 28703
|
||||||
|
args1(2).Name = "Zoom.Type"
|
||||||
|
args1(2).Value = 0
|
||||||
|
dispatcher.executeDispatch(document, ".uno:Zoom", "", 0, args1())
|
||||||
|
args2(0).Name = "ViewLayout.Columns"
|
||||||
|
args2(0).Value = 1
|
||||||
|
args2(1).Name = "ViewLayout.BookMode"
|
||||||
|
args2(1).Value = false
|
||||||
|
dispatcher.executeDispatch(document, ".uno:ViewLayout", "", 0, args2())
|
||||||
|
end sub
|
||||||
</script:module>
|
</script:module>
|
|
@ -15,6 +15,7 @@ Private Sub convertHyphInDoc()
|
||||||
statusIndicator = ThisComponent.getCurrentController.StatusIndicator
|
statusIndicator = ThisComponent.getCurrentController.StatusIndicator
|
||||||
statusIndicator.Start(getTranslation("hyphenationsInProgress"),10)
|
statusIndicator.Start(getTranslation("hyphenationsInProgress"),10)
|
||||||
turnOffTracking
|
turnOffTracking
|
||||||
|
setZoomToSpeedUpTasks()
|
||||||
AcceptAllTrackedChanges
|
AcceptAllTrackedChanges
|
||||||
convertHyphInText(ThisComponent.Text)
|
convertHyphInText(ThisComponent.Text)
|
||||||
' Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
|
' Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="PageStyles" script:language="StarBasic" script:moduleType="normal"> Dim pDialog As Object
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="PageStyles" script:language="StarBasic" script:moduleType="normal">
|
||||||
|
Dim pDialog As Object
|
||||||
Sub pageStylesDialog
|
Sub pageStylesDialog
|
||||||
|
|
||||||
Dim listBox As Object
|
Dim listBox As Object
|
||||||
|
@ -356,7 +357,7 @@ Function covertMMtoLong(dimension As String) As Long
|
||||||
convertMMtoLong = -1
|
convertMMtoLong = -1
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
dimension = customReplace(dimension, ",", ".")
|
dimension = customReplace(dimension, ".", ",")
|
||||||
If Not IsNumeric( dimension ) Then
|
If Not IsNumeric( dimension ) Then
|
||||||
convertMMtoLong = -1
|
convertMMtoLong = -1
|
||||||
Exit Function
|
Exit Function
|
||||||
|
|
|
@ -18,6 +18,7 @@ Sub makeLinksWithLevel(level)
|
||||||
Dim outline() As Object
|
Dim outline() As Object
|
||||||
Dim oAnchor1Name As String
|
Dim oAnchor1Name As String
|
||||||
Dim oAnchor2Name As String
|
Dim oAnchor2Name As String
|
||||||
|
Dim message As String
|
||||||
Dim i As Integer
|
Dim i As Integer
|
||||||
heading = getHeadingWithLevel(level)
|
heading = getHeadingWithLevel(level)
|
||||||
outline = getOutlineWithLevel(level)
|
outline = getOutlineWithLevel(level)
|
||||||
|
@ -31,7 +32,10 @@ Sub makeLinksWithLevel(level)
|
||||||
createLink(outline(i),"",oAnchor2Name)
|
createLink(outline(i),"",oAnchor2Name)
|
||||||
Next i
|
Next i
|
||||||
Else
|
Else
|
||||||
MsgBox getTranslation("TOCErrorContentsNotMatchHeadings1") & " " & level & " (" & (Ubound(outline)+1) & getTranslation("TOCErrorContentsNotMatchHeadings2") & " " & level & " " & getTranslation("TOCErrorContentsNotMatchHeadings3") & (Ubound(heading)+1) & ")"
|
message = getTranslation("TOCErrorContentsNotMatchHeadings1") & " " & level & " (" & (Ubound(outline)+1) &") " & _
|
||||||
|
getTranslation("TOCErrorContentsNotMatchHeadings2") & " " & level & " " & _
|
||||||
|
getTranslation("TOCErrorContentsNotMatchHeadings3") & " (" & (Ubound(heading)+1) & ")"
|
||||||
|
showTOCLinksDialog(message, heading(), outline() )
|
||||||
EndIf
|
EndIf
|
||||||
ElseIf Ubound(outline) = -1 Then
|
ElseIf Ubound(outline) = -1 Then
|
||||||
' MsgBox (getTranslation("TOCErrorNoContents1") & " " & level & " " & getTranslation("TOCErrorNoContents2"))
|
' MsgBox (getTranslation("TOCErrorNoContents1") & " " & level & " " & getTranslation("TOCErrorNoContents2"))
|
||||||
|
@ -131,6 +135,95 @@ Function getOutlineWithLevel(curNum)
|
||||||
getOutlineWithLevel = par()
|
getOutlineWithLevel = par()
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Sub showTOCLinksDialog(message As String, heading() As Object, outline() As Object)
|
||||||
|
Dim pDialog As Object
|
||||||
|
Dim grid As Object
|
||||||
|
Dim headingsColumn As Object
|
||||||
|
Dim tocColumn As Object
|
||||||
|
Dim oGridControl As Object
|
||||||
|
Dim oColumnModel As Object
|
||||||
|
Dim oDataModel As Object
|
||||||
|
Dim rect As Object
|
||||||
|
Dim i As Integer
|
||||||
|
Dim j As Integer
|
||||||
|
Dim outlineCell As String
|
||||||
|
Dim headingCell As String
|
||||||
|
DialogLibraries.LoadLibrary("ePublishing")
|
||||||
|
pDialog = CreateUnoDialog( DialogLibraries.ePublishing.toc_links )
|
||||||
|
|
||||||
|
'grid = pDialog.getControl("grid")
|
||||||
|
grid = pDialog.Model.createInstance("com.sun.star.awt.grid.UnoControlGridModel")
|
||||||
|
grid.Name = "tocGrid"
|
||||||
|
grid.ShowColumnHeader = True
|
||||||
|
grid.ShowRowHeader = True
|
||||||
|
grid.VScroll = true
|
||||||
|
grid.Sizeable = true
|
||||||
|
grid.Step = 0
|
||||||
|
|
||||||
|
oColumnModel = createUnoService( "com.sun.star.awt.grid.DefaultGridColumnModel")
|
||||||
|
|
||||||
|
tocColumn = createUnoService( "com.sun.star.awt.grid.GridColumn")
|
||||||
|
tocColumn.Title = getTranslation("tocItemText")
|
||||||
|
tocColumn.ColumnWidth = 100
|
||||||
|
tocColumn.Resizeable = true
|
||||||
|
'tocColumn.Flexibility = true
|
||||||
|
|
||||||
|
oColumnModel.addColumn( tocColumn )
|
||||||
|
|
||||||
|
headingsColumn = createUnoService( "com.sun.star.awt.grid.GridColumn")
|
||||||
|
headingsColumn.Title = getTranslation("headingItemText")
|
||||||
|
headingsColumn.ColumnWidth = 100
|
||||||
|
headingsColumn.Resizeable = true
|
||||||
|
'headingsColumn.Flexibility = true
|
||||||
|
|
||||||
|
oColumnModel.addColumn( headingsColumn )
|
||||||
|
|
||||||
|
grid.ColumnModel = oColumnModel
|
||||||
|
'grid.Sizeable = False
|
||||||
|
'gridStep = 0
|
||||||
|
|
||||||
|
oDataModel = createUnoService( "com.sun.star.awt.grid.DefaultGridDataModel")
|
||||||
|
If Ubound(outline) > Ubound(heading) Then
|
||||||
|
For i = 0 To (Ubound(outline))
|
||||||
|
outlineCell = outline(i).getString()
|
||||||
|
j = i MOD (Ubound(heading) + 1)
|
||||||
|
headingCell = heading(j).getString()
|
||||||
|
oDataModel.addRow ( i+1 , Array(outlineCell, headingCell) )
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
For i = 0 To (Ubound(heading))
|
||||||
|
headingCell = heading(i).getString()
|
||||||
|
If i > Ubound(outline) Then
|
||||||
|
outlineCell = ""
|
||||||
|
Else
|
||||||
|
outlineCell = outline(i).getString()
|
||||||
|
EndIf
|
||||||
|
oDataModel.addRow ( i+1 , Array(outlineCell, headingCell) )
|
||||||
|
Next i
|
||||||
|
EndIf
|
||||||
|
grid.GridDataModel = oDataModel
|
||||||
|
|
||||||
|
oGridControl = createUnoService("com.sun.star.awt.grid.UnoControlGrid")
|
||||||
|
oGridControl.setModel(grid)
|
||||||
|
pDialog.addControl("gridtab", oGridControl)
|
||||||
|
rect = pDialog.getPosSize()
|
||||||
|
oGridControl.setPosSize(10,60,rect.Width - 20,rect.Height - 120, com.sun.star.awt.PosSize.POSSIZE)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pDialog.getControl("Ok").Label = getTranslation("buttonOk")
|
||||||
|
pDialog.getControl("message").SetText(message)
|
||||||
|
pDialog.Title = getTranslation("tocDialogLabel")
|
||||||
|
pDialog.Execute()
|
||||||
|
pDialog.dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Sub addToArray(xArray(),vNextElement)
|
Sub addToArray(xArray(),vNextElement)
|
||||||
Dim iUB As Integer
|
Dim iUB As Integer
|
||||||
Dim iLB As Integer
|
Dim iLB As Integer
|
||||||
|
|
|
@ -29,7 +29,7 @@ End Function
|
||||||
Function getRussian(identifier As String) As String
|
Function getRussian(identifier As String) As String
|
||||||
Select Case identifier
|
Select Case identifier
|
||||||
Case "buttonOk"
|
Case "buttonOk"
|
||||||
getRussian = "Применить"
|
getRussian = "OK"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "buttonCancel"
|
Case "buttonCancel"
|
||||||
getRussian = "Отмена"
|
getRussian = "Отмена"
|
||||||
|
@ -140,10 +140,10 @@ Function getRussian(identifier As String) As String
|
||||||
getRussian = "Число параграфов со стилем Оглавление "
|
getRussian = "Число параграфов со стилем Оглавление "
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings2"
|
Case "TOCErrorContentsNotMatchHeadings2"
|
||||||
getRussian = ") не кратно числу Заголовоков"
|
getRussian = " не кратно числу Заголовоков"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings3"
|
Case "TOCErrorContentsNotMatchHeadings3"
|
||||||
getRussian = "уровня ("
|
getRussian = "уровня "
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "complileJournalIssueConfirmation"
|
Case "complileJournalIssueConfirmation"
|
||||||
getRussian = "Вы уверены, что хотите запустить сборку выпуска ?"
|
getRussian = "Вы уверены, что хотите запустить сборку выпуска ?"
|
||||||
|
@ -295,6 +295,15 @@ Function getRussian(identifier As String) As String
|
||||||
Case "EndnotesConversionTwoOptions"
|
Case "EndnotesConversionTwoOptions"
|
||||||
getRussian = "Найдены и стандартные и ручные концевые сноски. Можно сконвертировать стандартные в ручные (установите курсор в нужном параграфе) или ручные в стандартные"
|
getRussian = "Найдены и стандартные и ручные концевые сноски. Можно сконвертировать стандартные в ручные (установите курсор в нужном параграфе) или ручные в стандартные"
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "tocDialogLabel"
|
||||||
|
getRussian = "Ошибка"
|
||||||
|
Exit Function
|
||||||
|
Case "tocItemText"
|
||||||
|
getRussian = "Текст оглавления"
|
||||||
|
Exit Function
|
||||||
|
Case "headingItemText"
|
||||||
|
getRussian = "Текст заголовка"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getRussian = "Перевод не найден"
|
getRussian = "Перевод не найден"
|
||||||
End Select
|
End Select
|
||||||
|
@ -415,10 +424,10 @@ Function getEnglish(identifier As String) As String
|
||||||
getEnglish = "Number of paras with style Contents "
|
getEnglish = "Number of paras with style Contents "
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings2"
|
Case "TOCErrorContentsNotMatchHeadings2"
|
||||||
getEnglish = ") dosn't match number of headings with "
|
getEnglish = " dosn't match number of headings with "
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings3"
|
Case "TOCErrorContentsNotMatchHeadings3"
|
||||||
getEnglish = "level ("
|
getEnglish = "level "
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "complileJournalIssueConfirmation"
|
Case "complileJournalIssueConfirmation"
|
||||||
getEnglish = "Compile journal issue from articles?"
|
getEnglish = "Compile journal issue from articles?"
|
||||||
|
@ -570,6 +579,15 @@ Function getEnglish(identifier As String) As String
|
||||||
Case "EndnotesConversionTwoOptions"
|
Case "EndnotesConversionTwoOptions"
|
||||||
getEnglish = "Both standard and manual endnotes are found. You can convert standard to manual (place the cursor in the desired paragraph) or manual to standard"
|
getEnglish = "Both standard and manual endnotes are found. You can convert standard to manual (place the cursor in the desired paragraph) or manual to standard"
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "tocDialogLabel"
|
||||||
|
getEnglish = "Error"
|
||||||
|
Exit Function
|
||||||
|
Case "tocItemText"
|
||||||
|
getEnglish = "Contents item text"
|
||||||
|
Exit Function
|
||||||
|
Case "headingItemText"
|
||||||
|
getEnglish = "Heading text"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getEnglish = "No translation"
|
getEnglish = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -689,10 +707,10 @@ Function getFrench(identifier As String) As String
|
||||||
getFrench = "Nombre de paragraphes avec style Table des matières."
|
getFrench = "Nombre de paragraphes avec style Table des matières."
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings2"
|
Case "TOCErrorContentsNotMatchHeadings2"
|
||||||
getFrench = ") n'est pas un multiple du nombre de titres"
|
getFrench = " n'est pas un multiple du nombre de titres"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings3"
|
Case "TOCErrorContentsNotMatchHeadings3"
|
||||||
getFrench = "au niveau ("
|
getFrench = "au niveau "
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "complileJournalIssueConfirmation"
|
Case "complileJournalIssueConfirmation"
|
||||||
getFrench = "Êtes-vous sûr de vouloir compiler un journal à partir d'articles ?"
|
getFrench = "Êtes-vous sûr de vouloir compiler un journal à partir d'articles ?"
|
||||||
|
@ -844,6 +862,15 @@ Function getFrench(identifier As String) As String
|
||||||
Case "EndnotesConversionTwoOptions"
|
Case "EndnotesConversionTwoOptions"
|
||||||
getFrench = "Des notes de fin standard et manuelles sont trouvées. Vous pouvez convertir standard en manuel (placez le curseur dans le paragraphe souhaité) ou manuel en standard"
|
getFrench = "Des notes de fin standard et manuelles sont trouvées. Vous pouvez convertir standard en manuel (placez le curseur dans le paragraphe souhaité) ou manuel en standard"
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "tocDialogLabel"
|
||||||
|
getFrench = "Erreur"
|
||||||
|
Exit Function
|
||||||
|
Case "tocItemText"
|
||||||
|
getFrench = "Texte de l'élément de contenu"
|
||||||
|
Exit Function
|
||||||
|
Case "headingItemText"
|
||||||
|
getFrench = "Texte d'en-tête"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getFrench = "No translation"
|
getFrench = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -963,10 +990,10 @@ Function getCroatian(identifier As String) As String
|
||||||
getCroatian = "Broj paragrafa sa stilom Sadržaj"
|
getCroatian = "Broj paragrafa sa stilom Sadržaj"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings2"
|
Case "TOCErrorContentsNotMatchHeadings2"
|
||||||
getCroatian = ") nije višestruko od broja Zaglavlja"
|
getCroatian = " nije višestruko od broja Zaglavlja"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings3"
|
Case "TOCErrorContentsNotMatchHeadings3"
|
||||||
getCroatian = "Nivoa ("
|
getCroatian = "Nivoa "
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "complileJournalIssueConfirmation"
|
Case "complileJournalIssueConfirmation"
|
||||||
getCroatian = "Da li ste sigurni da želite da pokrenete gradnju izdanja ?"
|
getCroatian = "Da li ste sigurni da želite da pokrenete gradnju izdanja ?"
|
||||||
|
@ -1118,6 +1145,15 @@ Function getCroatian(identifier As String) As String
|
||||||
Case "EndnotesConversionTwoOptions"
|
Case "EndnotesConversionTwoOptions"
|
||||||
getCroatian = "Pronađene su i standardne i ručne bilješke. Možete pretvoriti standardni u ručni (postavite kursor u željeni odlomak) ili ručni u standardni"
|
getCroatian = "Pronađene su i standardne i ručne bilješke. Možete pretvoriti standardni u ručni (postavite kursor u željeni odlomak) ili ručni u standardni"
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "tocDialogLabel"
|
||||||
|
getCroatian = "Pogreška"
|
||||||
|
Exit Function
|
||||||
|
Case "tocItemText"
|
||||||
|
getCroatian = "Sadržaj teksta stavke"
|
||||||
|
Exit Function
|
||||||
|
Case "headingItemText"
|
||||||
|
getCroatian = "Tekst zaglavlja"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getCroatian = "No translation"
|
getCroatian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -1237,10 +1273,10 @@ Function getSerbian(identifier As String) As String
|
||||||
getSerbian = "Број параграфа са стилом Садржај"
|
getSerbian = "Број параграфа са стилом Садржај"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings2"
|
Case "TOCErrorContentsNotMatchHeadings2"
|
||||||
getSerbian = ") није вишеструко од броја Заглавља"
|
getSerbian = " није вишеструко од броја Заглавља"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings3"
|
Case "TOCErrorContentsNotMatchHeadings3"
|
||||||
getSerbian = "Нивоа ("
|
getSerbian = "Нивоа "
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "complileJournalIssueConfirmation"
|
Case "complileJournalIssueConfirmation"
|
||||||
getSerbian = "Да ли сте сигурни да желите да покренете градњу издања ?"
|
getSerbian = "Да ли сте сигурни да желите да покренете градњу издања ?"
|
||||||
|
@ -1392,6 +1428,15 @@ Function getSerbian(identifier As String) As String
|
||||||
Case "EndnotesConversionTwoOptions"
|
Case "EndnotesConversionTwoOptions"
|
||||||
getSerbian = "Пронађене су и стандардне и ручне белешке. Можете претворити стандардни у ручни (поставите курсор у жељени одломак) или ручни у стандардни"
|
getSerbian = "Пронађене су и стандардне и ручне белешке. Можете претворити стандардни у ручни (поставите курсор у жељени одломак) или ручни у стандардни"
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "tocDialogLabel"
|
||||||
|
getSerbian = "Грешка"
|
||||||
|
Exit Function
|
||||||
|
Case "tocItemText"
|
||||||
|
getSerbian = "Садржај текста ставке"
|
||||||
|
Exit Function
|
||||||
|
Case "headingItemText"
|
||||||
|
getSerbian = "Текст заглавља"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getSerbian = "No translation"
|
getSerbian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -1511,10 +1556,10 @@ Function getBosnian(identifier As String) As String
|
||||||
getBosnian = "Broj paragrafa sa stilom Sadržaj"
|
getBosnian = "Broj paragrafa sa stilom Sadržaj"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings2"
|
Case "TOCErrorContentsNotMatchHeadings2"
|
||||||
getBosnian = ") nije višestruko od broja Zaglavlja"
|
getBosnian = " nije višestruko od broja Zaglavlja"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "TOCErrorContentsNotMatchHeadings3"
|
Case "TOCErrorContentsNotMatchHeadings3"
|
||||||
getBosnian = "Nivoa ("
|
getBosnian = "Nivoa "
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "complileJournalIssueConfirmation"
|
Case "complileJournalIssueConfirmation"
|
||||||
getBosnian = "Da li ste sigurni da želite da pokrenete gradnju izdanja ?"
|
getBosnian = "Da li ste sigurni da želite da pokrenete gradnju izdanja ?"
|
||||||
|
@ -1666,6 +1711,15 @@ Function getBosnian(identifier As String) As String
|
||||||
Case "EndnotesConversionTwoOptions"
|
Case "EndnotesConversionTwoOptions"
|
||||||
getBosnian = "Pronađene su i standardne i ručne bilješke. Možete pretvoriti standardni u ručni (postavite kursor u željeni odlomak) ili ručni u standardni"
|
getBosnian = "Pronađene su i standardne i ručne bilješke. Možete pretvoriti standardni u ručni (postavite kursor u željeni odlomak) ili ručni u standardni"
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "tocDialogLabel"
|
||||||
|
getBosnian = "Greška"
|
||||||
|
Exit Function
|
||||||
|
Case "tocItemText"
|
||||||
|
getBosnian = "Sadržaj teksta stavke"
|
||||||
|
Exit Function
|
||||||
|
Case "headingItemText"
|
||||||
|
getBosnian = "Tekst zaglavlja"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getBosnian = "No translation"
|
getBosnian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
|
|
@ -5,4 +5,5 @@
|
||||||
<library:element library:name="replaceParaStyle"/>
|
<library:element library:name="replaceParaStyle"/>
|
||||||
<library:element library:name="PageConfig"/>
|
<library:element library:name="PageConfig"/>
|
||||||
<library:element library:name="EndnotesConversion"/>
|
<library:element library:name="EndnotesConversion"/>
|
||||||
|
<library:element library:name="toc_links"/>
|
||||||
</library:library>
|
</library:library>
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="journals" script:language="StarBasic">Private sub journalsMark35
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="journals" script:language="StarBasic">Private sub journalsMark36
|
||||||
End sub
|
End sub
|
||||||
|
|
||||||
Dim templateName As String
|
Dim templateName As String
|
||||||
|
@ -29,6 +29,7 @@ Private Sub makeUpIssue
|
||||||
If NOT confirm(description) Then
|
If NOT confirm(description) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
EndIf
|
EndIf
|
||||||
|
setZoomToSpeedUpTasks()
|
||||||
|
|
||||||
EIFN = "ЭиФН"
|
EIFN = "ЭиФН"
|
||||||
PHA = "ФА"
|
PHA = "ФА"
|
||||||
|
@ -1141,16 +1142,11 @@ Sub configureCursorPositionForContentShrink()
|
||||||
Dim oViewCursor As Object
|
Dim oViewCursor As Object
|
||||||
Dim oTextCursor As Object
|
Dim oTextCursor As Object
|
||||||
Dim curSelection As Object
|
Dim curSelection As Object
|
||||||
Dim selectionTextRange
|
Dim selectionTextRange As Object
|
||||||
Dim nextChar As String
|
Dim nextChar As String
|
||||||
Dim prefChar As String
|
Dim prefChar As String
|
||||||
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||||
curSelection = ThisComponent.getCurrentSelection()
|
fixViewCursor()
|
||||||
If Not curSelection.supportsService("com.sun.star.text.TextRanges") Then
|
|
||||||
selectionTextRange = curSelection.Anchor
|
|
||||||
oViewCursor.JumpToFirstPage(false)
|
|
||||||
oViewCursor.goToRange(selectionTextRange,false)
|
|
||||||
EndIf
|
|
||||||
oTextCursor = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
oTextCursor = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
||||||
'At start of Para
|
'At start of Para
|
||||||
oTextCursor.collapseToEnd()
|
oTextCursor.collapseToEnd()
|
||||||
|
@ -1160,14 +1156,28 @@ Sub configureCursorPositionForContentShrink()
|
||||||
oViewCursor.goToRange(oTextCursor,false)
|
oViewCursor.goToRange(oTextCursor,false)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Function isShrinkPageSucceded(initPosition As Object,initPageNum As String) As Boolean
|
Sub fixViewCursor()
|
||||||
|
Dim oViewCursor As Object
|
||||||
|
Dim curSelection As Object
|
||||||
|
Dim selectionTextRange As Object
|
||||||
|
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||||
|
curSelection = ThisComponent.getCurrentSelection()
|
||||||
|
If Not curSelection.supportsService("com.sun.star.text.TextRanges") Then
|
||||||
|
selectionTextRange = curSelection.Anchor
|
||||||
|
oViewCursor.JumpToFirstPage(false)
|
||||||
|
oViewCursor.goToRange(selectionTextRange,false)
|
||||||
|
EndIf
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Function isContentPageChanged(initPosition As Object,initPageNum As String) As Boolean
|
||||||
Dim oViewCursor As Object
|
Dim oViewCursor As Object
|
||||||
Dim oTextCursor As Object
|
Dim oTextCursor As Object
|
||||||
isShrinkPageSucceded = false
|
isShrinkPageSucceded = false
|
||||||
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||||
oViewCursor.goToRange(initPosition,false)
|
oViewCursor.goToRange(initPosition,false)
|
||||||
If (oViewCursor.getPage <> initPageNum) Then
|
If (oViewCursor.getPage <> initPageNum) Then
|
||||||
isShrinkPageSucceded = true
|
isContentPageChanged = true
|
||||||
EndIf
|
EndIf
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
@ -1190,11 +1200,11 @@ Function breakParaAtCursor() As Object
|
||||||
oViewCursor.goToRange(oTextCursor,false)
|
oViewCursor.goToRange(oTextCursor,false)
|
||||||
breakParaAtCursor = oViewcursor.Text.createTextCursorByRange(oViewCursor)
|
breakParaAtCursor = oViewcursor.Text.createTextCursorByRange(oViewCursor)
|
||||||
Else
|
Else
|
||||||
oTextCursor.goRight(1,false)
|
'oTextCursor.goRight(1,false)
|
||||||
oViewCursor.goToRange(oTextCursor,false)
|
'oViewCursor.goToRange(oTextCursor,false)
|
||||||
oViewCursor.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE
|
'oViewCursor.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE
|
||||||
oTextCursor.goLeft(1,false)
|
'oTextCursor.goLeft(1,false)
|
||||||
oViewCursor.goToRange(oTextCursor,false)
|
'oViewCursor.goToRange(oTextCursor,false)
|
||||||
breakParaAtCursor = oViewcursor.Text.createTextCursorByRange(oViewCursor)
|
breakParaAtCursor = oViewcursor.Text.createTextCursorByRange(oViewCursor)
|
||||||
EndIf
|
EndIf
|
||||||
End Function
|
End Function
|
||||||
|
@ -1295,7 +1305,7 @@ Function shrinkPageContent() As Boolean
|
||||||
targetContent = selectContentToShrink(initPosition,startPosition)
|
targetContent = selectContentToShrink(initPosition,startPosition)
|
||||||
For i = LBound(targetContent) To Ubound(targetContent)
|
For i = LBound(targetContent) To Ubound(targetContent)
|
||||||
shrinkContentSpacing(targetContent(i))
|
shrinkContentSpacing(targetContent(i))
|
||||||
If isShrinkPageSucceded(initPosition, initPageNum) Then
|
If isContentPageChanged(initPosition, initPageNum) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
Next i
|
Next i
|
||||||
|
@ -1307,9 +1317,9 @@ Function shrinkPageContent() As Boolean
|
||||||
decreaseContentCharHeight(targetContent(i), delta)
|
decreaseContentCharHeight(targetContent(i), delta)
|
||||||
EndIf
|
EndIf
|
||||||
If shrinkContentWithKerning(targetContent(i)) Then
|
If shrinkContentWithKerning(targetContent(i)) Then
|
||||||
balanceContentTail(targetContent(i))
|
balanceContentTail(targetContent(i),false)
|
||||||
EndIf
|
EndIf
|
||||||
If isShrinkPageSucceded(initPosition, initPageNum) Then
|
If isContentPageChanged(initPosition, initPageNum) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
Next i
|
Next i
|
||||||
|
@ -1317,7 +1327,7 @@ Function shrinkPageContent() As Boolean
|
||||||
For j = 1 To roundsLineHeight
|
For j = 1 To roundsLineHeight
|
||||||
For i = LBound(targetContent) To Ubound(targetContent)
|
For i = LBound(targetContent) To Ubound(targetContent)
|
||||||
decreaseIntervalHeight(targetContent(i))
|
decreaseIntervalHeight(targetContent(i))
|
||||||
If isShrinkPageSucceded(initPosition, initPageNum) Then
|
If isContentPageChanged(initPosition, initPageNum) Then
|
||||||
Exit Function
|
Exit Function
|
||||||
EndIf
|
EndIf
|
||||||
Next i
|
Next i
|
||||||
|
|
8
ePublishing/toc_links.xdl
Normal file
8
ePublishing/toc_links.xdl
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
|
||||||
|
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="toc_links" dlg:left="74" dlg:top="15" dlg:width="346" dlg:height="284" dlg:closeable="true" dlg:moveable="true">
|
||||||
|
<dlg:bulletinboard>
|
||||||
|
<dlg:button dlg:id="Ok" dlg:tab-index="0" dlg:left="125" dlg:top="265" dlg:width="96" dlg:height="17" dlg:value="CommandButton1" dlg:button-type="ok"/>
|
||||||
|
<dlg:text dlg:id="message" dlg:tab-index="1" dlg:left="5" dlg:top="4" dlg:width="334" dlg:height="24" dlg:value="message" dlg:align="center" dlg:multiline="true"/>
|
||||||
|
</dlg:bulletinboard>
|
||||||
|
</dlg:window>
|
|
@ -2,9 +2,9 @@
|
||||||
<description xmlns="http://openoffice.org/extensions/update/2006"
|
<description xmlns="http://openoffice.org/extensions/update/2006"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<identifier value="pro.litvinovg.epublishing"/>
|
<identifier value="pro.litvinovg.epublishing"/>
|
||||||
<version value="0.7.6" />
|
<version value="0.7.16" />
|
||||||
<update-download>
|
<update-download>
|
||||||
<src xlink:href="https://dev.litvinovg.pro/litvinovg/epublishing/uploads/1732f9b7e0ac8c9eeb391c8b74122093/epublishing.oxt" />
|
<src xlink:href="https://dev.litvinovg.pro/litvinovg/epublishing/uploads/9e6d9eaeb144d7a67e94c8460492a040/epublishing.oxt" />
|
||||||
</update-download>
|
</update-download>
|
||||||
<release-notes>
|
<release-notes>
|
||||||
<src xlink:href="https://dev.litvinovg.pro/litvinovg/epublishing/-/raw/master/releasenotes.txt" lang="en" />
|
<src xlink:href="https://dev.litvinovg.pro/litvinovg/epublishing/-/raw/master/releasenotes.txt" lang="en" />
|
||||||
|
|
BIN
translations.ods
BIN
translations.ods
Binary file not shown.
Loading…
Add table
Reference in a new issue