New code for pageConfig dialog
This commit is contained in:
parent
163cb7de47
commit
23f8834361
4 changed files with 32 additions and 12 deletions
|
@ -5,7 +5,6 @@
|
|||
<dlg:style dlg:style-id="0" dlg:border="none"/>
|
||||
</dlg:styles>
|
||||
<dlg:bulletinboard>
|
||||
<dlg:textfield dlg:style-id="0" dlg:id="TextField11" dlg:tab-index="10" dlg:left="193" dlg:top="277" dlg:width="16" dlg:height="10" dlg:value="1000"/>
|
||||
<dlg:textfield dlg:style-id="0" dlg:id="pageHeight" dlg:tab-index="11" dlg:left="11" dlg:top="141" dlg:width="16" dlg:height="10" dlg:value="1000"/>
|
||||
<dlg:textfield dlg:style-id="0" dlg:id="pageWidth" dlg:tab-index="7" dlg:left="99" dlg:top="281" dlg:width="16" dlg:height="10" dlg:value="1000"/>
|
||||
<dlg:textfield dlg:style-id="0" dlg:id="leftPageMargin" dlg:tab-index="6" dlg:left="32" dlg:top="1" dlg:width="16" dlg:height="10" dlg:value="1000"/>
|
||||
|
@ -18,11 +17,12 @@
|
|||
<dlg:textfield dlg:style-id="0" dlg:id="footnoteAreaOffset" dlg:tab-index="1" dlg:left="193" dlg:top="202" dlg:width="16" dlg:height="10" dlg:value="1000"/>
|
||||
<dlg:text dlg:id="description" dlg:tab-index="12" dlg:left="229" dlg:top="6" dlg:width="155" dlg:height="42" dlg:value="Label1"/>
|
||||
<dlg:button dlg:id="Cancel" dlg:tab-index="14" dlg:left="314" dlg:top="290" dlg:width="58" dlg:height="13" dlg:value="Cancel" dlg:button-type="cancel"/>
|
||||
<dlg:button dlg:id="Ok" dlg:tab-index="13" dlg:left="241" dlg:top="290" dlg:width="58" dlg:height="13" dlg:value="Ok" dlg:button-type="ok"/>
|
||||
<dlg:button dlg:id="Ok" dlg:tab-index="13" dlg:left="241" dlg:top="290" dlg:width="58" dlg:height="13" dlg:value="Ok" dlg:button-type="cancel"/>
|
||||
<dlg:menulist dlg:id="ListBox2" dlg:tab-index="16" dlg:left="286" dlg:top="15" dlg:width="2" dlg:height="0"/>
|
||||
<dlg:menulist dlg:id="slylesList" dlg:tab-index="17" dlg:left="293" dlg:top="95" dlg:width="0" dlg:height="2"/>
|
||||
<dlg:img dlg:style-id="0" dlg:id="ImageControl1" dlg:tab-index="18" dlg:left="11" dlg:top="8" dlg:width="214" dlg:height="291" dlg:image-src="%origin%/images/panel.svg" dlg:scale-mode="isotropic"/>
|
||||
<dlg:img dlg:style-id="0" dlg:id="ImageControl1" dlg:tab-index="18" dlg:left="11" dlg:top="8" dlg:width="214" dlg:height="291" dlg:scale-mode="isotropic"/>
|
||||
<dlg:menulist dlg:id="pageStyles" dlg:tab-index="15" dlg:left="229" dlg:top="50" dlg:width="155" dlg:height="230" dlg:multiselection="true"/>
|
||||
<dlg:textfield dlg:style-id="0" dlg:id="rightPageMargin" dlg:tab-index="0" dlg:left="168" dlg:top="1" dlg:width="16" dlg:height="10" dlg:value="1000"/>
|
||||
<dlg:textfield dlg:style-id="0" dlg:id="bottomPageMargin" dlg:tab-index="10" dlg:left="193" dlg:top="277" dlg:width="16" dlg:height="10" dlg:value="1000"/>
|
||||
</dlg:bulletinboard>
|
||||
</dlg:window>
|
|
@ -8,27 +8,47 @@
|
|||
Dim pageStyles As Object
|
||||
Dim pageStyleNames() As String
|
||||
Dim imageURL As String
|
||||
Dim pageStyle As Object
|
||||
oStyles = ThisComponent.StyleFamilies
|
||||
pageStyles = oStyles.getByName(oStyles.elementNames(2))
|
||||
pageStyleNames = pageStyles.getElementNames
|
||||
Dim displayPageStyleNames(Ubound(pageStyleNames))
|
||||
For i = LBound(displayPageStyleNames) To Ubound(displayPageStyleNames)
|
||||
pageStyle = pageStyles.getByName(pageStyleNames(i))
|
||||
displayPageStyleNames(i) = pageStyle.displayName
|
||||
Next i
|
||||
subShellSort(displayPageStyleNames)
|
||||
|
||||
dialog = CreateUnoDialog( DialogLibraries.ePublishing.PageConfig )
|
||||
' Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
|
||||
a = dialog.getControl("ImageControl1")
|
||||
|
||||
Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
|
||||
imageURL = convertToURL(getExtensionPath() + "/images/panel.svg")
|
||||
dialog.getControl("ImageControl1").model.imageURL = imageURL
|
||||
dialog.getControl("description").setText(getTranslation("PageConfigDialogTranslations"))
|
||||
|
||||
dialog.getControl("pageHeight").setText("")
|
||||
dialog.getControl("pageWidth").setText("")
|
||||
dialog.getControl("leftPageMargin").setText("")
|
||||
dialog.getControl("topPageMargin").setText("")
|
||||
dialog.getControl("rightPageMargin").setText("")
|
||||
dialog.getControl("bottomPageMargin").setText("")
|
||||
dialog.getControl("headerHeight").setText("")
|
||||
dialog.getControl("headerOffset").setText("")
|
||||
dialog.getControl("footerHeight").setText("")
|
||||
dialog.getControl("footerOffset").setText("")
|
||||
dialog.getControl("footnoteAreaHeight").setText("")
|
||||
dialog.getControl("footnoteAreaOffset").setText("")
|
||||
dialog.getControl("Cancel").Label = getTranslation("PageConfigDialogCancelButton")
|
||||
dialog.getControl("Ok").Label = getTranslation("PageConfigDialogOkButton")
|
||||
listBox = dialog.getControl("pageStyles")
|
||||
listBox.addItems(pageStyleNames , 0)
|
||||
dialog.Title = getTranslation("batchChangePageStyleProperties")
|
||||
listBox.addItems(displayPageStyleNames, 0)
|
||||
dialog.Title = getTranslation("PageConfigDialogTitle")
|
||||
dialog.Execute()
|
||||
End Sub
|
||||
|
||||
Function getExtensionPath As String
|
||||
Dim extensionIdentifier As String
|
||||
Dim pip As Object
|
||||
extensionIdentifier = "pro.litvinovg.Redaction"
|
||||
extensionIdentifier = "pro.litvinovg.epublishing"
|
||||
pip = GetDefaultContext.getByName("/singletons/com.sun.star.deployment.PackageInformationProvider")
|
||||
getExtensionPath = pip.getPackageLocation(extensionIdentifier)
|
||||
End Function
|
||||
|
|
|
@ -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="journals" script:language="StarBasic">Private sub journalsMark15
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="journals" script:language="StarBasic">Private sub journalsMark16
|
||||
End sub
|
||||
|
||||
Dim templateName As String
|
||||
|
|
BIN
translations.ods
BIN
translations.ods
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue