diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-08-15 11:38:50 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-08-15 11:38:50 +0000 |
commit | ebb6de00a14f5711423c588c8b0bde2a473a6807 (patch) | |
tree | 601e576243cba4fdf6c0d8cb459b32b12bdbf6d6 | |
parent | 8f5541a31c1562a985d2f138abf285a61fe061f6 (diff) |
#87859# Charheight set to Standard when inserting new Document
-rw-r--r-- | wizards/source/webwizard/Bullets.xba | 21 | ||||
-rw-r--r-- | wizards/source/webwizard/HtmlAutoPilotBasic.xba | 5 | ||||
-rw-r--r-- | wizards/source/webwizard/Language.xba | 97 | ||||
-rw-r--r-- | wizards/source/webwizard/WebWzrd.xdl | 16 |
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 = "NumberingType" @@ -40,11 +40,11 @@ Dim oNewBuffer(1) as New com.sun.star.beans.PropertyValue oBookmarkCursor.NumberingRules = oRules oNewBuffer(0).Name = "GraphicURL" oNewBuffer(0).Value = sBulletUrl - oNewBuffer(1).Name = "GraphicSize" +' oNewBuffer(1).Name = "GraphicSize" ' Todo: Get the original Size of the Bullet (see Bug #86196) - oSize.Height = 300 - oSize.Width = 300 - oNewBuffer(1).Value = oSize +' oSize.Height = 300 +' oSize.Width = 300 +' 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()' 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 & BulletName) End If oNewBuffer(i).Value = BulletName - ElseIf oLevel(i).Name = "GraphicSize" Then -' Todo: Get the original Size of the Bullet (see Bug #86196) - oSize.Height = 300 - oSize.Width = 300 - oNewBuffer(i).Value = oSize +' ElseIf oLevel(i).Name = "GraphicSize" Then +'' Todo: Get the original Size of the Bullet (see Bug #86196) +' oSize.Height = 300 +' oSize.Width = 300 +' 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("CharHeight") 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("Tools") + oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") GetPaths() oBaseDocument = StarDesktop.ActiveFrame.Controller.Model ' 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 & 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("Gallery", "www-graf/") BulletDir = GetOfficeSubPath("Gallery", "bullets/") PhotosDir = GetPathSettings("Gallery", False, 1) -End Sub - - - -'Function FillupWebListbox(oUcb as Object, sFileFilter as String, oDialog as Object, ListboxName as String, List() as String) -'Dim oDocInfo as Object -'Dim oComp as Object -'Dim oRealDocInfo as Object -'Dim oListboxControl as Object -'Dim sField as String -'Dim sDescription as String -'Dim sFieldList() as String -'Dim bItemFound as Boolean -'Dim MaxIndex as Integer -'Dim DirContent() as String -'Dim FileName as String -'Dim TemplatePath as String -'Dim FilterLen as Integer -'Dim MyArray() -'Dim i as Integer -'Dim m as Integer -'Dim n as Integer -'Dim s as Integer -'Dim a as Integer -''Dim SelList(0) as Integer -'Dim LocMaxIndex as Integer -'Dim FileProperties(0) as new com.sun.star.beans.PropertyValue' -' FileProperties(0).Name = "Hidden" -' FileProperties(0).Value = True -' oListboxControl = oDialog.GetControl(ListboxName) -' FilterLen = Len(sFileFilter) -' bItemFound = False -' TemplatePath = GetOfficeSubPath("Template", "wizard/web/") -' DirContent() = oUcb.GetFolderContents(TemplatePath,True) -' LocMaxIndex = Ubound(DirContent()) -' oDocInfo = CreateUNOService("com.sun.star.document.DocumentProperties") -' Dim SortList(LocMaxIndex,2) -' Dim LocFileName as String -' For i = 0 to LocMaxIndex -' LocFileName = DirContent(i) -' SortList(i,0) = DirContent(i) -' oDocInfo.read(LocFileName) -' SortList(i,1) = oDocInfo.Title -' If Left(FileNameOutOfPath(DirContent(i),getPathSeparator()),3) = "stl" Then -' oComp = StarDesktop.LoadComponentFromURL(DirContent(i),"_blank",0,FileProperties()) -' oRealDocInfo = oComp.getDocumentInfo() -' SortList(i,2) = oRealDocInfo -' oComp.dispose() - ' ' End If - '' -' Next i -' SortList() = BubbleSortList(SortList(),True) -' -' a = 0 -' For i = 0 To LocMaxIndex -' FileName = SortList(i,0) -' If Instr(1,Filename, sFileFilter) Then -' bItemFound = True -' -' sDescription = SortList(i,1) -' oListboxControl.AddItem(sDescription,a) -' a = a + 1 -' List(1,i) = sDescription -' If sFileFilter = "/cnt" Then -' List(2,i) = Filename -' Else -' m = 2 -' For n = 0 To 3 -' sField = SortList(i,2).GetUserFieldValue(n) -' sFieldList() = ArrayoutofString(sField, " ", MaxIndex) -' For s = 0 To MaxIndex -' If m < 6 Then -' List(m,i) = sFieldList(s) & ".gif" -' Else -' List(m,i) = sFieldList(s) -' End If -' m = m + 1 -' Next s -' Next n -' List(8,i) = FileName -' End If -' End If -' Next i -' -' ' No content template? Error message, close new empty document, stop execution -' If Not bItemfound Then -' MsgBox(WebWiz_gErrContentNotFound$ , 16, WebWiz_gWizardName$) -' oBaseDocument.Dispose() -' Stop -' End If -' SelList(0) = 0 -' oListboxControl.Model.SelectedItems() = SelList() -' FillupWebListbox = i -'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"/> |