summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-08-15 11:38:50 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-08-15 11:38:50 +0000
commitebb6de00a14f5711423c588c8b0bde2a473a6807 (patch)
tree601e576243cba4fdf6c0d8cb459b32b12bdbf6d6 /wizards
parent8f5541a31c1562a985d2f138abf285a61fe061f6 (diff)
#87859# Charheight set to Standard when inserting new Document
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/webwizard/Bullets.xba21
-rw-r--r--wizards/source/webwizard/HtmlAutoPilotBasic.xba5
-rw-r--r--wizards/source/webwizard/Language.xba97
-rw-r--r--wizards/source/webwizard/WebWzrd.xdl16
4 files changed, 23 insertions, 116 deletions
diff --git a/wizards/source/webwizard/Bullets.xba b/wizards/source/webwizard/Bullets.xba
index 3c6412eb0d75..d2b1bc1fb1bc 100644
--- a/wizards/source/webwizard/Bullets.xba
+++ b/wizards/source/webwizard/Bullets.xba
@@ -25,7 +25,7 @@ Dim oRules
Dim bDoReplace as Boolean
Dim oSize as New com.sun.star.awt.Size
Dim oNumberingBuffer(0) as New com.sun.star.beans.PropertyValue
-Dim oNewBuffer(1) as New com.sun.star.beans.PropertyValue
+Dim oNewBuffer(0) as New com.sun.star.beans.PropertyValue
oRules = oBookMarkCursor.NumberingRules
If Vartype(oRules()) = 9 Then
oNumberingBuffer(0).Name = &quot;NumberingType&quot;
@@ -40,11 +40,11 @@ Dim oNewBuffer(1) as New com.sun.star.beans.PropertyValue
oBookmarkCursor.NumberingRules = oRules
oNewBuffer(0).Name = &quot;GraphicURL&quot;
oNewBuffer(0).Value = sBulletUrl
- oNewBuffer(1).Name = &quot;GraphicSize&quot;
+&apos; oNewBuffer(1).Name = &quot;GraphicSize&quot;
&apos; Todo: Get the original Size of the Bullet (see Bug #86196)
- oSize.Height = 300
- oSize.Width = 300
- oNewBuffer(1).Value = oSize
+&apos; oSize.Height = 300
+&apos; oSize.Width = 300
+&apos; oNewBuffer(1).Value = oSize
For n = 0 To oRules.Count - 1
oLevel() = oRules.GetByIndex(0)
bDoReplace = ModifyPropertyValue(oLevel(), oNewBuffer())
@@ -67,6 +67,7 @@ Dim oRules
Dim bIsFirstRun as Boolean
Dim oNewBuffer()&apos; as New com.sun.star.beans.PropertyValue
Dim bDoReplace as Boolean
+Dim oBookmarkCursor as Object
bIsFirstRun = True
oBookmarks = oBaseDocument.BookMarks
For i = 0 To oBookmarks.Count - 1
@@ -106,11 +107,11 @@ Dim oSize as New com.sun.star.awt.Size
FileCopy(oLevel(i).Value, SavePath &amp; BulletName)
End If
oNewBuffer(i).Value = BulletName
- ElseIf oLevel(i).Name = &quot;GraphicSize&quot; Then
-&apos; Todo: Get the original Size of the Bullet (see Bug #86196)
- oSize.Height = 300
- oSize.Width = 300
- oNewBuffer(i).Value = oSize
+&apos; ElseIf oLevel(i).Name = &quot;GraphicSize&quot; Then
+&apos;&apos; Todo: Get the original Size of the Bullet (see Bug #86196)
+&apos; oSize.Height = 300
+&apos; oSize.Width = 300
+&apos; oNewBuffer(i).Value = oSize
Else
oNewBuffer(i).Value = oLevel(i).Value
End If
diff --git a/wizards/source/webwizard/HtmlAutoPilotBasic.xba b/wizards/source/webwizard/HtmlAutoPilotBasic.xba
index 4d2569dd6e79..15a6e89c45b8 100644
--- a/wizards/source/webwizard/HtmlAutoPilotBasic.xba
+++ b/wizards/source/webwizard/HtmlAutoPilotBasic.xba
@@ -110,6 +110,7 @@ Dim CurInd as Integer
oCursor = oBaseDocument.Text.CreateTextCursor()
oCursor.GotoStart(False)
oCursor.GotoEnd(True)
+ oCursor.SetPropertyToDefault(&quot;CharHeight&quot;)
oCursor.InsertDocumentfromURL(FileStr, NoArgs())
SetBulletAndGraphics
CheckControls(oBaseDocument.DrawPage)
@@ -226,8 +227,8 @@ Dim oGraphicObjects as Object
Dim oGraphic as Object
Dim i as Integer
Dim SavePath as String
-
BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
GetPaths()
oBaseDocument = StarDesktop.ActiveFrame.Controller.Model
&apos; Note: The sub DirectoryNameoutofPath should be change, so that the last character is a slash
@@ -263,7 +264,7 @@ Dim sFileName as String
Dim sNewFileUrl as String
sFileName = FileNameoutofPath(SourceUrl)
sNewFileUrl = TargetDir &amp; sFileName
- FileCopy(SourceUrl, sNewFileUrl)
+ oUcb.Copy(SourceUrl, sNewFileUrl)
CopyFile() = sFileName
End Function
diff --git a/wizards/source/webwizard/Language.xba b/wizards/source/webwizard/Language.xba
index 989cc2d9f644..f78e27f4ffe7 100644
--- a/wizards/source/webwizard/Language.xba
+++ b/wizards/source/webwizard/Language.xba
@@ -33,99 +33,4 @@ Sub GetPaths
GraphicsDir = GetOfficeSubPath(&quot;Gallery&quot;, &quot;www-graf/&quot;)
BulletDir = GetOfficeSubPath(&quot;Gallery&quot;, &quot;bullets/&quot;)
PhotosDir = GetPathSettings(&quot;Gallery&quot;, False, 1)
-End Sub
-
-
-
-&apos;Function FillupWebListbox(oUcb as Object, sFileFilter as String, oDialog as Object, ListboxName as String, List() as String)
-&apos;Dim oDocInfo as Object
-&apos;Dim oComp as Object
-&apos;Dim oRealDocInfo as Object
-&apos;Dim oListboxControl as Object
-&apos;Dim sField as String
-&apos;Dim sDescription as String
-&apos;Dim sFieldList() as String
-&apos;Dim bItemFound as Boolean
-&apos;Dim MaxIndex as Integer
-&apos;Dim DirContent() as String
-&apos;Dim FileName as String
-&apos;Dim TemplatePath as String
-&apos;Dim FilterLen as Integer
-&apos;Dim MyArray()
-&apos;Dim i as Integer
-&apos;Dim m as Integer
-&apos;Dim n as Integer
-&apos;Dim s as Integer
-&apos;Dim a as Integer
-&apos;&apos;Dim SelList(0) as Integer
-&apos;Dim LocMaxIndex as Integer
-&apos;Dim FileProperties(0) as new com.sun.star.beans.PropertyValue&apos;
-&apos; FileProperties(0).Name = &quot;Hidden&quot;
-&apos; FileProperties(0).Value = True
-&apos; oListboxControl = oDialog.GetControl(ListboxName)
-&apos; FilterLen = Len(sFileFilter)
-&apos; bItemFound = False
-&apos; TemplatePath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/web/&quot;)
-&apos; DirContent() = oUcb.GetFolderContents(TemplatePath,True)
-&apos; LocMaxIndex = Ubound(DirContent())
-&apos; oDocInfo = CreateUNOService(&quot;com.sun.star.document.DocumentProperties&quot;)
-&apos; Dim SortList(LocMaxIndex,2)
-&apos; Dim LocFileName as String
-&apos; For i = 0 to LocMaxIndex
-&apos; LocFileName = DirContent(i)
-&apos; SortList(i,0) = DirContent(i)
-&apos; oDocInfo.read(LocFileName)
-&apos; SortList(i,1) = oDocInfo.Title
-&apos; If Left(FileNameOutOfPath(DirContent(i),getPathSeparator()),3) = &quot;stl&quot; Then
-&apos; oComp = StarDesktop.LoadComponentFromURL(DirContent(i),&quot;_blank&quot;,0,FileProperties())
-&apos; oRealDocInfo = oComp.getDocumentInfo()
-&apos; SortList(i,2) = oRealDocInfo
-&apos; oComp.dispose()
- &apos; &apos; End If
- &apos;&apos;
-&apos; Next i
-&apos; SortList() = BubbleSortList(SortList(),True)
-&apos;
-&apos; a = 0
-&apos; For i = 0 To LocMaxIndex
-&apos; FileName = SortList(i,0)
-&apos; If Instr(1,Filename, sFileFilter) Then
-&apos; bItemFound = True
-&apos;
-&apos; sDescription = SortList(i,1)
-&apos; oListboxControl.AddItem(sDescription,a)
-&apos; a = a + 1
-&apos; List(1,i) = sDescription
-&apos; If sFileFilter = &quot;/cnt&quot; Then
-&apos; List(2,i) = Filename
-&apos; Else
-&apos; m = 2
-&apos; For n = 0 To 3
-&apos; sField = SortList(i,2).GetUserFieldValue(n)
-&apos; sFieldList() = ArrayoutofString(sField, &quot; &quot;, MaxIndex)
-&apos; For s = 0 To MaxIndex
-&apos; If m &lt; 6 Then
-&apos; List(m,i) = sFieldList(s) &amp; &quot;.gif&quot;
-&apos; Else
-&apos; List(m,i) = sFieldList(s)
-&apos; End If
-&apos; m = m + 1
-&apos; Next s
-&apos; Next n
-&apos; List(8,i) = FileName
-&apos; End If
-&apos; End If
-&apos; Next i
-&apos;
-&apos; &apos; No content template? Error message, close new empty document, stop execution
-&apos; If Not bItemfound Then
-&apos; MsgBox(WebWiz_gErrContentNotFound$ , 16, WebWiz_gWizardName$)
-&apos; oBaseDocument.Dispose()
-&apos; Stop
-&apos; End If
-&apos; SelList(0) = 0
-&apos; oListboxControl.Model.SelectedItems() = SelList()
-&apos; FillupWebListbox = i
-&apos;End Function
-
-</script:module> \ No newline at end of file
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/webwizard/WebWzrd.xdl b/wizards/source/webwizard/WebWzrd.xdl
index 0e51ad21469c..46a811800295 100644
--- a/wizards/source/webwizard/WebWzrd.xdl
+++ b/wizards/source/webwizard/WebWzrd.xdl
@@ -1,32 +1,32 @@
<?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" dlg:id="WebWzrd" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:help-url="HID:34200">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="WebWzrd" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:help-url="HID:34200">
<dlg:bulletinboard>
<dlg:button dlg:id="cbCancel" dlg:tab-index="0" dlg:left="6" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34206" dlg:value="Cancel">
- <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="WebWizard.HtmlAutoPilotBasic.CancelHTMLWizard"/>
+ <script:event script:event-name="on-performaction" script:macro-name="WebWizard.HtmlAutoPilotBasic.CancelHTMLWizard" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cbHelp" dlg:tab-index="1" dlg:left="66" dlg:top="190" dlg:width="50" dlg:height="14" dlg:tag="34200" dlg:help-url="HID:34200" dlg:value="cbHelp">
- <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="Tools.Recursive.ShowHelperDialog"/>
+ <script:event script:event-name="on-performaction" script:macro-name="Tools.Recursive.ShowHelperDialog" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cbGoOn" dlg:tab-index="2" dlg:left="214" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34205" dlg:value="cbGoOn">
- <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="WebWizard.HtmlAutoPilotBasic.EndDialog"/>
+ <script:event script:event-name="on-performaction" script:macro-name="WebWizard.HtmlAutoPilotBasic.EndDialog" script:language="StarBasic"/>
</dlg:button>
<dlg:img dlg:id="ImagePreview" dlg:tab-index="3" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26"/>
<dlg:menulist dlg:id="lbTemplate" dlg:tab-index="4" dlg:left="6" dlg:top="53" dlg:width="110" dlg:height="94" dlg:help-url="HID:34201">
- <dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="WebWizard.HtmlAutoPilotBasic.ReloadCurrentDocument"/>
+ <script:event script:event-name="on-itemstatechange" script:macro-name="WebWizard.HtmlAutoPilotBasic.ReloadCurrentDocument" script:language="StarBasic"/>
</dlg:menulist>
<dlg:menulist dlg:id="lbStyles" dlg:tab-index="5" dlg:left="154" dlg:top="53" dlg:width="110" dlg:height="94" dlg:help-url="HID:34202">
- <dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="WebWizard.HtmlAutoPilotBasic.LoadWebPageStyles"/>
+ <script:event script:event-name="on-itemstatechange" script:macro-name="WebWizard.HtmlAutoPilotBasic.LoadWebPageStyles" script:language="StarBasic"/>
</dlg:menulist>
<dlg:text dlg:id="lblTemplate" dlg:tab-index="6" dlg:left="6" dlg:top="42" dlg:width="110" dlg:height="10"/>
<dlg:text dlg:id="lblStyle" dlg:tab-index="7" dlg:left="154" dlg:top="42" dlg:width="110" dlg:height="10" dlg:value="lblStyle"/>
<dlg:checkbox dlg:id="chkSaveasTemplate" dlg:tab-index="8" dlg:left="6" dlg:top="164" dlg:width="110" dlg:height="12" dlg:help-url="HID:34207" dlg:value="chkSaveasTemplate"/>
<dlg:radiogroup>
<dlg:radio dlg:id="optTiled" dlg:tab-index="9" dlg:left="161" dlg:top="164" dlg:width="96" dlg:height="10" dlg:tag="11" dlg:help-url="HID:34208" dlg:value="optTiled">
- <dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="WebWizard.HtmlAutoPilotBasic.SetBackGraphicStyle"/>
+ <script:event script:event-name="on-itemstatechange" script:macro-name="WebWizard.HtmlAutoPilotBasic.SetBackGraphicStyle" script:language="StarBasic"/>
</dlg:radio>
<dlg:radio dlg:id="optArea" dlg:tab-index="10" dlg:left="161" dlg:top="177" dlg:width="96" dlg:height="10" dlg:tag="10" dlg:help-url="HID:34209" dlg:value="optArea">
- <dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="WebWizard.HtmlAutoPilotBasic.SetBackGraphicStyle"/>
+ <script:event script:event-name="on-itemstatechange" script:macro-name="WebWizard.HtmlAutoPilotBasic.SetBackGraphicStyle" script:language="StarBasic"/>
</dlg:radio>
</dlg:radiogroup>
<dlg:fixedline dlg:id="hlnBackground" dlg:tab-index="11" dlg:left="154" dlg:top="152" dlg:width="110" dlg:height="9" dlg:value="hlnBackground"/>