Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
ca46b20e41 | |||
e62d44cd89 | |||
a5ac4cbb43 |
4 changed files with 73 additions and 12 deletions
|
@ -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.15" />
|
<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 archMark27
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Archive" script:language="StarBasic" script:moduleType="normal">Sub archMark29
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -1118,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
|
||||||
|
@ -1151,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)
|
||||||
|
|
||||||
|
@ -1163,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
|
||||||
|
@ -1185,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
|
||||||
|
|
|
@ -378,4 +378,4 @@ Function customReplace(Source As String, Search As String, NewPart As String) As
|
||||||
customReplace = Result
|
customReplace = Result
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
</script:module>
|
</script:module>
|
|
@ -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.15" />
|
<version value="0.7.16" />
|
||||||
<update-download>
|
<update-download>
|
||||||
<src xlink:href="https://dev.litvinovg.pro/litvinovg/epublishing/uploads/3afa2f0bfae728d06d883992a6bca862/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" />
|
||||||
|
|
Loading…
Add table
Reference in a new issue