Added navigator dialog
This commit is contained in:
parent
2395f816e6
commit
9846e2933c
7 changed files with 2469 additions and 1 deletions
12
Redaction/Navigator.xdl
Normal file
12
Redaction/Navigator.xdl
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?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="Navigator" dlg:left="0" dlg:top="50" dlg:width="100" dlg:height="123" dlg:closeable="true" dlg:moveable="true">
|
||||||
|
<dlg:bulletinboard>
|
||||||
|
<dlg:text dlg:id="description" dlg:tab-index="1" dlg:left="2" dlg:top="5" dlg:width="96" dlg:height="47" dlg:value="описание объектов для навигации" dlg:multiline="true"/>
|
||||||
|
<dlg:button dlg:id="close" dlg:tab-index="2" dlg:left="2" dlg:top="105" dlg:width="96" dlg:height="15" dlg:value="Закрыть навигатор" dlg:toggled="1"/>
|
||||||
|
<dlg:button dlg:id="next" dlg:tab-index="0" dlg:left="67" dlg:top="70" dlg:width="30" dlg:height="30" dlg:toggled="1"/>
|
||||||
|
<dlg:text dlg:id="current" dlg:tab-index="4" dlg:left="36" dlg:top="81" dlg:width="28" dlg:height="15" dlg:value="current"/>
|
||||||
|
<dlg:text dlg:id="found" dlg:tab-index="5" dlg:left="2" dlg:top="55" dlg:width="96" dlg:height="12" dlg:value="Всего найдено"/>
|
||||||
|
<dlg:button dlg:id="prev" dlg:tab-index="3" dlg:left="3" dlg:top="70" dlg:width="30" dlg:height="30" dlg:valign="center" dlg:toggled="1"/>
|
||||||
|
</dlg:bulletinboard>
|
||||||
|
</dlg:window>
|
|
@ -287,6 +287,12 @@ Function getRussian(identifier As String) As String
|
||||||
Case "advancedMenuconvertFontsToCharStyles"
|
Case "advancedMenuconvertFontsToCharStyles"
|
||||||
getRussian = "Создать стили символов из найденных шрифтов"
|
getRussian = "Создать стили символов из найденных шрифтов"
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "buttonClose"
|
||||||
|
getRussian = "Закрыть"
|
||||||
|
Exit Function
|
||||||
|
Case "navigatorFound"
|
||||||
|
getRussian = "Всего найдено: "
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getRussian = "Перевод не найден"
|
getRussian = "Перевод не найден"
|
||||||
End Select
|
End Select
|
||||||
|
@ -556,6 +562,12 @@ Function getEnglish(identifier As String) As String
|
||||||
Case "advancedMenuconvertFontsToCharStyles"
|
Case "advancedMenuconvertFontsToCharStyles"
|
||||||
getEnglish = "Create character styles from found fonts "
|
getEnglish = "Create character styles from found fonts "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "buttonClose"
|
||||||
|
getEnglish = "Close"
|
||||||
|
Exit Function
|
||||||
|
Case "navigatorFound"
|
||||||
|
getEnglish = "Total found: "
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getEnglish = "No translation"
|
getEnglish = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -824,6 +836,12 @@ Function getCroatian(identifier As String) As String
|
||||||
Case "advancedMenuconvertFontsToCharStyles"
|
Case "advancedMenuconvertFontsToCharStyles"
|
||||||
getCroatian = "Stvorite stilove znakova iz pronađenih fontova "
|
getCroatian = "Stvorite stilove znakova iz pronađenih fontova "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "buttonClose"
|
||||||
|
getCroatian = "Zatvoriti "
|
||||||
|
Exit Function
|
||||||
|
Case "navigatorFound"
|
||||||
|
getCroatian = "Ukupno pronađeno: "
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getCroatian = "No translation"
|
getCroatian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -1092,6 +1110,12 @@ Function getSerbian(identifier As String) As String
|
||||||
Case "advancedMenuconvertFontsToCharStyles"
|
Case "advancedMenuconvertFontsToCharStyles"
|
||||||
getSerbian = "Створите стилове знакова од пронађених фонтова "
|
getSerbian = "Створите стилове знакова од пронађених фонтова "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "buttonClose"
|
||||||
|
getSerbian = "Затворити"
|
||||||
|
Exit Function
|
||||||
|
Case "navigatorFound"
|
||||||
|
getSerbian = "Укупно пронађено: "
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getSerbian = "No translation"
|
getSerbian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -1360,6 +1384,12 @@ Function getBosnian(identifier As String) As String
|
||||||
Case "advancedMenuconvertFontsToCharStyles"
|
Case "advancedMenuconvertFontsToCharStyles"
|
||||||
getBosnian = "Stvorite stilove znakova iz pronađenih fontova "
|
getBosnian = "Stvorite stilove znakova iz pronađenih fontova "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "buttonClose"
|
||||||
|
getBosnian = "Zatvoriti "
|
||||||
|
Exit Function
|
||||||
|
Case "navigatorFound"
|
||||||
|
getBosnian = "Ukupno pronađeno: "
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getBosnian = "No translation"
|
getBosnian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
|
|
@ -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="Validation" script:language="StarBasic">Sub markval22
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validation" script:language="StarBasic">Sub markval24
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -851,6 +851,81 @@ Function getCharsInFont(fontName As String) As String
|
||||||
EndIf
|
EndIf
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Sub findColoredBackgroundInDoc()
|
||||||
|
|
||||||
|
Dim founds As Object
|
||||||
|
Dim sDesc As Object
|
||||||
|
Dim SrchAttributes(0) as new com.sun.star.beans.PropertyValue
|
||||||
|
SrchAttributes(0).Name = "CharBackTransparent"
|
||||||
|
SrchAttributes(0).Value = False
|
||||||
|
sDesc = Thiscomponent.createSearchDescriptor()
|
||||||
|
sDesc.SearchAll = true
|
||||||
|
sDesc.ValueSearch = false
|
||||||
|
sDesc.SearchRegularExpression = true
|
||||||
|
sDesc.SearchString = searchString
|
||||||
|
sDesc.searchStyles = true
|
||||||
|
sDesc.SetSearchAttributes(SrchAttributes())
|
||||||
|
founds = Thiscomponent.findAll(sDesc)
|
||||||
|
If founds.count <> 0 Then
|
||||||
|
MsgBox founds.count
|
||||||
|
Else
|
||||||
|
MsgBox getTranslation("No colored text excerpts found")
|
||||||
|
EndIf
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Sub starNavigatorDialog(objectsDescription As Text,founds As Object)
|
||||||
|
Dim dialog As Object
|
||||||
|
Dim leftImageURL As String
|
||||||
|
Dim rightImageURL As String
|
||||||
|
waitingForDialog = true
|
||||||
|
dialog = notModalDialog("Navigator")
|
||||||
|
' dialog.getControl("found").SetText(getTranslation("EndnotesNativeDialogFound") & CStr(UBound(foundEndNotes)+1))
|
||||||
|
' dialog.getControl("description").SetText(getTranslation("EndnotesNativeDialogDescriptionSelect"))
|
||||||
|
' dialog.getControl("cancel").Label = getTranslation("buttonCancel")
|
||||||
|
dialog.getControl("close").Label = getTranslation("buttonClose")
|
||||||
|
leftImageURL = convertToURL(getExtensionPath() & "/images/left-navigator.svg")
|
||||||
|
rightImageURL = convertToURL(getExtensionPath() & "/images/right-navigator.svg")
|
||||||
|
dialog.getControl("prev").model.imageURL = leftImageURL
|
||||||
|
'dialog.getControl("prev").model.ScaleMode = 2
|
||||||
|
dialog.getControl("next").model.imageURL = rightImageURL
|
||||||
|
'dialog.getControl("next").model.ScaleMode = 2
|
||||||
|
dialog.setvisible(true)
|
||||||
|
Do While waitingForDialog
|
||||||
|
If dialog.getControl("close").model.state = 1 then
|
||||||
|
exit Do
|
||||||
|
EndIf
|
||||||
|
If dialog.getControl("prev").model.state = 1 then
|
||||||
|
EndIf
|
||||||
|
If dialog.getControl("next").model.state = 1 then
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
wait (100)
|
||||||
|
Loop
|
||||||
|
dialog.dispose
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Function getExtensionPath() As String
|
||||||
|
Dim extensionIdentifier As String
|
||||||
|
Dim pip As Object
|
||||||
|
extensionIdentifier = "pro.litvinovg.Redaction"
|
||||||
|
pip = GetDefaultContext.getByName("/singletons/com.sun.star.deployment.PackageInformationProvider")
|
||||||
|
getExtensionPath = pip.getPackageLocation(extensionIdentifier)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Function notModalDialog(dialogName As String) As Variant
|
||||||
|
Dim windowProvider As Object
|
||||||
|
Dim containerWindow As Object
|
||||||
|
Dim handler As Object
|
||||||
|
Dim dialogUrl As String
|
||||||
|
Dim dialog As Object
|
||||||
|
containerWindow = ThisComponent.getCurrentController().getFrame().getContainerWindow()
|
||||||
|
dialogUrl = "vnd.sun.star.script:Redaction." & dialogName & "?location=application"
|
||||||
|
windowProvider = CreateUnoService("com.sun.star.awt.ContainerWindowProvider")
|
||||||
|
dialog = windowProvider.createContainerWindow(dialogUrl, "", containerWindow, handler)
|
||||||
|
notModalDialog = dialog
|
||||||
|
End Function
|
||||||
|
|
||||||
sub openReport(fileName As String)
|
sub openReport(fileName As String)
|
||||||
dim document as object
|
dim document as object
|
||||||
|
|
|
@ -6,4 +6,5 @@
|
||||||
<library:element library:name="NoStyleFile"/>
|
<library:element library:name="NoStyleFile"/>
|
||||||
<library:element library:name="StartQuietCleaning"/>
|
<library:element library:name="StartQuietCleaning"/>
|
||||||
<library:element library:name="ChooseFontname"/>
|
<library:element library:name="ChooseFontname"/>
|
||||||
|
<library:element library:name="Navigator"/>
|
||||||
</library:library>
|
</library:library>
|
1175
images/left-navigator.svg
Normal file
1175
images/left-navigator.svg
Normal file
File diff suppressed because it is too large
Load diff
After Width: | Height: | Size: 64 KiB |
1175
images/right-navigator.svg
Normal file
1175
images/right-navigator.svg
Normal file
File diff suppressed because it is too large
Load diff
After Width: | Height: | Size: 64 KiB |
BIN
translations.ods
BIN
translations.ods
Binary file not shown.
Loading…
Add table
Reference in a new issue